/* Design tokens, reset, and global document defaults */

:root {
  --color-bg: #f4f7f9;
  --color-bg-soft: #edf2f5;
  --color-surface: #ffffff;
  --color-surface-raised: #e8f2f7;
  --color-accent: #0077b8;
  --color-accent-bright: #006da8;
  --color-accent-hover: #005f93;
  --color-cyan: #006fae;
  --color-text: #102a3a;
  --color-text-soft: #29495d;
  --color-text-muted: #5c7180;
  --color-on-accent: #ffffff;
  --color-error: #b4233c;
  --color-border: rgba(16, 72, 101, 0.14);
  --color-border-strong: rgba(0, 119, 184, 0.3);
  --color-border-bright: rgba(0, 119, 184, 0.46);
  --color-grid: rgba(0, 83, 126, 0.055);
  --color-panel: rgba(255, 255, 255, 0.82);
  --color-panel-strong: rgba(255, 255, 255, 0.96);
  --font-sans: Inter, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-tech: "Space Grotesk", Inter, sans-serif;
  --container: 1320px;
  --header-height: 80px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-card: 0 18px 48px rgba(22, 58, 78, 0.1);
  --shadow-glow: 0 18px 64px rgba(0, 119, 184, 0.13);
  --duration-fast: 180ms;
  --transition-fast: var(--duration-fast) ease;
  --transition-medium: 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent-bright);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 1100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (max-width: 1100px) {
  :root {
      --header-height: 72px;
    }
}
