/* Esperanza Editorial — Design 3. Paper, ink, one rosa accent. 12-column grid, numbered plates, the Ledger. */

:root {
  --paper: #faf8f4;
  --paper-2: #f1ede6;
  --ink: #1a1816;
  --ink-2: #5b564f;
  --line: #e1dbd1;
  --rosa: #c4005f;
  --rosa-2: #a0004d;
  --rosa-tint: #fbe6ef;
  --serif: 'Instrument Serif', 'Times New Roman', Times, serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --m: clamp(20px, 4.5vw, 96px);
  --g: clamp(14px, 1.8vw, 32px);
  --sec: clamp(80px, 11vw, 176px);
  --bar-h: 60px;
  --max: 1760px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, .4vw + .9rem, 1.125rem)/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + 16px);
  scrollbar-color: #8a847b var(--paper);
}
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; min-height: 100vh; min-height: 100svh; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
::selection { background: var(--rosa); color: var(--paper); }
:focus-visible { outline: 2px solid var(--rosa); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -120px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 16px; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { padding-inline: var(--m); max-width: var(--max); margin-inline: auto; }

/* underline wipe */
.u {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: background-size .35s var(--ease), color .2s;
}
.u:hover, .u:focus-visible, .u[aria-current] { background-size: 100% 1px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75em;
  min-height: 50px; padding: .75em 1.4em; border: 1px solid var(--ink); border-radius: 2px;
  font: 600 .95rem/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; color: var(--ink);
  background: transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover, .btn-ink:focus-visible { background: var(--rosa); border-color: var(--rosa); }
.btn-line:hover, .btn-line:focus-visible { border-color: var(--rosa); color: var(--rosa); }
.btn-paper { background: var(--paper); border-color: var(--paper); color: var(--rosa); }
.btn-paper:hover, .btn-paper:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-num { font-weight: 400; font-variant-numeric: tabular-nums; opacity: .85; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; background: var(--paper); }
.bar-in {
  position: relative; display: flex; align-items: center; gap: 12px; height: var(--bar-h);
  padding-inline: var(--m); max-width: var(--max); margin-inline: auto;
}
.bar-in::after { content: ''; position: absolute; left: var(--m); right: var(--m); bottom: 0; height: 1px; background: var(--ink); }
.bar-mark { font: italic 400 1.5rem/1 var(--serif); letter-spacing: -.01em; text-decoration: none; margin-right: auto; padding: 10px 0; }
.bar-nav { display: flex; gap: 2px; margin-right: 10px; }
.bar-nav a { padding: 12px 12px; font: 500 .92rem/1 var(--sans); letter-spacing: .02em; }
.bar-nav a.u { background-position: 12px 100%; background-size: 0 1px; }
.bar-nav a.u:hover, .bar-nav a.u:focus-visible { background-size: calc(100% - 24px) 1px; }
.bar-index {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 14px;
  border: 1px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink);
  font: 600 .82rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.bar-index:hover, .bar-index:focus-visible { background: var(--ink); color: var(--paper); }
.ix-lines { display: grid; gap: 3px; }
.ix-lines i { display: block; width: 16px; height: 1.5px; background: currentColor; }
.bar-call { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--rosa); color: var(--paper); align-items: center; justify-content: center; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(16px, 2.6vw, 36px); }
.dateline {
  display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 clamp(18px, 3vw, 40px);
  padding-bottom: 12px; border-bottom: 1px solid var(--ink);
  font: 500 .75rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.dl-short { display: none; }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(20px, 3vw, 36px); }
.wordmark {
  grid-column: 1 / 9; display: flex; flex-direction: column; margin: 0;
  font: 400 clamp(4.2rem, 17.5vw, 19rem)/.86 var(--serif); letter-spacing: -.03em;
}
.wm-la { font-style: italic; padding-left: .06em; }
.wm-name { margin-left: -.02em; }
.hero-plate { grid-column: 9 / 13; grid-row: 1 / 3; margin: 0; }
.hero-plate img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 42%; }
.hero-copy { grid-column: 1 / 7; align-self: end; }
.promise { font: 400 clamp(1.15rem, 1.55vw, 1.5rem)/1.3 var(--sans); letter-spacing: -.01em; max-width: 30ch; margin: 0 0 1.1em; }
.hero-note { margin: 1.1em 0 0; font-size: .9rem; color: var(--ink-2); }

