/* ============================================================================
   NUMEN site system — tokens + shared components.
   Loads AFTER scrollcraft.css on every page. The brand is these tokens.
   ========================================================================== */

:root {
  /* Marble & iron: cold slate blacks, bone ink, one azure accent (the logo's). */
  --sc-canvas:      #0B0D10;
  --sc-surface:     #12161B;
  --sc-ink:         #EDEFF2;
  --sc-ink-soft:    #A3AEB9;
  --sc-accent:      #45BDF0;
  --sc-accent-ink:  #051019;

  --sc-font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sc-font-text:    "DM Sans", "Segoe UI", system-ui, sans-serif;
  --sc-font-mono:    "DM Mono", ui-monospace, "SF Mono", monospace;

  --sc-shadow-color: 210 45% 3%;

  /* Stone accents used by the museum chrome */
  --n-stone:   #171C22;
  --n-stone-2: #1E242C;
  --n-chrome:  #77828E;
  --n-lit:     #141A21;
}

/* Space Grotesk display: confident weight, tight tracking as size grows. */
.sc-display { font-weight: 600; letter-spacing: var(--sc-track-tight); }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* ------------------------------------------------------------- chrome ---- */
.bar {
  position: sticky; top: 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; gap: var(--sc-5);
  padding: var(--sc-3) var(--sc-gutter);
  background: color-mix(in oklab, var(--sc-canvas) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sc-hairline);
}
.bar__mark {
  display: flex; align-items: center; gap: var(--sc-3);
  text-decoration: none; margin-right: auto;
}
.bar__mark img { width: 26px; height: 26px; }
.bar__mark span {
  font-family: var(--sc-font-display); font-weight: 600;
  font-size: 1.02rem; letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--sc-ink);
}
.bar nav { display: flex; gap: var(--sc-5); align-items: center; flex-wrap: wrap; }
.bar nav a {
  font-size: var(--sc-t-sm); color: var(--sc-ink-soft);
  text-decoration: none; letter-spacing: 0.02em;
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--sc-ink); }
.bar .btn { margin-left: var(--sc-2); }
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; gap: var(--sc-3); row-gap: var(--sc-2); }
  .bar__mark { order: 1; margin-right: 0; }
  .bar .btn { order: 2; margin-left: auto; padding: 0.5rem 0.9rem; font-size: 0.78rem; }
  .bar nav { order: 3; width: 100%; gap: var(--sc-4); }
}

/* ------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sc-2);
  padding: 0.72rem 1.35rem;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  font-weight: 600; font-size: var(--sc-t-sm); letter-spacing: 0.01em;
  text-decoration: none; border: 0; border-radius: 10px;
  cursor: pointer; white-space: nowrap;
  box-shadow: var(--sc-e1);
  transition: transform var(--sc-d-fast) var(--sc-ease-out),
              box-shadow var(--sc-d-fast) var(--sc-ease-out),
              background var(--sc-d-fast) var(--sc-ease-out);
}
.btn:hover {
  background: color-mix(in oklab, var(--sc-accent) 86%, white);
  box-shadow: 0 4px 10px hsl(var(--sc-shadow-color) / 0.3),
              0 10px 28px -6px color-mix(in oklab, var(--sc-accent) 38%, transparent);
}
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent; color: var(--sc-ink);
  border: 1px solid var(--sc-hairline-strong); box-shadow: none;
  border-radius: 10px;
}
.btn--ghost:hover { background: color-mix(in oklab, var(--sc-ink) 7%, transparent); border-color: var(--sc-ink-soft); }
.btn--quiet {
  background: transparent; color: var(--sc-accent);
  padding: 0.25rem 0; border-radius: 0; box-shadow: none;
  text-decoration: underline; text-underline-offset: 0.28em; text-decoration-thickness: 1px;
}
.btn--quiet:hover { background: transparent; color: color-mix(in oklab, var(--sc-accent) 80%, white); box-shadow: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* --------------------------------------------------------- page scaffold - */
.page-hero { padding: clamp(4rem, 9vw, 8rem) 0 clamp(2.5rem, 5vw, 4.5rem); }
.page-hero .sc-label { margin-bottom: var(--sc-4); display: block; }
.page-hero h1 { font-size: var(--sc-t-3xl); }
.page-hero .sc-lede { margin-top: var(--sc-5); color: var(--sc-ink-soft); }

