:root {
  --bg: #0a0a0a;
  --gold: #d4af37;
  --gold-bright: #f0d27e;
  --gold-deep: #9c7d2d;
  --text: #f0ebdb;
  --text-dim: rgba(240, 235, 219, 0.55);

  --font-display: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Fraunces", "Cormorant Garamond", Georgia, "Times New Roman", serif;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ───── Stage / video ───── */
.stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.66);
  transform: scale(1.08);
  transform-origin: center;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 90%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* ───── Content ───── */
.content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

/* ───── Headline: Fraunces (variable serif) + mask reveal + glitch ───── */
.headline {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  font-size: clamp(34px, 8vw, 116px);
  letter-spacing: 0.08em;
  line-height: 1.1;
  padding-left: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  max-width: 100%;
  animation:
    glitchInitial 600ms steps(1) 1.7s 1 backwards,
    glitchPeriodic 5s steps(1) 2.5s infinite;
}

/* Initial glitch burst (right after entry) */
@keyframes glitchInitial {
  0% {
    text-shadow:
      3px 0 rgba(255, 50, 100, 0.85),
      -3px 0 rgba(0, 240, 255, 0.85);
    transform: translate(-2px, 0);
    clip-path: inset(0 0 0 0);
  }
  18% {
    text-shadow:
      -4px 0 rgba(255, 50, 100, 0.8),
      4px 0 rgba(0, 240, 255, 0.8);
    transform: translate(3px, -1px);
    clip-path: inset(45% 0 30% 0);
  }
  32% {
    text-shadow:
      2px 0 rgba(255, 50, 100, 0.7),
      -2px 0 rgba(0, 240, 255, 0.7);
    transform: translate(-1px, 1px);
    clip-path: inset(0 0 0 0);
  }
  46% {
    text-shadow:
      -3px 0 rgba(255, 50, 100, 0.75),
      3px 0 rgba(0, 240, 255, 0.75);
    transform: translate(2px, 1px);
    clip-path: inset(20% 0 60% 0);
  }
  60% {
    text-shadow:
      2px 0 rgba(255, 50, 100, 0.5),
      -2px 0 rgba(0, 240, 255, 0.5);
    transform: translate(-1px, 0);
    clip-path: inset(0 0 0 0);
  }
  80%, 100% {
    text-shadow: none;
    transform: translate(0);
    clip-path: inset(0 0 0 0);
  }
}

/* Periodic mini-glitch */
@keyframes glitchPeriodic {
  0% {
    text-shadow:
      2px 0 rgba(255, 50, 100, 0.6),
      -2px 0 rgba(0, 240, 255, 0.6);
    transform: translate(-1px, 0);
  }
  2% {
    text-shadow:
      -2px 0 rgba(255, 50, 100, 0.55),
      2px 0 rgba(0, 240, 255, 0.55);
    transform: translate(1px, 0);
  }
  4%, 100% {
    text-shadow: none;
    transform: translate(0);
  }
}

.headline__word {
  display: inline-block;
  white-space: nowrap;
}

.headline__mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.15;
}

.headline__char {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
  animation: charRise 0.95s var(--ease-out-expo) both;
  animation-delay: calc(var(--i, 0) * 60ms + 200ms);
}

@keyframes charRise {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

/* ───── Tagline: simple fade-up, modern restraint ───── */
.tagline {
  margin-top: clamp(20px, 3vh, 32px);
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 350;
  font-variation-settings: "opsz" 14;
  font-size: clamp(14px, 1.5vw, 19px);
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: #d9a441;
  max-width: 56ch;
  opacity: 0;
  transform: translateY(8px);
  animation: taglineRise 1s var(--ease-out-expo) 1.1s forwards;
}

@keyframes taglineRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ───── Reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  .headline__char,
  .tagline {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ───── Tablet ───── */
@media (max-width: 768px) {
  .headline {
    letter-spacing: 0.14em;
    padding-left: 0.14em;
  }
}

/* ───── Phone ───── */
@media (max-width: 480px) {
  .headline {
    letter-spacing: 0.1em;
    padding-left: 0.1em;
  }
  .tagline {
    font-size: 13px;
    letter-spacing: 0;
    max-width: 36ch;
  }
}

/* ───── Tiny phones (iPhone SE etc.) ───── */
@media (max-width: 360px) {
  .headline {
    font-size: 26px;
    letter-spacing: 0.08em;
    padding-left: 0.08em;
  }
  .tagline {
    font-size: 12px;
    max-width: 30ch;
  }
}

/* ───── Landscape phone (short height) ───── */
@media (max-height: 480px) and (orientation: landscape) {
  .headline {
    font-size: clamp(28px, 6vh, 60px);
  }
  .tagline {
    margin-top: 12px;
    font-size: 12px;
  }
}
