/* easytor-v2 · foundation/tokens.css · the ONLY file that holds literal colours (SPEC 3)
   ==========================================================================
   Order of this file
     1. fonts
     2. raw palette (world-independent constants)
     3. layout, chrome, stage safe area, rhythm, shape, type, motion, layers
     4. direction (--dir, --start, --end) and the three phone poses
     5. worlds: day (also the :root default) · night · blueprint
     6. themes: .theme-app (light product UI) · .theme-chat (dark chat UI)

   Rules for everybody else
     · Sections use the SEMANTIC names of block 5 only (--bg, --fg, --accent-ink …).
     · A block that paints another world's canvas carries that world's data-world.
     · No var(--x, fallback) anywhere: every token used on the site is defined here.
     · tools/qa/contrast.mjs parses this file. Keep one declaration per line and
       keep the selectors of blocks 5 and 6 exactly as they are.
   ========================================================================== */

/* --- 1. Fonts: Talent FS, one family, both languages, self-hosted (owner, 2026-11-23) ---------
   The owner's three files. Their names understate them: "Medium" reads as a bold, "Light" as a regular,
   "Extralight" as a light. So each file is declared at the CSS weights it stands for, and the --w-* tokens
   below land on exactly one of them (font-synthesis: none in base.css: nothing is ever faked):
     100-300  Talent_FS-Extralight   the quiet lead-in line of a headline (--w-quiet)
     400      Talent_FS-Light        body copy (--w-regular)
     500-900  Talent_FS-Medium       heavy headline lines, labels, buttons, digits, stickers
   Every file holds Hebrew, Latin and the digits; shell/head.html preloads all three over http(s). */

@font-face {
  font-family: "Talent";
  font-style: normal;
  font-weight: 100 300;
  font-display: swap;
  src: url("../fonts/Talent_FS-Extralight.woff2") format("woff2");
}

@font-face {
  font-family: "Talent";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Talent_FS-Light.woff2") format("woff2");
}

@font-face {
  font-family: "Talent";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/Talent_FS-Medium.woff2") format("woff2");
}

/* --- 2. Raw palette ---------------------------------------------------------
   Constants of the film. Sections reach for these only where SPEC names them
   (paper diary, chat UI, WhatsApp button, the device, illustration blue). */