.section { padding-block: clamp(3rem, 7vw, 6.5rem); }
.section--hairline { border-top: 1px solid var(--sc-hairline); }

/* Two-column spread: text column + media, asymmetric. */
.spread { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 900px) {
  .spread { grid-template-columns: 5fr 6fr; }
  .spread--flip > :first-child { order: 2; }
  .spread--flip { grid-template-columns: 6fr 5fr; }
}
.spread figure { margin: 0; position: relative; }
/* Never distort or crop: scale within a height cap, keep the ratio. */
.spread figure img {
  display: block; width: auto; max-width: 100%;
  max-height: min(68vh, 36rem); height: auto;
  margin-inline: auto;
  border-radius: var(--sc-r-sm);
  box-shadow: var(--sc-e3), var(--sc-edge);
}

/* ------------------------------------------------------ museum elements -- */
/* A plaque: the label schema. Fact, not pitch. */
.plaque {
  border-top: 1px solid var(--sc-hairline-strong);
  padding-top: var(--sc-4);
}
.plaque .sc-label { color: var(--sc-accent); }
.plaque h3 {
  font-family: var(--sc-font-display); font-weight: 600;
  font-size: var(--sc-t-xl); margin: var(--sc-2) 0 var(--sc-1);
  letter-spacing: var(--sc-track-snug);
}
.plaque .plaque__form { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); margin: 0 0 var(--sc-3); }
.plaque ul { list-style: none; margin: 0; padding: 0; }
.plaque li {
  font-family: var(--sc-font-mono); font-size: var(--sc-t-xs);
  letter-spacing: 0.04em; color: var(--sc-ink-soft);
  padding: 0.4rem 0; border-top: 1px solid var(--sc-hairline);
}
.plaque li strong { color: var(--sc-ink); font-weight: 500; }

/* Spec sheet: dl rows, tabular. */
.specs { margin: 0; }
.specs div {
  display: flex; justify-content: space-between; gap: var(--sc-5);
  padding: 0.65rem 0; border-top: 1px solid var(--sc-hairline);
}
.specs div:last-child { border-bottom: 1px solid var(--sc-hairline); }
.specs dt { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.specs dd { margin: 0; font-variant-numeric: tabular-nums; font-size: var(--sc-t-sm); color: var(--sc-ink); text-align: right; overflow-wrap: anywhere; }

/* Ingredient ledger rows */
.ledger { border-top: 1px solid var(--sc-hairline-strong); }
.ledger__row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--sc-2) var(--sc-6);
  padding: var(--sc-4) 0; border-bottom: 1px solid var(--sc-hairline);
}
.ledger__row h4 { margin: 0; font-size: var(--sc-t-base); font-weight: 600; }
.ledger__row .dose {
  font-family: var(--sc-font-mono); font-variant-numeric: tabular-nums;
  color: var(--sc-accent); font-size: var(--sc-t-sm); align-self: start;
  white-space: nowrap;
}
.ledger__row p { grid-column: 1 / -1; margin: 0; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); max-width: 62ch; }

/* Notice / disclaimer plate */
.plate {
  background: var(--sc-surface); border: 1px solid var(--sc-hairline);
  border-radius: var(--sc-r-sm); padding: var(--sc-5) var(--sc-6);
  box-shadow: var(--sc-edge);
}
.plate--accent { border-left: 1px solid var(--sc-accent); }

/* Steps: numbered protocol, no icon cards. */
.protocol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.protocol > li {
  counter-increment: step;
  display: grid; grid-template-columns: auto 1fr; gap: var(--sc-2) var(--sc-5);
  padding: var(--sc-5) 0; border-top: 1px solid var(--sc-hairline);
}
.protocol > li::before {
  content: counter(step, upper-roman);
  font-family: var(--sc-font-display); font-weight: 500; font-size: var(--sc-t-lg);
  color: var(--sc-chrome, var(--sc-ink-soft)); line-height: 1.2; min-width: 2.2rem;
}
.protocol h3, .protocol h4 { margin: 0 0 var(--sc-1); font-size: var(--sc-t-base); font-weight: 600; font-family: var(--sc-font-text); }
.protocol p { margin: 0; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); max-width: 62ch; }

