/* Sabotage Parfums — sabotageperfume.com
   Direction: the colour chart. Neutral paper and ink; each scent owns a colour, and the page
   turns that colour while you read about it. Display type is Newsreader (roman, 400);
   text is Familjen Grotesk. The rules are documented in DESIGN.md. */

:root {
  color-scheme: light;
  --paper: #f3f2ef;
  --paper-2: #e9e2d6;
  --ink: #171411;
  --ink-2: #4b4640;
  --ink-3: #6b655e;
  --line: rgba(23, 20, 17, .14);
  --line-2: rgba(23, 20, 17, .32);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 72px);
  --max: 1480px;
  --header-h: 68px;
  --out: cubic-bezier(.16, 1, .3, 1);
  --dur: .4s;
  --bg: var(--paper);
  --tx: var(--ink);
  /* set per field (chapter, swatch, product head) */
  --c: var(--paper);
  --fg: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-3) var(--paper); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  caret-color: currentColor;
  transition: background-color .9s var(--out), color .9s var(--out);
}
body.locked { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p a, .prose a, .link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); transition: text-decoration-color var(--dur); }
p a:hover, .prose a:hover, .link:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink-3); border-radius: 10px; border: 3px solid var(--paper); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
::placeholder { color: var(--ink-3); opacity: 1; }
strong, b { font-weight: 600; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
p + p { margin-top: 1em; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; z-index: 200; top: 12px; left: 12px; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }

/* ---------- Type ---------- */
.display, h1, h2, h3 { font-family: var(--serif); font-weight: 400; font-optical-sizing: auto; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.h-1 { font-size: clamp(44px, 6.2vw, 96px); line-height: 1.02; font-variation-settings: "opsz" 72; }
.h-2 { font-size: clamp(34px, 4vw, 60px); line-height: 1.06; font-variation-settings: "opsz" 60; }
.h-3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; }
h4 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.lede { font-size: clamp(17px, 1.25vw, 20px); line-height: 1.55; max-width: 48ch; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--ink-3); }
.price { font-variant-numeric: tabular-nums; }
.price s { opacity: .55; font-weight: 400; margin-left: .5em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border: 1px solid currentColor; border-radius: 999px;
  font-weight: 500; font-size: 15px; line-height: 1.3; text-align: center;
  transition: background var(--dur) var(--out), color var(--dur) var(--out), border-color var(--dur) var(--out), opacity var(--dur);
}
.btn:hover { background: var(--fg); color: var(--c); border-color: var(--fg); }
.btn.primary { background: var(--fg); color: var(--c); border-color: var(--fg); }
.btn.primary:hover { opacity: .86; }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.text-btn { font-weight: 500; text-decoration: underline; text-underline-offset: .25em; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
.text-btn:hover { text-decoration-color: currentColor; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.arrow-link::after { content: "\2192"; transition: transform var(--dur) var(--out); }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h); color: inherit; background: var(--bg); transition: color .9s var(--out), background-color .9s var(--out); }
.header-in {
  height: 100%; max-width: var(--max); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  font-size: 14px; font-weight: 500;
}
.header-left { display: flex; align-items: center; gap: 26px; }
.menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.burger { display: inline-flex; flex-direction: column; gap: 5px; width: 18px; }
.burger i { display: block; height: 1.5px; background: currentColor; transition: transform var(--dur) var(--out); }
body.menu-open .burger i:first-child { transform: translateY(3.25px) rotate(45deg); }
body.menu-open .burger i:last-child { transform: translateY(-3.25px) rotate(-45deg); }
.quick-nav { display: flex; gap: 24px; }
.quick-nav a, .header-actions a { opacity: .72; transition: opacity var(--dur); }
.quick-nav a:hover, .header-actions a:hover, .quick-nav a[aria-current="page"] { opacity: 1; }
.quick-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .45em; }
.logo { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1; letter-spacing: 0; }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 24px; }
.bag-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.bag-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; border: 1px solid currentColor; font-size: 12px; font-weight: 600; }
.bag-count.bump { animation: bump .5s var(--out); }
@keyframes bump { 40% { transform: scale(1.3); } }

