/*!
 * Nuve Lume design tokens ("Printed Light"). Adapted from website/theme/tokens.css (v2.0.1) for the custom store.
 * Contract: docs/ARCHITECTURE.md section 5. Facts: docs/research/R0-visual.md. Light theme only.
 *
 * Rulings applied over the Shopify-era tokens (ARCHITECTURE s5):
 *   - Radius 0 on frames, tiles, tabs, product images and panels; 2px on inputs and buttons. No pills; the only circles are the Dots.
 *   - Paper is the ground. Since DECISIONS D20 (Colour Press, 2026-10-24) hard-edged product-colour bands may sit behind TYPE only
 *     (section 8 below): at most 40% of any screen and 25% of a page, one product colour per screen, comparison views (home shelf,
 *     shop, routine, cart) keep step colour in tabs, numerals and Dots. Product images sit on the off-white tile (--nl-tile), never on a band.
 *   - Focus ring is 2px Ink, 2px offset; on a band or Ink ground a 2px Paper ring plus a 2px Ink outer ring. Cobalt is BLU's colour (and the favicon) only.
 *   - Headings are Jost 500, sentence case, tracking 0.
 *   - Step colours reach the page only through [data-product="..."] (--p-accent, --p-solid, --p-on, --p-ring).
 * Keep the --nl-* names that existed in the theme tokens so other builders can rely on them.
 */

/* ===================================================================== */
/* 1. PALETTE                                                             */
/* ===================================================================== */
:root {
  color-scheme: light;

  --nl-paper: #F7F4EE;            /* page ground, flat */
  --nl-stone: #EFEAE1;            /* quiet fills: dashboard states, info notices, table stripes */
  --nl-white: #FFFFFF;            /* inputs, white product ground */
  --nl-label: #FCFAF3;            /* the printed-label device only, never a page or card fill */
  --nl-ink: #182123;              /* all type, frames, rules, wordmark, symbol, the MOO ring */
  --nl-ink-rgb: 24 33 35;
  --nl-ink-hover: #3A4142;        /* primary button hover */
  --nl-ink-on-solid: #0E1516;     /* tab numeral on teal and cream */
  --nl-muted: #586163;            /* secondary text, 5.79:1 on Paper */
  --nl-paper-muted: #B4BBBA;
  --nl-control-border: #7C8486;   /* input outlines, 3:1 on Paper and White */
  --nl-hairline: rgb(var(--nl-ink-rgb) / 0.4);   /* Ink at 40%: rules between blocks (about #9EA09D on Paper) */
  --nl-line: #D6D6CF;             /* decorative only; never the only cue for anything */
  --nl-cobalt: #2F4BFF;           /* BLU's colour; favicon */

  /* Functional colours stay off the step hues; every status also carries an icon and a word. */
  --nl-success: #1D7036;  --nl-success-bg: #E3F1E6;
  --nl-warning: #8A4F00;  --nl-warning-bg: #FFF0CC;
  --nl-error:   #B42318;  --nl-error-bg:   #FDE8E5;
  --nl-info-bg: var(--nl-stone);
}

/* ===================================================================== */
/* 2. STEP COLOURS, by slot (raw values; use --p-* in components)         */
/* ===================================================================== */
/* The --nl-step-N names keep the 2026-10 slot numbering (step-2 is ROUGE's colour, step-3 BLU's, step-4 MOO's);   */
/* the printed number is Product.step (1-2-3, D22), and colour follows data-product, never the number.             */
:root {
  --nl-step-1: #0B8F8C;  --nl-step-1-on: var(--nl-ink-on-solid);  --nl-step-1-text: #00706D;  --nl-step-1-ring: transparent;   /* OCEAN */
  --nl-step-2: #D23C55;  --nl-step-2-on: #FFFFFF;                  --nl-step-2-text: #B02A44;  --nl-step-2-ring: transparent;   /* ROUGE */
  --nl-step-3: #2F4BFF;  --nl-step-3-on: #FFFFFF;                  --nl-step-3-text: #2F4BFF;  --nl-step-3-ring: transparent;   /* BLU */
  --nl-step-4: #E8D3A8;  --nl-step-4-on: var(--nl-ink-on-solid);  --nl-step-4-text: #6B4E00;  --nl-step-4-ring: var(--nl-ink); /* MOO: cream is 1.34:1 on Paper, always ringed */
  --nl-scalp:  #6E3B25;  --nl-scalp-on: #FFFFFF;                  --nl-scalp-text: #6E3B25;   --nl-scalp-ring: transparent;    /* UPTOP: Dots only, no tab */
}

