/* linae concept · tokens from the live brand, type and spacing from landing-page-design B1-B3 */
:root {
  --r-2xs: 2px; --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 9999px;
  --shadow-1: 0 1px 2px rgb(27 26 23 / 0.04), 0 8px 24px -12px rgb(27 26 23 / 0.18);
  --shadow-2: 0 1px 2px rgb(27 26 23 / 0.04), 0 24px 48px -24px rgb(27 26 23 / 0.22);
  --shadow-3: 0 32px 64px -24px rgb(27 26 23 / 0.4);
  --shadow-photo: 0 18px 30px -18px rgb(27 26 23 / 0.35), 0 2px 6px rgb(27 26 23 / 0.06);
  --bone: #f7f5f0;
  --bone-dim: #eeeae2;
  --paper: #fbfaf7;
  --ink: #1b1a17;
  --ink-soft: #5b574e;
  --clay: #c2754f;
  --clay-deep: #9c5634;           /* clay darkened for focus rings and the meter: 5.0:1 on bone */
  --rule: rgb(27 26 23 / 0.12);
  --rule-strong: rgb(27 26 23 / 0.24);

  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.32, 0.72, 0, 1);
  --sans: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
  --wrap: 1240px;
  --gutter: var(--s-400);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s-900); }
body {
  margin: 0; background: var(--bone); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 24px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, .heading-1, .heading-2 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--clay-deep); outline-offset: 3px; border-radius: var(--r-xs); }

[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: var(--s-200); top: var(--s-200); z-index: 100; padding: var(--s-75) var(--s-100); background: var(--ink); color: var(--bone); border-radius: var(--r-sm); transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.muted { color: var(--ink-soft); }
.center { text-align: center; }

/* ── Text styles (B1) ── */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.035em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.03em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.025em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.02em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-5 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }
.eyebrow { color: var(--ink-soft); margin-bottom: var(--s-200); }

/* ── Wordmark: part of the logo lockup, the one italic on the page ── */
.brand { display: inline-flex; align-items: center; gap: var(--s-75); }
.brand-mark { width: 10px; height: 28px; color: var(--ink); transition: color 300ms var(--ease); }
.brand:hover .brand-mark { color: var(--clay); }
.wordmark { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 500; font-size: 24px; line-height: 24px; letter-spacing: -0.01em; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75); min-height: 44px; padding: var(--s-75) var(--s-300); border-radius: var(--r-full); transition: background-color 300ms var(--ease), color 300ms var(--ease), transform 140ms var(--ease-press), border-color 300ms var(--ease); white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-ghost { border: 1px solid var(--rule-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #34322d; }
  .btn-ghost:hover { border-color: var(--ink); background: var(--paper); }
}
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.link { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; transition: text-decoration-color 300ms var(--ease); }
.link:hover { text-decoration-color: currentColor; }

/* ── Nav (B7: floating pill, glass because it floats over content) ── */
.nav { position: fixed; inset: var(--s-200) 0 auto; z-index: 40; display: flex; justify-content: center; pointer-events: none; padding-inline: var(--s-200); }
.nav-bar { pointer-events: auto; display: flex; align-items: center; gap: var(--s-400); padding: var(--s-75) var(--s-75) var(--s-75) var(--s-300); border-radius: var(--r-full); background: rgb(247 245 240 / 0.72); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border: 1px solid var(--rule); box-shadow: var(--shadow-1); }
.nav-links { display: flex; gap: var(--s-300); }
.nav-links a { position: relative; color: var(--ink-soft); padding-block: var(--s-75); transition: color 300ms var(--ease); }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; clip-path: inset(0 100% 0 0); transition: clip-path 300ms var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { clip-path: inset(0); }
.bag-btn { display: inline-flex; align-items: center; gap: var(--s-75); min-height: 40px; padding: var(--s-75) var(--s-100) var(--s-75) var(--s-200); border-radius: var(--r-full); background: var(--ink); color: var(--bone); transition: transform 140ms var(--ease-press), background-color 300ms var(--ease); }
.bag-btn:active { transform: scale(0.96); }
.bag-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 var(--s-75); border-radius: var(--r-full); background: var(--bone); color: var(--ink); font-size: 12px; line-height: 16px; }
.bag-count.bump { animation: bump 300ms var(--ease); }
@keyframes bump { 30% { transform: scale(1.35); background: var(--clay); color: var(--bone); } }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--r-full); place-items: center; }
.menu-lines { position: relative; width: 18px; height: 12px; }
.menu-lines i { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); border-radius: var(--r-2xs); transition: transform 300ms var(--ease); }
.menu-lines i:first-child { top: 2px; } .menu-lines i:last-child { bottom: 2px; }
.menu-btn[aria-expanded="true"] .menu-lines i:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-lines i:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.menu { pointer-events: auto; position: fixed; inset: 0; z-index: -1; padding: 112px var(--s-300) var(--s-400); background: rgb(247 245 240 / 0.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; flex-direction: column; gap: var(--s-200); }
.menu[hidden] { display: none; }
.menu a { opacity: 0; transform: translateY(24px); }
.menu.open a { animation: menu-in 240ms var(--ease) forwards; }

@keyframes menu-in { to { opacity: 1; transform: none; } }

/* ── Hero ── */
.hero { position: relative; padding-top: 104px; isolation: isolate; overflow: clip; }
.hero-mark { position: absolute; right: max(1vw, calc(50% - 700px)); opacity: 0.7; top: 64px; height: min(70vh, 640px); width: auto; aspect-ratio: 376 / 1106; color: var(--bone-dim); z-index: -1; will-change: transform; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-600); align-items: end; }
.hero-title { max-width: 680px; }
.hero-title .line { display: block; }
.drawn { position: relative; display: inline-block; }
.drawn-stroke { position: absolute; left: -2%; right: -2%; bottom: -10px; width: 104%; height: 18px; overflow: visible; }
.drawn-stroke path { fill: none; stroke: var(--clay); stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.hero-side { max-width: 440px; padding-bottom: var(--s-50); }
.lede { color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-100); margin-top: var(--s-300); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); margin-top: var(--s-300); color: var(--ink-soft); }
.facts li { display: inline-flex; align-items: center; gap: var(--s-75); }
.facts li::before { content: ""; width: 12px; height: 1px; background: currentColor; }