/* ---------- Menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 55; background: var(--paper); color: var(--ink);
  padding: calc(var(--header-h) + 32px) var(--gutter) 36px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--out), visibility 0s linear var(--dur);
}
body.menu-open .menu { opacity: 1; visibility: visible; transition: opacity var(--dur) var(--out); }
body.menu-open .header { color: var(--ink); background: var(--paper); }
.menu-links { display: grid; gap: 4px; align-content: start; max-width: var(--max); margin: 0 auto; width: 100%; }
.menu-links a { font-family: var(--serif); font-size: clamp(32px, 4.6vw, 64px); line-height: 1.3; width: max-content; max-width: 100%; opacity: 0; transform: translateY(12px); transition: opacity .5s var(--out), transform .6s var(--out), color var(--dur); }
body.menu-open .menu-links a { opacity: 1; transform: none; transition-delay: calc(50ms + var(--i, 0) * 40ms); }
.menu-links a:hover { font-style: italic; }
.menu-foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); max-width: var(--max); margin: 0 auto; width: 100%; }
.menu-foot a:hover { color: var(--ink); }

/* ---------- Scent rail ---------- */
.rail { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 50; display: grid; gap: 10px; opacity: 0; visibility: hidden; transition: opacity var(--dur), visibility 0s linear var(--dur); }
body.in-chart .rail { opacity: 1; visibility: visible; transition: opacity var(--dur); }
.rail a { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--dot); border: 1px solid rgba(0, 0, 0, .18); transition: transform var(--dur) var(--out); }
.rail a[aria-current="true"] { transform: scale(1.55); border-color: currentColor; }
.rail a span { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 13px; white-space: nowrap; opacity: 0; transition: opacity var(--dur); pointer-events: none; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }

/* ---------- Opening ---------- */
.open { min-height: 100svh; padding: calc(var(--header-h) + clamp(48px, 9vh, 120px)) 0 clamp(48px, 6vw, 96px); display: grid; align-content: space-between; gap: clamp(48px, 8vh, 120px); }
.open > .wrap { width: 100%; }
.open .h-1 { max-width: 15ch; }
.open-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px clamp(40px, 6vw, 120px); align-items: end; }
.open-foot .lede { color: var(--ink-2); }
.index { display: grid; border-top: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: 18px 1fr auto auto; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; transition: padding-left .5s var(--out); }
.index a:hover { padding-left: 6px; }
.index .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); }
.index .nm { font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.index .fm { color: var(--ink-3); font-size: 14px; }
.index .pr { font-variant-numeric: tabular-nums; min-width: 60px; text-align: right; }

/* ---------- Chapters ---------- */
.chapter { min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 40px) 0 56px; color: var(--fg); }
.ch-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px clamp(40px, 6vw, 120px); align-items: center; width: 100%; }
.ch-text { display: grid; gap: 28px; }
.ch-name { font-size: clamp(60px, 8.4vw, 96px); line-height: 1; font-variation-settings: "opsz" 72; }
.ch-tag { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; max-width: 24ch; }
.ch-notes { display: grid; gap: 0; border-top: 1px solid color-mix(in oklab, currentColor 30%, transparent); max-width: 52ch; }
.ch-notes div { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 10px 0; border-bottom: 1px solid color-mix(in oklab, currentColor 30%, transparent); font-size: 15px; }
.ch-notes dt { opacity: .7; }
.ch-buy { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; }
.ch-price { font-size: 17px; font-variant-numeric: tabular-nums; }
.ch-price small { font-size: 14px; opacity: .7; margin-left: 8px; }
.print { justify-self: center; width: min(100%, 440px); background: var(--paper); padding: 10px 10px 14px; box-shadow: 0 30px 50px -28px rgba(0, 0, 0, .45); clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--out); }
.chapter.in .print { clip-path: inset(0); }
.print img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.print.wide img { aspect-ratio: 4 / 4.6; }