:where(:root) {
  --white: #ffffff;
  --black: #000000;
  --navy: #21335a;              /* logo navy: day ink, the bar button            */
  --navy-2: #2f4372;            /* one step lighter: browser-frame tab           */
  --navy-deep: #00194d;         /* logo crescent, text on raw magenta, footer top */
  --day-canvas: #e7ebf3;        /* the day --bg as a constant: a seam drawn from inside a night block (the dusk at the top of #features, W7) */
  --magenta: #fa2db1;           /* THE brand pink                                */
  --green: #2bd354;
  --illus-blue: #4592d3;        /* illustrations only, never text                */

  /* the device (film: near-black body, 1px lighter hairline) */
  --device-body: #0c0e14;
  --device-body-hi: #1d2029;    /* the body's lit corner                         */
  --device-edge: #15171f;       /* thickness slices, in shade                    */
  --device-edge-hi: #6a7082;    /* thickness slices, where the frame catches light */
  --device-rim: rgba(255, 255, 255, .14);
  --device-screen: #000000;     /* under the media layers, and the camera pill   */
  --device-glare: rgba(255, 255, 255, .9);

  /* paper diary (switch, beat B) */
  --paper: #f1eada;
  --paper-edge: #d2ccbe;
  --paper-rule: #ced3d8;
  --paper-ink: #21335a;
  --paper-pink: #c8108a;        /* circle, zigzags, margin line: graphics, 4.50:1 on the paper (never text) */
  --paper-note: #b5057a;
  --paper-pencil: #3c4c70;      /* pencil notes: day --fg-2                      */

  /* chat UI (hero phone, contact phone); .theme-chat maps them to semantic names */
  --chat-screen: #091218;
  --chat-bubble: #1b262b;
  --chat-header: #1f2b31;
  --chat-input: #18242a;
  --chat-sender-1: #50b8e0;
  --chat-sender-2: #f0a048;
  --chat-sender-3: #f078c8;
  --chat-sender-4: #70c060;
  --chat-sender-5: #9080e8;
  --chat-sender-6: #d07068;

  /* WhatsApp: a white glyph on this green is 1.98:1 and is forbidden */
  --wa-fill: #25d366;
  --wa-glyph: #00194d;

  /* shared by every world */
  --accent-glow: 0 0 16px rgba(250, 45, 177, .35);   /* magenta objects: glow, never a shadow */
  --pill-bg: #ffffff;           /* the timer pill is white in every world        */
  --pill-fg: #21335a;
  --scrim: rgba(0, 10, 39, .78);       /* dialog backdrop                          */
  --scrim-navy: rgba(0, 10, 39, .62);  /* dimming layer over media (coverflow neighbours) */
  --flash: #ffffff;             /* the dawn flash (switch, beat D)               */
  --bg-art-deep: linear-gradient(180deg, #00194d 0%, #000a27 100%);  /* a deep-night gradient (kit sample only since W7; the footer now paints the night --bg) */
}

/* ::backdrop does not inherit custom properties in every engine */
::backdrop {
  --scrim: rgba(0, 10, 39, .78);
}

/* --- 3. Layout, rhythm, shape, type, motion --------------------------------- */

:where(:root) {
  /* layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);

  /* chrome sizes */
  --nav-h: 56px;
  --nav-gap: 14px;
  --dock-h: 72px;

  /* stage safe area (SPEC 5.1). Below 1024px the bar hides while a stage is stuck and the dock stays. */
  --stage-top: 0px;
  --stage-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  --anchor-top: calc(var(--nav-gap) + var(--nav-h) + 16px);

  /* rhythm: steps 4/8/12/16/24/32/40/48/64/80/96 */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;
  --section-pad: clamp(64px, 4vw + 40px, 112px);
  --head-gap: clamp(32px, 4vw, 56px);     /* section head -> body */
  --grid-gap: 16px;
  --card-pad: 20px;
  --overlay-fade: 96px;                    /* day overlays are gone this far before a section edge */

  /* shape */
  --radius-bar: 4px;                       /* bar button, label bar, ghost button */
  --radius-sm: 8px;                        /* media inside a card (minimum)       */
  --radius-md: 12px;                       /* inputs, browser frame               */
  --radius-lg: 16px;                       /* the floating nav                    */
  --radius-card: 20px;                     /* cards and islands                   */
  --radius-media: max(var(--radius-sm), calc(var(--radius-card) - var(--card-pad)));
  --radius-full: 999px;

  /* type */
  --font: "Talent", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --text-h1: clamp(2.75rem, 1.1rem + 5.6vw, 6rem);            /* 44 -> 96 */
  --text-display: clamp(2.5rem, 1.3rem + 4.2vw, 4.75rem);     /* 40 -> 76 */
  --text-h2: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);             /* 32 -> 56 */
  --text-h3: clamp(1.5rem, 1.2rem + 1vw, 2rem);               /* 24 -> 32 */
  --text-h4: clamp(1.25rem, 1.2rem + .25vw, 1.375rem);        /* 20 -> 22 */
  --text-lede: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);      /* 18 -> 20 */
  --text-body: 1rem;                                          /* 16 */
  --text-small: .9375rem;                                     /* 15 */
  --text-caption: .8125rem;                                   /* 13: nothing smaller */
  --lh-head: 1.1;
  --lh-body: 1.6;
  --track-head: 0em;
  --w-quiet: 200;                          /* the quiet lead-in line of a headline (Talent Extralight) */
  --w-regular: 400;                        /* body copy (Talent Light) */
  --w-medium: 500;                         /* buttons, eyebrow-like labels        */
  --w-semi: 600;                           /* FAQ questions                       */
  --w-bold: 700;                           /* label titles, timer digits, the phone number */
  --w-extra: 800;                          /* stickers, badges                    */
  --w-black: 900;                          /* headlines and pink punch lines      */

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --dur-1: 160ms;
  --dur-2: 320ms;
  --dur-3: 640ms;
  --perspective: 1200px;
  --perspective-origin: 50% 40%;

  /* layers */
  --z-float: 80;
  --z-dock: 90;
  --z-nav: 100;
  --z-dialog: 200;
  --z-skip: 300;

  /* the phone: a media-backed screen is at most 320 CSS px wide (the crops are 520px);
     the screen is 93.6% of the body, so the body is at most 341px */
  --phone-w-media-max: 341px;
}

