:root {
  color-scheme: dark;
  --ink: #f6f0e5;
  --muted: #b4a995;
  --faint: rgba(246, 240, 229, 0.46);
  --line: rgba(218, 181, 111, 0.2);
  --panel: rgba(22, 18, 12, 0.55);
  --pink: #c9a568;
  --peach: #f0d29a;
  --background: #090807;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--background);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

.backdrop,
.grain {
  inset: 0;
  pointer-events: none;
  position: fixed;
}

.backdrop {
  background:
    radial-gradient(ellipse 42% 58% at 50% 42%, rgba(204, 161, 88, 0.14), rgba(204, 161, 88, 0.045) 34%, transparent 72%),
    radial-gradient(ellipse 78% 28% at 50% 112%, rgba(126, 84, 35, 0.14), transparent 72%),
    linear-gradient(116deg, #050504 0%, #15120d 47%, #080807 100%);
  overflow: hidden;
}

.backdrop::before {
  border: 1px solid rgba(218, 181, 111, 0.1);
  border-radius: 1.4rem;
  content: "";
  inset: 1rem;
  position: absolute;
}

.backdrop::after {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.16) 100%);
  box-shadow: inset 0 0 12rem rgba(0, 0, 0, 0.5);
  content: "";
  inset: 0;
  position: absolute;
}

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

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 1.25rem clamp(1.25rem, 4vw, 4rem) 1.5rem;
  position: relative;
}

.topbar,
.footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.logo {
  align-items: center;
  display: inline-flex;
  gap: 0.65rem;
  text-decoration: none;
}

.logo-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 0.55rem;
  color: var(--background);
  display: inline-flex;
  font-size: 0.73rem;
  font-weight: 700;
  height: 2rem;
  justify-content: center;
  letter-spacing: -0.07em;
  width: 2rem;
}

.logo-name {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-dot {
  color: var(--faint);
  font-weight: 400;
}

.status-badge,
.eyebrow,
.edition,
.teaser,
.footer,
.preview-note {
  font-family: "DM Mono", ui-monospace, monospace;
  text-transform: uppercase;
}

.status-badge {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.6rem;
  gap: 0.45rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.7rem;
}

.status-dot {
  background: #83f7b1;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(131, 247, 177, 0.6);
  height: 0.38rem;
  width: 0.38rem;
  animation: pulse 2s infinite;
}

.stage {
  align-items: center;
  display: flex;
  flex: 1;
  justify-content: center;
  padding: 4rem 0;
  position: relative;
  z-index: 1;
}

.opening-view,
.punchline-view {
  max-width: 51rem;
  text-align: center;
  width: 100%;
}

.eyebrow-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2.1rem;
}

.eyebrow,
.edition {
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.13em;
  margin: 0;
}

.edition {
  color: var(--faint);
}

.word-sequence {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  justify-content: center;
  letter-spacing: -0.085em;
  line-height: 0.84;
  margin: 0 auto;
  max-width: 48rem;
}

.word-sequence::after {
  animation: line-in 1s 2.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  content: "";
  height: 1px;
  margin-top: 1.65rem;
  opacity: 0;
  transform: scaleX(0);
  width: min(17rem, 58vw);
}