/* Per-product trio. Set data-product="blu|ocean|moo|rouge|uptop" on any wrapper; the name tag does it for itself.
   --p-accent  text, numerals and rules (24px and up for text)
   --p-solid   the Dots and the step tab
   --p-on      the tab numeral
   --p-ring    Ink for MOO, transparent for the rest */
:root,
[data-product] {
  --p-accent: var(--nl-ink);
  --p-solid: var(--nl-ink);
  --p-on: var(--nl-paper);
  --p-ring: transparent;
}
[data-product="blu"]   { --p-accent: var(--nl-step-3-text); --p-solid: var(--nl-step-3); --p-on: var(--nl-step-3-on); --p-ring: var(--nl-step-3-ring); }
[data-product="ocean"] { --p-accent: var(--nl-step-1-text); --p-solid: var(--nl-step-1); --p-on: var(--nl-step-1-on); --p-ring: var(--nl-step-1-ring); }
[data-product="moo"]   { --p-accent: var(--nl-step-4-text); --p-solid: var(--nl-step-4); --p-on: var(--nl-step-4-on); --p-ring: var(--nl-step-4-ring); }
[data-product="rouge"] { --p-accent: var(--nl-step-2-text); --p-solid: var(--nl-step-2); --p-on: var(--nl-step-2-on); --p-ring: var(--nl-step-2-ring); }
[data-product="uptop"] { --p-accent: var(--nl-scalp-text);  --p-solid: var(--nl-scalp);  --p-on: var(--nl-scalp-on);  --p-ring: var(--nl-scalp-ring); }

/* ===================================================================== */
/* 3. SEMANTIC COLOUR (components use these)                              */
/* ===================================================================== */
:root {
  --nl-color-bg: var(--nl-paper);
  --nl-color-surface: var(--nl-white);
  --nl-color-surface-alt: var(--nl-stone);
  --nl-color-text: var(--nl-ink);
  --nl-color-text-muted: var(--nl-muted);
  --nl-color-border: var(--nl-ink);                 /* frames: 1px Ink */
  --nl-color-border-control: var(--nl-control-border);
  --nl-color-border-subtle: var(--nl-hairline);     /* rules between blocks */
  --nl-color-focus: var(--nl-ink);
  --nl-color-link: var(--nl-ink);
  --nl-color-btn-bg: var(--nl-ink);
  --nl-color-btn-fg: var(--nl-paper);
  --nl-color-btn-bg-hover: var(--nl-ink-hover);
  --nl-color-success: var(--nl-success);  --nl-color-success-bg: var(--nl-success-bg);
  --nl-color-warning: var(--nl-warning);  --nl-color-warning-bg: var(--nl-warning-bg);
  --nl-color-error:   var(--nl-error);    --nl-color-error-bg:   var(--nl-error-bg);
  --nl-color-info-bg: var(--nl-info-bg);
}