/* ---------- sections ---------- */
.sec { padding-top: var(--sec); }
.sec-head {
  display: grid; grid-template-columns: auto 1fr; column-gap: clamp(16px, 2.5vw, 40px); align-items: baseline;
  padding-top: 16px; border-top: 1px solid var(--ink); margin-bottom: clamp(36px, 5vw, 80px);
}
.sec-num { grid-row: 1 / 3; font: 400 clamp(4rem, 9vw, 9rem)/.85 var(--serif); letter-spacing: -.03em; color: var(--rosa); font-variant-numeric: tabular-nums; }
.sec-head h2 { font: 400 clamp(2.2rem, 4.6vw, 4.6rem)/1 var(--serif); letter-spacing: -.015em; }
.sec-sub { grid-column: 2; margin: .5em 0 0; max-width: 44ch; color: var(--ink-2); font-size: 1rem; }

/* plates and captions */
.plate { margin: 0; }
.plate img { width: 100%; object-fit: cover; }
.plate.r21 img { aspect-ratio: 21 / 9; }
.plate.r32 img { aspect-ratio: 3 / 2; }
.plate.r45 img { aspect-ratio: 4 / 5; }
.plate.r34 img { aspect-ratio: 3 / 4; }
.plate figcaption {
  display: grid; grid-template-columns: 5.2rem 1fr auto; column-gap: 14px; row-gap: 4px; align-items: baseline;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.plate-no { font: 500 .75rem/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rosa); white-space: nowrap; }
