:root {
  --bg: #08070d;
  --ink: #f5f3ee;
  --muted: rgba(245, 243, 238, 0.55);
  --line: rgba(245, 243, 238, 0.06);
  --line-bright: rgba(245, 243, 238, 0.28);
  --grid-size: 64px;
  --mx: 50vw;
  --my: 50vh;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Gradient mesh ───────────────────────────────────────── */
.mesh {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  will-change: transform;
}

.blob--violet {
  width: 60vmax;
  height: 60vmax;
  left: -25vmax;
  top: -25vmax;
  background: radial-gradient(circle, #6b4dff 0%, transparent 65%);
  opacity: 0.55;
  animation: drift1 22s ease-in-out infinite alternate;
}

.blob--amber {
  width: 55vmax;
  height: 55vmax;
  right: -22vmax;
  bottom: -22vmax;
  background: radial-gradient(circle, #ff8559 0%, transparent 65%);
  opacity: 0.5;
  animation: drift2 26s ease-in-out infinite alternate;
}

.blob--cyan {
  width: 42vmax;
  height: 42vmax;
  right: 12vmax;
  top: -18vmax;
  background: radial-gradient(circle, #4ad6e0 0%, transparent 65%);
  opacity: 0.32;
  animation: drift3 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
  to {
    transform: translate(15vmax, 10vmax);
  }
}
@keyframes drift2 {
  to {
    transform: translate(-12vmax, -8vmax);
  }
}
@keyframes drift3 {
  to {
    transform: translate(-10vmax, 8vmax);
  }
}

/* ── Grid layers ─────────────────────────────────────────── */
.grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center center;
  z-index: 1;
}

.grid--spotlight {
  background-image:
    linear-gradient(var(--line-bright) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-bright) 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(
    circle 280px at var(--mx) var(--my),
    #000 0%,
    rgba(0, 0, 0, 0.6) 35%,
    transparent 75%
  );
  mask-image: radial-gradient(
    circle 280px at var(--mx) var(--my),
    #000 0%,
    rgba(0, 0, 0, 0.6) 35%,
    transparent 75%
  );
  z-index: 2;
  transition: opacity 0.4s ease;
}

@media (hover: none) {
  .grid--spotlight {
    display: none;
  }
}

/* Subtle dark vignette to focus the centre */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(8, 7, 13, 0.65) 100%
  );
}

/* ── Stage ───────────────────────────────────────────────── */
.stage {
  position: relative;
  z-index: 3;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

/* ── Eyebrow ─────────────────────────────────────────────── */
.eyebrow {
  margin: 0 0 1.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  position: relative;
  padding-left: 1.4rem;
  opacity: 0;
  animation: rise 0.8s ease 0.25s forwards;
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.9rem;
  height: 1px;
  background: var(--muted);
}

/* ── Title (slot machine) ────────────────────────────────── */
.title {
  margin: 0;
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(3.5rem, 13vw, 9rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.slot {
  display: inline-block;
  height: 1lh;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.08em;
}

.slot__track {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
}

.slot__track.is-rolled {
  animation: slotRoll 1.3s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}

.slot__item {
  display: block;
  height: 1lh;
  background: linear-gradient(180deg, #ffffff 0%, #d6d2c5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

@keyframes slotRoll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-1lh);
  }
}

/* ── Subtitle ────────────────────────────────────────────── */
.subtitle {
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  color: var(--muted);
  max-width: 32ch;
  line-height: 1.5;
  opacity: 0;
  animation: rise 0.9s ease 1.7s forwards;
}

/* ── CTA ─────────────────────────────────────────────────── */
.cta {
  display: inline-block;
  margin-top: 2.75rem;
  text-decoration: none;
  opacity: 0;
  animation: rise 0.9s ease 2s forwards;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.cta__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem;
  background: var(--ink);
  color: #0a0a0a;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  box-shadow: 0 10px 40px -12px rgba(245, 243, 238, 0.35),
    0 1px 0 0 rgba(255, 255, 255, 0.4) inset;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.3s ease;
  will-change: transform;
}

.cta:hover .cta__inner {
  background: #ffffff;
}

.cta__inner svg {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cta:hover .cta__inner svg {
  transform: translateX(4px);
}

.cta:focus-visible {
  outline: none;
}

.cta:focus-visible .cta__inner {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(245, 243, 238, 0.7),
    0 10px 40px -12px rgba(245, 243, 238, 0.35);
}

/* ── Footnote ────────────────────────────────────────────── */
.footnote {
  position: fixed;
  bottom: 1.6rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: center;
  opacity: 0;
  animation: rise 1s ease 2.3s forwards;
  white-space: nowrap;
}

.footnote__old {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(245, 243, 238, 0.35);
}

.footnote__arrow {
  color: var(--muted);
}

.footnote__new {
  color: var(--ink);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .blob {
    animation: none;
  }
  .slot__track.is-rolled {
    animation: none;
    transform: translateY(-1lh);
  }
  .eyebrow,
  .subtitle,
  .cta,
  .footnote {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    opacity: 1;
    transform: none;
  }
}

/* ── Small screens ───────────────────────────────────────── */
@media (max-width: 520px) {
  :root {
    --grid-size: 48px;
  }
  .footnote {
    font-size: 0.62rem;
    gap: 0.5rem;
  }
}
