:root {
  --bg: #f5ead2;
  --ink: #221b16;
  --muted: #665a4b;
  --accent: #7bae5a;
  --cream: rgba(255, 250, 238, 0.82);
  --line: rgba(53, 94, 59, 0.22);
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34rem),
    linear-gradient(180deg, #fff3d9 0%, var(--bg) 48%, #f0dfbb 100%);
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

.world {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 33%, transparent 64%),
    radial-gradient(circle at 70% 28%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 32rem);
}

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 5vw, 4rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.08rem;
}

.brand-mark {
  width: 1.55rem;
  height: 1.8rem;
  border-radius: 0.5rem 0.5rem 0.72rem 0.72rem;
  background:
    linear-gradient(150deg, #d9a441, #7bae5a 58%, #355e3b);
  box-shadow: 0 0.55rem 1.2rem rgba(53, 94, 59, 0.22);
}

.nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 1px solid rgba(53, 94, 59, 0.16);
  border-radius: 999px;
  background: rgba(255, 250, 238, 0.62);
  backdrop-filter: blur(14px);
}

.nav button {
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.9rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.nav button:hover,
.nav button.is-active {
  color: #fff;
  background: var(--accent);
}

.progress {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  height: 3px;
  background: rgba(53, 94, 59, 0.13);
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 5;
}

.scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 260ms linear;
  will-change: opacity, transform, filter;
}

.scene img {
  width: min(88vw, 1580px);
  max-width: none;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2rem 3rem rgba(80, 54, 24, 0.16));
  transform-origin: var(--focus-x, 50%) var(--focus-y, 50%);
  will-change: transform, filter;
}

.copy {
  position: fixed;
  z-index: 20;
  left: clamp(1.15rem, 5vw, 4rem);
  top: 50%;
  width: min(42vw, 31rem);
  transform: translateY(-50%);
  pointer-events: none;
}

.copy-inner {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.copy-num {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.eyebrow {
  display: block;
  margin-top: 1.15rem;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0.75rem 0 0;
  font-size: clamp(2.2rem, 4.7vw, 4.45rem);
  line-height: 0.98;
  max-width: 10ch;
}

.body {
  margin: 1.15rem 0 0;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  font-size: clamp(1rem, 1.24vw, 1.16rem);
  line-height: 1.65;
  max-width: 36ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.tags li {
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: color-mix(in srgb, var(--accent) 70%, #1b130e);
  background: rgba(255, 250, 238, 0.6);
  font-weight: 700;
  font-size: 0.83rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.7rem;
  pointer-events: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.btn-primary {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.rail {
  position: fixed;
  z-index: 25;
  top: 50%;
  right: clamp(0.75rem, 2.8vw, 2rem);
  display: grid;
  gap: 1rem;
  transform: translateY(-50%);
}

.rail button {
  position: relative;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.rail button::before {
  content: "";
  position: absolute;
  inset: 0.52rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 38%, transparent);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.rail button.is-active::before,
.rail button:hover::before {
  background: var(--accent);
  transform: scale(1.42);
  box-shadow: 0 0 0 0.33rem color-mix(in srgb, var(--accent) 18%, transparent);
}

.rail span {
  position: absolute;
  right: 2rem;
  top: 50%;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(53, 94, 59, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 238, 0.78);
  font-weight: 800;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-50%) translateX(0.4rem);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.rail button:hover span,
.rail button.is-active span {
  opacity: 1;
  transform: translateY(-50%);
}

.scroll-hint {
  position: fixed;
  z-index: 24;
  left: 50%;
  bottom: 1.4rem;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-hint i {
  position: relative;
  width: 1.34rem;
  height: 2.05rem;
  border: 2px solid rgba(34, 27, 22, 0.24);
  border-radius: 999px;
}

.scroll-hint i::after {
  content: "";
  position: absolute;
  top: 0.42rem;
  left: 50%;
  width: 0.24rem;
  height: 0.44rem;
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(-50%);
  animation: wheel 1.45s ease-in-out infinite;
}

.track {
  height: 720vh;
}

@keyframes wheel {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 0.72rem);
  }
}

@media (max-width: 860px) {
  .world {
    background:
      linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 42%, transparent 72%),
      radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 26rem);
  }

  .nav {
    display: none;
  }

  .brand {
    font-size: 1rem;
  }

  .scene {
    align-items: start;
    padding-top: 8vh;
  }

  .scene img {
    width: min(138vw, 980px);
    transform: translateX(0);
  }

  .copy {
    left: 1.15rem;
    right: 1.15rem;
    top: auto;
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
    width: auto;
    transform: none;
  }

  h1,
  h2 {
    max-width: 11ch;
    font-size: clamp(2rem, 10vw, 3.35rem);
  }

  .body {
    max-width: 40ch;
    font-size: 1rem;
  }

  .tags {
    margin-top: 1rem;
  }

  .tags li {
    padding: 0.38rem 0.62rem;
  }

  .rail {
    right: 0.35rem;
    gap: 0.55rem;
  }

  .rail span {
    display: none;
  }

  .scroll-hint {
    bottom: calc(0.9rem + env(safe-area-inset-bottom));
  }
}

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

  .scroll-hint i::after {
    animation: none;
  }

  .scene img,
  .copy-inner,
  .scene {
    transition: none;
  }
}