/* ── The line (stage) ── */
.stage { position: relative; margin-top: var(--s-300); padding-top: var(--s-700); display: flex; flex-direction: column; }
.stage-gl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; opacity: 0; transition: opacity 200ms var(--ease); }
.gl .stage-gl { opacity: 1; }
.cord { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.cord path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.gl .cord { visibility: hidden; }
.pieces { max-width: 1040px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-600); position: relative; }
.piece { position: relative; display: flex; flex-direction: column; }
.hang { position: relative; display: block; width: 100%; aspect-ratio: 1; perspective: 1400px; border-radius: var(--r-xs); touch-action: pan-y; cursor: grab; z-index: 3; }
.hang:active { cursor: grabbing; }
.flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 700ms var(--ease); }
.hang[aria-pressed="true"] .flip { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-2xs); overflow: hidden; box-shadow: var(--shadow-photo); background: #e6e5e3; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face-back { transform: rotateY(180deg); }
.gl .face { visibility: hidden; transition: visibility 0s 200ms; }
.pin { position: absolute; top: -10px; width: 8px; height: 22px; border-radius: var(--r-2xs); background: var(--clay); box-shadow: inset -2px 0 0 rgb(27 26 23 / 0.14); z-index: 4; }
.pin.l { left: 18%; } .pin.r { right: 18%; }
.gl .pin { display: none; }
.face-label { position: absolute; left: var(--s-100); bottom: var(--s-100); z-index: 4; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); background: rgb(247 245 240 / 0.85); color: var(--ink); pointer-events: none; transition: opacity 300ms var(--ease); }

