/* Smarterbuys Store: design tokens. The ONLY place a colour, radius, shadow or font is defined.
   Everything else (base.css, components.css, promo.css, store.css, checkout.css, consent.css, admin.css) reads these.
   Brand: navy #18124C, mint #3BF7CA, lime #C3E041, coral #FF6765, slate #292449, ink #100B34.
   Rule of thumb for contrast: mint, lime and coral are FILLS (under ink/navy text) or accents on dark panels.
   They never carry text on a light background.
   Phone first: the defaults are the phone's (every width up to 699.98px); 700px and 1200px add to them. */

/* ===== 1 SHARED AND PHONE (default: every width up to 699.98px) ===== */

/* ---- fonts: self-hosted, latin subset, variable weight (no request to Google before consent) ---- */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/outfit-latin-var.woff2?v=1") 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 700;
  font-display: swap;
  /* the same font cut to the weights this face is declared for (400 to 700) and without the fraction forms:
     every character of inter-latin-var.woff2, 32 kB instead of 48 (U_speed, 18 Nov) */
  src: url("/fonts/inter-latin-400-700.woff2?v=1") 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;
}
/* Fallbacks with the web fonts' measurements, so text does not jump when the real font arrives. Android has
   Roboto, not Arial: the "Android" pair is tried first and is simply not there on a machine without Roboto. */
