:root {
  --bg: #0a0f0d;
  --bg-2: #101815;
  --line: #22302a;
  --text: #e9ece6;
  --muted: #9aa69f;
  --green: #0f5a3e;
  --gold: #c8a55a;
  --gold-hi: #dcbd78;
  --serif: "Bodoni Moda", Didot, Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 300; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
.lead { color: var(--muted); max-width: 52ch; font-size: 1.05rem; }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 72px; display: flex; align-items: center; border-bottom: 1px solid transparent; transition: background .4s, border-color .4s; }
.nav.solid, .nav.always { background: rgba(10,15,13,.9); backdrop-filter: blur(10px); border-color: var(--line); }
.nav .wrap { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.brand { font-family: var(--serif); font-size: 1.5rem; letter-spacing: .18em; color: var(--gold); }
.nav ul { display: flex; gap: 34px; list-style: none; }
.nav ul a { font-size: .9rem; color: var(--muted); transition: color .2s; }
.nav ul a:hover, .nav ul a.active { color: var(--gold); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

.btn { display: inline-block; padding: 14px 30px; border: 1px solid var(--gold); color: var(--gold); font-size: .92rem; white-space: nowrap; transition: background .25s, color .25s, transform .15s; }
.btn:hover { background: var(--gold); color: #0d120f; }
.btn:active { transform: scale(.98); }
.btn-solid { background: var(--gold); color: #0d120f; }
.btn-solid:hover { background: var(--gold-hi); }

/* 3D stage */
#stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#stage canvas { width: 100% !important; height: 100% !important; display: block; opacity: 0; transition: opacity 1.2s ease; }
#stage.ready canvas { opacity: 1; }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 50% 60% at var(--gx, 70%) 50%, rgba(15,90,62,.35), transparent 70%); transition: --gx 1s; }
main { position: relative; z-index: 1; }

/* scroll sections */
.panel { min-height: 100dvh; display: flex; align-items: center; padding: 100px 0; }
.panel > .wrap { width: 100%; }
.panel .copy { max-width: 470px; }
.panel[data-side="right"] .copy { margin-left: auto; }
.panel h2 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); margin-bottom: 22px; }
.panel .year { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--gold); margin-bottom: 14px; font-style: italic; }
.hero h1 { font-size: clamp(3.6rem, 8vw, 7rem); margin-bottom: 24px; }
.hero .lead { margin-bottom: 36px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.eyebrow { font-size: .75rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }

/* timeline */
.timeline { background: var(--bg-2); border-block: 1px solid var(--line); padding: 110px 0; position: relative; z-index: 1; }
.timeline h2 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin-bottom: 56px; }
.tl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; }
.tl div { border-top: 1px solid var(--gold); padding-top: 20px; }
.tl b { display: block; font-family: var(--serif); font-size: 2rem; font-weight: 500; color: var(--gold); margin-bottom: 8px; }
.tl p { color: var(--muted); font-size: .93rem; }

.closing { text-align: center; padding: 140px 0; position: relative; z-index: 1; background: var(--bg); }
.closing h2 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 20px; }
.closing .lead { margin: 0 auto 36px; }

/* inner pages */
.page-head { padding: 170px 0 60px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); margin-bottom: 14px; }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 70px; padding: 80px 24px 120px; }
.toc { position: sticky; top: 110px; align-self: start; display: grid; gap: 10px; font-size: .92rem; }
.toc a { color: var(--muted); } .toc a:hover { color: var(--gold); }
.doc article h2 { font-size: 1.9rem; margin: 56px 0 14px; scroll-margin-top: 100px; }
.doc article h2:first-child { margin-top: 0; }
.doc article p, .doc article li { color: #c3cac5; max-width: 68ch; margin-bottom: 14px; }
.doc article ul { padding-left: 20px; }
.updated { color: var(--muted); font-size: .88rem; }
details { border-bottom: 1px solid var(--line); max-width: 760px; }
summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 20px; font-size: 1.05rem; font-weight: 400; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; transition: transform .3s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-bottom: 22px; max-width: 64ch; }

footer { position: relative; z-index: 1; background: var(--bg); border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: .85rem; color: var(--muted); }
footer .cols { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 30px; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer nav a:hover { color: var(--gold); }
footer small { display: block; font-size: .78rem; color: #7b8680; max-width: 90ch; line-height: 1.6; }
footer small a { text-decoration: underline; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav ul { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 22px; padding: 28px 24px; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav ul.open { display: flex; }
  .panel { align-items: flex-end; padding-bottom: 60px; }
  .panel .copy { background: linear-gradient(transparent, rgba(10,15,13,.85) 20%); padding-top: 30px; }
  .panel[data-side="right"] .copy { margin-left: 0; }
  .tl { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: 1fr; gap: 30px; }
  .toc { position: static; }
}