/* --------------------------------------------------------------- forms --- */
.field { display: flex; gap: var(--sc-2); max-width: 30rem; flex-wrap: wrap; }
.field input[type="email"] { min-width: 12rem; }
@media (min-width: 480px) { .field { flex-wrap: nowrap; } }
.field input[type="email"], .field input[type="text"] {
  flex: 1; min-width: 0;
  background: var(--sc-surface); color: var(--sc-ink);
  border: 1px solid var(--sc-hairline-strong); border-radius: var(--sc-r-sm);
  padding: 0.7rem 0.9rem; font-size: var(--sc-t-sm);
}
.field input::placeholder { color: color-mix(in oklab, var(--sc-ink-soft) 70%, transparent); }
.form-note { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); margin-top: var(--sc-2); }
.form-msg { font-size: var(--sc-t-sm); margin-top: var(--sc-3); color: var(--sc-accent); }
.form-msg--err { color: #F0A26B; }

.contact-form { display: grid; gap: var(--sc-4); max-width: 38rem; }
.contact-form label { display: grid; gap: var(--sc-1); font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.contact-form input, .contact-form select, .contact-form textarea {
  background: var(--sc-surface); color: var(--sc-ink);
  border: 1px solid var(--sc-hairline-strong); border-radius: var(--sc-r-sm);
  padding: 0.7rem 0.9rem; font-size: var(--sc-t-sm); width: 100%;
}
.contact-form textarea { min-height: 8rem; resize: vertical; }

/* --------------------------------------------------------------- footer -- */
.foot {
  border-top: 1px solid var(--sc-hairline);
  padding: clamp(3rem, 6vw, 5rem) 0 var(--sc-6);
  background: color-mix(in oklab, var(--sc-canvas) 70%, #070809);
}
.foot__grid { display: grid; gap: var(--sc-7); }
@media (min-width: 860px) { .foot__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot h2 { font-size: var(--sc-t-base); font-weight: 600; margin: 0 0 var(--sc-3); font-family: var(--sc-font-text); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.foot a { color: var(--sc-ink-soft); text-decoration: none; font-size: var(--sc-t-sm); }
.foot a:hover { color: var(--sc-ink); }
.foot__brand p { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); max-width: 34ch; }
.foot__legal {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: var(--sc-5);
  border-top: 1px solid var(--sc-hairline);
  display: grid; gap: var(--sc-3);
}
.foot__legal p { margin: 0; font-size: var(--sc-t-xs); color: color-mix(in oklab, var(--sc-ink-soft) 80%, transparent); max-width: 90ch; }

/* -------------------------------------------------------------- reveal --- */
html.js .rv { opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity 620ms var(--sc-ease-out), transform 620ms var(--sc-ease-out); }
html.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { transform: none; transition-duration: 220ms; }
}

/* ----------------------------------------------------------- atmosphere -- */
/* Rooms are lit, not flat. One azure key light + a cool fill, both faint;
   the accent owns the light so the whole page stays one system. */
/* :where() keeps this at zero specificity so it can never override the
   engine's position: sticky on a stage that carries the class. */
:where(.lit) { position: relative; }
.lit::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(46rem 30rem at var(--lit-x, 78%) var(--lit-y, 22%),
      color-mix(in oklab, var(--sc-accent) 7%, transparent), transparent 68%),
    radial-gradient(38rem 26rem at calc(100% - var(--lit-x, 78%)) calc(100% - var(--lit-y, 22%)),
      color-mix(in oklab, #5DDFC0 4%, transparent), transparent 70%);
}
/* Children ride above the light. Never reposition a sticky stage. */
.lit > :not([data-sc-stage]) { position: relative; z-index: 1; }
.lit > [data-sc-stage] { z-index: 1; }

/* Object aura: a soft key light behind a product cutout. */
:where(.aura) { position: relative; }
.aura::before {
  content: ""; position: absolute; left: 50%; top: 52%; translate: -50% -50%;
  width: 88%; aspect-ratio: 1; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side,
    color-mix(in oklab, var(--sc-accent) 13%, transparent), transparent 68%);
  filter: blur(14px);
}
.aura > img, .aura > div { position: relative; z-index: 1; }

/* Faint blueprint grid, the old site's signature texture. */
.gridlines::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(237, 239, 242, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 239, 242, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 45%, black 30%, transparent 100%);
  mask-image: radial-gradient(80% 80% at 50% 45%, black 30%, transparent 100%);
}

/* ------------------------------------------- grafts from the v18 look ---- */
/* Accent phrase inside a headline: one per heading, solid azure. */
.hl { color: var(--sc-accent); }

/* Stat triplet: big value, small label. */
.stats { display: flex; flex-wrap: wrap; gap: var(--sc-4) var(--sc-7);
  margin: var(--sc-5) 0 0; padding: 0; list-style: none; }
.stats li { min-width: 6.5rem; }
.stats b { display: block; font-family: var(--sc-font-display); font-weight: 600;
  font-size: var(--sc-t-xl); line-height: 1.1; color: var(--sc-accent);
  letter-spacing: var(--sc-track-snug); }
.stats span { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); letter-spacing: 0.03em; }

/* Ghost display type behind a product. */
.ghost { position: absolute; z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--sc-font-display); font-weight: 700; line-height: 1;
  letter-spacing: -0.02em; white-space: nowrap;
  color: var(--sc-ink); opacity: 0.05; }