/* ===================================================================== */
/* 4. TYPOGRAPHY                                                          */
/* ===================================================================== */
:root {
  --nl-font-display: "Jost", "Jost Fallback", "Futura", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  --nl-font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --nl-font-name: "Special Elite", "Special Elite Fallback", "Courier New", Courier, monospace;   /* product names only, 40px and up */

  /* Fluid scale, 375 to 1280px viewport. Headlines: Jost 500, sentence case, tracking 0. */
  --nl-text-display-xl: clamp(3rem, 1.95rem + 4.5vw, 5.5rem);   --nl-lh-display-xl: 1;
  --nl-text-display:    clamp(2.5rem, 1.85rem + 2.8vw, 4rem);   --nl-lh-display: 1.05;
  --nl-text-h1:         clamp(2rem, 1.6rem + 1.75vw, 3rem);     --nl-lh-h1: 1.1;
  --nl-text-h2:         clamp(1.625rem, 1.4rem + 1vw, 2.25rem); --nl-lh-h2: 1.15;
  --nl-text-h3:         clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem); --nl-lh-h3: 1.25;
  --nl-text-h4:         1.125rem;                                --nl-lh-h4: 1.3;
  --nl-text-lede:       clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem); --nl-lh-lede: 1.35;
  --nl-text-label:      0.9375rem;                               --nl-track-label: 0.06em;   /* section labels, Jost caps */
  --nl-text-eyebrow:    0.875rem;                                --nl-track-eyebrow: 0.16em; /* page-level label */
  --nl-text-body-lg:    1.125rem;                                --nl-lh-body: 1.6;
  --nl-text-body:       1.0625rem;                               /* 17px */
  --nl-text-body-sm:    0.9375rem;                               --nl-lh-body-sm: 1.5;
  --nl-text-caption:    0.875rem;                                --nl-lh-caption: 1.45;      /* web floor: nothing renders below 14px */
  --nl-text-button:     1rem;
  --nl-text-price:      1.125rem;
  --nl-text-price-lg:   1.5rem;
  --nl-text-numeral:    clamp(4rem, 3rem + 5vw, 6rem);        /* the stamped reason numeral, 64 to 96px */

  /* Colour Press type (D20; prototype B). One statement per screen, Jost 500, sentence case, one tone. */
  --nl-text-statement:  clamp(2.125rem, 1.35rem + 2.3vw, 3.5rem);   --nl-lh-statement: 1.04;  /* 34 to 56px */
  --nl-text-title:      clamp(1.625rem, 1.3rem + 1.05vw, 2.5rem);   --nl-lh-title: 1.08;      /* 26 to 40px */
  --nl-text-subtitle:   clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);    --nl-lh-subtitle: 1.2;    /* 20 to 24px */
  --nl-text-lede-press: clamp(1.125rem, 1.02rem + 0.42vw, 1.375rem); --nl-lh-lede-press: 1.42; /* 18 to 22px */
  --nl-text-promise-xl: clamp(7.5rem, 4rem + 14vw, 13.75rem);      /* the drawn 60 of the promise, 120 to 220px */

  /* Product names. Special Elite from 40px (Dots and tab); below 40px the name is Jost 500 caps with the native glyph. */
  --nl-text-name-hero:  clamp(3.5rem, 1.5rem + 6.5vw, 7rem);  /* 56 to 112px (R16 s8: the old clamp reached 104.8px at 1440) */
  --nl-text-name-pdp-xl: 4.5rem;                            /* 72px: the product page name from 990px (40px, name-tile, on phones) */
  --nl-text-name-stage: clamp(3.5rem, 1.6rem + 4.4vw, 5.5rem); /* 56 to 88px: the desktop home stage */
  --nl-text-name-card:  2.5rem;                             /* 40px: purchase-unit cards, panels, routine cards (= name-tile) */
  --nl-text-name-pdp:   clamp(2.5rem, 2rem + 2vw, 3.5rem);    /* 40 to 56px */
  --nl-text-name-tile:  2.5rem;                               /* 40px: the smallest size with Dots */
  --nl-text-name-list:  1.125rem;                             /* Jost caps: lists, cart, dashboard */
  --nl-track-name: 0.02em;
  --nl-track-caps: 0.04em;

  --nl-weight-display: 500;  --nl-weight-body: 400;  --nl-weight-ui: 600;
}