/* ---------- Paper sections ---------- */
.section { padding: clamp(80px, 10vw, 150px) 0; }
.section.tight { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px 48px; flex-wrap: wrap; margin-bottom: clamp(36px, 4vw, 64px); }
.section-head .h-2 { max-width: 18ch; }
.copy { display: grid; gap: 26px; align-content: start; }
.copy p { color: var(--ink-2); max-width: 54ch; font-size: 17px; }
.facts { border-top: 1px solid var(--line); max-width: 54ch; }
.facts div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts span { color: var(--ink-3); }
.facts b { font-weight: 500; text-align: right; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px clamp(40px, 6vw, 120px); align-items: start; }
.two .print { clip-path: none; justify-self: start; width: min(100%, 440px); }
.two .print.right { justify-self: end; }

.line-list { border-top: 1px solid var(--line); }
.line-list .row { display: grid; grid-template-columns: 14px 1fr auto auto; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-list .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--dot); }
.line-list .nm { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.line-list .nm a:hover { font-style: italic; }
.line-list .fm { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.line-list .pr { font-variant-numeric: tabular-nums; }

.sheet { border-top: 1px solid var(--line-2); }
.sheet div { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sheet dt { color: var(--ink-3); }
.sheet dd small { display: block; color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.contact-line { display: grid; gap: 6px; margin-top: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: clamp(28px, 4vw, 48px); }
.back-link::before { content: "\2190"; transition: transform var(--dur) var(--out); }
.back-link:hover::before { transform: translateX(-4px); }
.ws-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px clamp(40px, 6vw, 120px); align-items: end; }
.ws-head .lede { color: var(--ink-2); }
.ws-head .actions { margin-top: 28px; }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line-2); }
.figures div { padding: 22px 24px 4px 0; }
.figures div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.figures dt { font-size: 13px; color: var(--ink-3); }
.figures dd { font-family: var(--serif); font-size: clamp(30px, 3vw, 44px); line-height: 1.1; margin-top: 10px; font-variation-settings: "opsz" 48; }
.figures small { display: block; font-family: var(--sans); font-size: 14px; line-height: 1.45; color: var(--ink-2); margin-top: 8px; }
.ls-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px clamp(32px, 4vw, 72px); align-items: start; }
.ls { width: 100%; border-collapse: collapse; font-size: 15px; }
.ls caption { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 12px; }
.ls thead th { font-size: 13px; font-weight: 400; color: var(--ink-3); text-align: left; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-2); }
.ls td, .ls tbody th { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; vertical-align: middle; }
.ls tbody th { font-family: var(--serif); font-size: 19px; line-height: 1.3; white-space: nowrap; }
.ls tbody th a:hover { font-style: italic; }
.ls td { color: var(--ink-2); }
.ls .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); margin-right: 12px; vertical-align: 2px; }
.ls .ls-pr { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px clamp(32px, 4vw, 64px); border-top: 1px solid var(--line-2); padding-top: 28px; }
.why h3 { font-size: 24px; line-height: 1.3; }
.why p { color: var(--ink-2); margin-top: 10px; max-width: 40ch; }
#line { padding-top: clamp(56px, 7vw, 104px); }
.ws-foot { padding-bottom: clamp(48px, 6vw, 80px); }
.ws-foot .back-link { margin: 0; }
.gift-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 16px; }
.gift-row a { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 18px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); }
.gift-row span { font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.gift-row small { grid-row: 2; color: var(--ink-3); font-size: 14px; }
.gift-row b { grid-row: 1 / 3; grid-column: 2; align-self: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.gift-row a:hover span { font-style: italic; }
.trade-band { border-top: 1px solid var(--line); padding: clamp(36px, 4vw, 56px) 0; }
.trade-band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px 48px; flex-wrap: wrap; }
.trade-band p { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; max-width: 34ch; margin-top: 8px; }
.ws-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; align-content: start; }
.ws-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); }
.ws-form label.full { grid-column: 1 / -1; }
.ws-form input, .ws-form textarea { min-height: 50px; padding: 12px 18px; background: transparent; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ink); font-size: 16px; font-weight: 400; letter-spacing: 0; }
.ws-form textarea { resize: vertical; }
.ws-form input:focus, .ws-form textarea:focus { outline: 2px solid currentColor; outline-offset: 2px; border-color: var(--ink); }
.ws-form .btn { justify-self: start; }
.contact-line .addr { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.3; word-break: break-all; }
.contact-line .addr:hover { font-style: italic; }