.hero-obj .ghost { left: 50%; top: 58%; translate: -50% -50%;
  font-size: clamp(4.5rem, 12vw, 10.5rem); }
/* Contain ghost type: it may crop, it may never widen the page. */
.page-hero { overflow: clip; }
@media (max-width: 700px) {
  .hero-obj .ghost { font-size: clamp(3.2rem, 14vw, 4.6rem); }
}

/* Announcement strip. */
.announce { background: color-mix(in oklab, var(--sc-surface) 60%, var(--sc-canvas));
  border-bottom: 1px solid var(--sc-hairline);
  text-align: center; padding: 0.45rem var(--sc-gutter);
  font-size: var(--sc-t-xs); letter-spacing: 0.05em; color: var(--sc-accent);
  position: relative; z-index: calc(var(--sc-z-chrome) + 1); }
.announce span { transition: opacity 400ms var(--sc-ease-out); }
.announce span.is-out { opacity: 0; }

/* Protocol finder. */
.finder { display: grid; gap: var(--sc-4); }
.finder__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-3); }
.finder__goal { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem;
  padding: 0.9rem 1rem; text-align: left; cursor: pointer;
  background: var(--sc-surface); color: var(--sc-ink);
  border: 1px solid var(--sc-hairline); border-radius: 10px;
  font: inherit; font-size: var(--sc-t-sm);
  transition: border-color var(--sc-d-fast) var(--sc-ease-out),
              background var(--sc-d-fast) var(--sc-ease-out); }
.finder__goal small { color: var(--sc-ink-soft); font-size: var(--sc-t-xs); }
.finder__goal .sc-label { font-size: 0.62rem; }
.finder__goal:hover { border-color: var(--sc-ink-soft); }
.finder__goal.is-on { border-color: var(--sc-accent);
  background: color-mix(in oklab, var(--sc-accent) 9%, var(--sc-surface));
  box-shadow: 0 8px 24px -10px color-mix(in oklab, var(--sc-accent) 35%, transparent); }
.finder__goal.is-on .sc-label { color: var(--sc-accent); }
.finder__result { display: grid; grid-template-columns: auto 1fr; gap: var(--sc-5);
  align-items: center;
  background: var(--sc-surface); border: 1px solid var(--sc-hairline);
  border-radius: 10px; padding: var(--sc-5) var(--sc-6); box-shadow: var(--sc-edge); }
.finder__result figure { margin: 0; width: clamp(6rem, 10vw, 8.5rem);
  display: flex; align-items: center; justify-content: center; }
.finder__result img { max-height: clamp(8rem, 16vh, 11rem); width: auto;
  filter: drop-shadow(0 14px 22px rgba(3,6,9,0.6)); }
.finder__result h3 { margin: 0.15rem 0 0.1rem; font-family: var(--sc-font-display);
  font-weight: 600; font-size: var(--sc-t-xl); letter-spacing: var(--sc-track-snug); }
.finder__result .sub { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); margin: 0 0 var(--sc-2); }
.finder__result p.sum { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); margin: 0 0 var(--sc-3); max-width: 44ch; }
@media (max-width: 560px) {
  .finder__result { grid-template-columns: 1fr; }
}