.info { position: relative; z-index: 3; padding-top: var(--s-300); display: grid; gap: var(--s-200); }
.info-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-200); }
.info-num { color: var(--ink-soft); }
.price { white-space: nowrap; }
.sizes { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-50); min-width: 0; }
.sizes legend { padding: 0; margin-bottom: var(--s-75); width: 100%; display: flex; justify-content: space-between; color: var(--ink-soft); }
.sizes legend button { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: grid; place-items: center; min-width: 40px; height: 36px; padding: 0 var(--s-75); border-radius: var(--r-full); border: 1px solid var(--rule-strong); font-family: var(--mono); font-size: 12px; line-height: 16px; transition: background-color 250ms var(--ease), color 250ms var(--ease), border-color 250ms var(--ease), transform 140ms var(--ease-press); }
.chip input:checked + span { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--clay-deep); outline-offset: 2px; }
.chip input:active + span { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .chip:hover span { border-color: var(--ink); } }
.add-row { display: flex; gap: var(--s-75); }
.add-row .btn-primary { flex: 1; }
.turn-btn { min-width: 44px; padding-inline: var(--s-200); }
.turn-btn svg { flex: none; width: 16px; height: 16px; fill: currentColor; transition: transform 500ms var(--ease); }
.hang[aria-pressed="true"] ~ .info .turn-btn svg, .turn-btn[aria-pressed="true"] svg { transform: rotateY(180deg); }
.need-size { color: var(--clay-deep); }
.need-size:empty { display: none; }

.stage-hint { max-width: 1040px; margin-top: var(--s-400); color: var(--ink-soft); display: flex; align-items: center; gap: var(--s-75); }
.stage-hint::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.hint-touch { display: none; }
@media (hover: none) { .hint-fine { display: none; } .hint-touch { display: inline; } }

/* ── Tagline (B11) ── */
.tagline { padding: 192px 0 160px; }
.tagline-text { max-width: 900px; }
.tagline-text .w { color: rgb(27 26 23 / 0.28); transition: color 600ms var(--ease); }
.tagline-text .w.on { color: var(--ink); }

/* ── Story ── */
.story { padding: var(--s-900) 0; background: var(--paper); border-block: 1px solid var(--rule); }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-900); }
.story-mark-col { min-height: 140vh; }
.story-mark { position: sticky; top: 12vh; height: 76vh; display: grid; place-items: center; }
.story-mark svg { grid-area: 1 / 1; height: 100%; width: auto; aspect-ratio: 376 / 1106; }
.story-mark-ghost { color: var(--bone-dim); }
.story-mark-ink { color: var(--ink); clip-path: inset(0 0 100% 0); }
.story-copy { align-self: center; display: grid; gap: var(--s-300); max-width: 520px; padding-block: 24vh; }
.story-copy .body-3 { color: var(--ink-soft); }
.spec { display: grid; gap: 0; margin-top: var(--s-200); border-top: 1px solid var(--rule); }
.spec div { display: grid; grid-template-columns: 96px 1fr; gap: var(--s-200); padding: var(--s-100) 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.spec dt { color: var(--ink-soft); font-family: var(--sans); }
.spec dd { font-family: var(--sans); }

/* ── The other side (scroll stack) ── */
.backs { padding: 160px 0 var(--s-900); }
.backs-head { margin-bottom: var(--s-700); }
.backs-head h2 { max-width: 640px; }
.stack { display: grid; gap: var(--s-400); }
.card { position: sticky; top: calc(112px + var(--i) * 20px); transform-origin: 50% 0; will-change: transform; }
.card-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; border-radius: var(--r-xl); overflow: hidden; background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--shadow-2); }
.card.dark .card-inner { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.card figure { position: relative; background: #e6e5e3; aspect-ratio: 4 / 3; overflow: hidden; }
.card figure img { width: 100%; height: 100%; object-fit: cover; }
.card-text { padding: var(--s-600); display: flex; flex-direction: column; gap: var(--s-200); justify-content: space-between; }
.card-text p { color: var(--ink-soft); }
.card.dark .card-text p { color: rgb(247 245 240 / 0.74); }
.card-num { color: var(--ink-soft) !important; }
.card.dark .card-num { color: rgb(247 245 240 / 0.6) !important; }
.quote { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink) !important; }
.card.dark .quote { color: var(--bone) !important; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); padding-top: var(--s-200); border-top: 1px solid var(--rule); }
.card.dark .card-foot { border-color: rgb(247 245 240 / 0.16); }
.card.dark .btn-ghost { border-color: rgb(247 245 240 / 0.3); }
@media (hover: hover) and (pointer: fine) { .card.dark .btn-ghost:hover { background: rgb(247 245 240 / 0.08); border-color: var(--bone); } }