/* ---------- Swatches (collection) ---------- */
.page-head { padding: calc(var(--header-h) + clamp(48px, 7vw, 110px)) 0 clamp(28px, 4vw, 48px); }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: clamp(28px, 4vw, 56px); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; font-weight: 500; transition: background var(--dur), color var(--dur), border-color var(--dur); }
.chip .n { opacity: .6; font-size: 12px; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.results { color: var(--ink-3); font-size: 14px; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.swatches.four { grid-template-columns: repeat(4, 1fr); }
.swatch { position: relative; background: var(--c); color: var(--fg); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; isolation: isolate; }
.swatch > a { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 22px; z-index: 2; }
.swatch .sw-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.swatch .sw-name { align-self: end; font-family: var(--serif); font-size: clamp(30px, 3vw, 44px); line-height: 1.05; font-variation-settings: "opsz" 48; }
.swatch .sw-name small { display: block; font-family: var(--sans); font-size: 14px; margin-top: 8px; opacity: .8; }
.swatch .sw-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity .7s var(--out), transform 1.6s var(--out); }
.swatch:hover .sw-photo, .swatch:focus-within .sw-photo { opacity: 1; }
.swatch.photo .sw-photo { opacity: 1; }
.swatch.photo > a { color: var(--paper); text-shadow: 0 1px 16px rgba(0, 0, 0, .55); }
.swatch:hover > a { color: var(--paper); text-shadow: 0 1px 16px rgba(0, 0, 0, .55); }
.swatch.photo:hover .sw-photo { transform: scale(1.03); }
.sw-add { position: absolute; right: 16px; bottom: 16px; z-index: 3; opacity: 0; transform: translateY(6px); transition: opacity var(--dur), transform var(--dur) var(--out); background: var(--paper); color: var(--ink); border-color: var(--paper); }
.sw-add:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.swatch:hover .sw-add, .swatch:focus-within .sw-add { opacity: 1; transform: none; }
.swatch.soldout .sw-photo { filter: saturate(.3); }

/* ---------- Product page ---------- */
.pdp-head { background: var(--c); color: var(--fg); padding: calc(var(--header-h) + clamp(40px, 7vh, 96px)) 0 clamp(56px, 7vw, 100px); }
.pdp-head .ch-grid { align-items: center; }
.pdp-head .print { clip-path: none; }
.pdp-head h1 { font-size: clamp(52px, 7vw, 96px); line-height: 1; font-variation-settings: "opsz" 72; }
.pdp-head h1 small { display: block; font-family: var(--sans); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; opacity: .8; }
.pdp-desc { max-width: 52ch; font-size: 17px; opacity: .9; }
.buy-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; max-width: 520px; }
.qty { display: inline-grid; grid-template-columns: 42px 44px 42px; border: 1px solid currentColor; border-radius: 999px; height: 50px; }
.qty button { font-size: 18px; opacity: .8; }
.qty button:hover { opacity: 1; }
.qty input { -moz-appearance: textfield; appearance: textfield; background: transparent; border: 0; text-align: center; font-weight: 500; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.ladder-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid color-mix(in oklab, currentColor 40%, transparent); border-radius: 2px; font-size: 15px; max-width: 520px; transition: border-color var(--dur); }
.ladder-link:hover { border-color: currentColor; }
.ladder-link b { font-weight: 500; }
.perks { display: flex; gap: 6px 0; flex-wrap: wrap; font-size: 14px; opacity: .8; }
.perks span:not(:last-child)::after { content: "\00b7"; margin: 0 10px; }
.field-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 520px; }
.field-row input, .line-form input { min-height: 50px; padding: 0 18px; background: transparent; border: 1px solid currentColor; border-radius: 999px; width: 100%; }
.field-row input:focus, .line-form input:focus { outline: 2px solid currentColor; outline-offset: 2px; }
.form-note { font-size: 14px; }
.form-note:empty { display: none; }