/* ===================================================================== */
/* 5. SPACE, SHAPE, MOTION, LAYER                                         */
/* ===================================================================== */
:root {
  --nl-space-2: 2px;  --nl-space-4: 4px;  --nl-space-8: 8px;  --nl-space-12: 12px;  --nl-space-16: 16px;
  --nl-space-24: 24px; --nl-space-32: 32px; --nl-space-48: 48px; --nl-space-64: 64px; --nl-space-96: 96px;
  --nl-section-space: clamp(48px, 6vw, 96px);

  --nl-radius-none: 0;            /* frames, tiles, tabs, product images, panels */
  --nl-radius-control: 2px;       /* inputs and buttons only */
  --nl-radius-dot: 50%;           /* the Dots, nothing else */

  --nl-border-hairline: 1px;  --nl-border-frame: 1px;  --nl-border-promise: 1.5px;  --nl-border-control: 1px;
  --nl-focus-width: 2px;      --nl-focus-offset: 2px;

  --nl-duration-micro: 120ms;  --nl-duration-base: 200ms;
  --nl-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  /* Colour Press motion (R16 s6). Every use sits inside @media (prefers-reduced-motion: no-preference). */
  --nl-duration-bar: 220ms;       /* buy bar in/out, header buy row swap */
  --nl-duration-page: 160ms;      /* view transitions between pages */
  --nl-duration-stamp: 200ms;     /* Cart (n) after an Add */
  --nl-duration-hover: 600ms;     /* photo-tile hover scale */
  --nl-reveal-shift: 24px;        /* settle-in travel, translate only */
  --nl-stagger-step: 8%;          /* view() range offset per card */
  --nl-ease-exit: cubic-bezier(0.3, 0, 1, 1);

  /* Section space S / M / L (R16 s8): 24 / 40 / 56px on phones, 32 / 64 / 96px from 990px. A section owns its top padding only. */
  --nl-space-s: 24px;  --nl-space-m: 40px;  --nl-space-l: 56px;

  --nl-z-header: 20;  --nl-z-banner: 40;  --nl-z-toast: 60;
  --nl-z-bar: 25;     /* the phone buy bar: over the page, under the consent banner's layer */
}

/* ===================================================================== */
/* 6. LAYOUT. Breakpoints 750 / 990 / 1200 (use the numbers in @media)    */
/* ===================================================================== */
:root {
  --nl-grid-gutter: 16px;  --nl-page-margin: 16px;
  --nl-content-max: 1280px;  --nl-prose-max: 68ch;  --nl-narrow-max: 720px;
  --nl-control-l: 56px;  --nl-control-m: 48px;  --nl-control-s: 44px;  --nl-target-min: 44px;
  --nl-size-icon: 24px;
}
@media (min-width: 750px) { :root { --nl-grid-gutter: 24px; --nl-page-margin: 40px; } }
:root {
  --nl-header-h: 56px;            /* the sticky header: 56px on phones, 64px from 990px */
  --nl-bleed-max: 1920px;         /* bands and photo tiles bleed full width up to this, then centre on Paper */
  /* The text grid's edge inside a full-bleed split (left padding of a band beside a photo tile) */
  --nl-edge: max(var(--nl-page-margin), calc((min(100vw, var(--nl-bleed-max)) - var(--nl-content-max)) / 2));
  --nl-tile: #F8F4EE;             /* the off-white sweep of the product photo tiles */
}
@media (min-width: 990px) { :root { --nl-header-h: 64px; --nl-space-s: 32px; --nl-space-m: 64px; --nl-space-l: 96px; } }

