/* W01: design tokens of the web funnel, version B ("Stitch" look) from docs/design/web-funnel-b/prototype.html:
   Rubik, navy + teal on a cool off-white, rounded cards, step header, photos. Forked from onboarding/src/tokens.css
   (dark neon) and re-coloured; the token NAMES stay the same so base.css / layout.css / home.css need no change.
   Text size: every size is rem-based and the root font-size is 20px x --text-scale (the text-size setting, applied by
   main.js from state "textScale"), so one multiplier scales every screen. Nothing on a screen may compute below 20px. */

/* W07 (review follow-up F1): Rubik is self-hosted (SIL OFL 1.1, OFL.txt beside it): no request to Google, and the
   offline shell keeps its font. W48b: the variable font (weights 300-900) as two WOFF2 subsets, Hebrew (9 KB) and
   Latin (35 KB; digits, punctuation, English), the same Rubik v31 files Google Fonts serves, in place of the 360 KB
   TTF (brand/fonts keeps the master); unicode-range lets a page load only the subsets its text uses. */
@font-face {
  font-family: "Rubik";
  src: url("../assets/fonts/Rubik-hebrew.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Rubik";
  src: url("../assets/fonts/Rubik-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
  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 {
  color-scheme: light;
  --text-scale: 1;

  /* W117 (simple screens v2, docs/design/simple-v2/design-v2.html): the palette re-pointed at design-v2's values; the
     names stay, so every sheet that uses them takes the new look. */
  --bg: #f4f9ff; --low: #f1f5fa; --high: #e7eef7; --line: #e2e9f2;
  --ink: #11285e; --ink2: #43506b; --navy: #11285e; --navy-deep: #0b1d4a;
  --teal: #0d5f63; --teal-c: #bff0df; --teal-t: #d9f5ec; --peach: #ffeedd; --peach-ink: #653e00;
  --sky: #e3eeff; --sky-ink: #304869; --ok: #14a57c; --bad-t: #ffdad6; --bad: #93000a;

  /* W117: the v2 look tokens (design-v2 css block). Shared by base.css's .ui-* components and the webapp sheets;
     onboarding/src/tokens.css carries the same block for W120. Sizes in rem (1rem = 20px x --text-scale). */
  --title-ink: #11285e; --lead-ink: #43506b; --soft-ink: #56637d;
  --fs-title: 1.35rem;  /* 27px */  --fw-title: 800; --lh-title: 1.18;
  --fs-lead: 0.825rem;  /* 16.5px */
  --fs-sub: 0.95rem;    /* 19px */
  --fs-row: 0.825rem;   /* 16.5px */
  --fs-soft: 0.675rem;  /* 13.5px */
  --fs-cta: 1rem;       /* 20px */
  --fs-ghost: 0.85rem;  /* 17px */
  --fs-link: 0.75rem;   /* 15px */
  --page-grad: radial-gradient(120% 60% at 50% 0%, #f4f9ff 0%, #eef5fc 55%, #e9f3f8 100%);
  --wave-grad: linear-gradient(90deg, #c9f1e4, #d8eefb);
  --card-bg: #ffffff; --card-line: #e2e9f2; --card-radius: 18px; --card-shadow: 0 2px 6px #0b1d4a0d;
  --mint: #2bb68a; --mint-bg: #effbf6; --mint-tint: #d9f5ec; --mint-ink: #14403b; --tick: #14a57c; --radio-line: #aab6c8;
  --cta-grad: linear-gradient(180deg, #1d3d8a, #132e6e); --cta-shadow: 0 8px 18px #132e6e40; --cta-radius: 18px;
  --ghost-ink: #1d3d8a; --ghost-line: #c9d6ee;
  --tile-size: 46px; --tile-radius: 15px;
  --tile-blue: #e3eeff; --tile-blue-ink: #2f6fe0; --tile-mint: #d9f5ec; --tile-mint-ink: #11a27a;
  --tile-peach: #ffeedd; --tile-peach-ink: #f08a1a; --tile-lilac: #ece8ff; --tile-lilac-ink: #6b55e0;
  --brand-pill: #bff0df; --brand-pill-ink: #0d4d45;
  --back-bg: #e7eef7; --step-bg: #ffffff; --step-shadow: 0 1px 3px #0b1d4a14;
  --dot: #cfe9e2; --dot-past: #7fd6bf; --dot-on: #0d5f63;

  /* Names the forked sheets use (onboarding base/layout, home) mapped onto the version-B palette. */
  --background: var(--bg); --foreground: var(--ink); --card: #ffffff;
  --primary: var(--navy); --primary-foreground: #ffffff;
  --secondary: var(--high); --muted: var(--low); --muted-foreground: var(--ink2);
  --accent: var(--teal); --accent-foreground: #ffffff; --destructive: var(--bad);
  --border: var(--line); --phone: #1d232b; --overlay: rgba(0, 21, 47, 0.55);
  --glass-bg: #ffffff; --glass-border: var(--line);
  --gradient-lime: var(--cta-grad);
  --gradient-coral: var(--peach);
  --gradient-sky: var(--sky);
  --gradient-sun: var(--peach);
  --gradient-hero: linear-gradient(to top, rgba(0, 21, 47, 0.45), rgba(0, 0, 0, 0) 55%);
  --shadow-glow: var(--cta-shadow);
  --shadow-card: var(--card-shadow);

  /* Rubik (self-hosted, @font-face above) with Hebrew-capable fallbacks. */
  --font-sans: "Rubik", "Arial Hebrew", "Noto Sans Hebrew", Arial, sans-serif;
  --font-display: var(--font-sans);

  /* Type scale: 1rem = 20px x --text-scale (html below). Elad 3/11 (W20): the approved prototype's own sizes
     (16px secondary, 18px body, 19px labels, 27px titles); the text-size setting still scales all of them. */
  --fs-sm: 0.8rem; --fs-base: 0.9rem; --fs-lg: 0.95rem;
  --fs-xl: 1.1rem; --fs-2xl: 1.2rem; --fs-3xl: 1.35rem; --fs-hero: 1.6rem;
  --lh-tight: 1.3; --lh-body: 1.6;

  /* Radii (prototype: cards 20px, hero 24px, buttons 18px) */
  --radius-md: 0.6rem; --radius-lg: 0.8rem; --radius-xl: 0.9rem; --radius-2xl: 1.2rem; --radius-full: 9999px;

  /* Spacing (4px base at scale 1) */
  --space-1: 0.2rem; --space-2: 0.4rem; --space-3: 0.6rem; --space-4: 0.8rem; --space-5: 1rem;
  --space-6: 1.2rem; --space-8: 1.6rem; --space-10: 2rem;

  /* Targets */
  --target-min: 48px;
  --btn-height: 60px; /* prototype .cta */

  /* Motion */
  --dur-slide: 0.5s; --dur-pop: 0.45s;
}

html { font-size: calc(20px * var(--text-scale)); }
