:root {
  --ink: #140e0b;
  --ink-soft: #3a2a22;
  --night: #1b130f;
  --paper: #f6efe2;
  --paper-2: #fff8ee;
  --red: #c4322a;
  --red-deep: #8d1c18;
  --gold: #e2b656;
  --straw: #c9a36a;
  --mute: #6f5848;
  --line: rgba(20, 14, 11, 0.16);
  --shadow: 6px 8px 0 var(--ink);
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --header: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--night);
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; }

button, input, textarea { font-family: inherit; }

a { color: inherit; }

::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 20;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

/* Header */

.mast {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 4px solid var(--ink);
  min-height: var(--header);
}

.mast-inner {
  width: min(1180px, calc(100% - 28px));
  margin-inline: auto;
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: var(--paper-2);
  border: 2px solid var(--ink);
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand b {
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand small {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--red);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 10px;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* Buttons — press into the ink shadow */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 3px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, letter-spacing 0.15s ease, background 0.15s ease;
}

.btn img { width: 18px; height: 18px; object-fit: contain; }

.btn:hover {
  transform: translate(2px, 3px);
  box-shadow: 0 0 0 var(--ink);
  letter-spacing: 0.04em;
}

.btn:active { transform: translate(3px, 4px); }

.btn-buy {
  background: linear-gradient(180deg, #d6453c, var(--red));
  color: var(--paper);
}

.btn-buy:hover { background: var(--red-deep); color: var(--paper); }

.icon-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 1.05rem;
}

.icon-btn .bi { line-height: 1; }

/* Hero cover */

.hero {
  padding: 28px 0 10px;
}

.hero-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: center;
}

.panel {
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(22px, 4vw, 42px);
}

.kicker {
  margin: 0 0 8px;
  color: var(--red);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
}

h1, h2, h3 { font-weight: 900; letter-spacing: -0.03em; }

h1 {
  margin: 0;
  font-size: clamp(3.3rem, 7.4vw, 6.1rem);
  line-height: 0.92;
}

.ticker {
  margin: 12px 0 0;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.bubble {
  margin: 22px 0 0;
  position: relative;
  display: inline-block;
  max-width: 100%;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.35;
}

.bubble::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  background: var(--paper-2);
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: skewX(-28deg);
}

.lede {
  margin: 26px 0 0;
  max-width: 38rem;
  font-size: 1.15rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.ca-well {
  margin-top: 18px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  background: var(--paper-2);
  border: 2px dashed var(--ink);
  padding: 8px;
}

.ca-well code,
.mint {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.45;
  word-break: break-all;
}

.ca-well code {
  flex: 1;
  align-self: center;
  padding: 4px 6px;
}

.fine {
  margin: 10px 0 0;
  color: var(--mute);
  font-size: 0.95rem;
}

.hero-fig {
  margin: 0;
  background: #1a1916;
  overflow: hidden;
}

.hero-fig img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hero-fig figcaption,
.caption {
  margin: 0;
  padding: 10px 12px 12px;
  background: var(--paper);
  border-top: 3px solid var(--ink);
  font-weight: 700;
}

/* Story */

section { padding: 22px 0; }

#story,
#way,
#receipt,
#pictures,
#hello { scroll-margin-top: calc(var(--header) + 10px); }

.sheet {
  background: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 32px);
}

.section-head { margin-bottom: 18px; }

.section-head h2,
.closer h2,
.receipt h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
}

.section-head p { margin: 8px 0 0; max-width: 40rem; }

.story {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: center;
}

.story-fig {
  margin: 0;
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
}

.story-fig img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #12161c;
}

.story-paper {
  background: var(--paper-2);
  border: 3px solid var(--ink);
  padding: 36px 28px 32px;
  filter: drop-shadow(6px 8px 0 var(--ink));
  clip-path: polygon(
    0 10px, 7% 0, 16% 12px, 28% 0, 40% 11px, 52% 0, 64% 12px,
    76% 0, 88% 10px, 100% 0, 100% calc(100% - 12px), 92% 100%,
    80% calc(100% - 10px), 68% 100%, 54% calc(100% - 12px),
    40% 100%, 26% calc(100% - 8px), 12% 100%, 0 calc(100% - 10px)
  );
}

.beats { margin: 16px 0 0; padding: 0; list-style: none; }

.beats li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.story-paper .btn { margin-top: 8px; }

/* How to buy — spine, no index numbers */

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
  padding-top: 16px;
}

.steps::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 4px;
  background: var(--red);
}

.step {
  position: relative;
  background: var(--paper-2);
  border: 3px solid var(--ink);
  padding: 16px 14px 18px;
  box-shadow: 4px 5px 0 var(--ink);
}