.pdp-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px clamp(40px, 6vw, 120px); padding-top: clamp(56px, 7vw, 100px); align-items: start; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gallery .print { clip-path: none; width: 100%; padding: 8px 8px 12px; }
.gallery .print img { aspect-ratio: 4 / 5; }
.gallery .print.wide { grid-column: 1 / -1; }
.gallery .print.wide img { aspect-ratio: 4 / 3; }
.gallery .print img.contain { object-fit: contain; background: #fff; }
.pdp-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 28px; }
.notes { border-top: 1px solid var(--line-2); }
.note-tier { display: grid; grid-template-columns: 160px 1fr; gap: 12px 40px; padding: clamp(18px, 2vw, 28px) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.note-tier .lab { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.note-tier .lab b { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: 4px; }
.note-tier .val { font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); line-height: 1.35; }
.note-tier .val .sep { color: var(--dot); padding: 0 .3em; }
.note-tier .val .n { white-space: nowrap; }
.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; cursor: pointer; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 500; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 20px; line-height: 1; transition: transform var(--dur) var(--out); color: var(--ink-3); }
.acc[open] summary::after { transform: rotate(45deg); }
.acc > div { padding: 0 0 18px; color: var(--ink-2); max-width: 52ch; }

.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(16px, env(safe-area-inset-left, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform var(--dur) var(--out); }
.sticky-buy.on { transform: none; }
.sticky-buy .nm { display: grid; font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.sticky-buy .nm span { font-family: var(--sans); font-size: 13px; color: var(--ink-3); }

/* ---------- Story / help ---------- */
.story-hero { padding-top: calc(var(--header-h) + clamp(48px, 8vw, 110px)); }
.story-hero .two { align-items: end; }
.story-hero .lede { margin-top: 28px; color: var(--ink-2); }
.chapters { display: grid; gap: clamp(72px, 9vw, 140px); padding-block: clamp(80px, 10vw, 150px); }
.quote { font-family: var(--serif); font-size: clamp(30px, 4vw, 60px); line-height: 1.3; text-align: center; max-width: 24ch; margin: 0 auto; }
.quote span { font-style: italic; }
.values { border-top: 1px solid var(--line-2); max-width: 980px; margin: 0 auto; }
.values div { display: grid; grid-template-columns: 240px 1fr; gap: 10px 48px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.values h3 { font-size: 26px; line-height: 1.3; }
.values p { color: var(--ink-2); max-width: 52ch; }
.trade { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.trade > div { padding: 88px 64px; display: grid; gap: 20px; align-content: start; }
.trade > div + div { border-left: 1px solid var(--line); }
.trade p { color: var(--ink-2); max-width: 46ch; font-size: 17px; }
.trade .addr { font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; word-break: break-all; }
.trade .addr:hover { font-style: italic; }
.help-nav { display: flex; gap: 8px 28px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 500; }
.prose { max-width: 66ch; padding: clamp(40px, 5vw, 72px) 0 clamp(72px, 9vw, 140px); color: var(--ink-2); font-size: 17px; }
.prose h2 { color: var(--ink); font-size: clamp(28px, 2.8vw, 40px); margin: 56px 0 16px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); color: var(--ink); }
.footer-top { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 7vw, 100px) var(--gutter) clamp(40px, 5vw, 72px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px clamp(40px, 6vw, 120px); }
.footer-cta { display: grid; gap: 18px; align-content: start; max-width: 460px; }
.footer-line { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 36px); line-height: 1.3; }
.line-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.line-form button { min-height: 50px; padding: 0 22px; background: var(--ink); color: var(--paper); border-radius: 999px; font-weight: 500; transition: opacity var(--dur); }
.line-form button:hover { opacity: .85; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-cols > div { display: grid; gap: 9px; align-content: start; font-size: 15px; }
.footer-cols h4 { margin-bottom: 8px; color: var(--ink-3); }
.footer-cols a { color: var(--ink-2); transition: color var(--dur); }
.footer-cols a:hover { color: var(--ink); }
.footer-mark { font-family: var(--serif); font-size: clamp(56px, 9vw, 96px); line-height: 1.1; text-align: center; padding: 0 var(--gutter); user-select: none; }
.footer-base { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; color: var(--ink-3); font-size: 14px; }
.footer-base a:hover { color: var(--ink); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Bag drawer, toast ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(23, 20, 17, .35); opacity: 0; visibility: hidden; transition: opacity var(--dur), visibility 0s linear var(--dur); }
.scrim.open { opacity: 1; visibility: visible; transition: opacity var(--dur); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(460px, 100%); background: var(--paper); color: var(--ink); border-left: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr auto; transform: translateX(100%); transition: transform .5s var(--out); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 26px; line-height: 1.3; }
.drawer-body { overflow-y: auto; padding: 8px 24px; }
.drawer-empty { display: grid; gap: 20px; justify-items: start; padding: 32px 0; color: var(--ink-2); }
.line-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line-item .thumb { width: 56px; height: 72px; background: var(--c); border-radius: 2px; overflow: hidden; }
.line-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item .nm { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.line-item .meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.line-item .end { text-align: right; display: grid; gap: 8px; justify-items: end; font-variant-numeric: tabular-nums; }
.mini-qty { display: inline-grid; grid-template-columns: 30px 28px 30px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; margin-top: 10px; height: 32px; font-size: 14px; text-align: center; }
.rm { font-size: 13px; color: var(--ink-3); text-decoration: underline; text-underline-offset: .2em; }
.rm:hover { color: var(--ink); }
.drawer-foot { padding: 20px 24px calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 14px; }
.ship-meter { display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.ship-meter .bar { height: 2px; background: var(--line); }
.ship-meter .bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .6s var(--out); }
.subtotal { display: flex; justify-content: space-between; font-size: 17px; }
.fine { color: var(--ink-3); font-size: 13px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 14px; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .35); transition: opacity var(--dur) var(--out), transform var(--dur) var(--out); pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .swatches.four { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .quick-nav { display: none; }
  .open-foot, .ch-grid, .two, .pdp-body, .trade { grid-template-columns: 1fr; }
  .ch-grid .print { order: -1; width: min(78%, 340px); justify-self: start; }
  .pdp-head .print { width: min(70%, 340px); }
  .two .print, .two .print.right { justify-self: start; }
  .story-hero .print { order: -1; }
  .trade > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .trade > div { padding: 56px 24px; }
  .swatches, .swatches.four { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pdp-side { position: static; }
  .note-tier { grid-template-columns: 1fr; gap: 8px; }
  .values div { grid-template-columns: 1fr; gap: 8px; }
  .footer-top { grid-template-columns: 1fr; }
  .sticky-buy { display: flex; }
  .sw-add { display: none; }
  .rail { right: 10px; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .hide-sm { display: none; }
  .logo { font-size: 24px; }
  .menu-label { display: none; }
  .h-1 { font-size: clamp(38px, 10.5vw, 46px); }
  .ch-name { font-size: clamp(48px, 15vw, 64px); }
  .swatches, .swatches.four { grid-template-columns: 1fr 1fr; gap: 10px; }
  .swatch > a { padding: 14px; }
  .swatch .sw-name { font-size: 24px; }
  .index a { grid-template-columns: 14px 1fr auto; }
  .index .fm { display: none; }
  .line-list .row { grid-template-columns: 14px 1fr auto; }
  .ws-form { grid-template-columns: 1fr; }
  .ws-head, .ls-grid, .why, .gift-row { grid-template-columns: 1fr; }
  .figures { grid-template-columns: 1fr 1fr; }
  .figures div:nth-child(3) { padding-left: 0; border-left: 0; }
  .figures div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ls .ls-for { display: none; }
  .ls tbody th { font-size: 17px; white-space: normal; }
  .line-list .row .btn { grid-column: 2 / 4; justify-self: start; }
  .sheet div { grid-template-columns: 1fr; gap: 4px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .buy-row, .field-row, .line-form { grid-template-columns: 1fr; }
  .perks { display: grid; gap: 4px; }
  .perks span::after { content: none !important; }
  .gallery { grid-template-columns: 1fr; }
  .rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .print { clip-path: none; }
}