.plate-name { font: 400 1.45rem/1.1 var(--serif); letter-spacing: -.01em; }
.plate-price { font: 500 1rem/1.3 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.plate-desc { grid-column: 2 / 4; font: 400 .95rem/1.5 var(--sans); color: var(--ink-2); max-width: 52ch; }
.sheet-link { display: block; overflow: hidden; }
.sheet-link img { transition: transform .7s var(--ease); }
.sheet-link:hover img, .sheet-link:focus-visible img { transform: scale(1.02); }
.sheet-link:focus-visible { outline-offset: 4px; }
figure:has(.sheet-link:hover) figcaption { transform: translateX(4px); }
.plate figcaption, .sheet-item figcaption { transition: transform .5s var(--ease); }

/* pull quotes */
.pull { margin: 0; }
.pull p { margin: 0; font: italic 400 clamp(2rem, 4.2vw, 4.4rem)/1.02 var(--serif); letter-spacing: -.02em; text-wrap: balance; }
.pull cite { display: block; margin-top: 1.4em; font: 400 .88rem/1.5 var(--sans); font-style: normal; letter-spacing: .03em; color: var(--ink-2); }
.pull cite::before { content: ''; display: inline-block; width: 1.5rem; height: 1px; background: var(--rosa); vertical-align: middle; margin-right: .7em; }
.pull-sm p { font-size: clamp(1.35rem, 2.1vw, 2.1rem); line-height: 1.2; }

/* ---------- 01 story ---------- */
.story-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(48px, 6vw, 88px); }
.margin-notes { grid-column: 1 / 4; grid-row: 1; }
.badge { width: clamp(96px, 9vw, 150px); margin-bottom: 24px; }
.notes { margin: 0; border-top: 1px solid var(--ink); }
.notes div { display: grid; grid-template-columns: 6.2em 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.notes dt { color: var(--ink-2); }
.notes dd { margin: 0; font-weight: 500; }
.story-text { grid-column: 5 / 12; grid-row: 1; }
.paras { list-style: none; margin: 0; padding: 0; counter-reset: para; }
.paras li { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 8px; margin-bottom: 1.4em; }
.paras li::before { counter-increment: para; content: counter(para, decimal-leading-zero); font: 400 1rem/2 var(--serif); color: var(--rosa); font-variant-numeric: tabular-nums; }
.paras p { margin: 0; font: 400 clamp(1.45rem, 1.85vw, 1.85rem)/1.35 var(--serif); letter-spacing: -.005em; max-width: 42ch; }
.doc-plate { margin: 0; }
.doc-plate figcaption { margin-top: 10px; font: italic 400 .95rem/1.4 var(--serif); color: var(--ink-2); }
.doc-house { grid-column: 5 / 12; grid-row: 2; }

/* ---------- 02 plates grid ---------- */
.plates { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(48px, 7vw, 120px); align-items: end; }
.p1 { grid-column: 1 / 13; }
.q1 { grid-column: 1 / 5; padding-bottom: 2rem; }
.p2 { grid-column: 5 / 13; }
.p3 { grid-column: 1 / 6; }
.p4 { grid-column: 7 / 13; }
.p5 { grid-column: 1 / 13; }
.p6 { grid-column: 1 / 9; }
.p7 { grid-column: 9 / 13; }
.p8 { grid-column: 1 / 6; }
.q2 { grid-column: 7 / 13; padding-bottom: 2rem; }
.p1 img { object-position: 50% 55%; }
.p4 img { object-position: 50% 45%; }

/* ---------- 03 ledger ---------- */
.ledger-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 24px; margin-bottom: clamp(40px, 5vw, 72px); }
.ledger-top .pull { grid-column: 4 / 12; }
.legend { grid-column: 4 / 12; margin: 0; font-size: .9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.ledger-wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: start; }
.ledger-index { grid-column: 1 / 4; position: sticky; top: calc(var(--bar-h) + 20px); max-height: calc(100vh - var(--bar-h) - 40px); max-height: calc(100dvh - var(--bar-h) - 40px); overflow: auto; scrollbar-width: thin; }
.ledger-index ol { list-style: none; margin: 0; padding: 0; }
.ledger-index .ix-group { font: 500 .75rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); padding: 14px 0 6px; border-top: 1px solid var(--ink); margin-top: 14px; }
.ledger-index .ix-group:first-child { margin-top: 0; }
.ledger-index a { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; font: 400 1.02rem/1.3 var(--sans); text-decoration: none; color: var(--ink); transition: color .2s; }
.ledger-index a .ix-num { font: 400 .78rem/1 var(--serif); color: var(--rosa); min-width: 1.4em; font-variant-numeric: tabular-nums; }
.ledger-index a:hover, .ledger-index a:focus-visible { color: var(--rosa); }
.ledger-index a[aria-current] { color: var(--rosa); font-weight: 600; }
.ledger-index a[aria-current]::after { content: ''; flex: 1; height: 1px; background: var(--rosa); align-self: center; margin-left: 8px; }
.ledger { grid-column: 4 / 13; }
.part-title { font: 400 clamp(2.4rem, 4vw, 4rem)/1 var(--serif); letter-spacing: -.02em; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.part-title span { display: inline-block; margin-left: .35em; font: italic 400 clamp(1.3rem, 2vw, 2rem)/1 var(--serif); color: var(--rosa); }
.ledger-part + .ledger-part { margin-top: clamp(56px, 7vw, 112px); }
.cat { padding-top: 2.2rem; margin-top: 2.2rem; border-top: 1px solid var(--ink); scroll-margin-top: calc(var(--bar-h) + 24px); }
.part-title + .cat { border-top: 0; margin-top: 0; padding-top: 1.6rem; }
.cat-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 1.1rem; }
.cat-num { font: 400 2.4rem/1 var(--serif); color: var(--rosa); min-width: 2.1em; letter-spacing: -.02em; }
.cat-head h4 { font: 400 clamp(1.7rem, 2.6vw, 2.4rem)/1.05 var(--serif); letter-spacing: -.01em; }
.cat-en { display: block; margin-top: .45em; font: 400 .92rem/1.3 var(--sans); color: var(--ink-2); letter-spacing: 0; }
.cat-note { margin: 0 0 1.4rem; font: italic 400 1.08rem/1.5 var(--serif); color: var(--ink-2); max-width: 64ch; }
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: .85rem 0; border-top: 1px solid var(--line); break-inside: avoid; }
.item-row { display: flex; align-items: baseline; gap: 1rem; }
.item-name { font: 600 1.02rem/1.3 var(--sans); }
.item-price { margin-left: auto; font: 500 1rem/1.3 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-ask { font: italic 400 1rem/1.3 var(--serif); color: var(--ink-2); }
.price-mp { font: 500 .85rem/1.3 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.item-desc { margin: .3rem 0 0; font: 400 .93rem/1.5 var(--sans); color: var(--ink-2); max-width: 60ch; }
.item-add { margin: .3rem 0 0; font: italic 400 .95rem/1.4 var(--serif); color: var(--ink-2); }
.sig { display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: var(--rosa); margin-right: .5em; vertical-align: .1em; }
.fav { font: italic 400 .95rem/1 var(--serif); color: var(--rosa); margin-left: .5em; white-space: nowrap; }
.legend .fav { margin: 0; }
.beer-group + .beer-group { margin-top: 1.6rem; }
.group-head { display: flex; align-items: baseline; gap: 1rem; font: 600 1.02rem/1.3 var(--sans); padding-bottom: .5rem; border-bottom: 1px solid var(--ink); }
.group-head .item-price { font-weight: 500; }
.items-run .item { padding: .4rem 0; border-top: 0; }
.ledger-notes { margin-top: clamp(40px, 5vw, 64px); padding-top: 20px; border-top: 1px solid var(--ink); font-size: .88rem; color: var(--ink-2); max-width: 70ch; }
.ledger-notes p { margin: 0 0 .6em; }

/* ---------- 04 bar ---------- */
.bar-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: start; }
.bar-field { grid-column: 1 / 10; grid-row: 1; background: var(--rosa); color: var(--paper); padding: clamp(24px, 4vw, 64px) clamp(24px, 4vw, 64px) clamp(48px, 7vw, 112px); }
.bar-field > :not(.sec-head) { max-width: 70%; }
.sec-head-inv { border-top-color: var(--paper); margin-bottom: clamp(32px, 4vw, 64px); }
.sec-head-inv .sec-num { color: var(--paper); }
.sec-head-inv .sec-sub { color: var(--rosa-tint); }
.pull-inv p { max-width: 14ch; }
.pull-inv cite { color: var(--rosa-tint); }
.pull-inv cite::before { background: var(--paper); }
.bar-copy { max-width: 52ch; margin: clamp(28px, 3vw, 44px) 0 2em; font-size: 1.05rem; }
.bar-plate { grid-column: 8 / 13; grid-row: 1; margin: clamp(160px, 29vw, 460px) calc(-1 * var(--m)) 0 0; z-index: 1; }
.bar-plate img { object-position: 50% 100%; }
.bar-plate figcaption { margin-top: 0; padding: 12px var(--m) 0 0; border-top: 0; background: var(--paper); }

/* ---------- 05 contact sheet ---------- */
.sheet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: clamp(36px, 4.5vw, 72px); align-items: start; }
.sheet-item { margin: 0; }
.sheet-item img { width: 100%; object-fit: cover; }
.a54 img { aspect-ratio: 5 / 4; }
.a11 img { aspect-ratio: 1; }
.a34 img { aspect-ratio: 3 / 4; }
.a32 img { aspect-ratio: 3 / 2; }
.sheet-item figcaption { display: flex; gap: 12px; margin-top: 10px; font: 400 .9rem/1.4 var(--sans); color: var(--ink-2); }
.sheet-item .plate-no { line-height: 1.6; }
.g-3 { grid-column: span 3; }
.g-4 { grid-column: span 4; }
.g-5 { grid-column: span 5; }
.g-6 { grid-column: span 6; }