/* ── Sizing ── */
.sizing { padding: 160px 0; }
.sizing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s-900); align-items: start; }
.sizing-copy { display: grid; gap: var(--s-300); position: sticky; top: 120px; }
.steps { counter-reset: s; display: grid; gap: var(--s-100); }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; align-items: baseline; }
.steps li::before { content: counter(s); font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--ink-soft); }
.ruler-card { border-radius: var(--r-xl); background: var(--paper); border: 1px solid var(--rule); padding: var(--s-500); display: grid; gap: var(--s-300); }
.ruler-readout { display: grid; gap: var(--s-50); }
.ruler-size { font-size: 96px; line-height: 96px; font-weight: 500; letter-spacing: -0.04em; }
.ruler { position: relative; height: 112px; }
.ruler-svg { width: 100%; height: 100%; overflow: visible; }
.ruler-svg .tick { stroke: var(--ink); stroke-width: 1; }
.ruler-svg .tick.minor { stroke: var(--rule-strong); }
.ruler-svg .num { font-family: var(--mono); font-size: 11px; fill: var(--ink-soft); }
.ruler-svg .base { stroke: var(--ink); stroke-width: 1.5; }
.ruler-svg .sz { font-family: var(--mono); font-size: 12px; fill: var(--ink-soft); transition: fill 250ms var(--ease); }
.ruler-svg .sz-dot { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.5; transition: fill 250ms var(--ease), stroke 250ms var(--ease); }
.ruler-svg .on .sz { fill: var(--ink); font-weight: 500; }
.ruler-svg .on .sz-dot { fill: var(--ink); stroke: var(--ink); }
.ruler-svg .needle { stroke: var(--clay); stroke-width: 2; }
.ruler-svg .needle-head { fill: var(--clay); }
.ruler-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ruler:has(.ruler-input:focus-visible) { outline: 2px solid var(--clay-deep); outline-offset: 6px; border-radius: var(--r-sm); }
.size-table { width: 100%; border-collapse: collapse; }
.size-table th { text-align: left; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.12em; padding: var(--s-75) 0; border-bottom: 1px solid var(--rule-strong); }
.size-table td { padding: var(--s-75) 0; border-bottom: 1px solid var(--rule); font-size: 14px; line-height: 20px; transition: color 250ms var(--ease); color: var(--ink-soft); }
.size-table tr.on td { color: var(--ink); font-weight: 500; }

/* ── FAQ ── */
.faq { padding: var(--s-900) 0 160px; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s-900); }
.faq-list { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: var(--s-300) 0; display: flex; justify-content: space-between; align-items: center; gap: var(--s-200); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; background: linear-gradient(currentColor 0 0) center / 12px 1.5px no-repeat, linear-gradient(currentColor 0 0) center / 1.5px 12px no-repeat; transition: transform 300ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: var(--s-300); max-width: 560px; }
.faq details[open] p { animation: faq-in 250ms var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-8px); } }

/* ── Close ── */
.close { padding: 160px 0; border-top: 1px solid var(--rule); background: var(--paper); }
.close-inner { display: grid; justify-items: center; text-align: center; gap: var(--s-400); }
.close-mark { width: 24px; height: 72px; color: var(--clay); }

/* ── Footer ── */
.footer { padding: var(--s-700) 0 var(--s-600); border-top: 1px solid var(--rule); }
.footer-grid { display: grid; grid-template-columns: auto 1fr; gap: var(--s-300) var(--s-600); align-items: center; }
.footer-links { display: flex; gap: var(--s-300); justify-content: flex-end; flex-wrap: wrap; }
.footer-note { grid-column: 1 / -1; max-width: 640px; }

