/* TopCut.ai teaser landing page: scroll-reveal feature demos.
   Brand palette lives in theme.css (overrides the :root defaults below). */
:root {
  --bg: #0a0f1f;
  --bg-elevated: #111a33;
  --text: #f2f6ff;
  --muted: #8da2c0;
  --accent: #34e7e4;
  --accent-rgb: 52, 231, 228;
  --accent-soft: rgba(52, 231, 228, 0.16);
  --hairline: rgba(141, 162, 192, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: var(--font);
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;
  --device-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
  --ambient-link-alpha: 0.16;
  --ambient-dot-alpha: 0.45;
  --titlebar-bg: rgba(255, 255, 255, 0.02);
  --url-pill-bg: rgba(255, 255, 255, 0.04);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* fixed ambient particle canvas behind everything */
#ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, var(--accent-soft) 0%, transparent 55%);
}

main { position: relative; z-index: 1; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.hero .brand {
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 6px;
  text-transform: uppercase;
  font-size: 15px;
  margin-bottom: 28px;
}
.brand-logo {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto 18px;
  border-radius: 12px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -2px;
  max-width: 14ch;
}
.hero p {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  max-width: 60ch;
  margin-top: 26px;
  line-height: 1.5;
}
.soon-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 30px;
}
/* ---------- beta login (hero, top right) ---------- */
.beta-login {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 5;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.beta-login:hover {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.7);
}
@media (max-width: 640px) {
  .beta-login { top: 16px; right: 16px; padding: 8px 14px; font-size: 13px; }
}

/* ---------- waitlist signup ---------- */
.signup { margin-top: 36px; width: 100%; max-width: 460px; }
.signup-row + .signup-row { margin-top: 10px; }
.q { margin-top: 18px; }
.q-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  text-align: left;
}
.q-hint { font-weight: 400; opacity: 0.75; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-elevated);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  padding: 7px 13px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.chip:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--text); }
.chip.on {
  border-color: rgba(var(--accent-rgb), 0.8);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text);
}
.signup-row {
  display: flex;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.signup-row:focus-within {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}
.signup input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  padding: 12px 10px 12px 18px;
}
.signup input::placeholder { color: var(--muted); opacity: 0.7; }
.signup button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  color: var(--bg);
  background: var(--accent);
  transition: transform 0.15s ease, filter 0.2s ease;
  white-space: nowrap;
}
.signup button:hover { filter: brightness(1.1); }
.signup button:active { transform: scale(0.97); }
.signup button:disabled { opacity: 0.6; cursor: default; }
.signup-note {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 12px;
  text-align: center;
}
.signup-status {
  font-family: var(--mono);
  font-size: 13.5px;
  margin-top: 10px;
  text-align: center;
  min-height: 1.2em;
  color: var(--accent);
}
.signup-status.error { color: #ff7a76; }
.cta .signup { margin-left: auto; margin-right: auto; }

/* ---------- beta application modal ---------- */
body.modal-open { overflow: hidden; }
.beta-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.beta-modal[hidden] { display: none; }
.beta-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.beta-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  padding: 30px 28px 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  text-align: left;
  animation: beta-pop 0.25s ease;
}
@keyframes beta-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
}
.beta-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.beta-close:hover { color: var(--text); background: rgba(var(--accent-rgb), 0.12); }
.beta-progress {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
  min-height: 1em;
}
.beta-title {
  font-family: var(--font-heading);
  font-size: 21px;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 18px;
}
.beta-title .q-hint {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.beta-card .signup-row { box-shadow: none; background: var(--bg); }
.beta-card .signup-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  padding: 12px 10px 12px 18px;
}
.beta-card .signup-row input::placeholder { color: var(--muted); opacity: 0.7; }
.beta-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
}
.beta-next {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  color: var(--bg);
  background: var(--accent);
  transition: transform 0.15s ease, filter 0.2s ease;
  white-space: nowrap;
}
.beta-next:hover { filter: brightness(1.1); }
.beta-next:active { transform: scale(0.97); }
.beta-next:disabled { opacity: 0.6; cursor: default; }
.beta-skip {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.beta-skip:hover { color: var(--text); }
.beta-skip:disabled { opacity: 0.6; cursor: default; }
.beta-done-sub { color: var(--muted); font-size: 15px; }
.beta-status { text-align: left; }

.scroll-hint {
  margin-top: 64px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 2px;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(8px); opacity: 1; } }

/* ---------- feature sections ---------- */
.feature {
  /* Tighter than full-viewport: content is ~500px tall, so 100vh sections left
     a dead gap between consecutive features (worse on tall displays). */
  min-height: 84vh;
  display: flex;
  align-items: center;
  padding: clamp(64px, 9vh, 96px) max(48px, 6vw);
  gap: clamp(40px, 6vw, 96px);
}
.feature .copy { flex: 0 0 38%; max-width: 560px; }
.feature .demo { flex: 1; }
.feature.flip { flex-direction: row-reverse; }

.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 16px;
  margin-bottom: 20px;
}
.feature h2 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 60px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -1.2px;
}
.feature .sub {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.5;
  margin-top: 22px;
}

/* device frame around the looping demo */
.device {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  box-shadow: var(--device-shadow);
}
.titlebar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--titlebar-bg);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.url {
  margin-left: 12px;
  flex: 1;
  height: 24px;
  border-radius: 7px;
  background: var(--url-pill-bg);
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}
.device video {
  display: block;
  width: 100%;
  aspect-ratio: 1280 / 800;
  object-fit: cover;
  background: var(--bg);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
/* stagger: demo eases in a touch after the copy, so it "populates" */
.demo.reveal { transition-delay: 0.05s; transform: translateY(56px) scale(0.97); }
.demo.reveal.in { transform: none; }
.sub.reveal { transition-delay: 0.08s; }

/* ---------- closing coming-soon section ---------- */
.cta {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -1.2px;
  max-width: 18ch;
}
.cta .sub {
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
  margin-top: 22px;
  max-width: 58ch;
}
.cta a, footer a { color: var(--accent); text-decoration: none; }
.cta a:hover, footer a:hover { text-decoration: underline; }

footer {
  text-align: center;
  padding: 80px 24px 100px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  position: relative;
  z-index: 1;
}
footer .fineprint {
  margin-top: 18px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.6;
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.7;
}

@media (max-width: 880px) {
  .feature, .feature.flip { flex-direction: column; text-align: left; }
  .feature .copy { flex: none; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
