:root {
  --font: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "UnifrakturMaguntia", "Fragment Mono", serif; /* blackletter headings */
  --bg: #04040a;
  --ink: #f4f4f6;
  --muted: #9a9aae;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.4);
  --accent: #f2a3d4;             /* pink — echoes the DEAD SYNTAX chrome */
  --accent-rgb: 242, 163, 212;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-variant-caps: small-caps; /* the "SC" look (Fragment Mono has no SC sibling on Google Fonts) */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* Scroll lock during the submit auto-zoom */
body.locked { overflow: hidden; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---- Starfield ---- */
#starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  background:
    radial-gradient(120% 120% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.6) 100%),
    var(--bg);
}

/* ---- Stage: every slide shares one centered grid cell and zooms through it ---- */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none; /* each slide opts back in when it's centered (set by JS) */
}

.slide {
  grid-area: 1 / 1; /* stack in the same cell */
  width: min(92vw, 760px);
  text-align: center;
  opacity: 0; /* JS drives opacity/transform every frame */
  will-change: transform, opacity, filter;
  transform-origin: 50% 50%;
}

/* ---- Slide 0: hero wordmark ---- */
.wordmark {
  width: min(70vw, 660px);
  height: auto;
  user-select: none;
  /* gentle idle float lives on the image so it won't fight the JS zoom on .hero */
  animation: float 7s ease-in-out infinite;
  filter:
    drop-shadow(0 0 26px rgba(var(--accent-rgb), 0.30))
    drop-shadow(0 0 70px rgba(var(--accent-rgb), 0.14));
}

@keyframes float {
  0%, 100% { transform: translateY(-6px); }
  50%      { transform: translateY(6px); }
}

/* ---- Slide 1: signup ---- */
.signup { padding: 0 6vw; }

.kicker {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
}

.signup-title {
  margin: 0 0 28px;
  font-family: var(--display);
  font-variant: normal;
  text-transform: lowercase;
  font-weight: 400;
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  letter-spacing: 0.01em;
  line-height: 1.02;
}

/* ---- Form ---- */
.form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}

.form-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  font-variant: normal;       /* keep typed emails normal-case, not small-caps */
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.form-input::placeholder { color: rgba(255, 255, 255, 0.32); font-variant: normal; }
.form-input:focus {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16);
}
.form-input:user-invalid { border-color: rgba(255, 120, 120, 0.6); }

.form-button {
  flex: 0 0 auto;
  padding: 14px 22px;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0a0a12;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.45);
}
.form-button:active { transform: translateY(1px); }

.form-note {
  margin: 16px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem; /* a touch smaller than the "Coming soon" kicker (0.78rem) */
  color: var(--muted);
}

/* ---- Slide 2: success line ---- */
.success-line {
  margin: 0;
  font-family: var(--display);
  font-variant: normal;
  text-transform: lowercase;
  font-weight: 400;
  font-size: clamp(2.2rem, 6.5vw, 3.8rem);
  line-height: 1.1;
  color: var(--accent);
  text-shadow: 0 0 34px rgba(var(--accent-rgb), 0.5);
}

/* ---- Slide 3: logo + socials ---- */
/* The mark sits centered; the three icons form a triangle around it:
   Instagram at the apex (top), X + TikTok at the base (bottom corners). */
.socials {
  position: relative;
  width: min(82vw, 300px);
  height: min(82vw, 300px);
  margin: 0 auto;
}
.socials-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(74px, 14vw, 108px);
  height: auto;
  user-select: none;
  filter: drop-shadow(0 0 26px rgba(var(--accent-rgb), 0.24));
}
.socials-links {
  position: absolute;
  inset: 0; /* positioning context for the triangle */
}
.social {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border-radius: 50%;
  transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
/* Perfect equilateral triangle (side ≈ 194px), centred on the logo.
   Icon centres sit at radius R=112 from centre: apex (0,-112), base (±97,+56). */
.socials-links .social { top: 50%; left: 50%; }
.socials-links .social:nth-child(1) { margin-left: -22px;  margin-top: -134px; } /* Instagram — apex (top) */
.socials-links .social:nth-child(2) { margin-left: -119px; margin-top: 34px; }   /* X — bottom-left */
.socials-links .social:nth-child(3) { margin-left: 75px;   margin-top: 34px; }   /* TikTok — bottom-right */
.social:hover {
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35);
}
.social:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Scroll hint ---- */
.scroll-hint {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  opacity: 0;
}
.scroll-hint svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(5px); opacity: 1; }
}

/* ---- Scroll track (just makes the page tall enough to scroll) ---- */
.scroll-track {
  position: relative;
  width: 100%;
  height: 260vh;
  pointer-events: none;
}

/* ---- Reduced motion: keep it calm ---- */
@media (prefers-reduced-motion: reduce) {
  .wordmark { animation: none; }
  .scroll-hint svg { animation: none; }
}

/* ---- Small screens ---- */
@media (max-width: 520px) {
  .form { flex-direction: column; }
  .form-button { width: 100%; }
}
