/* HALFLIGHT sample store. Pixel caps on warm paper, a fixed left rail, square corners. */
@font-face { font-family: 'HL Pixel'; src: url(../fonts/halflight-pixel.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'HL Mono'; src: url(../fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --paper: #F4EFE6;
  --ink: #1F1E1C;
  --char: #2A2927;
  --cream: #F4EFE6;
  --line: #D8D0C3;
  --mute: #E7E0D4;
  --chip: #EAE3D7;
  --soft: #8C867C;
  --amber: #C8873A;
  --red: #D4433A;
  --scrim: rgba(24, 22, 20, .45);
  --side: 128px;
  --px: 'HL Pixel', ui-monospace, monospace;
  --mono: 'HL Mono', ui-monospace, monospace;
  --fp: 1px;                       /* one font pixel; index.html snaps it to whole device pixels */
  --s: calc(8 * var(--fp));        /* everything small: nav, labels, prices, copy */
  --m: calc(16 * var(--fp));       /* titles */
  --l: calc(24 * var(--fp));       /* big values */
  --xl: calc(32 * var(--fp));      /* the result letter */
  --ls: var(--fp);                 /* one-pixel tracking */
  --out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
[data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: var(--s)/1.6 var(--px); letter-spacing: var(--ls); text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed; font-kerning: none; font-variant-ligatures: none; /* pixel face: no kerning or ligatures to shape */
  scrollbar-width: thin; scrollbar-color: #B9B1A4 transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono { font-family: var(--mono); letter-spacing: 0; text-transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; display: inline-flex; align-items: center; min-height: 40px; background: var(--ink); color: var(--cream); padding: 0 14px; }
.skip:focus { top: 8px; }
.px-icon { fill: currentColor; flex: none; }
.u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.btn-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.btn-link:hover { text-decoration-thickness: 2px; }

/* ---------- frame + rail ---------- */
#frame { min-height: 100vh; }
main { margin-left: var(--side); min-height: 100vh; }
#main:focus, #main:focus-visible { outline: none; }
.is-splash main { margin-left: 0; }
.is-splash .side, .is-splash .topbar { display: none; }

.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 10;
  display: flex; flex-direction: column; padding: 18px 0 18px 22px;
}
.side-icons { display: flex; gap: 12px; align-items: center; }
.ico-btn { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; }
.ico-btn:hover .px-icon { transform: translateY(-1px); }
.badge {
  position: absolute; right: -7px; top: -5px; min-width: 13px; height: 13px; padding: 0 3px;
  background: var(--ink); color: var(--cream); font: var(--s)/13px var(--px); letter-spacing: 0; text-align: center;
}
.badge.bump { animation: bump .32s var(--out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 100% { transform: scale(1); } }
.side-seal { display: block; width: 54px; margin: 26px 0 26px; }
.side-nav { display: flex; flex-direction: column; gap: 9px; }
.side-nav a { width: max-content; position: relative; }
.side-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.side-nav a[aria-current="page"]::before { content: ''; position: absolute; left: -10px; top: 50%; width: 5px; height: 5px; margin-top: -3px; background: var(--ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 14px; color: var(--soft); font-size: var(--s); line-height: 1.6; }
.side-foot .mono { font-size: 10px; color: var(--ink); }

.topbar, .mnav { display: none; }

/* ---------- seal ---------- */
.seal { display: block; color: var(--ink); overflow: visible; }
.seal text { font-family: var(--px); letter-spacing: 0; }
.seal-ring { transform-origin: 50px 50px; }
.splash .seal-ring { animation: spin 48s linear infinite; }
.is-leaving .seal-ring { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- boxed menu buttons (splash + phone menu) ---------- */
.stack { display: flex; flex-direction: column; gap: 4px; width: 184px; }
.box-btn {
  position: relative; display: grid; place-items: center; height: 30px;
  border: 1.5px solid var(--ink); font-size: var(--s); letter-spacing: calc(2 * var(--ls)); overflow: hidden; cursor: pointer;
}
.box-btn > span, .box-btn > i { grid-area: 1 / 1; font-style: normal; }
.box-btn > i {
  position: absolute; inset: 0; display: grid; place-items: center; background: var(--char); color: var(--cream);
  clip-path: inset(100% 0 0 0); transition: clip-path .1s cubic-bezier(.4, 0, 1, 1);
}
.box-btn:hover > i, .box-btn:focus-visible > i { clip-path: inset(0 0 0 0); transition: clip-path .09s cubic-bezier(.2, .7, .2, 1); }
.box-btn.is-pressed > i { clip-path: inset(0 0 0 0); background: #7C7770; transition: background .08s linear; }

/* ---------- splash ---------- */
.splash { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 40px 20px; }
.splash-in { display: flex; flex-direction: column; align-items: center; }
.splash .date { margin: 38px 0 12px; font: 11px var(--mono); }
.splash .stack { width: 196px; }
.splash .box-btn { height: 34px; font-size: var(--m); letter-spacing: var(--ls); }
.splash .socials { display: flex; gap: 10px; margin-top: 10px; }
.splash .socials a { display: grid; place-items: center; width: 18px; height: 18px; }
.splash .socials a:hover { transform: translateY(-1px); }
.splash-note { position: fixed; left: 0; right: 0; bottom: 18px; text-align: center; color: var(--soft); font-size: var(--s); }

/* ---------- shop grid ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 22px 40px 0; }
.page-head h1 { margin: 0; font-size: var(--s); font-weight: 400; }
.filters { display: flex; gap: 14px; }
.filters button { color: var(--soft); }
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.filters button:hover { color: var(--ink); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 28px 40px; }
.card { position: relative; display: block; padding: 0 12px 40px; }
.card-link { display: block; }
.card-media { height: clamp(200px, 21vw, 380px); padding: 22px 8% 6px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card[data-type="cap"] .card-media { padding: 22% 16% 14%; }
.card[data-type="figure"] .card-media { padding: 22px 10% 6px; }
.card-meta { position: relative; margin-top: 16px; padding-left: 6px; max-width: 24ch; }
.card-name { display: block; line-height: 1.45; }
.card-price { display: block; margin-top: 4px; font-size: var(--s); }
.tag { position: absolute; left: 62%; top: calc(100% + 12px); font-size: var(--s); white-space: nowrap; }
.tag.is-pre { left: 6px; top: calc(100% + 8px); color: var(--soft); }
.quick {
  position: absolute; right: 18px; bottom: 40px; width: 30px; height: 30px; display: grid; place-items: center;
  opacity: 0; transition: opacity .15s linear;
}
.card:hover .quick, .card:focus-within .quick { opacity: 1; }
.quick:hover .px-icon { transform: scale(1.12); }
@media (hover: none) { .quick { opacity: 1; } }
/* entrances: cards rise in turn (35 ms step), cards that mount a frame later rise the same way, footers fade */
.grid .card { animation: cardIn .42s var(--out) both; animation-delay: calc(min(var(--i), 7) * 35ms + 60ms); }
.grid.is-filtering .card { animation: cardIn .26s var(--out) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes fadeIn { from { opacity: 0; } }
.foot { animation: fadeIn .4s ease-out both; }
.info > * { animation: cardIn .42s var(--out) both; }
.info > :nth-child(2) { animation-delay: 30ms; } .info > :nth-child(3) { animation-delay: 60ms; }
.info > :nth-child(4), .info > :nth-child(5) { animation-delay: 90ms; } .info > :nth-child(6) { animation-delay: 120ms; }
.info > :nth-child(7), .info > :nth-child(8) { animation-delay: 150ms; } .info > :nth-child(n+9) { animation-delay: 180ms; }
.lb-block { animation: fadeIn .5s ease-out both; }

/* ---------- footer ---------- */
.foot { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 70px 40px 24px; margin-top: 30px; }
.foot h3 { margin: 0 0 10px; font-size: var(--s); font-weight: 400; }
.foot-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: var(--s); }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-ig { display: inline-grid; margin-top: 12px; }
.news { max-width: 520px; }
.news form { display: flex; align-items: center; border-bottom: 1px solid var(--ink); }
.news input { flex: 1; min-width: 0; background: none; border: 0; padding: 12px 0; outline: none; font-size: var(--s); }
.news input::placeholder { color: var(--soft); }
.news button { padding: 8px 2px 8px 12px; font-size: var(--s); }
.news-msg { min-height: 16px; margin-top: 6px; font-size: var(--s); color: var(--soft); }
.cur { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--s); color: var(--soft); }
.cur select { appearance: none; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 4px 16px 4px 0; font-size: var(--s); color: var(--soft); cursor: pointer; }
.cur .px-icon { position: absolute; right: 2px; pointer-events: none; }
.credit { grid-column: 1 / -1; text-align: center; padding-top: 34px; font-size: var(--s); }

/* ---------- product page ---------- */
.pdp { display: grid; grid-template-columns: minmax(20px, calc(22vw - var(--side) - 20px)) minmax(260px, 300px) 1fr; min-height: calc(100vh - 40px); }
.info { grid-column: 2; padding-top: 24px; position: relative; z-index: 2; }
.vendor { font-size: var(--s); }
.title { margin: 4px 0 6px; font-size: var(--m); font-weight: 400; line-height: 1.05; letter-spacing: 0; }
.price { font-size: var(--s); }
.price s { color: var(--soft); margin-left: 6px; }
.field-label { display: block; margin: 20px 0 2px; font-size: var(--s); }
.select { position: relative; border-bottom: 1px solid var(--line); }
.select select { appearance: none; width: 100%; background: none; border: 0; padding: 10px 24px 10px 8px; font-size: var(--s); cursor: pointer; }
.select select:disabled { cursor: default; color: var(--ink); opacity: 1; }
.select .px-icon { position: absolute; right: 6px; top: 50%; margin-top: -3px; pointer-events: none; }
.sizerow { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-height: 30px; margin-top: 8px; font-size: var(--s); }
.sizerow .chip-size { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; background: var(--char); color: var(--cream); font-size: var(--s); }
.sizerow.flash { animation: flashRow .5s var(--out); }
@keyframes flashRow { 0% { opacity: 0; transform: translateY(-3px); } 100% { opacity: 1; transform: none; } }
.notice { display: flex; gap: 10px; align-items: flex-start; overflow: hidden; height: 0; opacity: 0; font-size: var(--s); line-height: 1.6; }
.notice .px-icon { fill: var(--red); margin-top: 1px; }
.notice.is-on { margin: 10px 0 4px; }
.notice.shake { animation: shake .32s linear; }
@keyframes shake { 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(1px); } }
.buy { display: flex; gap: 14px; align-items: center; margin-top: 10px; }
.qty { display: flex; align-items: center; }
.qty button { width: 26px; height: 34px; font-size: var(--s); color: var(--soft); }
.qty button:hover { color: var(--ink); }
.qty output { min-width: 18px; text-align: center; font-size: var(--s); }
.cta {
  position: relative; flex: 1; height: 34px; background: var(--char); color: var(--cream); font-size: var(--s);
  display: grid; place-items: center; overflow: hidden;
}
.cta:hover { background: #000; }
.cta > span { grid-area: 1 / 1; display: inline-flex; gap: 8px; align-items: center; transition: opacity .15s linear; }
.cta .cta-done { opacity: 0; }
.cta.is-done .cta-label { opacity: 0; transition-duration: .06s; }
.cta.is-done .cta-done { opacity: 1; transition-duration: .1s; }
.cta:disabled { background: #8C867C; cursor: not-allowed; }
.desc { margin: 22px 0 0; font-size: var(--s); line-height: 1.85; }
.desc-wrap { position: relative; max-height: 13em; overflow: hidden; transition: max-height .4s var(--out); }
.desc-wrap.is-open { max-height: 40em; }
.more { margin-top: 8px; color: var(--soft); font-size: var(--s); }
.more:hover { color: var(--ink); }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 18px 0 0; font-size: var(--s); color: var(--soft); }
.spec dt { color: var(--ink); }
.spec dd { margin: 0; }

.media { grid-column: 3; position: relative; display: grid; place-items: center; padding: 20px 17vw 20px 10px; min-height: calc(100vh - 40px); }
.media-main { position: relative; width: 100%; height: min(72vh, 660px); }
.media-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media-main img.is-photo { inset: 6% 10%; width: 80%; height: 88%; object-fit: cover; }
.pdp[data-type="cap"] .media-main img { inset: 14% 8%; width: 84%; height: 72%; }   /* the close-up (is-photo) shares the box */
.pdp[data-type="figure"] .media-main img { inset: 6% 12%; width: 76%; height: 88%; }
.thumbs { position: absolute; right: 3vw; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.thumbs button { width: 46px; height: 46px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; background: var(--paper); }
.thumbs button img { max-width: 86%; max-height: 86%; object-fit: contain; }
.thumbs button img.is-photo { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.thumbs button[aria-current="true"] { border-color: var(--ink); border-width: 1.5px; }
.thumbs button:hover { border-color: var(--ink); }
.dots { display: none; }
.pdp-foot { grid-column: 1 / -1; }

/* ---------- size advisor ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); }
.advisor {
  position: fixed; z-index: 60; left: var(--adv-left, 37vw); top: var(--adv-top, 22vh);
  /* grows with the font pixel on high-DPI screens: 400 x 600 at 1x, 500 x 700 at 1.5x */
  width: calc(400px + (var(--fp) - 1px) * 200); height: min(calc(600px + (var(--fp) - 1px) * 200), calc(100vh - 32px)); background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(20, 18, 16, .18); display: flex; flex-direction: column; font-size: var(--s);
}
.adv-head { padding: 16px 20px 0; }
.adv-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.adv-top h2 { margin: 0; font-size: var(--s); font-weight: 400; letter-spacing: calc(2 * var(--ls)); }
.adv-prod { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.adv-prod img { width: 40px; height: 44px; object-fit: contain; }
.adv-prod span:nth-of-type(1) { flex: 1; }
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; }
.progress i { height: 3px; background: #D3CCC0; position: relative; overflow: hidden; }
.progress i::after { content: ''; position: absolute; inset: 0; background: var(--char); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--out); }
.progress i.on::after { transform: scaleX(1); }
.eyebrow { margin-top: 8px; font-size: var(--s); color: var(--ink); }
.adv-body { flex: 1; min-height: 0; overflow: auto; padding: 0 20px 12px; position: relative; scrollbar-gutter: stable; }
.adv-body::-webkit-scrollbar { width: 9px; }
.adv-body::-webkit-scrollbar-track { background: transparent; border-left: 1px solid var(--line); }
.adv-body::-webkit-scrollbar-thumb { background: #A69E91; border: 3px solid var(--paper); border-left-width: 4px; }
.adv-body::-webkit-scrollbar-button:single-button { display: block; height: 10px; background: no-repeat center / 7px 4px; }
.adv-body::-webkit-scrollbar-button:single-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v1h1v1h1v1h1v1H0V3h1V2h1V1h1z' fill='%231F1E1C'/%3E%3C/svg%3E"); }
.adv-body::-webkit-scrollbar-button:single-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7v1H6v1H5v1H4v1H3V3H2V2H1V1H0z' fill='%231F1E1C'/%3E%3C/svg%3E"); }
.step { padding-top: 14px; }
.step.enter { animation: stepIn .14s ease-out both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } }
.adv-back { display: inline-block; margin-bottom: 12px; font-size: var(--s); }
.step h3 { margin: 0; font-size: var(--m); font-weight: 400; line-height: 1.1; letter-spacing: 0; }
.step .sub { margin: 6px 0 14px; font-size: var(--s); line-height: 1.6; }
.seg { display: grid; grid-template-columns: 1fr 1fr; }
.seg button { height: 32px; border: 1px solid var(--line); font-size: var(--s); }
.seg button + button { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--char); color: var(--cream); border-color: var(--char); }
.seg button:not([aria-pressed="true"]):hover { background: var(--chip); }
.measure { display: grid; grid-template-columns: 44px 1fr; gap: 14px; margin-top: 14px; }
.figure { width: 44px; height: 164px; color: var(--ink); align-self: center; transform-origin: 50% 100%; transition: transform .25s var(--out); }
.mblock + .mblock { margin-top: 12px; }
.mhead { display: flex; justify-content: space-between; align-items: flex-end; }
.mhead label { font-size: var(--s); }
.units { display: flex; }
.units button { height: 18px; padding: 0 7px; border: 1px solid var(--line); font-size: var(--s); }
.units button + button { border-left: 0; }
.units button[aria-pressed="true"] { background: var(--char); color: var(--cream); border-color: var(--char); }
.mval { font-size: var(--l); line-height: 1; margin: 6px 0 6px; letter-spacing: 0; }
.mrow { display: grid; grid-template-columns: 26px 1fr 26px; gap: 8px; align-items: center; }
.mrow > button { width: 26px; height: 26px; border: 1px solid var(--line); font-size: var(--m); display: grid; place-items: center; }
.mrow > button:hover { border-color: var(--ink); }
.mrow > button:active { background: var(--chip); }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 0; background: transparent; cursor: pointer;
  --fill: 50%;
}
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--ink) var(--fill), #B9B1A4 var(--fill)); }
input[type="range"]::-moz-range-track { height: 1px; background: #B9B1A4; }
input[type="range"]::-moz-range-progress { height: 1px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6.5px; background: var(--char); border: 0; border-radius: 0; transition: transform .1s; }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; background: var(--char); border: 0; border-radius: 0; }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--ink); outline-offset: 2px; }
.live { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 10px 14px; border: 1px solid var(--line); }
.live small { display: block; margin-top: 3px; font-size: var(--s); color: var(--soft); }
.flip { position: relative; display: inline-block; height: 26px; min-width: 40px; overflow: hidden; text-align: right; font-size: var(--l); line-height: 26px; }
.flip > b { display: block; font-weight: 400; }
.flip > b.out { position: absolute; right: 0; top: 0; animation: flipOut .12s ease-in forwards; }
.flip > b.in { animation: flipIn .12s ease-out; }
@keyframes flipOut { to { transform: translateY(-100%); opacity: 0; } }
@keyframes flipIn { from { transform: translateY(100%); opacity: 0; } }
.chips-label { display: block; margin: 16px 0 8px; font-size: var(--s); }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chips button { height: 34px; border: 1px solid var(--line); font-size: var(--s); }
.chips button:hover { border-color: #9E978B; }
.chips button[aria-pressed="true"] { border: 1.5px solid var(--ink); background: var(--chip); }
.helper { min-height: 30px; margin: 10px 0 0; font-size: var(--s); line-height: 1.6; color: var(--soft); }
.adv-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.adv-cta { width: 100%; height: 38px; background: var(--char); color: var(--cream); font-size: var(--s); }
.adv-cta:hover { background: #000; }
.adv-again { display: block; margin: 9px auto 0; font-size: var(--s); }

.result { text-align: left; }
.result h3 { margin-top: 4px; }
.ring { position: relative; width: 120px; height: 120px; margin: 18px auto 0; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 371; stroke-dashoffset: 371; animation: draw .4s var(--out) .06s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ring b { font-size: var(--xl); font-weight: 400; letter-spacing: 0; animation: pop .32s var(--out) .28s both; }
@keyframes pop { from { opacity: 0; transform: scale(.9); } }
.best { margin-top: 10px; text-align: center; font-size: var(--s); letter-spacing: calc(2 * var(--ls)); }
.stocknote { margin: 16px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--ink); font-size: var(--s); line-height: 1.7; }
.callout { margin: 12px 0 0; padding: 12px 14px; background: var(--mute); font-size: var(--s); line-height: 1.7; }
.feel-h { margin: 16px 0 2px; font-size: var(--s); color: var(--soft); }
.feel { display: grid; grid-template-columns: 58px 10px 1fr; gap: 6px 4px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--s); line-height: 1.6; }
.feel i { width: 6px; height: 6px; margin-top: 3px; background: var(--ink); }
.feel i.warn { background: var(--amber); }
.fine { margin: 12px 0 4px; font-size: var(--s); line-height: 1.7; color: var(--soft); }

/* ---------- cart drawer ---------- */
.drawer {
  position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--paper);
  border-left: 1px solid var(--line); display: flex; flex-direction: column;
}
.dr-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.dr-head h2 { margin: 0; font-size: var(--s); font-weight: 400; letter-spacing: calc(2 * var(--ls)); }
.ship { padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: var(--s); }
.ship-bar { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; margin-top: 8px; }
.ship-bar i { height: 4px; background: #D3CCC0; transition: background .2s linear; transition-delay: calc(var(--i) * 12ms); }
.ship-bar i.on { background: var(--char); }
.lines { flex: 1; overflow: auto; padding: 0 22px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line.leaving { animation: leave .22s ease-in forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(16px); } }
.line-img { width: 64px; height: 72px; display: grid; place-items: center; background: var(--chip); }
.line-img img { max-width: 84%; max-height: 84%; object-fit: contain; }
.line-name { font-size: var(--s); line-height: 1.5; }
.line-meta { margin-top: 4px; font-size: var(--s); color: var(--soft); }
.line-qty { display: flex; align-items: center; margin-top: 10px; border: 1px solid var(--line); width: max-content; }
.line-qty button { width: 24px; height: 24px; font-size: var(--s); }
.line-qty button:disabled { color: #C4BDB1; cursor: not-allowed; }
.line-qty span { min-width: 18px; text-align: center; font-size: var(--s); }
.line-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-size: var(--s); }
.line-right button { font-size: var(--s); color: var(--soft); }
.line-right button:hover { color: var(--ink); }
.dr-foot { padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.sum { display: flex; justify-content: space-between; font-size: var(--s); }
.dr-foot .cta { width: 100%; height: 40px; }
.sum-note { margin: 6px 0 14px; font-size: var(--s); color: var(--soft); }
.dr-msg { min-height: 14px; margin-top: 8px; font-size: var(--s); text-align: center; color: var(--soft); }
.empty { padding: 60px 0; text-align: center; }
.empty p { margin: 0 0 18px; font-size: var(--m); }

/* ---------- lookbook ---------- */
.lb-head { text-align: center; padding: 22px 0 14px; }
.lb-head h1 { margin: 0; font-size: var(--l); font-weight: 400; letter-spacing: var(--ls); }
.lb-head p { margin: 4px 0 0; font-size: var(--s); color: var(--soft); }
.lb { width: min(58vw, 860px); margin: 0 auto; padding-bottom: 2px; }
.lb-block { position: sticky; top: 0; display: grid; gap: 2px; margin-bottom: 2px; background: var(--paper); }
.lb-block img { width: 100%; height: 100%; object-fit: cover; background: var(--mute); }
.lb-block.one img, .lb-block.end img { aspect-ratio: var(--ar); }
.lb-block.two { aspect-ratio: 10 / 7; }
.lb-end { position: relative; }
.lb-end a { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); }
.lb-end .box-btn { width: 200px; background: var(--paper); }

/* ---------- simple pages ---------- */
.plain { padding: 22px 40px 0; }
.plain h1 { margin: 0 0 6px; font-size: var(--m); font-weight: 400; }
.plain .lede { margin: 0 0 30px; font-size: var(--s); color: var(--soft); max-width: 60ch; line-height: 1.7; }
.contact { display: grid; grid-template-columns: minmax(220px, 300px) minmax(280px, 420px); gap: 70px; padding-top: 10px; }
.contact dl { margin: 0; display: grid; gap: 16px; font-size: var(--s); }
.contact dt { font-size: var(--s); color: var(--soft); }
.contact dd { margin: 3px 0 0; }
.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 4px; font-size: var(--s); }
.form input, .form textarea { background: none; border: 0; border-bottom: 1px solid var(--ink); padding: 8px 0; outline: none; font-size: var(--s); resize: none; }
.form .cta { height: 36px; flex: none; width: 180px; }
.form-msg { min-height: 14px; font-size: var(--s); color: var(--soft); }

/* ---------- page transition + fly dot ---------- */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; }
.loader span { font-size: var(--s); letter-spacing: calc(2 * var(--ls)); opacity: 0; white-space: pre; }
.fly { position: fixed; left: 0; top: 0; z-index: 80; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--ink); border-radius: 50%; pointer-events: none; will-change: transform, opacity; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 85; transform: translateX(-50%); background: var(--char); color: var(--cream); padding: 9px 14px; font-size: var(--s); }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .pdp { grid-template-columns: 24px minmax(240px, 280px) 1fr; }
  .media { padding-right: 84px; }
  .lb { width: min(76vw, 860px); }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --side: 0px; }
  main { margin-left: 0; padding-top: 52px; }
  .is-splash main { padding-top: 0; }
  .side { display: none; }
  .topbar {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: fixed; inset: 0 0 auto 0; height: 52px; z-index: 20;
    padding: 0 14px; background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .top-seal { width: 34px; }
  .top-word { font-size: var(--s); letter-spacing: calc(2 * var(--ls)); }
  .top-actions { justify-self: end; display: flex; align-items: center; gap: 16px; }
  .menu-btn { font-size: var(--s); padding: 8px 0; }
  .mnav { display: flex; position: fixed; inset: 52px 0 0 0; z-index: 19; background: var(--paper); flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
  .mnav[hidden] { display: none; }
  .mnav .stack { width: 220px; gap: 6px; }
  .mnav .box-btn { height: 40px; font-size: var(--s); }
  .mnav-note { position: absolute; bottom: 24px; margin: 0; font-size: var(--s); color: var(--soft); }
  .is-splash .topbar { display: none; }

  .stack { width: 220px; gap: 6px; }
  .box-btn { height: 40px; font-size: var(--s); }

  .page-head { padding: 16px 16px 0; flex-wrap: wrap; }
  .grid { grid-template-columns: 1fr 1fr; padding: 4px 4px 30px; }
  .card { padding: 0 8px 40px; }
  .card-media { height: 58vw; padding: 14px 4% 4px; }
  .card[data-type="cap"] .card-media { padding: 20% 10% 12%; }
  .card-meta { margin-top: 12px; padding-left: 2px; }
  .tag { left: auto; right: 0; top: calc(100% + 6px); }
  .quick { right: 6px; bottom: 40px; width: 36px; height: 36px; }

  .foot { grid-template-columns: 1fr; gap: 30px; padding: 40px 18px 22px; }

  .pdp { display: flex; flex-direction: column; }
  .media { order: -1; display: block; padding: 0; min-height: 0; }
  .pdp-foot { order: 2; }
  .media-main { display: flex; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .media-main::-webkit-scrollbar { display: none; }
  .media-main img { position: static; inset: auto; flex: 0 0 100%; width: 100%; height: 108vw; object-fit: contain; padding: 22px 10%; scroll-snap-align: center; }
  .media-main img.is-photo { width: 100%; height: 108vw; padding: 0; object-fit: cover; }
  .pdp[data-type] .media-main img { width: 100%; height: 108vw; }
  .pdp[data-type="cap"] .media-main img { height: 76vw; padding: 10px 8%; }
  .thumbs { display: none; }
  .dots { display: flex; justify-content: center; gap: 5px; padding: 10px 0 0; }
  .dots i { width: 14px; height: 3px; background: #D3CCC0; transition: background .2s; }
  .dots i.on { background: var(--char); }
  .info { padding: 18px 18px 0; }
  .buy { gap: 8px; }
  .cta { height: 44px; }
  .qty button { width: 34px; height: 44px; }

  .advisor {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; height: auto; max-height: calc(100svh - 28px);
    border: 0; border-top: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(20, 18, 16, .2);
  }
  .advisor::before { content: ''; display: block; width: 36px; height: 3px; margin: 8px auto 0; background: #C9C1B4; }
  .adv-head { padding: 8px 18px 0; }
  .adv-body { padding: 0 18px 12px; }
  .adv-foot { padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); }
  .mrow { grid-template-columns: 34px 1fr 34px; }
  .mrow > button { width: 34px; height: 34px; }
  .figure { height: 150px; }
  input[type="range"] { height: 30px; }
  input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -8.5px; }

  .drawer { width: 100vw; border-left: 0; }

  .lb { width: 100%; }
  .lb-head { padding: 16px 0 12px; }
  .plain { padding: 16px 18px 0; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- phone tap targets: every control at least 40 x 40 ---------- */
@media (max-width: 760px) {
  .top-seal { display: grid; place-items: center; width: 40px; height: 40px; margin-left: -3px; }
  .top-word { display: inline-flex; align-items: center; min-height: 40px; padding: 0 6px; }
  .ico-btn { width: 40px; height: 40px; }
  .ico-btn .badge { right: 2px; top: 4px; }
  .menu-btn { min-width: 48px; min-height: 40px; padding: 0 2px; text-align: right; }
  .top-actions { gap: 4px; }
  .filters { gap: 4px; }
  .filters button { min-height: 40px; min-width: 40px; padding: 0 6px; }
  .quick { width: 42px; height: 42px; right: 3px; bottom: 35px; }
  .foot-links { gap: 0; }
  .foot-links a { display: inline-flex; align-items: center; min-height: 40px; }
  .foot-ig { display: grid; place-items: center; width: 40px; height: 40px; margin: 4px 0 0 -13px; }
  .news button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
  .news input { min-height: 44px; }
  .cur select { min-height: 40px; }
  .splash .socials { gap: 0; margin-top: 4px; }
  .splash .socials button { display: grid; place-items: center; width: 44px; height: 44px; }
  .select select { min-height: 44px; }
  .btn-link, .more, .adv-back, .adv-again { display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; }
  .splash .stack { width: 236px; gap: 6px; }
  .splash .box-btn { height: 46px; }
  .sizerow { min-height: 44px; margin-top: 2px; }
  .qty button { width: 40px; }
  .seg button, .chips button { height: 44px; }
  .units button { height: 40px; min-width: 44px; padding: 0 8px; font-size: var(--s); }
  /* the unit toggle sits beside the value, so the live guess stays on screen while you drag */
  .mblock { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "lab lab" "val units" "row row"; align-items: center; }
  .mhead { display: contents; }
  .mhead label { grid-area: lab; }
  .mhead .units { grid-area: units; }
  .mval { grid-area: val; margin: 0; }
  .mrow { grid-area: row; margin-top: 2px; }
  .mblock + .mblock { margin-top: 6px; }
  .measure { margin-top: 10px; gap: 12px; }
  .step { padding-top: 10px; }
  .step .sub { margin: 4px 0 10px; }
  .live { margin-top: 10px; padding: 6px 12px; }
  .adv-prod { padding: 6px 0; }
  .progress { margin-top: 10px; }
  .mrow { grid-template-columns: 40px 1fr 40px; }
  .mrow > button { width: 40px; height: 40px; }
  input[type="range"] { height: 40px; }
  .adv-cta { height: 46px; }
  .adv-top { padding-bottom: 6px; }
  .line-qty button { width: 40px; height: 40px; }
  .line-right button { min-height: 40px; }
  .line-name { display: inline-flex; align-items: center; min-height: 40px; }
  .form input { min-height: 44px; }
  .form .cta { height: 46px; }
  .contact dl a { display: inline-flex; min-height: 40px; }
  .lb-end .box-btn { height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .splash .seal-ring { animation: none; }
}
