/* ============================================================
   Teleprompt — Landing Page
   Clean & minimal, Linear/Raycast-inspired
   ============================================================ */

:root {
  --accent: #17876D;
  --accent-hover: #136D58;

  --bg: #0C0C0E;
  --bg-elev: #141417;
  --fg: #F5F5F3;
  --fg-muted: #8A8A90;
  --fg-subtle: #808088;
  --border: rgba(245, 245, 243, 0.08);
  --border-strong: rgba(245, 245, 243, 0.14);
  --window-chrome: #1A1A1D;
  --video-bg: #18181B;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  --grid-line: rgba(245, 245, 243, 0.04);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Page chrome ---------- */

.page {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: var(--vh, 100vh);
  max-height: var(--vh, 100vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(14px, 2.2vh, 26px) clamp(20px, 4vw, 40px);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

/* ---------- Nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-muted);
}
.status-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ---------- Main (split card layout) ---------- */

.main {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(8px, 1.6vh, 20px) 0;
  min-height: 0;
  overflow: hidden;
}
.main > * { min-height: 0; min-width: 0; }

.split-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 100%;
  height: 100%;
}
.split-card > * { min-height: 0; min-width: 0; }

.text-side {
  padding: clamp(24px, 4vh, 48px) clamp(24px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(16px, 2.4vh, 28px);
  border-right: 1px solid var(--border);
}

.video-side {
  padding: clamp(16px, 3vh, 32px);
  background: var(--video-bg);
  display: grid;
  place-items: center;
}

/* ---------- Headline block ---------- */

.headline-block {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 18px);
}

.headline {
  font-size: clamp(36px, min(5.6vw, 7.5vh), 76px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--fg);
  text-wrap: balance;
}

.sub {
  font-size: clamp(16px, 2vh, 20px);
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- Form ---------- */

.form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 460px;
  width: 100%;
  margin-top: 2px;
}

.form input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form input[type="email"]::placeholder { color: var(--fg-subtle); }
.form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.btn {
  height: 44px;
  padding: 0 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.08s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn svg { transition: transform 0.15s ease; }
.btn:hover svg { transform: translateX(2px); }

.form-note {
  font-size: 12px;
  color: var(--fg-subtle);
}


.form-success {
  font-size: 13px;
  color: var(--fg);
  padding: 12px 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 10px;
  max-width: 460px;
}

/* ---------- Video ---------- */

.video {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Clean frame (no chrome) */
.video .video-chrome { display: none; }
.video .video-body {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--accent) 6%, var(--video-bg)),
    var(--video-bg)
  );
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

/* Actual video element (when you replace the placeholder) */
.video .video-body video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-placeholder {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  color: var(--fg-muted);
}

.play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.play-btn:hover { transform: scale(1.06); box-shadow: var(--shadow-lg); }
.play-btn svg { margin-left: 3px; }

.placeholder-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  background: var(--bg-elev);
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Subtle voice waveform background */
.waveform {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0.08;
  pointer-events: none;
  overflow: hidden;
}
.waveform span {
  width: 3px;
  background: var(--fg);
  border-radius: 2px;
  animation: wave 1.4s ease-in-out infinite;
}
.waveform span:nth-child(1)  { height: 18%; animation-delay: 0.00s; }
.waveform span:nth-child(2)  { height: 36%; animation-delay: 0.05s; }
.waveform span:nth-child(3)  { height: 60%; animation-delay: 0.10s; }
.waveform span:nth-child(4)  { height: 82%; animation-delay: 0.15s; }
.waveform span:nth-child(5)  { height: 50%; animation-delay: 0.20s; }
.waveform span:nth-child(6)  { height: 30%; animation-delay: 0.25s; }
.waveform span:nth-child(7)  { height: 70%; animation-delay: 0.30s; }
.waveform span:nth-child(8)  { height: 90%; animation-delay: 0.35s; }
.waveform span:nth-child(9)  { height: 55%; animation-delay: 0.40s; }
.waveform span:nth-child(10) { height: 25%; animation-delay: 0.45s; }
.waveform span:nth-child(11) { height: 42%; animation-delay: 0.50s; }
.waveform span:nth-child(12) { height: 68%; animation-delay: 0.55s; }
.waveform span:nth-child(13) { height: 88%; animation-delay: 0.60s; }
.waveform span:nth-child(14) { height: 38%; animation-delay: 0.65s; }
.waveform span:nth-child(15) { height: 20%; animation-delay: 0.70s; }
.waveform span:nth-child(16) { height: 55%; animation-delay: 0.75s; }
.waveform span:nth-child(17) { height: 72%; animation-delay: 0.80s; }
.waveform span:nth-child(18) { height: 44%; animation-delay: 0.85s; }
.waveform span:nth-child(19) { height: 28%; animation-delay: 0.90s; }
.waveform span:nth-child(20) { height: 60%; animation-delay: 0.95s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.2); }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fg-subtle);
  padding-top: clamp(8px, 1.5vh, 16px);
  flex: 0 0 auto;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-links a:hover { color: var(--fg); }

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  /* Undo the fixed no-scroll desktop shell entirely */
  .page {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 32px;
  }

  /* Let main size to its content */
  .main {
    flex: none;
    display: block;
    overflow: visible;
    padding: 16px 0;
    min-height: 0;
  }

  /* Stack card vertically, auto height */
  .split-card {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    border-radius: 16px;
  }

  .text-side {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 28px 20px;
    gap: 20px;
  }

  .video-side {
    padding: 20px;
  }

  /* Video sizes by aspect ratio, not by parent height */
  .video {
    height: auto;
    width: 100%;
  }

  .video .video-body {
    flex: none;
    aspect-ratio: 16 / 9;
    width: 100%;
  }

  .headline {
    font-size: clamp(36px, 9.5vw, 56px);
  }

  .sub {
    font-size: 17px;
  }

  /* Form wraps on very narrow screens */
  .form {
    flex-wrap: wrap;
  }

  .form input[type="email"] {
    flex: 1 1 160px;
  }

  .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-top: 20px;
  }
}
