*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --c0: #0e0906;
  --c1: #1c120b;
  --c2: #2e1c0f;
  --c3: #4a2e18;
  --c4: #7a4a28;
  --c5: #b07040;
  --cream: #f2e8d6;
  --creamDim: #c8b090;
  --gold: #c8a45a;
  --fog: rgba(14,9,6,0.0);
}

html { overflow: hidden; height: 100%; }

body {
  background: var(--c0);
  color: var(--cream);
  font-family: 'Mulish', sans-serif;
  font-weight: 300;
  height: 100%;
  overflow: hidden;
  cursor: none;
}

#cur {
  position: fixed; width: 8px; height: 8px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  transition: transform .1s, width .25s, height .25s;
  mix-blend-mode: screen;
}

#curR {
  position: fixed; width: 32px; height: 32px;
  border: 1px solid rgba(200,164,90,.5); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%,-50%);
}

#progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: linear-gradient(to right, var(--c4), var(--gold));
  z-index: 1000; width: 0%;
  transition: width .05s linear;
}

#sceneHud {
  position: fixed; right: 40px; top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 12px;
  align-items: center;
}

.hud-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(200,164,90,.25);
  transition: background .4s, transform .4s;
  cursor: none;
}

.hud-dot.on { background: var(--gold); transform: scale(1.8); }

#sceneNum {
  font-size: .6rem; letter-spacing: .3em;
  color: rgba(200,164,90,.4);
  writing-mode: vertical-rl;
  margin-top: 16px;
  font-family: 'Mulish', sans-serif;
}

#topNav {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 30px 50px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 500;
  background: linear-gradient(to bottom, rgba(14,9,6,.7) 0%, transparent 100%);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; font-weight: 300;
  letter-spacing: .4em; text-transform: uppercase;
  color: var(--cream);
}

.nav-logo em { font-style: italic; color: var(--gold); }

.nav-tag {
  font-size: .62rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--creamDim);
}

#scrollArea {
  position: fixed; inset: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

#scrollArea::-webkit-scrollbar { display: none; }
#scrollArea { -ms-overflow-style: none; scrollbar-width: none; }

#scrollTrack {
  height: 900vh;
  pointer-events: none;
}

#stage {
  position: fixed; inset: 0;
  overflow: hidden;
}

.scene {
  position: absolute; inset: 0;
  will-change: transform, opacity;
  transform-origin: center center;
  display: flex; align-items: center; justify-content: center;
}

.scene-bg {
  position: absolute; inset: -15%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform-origin: center center;
}

#textStage {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
}

.txt-block {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 40px;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}

.txt-block.vis { opacity: 1; }

.txt-eyebrow {
  font-size: .65rem; letter-spacing: .55em;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 22px;
}

.txt-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 300; line-height: .95;
  color: var(--cream);
  max-width: 800px;
}

.txt-title em { font-style: italic; color: var(--gold); }

.txt-title .line {
  display: block; overflow: hidden;
}

.txt-title .line span {
  display: block;
  transition: transform .7s cubic-bezier(.16,1,.3,1), opacity .7s;
  transform: translateY(100%); opacity: 0;
}

.txt-block.vis .txt-title .line span {
  transform: translateY(0); opacity: 1;
}

.txt-title .line:nth-child(1) span { transition-delay: .05s; }
.txt-title .line:nth-child(2) span { transition-delay: .15s; }
.txt-title .line:nth-child(3) span { transition-delay: .25s; }

.txt-body {
  max-width: 460px;
  font-size: .95rem; font-weight: 200;
  color: var(--creamDim); line-height: 1.85;
  margin-top: 28px;
  transition: opacity .6s .35s, transform .6s .35s cubic-bezier(.16,1,.3,1);
  opacity: 0; transform: translateY(16px);
}

.txt-block.vis .txt-body { opacity: 1; transform: translateY(0); }

.txt-cta {
  margin-top: 40px;
  display: inline-block;
  padding: 14px 44px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: .72rem; letter-spacing: .3em; text-transform: uppercase;
  font-family: 'Mulish', sans-serif;
  text-decoration: none;
  transition: background .3s, color .3s, opacity .6s .5s, transform .6s .5s;
  opacity: 0; transform: translateY(10px);
  pointer-events: all; cursor: none;
}

.txt-block.vis .txt-cta { opacity: 1; transform: translateY(0); }
.txt-cta:hover { background: var(--gold); color: var(--c0); }

.txt-block.top-left {
  align-items: flex-start; justify-content: flex-end;
  padding: 0 0 80px 80px; text-align: left;
}

.txt-block.bot-right {
  align-items: flex-end; justify-content: flex-end;
  padding: 0 80px 80px 0; text-align: right;
}

.txt-block.bot-left {
  align-items: flex-start; justify-content: flex-end;
  padding: 0 0 80px 80px; text-align: left;
}

.txt-block.mid-right {
  align-items: flex-end; justify-content: center;
  padding: 0 80px 0 0; text-align: right;
}

#scrollHint {
  position: fixed; bottom: 42px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 1; transition: opacity .5s;
}

#scrollHint.hidden { opacity: 0; }

#scrollHint span {
  font-size: .6rem; letter-spacing: .45em;
  text-transform: uppercase; color: var(--creamDim);
}

.scroll-mouse {
  width: 22px; height: 36px;
  border: 1px solid rgba(200,164,90,.4); border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 3px; height: 8px; border-radius: 2px;
  background: var(--gold);
  position: absolute; top: 6px; left: 50%;
  transform: translateX(-50%);
  animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
  0%,100% { opacity: 1; top: 6px; }
  60% { opacity: 0; top: 22px; }
}

#vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(14,9,6,.7) 100%);
  pointer-events: none; z-index: 90;
}

#blackout {
  position: fixed; inset: 0;
  background: var(--c0);
  opacity: 0; pointer-events: none; z-index: 80;
  transition: opacity .4s;
}

#grain {
  position: fixed; inset: 0; z-index: 95;
  pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
  animation: grainAnim 8s steps(1) infinite;
}

@keyframes grainAnim {
  0%   { background-position: 0 0; }
  10%  { background-position: -50px -100px; }
  20%  { background-position: 100px 50px; }
  30%  { background-position: -100px 20px; }
  40%  { background-position: 60px -80px; }
  50%  { background-position: -20px 140px; }
  60%  { background-position: 80px 20px; }
  70%  { background-position: -140px -60px; }
  80%  { background-position: 20px 80px; }
  90%  { background-position: -80px -20px; }
  100% { background-position: 0 0; }
}

.steam-svg {
  position: absolute;
  animation: steamRise 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes steamRise {
  0%   { opacity: 0; transform: translateY(0) scaleX(1); }
  20%  { opacity: .6; }
  80%  { opacity: .2; }
  100% { opacity: 0; transform: translateY(-80px) scaleX(2); }
}

@media (max-width: 768px) {
  #topNav { padding: 20px 24px; }
  .nav-tag { display: none; }
  #sceneHud { right: 16px; }
  .txt-block.top-left,
  .txt-block.bot-left,
  .txt-block.bot-right,
  .txt-block.mid-right {
    align-items: center; justify-content: center;
    padding: 20px; text-align: center;
  }
}