.word {
  display: inline-block;
  font-size: clamp(3.8rem, 14vw, 9rem);
  font-weight: 600;
  opacity: 0;
  transform: translateY(0.3em) rotate(2deg);
  animation: word-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.word:nth-child(odd) {
  color: var(--ink);
}

.word:nth-child(even) {
  color: var(--pink);
}

.word-one { animation-delay: 0.5s; }
.word-two { animation-delay: 1.6s; }
.word-three { animation-delay: 2.7s; }
.word-four { animation-delay: 3.8s; }
.word-five { animation-delay: 4.9s; }

.opening-view {
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.opening-view.is-exiting {
  opacity: 0;
  transform: scale(0.97) translateY(-0.7rem);
}

.teaser {
  color: var(--faint);
  font-size: 0.63rem;
  letter-spacing: 0.19em;
  margin: 2.5rem 0 0;
}

.cursor {
  animation: blink 1s steps(2, jump-none) infinite;
  color: var(--pink);
}

.punchline-view {
  opacity: 0;
  transform: translateY(1rem) scale(0.98);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.punchline-view.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.redirect-box {
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.redirect-box.is-shown {
  opacity: 1;
  transform: translateY(0);
}

.punchline-view .eyebrow {
  color: var(--pink);
  margin-bottom: 1.25rem;
}

.punchline-view h1 {
  letter-spacing: -0.08em;
  line-height: 0.9;
  margin: 0;
}

.punchline-big,
.punchline-question {
  display: block;
}

.punchline-big {
  color: var(--peach);
  font-size: clamp(5.2rem, 20vw, 12rem);
  font-weight: 700;
}

.punchline-question {
  color: var(--ink);
  font-size: clamp(2.2rem, 7vw, 4.7rem);
  font-weight: 500;
  margin-top: 0.45rem;
}

.punchline-copy {
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.55;
  margin: 2rem auto 0;
  max-width: 31rem;
}

.redirect-box {
  margin: 2.7rem auto 0;
  max-width: 25rem;
  text-align: left;
}

.redirect-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.67rem;
  gap: 0.7rem;
  letter-spacing: 0.03em;
  min-height: 1.3rem;
  text-transform: uppercase;
}

.loader {
  border: 1px solid rgba(247, 243, 255, 0.28);
  border-radius: 50%;
  border-top-color: var(--pink);
  flex: 0 0 auto;
  height: 0.9rem;
  width: 0.9rem;
  animation: spin 0.8s linear infinite;
}

.progress-track {
  background: rgba(247, 243, 255, 0.11);
  border-radius: 999px;
  height: 0.2rem;
  margin-top: 0.8rem;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--pink), var(--peach));
  border-radius: inherit;
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
}

.redirect-box.is-active .progress-bar {
  animation: progress 4.2s linear forwards;
}

.redirect-box.is-paused .loader {
  animation-play-state: paused;
  opacity: 0.65;
}

.redirect-box.is-paused .progress-bar {
  animation-play-state: paused;
  transform: scaleX(1);
}

.preview-note {
  color: var(--faint);
  font-size: 0.59rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
  margin: 1.35rem auto 0;
  max-width: 31rem;
}

.preview-note code {
  color: var(--peach);
  font-family: inherit;
  text-transform: none;
}

.replay-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  margin-top: 1.5rem;
  padding: 0.7rem 1rem;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.replay-button:hover {
  background: rgba(247, 243, 255, 0.1);
  border-color: rgba(247, 243, 255, 0.38);
  transform: translateY(-2px);
}

.footer {
  color: var(--faint);
  font-size: 0.57rem;
  gap: 0.7rem;
  justify-content: center;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
}

.footer-divider {
  color: var(--pink);
}

@keyframes word-in {
  0% {
    opacity: 0;
    transform: translateY(0.3em) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes line-in {
  to {
    opacity: 0.7;
    transform: scaleX(1);
  }
}

@keyframes progress {
  to { transform: scaleX(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(131, 247, 177, 0); }
  50% { box-shadow: 0 0 0 0.3rem rgba(131, 247, 177, 0.12); }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 1rem 1.1rem 1.25rem;
  }

  .logo-name {
    font-size: 0.76rem;
  }

  .status-badge {
    font-size: 0.53rem;
    letter-spacing: 0.04em;
    padding: 0.42rem 0.55rem;
  }

  .stage {
    padding: 3rem 0;
  }

  .eyebrow-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
  }

  .edition {
    display: none;
  }

  .word-sequence {
    gap: 0.08rem;
  }

  .word {
    font-size: clamp(3.15rem, 16vw, 5.2rem);
  }

  .teaser {
    margin-top: 2rem;
  }

  .redirect-box {
    margin-top: 2.1rem;
  }

  .footer {
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
