/* Brand tokens: same values as apps/web/src/styles/tokens.css (dark theme). */
:root {
  --bg: #050505;
  --surface: #111111;
  --border: #222222;
  --text: #ffffff;
  --muted: #a1a1aa;
  --primary: #c84206;
  --primary-hover: #ea580c;
  --glow: rgba(249, 115, 22, 0.4);
  --danger: #ef4444;
  --green: #22c55e;
  --radius: 14px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(200, 66, 6, 0.14), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  display: block;
  height: 28px;
  width: auto;
  margin: 4px auto 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-hover);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 .hl {
  color: var(--primary-hover);
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ video */

/*
 * The video never pushes the CTA far below the fold: its height is capped at
 * 60% of the viewport and the width follows the aspect ratio.
 */
.video {
  --ratio: 0.5625;
  position: relative;
  width: min(100%, calc(60vh * var(--ratio)));
  width: min(100%, calc(60dvh * var(--ratio)));
  aspect-ratio: var(--ratio);
  margin: 0 auto 20px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.video video,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

.unmute {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.unmute[hidden] {
  display: none;
}

.unmute-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--primary);
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 0 0 var(--glow);
  animation: pulse 1.8s ease-out infinite;
}

.unmute-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.paused-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  font-weight: 700;
  pointer-events: none;
}

.paused-hint[hidden] {
  display: none;
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary-hover);
}

/* -------------------------------------------------------------------- CTA */

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(200, 66, 6, 0.35);
  animation: pulse 2.2s ease-out infinite;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.cta:hover {
  background: var(--primary-hover);
}

.cta:active {
  transform: scale(0.98);
}

.cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.cta[disabled] {
  opacity: 0.75;
  cursor: progress;
  animation: none;
}

.cta-block[hidden] {
  display: none;
}

.cta-block {
  width: 100%;
  animation: rise 0.4s ease-out;
}

.micro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.micro strong {
  color: var(--text);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.trust li::before {
  content: '✓ ';
  color: var(--green);
  font-weight: 800;
}

/* ------------------------------------------------------------------- form */

.steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.steps .bar {
  width: 120px;
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.steps .bar span {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--primary-hover);
}

.card {
  width: 100%;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: left;
}

.field {
  margin: 0 0 14px;
}

.field label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #0a0a0a;
  color: var(--text);
  /* 16px keeps iOS from zooming in on focus. */
  font: inherit;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: #6b6b73;
}

.field input:focus {
  outline: none;
  border-color: var(--primary-hover);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}

.field input[aria-invalid='true'] {
  border-color: var(--danger);
}

.error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.error:empty {
  display: none;
}

.card .cta {
  margin-top: 6px;
  font-size: 17px;
}

.secure {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.legal {
  margin: 14px 0 0;
  color: #71717a;
  font-size: 12px;
  text-align: center;
}

.legal a,
footer a {
  color: inherit;
}

footer {
  padding: 16px;
  color: #71717a;
  font-size: 12px;
  text-align: center;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.spinner[hidden] {
  display: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--glow);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
