/* ──────────────────────────────────────────────────────────────────────────
   Syncsity — Design Tokens & Reset
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Brand palette (preserved from original Syncsity) ── */
  --navy-darker:   #060b1a;
  --navy-dark:     #0a1022;
  --navy:          #14213d;
  --navy-light:    #1a2a4a;
  --navy-soft:     #213157;
  --blue-50:       #e6f0fb;
  --blue-200:      #99c2ef;
  --blue-300:      #66a3e7;
  --blue-400:      #3385df;   /* hero accent */
  --blue-500:      #0066d7;
  --blue-600:      #0052ac;
  --orange:        #fca311;
  --orange-soft:   rgba(252,163,17,0.15);
  --teal:          #00b8d9;
  --green:         #36b37e;
  --error:         #ff5630;

  /* ── Semantic (dark default) ── */
  --bg:            var(--navy-dark);
  --bg-elev-1:     var(--navy);
  --bg-elev-2:     var(--navy-light);
  --surface:       rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);

  --text:          rgba(255,255,255,0.92);
  --text-muted:    rgba(255,255,255,0.65);
  --text-dim:      rgba(255,255,255,0.45);
  --text-inverse:  #0a1022;

  --accent:        var(--blue-400);
  --accent-hover:  var(--blue-300);
  --accent-fg:     #ffffff;

  --highlight:     var(--orange);
  --highlight-fg:  #0a1022;

  /* ── Typography ── */
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Inter', system-ui, sans-serif;

  /* ── Spacing scale (4px) ── */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px; --s-32: 128px;

  /* ── Radii ── */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-2xl: 28px;

  /* ── Shadows ── */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.20);
  --shadow-md:  0 6px 20px rgba(0,0,0,0.25);
  --shadow-lg:  0 18px 50px rgba(0,0,0,0.40);
  --shadow-glow: 0 0 0 1px rgba(51,133,223,0.30), 0 8px 30px rgba(51,133,223,0.20);

  /* ── Motion ── */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:     150ms;
  --t-base:     240ms;
  --t-slow:     420ms;

  /* ── Layout ── */
  --container:    1200px;
  --container-sm: 720px;
  --container-md: 920px;
  --header-h:     72px;
}

[data-theme="light"] {
  --bg:            #f7f9fc;
  --bg-elev-1:     #ffffff;
  --bg-elev-2:     #f1f5fb;
  --surface:       #ffffff;
  --surface-hover: #f3f6fb;
  --border:        rgba(20, 33, 61, 0.10);
  --border-strong: rgba(20, 33, 61, 0.22);

  --text:          #0a1022;
  --text-muted:    #4a5b78;
  --text-dim:      #6f7f99;
  --text-inverse:  #ffffff;

  --accent:        var(--blue-500);
  --accent-hover:  var(--blue-600);

  --highlight-fg:  #ffffff;

  --shadow-sm:  0 1px 2px rgba(20,33,61,0.06);
  --shadow-md:  0 6px 20px rgba(20,33,61,0.08);
  --shadow-lg:  0 18px 50px rgba(20,33,61,0.12);
  --shadow-glow: 0 0 0 1px rgba(0,102,215,0.30), 0 8px 30px rgba(0,102,215,0.15);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--accent-hover); }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ── Typography scale ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 4.25rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 3rem); }
h3 { font-size: clamp(1.4rem, 1.5vw + 1rem, 2rem); }
h4 { font-size: 1.25rem; }

.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.lead { font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.25rem); color: var(--text-muted); line-height: 1.65; }
.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }
.mono  { font-family: var(--font-mono); }
.gradient-text {
  background: linear-gradient(120deg, var(--blue-300) 0%, var(--blue-400) 50%, var(--orange) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ── Layout helpers ──────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-6); }
.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.section { padding: var(--s-20) 0; position: relative; }
.section--tight { padding: var(--s-12) 0; }
.section--hero  { padding: var(--s-32) 0 var(--s-20); }
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-8); }

/* ── Visually hidden ─────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
