/* ─────────────────────────────────────────────────────────────────────────────
   Tokens
   A dark stained room. The prints behind the acrylic bring the colour.
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --bg:          #171210;
  --bg-2:        #1F1813;
  --panel:       #2A211B;
  --text:        #F0E7D9;
  --muted:       #A4957F;
  --brass:       #C9A765;
  --brass-deep:  #9C7A3C;
  --rule:        rgba(240, 231, 217, 0.14);
  --focus:       #8FB4D1;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body:    "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --measure: 30rem;
  --gutter: 16px;
  --max: 1120px;
  --radius: 4px;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 15% -10%, rgba(201,167,101,0.10), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(0,0,0,0.5), transparent 60%);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: 0.8em; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 3px;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Masthead ───────────────────────────────────────────────────────────── */
.masthead {
  max-width: var(--max); margin: 0 auto; padding: 1.2rem var(--gutter) 0;
  display: flex; align-items: baseline; justify-content: space-between;
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.1em; text-decoration: none; }
.masthead-cta { text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--brass); padding-bottom: 2px; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.button {
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.35rem; border-radius: var(--radius);
  border: 1px solid transparent; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.button:active { transform: translateY(1px); }
.button-primary { background: var(--brass); border-color: var(--brass); color: #1A130E; }
.button-primary:hover { background: #DDBD7E; }
.button-primary[disabled] { opacity: 0.6; cursor: progress; }
.button-brass { background: var(--brass); border-color: var(--brass); color: #1A130E; }
.button-quiet { background: transparent; color: var(--text); border-color: var(--rule); }
.button-quiet:hover { border-color: var(--brass); }
.button-wide { width: 100%; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: 2.5rem var(--gutter) 2rem;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center;
  overflow-x: clip;
}
@media (min-width: 880px) {
  .hero { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); min-height: calc(100vh - 4.5rem); gap: 2rem; padding-top: 1rem; }
}
.hero-copy h1 { margin-bottom: 1.1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 24rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.hero-note { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
.hero-note:empty { display: none; }
.hero-hint { margin-top: 2rem; font-size: 0.9rem; color: var(--brass); }
@media (max-width: 879px) { .hero-hint { display: none; } }
.hero-copy, .hero-plaque { min-width: 0; }

/* ─── The plaque ─────────────────────────────────────────────────────────── */
.plaque-scene { margin: 0; position: relative; width: 100%; max-width: 380px; margin-inline: auto; padding-top: 4.2rem; }
@media (min-width: 880px) { .plaque-scene { max-width: 420px; } }

.nail {
  position: absolute; top: 0.8rem; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #E3CB95, var(--brass) 55%, #5E4720);
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.wire { position: absolute; top: 1rem; left: 6%; width: 88%; height: 3.3rem; fill: none; stroke: var(--brass); stroke-width: 1.1; stroke-linecap: round; opacity: 0.8; }

.plaque {
  aspect-ratio: 7 / 9; padding: 7%; border-radius: 6px; position: relative;
  transform-origin: 50% -3.3rem;
  --grain-a: #4A3222; --grain-b: #3A2518; --grain-c: #5C4130;
  background: repeating-linear-gradient(97deg, var(--grain-a) 0 7px, var(--grain-b) 7px 9px, var(--grain-c) 9px 15px, var(--grain-a) 15px 26px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08), inset 0 -3px 6px rgba(0,0,0,0.35),
    0 1px 0 rgba(255,255,255,0.12), 0 24px 40px -18px rgba(0,0,0,0.8), 0 60px 80px -40px rgba(0,0,0,0.6);
  transition: background-color 300ms ease;
}
.plaque[data-stain="natural"] { --grain-a: #D8C4A0; --grain-b: #C4AC84; --grain-c: #E6D5B5; }
.plaque[data-stain="ebony"]   { --grain-a: #1E1A17; --grain-b: #141110; --grain-c: #2A2522; }

@keyframes settle { 0% { transform: rotate(-2.2deg); } 40% { transform: rotate(1.3deg); } 70% { transform: rotate(-0.5deg); } 100% { transform: rotate(0); } }
.hero-plaque .plaque { animation: settle 2.4s cubic-bezier(.3,.7,.3,1) 0.2s both; }
@media (prefers-reduced-motion: reduce) { .hero-plaque .plaque { animation: none; } }

.plaque-face { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 2px; background: #000; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.6), inset 0 2px 6px rgba(0,0,0,0.6); }
.plaque-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 220ms ease; }
.plaque-art.swapping { opacity: 0; }
.plaque-small { max-width: 240px; margin-inline: auto; }

/* hardware (cloned from the template) */
.acrylic {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0.06) 26%, rgba(255,255,255,0) 44%, rgba(255,255,255,0.04) 74%, rgba(255,255,255,0.15) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28), inset 0 0 0 2px rgba(0,0,0,0.25);
}
.screw { position: absolute; width: 4.2%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #4a4a4a, #161616 55%, #000 100%); box-shadow: 0 1px 2px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.08); }
.screw-tl { top: 2.6%; left: 3%; } .screw-tr { top: 2.6%; right: 3%; } .screw-bl { bottom: 2.6%; left: 3%; } .screw-br { bottom: 2.6%; right: 3%; }
.tube { position: absolute; left: 30%; top: 33%; width: 15%; filter: drop-shadow(0 5px 7px rgba(0,0,0,0.5)); }
.tube-fill { transform-box: fill-box; transform-origin: 50% 100%; transition: transform 500ms cubic-bezier(.2,.8,.2,1); }
.tube-fill rect:first-child { transition: fill 400ms ease; }
.plaque.is-empty .tube-fill { transform: scaleY(0); }
.chain { position: absolute; right: 25%; top: 40%; width: 14%; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }

/* hotspots */
.spots { position: absolute; inset: 4.2rem 0 0 0; pointer-events: none; }
.spot { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.spot-dot {
  width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 40% 35%, #F1DBA8, var(--brass) 60%, var(--brass-deep));
  box-shadow: 0 0 0 4px rgba(201,167,101,0.25), 0 2px 6px rgba(0,0,0,0.6);
  animation: pulse 2.6s ease-in-out infinite;
}
.spot[aria-expanded="true"] .spot-dot, .spot:hover .spot-dot { animation: none; box-shadow: 0 0 0 6px rgba(201,167,101,0.35), 0 2px 6px rgba(0,0,0,0.6); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(201,167,101,0.25), 0 2px 6px rgba(0,0,0,0.6); } 50% { box-shadow: 0 0 0 9px rgba(201,167,101,0.08), 0 2px 6px rgba(0,0,0,0.6); } }
@media (prefers-reduced-motion: reduce) { .spot-dot { animation: none; } }
.spot-label {
  position: absolute; top: 50%; left: calc(100% + 12px); transform: translateY(-50%);
  min-width: 11rem; max-width: 14rem; padding: 0.6rem 0.8rem; border-radius: var(--radius);
  background: var(--panel); color: var(--text); font-size: 0.92rem; line-height: 1.35;
  border: 1px solid var(--rule); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transition: opacity 150ms ease, visibility 150ms;
}
.spot-label strong { display: block; font-weight: 600; margin-bottom: 0.1rem; }
.spot-label span { color: var(--muted); }
.spot.flip .spot-label { left: auto; right: calc(100% + 12px); }
.spot[aria-expanded="true"] .spot-label { opacity: 1; visibility: visible; }
@media (max-width: 879px) {
  .spot-label { min-width: 9rem; max-width: 11rem; font-size: 0.85rem; }
}

/* art strip under the hero plaque */
.art-strip { display: flex; gap: 0.6rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }
.art-strip button {
  width: 48px; aspect-ratio: 7 / 9; padding: 0; border: 2px solid transparent; border-radius: 3px; cursor: pointer;
  background: #000; overflow: hidden; opacity: 0.6; transition: opacity 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.art-strip button img { width: 100%; height: 100%; object-fit: cover; }
.art-strip button:hover { opacity: 0.9; }
.art-strip button[aria-selected="true"] { opacity: 1; border-color: var(--brass); transform: translateY(-2px); }

/* ─── Three words ────────────────────────────────────────────────────────── */
.steps {
  list-style: none; margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; max-width: var(--max);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  border-top: 1px solid var(--rule);
}
.steps li { display: flex; flex-direction: column; gap: 0.15rem; }
.steps h3 { font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 2.4vw, 1.35rem); color: var(--brass); }
.steps p { color: var(--muted); font-size: 0.95rem; }

/* ─── Editions as posters ────────────────────────────────────────────────── */
.editions { padding: 2rem 0 4rem; }
.section-head { max-width: var(--max); margin: 0 auto 1.6rem; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 2rem; }
.section-head p { color: var(--muted); }
.posters {
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.5rem max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 1rem;
  scrollbar-width: thin; scrollbar-color: var(--panel) transparent;
}
.poster {
  flex: 0 0 min(72vw, 250px); scroll-snap-align: start;
  background: var(--bg-2); border: 1px solid var(--rule); border-radius: 6px; padding: 0; text-align: left;
  color: inherit; font: inherit; cursor: pointer; overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}
.poster:hover { transform: translateY(-4px); border-color: rgba(201,167,101,0.5); }
.poster[aria-pressed="true"] { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 18px 40px -16px rgba(0,0,0,0.8); }
.poster img { width: 100%; aspect-ratio: 7 / 9; object-fit: cover; }
.poster-text { display: block; padding: 0.85rem 0.95rem 1rem; }
.poster-text strong { display: block; font-weight: 600; font-size: 1.05rem; }
.poster-text span { display: block; color: var(--brass); font-size: 0.88rem; margin: 0.1rem 0 0.35rem; }
.poster-text em { display: block; font-style: normal; color: var(--muted); font-size: 0.92rem; }
.poster-text b { display: inline-block; margin-top: 0.6rem; font-weight: 600; font-size: 0.9rem; color: var(--text); border-bottom: 1px solid var(--brass); }
.poster[aria-pressed="false"] .poster-text b { visibility: hidden; }

/* ─── Gallery ────────────────────────────────────────────────────────────── */
.gallery { max-width: var(--max); margin: 0 auto; padding: 1rem var(--gutter) 4rem; }
.gallery h2 { margin-bottom: 1.4rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.gallery-grid figcaption { margin-top: 0.4rem; font-size: 0.9rem; color: var(--muted); }

/* ─── Ritual ─────────────────────────────────────────────────────────────── */
.ritual { background: #0F0B09; display: grid; grid-template-columns: 1fr; }
.ritual[hidden] { display: none; }
.ritual-art img { width: 100%; height: 100%; object-fit: cover; max-height: 70vh; }
.ritual-copy { padding: 3rem var(--gutter) 3.5rem; max-width: calc(var(--max) / 2); }
@media (min-width: 880px) {
  .ritual { grid-template-columns: 1fr 1fr; }
  .ritual-art img { max-height: none; min-height: 100%; }
  .ritual-copy { padding: 5rem 3rem 5rem 3.5rem; align-self: center; }
}
.ritual h2 { margin-bottom: 1rem; }
.ritual p { font-size: 1.1rem; }
.empty-notice { margin-top: 1.2rem; padding: 0.7rem 0 0.7rem 0.9rem; border-left: 2px solid var(--brass); color: var(--muted); font-size: 1rem; }
.ebook { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.ebook[hidden] { display: none; }
.ebook > p { color: var(--muted); font-size: 1rem; }
.ebook > p strong { color: var(--text); }
.guide-form { margin-top: 1rem; }
.guide-form[hidden] { display: none; }
.guide-form label { display: block; margin-bottom: 0.5rem; font-size: 0.95rem; }
.guide-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.guide-row input[type="email"] { flex: 1 1 200px; }

/* ─── Story ──────────────────────────────────────────────────────────────── */
.story { max-width: var(--max); margin: 0 auto; padding: 4rem var(--gutter) 2rem; display: grid; gap: 1.2rem 3rem; }
@media (min-width: 880px) { .story { grid-template-columns: 1fr 1.5fr; } .story h2 { grid-row: span 2; } }
.story h2 { max-width: 12ch; }
.story-body p { font-size: 1.12rem; max-width: 34rem; }
.story-signature { color: var(--muted); font-style: italic; }

/* ─── Order ──────────────────────────────────────────────────────────────── */
.order { max-width: var(--max); margin: 0 auto; padding: 4rem var(--gutter) 4rem; display: grid; gap: 2rem; }
@media (min-width: 880px) { .order { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; align-items: start; } .order-plaque { position: sticky; top: 2rem; } }
.order-plaque-caption { text-align: center; margin-top: 1rem; color: var(--muted); font-size: 0.9rem; max-width: none; }
.order-form h2 { margin-bottom: 0.4rem; }
.order-sub { color: var(--muted); margin-bottom: 1.6rem; }
.choice-group { border: 0; padding: 0; margin: 0 0 1.3rem; }
.choice-group legend { font-weight: 600; padding: 0; margin-bottom: 0.5rem; font-size: 0.95rem; color: var(--muted); }

.pills, .swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill, .swatch-choice {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.5rem 0.85rem; border: 1px solid var(--rule); border-radius: 999px; font-size: 0.95rem;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.pill input, .swatch-choice input, .thumb input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill:has(input:checked), .swatch-choice:has(input:checked) { border-color: var(--brass); background: rgba(201,167,101,0.1); }
.pill:has(input:focus-visible), .swatch-choice:has(input:focus-visible), .thumb:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.pill small { color: var(--brass); }
.swatch-choice .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4); }
.swatch-choice.soon { opacity: 0.45; cursor: default; }

.thumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.thumb { position: relative; width: 56px; aspect-ratio: 7 / 9; cursor: pointer; border-radius: 3px; overflow: hidden; border: 2px solid transparent; opacity: 0.7; transition: opacity 120ms ease, border-color 120ms ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:has(input:checked) { border-color: var(--brass); opacity: 1; }

.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--brass); }
.price { font-family: var(--display); font-size: 1.7rem; }
.price.pending { font-family: var(--body); font-size: 1rem; color: var(--muted); }
.shipping-note { font-size: 0.9rem; color: var(--muted); }

.waitlist-fields { margin-bottom: 0.7rem; }
.waitlist-fields[hidden] { display: none; }
input[type="email"] {
  font: inherit; width: 100%; padding: 0.85rem 0.9rem; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--bg-2); color: var(--text);
}
input[type="email"]::placeholder { color: #7B6E5D; }
input[type="email"]:focus { border-color: var(--brass); }
.form-status { margin-top: 0.7rem; min-height: 1.4em; color: var(--muted); font-size: 0.95rem; }
.form-status.error { color: #F0A58F; }
.form-status.ok { color: var(--text); }

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.faq { max-width: var(--max); margin: 0 auto; padding: 1rem var(--gutter) 5rem; }
.faq h2 { margin-bottom: 1.2rem; }
.faq-list { border-top: 1px solid var(--brass); max-width: 40rem; }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { cursor: pointer; padding: 0.95rem 2rem 0.95rem 0; font-weight: 600; list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 0.3rem; top: 50%; width: 0.5rem; height: 0.5rem;
  border-right: 1.5px solid var(--brass); border-bottom: 1.5px solid var(--brass);
  transform: translateY(-70%) rotate(45deg); transition: transform 160ms ease;
}
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { padding: 0 0 1rem; color: var(--muted); max-width: 36rem; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer { background: #0F0B09; padding: 2.2rem var(--gutter) 2.6rem; }
.footer > * { max-width: var(--max); margin-inline: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1rem; font-size: 0.95rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-fine { margin-top: 1.2rem; font-size: 0.85rem; color: var(--muted); max-width: none; }

/* ─── Legal, success, 404 pages ──────────────────────────────────────────── */
.legal-page, .success-page, .lost-page { max-width: 42rem; margin: 0 auto; padding: 2rem var(--gutter) 5rem; }
.legal-page h1, .success-page h1, .lost-page h1 { margin: 2rem 0 0.6rem; }
.legal-page h2 { margin: 2.6rem 0 0.7rem; font-size: 1.4rem; }
.legal-page p, .legal-page li, .success-page p, .lost-page p { max-width: none; }
.legal-page ul { padding-left: 1.2rem; }
.order-summary { margin: 2rem 0; border-top: 1px solid var(--brass); }
.order-summary div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.order-summary dt { color: var(--muted); }
.order-summary dd { margin: 0; }
.download-card { margin-top: 2rem; padding: 1.4rem; background: var(--bg-2); border-radius: 6px; border: 1px solid var(--rule); }
.download-card h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.download-card .button { margin-top: 1rem; }
.lost-page .button { margin-top: 1.5rem; }

[hidden] { display: none !important; }
