/* ==========================================================================
   AlphaSync Global — Design System
   Tokens, fonts, reset and base typography. Every other stylesheet reads
   from the custom properties defined here; do not hard-code colours elsewhere.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
  /* Brand palette */
  --navy-900: #071827;
  --navy-800: #0B2238;
  --navy-700: #102B43;
  --navy-600: #1A3A56;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-500: #10B981;
  --emerald-100: #D1FAE5;
  --white: #FFFFFF;
  --off-white: #F8FAFC;
  --warm: #F5F7F5;
  --text: #172B3A;
  --text-2: #64748B;
  --border: #E2E8F0;
  --success: #16A34A;
  --warning: #D97706;
  --error: #DC2626;

  /* Derived values for dark surfaces */
  --on-dark: #FFFFFF;
  --on-dark-2: #A9BCCB;
  --on-dark-3: #6E879B;
  --line-dark: rgba(255, 255, 255, 0.10);
  --line-dark-strong: rgba(255, 255, 255, 0.18);
  --down: #F87171;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --fs-display: clamp(2.5rem, 1.35rem + 4.2vw, 4.25rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-lede: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-micro: 0.8125rem;

  /* Spacing — 4px base */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --section-y: clamp(4rem, 2.5rem + 6vw, 8rem);

  /* Shape. Controls are tight and precise; interface previews are softer. */
  --r-control: 6px;
  --r-panel: 10px;
  --r-tag: 3px;

  --container: 1240px;
  --gutter: clamp(1.25rem, 0.75rem + 2vw, 2rem);
  --header-h: 72px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow-menu: 0 24px 48px -16px rgba(7, 24, 39, 0.28), 0 0 0 1px rgba(7, 24, 39, 0.06);
  --shadow-window: 0 40px 80px -32px rgba(0, 0, 0, 0.55);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
ul[class], ol[class], ul[role="list"] { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }

/* Base typography */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  font-feature-settings: "cv05", "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: inherit; text-wrap: balance; }
h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; letter-spacing: -0.028em; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; }
h4 { font-size: 1rem; font-weight: 600; line-height: 1.4; }
p { text-wrap: pretty; }
a { color: var(--emerald-700); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--emerald-600); }
strong { font-weight: 600; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.92em; font-feature-settings: "zero"; }

.display { font-size: var(--fs-display); font-weight: 800; line-height: 1.0; letter-spacing: -0.04em; }
.lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--text-2); max-width: 38em; }
.small { font-size: var(--fs-small); }
.micro { font-size: var(--fs-micro); line-height: 1.5; }
.muted { color: var(--text-2); }

:focus-visible { outline: 2px solid var(--emerald-500); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--emerald-100); color: var(--navy-900); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000; padding: 10px 16px;
  background: var(--emerald-700); color: var(--white); border-radius: var(--r-control); text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }
