/*
  ILL STUDIOS — mockup design system (Phase 2)
  Ports to: assets/ill-base.css on theme_variant_a
  Tokens below port 1:1 to :root CSS vars in the Liquid theme.
  Plan: .planning/plans/2026-07-28-ill-studios-site-rebuild.md §2a
*/

:root {
  --ill-ink: #111111;
  --ill-paper: #f2efe9;
  --ill-smoke: #1a1a1a;
  --ill-mute: #6b6b66;
  --ill-accent: #b51d1d;        /* text-safe blood red */
  --ill-accent-loud: #d92323;   /* display-size uses only */
  --ill-paper-dim: #e7e3d9;
  --ill-hairline: rgba(17,17,17,.18);

  --f-display: 'Anton', 'Arial Narrow', sans-serif;
  --f-stencil: 'Big Shoulders Stencil', 'Anton', sans-serif;
  --f-body: 'Archivo Narrow', Arial, sans-serif;
  --f-mono: 'Courier Prime', 'Courier New', monospace;

  --ticker-h: 34px;
  --header-h: 58px;
  --gutter: 20px;
  --shadow-hard: 4px 4px 0 var(--ill-ink);
}

/* ---------- reset-ish ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select { font: inherit; border-radius: 0; }

html, body {
  /* PHASE 5 fix — was `overflow-x: hidden`, which silently broke `position: sticky`.
     Per spec, a non-visible overflow on one axis computes the other to `auto`, making
     html/body a SCROLL CONTAINER — and a sticky element sticks to its nearest scrolling
     ancestor, not the viewport. `.pdp__buy` (sticky, desktop >=850px) therefore never
     pinned. `clip` enforces the same "nothing pans sideways" intent WITHOUT creating a
     scroll container, so sticky works again. Mobile was unaffected either way:
     .pdp__buy is already `position: static` under 849px. */
  overflow-x: clip;
  max-width: 100vw;
}
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ill-ink);
  background-color: var(--ill-paper);
  /* static paper grain — feTurbulence data-URI, no network, NOT animated */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.07 0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:focus-visible {
  outline: 3px solid var(--ill-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ill-ink); color: var(--ill-paper);
  padding: 10px 16px; font-family: var(--f-mono); text-transform: uppercase;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- type scale ---------- */
h1, h2, h3, .display {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .96;
}
.kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.stencil { font-family: var(--f-stencil); }

/* ---------- ticker ---------- */
/* ports to: sections/header-group.json → ill-ticker.liquid (text = theme setting) */
.ticker {
  position: relative;
  height: var(--ticker-h);
  background: var(--ill-ink);
  color: var(--ill-paper);
  overflow: hidden;
  display: flex; align-items: center;
  font-family: var(--f-mono); font-size: 12.5px;
  letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
}
.ticker__track {
  display: inline-flex;
  animation: ticker 26s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__cell { padding: 0 18px; }
.ticker__sep { color: var(--ill-accent-loud); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
  .ticker__track > [aria-hidden] { display: none; }
}

/* ---------- header ---------- */
/* ports to: sections/header-group.json → ill-header.liquid
   template-aware initial state: body.tpl-index gets .header--clear until scroll;
   every other template renders solid from first paint (decided in Liquid, no JS) */
/* NOT sticky (Derrick, mockup review R1): the header scrolls away with the page.
   On index it sits transparent over the hero (absolute); everywhere else it's a normal solid bar. */
.header {
  position: static; z-index: 90;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--gutter);
  background: var(--ill-paper);
  border-bottom: 1px solid var(--ill-ink);
}
body.tpl-index .header {
  position: absolute; left: 0; right: 0;
  top: var(--ticker-h);
}
body.tpl-index .header--clear {
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
}
body.tpl-index .header--clear .header__logo img { filter: invert(1); }
.header__left, .header__right { display: flex; gap: 6px; align-items: center; }
.header__right { justify-content: flex-end; }
.header__logo img { height: 30px; width: auto; }
.iconbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
}
.iconbtn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cart-count {
  position: absolute; translate: 12px -10px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--ill-accent); color: #fff;
  font-family: var(--f-mono); font-size: 11px; line-height: 17px;
  text-align: center;
}

/* drawer nav */
.navdrawer {
  position: fixed; inset: 0 auto 0 0; z-index: 120;
  width: min(360px, 88vw);
  background: var(--ill-paper);
  border-right: 1px solid var(--ill-ink);
  transform: translateX(-102%);
  transition: transform .28s cubic-bezier(.215,.61,.355,1);
  display: flex; flex-direction: column;
  padding: 18px;
  overflow-y: auto;
}
.navdrawer.is-open { transform: none; box-shadow: 8px 0 0 rgba(17,17,17,.12); }
.navdrawer__close { align-self: flex-end; }
.navdrawer__links { list-style: none; margin-top: 8px; }
.navdrawer__links a {
  display: block;
  font-family: var(--f-display); text-transform: uppercase;
  font-size: 34px; line-height: 1.25;
  padding: 6px 4px;
  border-bottom: 1px solid var(--ill-hairline);
}
.navdrawer__links a:hover { color: var(--ill-accent); }
.navdrawer__foot {
  margin-top: auto; padding-top: 24px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ill-mute);
}
.scrim {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(17,17,17,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.scrim.is-on { opacity: 1; pointer-events: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--f-body); font-weight: 600;
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 26px;
  border: 2px solid var(--ill-ink);
  background: var(--ill-paper); color: var(--ill-ink);
  transition: transform .12s, box-shadow .12s, background .12s, color .12s;
  text-align: center;
}
.btn:hover { background: var(--ill-ink); color: var(--ill-paper);
  transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); }
.btn--ink { background: var(--ill-ink); color: var(--ill-paper); }
.btn--ink:hover { background: var(--ill-accent); border-color: var(--ill-accent); color: #fff;
  box-shadow: 4px 4px 0 var(--ill-ink); }
.btn--accent { background: var(--ill-accent); border-color: var(--ill-accent); color: #fff; }
.btn--accent:hover { background: var(--ill-ink); border-color: var(--ill-ink); color: var(--ill-paper); }
.btn--full { display: block; width: 100%; }
.btn.is-muted { opacity: .45; }

/* ---------- hero ---------- */
/* ports to: sections/ill-hero.liquid — svh-sized minus chrome, LCP eager+preload */
.hero {
  position: relative;
  height: calc(100svh - var(--ticker-h));
  min-height: 480px;
  overflow: hidden;
  background: var(--ill-smoke);
  color: #fff;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,.45), transparent 30%),
    linear-gradient(0deg, rgba(10,10,10,.72), transparent 55%);
}
.hero__content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 var(--gutter) 46px;
  max-width: 780px;
}
.hero__kicker { color: var(--ill-accent-loud); margin-bottom: 10px; }
.hero__h { font-size: clamp(44px, 8.5vw, 96px); color: #fff; }
.hero__sub { margin: 12px 0 20px; font-size: 15.5px; color: rgba(255,255,255,.82); max-width: 46ch; }
.hero__scrollcue {
  position: absolute; right: var(--gutter); bottom: 18px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
  writing-mode: vertical-rl;
}

/* ---------- section scaffolding ---------- */
.section { padding: 56px var(--gutter); }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.section__h { font-size: clamp(30px, 4.5vw, 52px); }
.section__aside { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ill-mute); }

/* ---------- category tiles ---------- */
/* ports to: sections/ill-lines.liquid (4 collection pickers + url fallbacks) */
.tiles {
  display: grid; gap: 0;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ill-ink);
}
.tile { position: relative; border-right: 1px solid var(--ill-ink); overflow: hidden; background: #fff; }
.tile:last-child { border-right: 0; }
.tile__imgwrap { aspect-ratio: 3 / 4; overflow: hidden; background: var(--ill-paper-dim); }
.tile__imgwrap img { width: 100%; height: 100%; object-fit: cover;
  transition: transform 2s cubic-bezier(.215,.61,.355,1); }
.tile:hover .tile__imgwrap img { transform: scale(1.08); }
.tile__label {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--ill-ink);
  font-family: var(--f-display); text-transform: uppercase; font-size: 19px;
  background: var(--ill-paper);
}
.tile__label .arrow { font-family: var(--f-mono); font-size: 13px; }
.tile:hover .tile__label { background: var(--ill-ink); color: var(--ill-paper); }
@media (max-width: 749px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:nth-child(2n) { border-right: 0; }
  .tile:nth-child(-n+2) { border-bottom: 1px solid var(--ill-ink); }
}

/* ---------- product cards ---------- */
.grid {
  display: grid; gap: 0;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ill-ink);
  background: var(--ill-ink);
  grid-auto-rows: min-content;
}
.grid { gap: 1px; } /* ink hairlines via bg */
.card { position: relative; background: var(--ill-paper); display: flex; flex-direction: column; }
.card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #fff; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__media img.swap { opacity: 0; transition: opacity .25s; }
.card:hover .card__media img.swap { opacity: 1; }
.card__soldout {
  position: absolute; top: 10px; left: 10px;
  background: var(--ill-ink); color: var(--ill-paper);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; padding: 4px 8px;
}
.card__qa {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: var(--ill-ink); color: var(--ill-paper);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 0; text-align: center;
  opacity: 0; translate: 0 6px; transition: opacity .18s, translate .18s;
}
.card:hover .card__qa, .card__qa:focus-visible { opacity: 1; translate: 0 0; }
.card__info { padding: 12px 12px 14px; display: flex; justify-content: space-between; gap: 10px; }
.card__title { font-family: var(--f-body); font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; }
.card__price { font-family: var(--f-mono); font-size: 13.5px; white-space: nowrap; }
.card__price .was { color: var(--ill-mute); text-decoration: line-through; margin-right: 6px; }
.card__price .sale { color: var(--ill-accent); }
@media (max-width: 749px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card__qa { display: none; } /* mobile taps go to PDP */
}
@media (hover: none) { .card__qa { display: none; } }

/* ---------- collections carousel ---------- */
/* ports to: sections/ill-collections.liquid — blocks of collection pickers, horizontal scroll-snap */
.collcar {
  display: flex; gap: 1px;
  overflow-x: auto; overflow-y: hidden; /* sideways only — no vertical drag inside the strip */
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scroll-snap-type: x proximity;
  border-block: 1px solid var(--ill-ink);
  background: var(--ill-ink);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.collcar__item { display: flex; flex-direction: column; }
.collcar__imgwrap { flex: 1; }
.collcar::-webkit-scrollbar { display: none; }
.collcar__item {
  position: relative;
  flex: 0 0 clamp(230px, 22vw, 320px);
  scroll-snap-align: start;
  background: var(--ill-paper);
}
.collcar__imgwrap { aspect-ratio: 4 / 5; overflow: hidden; background: #fff; }
.collcar__imgwrap img { width: 100%; height: 100%; object-fit: cover;
  transition: transform 2s cubic-bezier(.215,.61,.355,1); }
.collcar__item:hover .collcar__imgwrap img { transform: scale(1.08); }
.collcar__label {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--ill-ink);
  font-family: var(--f-display); text-transform: uppercase; font-size: 18px;
  background: var(--ill-paper);
}
.collcar__label .arrow { font-family: var(--f-mono); font-size: 13px; }
.collcar__item:hover .collcar__label { background: var(--ill-ink); color: var(--ill-paper); }
@media (max-width: 749px) {
  /* compact on mobile — the strip shouldn't eat a whole screen of vertical scroll */
  .collcar__item { flex-basis: 45vw; }
  .collcar__label { font-size: 14px; padding: 8px 10px; }
}

/* ---------- statement band ---------- */
/* ports to: sections/ill-statement.liquid — xerox treatment on EDITORIAL imagery only */
.statement {
  position: relative; overflow: hidden;
  background: var(--ill-smoke); color: var(--ill-paper);
  min-height: 68vh;
  display: grid; place-items: center;
  text-align: center;
  padding: 80px var(--gutter);
}
.statement__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  object-position: center 30%;
  filter: grayscale(1) contrast(1.35) brightness(.42);
}
.statement__grain { position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.statement__inner { position: relative; max-width: 900px; }
.statement__h { font-size: clamp(38px, 7vw, 84px); color: #fff; }
.statement__h .accent { color: var(--ill-accent-loud); }
.statement__link {
  display: inline-block; margin-top: 26px;
  font-family: var(--f-mono); letter-spacing: .18em; text-transform: uppercase; font-size: 13px;
  color: #fff; border-bottom: 2px solid var(--ill-accent-loud);
  padding-bottom: 4px;
}
.statement__link:hover { color: var(--ill-accent-loud); }

/* ---------- spotlight ---------- */
/* ports to: sections/ill-spotlight.liquid */
.spotlight { display: grid; grid-template-columns: 1.15fr 1fr; border-block: 1px solid var(--ill-ink); }
.spotlight__media { border-right: 1px solid var(--ill-ink); background: #fff; }
.spotlight__media img { width: 100%; height: 100%; object-fit: cover; }
.spotlight__body {
  padding: clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  background: var(--ill-paper);
}
.spotlight__h { font-size: clamp(30px, 4.2vw, 56px); }
.spotlight__text { max-width: 44ch; font-size: 15.5px; }
.spotlight__specrow {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px;
}
.spec-chip {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--ill-ink); padding: 5px 9px;
  transform: rotate(-1deg);
}
.spec-chip:nth-child(2n) { transform: rotate(.8deg); }
.spotlight__body .btn { align-self: flex-start; margin-top: 10px; }
@media (max-width: 849px) {
  .spotlight { grid-template-columns: 1fr; }
  .spotlight__media { border-right: 0; border-bottom: 1px solid var(--ill-ink); }
}

/* ---------- signup ---------- */
/* ports to: sections/ill-signup.liquid → Postscript SMS */
.signup {
  background: var(--ill-ink); color: var(--ill-paper);
  padding: 64px var(--gutter);
  text-align: center;
}
.signup__h { font-size: clamp(30px, 5vw, 54px); color: #fff; }
.signup__body { margin: 10px auto 22px; max-width: 52ch; color: rgba(242,239,233,.75); }
/* PHASE 5 fix — `flex-wrap: wrap` is load-bearing, not cosmetic. Shopify's
   {% form 'customer' %} renders the success/error <p> INSIDE the form, so it is a flex
   ITEM: without wrapping it sat beside the input and button on desktop and crushed both.
   The two message rules below give it a full-basis row of its own. (Hidden inputs are
   display:none and the label is position:absolute, so neither participates.) */
.signup__form { display: flex; flex-wrap: wrap; gap: 0; max-width: 440px; margin: 0 auto; }
.signup__ok, .signup__err {
  flex: 0 0 100%; margin-top: 12px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em;
}
.signup__ok { color: var(--ill-paper); }
.signup__err { color: #ff8a8a; } /* on the dark signup band — the ink-red accent is unreadable there */
.signup__form input {
  flex: 1; min-width: 0;
  background: transparent; border: 2px solid var(--ill-paper); border-right: 0;
  color: var(--ill-paper); padding: 13px 14px;
  font-size: 15px;
}
.signup__form input::placeholder { color: rgba(242,239,233,.5); }
.signup__form .btn { border-color: var(--ill-paper); background: var(--ill-paper); color: var(--ill-ink); }
.signup__form .btn:hover { background: var(--ill-accent); border-color: var(--ill-accent); color: #fff; transform: none; box-shadow: none; }
.signup__legal { margin-top: 14px; font-family: var(--f-mono); font-size: 10.5px; color: rgba(242,239,233,.45); letter-spacing: .06em; }

/* ---------- footer ---------- */
/* ports to: sections/footer-group.json → ill-footer.liquid; policy links via shop.*_policy */
.footer {
  background: var(--ill-smoke); color: var(--ill-paper);
  padding: 56px var(--gutter) 28px;
  border-top: 4px solid var(--ill-accent);
}
.footer__grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  max-width: 1280px; margin: 0 auto;
}
.footer__logo img { height: 40px; width: auto; filter: invert(1); }
.footer__mission { margin-top: 14px; max-width: 38ch; color: rgba(242,239,233,.72); font-size: 14.5px; }
.footer h3 { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; color: rgba(242,239,233,.55); margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; }
.footer li a { font-size: 14.5px; }
.footer li a:hover { color: var(--ill-accent-loud); }
.footer__bar {
  max-width: 1280px; margin: 44px auto 0; padding-top: 16px;
  border-top: 1px solid rgba(242,239,233,.15);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(242,239,233,.45);
}
@media (max-width: 849px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- PDP ---------- */
/* ports to: sections/main-product.liquid */
.pdp { display: grid; grid-template-columns: 1.15fr 1fr; align-items: start; }
.pdp > * { min-width: 0; } /* grid children may never propagate content width and blow the page out */
.pdp__gallery { display: flex; flex-direction: column; max-width: 100%; }
.pdp__gallery img { width: 100%; border-bottom: 1px solid var(--ill-ink); } /* zoom-in cursor removed until click-zoom ships (silent-tap rule) */
.pdp__buy {
  position: sticky; top: 12px; /* header scrolls away, so the buy box pins near the viewport top */
  padding: clamp(22px, 3.5vw, 48px);
}
.pdp__kicker { color: var(--ill-accent); margin-bottom: 8px; }
.pdp__title { font-size: clamp(34px, 4vw, 56px); }
.pdp__price { font-family: var(--f-mono); font-size: 20px; margin: 12px 0 22px; }
.sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 8px; }
.size-pill { position: relative; }
.size-pill input { position: absolute; opacity: 0; inset: 0; }
.size-pill label {
  display: block; text-align: center;
  border: 1.5px solid var(--ill-ink); padding: 12px 0;
  font-family: var(--f-mono); font-size: 14px; text-transform: uppercase;
  cursor: pointer; user-select: none;
  transition: background .12s, color .12s;
}
.size-pill input:checked + label { background: var(--ill-ink); color: var(--ill-paper); }
.size-pill input:focus-visible + label { outline: 3px solid var(--ill-accent); outline-offset: 2px; }
.size-pill.is-soldout label {
  color: var(--ill-mute); border-color: var(--ill-hairline);
  background: repeating-linear-gradient(45deg, transparent, transparent 6px, rgba(17,17,17,.05) 6px, rgba(17,17,17,.05) 7px);
  cursor: not-allowed; text-decoration: line-through;
}
.sizes__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sizes__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.sizes__guide { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ill-mute); text-decoration: underline; }
.pdp__atc { margin-bottom: 10px; padding: 18px; font-size: 15px; }
.pdp__hint { font-family: var(--f-mono); font-size: 12px; color: var(--ill-accent); min-height: 18px; margin-bottom: 18px; }

/* stamped spec block */
.specs {
  border: 1.5px solid var(--ill-ink);
  padding: 16px 18px;
  font-family: var(--f-mono);
  transform: rotate(-.5deg);
  background: var(--ill-paper);
  margin-bottom: 26px;
  position: relative;
}
.specs::after {
  content: 'ILL STUDIOS';
  position: absolute; top: 8px; right: 10px;
  font-size: 10px; letter-spacing: .2em; color: var(--ill-accent);
  border: 1px solid var(--ill-accent); padding: 2px 6px;
  transform: rotate(3deg); opacity: .75;
}
.specs h2 { font-family: var(--f-mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.specs table { border-collapse: collapse; width: 100%; font-size: 13px; }
.specs td { padding: 4px 0; vertical-align: top; }
.specs td:first-child { color: var(--ill-mute); text-transform: uppercase; letter-spacing: .08em; width: 42%; }

.acc { border-top: 1px solid var(--ill-ink); }
.acc:last-of-type { border-bottom: 1px solid var(--ill-ink); }
.acc summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 2px; cursor: pointer;
  font-family: var(--f-body); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 13.5px;
  list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-family: var(--f-mono); font-size: 16px; }
.acc[open] summary::after { content: '\2013'; }
.acc__body { padding: 0 2px 16px; font-size: 14.5px; max-width: 52ch; }

.pdp__upsell { margin-top: 28px; }
.pdp__upsell h2 { font-family: var(--f-mono); font-size: 12px; letter-spacing: .18em; margin-bottom: 12px; }
.upsell-card {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--ill-ink); padding: 10px;
}
.upsell-card img { width: 64px; height: 84px; object-fit: cover; }
.upsell-card__info { flex: 1; }
.upsell-card__title { font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.upsell-card__price { font-family: var(--f-mono); font-size: 13px; color: var(--ill-mute); }
.upsell-card .btn { padding: 10px 14px; font-size: 12px; }
/* mobile gallery nav (dots + counter) — hidden on desktop where the gallery stacks */
.pdp__galnav {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--ill-ink);
}
.pdp__galdots { display: flex; gap: 7px; }
.pdp__galdots span {
  width: 8px; height: 8px;
  border: 1px solid var(--ill-ink); background: transparent;
  transition: background .15s;
}
.pdp__galdots span.is-active { background: var(--ill-accent); border-color: var(--ill-accent); }
.pdp__galcount { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; }
.pdp__galcount .hint { color: var(--ill-mute); margin-left: 8px; }

@media (max-width: 849px) {
  .pdp { grid-template-columns: 1fr; }
  .pdp__buy { position: static; }
  .pdp__galnav { display: flex; }
  /* ONE photo at a time (Derrick R5: no next-slide peek) — full-width slides, mandatory snap.
     Mandatory is safe here because every rest position is a full slide; dots + counter carry
     the swipe affordance instead of a peek. */
  .pdp__gallery {
    flex-direction: row;
    overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
  }
  .pdp__gallery img {
    min-width: 100%; width: 100%;
    aspect-ratio: 4 / 5; height: auto; object-fit: cover;
    scroll-snap-align: center; border-bottom: 0;
  }
}

/* sticky mobile ATC (FAR-blocker pattern: full-color + self-contained picker) */
.stickyatc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: none;
  background: var(--ill-paper); border-top: 1.5px solid var(--ill-ink);
  padding: 10px var(--gutter);
  gap: 10px; align-items: center;
}
.stickyatc.is-visible { display: flex; }
.stickyatc__meta { flex: 1; min-width: 0; }
.stickyatc__title { font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stickyatc__price { font-family: var(--f-mono); font-size: 12.5px; color: var(--ill-mute); }
.stickyatc .btn { padding: 12px 18px; font-size: 13px; }
@media (min-width: 850px) { .stickyatc.is-visible { display: none; } }

/* ---------- collection ---------- */
.coll-head { padding: 34px var(--gutter) 18px; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.coll-head h1 { font-size: clamp(38px, 6vw, 72px); }
.coll-head .count { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .12em; color: var(--ill-mute); text-transform: uppercase; }
.toolbar {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 0 var(--gutter) 14px;
  font-family: var(--f-mono); font-size: 13px;
}
.toolbar select {
  border: 1.5px solid var(--ill-ink); background: var(--ill-paper);
  font-family: var(--f-mono); font-size: 13px; padding: 8px 10px;
}

/* ---------- cart drawer ---------- */
/* ports to: snippets/ill-cart-drawer.liquid + assets/ill-cart-drawer.js
   line state contract matches /cart.js: {id,key,name,size,price,qty,loading,error} */
.cartdrawer {
  position: fixed; inset: 0 0 0 auto; z-index: 120;
  width: min(430px, 94vw);
  background: var(--ill-paper);
  border-left: 1px solid var(--ill-ink);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.215,.61,.355,1);
  display: flex; flex-direction: column;
}
.cartdrawer.is-open { transform: none; }
.cartdrawer__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--ill-ink);
}
.cartdrawer__head h2 { font-size: 24px; }
.progress { padding: 14px 18px; border-bottom: 1px solid var(--ill-hairline); }
.progress__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; margin-bottom: 8px; }
.progress__label strong { color: var(--ill-accent); font-weight: 700; }
.progress__bar { height: 8px; border: 1px solid var(--ill-ink); }
.progress__fill { height: 100%; background: var(--ill-accent); width: 0%; transition: width .4s; }
.progress.is-met .progress__fill { background: var(--ill-ink); }
.cartdrawer__lines { flex: 1; overflow-y: auto; padding: 8px 18px; }
.cart-empty { padding: 40px 0; text-align: center; color: var(--ill-mute); }
.cart-empty .btn { margin-top: 16px; }
.cartline {
  display: flex; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--ill-hairline);
  transition: opacity .2s;
}
.cartline.is-loading { opacity: .45; pointer-events: none; }
.cartline.has-error { outline: 2px solid var(--ill-accent); outline-offset: 2px; }
.cartline img { width: 72px; height: 96px; object-fit: cover; border: 1px solid var(--ill-ink); }
.cartline__info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cartline__title { font-weight: 600; font-size: 13.5px; letter-spacing: .05em; text-transform: uppercase; }
.cartline__meta { font-family: var(--f-mono); font-size: 12px; color: var(--ill-mute); }
.cartline__row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.qty { display: inline-flex; border: 1.5px solid var(--ill-ink); }
.qty button { width: 32px; height: 32px; font-family: var(--f-mono); font-size: 15px; }
.qty button:hover { background: var(--ill-ink); color: var(--ill-paper); }
.qty output { width: 34px; display: grid; place-items: center; font-family: var(--f-mono); font-size: 13.5px; border-inline: 1.5px solid var(--ill-ink); }
.cartline__price { font-family: var(--f-mono); font-size: 14px; }
.cartline__remove {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ill-mute); text-decoration: underline;
  align-self: flex-start;
}
.cartline__remove:hover { color: var(--ill-accent); }
.cartdrawer__upsell { padding: 12px 18px; border-top: 1px solid var(--ill-hairline); }
.cartdrawer__upsell h3 { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }
.cartdrawer__foot { padding: 14px 18px 18px; border-top: 1px solid var(--ill-ink); }
.cartdrawer__subtotal {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 15px; margin-bottom: 12px;
}
.cartdrawer__note { font-family: var(--f-mono); font-size: 11px; color: var(--ill-mute); margin-top: 10px; text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 200;
  translate: -50% 0;
  background: var(--ill-ink); color: var(--ill-paper);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em;
  padding: 12px 18px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  max-width: 90vw; text-align: center;
}
.toast.is-on { opacity: 1; }

/* ---------- mobile ---------- */
@media (max-width: 749px) {
  :root { --gutter: 14px; }
  .section { padding: 40px var(--gutter); }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .signup__form { flex-direction: column; }
  .signup__form input { border-right: 2px solid var(--ill-paper); border-bottom: 0; }
  .sizes { grid-template-columns: repeat(5, 1fr); gap: 6px; }
}

/* ================= Phase 3 theme additions (beyond the mockup) ================= */

/* threshold celebration (Derrick 2026-07-28: fill the bar -> confetti, make them feel good) */
.progress { position: relative; overflow: visible; }
.confetti-bit {
  position: absolute; top: 55%;
  width: 7px; height: 11px;
  pointer-events: none; z-index: 5;
}
.progress__label.is-pop strong { display: inline-block; animation: ill-pop .55s cubic-bezier(.215,.61,.355,1); }
@keyframes ill-pop { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
.cart-empty__offer { margin-top: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--ill-accent); }
.upsell-card { position: relative; } /* anchors the inline size chooser */

/* pagination */
.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 6px var(--gutter) 44px; font-family: var(--f-mono); font-size: 13px; }
.pagination a, .pagination span { border: 1.5px solid var(--ill-ink); padding: 8px 12px; }
.pagination span.current { background: var(--ill-ink); color: var(--ill-paper); }
.pagination a:hover { background: var(--ill-ink); color: var(--ill-paper); }
.pagination span.deco { border: 0; padding: 0 2px; color: var(--ill-mute); }

/* search */
.search-head { padding: 40px var(--gutter) 8px; text-align: center; }
.search-head h1 { font-size: clamp(34px, 6vw, 64px); }
.search-form { display: flex; max-width: 520px; margin: 18px auto 26px; padding: 0 var(--gutter); }
.search-form input { flex: 1; min-width: 0; border: 2px solid var(--ill-ink); border-right: 0; background: var(--ill-paper); padding: 13px 14px; font-size: 15px; }
.search-form .btn { border-color: var(--ill-ink); }
.search-zero { padding: 30px var(--gutter) 60px; text-align: center; color: var(--ill-mute); }

/* generic page content */
.page-body { padding: 44px var(--gutter) 64px; max-width: 760px; margin: 0 auto; }
.page-body h1 { font-size: clamp(36px, 6vw, 68px); margin-bottom: 22px; }
.page-body p { margin-bottom: 14px; }
.page-body h2 { margin: 26px 0 10px; font-size: clamp(24px, 3.4vw, 36px); }
.page-body ul, .page-body ol { margin: 0 0 14px 20px; }

/* 404 */
.fourohfour { padding: 90px var(--gutter) 60px; text-align: center; }
.fourohfour h1 { font-size: clamp(48px, 10vw, 120px); }
.fourohfour p { font-family: var(--f-mono); color: var(--ill-mute); margin: 14px 0 26px; }

/* cart page (fallback surface; the drawer is primary) */
.cartpage { padding: 40px var(--gutter) 70px; max-width: 860px; margin: 0 auto; }
.cartpage h1 { font-size: clamp(38px, 6vw, 72px); margin-bottom: 24px; }
.cartpage table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cartpage td, .cartpage th { border-bottom: 1px solid var(--ill-hairline); padding: 12px 8px; text-align: left; vertical-align: middle; }
.cartpage img { width: 64px; height: 84px; object-fit: cover; border: 1px solid var(--ill-ink); }
.cartpage .qtyinput { width: 62px; border: 1.5px solid var(--ill-ink); padding: 8px; font-family: var(--f-mono); background: var(--ill-paper); }
.cartpage__foot { display: flex; justify-content: flex-end; gap: 18px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.cartpage__subtotal { font-family: var(--f-mono); font-size: 17px; }

/* ============ customer-QA round (2026-07-28) ============ */

/* drawer-upsell size chooser — visible on every device (never .card__qa there) */
.upsell-card { flex-wrap: wrap; }
.upsell-sizes {
  flex-basis: 100%;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.upsell-sizes button {
  border: 1.5px solid var(--ill-ink);
  background: var(--ill-paper);
  font-family: var(--f-mono); font-size: 12.5px; text-transform: uppercase;
  min-width: 44px; min-height: 44px;
}
.upsell-sizes button:hover { background: var(--ill-ink); color: var(--ill-paper); }
.upsell-sizes button:disabled { opacity: .4; text-decoration: line-through; }

/* touch devices: neutralize sticky :hover (iOS keeps :hover applied after a tap —
   buttons were getting stuck ink-black with no state change behind them) */
@media (hover: none) {
  .btn:hover { background: var(--ill-paper); color: var(--ill-ink); transform: none; box-shadow: none; }
  .btn--ink:hover { background: var(--ill-ink); border-color: var(--ill-ink); color: var(--ill-paper); box-shadow: none; }
  .btn--accent:hover { background: var(--ill-accent); border-color: var(--ill-accent); color: #fff; }
  .signup__form .btn:hover { background: var(--ill-paper); border-color: var(--ill-paper); color: var(--ill-ink); }
  .upsell-sizes button:hover { background: var(--ill-paper); color: inherit; }
  .qty button:hover { background: transparent; color: inherit; }
  .pagination a:hover { background: transparent; color: inherit; }
}

/* defensive: product videos (media_tag) get the same gallery geometry as images */
.pdp__gallery video, .pdp__gallery iframe { width: 100%; display: block; border-bottom: 1px solid var(--ill-ink); }
@media (max-width: 849px) {
  .pdp__gallery video, .pdp__gallery iframe {
    min-width: 100%; width: 100%;
    aspect-ratio: 4 / 5; height: auto; object-fit: cover;
    scroll-snap-align: center; border-bottom: 0;
  }
}

/* free-gift line (luv pattern): locked row, accent edge, strikethrough -> FREE */
.cartline--gift { border-left: 3px solid var(--ill-accent); padding-left: 10px; background: rgba(181, 29, 29, .04); }
.giftbadge {
  display: inline-block; align-self: flex-start;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: var(--ill-accent);
  padding: 2px 6px; margin-bottom: 2px;
}
.cartline__price s { color: var(--ill-mute); margin-right: 6px; }
.cartline__price .free { color: var(--ill-accent); font-weight: 700; }

/* ---------- T2: variant picker (Phase 4) ----------
   Progressive enhancement in the SAFE direction. The native <select> is the default
   visible control and the only name="id" field; pills are hidden until the JS
   controller initialises and sets `variants-ready` on the scope. A script that 404s
   or throws therefore leaves a WORKING native picker rather than an unbuyable
   product (Codex review r1 killed the inverse `.js`-class approach). */
.variant-native { margin: 0 0 18px; }
.variant-native__label {
  display: block; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ill-mute);
  margin-bottom: 6px;
}
.variant-native__select {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font-family: var(--f-mono); font-size: 14px; text-transform: uppercase;
  color: var(--ill-ink); background: var(--ill-paper);
  border: 1px solid var(--ill-ink); border-radius: 0; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ill-ink) 50%),
                    linear-gradient(135deg, var(--ill-ink) 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.variant-native__select:focus-visible { outline: 3px solid var(--ill-accent); outline-offset: 2px; }
.variant-native__select option[disabled] { color: var(--ill-mute); }
.variants-ready .variant-native { display: none; }

.opt-rows[hidden] { display: none; }
.opt-rows .sizes { margin-bottom: 14px; }

/* size guide — json table (image branch keeps its own inline geometry) */
.sizeguide__table { padding: 14px; overflow-x: auto; }
.sizeguide__table table { width: 100%; border-collapse: collapse; font-family: var(--f-mono); font-size: 12.5px; }
.sizeguide__table th, .sizeguide__table td {
  border: 1px solid var(--ill-hairline); padding: 8px 10px; text-align: left; white-space: nowrap;
}
.sizeguide__table th {
  text-transform: uppercase; letter-spacing: .12em; font-size: 11px;
  background: var(--ill-paper-dim);
}
.sizeguide__unit {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  color: var(--ill-mute); margin: 10px 0 0; text-transform: uppercase;
}

/* cart page: locked gift row + busy state */
.cartpage tr[data-ill-gift] .qtyinput { display: none; }
.cartpage .free { color: var(--ill-accent); font-weight: 700; }
.cartline.is-loading { opacity: .55; }
.cartline.is-loading button { pointer-events: none; }
