/* Design tokens — single source: docs/FRONTEND_GUIDELINES.md (Gate 3 + Gate 4).
   Do not add colours or sizes here that are not in that file. No gold (hue ~30–60°). */

/* ---------- Fonts (self-hosted, owner decision 5; ranges copied from Google Fonts css2) ---------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---------- Colour (palette A «Indigo sky») ---------- */
  --c-bg: #F6F8FC;
  --c-surface: #FFFFFF;
  --c-blob-1: #A5B4FC;
  --c-blob-2: #93C5FD;
  --c-blob-3: #C4B5FD;
  --c-blob-4: #99F6E4;
  --c-text: #0F172A;
  --c-muted: #475569;
  --c-primary: #4F46E5;
  --c-primary-hover: #4338CA;
  --c-secondary: #0E7490;
  --c-success: #15803D;
  --c-error: #B91C1C;
  --c-border: #E2E8F0;
  --c-border-strong: #7C8BA1;
  --c-placeholder: #64748B;
  --c-primary-soft: #EEF2FF;
  --c-secondary-soft: #ECFEFF;
  --c-error-soft: #FEF2F2;
  --c-success-soft: #F0FDF4;
  --c-shadow-tint: #312E81;
  --c-focus: #4F46E5;
  --c-on-primary: #FFFFFF;

  /* Alpha variants of the colours above (values from DESIGN_SYSTEM.md 2.2, 4.3, 4.11) */
  --c-blob-1-a: rgba(165, 180, 252, .70);
  --c-blob-2-a: rgba(147, 197, 253, .65);
  --c-blob-3-a: rgba(196, 181, 253, .60);
  --c-blob-4-a: rgba(153, 246, 228, .60);
  --c-primary-line: rgba(79, 70, 229, .35);   /* secondary button border */
  --c-error-line: rgba(185, 28, 28, .30);     /* form error box border */

  /* ---------- Glass ---------- */
  --glass-fill: rgba(255, 255, 255, .55);
  --glass-fill-strong: rgba(255, 255, 255, .72);
  --glass-blur: 12px;
  --glass-saturate: 160%;
  --glass-line: rgba(255, 255, 255, .65);
  --glass-border: 1px solid var(--glass-line);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, .7);
  --glass-fallback: rgba(255, 255, 255, .92);
  --reading-surface: rgba(255, 255, 255, .96);

  /* ---------- Shadows (tint = --c-shadow-tint #312E81) ---------- */
  --shadow-sm: 0 1px 2px rgba(49, 46, 129, .06), 0 2px 8px rgba(49, 46, 129, .05);
  --shadow-md: 0 2px 4px rgba(49, 46, 129, .05), 0 8px 32px rgba(49, 46, 129, .08);
  --shadow-lg: 0 4px 8px rgba(49, 46, 129, .06), 0 20px 56px rgba(49, 46, 129, .14);
  --glass-shadow: var(--shadow-md);

  /* ---------- Typography ---------- */
  --font-display: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.25rem, 1.5rem + 3vw, 3.5rem); /* 36 → 56 */
  --fs-h1: 1.875rem;   /* 30 */
  --fs-h2: 1.5rem;     /* 24 */
  --fs-h3: 1.25rem;    /* 20 */
  --fs-lead: 1.125rem; /* 18 */
  --fs-body: 1rem;     /* 16 */
  --fs-small: .875rem; /* 14, never smaller */
  --lh-body: 1.6;
  --lh-heading: 1.2;
  --ls-heading: -.01em;

  /* ---------- Radius ---------- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---------- Spacing (4px base) ---------- */
  --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;

  /* ---------- Layout ---------- */
  --container: 1200px;
  --gutter: var(--s-4);          /* 16 mobile · 24 ≥768 · 32 ≥1024 */
  --section-space: var(--s-16);  /* 64 mobile · 96 ≥1024 */
  --grid-cols: 4;
  --grid-gap: var(--s-4);
  --header-h: 64px;
  --tap: 44px;
  --btn-h: 48px;
  --btn-h-sticky: 52px;
  --input-h: 48px;
  --measure: 68ch;
  --card-pad: var(--s-5);          /* 20 mobile · 28 ≥1024 (DESIGN_SYSTEM 4.4) */
  --wordmark-h: 34px;              /* lockup height (tile + name + descriptor) → name ≈ 22.5px (38px ≥1024 → 25px) */

  /* ---------- Motion (Gate 4 decision 5 — subtle) ---------- */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --reveal-shift: 12px;

  /* ---------- Z-index ---------- */
  --z-sticky-cta: 30;
  --z-header: 40;
  --z-menu: 50;
  --z-skip: 60;
}

/* Breakpoints: sm 480 · md 768 · lg 1024 · xl 1280 (min-width, mobile-first) */
@media (min-width: 768px) {
  :root {
    --gutter: var(--s-6);
    --grid-cols: 8;
    --grid-gap: var(--s-6);
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: var(--s-8);
    --section-space: var(--s-24);
    --grid-cols: 12;
    --glass-blur: 16px;
    --fs-h1: 2.75rem;    /* 44 */
    --fs-h2: 2rem;       /* 32 */
    --fs-h3: 1.375rem;   /* 22 */
    --fs-lead: 1.25rem;  /* 20 */
    --header-h: 72px;
    --card-pad: 28px;
    --wordmark-h: 38px;
  }
}
