:root {
  --ink: #f4f1ea;
  --ink-dim: rgba(244, 241, 234, 0.72);
  --line: rgba(244, 241, 234, 0.28);
  --accent: #d8b48a;
  --accent-ink: #1a1410;
  --font-display: "Syne", sans-serif;
  --font-body: "Sora", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #0c1210;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.world {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
  cursor: grab;
}
#stage.is-dragging { cursor: grabbing; }

.sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 12, 11, 0.18) 0%, rgba(8, 12, 11, 0.08) 35%, rgba(8, 12, 11, 0.55) 72%, rgba(8, 12, 11, 0.88) 100%),
    radial-gradient(120% 80% at 70% 20%, rgba(216, 180, 138, 0.18), transparent 55%);
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
  pointer-events: none;
}

.mark {
  pointer-events: auto;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 0 22px max(36px, env(safe-area-inset-bottom));
  max-width: 760px;
  pointer-events: none;
}

.brand {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3.4vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.lede {
  margin: 0 0 22px;
  max-width: 38ch;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.7vw, 1.08rem);
  line-height: 1.55;
  color: var(--ink-dim);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  pointer-events: auto;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.primary:hover { transform: translateY(-1px); filter: brightness(1.05); }

.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.04);
}
.secondary:hover { border-color: rgba(244, 241, 234, 0.5); }

.hint {
  position: absolute;
  right: 22px;
  bottom: max(36px, env(safe-area-inset-bottom));
  z-index: 4;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.45);
  pointer-events: none;
}

/* entrance motion */
.brand,
.hero h1,
.lede,
.cta,
.hint,
.mark {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mark { animation-delay: 0.15s; }
.brand { animation-delay: 0.28s; }
.hero h1 { animation-delay: 0.42s; }
.lede { animation-delay: 0.56s; }
.cta { animation-delay: 0.7s; }
.hint { animation-delay: 1s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* explore scaffold */
body.next {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(80% 60% at 20% 0%, rgba(216, 180, 138, 0.16), transparent 50%),
    #101614;
}
.next-wrap {
  width: min(560px, 100%);
}
.next-wrap .mark {
  display: inline-block;
  margin-bottom: 28px;
  opacity: 1;
  transform: none;
  animation: none;
}
.next-wrap h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.next-wrap .lede {
  opacity: 1;
  transform: none;
  animation: none;
}
.next-wrap .primary {
  margin-top: 8px;
}

@media (max-width: 720px) {
  .hint { display: none; }
  .hero { max-width: none; }
  .brand { font-size: clamp(3rem, 18vw, 4.6rem); }
  .secondary { width: 100%; }
  .primary { width: 100%; }
}
