/* ==========================================================================
   Peeranha design tokens
   Source of truth: Figma library "Peeranha – Branding" (published).
   Names mirror the Figma variable names: "Deep Indigo/600" -> --deep-indigo-600.
   If a value changes in Figma, change it here. Never hard-code these values
   anywhere else in the codebase.
   ========================================================================== */

/* Instrument Sans, self-hosted (SIL Open Font License) */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ---------- Colour: primitives (from Figma) ---------- */
  --deep-indigo-100: #f2f5ff;
  --deep-indigo-200: #dfe7ff;
  --deep-indigo-300: #aec1ff;
  --deep-indigo-500: #3d63ff;
  --deep-indigo-600: #2641ed;
  --deep-indigo-700: #1a30bc;
  --deep-indigo-900: #101855;

  --neutral-100: #ffffff;
  --neutral-200: #f8f9ff;
  --neutral-300: #e1e2ec;
  --neutral-500: #828396;
  --neutral-600: #67677a;
  --neutral-700: #383748;
  --neutral-900: #161421;

  /* ---------- Colour: brand aliases (from Figma) ---------- */
  --brand-deep-indigo: var(--deep-indigo-600);
  --brand-midnight-tide: var(--neutral-900);

  /* ---------- Colour: feedback (PROPOSED - not in Figma yet) ----------
     The Branding library has no error/success colours. These are proposals so
     error states can ship; add them to Figma (or replace them) to keep the two
     in sync. All text/background pairs below pass WCAG AA (4.5:1). */
  --red-100: #fef3f2;
  --red-300: #fda29b;
  --red-600: #d92d20;
  --red-700: #b42318;
  --green-100: #ecfdf3;
  --green-300: #75e0a7;
  --green-700: #067647;

  /* ---------- Colour: semantic roles (use these in components) ---------- */
  --color-bg: var(--neutral-100);
  --color-bg-subtle: var(--neutral-200);
  --color-bg-inverse: var(--neutral-900);
  --color-bg-nav: rgb(242 245 255 / 0.5);        /* Deep Indigo/100 @ 50% */
  --color-bg-nav-mobile: rgb(223 231 255 / 0.5); /* Deep Indigo/200 @ 50% */

  --color-text: var(--neutral-900);
  --color-text-secondary: var(--neutral-600);
  --color-text-tertiary: var(--neutral-500);
  --color-text-inverse: var(--neutral-100);
  --color-text-link: var(--brand-deep-indigo);

  --color-border: var(--neutral-300);
  --color-border-strong: var(--neutral-900);
  --color-focus: var(--deep-indigo-500);

  --color-action: var(--brand-midnight-tide);
  --color-action-hover: var(--neutral-700);
  --color-action-text: var(--neutral-100);

  --color-error: var(--red-600);
  --color-error-text: var(--red-700);
  --color-error-bg: var(--red-100);
  --color-error-border: var(--red-300);
  --color-success-text: var(--green-700);
  --color-success-bg: var(--green-100);
  --color-success-border: var(--green-300);

  /* ---------- Typography (from Figma) ---------- */
  --font-family-brand: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-weight-regular: 400;
  --font-weight-semibold: 600;

  --font-size-xs: 0.75rem;   /* 12 */
  --font-size-sm: 0.875rem;  /* 14 */
  --font-size-md: 1rem;      /* 16 */
  --font-size-lg: 1.125rem;  /* 18 */
  --font-size-xl: 1.25rem;   /* 20 */
  --font-size-2xl: 1.5rem;   /* 24 */
  --font-size-3xl: 2rem;     /* 32 */
  --font-size-4xl: 2.5rem;   /* 40 */
  --font-size-5xl: 3rem;     /* 48 */
  --font-size-6xl: 4rem;     /* 64 */

  /* Line heights used by the text styles */
  --line-height-body: 1.5;
  --line-height-label: 1.2;

  /* Figma letter-spacing is in %, so -1 = -0.01em */

  /* ---------- Spacing (4px base; values used in the MVP frames) ---------- */
  --space-1: 0.25rem;  /* 4 */
  --space-1-5: 0.375rem; /* 6 */
  --space-2: 0.5rem;   /* 8 */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.25rem;  /* 20 */
  --space-6: 1.5rem;   /* 24 */
  --space-8: 2rem;     /* 32 */
  --space-10: 2.5rem;  /* 40 */
  --space-12: 3rem;    /* 48 */
  --space-14: 3.5rem;  /* 56 */
  --space-16: 4rem;    /* 64 */
  --space-18: 4.5rem;  /* 72 - desktop page gutter */
  --space-20: 5rem;    /* 80 */
  --space-30: 7.5rem;  /* 120 */

  /* ---------- Radius ---------- */
  --radius-sm: 4px;  /* inputs, cards, header buttons, checkbox */
  --radius-md: 8px;  /* primary form buttons, choice cards, nav bar */

  /* ---------- Elevation ---------- */
  --shadow-card: 0 1px 1px rgb(0 0 0 / 0.05);
  --blur-nav: 75px;

  /* ---------- Glass (hero cards). PROPOSED - not Figma variables yet ---------- */
  --glass-bg: rgb(255 255 255 / 0.62);
  --glass-border: rgb(255 255 255 / 0.9);
  --glass-blur: 20px;
  --shadow-glass: 0 12px 32px rgb(16 24 85 / 0.12);   /* Deep Indigo/900 @ 12% */
  --glass-dark-bg: rgb(255 255 255 / 0.06);           /* "How it works" steps on dark */
  --glass-dark-edge: rgb(255 255 255 / 0.14);
  --glass-dark-blur: 28px;
  --radius-lg: 8px;   /* glass panels, price tiles (same value as --radius-md) */

  /* ---------- Hero artwork: manuscript stack (Figma 142:3549 / 142:3808) ----------
     PROPOSED - artwork-only colours, not in the Branding library. Each sheet is a
     left-to-right gradient, bottom sheet (1) to top sheet (6). */
  --sheet-1-from: #2f3764;  --sheet-1-to: var(--deep-indigo-900);
  --sheet-2-from: #3949ab;  --sheet-2-to: #1a2a9c;
  --sheet-3-from: #4560fc;  --sheet-3-to: var(--deep-indigo-600);
  --sheet-4-from: #5c82ff;  --sheet-4-to: var(--deep-indigo-500);
  --sheet-5-from: #90a8ff;  --sheet-5-to: #7189ff;
  --sheet-6-from: #cddeff;  --sheet-6-to: var(--deep-indigo-300);
  --sheet-edge: rgb(255 255 255 / 0.35);
  --shadow-sheet: 0 11.8px 28.3px rgb(16 24 85 / 0.1);

  /* ---------- Mesh (How it works background, Figma "Mesh – dark" 142:3603) ---------- */
  --mesh-blue: rgb(38 65 237 / 0.85);     /* Deep Indigo/600 @ 85% */
  --mesh-bright: rgb(61 99 255 / 0.55);   /* Deep Indigo/500 @ 55% */
  --mesh-night: var(--deep-indigo-900);
  --mesh-mist: rgb(223 231 255 / 0.35);   /* Deep Indigo/200 @ 35% */

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);        /* entrances, UI responses */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);    /* things moving on screen */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);     /* pushes, spreads (iOS-like) */
  --duration-press: 160ms;
  --duration-hover: 200ms;
  --duration-enter: 700ms;

  /* ---------- Layout ---------- */
  --container-max: 81rem;  /* 1296 content width */
  --gutter: var(--space-18);
  --form-width: 27.5rem;   /* 440 */
  --heading-width: 35rem;  /* 560 */
  --content-width: 72rem;  /* 1152 - content area of FAQ, About, Contact, legal pages */
  --reading-width: 50rem;  /* 800 - text column inside it */
  --control-height: 2.375rem; /* 38 */
  --nav-height: 4.5rem;       /* 72 desktop nav bar, same with or without buttons */
}

@media (max-width: 767px) {
  :root {
    --gutter: var(--space-4);
    --nav-height: 4.0625rem;  /* 65 mobile nav bar (Figma), same with or without buttons */
  }
}

/* ---------- PROPOSED for the logged-in app (not Figma variables yet; flag for the Branding library) ---------- */
:root {
  /* Warning: "set your fees", "account under review", deadline within 3 days */
  --amber-100: #fffaeb;
  --amber-300: #fedf89;
  --amber-700: #b54708;
  --color-warning-bg: var(--amber-100);
  --color-warning-border: var(--amber-300);
  --color-warning-text: var(--amber-700);
  /* Info: neutral-blue notices and the "Founding Reviewer" badge */
  --color-info-bg: var(--deep-indigo-100);
  --color-info-border: var(--deep-indigo-200);
  --color-info-text: var(--deep-indigo-700);
  --radius-full: 999px;
  --size-avatar: 6rem;
  --size-avatar-sm: 4.5rem;
  --size-avatar-xs: 2.5rem;
  --amber-500: #f79009;   /* filled rating stars */
  --size-icon: 1.25rem;
}