/* ---------------------------------------------- brand-batch additions ---- */
/* Ingredient-count / claim badge chip. */
.badge { display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.32rem 0.65rem; margin: var(--sc-3) 0 0;
  border: 1px solid color-mix(in oklab, var(--sc-accent) 40%, transparent);
  border-radius: 6px;
  background: color-mix(in oklab, var(--sc-accent) 8%, transparent);
  color: var(--sc-accent); font-family: var(--sc-font-mono);
  font-size: 0.62rem; letter-spacing: 0.09em; text-transform: uppercase;
  white-space: nowrap; }

/* Dictionary entry: the word NUMEN, defined. */
.defn { border-left: 2px solid var(--sc-accent);
  background: color-mix(in oklab, var(--sc-surface) 55%, transparent);
  border-radius: 0 10px 10px 0;
  padding: var(--sc-5) var(--sc-6); max-width: 42rem; }
.defn .word { font-family: var(--sc-font-display); font-weight: 600;
  font-size: var(--sc-t-2xl); letter-spacing: 0.05em; line-height: 1.1; }
.defn .phon { font-family: var(--sc-font-mono); font-size: var(--sc-t-sm);
  color: var(--sc-ink-soft); margin-left: 0.6rem; }
.defn .pos { font-style: italic; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); margin: 0.3rem 0 0; }
.defn ol { margin: var(--sc-3) 0 0; padding-left: 1.2rem; display: grid; gap: 0.5rem;
  color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.defn ol strong { color: var(--sc-ink); font-weight: 500; }

/* The Daily Protocol timeline. */
.proto { list-style: none; margin: 0; padding: 0; }
.proto li { display: grid; grid-template-columns: 7.5rem 1fr auto;
  gap: var(--sc-2) var(--sc-5); align-items: baseline;
  padding: var(--sc-4) 0; border-top: 1px solid var(--sc-hairline); }
.proto li:last-child { border-bottom: 1px solid var(--sc-hairline); }
.proto .when { font-family: var(--sc-font-mono); font-size: var(--sc-t-xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--sc-accent); }
.proto h3 { margin: 0; font-size: var(--sc-t-base); font-weight: 600; font-family: var(--sc-font-text); }
.proto p { grid-column: 2; margin: 0; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); max-width: 52ch; }
.proto a { white-space: nowrap; font-size: var(--sc-t-sm); }
@media (max-width: 560px) { .proto li { grid-template-columns: 1fr auto; }
  .proto .when { grid-column: 1 / -1; } .proto p { grid-column: 1; } }

/* Action mosaic: motion, sweat, emotion. */
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sc-2); }
@media (min-width: 760px) { .mosaic { grid-template-columns: repeat(4, 1fr); } }
.mosaic figure { margin: 0; overflow: clip; border-radius: 6px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4;
  transition: transform 600ms var(--sc-ease-out); }
@media (hover: hover) and (pointer: fine) { .mosaic figure:hover img { transform: scale(1.04); } }

/* Guarantee line. */
.gtee { display: flex; align-items: baseline; gap: var(--sc-3);
  font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.gtee b { font-family: var(--sc-font-display); font-weight: 600;
  color: var(--sc-accent); font-size: var(--sc-t-lg); white-space: nowrap; }

/* ------------------------------------------------------------- helpers --- */
.tick-row { display: flex; flex-wrap: wrap; gap: var(--sc-2) var(--sc-6); padding: 0; margin: 0; list-style: none; }
.tick-row li { font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.tick-row li::before { content: "· "; color: var(--sc-accent); }
.price { font-variant-numeric: tabular-nums; }
.price__now { font-size: var(--sc-t-xl); font-family: var(--sc-font-display); }
.price__note { color: var(--sc-ink-soft); font-size: var(--sc-t-sm); }
.crumbs { font-size: var(--sc-t-xs); color: var(--sc-ink-soft); margin: var(--sc-4) 0 0; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--sc-ink); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--sc-accent); color: var(--sc-accent-ink);
  padding: 0.5rem 1rem; border-radius: var(--sc-r-sm); text-decoration: none;
}
.skip:focus-visible { left: var(--sc-3); top: var(--sc-3); }