/* ---------- 06 visit ---------- */
.visit-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 48px; align-items: start; }
.visit-hours { grid-column: 1 / 5; }
.visit-where { grid-column: 5 / 9; }
.visit-hello { grid-column: 9 / 13; }
.visit h3 { font: 500 .75rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 .9rem; }
.visit-where > h3:not(:first-child) { margin-top: 2.2rem; }
.hours { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: .85rem 0; border-top: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 1px solid var(--line); }
.hours td { text-align: right; font-weight: 500; }
.hours th { color: var(--ink-2); }
.hours .closed td { color: var(--rosa); font-weight: 600; }
.hours .closed th { color: var(--ink); }
.visit-p { max-width: 36ch; margin: 0; }
.address { font: 400 clamp(1.9rem, 2.8vw, 2.8rem)/1.08 var(--serif); letter-spacing: -.01em; margin: 0 0 1.1em; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { border-top: 1px solid var(--line); }
.links li:last-child { border-bottom: 1px solid var(--line); }
.links a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: .85rem 0; text-decoration: none; transition: color .2s; }
.links a span:first-child { color: var(--ink-2); }
.links a span:last-child { font-weight: 500; text-align: right; }
.links a:hover, .links a:focus-visible { color: var(--rosa); }
.links a:hover span:first-child { color: var(--rosa); }