.step-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--red);
  border-radius: 50%;
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.step h3 { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.15; }

.step p { margin: 0; font-size: 1rem; }

.step .mint {
  display: block;
  margin-top: 8px;
  padding: 8px;
  background: var(--paper);
  border: 2px dashed var(--ink);
}

.step .btn { margin-top: 12px; width: 100%; }

/* Receipt */

.slip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 18px;
  align-items: center;
}

.receipt {
  background: #faf3e3;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
}

.receipt h2 { font-size: clamp(2rem, 4vw, 3rem); }

.rows { margin: 16px 0 0; }

.row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px dashed rgba(20, 14, 11, 0.35);
  align-items: center;
}

.row dt {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  opacity: 0.78;
}

.row dd {
  margin: 0;
  font-weight: 900;
  font-size: 1.25rem;
}

.row dd.with-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row dd.with-mark img { width: 22px; height: 22px; object-fit: contain; }

.symbol { color: var(--red); text-shadow: 2px 2px 0 var(--ink); }

.receipt .ca-well { background: #fff6e8; }

.side-fig {
  margin: 0;
  background: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
}

.side-fig img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #d7e4ea;
}

/* Pictures */

.wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.shot {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  background: #f3e7d4;
  border: 3px solid var(--ink);
  box-shadow: 4px 6px 0 var(--ink);
  cursor: zoom-in;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.shot-wide { grid-column: 1 / -1; }

.wall .shot:nth-last-child(-n + 2) { grid-column: span 3; }

.shot:hover {
  transform: translateY(-4px);
  box-shadow: 6px 10px 0 var(--ink);
  z-index: 1;
}

.shot img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: #1a140f;
  border-bottom: 2px solid var(--ink);
}

.shot span {
  display: block;
  padding: 10px 12px 12px;
  font-weight: 700;
}

/* Closer */

.closer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: center;
  background: var(--red);
  color: var(--paper);
  border: 4px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 16px;
}

.closer-grid .kicker,
.closer-grid h2 {
  color: var(--gold);
  text-shadow: 3px 4px 0 var(--ink);
}

.closer-grid .lede,
.closer-grid .fine { color: var(--paper); }

.closer-grid .ca-well {
  background: var(--paper);
  color: var(--ink);
}

.wave-fig {
  margin: 0;
  background: #8fbf67;
  border: 4px solid var(--ink);
}

.wave-fig img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.wave-fig figcaption {
  background: var(--paper);
  color: var(--ink);
}

/* Footer */

.foot {
  padding: 28px 0 40px;
  color: var(--paper);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  border-top: 1px solid rgba(246, 239, 226, 0.4);
  padding-top: 22px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.3rem;
}

.foot-brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--paper);
  border: 2px solid var(--paper);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.foot nav a { color: var(--paper); font-weight: 700; }

.foot nav a:hover { color: var(--gold); }

.foot p {
  margin: 0;
  flex-basis: 100%;
  color: rgba(246, 239, 226, 0.78);
  font-size: 0.98rem;
}

/* Toast + viewer */

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 12px);
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 4px 5px 0 var(--ink);
  padding: 10px 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#viewer {
  width: min(960px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 12px;
  border: 4px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

#viewer::backdrop { background: rgba(12, 8, 6, 0.88); }

#viewer img {
  display: block;
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  background: #1a140f;
}

#viewer p { margin: 10px 0; font-weight: 700; }

.viewer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.viewer-bar p { margin: 0; margin-right: auto; }

.rise {
  opacity: 0;
  transform: translateY(16px);
}

.rise.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (max-width: 900px) {
  .hero-sheet,
  .story,
  .slip,
  .closer-grid { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr 1fr; }

  .steps::before { display: none; }

  .hero-fig { max-width: 460px; margin-inline: auto; }
  .bubble::after { display: none; }

  .wall { grid-template-columns: 1fr 1fr; }
  .wall .shot,
  .wall .shot:nth-last-child(-n + 2) { grid-column: span 1; }
  .wall .shot-wide { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .nav-toggle { display: grid; place-items: center; }

  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 4px solid var(--ink);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 14px 14px;
    gap: 0;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--line);
  }

  .brand small { display: none; }

  .tool-chart { display: none; }
}

@media (max-width: 760px) {
  :root { --header: 68px; }

  .steps { grid-template-columns: 1fr; }

  .row { grid-template-columns: 1fr; gap: 2px; }

  .ca-well { flex-direction: column; }

  .wall { grid-template-columns: 1fr; }
  .wall .shot,
  .wall .shot-wide,
  .wall .shot:nth-last-child(-n + 2) { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .rise { opacity: 1; transform: none; }

  .btn,
  .shot,
  .nav-links a::after,
  .toast { transition: none; }
}
