*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #1a120c;
  color: #f3e6d4;
  line-height: 1.65;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:root {
  --gold: #d4a017;
  --gold-bright: #f0c040;
  --turmeric: #c45c14;
  --deep: #1a120c;
  --panel: #241810;
  --ink: #f3e6d4;
  --muted: #a89078;
  --rail: 56px;
  --serif: Georgia, 'Times New Roman', serif;
}

/* ——— RIGHT VERTICAL RAIL (not top, not left, not bottom) ——— */
.spine {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--rail);
  background: #120c08;
  border-left: 1px solid rgba(212,160,23,0.25);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.spine .mark {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}
.spine nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  align-items: center;
}
.spine nav a {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 0;
  border-right: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.spine nav a:hover { color: var(--ink); }
.spine nav a.on {
  color: var(--gold-bright);
  border-right-color: var(--gold);
}

.sheet {
  margin-right: var(--rail);
  min-height: 100vh;
}

.mob {
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 200;
  background: var(--turmeric);
  color: #fff;
  border: none;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 12px;
  cursor: pointer;
}

/* ——— RHIZOME: full-bleed type field, no hero+3 ——— */
.rhizome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px 40px 56px;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(196,92,20,0.35), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(212,160,23,0.2), transparent 45%),
    var(--deep);
  position: relative;
}
.rhizome h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 0.95;
  color: var(--gold-bright);
  max-width: 10ch;
  margin-bottom: 24px;
}
.rhizome .lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 36px;
}
.rhizome .toc {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.rhizome .toc a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--turmeric);
  padding-bottom: 2px;
}
.rhizome .toc a:hover { color: var(--gold-bright); }

/* ——— GOLD: horizontal scroll snap ——— */
.gold-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  height: 100vh;
  -webkit-overflow-scrolling: touch;
}
.gold-panel {
  flex: 0 0 85vw;
  max-width: 720px;
  scroll-snap-align: start;
  padding: 48px 40px;
  border-right: 1px solid rgba(212,160,23,0.2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel);
}
.gold-panel:nth-child(even) { background: #1e1610; }
.gold-panel .k {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turmeric);
  margin-bottom: 12px;
}
.gold-panel h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--gold-bright);
  margin-bottom: 14px;
}
.gold-panel p {
  color: var(--muted);
  max-width: 40ch;
  margin-bottom: 20px;
}
.gold-panel img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 2px;
  margin-top: 8px;
}
.gold-hint {
  position: fixed;
  bottom: 20px;
  left: 40px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 50;
}

/* ——— BREW: vertical steps ——— */
.brew-head {
  padding: 48px 40px 20px;
  border-bottom: 1px solid rgba(212,160,23,0.2);
}
.brew-head .k {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turmeric);
  margin-bottom: 10px;
}
.brew-head h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 400;
  color: var(--gold-bright);
  max-width: 18ch;
}

.step {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 40px;
  border-bottom: 1px solid rgba(212,160,23,0.12);
  align-items: start;
}
.step .n {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--turmeric);
  line-height: 1;
}
.step h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.step p {
  color: var(--muted);
  max-width: 52ch;
}

/* ——— ROOT: center timeline ——— */
.root-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}
.root-wrap .k {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turmeric);
  margin-bottom: 12px;
  text-align: center;
}
.root-wrap h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 400;
  color: var(--gold-bright);
  text-align: center;
  margin-bottom: 48px;
}
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(var(--turmeric), var(--gold));
}
.timeline .node {
  position: relative;
  margin-bottom: 36px;
}
.timeline .node::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 3px var(--deep);
}
.timeline .node .y {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--turmeric);
  margin-bottom: 4px;
}
.timeline .node h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.timeline .node p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ——— PARCEL: postcard layout ——— */
.parcel-stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(circle at 70% 20%, rgba(212,160,23,0.15), transparent 40%),
    var(--deep);
}
.postcard {
  width: 100%;
  max-width: 560px;
  background: #f3e6d4;
  color: #2a1c12;
  padding: 36px 32px;
  border-radius: 2px;
  box-shadow: 8px 12px 0 rgba(196,92,20,0.35);
  position: relative;
}
.postcard .stamp {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 56px;
  height: 68px;
  border: 2px dashed var(--turmeric);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--turmeric);
  text-align: center;
  line-height: 1.2;
}
.postcard h1 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 8px;
  color: #2a1c12;
}
.postcard .from {
  font-size: 0.85rem;
  color: #6a5648;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #d4c4b0;
  line-height: 1.7;
  max-width: calc(100% - 70px);
}
.postcard .from a { color: var(--turmeric); }
.postcard label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a5648;
  margin-bottom: 4px;
}
.postcard input,
.postcard textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4c4b0;
  background: #faf4ea;
  font-size: 0.95rem;
  color: #2a1c12;
  margin-bottom: 12px;
  font-family: inherit;
}
.postcard input:focus,
.postcard textarea:focus {
  outline: none;
  border-color: var(--turmeric);
}
.postcard textarea { min-height: 90px; resize: vertical; }
.postcard button {
  width: 100%;
  padding: 12px;
  background: var(--turmeric);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.postcard button:hover { filter: brightness(1.05); }

.ft {
  margin-right: var(--rail);
  padding: 16px 40px;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid rgba(212,160,23,0.15);
  letter-spacing: 0.03em;
}

@media (max-width: 800px) {
  .spine {
    width: 100%;
    height: auto;
    bottom: auto;
    flex-direction: row;
    padding: 12px 16px;
    border-left: none;
    border-bottom: 1px solid rgba(212,160,23,0.25);
    transform: translateY(-110%);
    transition: transform 0.2s;
  }
  .spine.open { transform: translateY(0); }
  .spine .mark { writing-mode: horizontal-tb; transform: none; margin: 0 16px 0 0; }
  .spine nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .spine nav a {
    writing-mode: horizontal-tb;
    transform: none;
    border-right: none;
    border-bottom: 2px solid transparent;
    padding: 4px 0;
  }
  .spine nav a.on { border-right: none; border-bottom-color: var(--gold); }
  .mob { display: block; }
  .sheet, .ft { margin-right: 0; }
  .rhizome { padding: 72px 24px 40px; }
  .gold-panel { flex-basis: 92vw; padding: 72px 24px 40px; }
  .step { grid-template-columns: 1fr; padding: 28px 24px; }
  .brew-head { padding: 72px 24px 16px; }
  .gold-hint { left: 24px; }
}