/* ---------- footer ---------- */
.foot { margin-top: var(--sec); background: var(--ink); color: var(--paper); padding: clamp(56px, 7vw, 112px) 0 calc(40px + env(safe-area-inset-bottom)); }
.foot-mark { margin: 0 0 32px; font: 400 clamp(3.2rem, 8vw, 8.5rem)/.9 var(--serif); letter-spacing: -.03em; }
.foot-mark span { display: block; margin-top: 28px; font: italic 400 clamp(1.1rem, 1.6vw, 1.6rem)/1.3 var(--serif); letter-spacing: 0; color: #cfc8bd; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px var(--g); padding: 28px 0 36px; border-top: 1px solid #3b3733; }
.foot h3 { font: 500 .75rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #bdb6ab; margin: 0 0 .7rem; }
.foot p { margin: 0; line-height: 1.7; }
.foot-fine { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; margin: 0; padding-top: 20px; border-top: 1px solid #3b3733; font-size: .88rem; color: #bdb6ab; }
.foot-fine a { padding: 4px 0; }

/* ---------- dock (phones) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: none; grid-template-columns: 1fr 1fr; gap: 1px;
  background: #3b3733; padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(105%); visibility: hidden;
  transition: transform .4s var(--ease), visibility 0s linear .4s;
}
.dock.show { transform: none; visibility: visible; transition-delay: 0s; }
.dock-btn { display: flex; align-items: center; justify-content: center; min-height: 58px; background: var(--ink); color: var(--paper); font: 600 1rem/1 var(--sans); text-decoration: none; }
.dock-btn:first-child { background: var(--rosa); }

/* ---------- dialogs ---------- */
dialog { color: var(--ink); }
.index, .lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; }
.index::backdrop, .lb::backdrop { background: transparent; }
.index { background: var(--paper); }
.index-in { height: 100%; overflow: auto; display: flex; flex-direction: column; padding: 0 var(--m) calc(20px + env(safe-area-inset-bottom)); max-width: var(--max); margin-inline: auto; }
.index-top { display: flex; align-items: center; justify-content: space-between; flex: none; height: var(--bar-h); border-bottom: 1px solid var(--ink); }
.index-mark { margin: 0; font: italic 400 1.5rem/1 var(--serif); }
.btn-close { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px 0 12px; border: 0; background: transparent; color: var(--ink); font: 600 .82rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.btn-close:hover, .btn-close:focus-visible { color: var(--rosa); }
.index-body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: center; margin: auto 0; padding: clamp(24px, 3vh, 40px) 0; }
.index-list { grid-column: 1 / 9; list-style: none; margin: 0; padding: 0; }
.index-list a { display: flex; align-items: baseline; gap: .5em; padding: .16em 0; border-bottom: 1px solid var(--line); font: 400 clamp(2.6rem, 5vw, 5.4rem)/1.1 var(--serif); letter-spacing: -.02em; text-decoration: none; color: var(--ink); transition: color .2s; }
.index-list a:hover, .index-list a:focus-visible { color: var(--rosa); }
.ix-no { font: 500 .8rem/1 var(--sans); letter-spacing: .12em; color: var(--rosa); min-width: 2.6em; font-variant-numeric: tabular-nums; }
.index-plate { grid-column: 9 / 13; margin: 0; }
.index-plate img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 50%; }
.index-foot { flex: none; display: flex; flex-wrap: wrap; gap: 6px 26px; padding-top: 16px; border-top: 1px solid var(--ink); font-size: .95rem; }
.index-foot a { padding: 6px 0; }

.lb { background: #121110; color: var(--paper); }
.lb-in { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; row-gap: 8px; padding: 10px var(--m) calc(10px + env(safe-area-inset-bottom)); }
.lb-close { justify-self: end; }
.lb-fig { margin: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lb-img { max-width: 100%; max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); width: auto; height: auto; object-fit: contain; }
.lb-cap { font: 400 .95rem/1.4 var(--sans); color: #cfc8bd; text-align: center; max-width: 60ch; }
.lb-nav { display: flex; align-items: center; justify-content: center; gap: 18px; }
.lb-count { font: 500 .85rem/1 var(--sans); letter-spacing: .06em; color: #cfc8bd; font-variant-numeric: tabular-nums; min-width: 7em; text-align: center; }
.lb button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid #4a4642; background: transparent; color: var(--paper); cursor: pointer; transition: border-color .2s, background-color .2s; }
.lb button:hover, .lb button:focus-visible { border-color: var(--paper); background: #1f1d1b; }

@keyframes ix-in { from { clip-path: inset(0 0 100% 0); opacity: .4; } to { clip-path: inset(0); opacity: 1; } }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.index[open] { animation: ix-in .36s var(--ease); }
.lb[open] { animation: lb-in .25s ease-out; }

/* ---------- reveals ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .ledger-top .pull, .legend { grid-column: 1 / -1; }
  .ledger-wrap { display: block; }
  .ledger-index {
    position: sticky; top: var(--bar-h); z-index: 5; max-height: none; overflow: visible;
    margin: 0 calc(-1 * var(--m)) 24px; padding: 0 var(--m); background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .ledger-index ol { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; -webkit-overflow-scrolling: touch; }
  .ledger-index ol::-webkit-scrollbar { display: none; }
  .ledger-index li { flex: none; }
  .ledger-index .ix-group { display: none; }
  .ledger-index a { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; align-items: center; white-space: nowrap; }
  .ledger-index a .ix-num { min-width: 0; }
  .ledger-index a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 500; }
  .ledger-index a[aria-current] .ix-num { color: var(--rosa-tint); }
  .ledger-index a[aria-current]::after { display: none; }
  .cat { scroll-margin-top: calc(var(--bar-h) + 76px); }
  .visit-hours { grid-column: 1 / 6; }
  .visit-where { grid-column: 7 / 13; }
  .visit-hello { grid-column: 1 / 13; }
}
@media (min-width: 1100px) {
  .items { columns: 2; column-gap: clamp(28px, 3.5vw, 56px); }
  .items-run { columns: 3; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .items-run { columns: 2; }
}
@media (max-width: 899px) {
  .hero-grid { row-gap: 20px; }
  .wordmark, .hero-plate, .hero-copy { grid-column: 1 / -1; }
  .wordmark { order: 1; font-size: 23vw; }
  .hero-copy { order: 2; }
  .hero-plate { order: 3; grid-row: auto; margin: 8px calc(-1 * var(--m)) 0; }
  .hero-plate img { aspect-ratio: 4 / 5; }
  .hero-plate figcaption { margin-inline: var(--m); }
  .promise { max-width: none; }
  .dl-mid { display: none; }
  .dateline { font-size: .72rem; letter-spacing: .1em; }
  .story-grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .margin-notes { order: 2; }
  .story-text { order: 1; }
  .doc-house { order: 3; }
  .plates { align-items: start; }
  .plates > * { grid-column: 1 / -1; }
  .plate.r21 img { aspect-ratio: 4 / 3; }
  .p1, .p2, .p5, .p6 { margin-inline: calc(-1 * var(--m)); }
  .p1 figcaption, .p2 figcaption, .p5 figcaption, .p6 figcaption { margin-inline: var(--m); }
  .p3, .p8 { grid-column: 1 / 11; }
  .p4, .p7 { grid-column: 3 / 13; }
  .q1, .q2 { padding: 0; }
  .bar-grid { display: block; }
  .bar-field { margin-inline: calc(-1 * var(--m)); padding-inline: var(--m); padding-bottom: clamp(96px, 18vw, 160px); }
  .bar-field > :not(.sec-head) { max-width: none; }
  .bar-plate { margin: -88px calc(-1 * var(--m)) 0 auto; width: 82%; }
  .bar-plate figcaption { padding-right: var(--m); }
  .sheet > * { grid-column: span 6; }
  .sheet > * img { aspect-ratio: 4 / 5; }
  .sheet > :nth-child(5n + 1) { grid-column: span 12; }
  .sheet > :nth-child(5n + 1) img { aspect-ratio: 3 / 2; }
  .sheet-item figcaption { font-size: .85rem; }
  .visit-grid > * { grid-column: 1 / -1 !important; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-body { display: block; padding: clamp(28px, 6vh, 64px) 0; }
  .index-plate { display: none; }
  .index-list a { font-size: clamp(2.5rem, 11.5vw, 4rem); padding: .28em 0; }
}
@media (max-width: 767px) {
  :root { --bar-h: 56px; }
  .bar-nav { display: none; }
  .bar-call { display: inline-flex; }
  .bar-mark { font-size: 1.35rem; }
  .bar-index { padding: 0 14px 0 12px; }
  .dock { display: grid; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .hero .actions .btn { flex: 1 1 0; padding-inline: .8em; }
  .actions .btn { flex: 1 1 auto; }
  .foot-mark span { font-size: 1rem; }
}
@media (max-width: 599px) {
  .dl-mid, .dl-long { display: none; }
  .dl-short { display: inline; }
  .hero .btn-num { display: none; }
}
@media (max-width: 479px) {
  .plate figcaption { grid-template-columns: 1fr auto; }
  .plate-no { grid-column: 1 / -1; }
  .plate-desc { grid-column: 1 / -1; }
  .sec-sub { grid-column: 1 / -1; }
  .sec-num { grid-row: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .items-run { columns: 2; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sheet-link:hover img { transform: none; }
  figure:has(.sheet-link:hover) figcaption { transform: none; }
}