/* ── Reveal (B7) ── */
[data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
[data-reveal].in, [data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ── Drawer ── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgb(27 26 23 / 0.32); opacity: 0; transition: opacity 400ms var(--ease); }
.scrim.on { opacity: 1; }
.drawer { position: fixed; z-index: 70; top: var(--s-200); right: var(--s-200); bottom: var(--s-200); width: min(440px, calc(100vw - 32px)); background: var(--bone); border-radius: var(--r-xl); border: 1px solid var(--rule); box-shadow: var(--shadow-3); display: flex; flex-direction: column; overflow: hidden; transform: translateX(calc(100% + 32px)); transition: transform 320ms var(--ease); }
.drawer.on { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s-300) var(--s-300) var(--s-200); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-full); display: grid; place-items: center; transition: background-color 250ms var(--ease), transform 140ms var(--ease-press); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn:hover { background: var(--bone-dim); }
.icon-btn:active { transform: scale(0.94); }
.drawer-view { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--s-300) var(--s-300); overflow-y: auto; }
.drawer-view[hidden] { display: none; }
.meter { padding: var(--s-200); border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--rule); display: grid; gap: var(--s-75); }
.meter-line { width: 100%; height: 12px; overflow: visible; }
.meter-track { stroke: var(--rule-strong); stroke-width: 1.5; fill: none; stroke-dasharray: 2 4; }
.meter-fill { stroke: var(--clay-deep); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 600ms var(--ease); }
.meter.full .meter-fill { stroke: var(--ink); }
.bag-items { display: grid; gap: 0; margin-top: var(--s-200); }
.bag-item { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--s-200); padding: var(--s-200) 0; border-bottom: 1px solid var(--rule); align-items: center; animation: item-in 250ms var(--ease); }
@keyframes item-in { from { opacity: 0; transform: translateY(8px); } }
.bag-item img { width: 72px; height: 72px; border-radius: var(--r-sm); object-fit: cover; background: #e6e5e3; }
.bag-item .meta { display: grid; gap: var(--s-25); }
.bag-item .meta p:not(:first-child) { color: var(--ink-soft); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--rule-strong); border-radius: var(--r-full); height: 32px; margin-top: var(--s-75); width: max-content; }
.qty button { width: 32px; height: 30px; display: grid; place-items: center; border-radius: var(--r-full); }
.qty button:hover { background: var(--bone-dim); }
.qty span { min-width: 24px; text-align: center; font-family: var(--mono); font-size: 12px; }
.remove { color: var(--ink-soft); font-size: 12px; line-height: 16px; text-decoration: underline; text-underline-offset: 3px; align-self: start; padding: var(--s-50); }
.remove:hover { color: var(--ink); }
.bag-empty { display: grid; justify-items: center; text-align: center; gap: var(--s-100); padding: var(--s-700) var(--s-200); }
.empty-mark { width: 16px; height: 48px; color: var(--rule-strong); margin-bottom: var(--s-100); }
.bag-empty .btn { margin-top: var(--s-200); }
.totals { margin-top: auto; padding-top: var(--s-300); display: grid; gap: var(--s-200); }
.totals dl { display: grid; gap: var(--s-75); }
.totals dl div { display: flex; justify-content: space-between; }
.totals dt { font-family: var(--sans); color: var(--ink-soft); }
.totals .total { padding-top: var(--s-100); border-top: 1px solid var(--rule); }
.totals .total dt { color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--ink-soft); margin-bottom: var(--s-300); width: max-content; }
.back-link svg { width: 16px; height: 16px; fill: currentColor; }
.back-link:hover { color: var(--ink); }
.checkout { gap: var(--s-200); }
.field { display: grid; gap: var(--s-75); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-100); }
.field input, .field select, .prefixed { width: 100%; min-height: 44px; padding: var(--s-75) var(--s-100); border: 1px solid var(--rule-strong); border-radius: var(--r-md); background: var(--paper); font-size: 16px; line-height: 24px; transition: border-color 250ms var(--ease); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%235b574e' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: var(--s-500); }
.prefixed { display: flex; align-items: center; gap: var(--s-75); padding-block: 0; }
.prefixed span { color: var(--ink-soft); }
.prefixed input { border: 0; padding: 0; min-height: 42px; background: transparent; outline: none; }
.field input:focus, .field select:focus, .prefixed:focus-within { border-color: var(--ink); outline: 3px solid rgb(27 26 23 / 0.08); outline-offset: 0; }
.field.bad input, .field.bad select, .field.bad .prefixed { border-color: var(--clay-deep); }
.field .err, .checkout [data-pay-err] { color: var(--clay-deep); }
.summary-mini { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s-200) 0; border-top: 1px solid var(--rule); margin-top: var(--s-75); }
.summary-mini span:first-child { font-family: var(--sans); color: var(--ink-soft); }
.done { justify-content: center; align-items: center; text-align: center; gap: var(--s-200); }
.done-mark { width: 20px; height: 60px; color: var(--clay); }