/* ===================================================================== */
/* 7. DEVICE GEOMETRY (R0-visual s3, measured from the fonts)             */
/* ===================================================================== */
:root {
  /* The Dots: d = 0.20 x cap height (0.689em in Special Elite) = 0.138em; gap d; pair width 3d; bottoms 0.5d above cap top.
     At line-height 1 the baseline sits 0.703em down, so the Dots top is at -0.193em. Keep 1d clear above (padding-top 0.35em). */
  --nl-dots-d: 0.138em;
  --nl-dots-top: -0.193em;
  --nl-dots-clear: 0.35em;
  --nl-dots-ring: max(1px, 0.0167em);        /* MOO's Ink ring, outside the fill */

  /* The step tab: height 0.55 x cap = 0.379em, width 1.55 x height = 0.587em, numeral 0.6 x height; web floor 24 x 37px, numeral 14px. */
  --nl-tab-h: max(0.379em, 24px);
  --nl-tab-w: max(0.587em, 37px);
  --nl-tab-gap: max(0.2274em, 14.4px);       /* 0.6 x height */
  --nl-tab-n: max(0.2274em, 14px);

  --nl-wm-h: clamp(32px, 5vw, 64px);         /* watermark tile height H; the tile cell is 7.447 H wide and 3.2 H tall */

  /* Background layer (D25, Leo 2026-11-03: the "Medium" strength of the 2026-11-03 prototype, base x 1.8, baked in). Ink at these opacities. */
  --nl-bg-tissue-opacity: 0.081;             /* the monogram tissue under every storefront page (base 0.045) */
  --nl-bg-giant-opacity: 0.072;              /* the homepage shop section's giant wordmark (base 0.04) */
  --nl-bg-turn: -12deg;                      /* the tissue's tilt; js/nl.js reads it so the scroll wrap follows the same axes */
}

/* ===================================================================== */
/* 8. BANDS (D20, strong). Hard-edged colour behind TYPE only.            */
/*    Apply with data-band="blu|ocean|duo|moo|ink|stone" (css/press.css).  */
/*    Contrast (R16 s7): Paper on cobalt 5.36:1; #0E1516 on teal 4.68:1   */
/*    (never Ink, 4.16:1, or Paper); Paper on Ink 14.9:1; Ink on cream    */
/*    11.2:1. Dimmed text on a colour band is never allowed: full strength */
/*    only. -mark is the reversed Dots and tab fill, -mark-on its numeral. */
/* ===================================================================== */
:root {
  --nl-band-blu-bg: var(--nl-cobalt);     --nl-band-blu-fg: var(--nl-paper);
  --nl-band-blu-mark: var(--nl-paper);    --nl-band-blu-mark-on: var(--nl-cobalt);
  --nl-band-ocean-bg: var(--nl-step-1);   --nl-band-ocean-fg: var(--nl-ink-on-solid);
  --nl-band-ocean-mark: var(--nl-ink-on-solid); --nl-band-ocean-mark-on: var(--nl-step-1);
  --nl-band-moo-bg: var(--nl-step-4);     --nl-band-moo-fg: var(--nl-ink);
  --nl-band-moo-mark: var(--nl-ink);      --nl-band-moo-mark-on: var(--nl-step-4);
  --nl-band-ink-bg: var(--nl-ink);        --nl-band-ink-fg: var(--nl-paper);
  --nl-band-ink-ring: var(--nl-paper);    /* step tabs on Ink get a 1px Paper ring (a cobalt tab on Ink is 2.79:1) */
  --nl-band-stone-bg: var(--nl-stone);    --nl-band-stone-fg: var(--nl-ink);
  /* A button on a band: Paper fill, Ink label (14.9:1); its edge is 5.36:1 on cobalt, 3.59:1 on teal. On cream: Ink fill. */
  --nl-band-btn-bg: var(--nl-paper);      --nl-band-btn-fg: var(--nl-ink);
}

/* ===================================================================== */
/* 9. MOTION AND FORCED COLOURS                                           */
/* ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0ms !important; scroll-behavior: auto !important; }
}
