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

:root {
  --ink: #0f1114;
  --cream: #f4efe6;
  --dim: rgba(244, 239, 230, 0.68);
  --line: rgba(244, 239, 230, 0.22);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  font-family: "Manrope", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.stage {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
}

/* ─────────── Media ─────────── */

.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(var(--zoom, 1.1));
  transition: transform 2.4s var(--ease);
}

.is-ready .media {
  --zoom: 1;
}

/* Static photo, only revealed when WebGL2 is unavailable */
.media-fallback {
  background: center / cover no-repeat;
  visibility: hidden;
}

.no-webgl .media-fallback {
  visibility: visible;
}

.no-webgl canvas.media {
  display: none;
}

/* Legibility: darken the left/bottom where the copy sits */
.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 12, 15, 0.78) 0%, rgba(10, 12, 15, 0.35) 45%, transparent 70%),
    linear-gradient(0deg, rgba(10, 12, 15, 0.6) 0%, transparent 35%);
  pointer-events: none;
}

/* ─────────── Nav ─────────── */

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.logo {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  color: var(--dim);
}

.nav-links a:hover {
  color: var(--cream);
}

.bag {
  color: var(--cream);
}

/* ─────────── Content ─────────── */

.content {
  position: relative;
  z-index: 2;
  margin-top: auto;
  margin-bottom: auto;
  max-width: 44rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.75rem;
}

.eyebrow .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.headline {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 300;
  font-size: clamp(3rem, 8.5vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

[data-reveal-word] {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  transform-origin: left bottom;
  transition: transform 1.2s var(--ease);
}

[data-reveal-word].is-in {
  transform: none;
}

.accent {
  font-style: italic;
}

.lede {
  max-width: 34ch;
  margin-top: 1.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dim);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 1s var(--ease),
    transform 1s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  transition: gap 0.4s var(--ease);
}

.cta:hover {
  gap: 1.1rem;
}

.next {
  appearance: none;
  border: 0;
  background: none;
  color: var(--cream);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.3s var(--ease);
}

.next:hover {
  border-color: var(--cream);
}

/* ─────────── Footer ─────────── */

.marks {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr minmax(6rem, 14rem) 1fr;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.marks span:last-child {
  text-align: right;
}

.progress {
  position: relative;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.progress i {
  position: absolute;
  inset: 0;
  background: var(--cream);
  transform-origin: left;
  transform: scaleX(0);
}

@media (max-width: 760px) {
  .nav-links a:not(.bag) {
    display: none;
  }

  .shade {
    background: linear-gradient(0deg, rgba(10, 12, 15, 0.85) 0%, rgba(10, 12, 15, 0.3) 60%, rgba(10, 12, 15, 0.2) 100%);
  }

  .content {
    margin-top: auto;
    margin-bottom: 2rem;
  }

  .marks {
    grid-template-columns: 1fr 1fr;
  }

  .marks span:first-child {
    display: none;
  }
}