/* ── Toast ── */
.toast { position: fixed; z-index: 50; left: 50%; bottom: var(--s-300); display: flex; align-items: center; gap: var(--s-200); padding: var(--s-75) var(--s-75) var(--s-75) var(--s-300); border-radius: var(--r-full); background: var(--ink); color: var(--bone); box-shadow: var(--shadow-3); transform: translate(-50%, 24px); opacity: 0; transition: transform 300ms var(--ease), opacity 250ms var(--ease); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast[hidden] { display: none; }
.toast-btn { padding: var(--s-75) var(--s-200); border-radius: var(--r-full); background: var(--bone); color: var(--ink); min-height: 36px; }

/* ── 404 ── */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--s-300); }
.lost-inner { display: grid; gap: var(--s-300); justify-items: center; max-width: 520px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-300); }
  .pieces { gap: var(--s-400); }
  .story-grid, .sizing-grid, .faq-grid { gap: var(--s-600); }
  .card-text { padding: var(--s-400); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav-bar { gap: var(--s-75); width: 100%; padding-left: var(--s-200); }
  .bag-btn { margin-left: auto; }
}
@media (max-width: 767px) {
  :root { --gutter: var(--s-200); }
  .hero { padding-top: 104px; }
  .heading-1 { font-size: 48px; line-height: 48px; }
  .heading-2 { font-size: 36px; line-height: 40px; letter-spacing: -0.025em; }
  .hero-mark { right: 0; top: 72px; height: 56vh; }
  .stage { padding-top: var(--s-600); margin-top: var(--s-500); }
  .pieces { grid-template-columns: 1fr; gap: var(--s-800); }
  .pieces { padding-left: calc(var(--gutter) + var(--s-200)); }
  .pieces::before { content: ""; position: absolute; left: calc(var(--gutter) / 2); top: -24px; bottom: 0; width: 1.5px; background: var(--ink); }
  .hang::before { content: ""; position: absolute; left: calc(var(--gutter) / -2 - var(--s-200)); right: 18%; top: 0; height: 1.5px; background: var(--ink); z-index: 4; }
  .hang::before { right: 0; }
  .pieces::after { content: ""; position: absolute; left: calc(var(--gutter) / 2 - 4px); bottom: -8px; width: 9.5px; height: 9.5px; border-radius: 50%; background: var(--ink); }
  .stage-hint { order: -1; margin: 0 0 var(--s-300); }
  .tagline { padding: 128px 0 112px; }
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-mark-col { min-height: 0; order: 2; }
  .story-mark { position: relative; top: 0; height: 320px; margin-top: var(--s-400); }
  .story-copy { padding-block: 0; }
  .card { top: calc(88px + var(--i) * 12px); }
  .card-inner { grid-template-columns: 1fr; }
  .card figure { aspect-ratio: 4 / 3; }
  .card-text { padding: var(--s-300); }
  .sizing { padding: 112px 0; }
  .sizing-grid, .faq-grid { grid-template-columns: 1fr; }
  .sizing-copy { position: static; }
  .ruler-card { padding: var(--s-300); }
  .ruler-size { font-size: 72px; line-height: 72px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .drawer { top: auto; left: var(--s-75); right: var(--s-75); bottom: var(--s-75); width: auto; max-height: 88svh; transform: translateY(calc(100% + 16px)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  [data-reveal] { transform: none; transition: opacity 300ms linear; }
  .flip, .drawer, .toast { transition-duration: 1ms; }
  .tagline-text .w { color: var(--ink); transition: none; }
  .story-mark-ink { clip-path: none; }
  .story-mark-col { min-height: 0; }
  .story { padding-block: var(--s-600); }
  .story-copy { padding-block: 0; }
  .story-mark { position: relative; top: 0; }
  .card { position: relative; top: 0; }
}
