:root {
  --ink: #142d2a;
  --paper: #f5ead3;
  --gold: #d2a24d;
  --gold-deep: #a84c29;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: 0.5rem;
  font-weight: 600;
}

.skip:focus { top: 1rem; }

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

.bar {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 0;
  height: 3px;
  background: var(--gold);
  transition: width 500ms var(--ease);
}

.jbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: calc(0.8rem + env(safe-area-inset-top, 0px)) 1rem 0.8rem;
  pointer-events: none;
}

.jbar a {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(210, 162, 77, 0.42);
  background: rgba(20, 45, 42, 0.82);
  backdrop-filter: blur(6px);
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--ink);
}

.stage img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  transform-origin: 0 0;
  transition: transform 1700ms var(--ease);
  will-change: transform;
}

.stage__veil {
  position: absolute;
  inset: 0;
  background: #142d2a;
  opacity: 0.5;
  transition: opacity 1200ms ease;
}

.counter {
  position: fixed;
  right: 1rem;
  bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

main {
  position: relative;
  z-index: 10;
}

.scene {
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 6rem 1rem calc(3rem + env(safe-area-inset-bottom, 0px));
}

.card {
  width: 100%;
  max-width: 30rem;
  padding: 1.35rem 1.4rem 1.5rem;
  border: 1px solid rgba(210, 162, 77, 0.34);
  border-radius: 0.75rem;
  background: rgba(20, 45, 42, 0.86);
  backdrop-filter: blur(8px);
}

.js .card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms ease, transform 900ms var(--ease);
}

.js .scene.is-active .card {
  opacity: 1;
  transform: none;
}

.kicker {
  margin: 0 0 0.5rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.line {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  font-weight: 500;
  line-height: 1.15;
}

.body {
  margin: 0 0 1.1rem;
  color: rgba(245, 239, 227, 0.88);
}

.deeper,
.alt a {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 189, 122, 0.5);
}

.deeper:hover,
.alt a:hover { border-bottom-color: var(--gold); }

.scene--title {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.scene--title .card {
  max-width: 38rem;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.title {
  margin: 0.4rem 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 500;
  line-height: 0.98;
}

.quote {
  margin: 0 0 2rem;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  font-style: italic;
}

.cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.4rem;
  color: rgba(245, 239, 227, 0.8);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cue i {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0) rotate(45deg); opacity: 0.5; }
  50% { transform: translateY(6px) rotate(45deg); opacity: 1; }
}

.alt { margin: 0; font-size: 0.9rem; }

.scene--end {
  align-items: center;
  justify-content: center;
}

.card--end { max-width: 34rem; }

.paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
}

.paths a {
  display: block;
  min-height: 48px;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  background: rgba(245, 239, 227, 0.95);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.paths a:hover { background: #fff; }

.paths span {
  display: block;
  color: var(--gold-deep);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

@media (min-width: 900px) {
  .scene { padding-left: 6vw; padding-right: 6vw; }
  .scene--title, .scene--end { padding-left: 1rem; padding-right: 1rem; }
  .card { max-width: 28rem; }
  .jbar { padding-left: 2rem; padding-right: 2rem; }
  .counter { right: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage img,
  .stage__veil,
  .bar,
  .js .card { transition: none !important; }
  .cue i { animation: none; opacity: 1; }
}
