/*
 * The same tokens as the app: near-black, one accent, a condensed display
 * face, mono reserved for timecodes. The site and the product should look like
 * the same thing, because they are.
 */
:root {
  --background: #0b0d12;
  --surface: #1a1d24;
  --text: #f2f0ea;
  --muted: #8b8f99;
  --accent: #f5c518;
  --border: #2c303a;

  --display: 'Archivo Black', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Hero ------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  overflow: hidden;
}

/* The dimmed screen everyone is sitting in front of. A soft radial gradient,
   deliberately not a film still — no borrowed imagery. */
.glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 38%,
    rgba(245, 197, 24, 0.13),
    transparent 70%
  );
  pointer-events: none;
}

.subtitles {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-bottom: 8vh;
  pointer-events: none;
}

.bubble {
  background: rgba(26, 29, 36, 0.78);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 12s ease-in-out infinite;
  backdrop-filter: blur(2px);
  max-width: min(92vw, 420px);
}

.bubble:nth-child(2) {
  animation-delay: 3s;
}
.bubble:nth-child(3) {
  animation-delay: 6s;
}
.bubble:nth-child(4) {
  animation-delay: 9s;
}

.tc {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-right: 8px;
}

/* The signature motion: a soft rise and fade, like a subtitle arriving. */
@keyframes rise {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  8%,
  22% {
    opacity: 1;
    transform: translateY(0);
  }
  34% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* Someone who has asked for less movement should get less movement. */
@media (prefers-reduced-motion: reduce) {
  .bubble {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.hero-copy {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.wordmark {
  font-family: var(--display);
  font-size: 28px;
  color: var(--accent);
  margin: 0 0 24px;
  letter-spacing: 0.5px;
}

.wordmark.small {
  font-size: 20px;
  margin: 0;
}

h1 {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.2;
  margin: 0 0 20px;
}

.subhead {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 36px;
}

/* --- Signup ------------------------------------------------------------ */

/*
 * A column now, not a row. This held a field beside a button; it holds two
 * provider buttons, which stack — side by side they read as alternatives of
 * equal weight competing for one decision, and at narrow widths they collide.
 */
.signup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signup input {
  flex: 1 1 260px;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font: inherit;
  padding: 14px 18px;
}

.signup input::placeholder {
  color: var(--muted);
}

/*
 * Outlined rather than filled, matching the app's low-light button style.
 * Explicitly NOT applied to the provider buttons: Apple publish rules about
 * how theirs may look, and Google draw their own, so both opt out below.
 */
.signup button:not(.provider-button),
.share-row button {
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 14px 22px;
}

.signup button:not(.provider-button):hover,
.share-row button:hover {
  background: rgba(245, 197, 24, 0.1);
}

.signup button:disabled {
  opacity: 0.5;
  cursor: default;
}

.error {
  color: #ff5a5f;
  font-size: 14px;
  margin: 14px 0 0;
}

.confirmation {
  margin-top: 8px;
}

.confirmed {
  font-family: var(--display);
  font-size: 22px;
  margin: 0 0 6px;
}

.share-copy {
  color: var(--muted);
  margin: 0 0 18px;
}

.share-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-row input {
  flex: 1 1 260px;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  padding: 14px 18px;
}

.referral-count {
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
}

/* --- Below the fold ---------------------------------------------------- */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.features {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.feature h2 {
  font-family: var(--display);
  font-size: 19px;
  margin: 0 0 10px;
}

.feature p {
  color: var(--muted);
  margin: 0;
}

.story {
  border-top: 1px solid var(--border);
  padding-top: 64px;
  max-width: 640px;
}

.story h2 {
  font-family: var(--display);
  font-size: 22px;
  margin: 0 0 16px;
}

.story p {
  color: var(--muted);
  margin: 0 0 16px;
}

footer {
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

footer nav {
  display: flex;
  gap: 20px;
}

footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

footer a[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
}

/* Required by TMDB's free tier — a condition of use, not a courtesy. */
.attribution {
  color: var(--muted);
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
}

/* --- Joining, which is two provider buttons rather than a field ---------- */

.provider-button {
  width: 100%;
  max-width: 320px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Google renders its own button into this slot and sizes it itself. */
#google-button {
  min-height: 44px;
}

/*
 * Apple publish rules about how their button may look, and the safest way to
 * honour them is to draw it the way they draw it: their black, their radius,
 * their wordmark beside the label. Deliberately not restyled to match the rest
 * of the page.
 */
.provider-button.apple {
  background: #000;
  color: #fff;
  border: 1px solid #000;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}

.provider-button.apple::before {
  content: '\F8FF'; /* The Apple logo, in the system font that carries it. */
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  margin-right: 0.5rem;
}

.provider-button.apple:hover {
  opacity: 0.85;
}

.signup-note {
  color: var(--text-secondary, #8b8f99);
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
}

/* The door for people who already belong, sitting above the waitlist. */
.enter-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}
.enter-button {
  background: #f5c518;
  border-radius: 999px;
  color: #111;
  display: inline-block;
  font-weight: 700;
  min-height: 44px;
  line-height: 44px;
  padding: 0 1.75rem;
  text-decoration: none;
}
.enter-button:hover {
  filter: brightness(1.08);
}
.enter-note {
  color: #9aa0a6;
  font-size: 0.9rem;
  margin: 0;
  max-width: 22rem;
}