@media (max-width: 359.98px) {
  :where(:root) { --text-h1: 2.375rem; }
}

@media (min-width: 900px) {
  :where(:root) {
    --grid-gap: 24px;
    --card-pad: 28px;
    --radius-card: 24px;
  }
}

@media (min-width: 1024px) {
  :where(:root) {
    --stage-top: calc(var(--nav-gap) + var(--nav-h) + 12px);
    --stage-bottom: 0px;
  }
}

/* English: a narrower H1, tighter leading, a touch of negative tracking.
   [lang="en"] covers an English block inside the Hebrew page (and the reverse). */
:root:lang(en),
[lang="en"] {
  --text-h1: clamp(2.375rem, 1rem + 4.6vw, 5.25rem);
  --lh-head: 1.05;
  --lh-body: 1.55;
  --track-head: -.01em;
}

[lang="he"] {
  --text-h1: clamp(2.75rem, 1.1rem + 5.6vw, 6rem);
  --lh-head: 1.1;
  --lh-body: 1.6;
  --track-head: 0em;
}

@media (max-width: 359.98px) {
  [lang="he"] { --text-h1: 2.375rem; }
}

/* --- 4. Direction and poses ---------------------------------------------------
   --dir multiplies everything that mirrors (translateX, rotateY, rotateZ, scaleX of
   an arrow). --start / --end stand in where CSS has no logical keyword
   (transform-origin, perspective-origin, gradient and background positions).
   The poses are declared in the SAME rules as --dir: a custom property that reads
   var(--dir) is resolved on the element that declares it, so declaring them here
   makes every element that carries [dir] (and its subtree) get its own mirror.
   --pose-front is the identity written as the same two functions as the other
   poses (not `none`), so it composes (var(--pose-front) translateZ(…)) and a
   keyframe interpolates it function by function. */

:where(:root),
[dir="rtl"],
[dir="ltr"] {
  --pose-front: rotateY(0deg) rotateX(0deg);
  --pose-a: rotateY(calc(var(--dir) * 20deg)) rotateX(8deg);    /* the screen turns toward the inline-start (the copy) */
  --pose-b: rotateY(calc(var(--dir) * -20deg)) rotateX(8deg);   /* the mirror: toward the inline-end                  */
}

:where(:root),
[dir="rtl"] {
  --dir: 1;
  --start: right;
  --end: left;
}

[dir="ltr"] {
  --dir: -1;
  --start: left;
  --end: right;
}

/* --- 5. Worlds --------------------------------------------------------------- */