@font-face {
  font-family: "Outfit Fallback Android";
  src: local("Roboto");
  size-adjust: 99%;
  ascent-override: 101%;
  descent-override: 26.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback Android";
  src: local("Roboto");
  size-adjust: 106.3%;
  ascent-override: 91.1%;
  descent-override: 22.7%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Outfit Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 99.8%;
  ascent-override: 100.2%;
  descent-override: 26%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 107.1%;
  ascent-override: 90.4%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

:root {
  /* ---- brand ---- */
  --navy: #18124C;
  --mint: #3BF7CA;
  --lime: #C3E041;
  --coral: #FF6765;
  --slate: #292449;
  --ink: #100B34;

  /* ---- warm neutrals ---- */
  --page: #FBF8F3;
  --tile: #F1E9DE;
  --well: #F4F0E7;
  --card: #FFFFFF;
  --hair: #EFECE3;
  --panel: #F7F4FB;

  /* ---- stock states (text-safe on white and on the page) ---- */
  --stock-in: #0A6B52;
  --stock-low: #A8201A;
  --stock-off: #4A4E60;

  /* ---- derived (still the same family: say so here, use them by name) ---- */
  --text: var(--navy);
  --muted: #5A5670;              /* secondary text on light: 6.6:1 on the page */
  --line: #E3DED2;               /* a firmer hairline: table rules, dividers on the page background */
  --control: #8B86A0;            /* borders of inputs and outline chips: 3.4:1 on white */
  --tile-deep: #E9DFD0;          /* tile hover */
  --mint-soft: #DDFBF3;          /* tints: backgrounds only */
  --mint-deep: #0A6B52;          /* a mint that can carry text on light */
  --lime-soft: #F2F8CF;
  --coral-soft: #FFE8E7;
  --coral-deep: #A8201A;         /* a coral that can carry text on light */
  --amber-soft: #FFF4D6;
  --on-dark: #FFFFFF;
  --on-dark-soft: #DAD9EE;       /* body text on navy/ink */
  --on-dark-muted: #AAA8C8;      /* small print on navy/ink: 7:1 on navy */
  --dark-line: rgba(255, 255, 255, .14);
  --scrim: rgba(16, 11, 52, .48);

  /* ---- type ---- */
  --font-display: "Outfit", "Outfit Fallback Android", "Outfit Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", "Inter Fallback Android", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-display: 1.875rem;                                  /* 30: hero headlines on a phone (700px and up: 40 to 64) */
  --fs-h1: 1.625rem;                                       /* 26 (30 to 44) */
  --fs-h2: 1.375rem;                                       /* 22 (24 to 32) */
  --fs-h3: 1.125rem;                                       /* 18 (20) */
  --fs-lead: 1rem;                                         /* 16 (18) */
  --fs-body: 1rem;                                         /* 16 */
  --fs-sm: .875rem;                                        /* 14 */
  --fs-xs: .8125rem;                                       /* 13 */
  --fs-eyebrow: .75rem;                                    /* 12, capitals */
  --lh-tight: 1.08;
  --lh-snug: 1.3;
  --lh-body: 1.55;
  --track-display: -.02em;
  --track-eyebrow: .09em;

  /* ---- shape ---- */
  --r-hero: 24px;
  --r-card: 16px;
  --r-well: 12px;
  --r-sheet: 24px;               /* the top corners of a bottom sheet */
  --r-sm: 10px;
  --r-pill: 999px;

  /* ---- layout ---- */
  --wrap: 1280px;
  --gutter: 16px;
  --section-gap: 32px;
  --btn-h: 52px;
  --btn-h-sm: 48px;
  --tap: 48px;
  --bar-top: 56px;               /* the header's row on a phone */
  --bar-tab: 56px;               /* the bottom tab bar, without the inset */
  --bar-act: 72px;               /* the action bar, without the inset */
  --header-h: 57px;              /* row + hairline; corrected by nav.js once the header is measured */
  --stuck-h: calc(var(--site-banner-h, 0px) + var(--header-h));   /* the header that is SHOWING while stuck: what anything pinned under it uses from 700px (--site-banner-h: a test copy's ribbon) */

  /* ---- the edges of the screen (real once the viewport is viewport-fit=cover) ---- */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-b-max: env(safe-area-max-inset-bottom, 36px);

  /* ---- what is docked now (set in base.css with :has(); read by anything fixed to an edge) ---- */
  --announce-h: 0px;             /* 36px while the phone's announcement line is drawn */
  --consent-h: 0px;              /* the cookie notice's height while it is open (app.js writes the measured height) */
  --tab-now: 0px;                /* what the tab bar takes from the bottom now */
  --act-now: 0px;                /* what a showing action bar takes from the bottom now */
  --tray-now: 0px;               /* what a showing compare tray takes from the bottom now */

  /* ---- elevation ---- */
  --shadow-card: 0 1px 2px rgba(16, 11, 52, .04), 0 8px 24px rgba(16, 11, 52, .05);
  --shadow-lift: 0 2px 4px rgba(16, 11, 52, .06), 0 18px 44px rgba(16, 11, 52, .13);
  --shadow-pop: 0 4px 10px rgba(16, 11, 52, .08), 0 28px 70px rgba(16, 11, 52, .22);
  --glow-mint: 0 10px 30px rgba(59, 247, 202, .45);
  --glow-lime: 0 10px 30px rgba(195, 224, 65, .45);

  /* ---- focus ---- */
  --focus: var(--navy);
  --focus-on-dark: var(--mint);
  --focus-w: 3px;
  --focus-gap: 2px;

  /* ---- motion (all of it is switched off under prefers-reduced-motion in base.css) ---- */
  --t-fast: 150ms;
  --t-med: 200ms;
  --t-slow: 250ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* ---- layers ---- */
  --z-scrim: 35;
  --z-header: 40;
  --z-dock: 45;                  /* tab bar and action bar: above the header, under the search panel */
  --z-panel: 50;
  --z-drawer: 60;
  --z-toast: 70;
}

@media (max-width: 21em) { :root { --bar-act: 124px; } }      /* the stacked action bar: a narrow phone, or large text */
@media (orientation: landscape) and (max-height: 480px) and (max-width: 699.98px) { :root { --bar-tab: 48px; } }   /* a phone on its side */

/* ===== 2 TABLET AND UP ===== */
@media (min-width: 700px) {
  :root {
    --gutter: 24px;
    --section-gap: 52px;
    --tap: 44px;
    --btn-h-sm: 44px;
    --header-h: 114px;            /* the 64px row + the 48px category row + two hairlines; nav.js measures it */
    --bar-act: 64px;              /* the action bar at the foot of a tablet's window */
    --fs-display: clamp(2.5rem, 1.2rem + 4.4vw, 4rem);       /* 40 to 64: hero headlines */
    --fs-h1: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);       /* 30 to 44 */
    --fs-h2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);            /* 24 to 32 */
    --fs-h3: 1.25rem;                                        /* 20 */
    --fs-lead: 1.125rem;                                     /* 18 */
    --r-hero: 28px;
    --r-card: 20px;
    --r-well: 14px;
  }
}
@media (min-width: 1000px) { :root { --gutter: 32px; --section-gap: 60px; } }

/* ===== 3 DESKTOP ===== */
@media (min-width: 1200px) { :root { --wrap: 1440px; } }
@media (min-width: 1600px) { :root { --wrap: 1600px; --gutter: 40px; --section-gap: 64px; } }
@media (min-width: 2200px) { :root { --wrap: 1760px; } }

/* ===== 4 CAPABILITY AND MODES ===== */
/* (nothing here: tokens do not change with the pointer, with motion or in print) */
