/* ==========================================================================
   THE CHA — prototype v1 stylesheet
   Depends on ../../../design/tokens.css (linked first in every page).
   Shapes follow design-system.md §3.4: the 60px pill is the signature, cards
   take --r-lg, media frames --r-xl, inputs --r-md.
   ========================================================================== */

:root {
  /* The ground the current section sits on — set it on any tinted section. */
  --ground: var(--surface);
}

/* ---- 1. BASE ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--cha-ink);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.on-dark :focus-visible, .on-media :focus-visible { outline-color: var(--cha-white); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 0; left: 0; z-index: 200;
  transform: translateY(-120%);
  background: var(--cha-ink); color: var(--cha-white);
  padding: var(--s-3) var(--s-5);
  font-size: var(--t-small);
}
.skip-link:focus-visible { transform: none; }

/* ---- 2. LAYOUT & TYPE -------------------------------------------------- */

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }

.ground-cream  { background: var(--surface-tinted); --ground: var(--surface-tinted); }
.ground-sunken { background: var(--surface-sunken); --ground: var(--surface-sunken); }
.ground-ink {
  background: var(--surface-inverse); color: var(--text-inverse);
  --ground: var(--surface-inverse);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 var(--s-4);
}
.ground-cream .eyebrow, .ground-sunken .eyebrow { color: var(--text-secondary); }
.ground-ink .eyebrow, .on-media .eyebrow { color: rgba(253, 252, 248, .68); }

h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-regular); }
.h1      { font-size: var(--t-h1); font-weight: var(--weight-light); line-height: var(--lh-tight); letter-spacing: var(--track-tight); }
.h2      { font-size: var(--t-h2); line-height: var(--lh-snug); letter-spacing: var(--track-tight); }
.h2--light { font-weight: var(--weight-light); }
.h3      { font-size: var(--t-h3); line-height: var(--lh-snug); }
.h4      { font-size: var(--t-h4); line-height: var(--lh-snug); }
.display { font-size: var(--t-display); font-weight: var(--weight-light); line-height: var(--lh-tight); letter-spacing: var(--track-display); }

.lead { font-size: var(--t-lead); line-height: var(--lh-normal); color: var(--text-secondary); margin: 0; }
.on-media .lead, .ground-ink .lead { color: rgba(253, 252, 248, .82); }
.body { font-size: var(--t-body); line-height: var(--lh-loose); color: var(--text-secondary); margin: 0; max-width: var(--container-text); }
.mono { font-family: var(--font-mono); font-size: var(--t-small); }
.micro { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-secondary); margin: 0; }
.measure { max-width: 46ch; }
.note-open { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--cha-terra); margin: 0; }

/* ---- 3. WORDMARK ------------------------------------------------------- *
 * The real logo face. 'Lady Ice - Small Caps' ships on the live site as an
 * inline @font-face with a base64 TrueType payload — not a Google Fonts
 * request, which is why design-system.md §3.1 recorded it as never loaded.
 * The binary is extracted verbatim from assets/raw/home.html, so this is the
 * merchant's actual wordmark, not a rebuild.
 * ONE component, one place to change: CHA.wordmark() in ../js/site.js.     */

@font-face {
  font-family: 'Lady Ice';
  src: url('../brand/lady-ice-small-caps.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.wordmark {
  display: inline-flex;
  /* Matches .logo / .hero-logo / .f-logo on the live site verbatim. */
  font-family: var(--font-wordmark);
  font-variant: small-caps;
  font-weight: var(--weight-regular);
  letter-spacing: .1em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark i { font-style: normal; transition: color var(--d-slow) var(--ease); }
.wordmark .wm-c { color: var(--cha-olive); }
.wordmark .wm-h { color: var(--cha-steel); }
.wordmark .wm-a { color: var(--cha-terra); }
/* Over media and on ink the tri-colour drops below AA, so it goes solid. */
.on-media .wordmark i, .ground-ink .wordmark i { color: var(--cha-white); }

/* Lady Ice is heavily condensed, so the live site's 1.7rem nav / 2rem footer
   read smaller than their numbers suggest. Sized up to hold the same
   presence in the bar. */
.wordmark--sm { font-size: 2.1rem; }
.wordmark--md { font-size: 2.6rem; }
.wordmark--display {
  font-size: var(--t-display);
  letter-spacing: .08em;
  line-height: .9;
}

/* ---- 5. BUTTONS & PILLS ------------------------------------------------ *
 * The pill (--r-pill, 60px) is the signature shape on the live site and the
 * most recognisable non-colour element the brand owns. design-system.md §5.1. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: .85rem 1.8rem;
  border-radius: var(--r-pill);
  background: var(--cha-ink);
  color: var(--text-inverse);
  font-size: var(--t-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-wide);
  text-align: center;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), transform var(--d-base) var(--ease),
              color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); background: #262626; color: var(--text-inverse); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: var(--d-instant); }

.btn--soft {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn--soft:hover { background: rgba(56, 56, 56, .05); color: var(--text); }

.btn--light { background: var(--cha-white); color: var(--text); }
.btn--light:hover { background: #FFFFFF; color: var(--text); }

.btn--media {
  background: rgba(253, 252, 248, .16);
  border: 1px solid var(--border-inverse);
  color: var(--cha-white);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}
.btn--media:hover { background: rgba(253, 252, 248, .3); color: var(--cha-white); }

.btn--block { display: flex; width: 100%; }

.btn[aria-disabled="true"], .btn:disabled {
  background: rgba(56, 56, 56, .25);
  border-color: transparent;
  pointer-events: none;
  color: var(--cha-white);
}

/* Small pill — nav links, shop filters, formula chips. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: .5rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease),
              border-color var(--d-fast) var(--ease);
}
.pill:hover { background: rgba(56, 56, 56, .06); color: var(--text); }
.pill[aria-checked="true"], .pill.is-active, .pill[aria-current="page"] {
  background: var(--cha-ink);
  border-color: var(--cha-ink);
  color: var(--text-inverse);
}
.filterbar .pill, .opts .pill { border-color: var(--border-strong); }
.filterbar .pill[aria-checked="true"], .opts .pill[aria-checked="true"] { border-color: var(--cha-ink); }
.on-media .pill { color: rgba(253, 252, 248, .84); }
.on-media .pill:hover { background: rgba(253, 252, 248, .16); color: var(--cha-white); }
.on-media .pill[aria-current="page"] { background: rgba(253, 252, 248, .24); border-color: transparent; color: var(--cha-white); }

/* Larger choice control — pack, plan, delivery options. */
.choice {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 56px;
  padding: .8rem 1.2rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  color: var(--text);
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.choice:hover { background: rgba(56, 56, 56, .04); }
.choice[aria-checked="true"] { border-color: var(--cha-ink); background: var(--surface-tinted); }
.choice[aria-checked="true"] .choice__name { font-weight: var(--weight-medium); }
.choice__name { display: block; font-size: .95rem; }
.choice__note { display: block; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-secondary); margin-top: .15rem; }
.choice__tick {
  display: inline-block; width: 9px; height: 9px; border-radius: var(--r-full);
  margin-right: .55rem; vertical-align: baseline;
}

.field {
  position: relative;
  display: block;
  flex: 1 1 220px;
  min-width: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: border-color var(--d-fast) var(--ease);
}
.field:focus-within { border-color: var(--cha-ink); }
.field input {
  width: 100%;
  min-height: 50px;
  padding: .8rem 1.1rem;
  background: transparent;
  border: 0;
  font-size: .95rem;
}
.field input::placeholder { color: var(--text-tertiary); }
.newsletter .field { border-radius: var(--r-pill); }
.newsletter .field input { padding-inline: 1.4rem; }
.ground-ink .field { border-color: rgba(253, 252, 248, .3); }
.ground-ink .field:focus-within { border-color: var(--cha-white); }
.ground-ink .field input::placeholder { color: rgba(253, 252, 248, .5); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
}
.qty button { width: 44px; height: 44px; font-size: 1.05rem; color: var(--text); }
.qty output { min-width: 3ch; text-align: center; font-family: var(--font-mono); font-size: .9rem; }

/* ---- 7. HEADER --------------------------------------------------------- */

.site-top { position: fixed; inset: 0 0 auto 0; z-index: var(--z-header); }

.announce {
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: .08em;
  text-align: center;
  padding: .5rem var(--s-4);
}
.site-header {
  transition: background var(--d-slow) var(--ease), color var(--d-slow) var(--ease),
              border-color var(--d-slow) var(--ease);
  background: rgba(253, 252, 248, .94);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header.on-media { background: transparent; color: var(--cha-white); border-bottom-color: transparent; }

.site-header nav {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

.cart-btn { position: relative; }
.cart-btn .cart-count { font-variant-numeric: tabular-nums; }

.nav-toggle {
  width: 44px; height: 44px;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px; background: currentColor;
  transition: transform var(--d-base) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-drawer {
  position: fixed; inset: 0; z-index: -1;
  background: var(--surface);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--d-slow) var(--ease), transform var(--d-slow) var(--ease), visibility var(--d-slow);
}
.nav-drawer[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
.nav-drawer nav {
  display: flex; flex-direction: column; gap: var(--s-5);
  padding: calc(var(--header-h) + 34px + var(--s-7)) var(--gutter) var(--s-7);
}
.nav-drawer a { font-size: var(--t-h3); line-height: var(--lh-snug); }
.nav-drawer .drawer-mail { font-family: var(--font-mono); font-size: var(--t-small); color: var(--text-secondary); margin-top: var(--s-5); }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}

/* Every page reserves the header's height; hero pages pull back under it. */
.page { padding-top: calc(var(--header-h) + 34px); }
.page--hero { padding-top: 0; }

/* ---- 8. CART DRAWER ---------------------------------------------------- */

.cart-scrim {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: var(--scrim-full);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--d-slow) var(--ease), visibility var(--d-slow);
}
.cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 5);
  width: min(430px, 100vw);
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--d-slow) var(--ease), visibility var(--d-slow);
}
[data-cart-open="true"] .cart-scrim { opacity: 1; visibility: visible; pointer-events: auto; }
[data-cart-open="true"] .cart-panel { transform: none; visibility: visible; }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-5) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.cart-head p { margin: 0; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .18em; text-transform: uppercase; }
.cart-close { width: 44px; height: 44px; font-size: 1.2rem; }
.cart-body { flex: 1; overflow-y: auto; padding: var(--s-5); }
.cart-foot { border-top: 1px solid var(--border); padding: var(--s-5); background: var(--surface-tinted); --ground: var(--surface-tinted); }

.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.cart-line__shot { width: 72px; height: 90px; border-radius: var(--r-md); background-size: cover; background-position: center; }
.cart-line__top { display: flex; justify-content: space-between; gap: var(--s-3); align-items: baseline; }
.cart-line__top p { margin: 0; font-size: .98rem; }
.cart-line__plan { margin: .25rem 0 .6rem; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-tertiary); }
.cart-line__ctl { display: flex; align-items: center; gap: var(--s-3); }
.cart-line__ctl .qty button { width: 36px; height: 36px; }
.link-quiet { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-tertiary); padding: .5rem 0; }
.link-quiet:hover { color: var(--cha-terra); }

.cart-empty { padding: var(--s-8) 0; text-align: center; }

.cart-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-4); }
.cart-sum span:first-child { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary); }
.cart-sum span:last-child { font-family: var(--font-mono); font-size: 1.05rem; }

/* ---- 8.1 FREE-SHIPPING METER ------------------------------------------ */

.shipbar {
  height: 3px;
  border-radius: var(--r-pill);
  background: rgba(56, 56, 56, .12);
  overflow: hidden;
  margin-bottom: .6rem;
}
.shipbar__fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--trail);
  transition: width var(--d-slow) var(--ease), background var(--d-slow) var(--ease);
}
.shipbar-note { margin: 0 0 var(--s-4); font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-secondary); }
.shipbar-note b { font-weight: var(--weight-medium); color: var(--cha-olive); }

/* ---- 9. REVEAL --------------------------------------------------------- */

[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---- 10. MEDIA --------------------------------------------------------- */

.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--surface-media);
}
.frame > img, .frame > video { width: 100%; height: 100%; object-fit: cover; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--1x1  { aspect-ratio: 1 / 1; }
.frame--4x3  { aspect-ratio: 4 / 3; }
.frame--4x5  { aspect-ratio: 4 / 5; }
.frame--9x16 { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }

.bleed {
  position: relative;
  overflow: hidden;
  background: var(--surface-media);
  display: flex;
  align-items: flex-end;
}
.bleed > img, .bleed > video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  z-index: var(--z-media);
}
.bleed__scrim { position: absolute; inset: 0; background: var(--scrim-bottom); z-index: var(--z-overlay); }
.bleed__body {
  position: relative; z-index: var(--z-content);
  width: 100%; max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2.5rem, 6vh, 4.5rem);
}
.bleed--hero { height: 100svh; min-height: 560px; }
.bleed--tall { height: clamp(520px, 82svh, 900px); }
.bleed--band { height: clamp(360px, 70svh, 720px); }

.video-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  border: 1px solid var(--border-inverse);
  background: rgba(56, 56, 56, .4);
  color: var(--cha-white);
  font-size: .7rem;
  display: inline-flex; align-items: center; justify-content: center;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.split--start { align-items: start; }
.split__media-last { order: 2; }
@media (max-width: 700px) { .split__media-last { order: 0; } }

/* ---- 11. THE CHA SYSTEM ------------------------------------------------ */

.system { position: relative; }
.system__rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.5rem, 2vw, 2rem);
  align-items: end;
  touch-action: pan-y;
  cursor: crosshair;
}
.system__cell {
  min-height: 44px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  opacity: .55;
  transform: scale(.92);
  transition: opacity var(--d-slower) var(--ease), transform var(--d-slower) var(--ease);
}
.system__cell[aria-checked="true"] { opacity: 1; transform: scale(1) translateY(-12px); }
.system__shot {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
}
.system__shot span {
  font-family: var(--font-mono); font-size: var(--t-label);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--cha-white); padding: var(--s-4);
}
.system__rule { display: block; height: 2px; background: var(--accent); margin: var(--s-4) 0 var(--s-3); }
.system__cell h3 { font-size: var(--t-h4); }
.system__cell p { margin: .35rem 0 0; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-secondary); }

.system__readout {
  margin-top: clamp(1.5rem, 4vh, 3rem);
  display: flex; align-items: center; gap: var(--s-4); justify-content: center;
}
.system__readout i { display: block; width: 56px; height: 2px; background: var(--accent); transition: background var(--d-slower) var(--ease); }
.system__readout p { margin: 0; font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }

/* ---- 12. CARDS & GRIDS ------------------------------------------------- */

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-6); }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--d-base) var(--ease), box-shadow var(--d-base) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__rule { height: 2px; background: var(--accent); }
.card__shot { aspect-ratio: 1 / 1; display: flex; align-items: flex-end; background-color: var(--accent); background-size: cover; background-position: center; }
.card__shot span { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--cha-white); padding: var(--s-4); }
.card__body { padding: 1.15rem 1.15rem 1.4rem; }
.card__top { display: flex; justify-content: space-between; gap: var(--s-4); align-items: baseline; }
.card__top p { margin: 0; font-size: 1.05rem; }
.card__price { font-family: var(--font-mono); font-size: .85rem; }
.card__meta { margin: .4rem 0 0; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-tertiary); }

.card--ghost {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 1.15rem;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 240px;
}

.step p.step__n { font-family: var(--font-mono); font-size: var(--t-small); color: var(--text-tertiary); margin: var(--s-5) 0 .4rem; }
.step h3 { margin-bottom: .6rem; }

.rows { border-top: 1px solid var(--border-strong); }
.rows__row { display: flex; justify-content: space-between; gap: var(--s-6); padding: .9rem 0; border-bottom: 1px solid var(--border); }
.rows__row dt, .rows__k { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin: 0; }
.rows__row dd, .rows__v { margin: 0; font-size: .9rem; text-align: right; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fact { border-top: 1px solid var(--border-strong); padding: var(--s-5) var(--s-5) var(--s-5) 0; }
.fact:not(:first-child) { padding-left: var(--s-5); }
.fact__src { margin: 0 0 .6rem; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-tertiary); }
.fact__t { margin: 0 0 .6rem; font-size: 1rem; font-weight: var(--weight-medium); }
.fact__b { margin: 0; font-size: var(--t-small); line-height: var(--lh-loose); color: var(--text-secondary); }
@media (max-width: 640px) { .fact, .fact:not(:first-child) { padding-inline: 0; } }

/* ---- 13. COMPARE TABLE ------------------------------------------------- */

.compare { overflow-x: auto; }
.compare__inner { min-width: 640px; }
.compare__row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.compare__row--head { padding: 0 0 .9rem; border-bottom: 1px solid var(--border-strong); }
.compare__row--head span { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--text-tertiary); }
.compare__row--head .is-cha { color: var(--text); }
.compare__row span { font-size: .95rem; }
.compare__k { color: var(--text-secondary); }
.compare__cha { color: var(--text); }
.compare__other { color: var(--text-tertiary); }

/* ---- 14. PRODUCT PAGE -------------------------------------------------- */

.pdp { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.pdp__gallery { display: flex; flex-direction: column; gap: var(--s-4); position: sticky; top: calc(var(--header-h) + 56px); }
.pdp__hero { aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; display: flex; align-items: flex-end; background-color: var(--accent); background-size: cover; background-position: center; }
.pdp__hero span { font-family: var(--font-mono); font-size: var(--t-small); letter-spacing: .14em; text-transform: uppercase; color: var(--cha-white); padding: var(--s-5); }
.pdp__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.pdp__thumbs button {
  aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden;
  background-size: cover; background-position: center; background-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: box-shadow var(--d-fast) var(--ease);
}
.pdp__thumbs button[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--cha-ink); }
@media (max-width: 700px) { .pdp__gallery { position: static; } }

.pdp__accent { height: 2px; width: 56px; margin-bottom: var(--s-5); background: var(--accent); transition: background var(--d-slower) var(--ease); }
.pdp__price { margin: 0 0 var(--s-6); font-family: var(--font-mono); font-size: 1.1rem; }
.opts { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: var(--s-6); }
.opts--stack { flex-direction: column; }
.buybar { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-4); }
.buybar .btn { flex: 1 1 220px; }

.collapse { overflow: hidden; transition: max-height var(--d-slow) var(--ease), opacity var(--d-slow) var(--ease), margin var(--d-slow) var(--ease); }
.collapse[data-open="false"] { max-height: 0; opacity: 0; margin-bottom: 0; }
.collapse[data-open="true"] { max-height: 260px; opacity: 1; margin-bottom: var(--s-6); }

.faq__item { border-bottom: 1px solid var(--border); }
.faq__q { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-4) 0; text-align: left; font-size: 1rem; }
.faq__q span { font-family: var(--font-mono); color: var(--text-tertiary); }
.faq__a { overflow: hidden; max-height: 0; opacity: 0; transition: max-height var(--d-slow) var(--ease), opacity var(--d-slow) var(--ease); }
.faq__item[data-open="true"] .faq__a { max-height: 320px; opacity: 1; }
.faq__a p { margin: 0 0 1.1rem; font-size: .92rem; line-height: var(--lh-loose); color: var(--text-secondary); max-width: 56ch; }

.crumb { font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-tertiary); }
.crumb a:hover { color: var(--cha-terra); }

/* ---- 15. SHOP FILTER BAR ----------------------------------------------- */

.filterbar {
  position: sticky;
  top: calc(var(--header-h) + 34px);
  z-index: 20;
  background: rgba(253, 252, 248, .94);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-block: 1px solid var(--border);
}
.filterbar__inner { max-width: var(--container); margin-inline: auto; padding: .75rem var(--gutter); display: flex; gap: .4rem; align-items: center; overflow-x: auto; }
.filterbar__count { margin-left: auto; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--text-tertiary); white-space: nowrap; padding-left: var(--s-4); }

/* ---- 16. CHECKOUT ------------------------------------------------------ */

.checkout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.checkout__summary { background: var(--surface-tinted); --ground: var(--surface-tinted); border-radius: var(--r-xl); padding: var(--s-5); position: sticky; top: calc(var(--header-h) + 56px); }
@media (max-width: 700px) { .checkout__summary { position: static; } }
.fieldgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin-bottom: var(--s-4); }
.sum-line { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .9rem; color: var(--text-secondary); }
.sum-line span:last-child { font-family: var(--font-mono); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s-4); border-top: 1px solid var(--border-strong); margin-top: var(--s-3); }
.sum-total span:first-child { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary); }
.sum-total span:last-child { font-family: var(--font-mono); font-size: 1.1rem; }
.form-error { margin: .9rem 0 0; min-height: 1.2em; font-family: var(--font-mono); font-size: var(--t-micro); color: var(--cha-terra); }

/* ---- 17. NEWSLETTER & FOOTER ------------------------------------------- */

.newsletter { text-align: center; }
.newsletter__inner { max-width: 560px; margin-inline: auto; }
.newsletter form { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }
.newsletter .form-msg { margin: var(--s-4) 0 0; min-height: 1.2em; font-family: var(--font-mono); font-size: var(--t-micro); }
.newsletter .form-msg[data-ok="true"] { color: var(--positive); }
.newsletter .form-msg[data-ok="false"] { color: var(--cha-salmon); }

.site-footer { background: var(--surface-sunken); --ground: var(--surface-sunken); padding: clamp(3rem, 7vh, 5rem) var(--gutter) var(--s-6); }
.site-footer__grid { max-width: var(--container); margin-inline: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.site-footer h2 { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 .4rem; font-weight: var(--weight-regular); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; font-size: var(--t-small); }
.site-footer a:hover { color: var(--cha-terra); }
.site-footer__legal {
  max-width: var(--container);
  margin: var(--s-7) auto 0;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3) var(--s-5);
  flex-wrap: wrap;
}
.site-footer__legal p { margin: 0; }
/* The one outbound link down here, so it gets an underline to read as one. */
.site-footer__credit a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.site-footer__credit a:hover { color: var(--cha-terra); }

/* ---- 18. MOTION SAFETY ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .system__cell { transform: none; }
  .system__cell[aria-checked="true"] { transform: none; }
}

/* hidden must win over any display we set */
[hidden] { display: none !important; }