/* DAY — one canvas; also what :root is */
:where(:root),
[data-world="day"],
.theme-app {
  --bg: #e7ebf3;
  --bg-step-1: #e7ebf3;         /* day has one canvas: its "steps" are the canvas */
  --bg-step-2: #e7ebf3;
  --bg-art: none;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --fg: #21335a;
  --fg-2: #3c4c70;
  --fg-3: #525c76;
  --line: rgba(33, 51, 90, .14);
  --line-2: #6c768c;
  --accent: #fa2db1;
  --accent-display: #e0179b;
  --accent-ink: #b5057a;
  --accent-fill: #dc0a90;
  --on-accent: #00194d;
  --action-bg: #21335a;
  --action-fg: #ffffff;
  --action-cap: #fa2db1;
  --action-cap-fg: #ffffff;
  --cta-fill-1: #dc0a90;        /* the glowing pill (.btn--bar): label side; white on it 4.68:1   */
  --cta-fill-2: #b00c9c;        /* the deeper magenta at the circle's end; white on it 6.22:1     */
  --cta-fg: #ffffff;
  --cta-knob: #ffffff;          /* the white circle at the inline-end                             */
  --cta-knob-fg: #c4078a;       /* its chevron: 5.61:1 on the white circle                        */
  --cta-edge: rgba(255, 255, 255, .10);    /* the pill's 1px inner edge: on day the fill itself holds 3:1 */
  --cta-rim: inset 0 1px 0 rgba(255, 255, 255, .26), inset 0 0 0 1px var(--cta-edge);
  --cta-glow: 0 10px 22px -10px rgba(176, 12, 156, .62), 0 3px 8px -3px rgba(33, 51, 90, .22);
  --cta-glow-hover: 0 16px 30px -12px rgba(176, 12, 156, .72), 0 4px 10px -4px rgba(33, 51, 90, .26);
  --cta-knob-shadow: 0 2px 6px -1px rgba(74, 0, 56, .32);
  --cta-shine: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .42) 50%, rgba(255, 255, 255, 0) 100%);
  --focus: #21335a;
  --success: #2bd354;
  --success-ink: #166534;
  --danger: #b3261e;
  --danger-wash: #fdecea;
  --info: #1f5fa8;
  --shadow-card: 0 1px 2px rgba(33, 51, 90, .06), 0 12px 32px -16px rgba(33, 51, 90, .22);
  --shadow-float: 0 30px 70px -28px rgba(33, 51, 90, .38);
  --shadow-device: 0 40px 80px -30px rgba(0, 25, 77, .45);
  --shadow-action: 0 12px 24px -14px rgba(33, 51, 90, .6);
  --grid-line: #d8e1e9;
  --grid-line-2: #d1dae4;       /* SPEC says #cdd7e2: --accent-ink across it was 4.41 (see KIT.md, contrast.mjs) */
  --glow: radial-gradient(closest-side, #f6f5fa 0%, rgba(246, 245, 250, .72) 42%, rgba(246, 245, 250, 0) 100%);
  --glow-soft: radial-gradient(closest-side, #f6f5fa 0%, rgba(246, 245, 250, .72) 42%, rgba(246, 245, 250, 0) 100%);
  --lilac: radial-gradient(closest-side, #e6dae5 0%, rgba(230, 218, 229, .6) 48%, rgba(230, 218, 229, 0) 100%);
  --island-art: none;           /* the island is always night (data-world on the island) */
  --linework: #21335a;
  --linework-2: rgba(33, 51, 90, .6);
  /* the dawn lockup's tagline pill (03-switch .switch__tag, owner 2026-11-26): its hairline runs from pink at
     the tick to a faint navy; a soft lift; the tick's disc lit from above. Decoration only: the label is --fg on --surface. */
  --tag-edge-1: rgba(250, 45, 177, .55);
  --tag-edge-2: rgba(33, 51, 90, .16);
  --tag-edge-3: rgba(33, 51, 90, .1);
  --tag-shadow: 0 1px 2px rgba(33, 51, 90, .06), 0 14px 30px -18px rgba(33, 51, 90, .45);
  --tag-mark-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 10px -4px rgba(176, 12, 156, .6);
}

/* NIGHT — the problem act, #features to the footer (W7), night islands, the video dialog.
   BLUEPRINT inherits it and overrides the canvas and the grid below. */
[data-world="night"],
[data-world="blueprint"],
.theme-chat {
  --bg: #000a27;
  --bg-step-1: #01113a;
  --bg-step-2: #031647;
  --bg-art: radial-gradient(ellipse 70% 55% at 50% 38%, #1c3d80 0%, #132a68 28%, #031647 58%, #01113a 78%, #000a27 100%);
  --surface: #071a4d;
  --surface-2: #0d2460;
  --fg: #f4f3f3;
  --fg-2: #dbdbdb;
  --fg-3: #b9c2d8;
  --line: rgba(244, 243, 243, .14);
  --line-2: #8f9bc0;
  --accent: #fa2db1;
  --accent-display: #ff60c8;
  --accent-ink: #ff7fd3;
  --accent-fill: #dc0a90;
  --on-accent: #00194d;
  --action-bg: #ffffff;
  --action-fg: #21335a;
  --action-cap: #fa2db1;
  --action-cap-fg: #ffffff;
  --cta-fill-1: #dc0a90;
  --cta-fill-2: #b00c9c;
  --cta-fg: #ffffff;
  --cta-knob: #ffffff;
  --cta-knob-fg: #c4078a;
  --cta-edge: rgba(255, 190, 232, .55);    /* a neon hairline: the pill's edge holds 3:1 even on the glow cores */
  --cta-rim: inset 0 1px 0 rgba(255, 255, 255, .30), inset 0 0 0 1px var(--cta-edge);
  --cta-glow: 0 8px 26px -6px rgba(250, 45, 177, .55), 0 0 44px -8px rgba(250, 45, 177, .42);
  --cta-glow-hover: 0 12px 34px -6px rgba(250, 45, 177, .7), 0 0 60px -6px rgba(250, 45, 177, .58);
  --cta-knob-shadow: 0 2px 8px -1px rgba(60, 0, 46, .45);
  --cta-shine: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .48) 50%, rgba(255, 255, 255, 0) 100%);
  --focus: #ffffff;
  --success: #2bd354;
  --success-ink: #6ee58a;
  --danger: #ff8a8a;
  --danger-wash: #2a2a56;
  --info: #8ab8ff;
  --shadow-card: none;
  --shadow-float: 0 0 0 1px rgba(244, 243, 243, .14), 0 24px 64px -24px rgba(40, 75, 148, .8);
  --shadow-device: 0 0 96px -16px rgba(40, 75, 148, .7);
  --shadow-action: none;
  --grid-line: rgba(244, 243, 243, .05);
  --grid-line-2: rgba(244, 243, 243, .10);
  --glow: radial-gradient(closest-side, #284b94 0%, #1c3d80 34%, rgba(19, 42, 104, .55) 66%, rgba(3, 22, 71, 0) 100%);
  --glow-soft: radial-gradient(closest-side, #1c3d80 0%, rgba(19, 42, 104, .7) 46%, rgba(3, 22, 71, 0) 100%);
  --island-art: radial-gradient(ellipse 80% 72% at 50% 0%, #1c3d80 0%, rgba(19, 42, 104, .72) 42%, rgba(7, 26, 77, 0) 100%);
  --lilac: none;
  --linework: #f4f3f3;
  --linework-2: rgba(244, 243, 243, .6);
  /* the neon signs of #trades (02b-trades, 2026-11-23): an unlit tube is faint pink glass; a lit one is a
     pale pink core (the border) inside a magenta glow (box-shadow, outer and inner), its label white with a
     pink halo (text-shadow); under the ring the lit sign's light on a wet street (a gradient, never a filter).
     Decoration only: the label colours are --fg / --fg-2 and are judged on the canvas without the glow. */
  --neon-off: rgba(255, 190, 232, .3);
  --neon-core: #ffe0f3;
  --neon-glow: 0 0 0 1.5px rgba(250, 45, 177, .9), 0 0 8px 1px rgba(250, 45, 177, .8), 0 0 22px 3px rgba(250, 45, 177, .45), 0 0 52px 8px rgba(250, 45, 177, .22), inset 0 0 8px 1px rgba(250, 45, 177, .65), inset 0 0 26px 2px rgba(250, 45, 177, .2);
  --neon-halo: 0 0 2px rgba(255, 224, 243, .85), 0 0 10px rgba(250, 45, 177, .7), 0 0 24px rgba(250, 45, 177, .4);
  --neon-floor: radial-gradient(closest-side, rgba(250, 45, 177, .34) 0%, rgba(250, 45, 177, .13) 46%, rgba(250, 45, 177, 0) 100%);
}

/* BLUEPRINT — the hinge */
[data-world="blueprint"] {
  --bg: #00184d;
  --bg-art: radial-gradient(ellipse 85% 75% at 50% 45%, #00184d 0%, #00184d 38%, #001237 100%);
  --grid-line: #0c2253;
  --grid-line-2: #1f3766;
}

/* --- 6. Themes --------------------------------------------------------------- */

/* The light UI of the PRODUCT, drawn in HTML/SVG: the day set on a white screen,
   whatever world surrounds it. Every drawn product screen carries the chip "המחשה". */
.theme-app {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f5fa;
  --shadow-card: 0 1px 2px rgba(33, 51, 90, .08);
  --shadow-float: 0 10px 24px -12px rgba(33, 51, 90, .3);
  --glow: none;
  --glow-soft: none;
  --lilac: none;
}

/* The dark chat UI of the film's first scene (hero phone, contact phone) */
.theme-chat {
  --bg: #091218;
  --bg-art: none;
  --surface: #1b262b;
  --surface-2: #1f2b31;
  --line: rgba(244, 243, 243, .10);
  --shadow-card: none;
  --shadow-float: none;
  --glow: none;
  --glow-soft: none;
}
