/**
 * hero.css — Pre-auth landing hero for index.html (Issue 136 + 2026-06-07 redirect).
 *
 * Direction: softer, rounder, more "futuristic" than the Linear-locked
 * data-page aesthetic. Aurora radial gradient behind the hero, gradient
 * H1, pill-shaped URL form with glow on focus, large 16-24px radii,
 * glassmorphism preview card in place of the demo MP4.
 *
 * Visibility is driven by `body.is-hero-mode` (set by auth.js when /auth/me
 * returns 401 on a page marked `data-allow-anonymous`). The hero block
 * lives inside the same template as the dashboard; both surfaces share <body>.
 *
 *   body.is-hero-mode  → .hero shown, .dashboard hidden, nav links hidden
 *   body (default)     → .hero hidden, dashboard shown (existing behaviour)
 */

.hero { display: none; }
body.is-hero-mode .hero { display: block; }
body.is-hero-mode .dashboard,
body.is-hero-mode .dna-cta,
body.is-hero-mode .summary-cards,
body.is-hero-mode .analyze-cta,
body.is-hero-mode .link-video-details,
body.is-hero-mode .video-table,
body.is-hero-mode .section-header,
body.is-hero-mode #activity-panel-root { display: none !important; }
/* In hero mode the nav links to authenticated surfaces should be hidden;
   the brand mark + Pricing link are kept so the public landing still has
   a way into pricing. */
body.is-hero-mode .nav-links a:not([href="/static/pricing.html"]) { display: none; }
body.is-hero-mode .nav-balance,
body.is-hero-mode .nav-help,
body.is-hero-mode #nav-user,
body.is-hero-mode .nav .logout-link { display: none; }
/* The site-wide disclaimer band is duplicated in the hero; hide the band
   so the hero owns the narrative. */
body.is-hero-mode > .disclaimer { display: none; }

/* Sign-in CTA — visible ONLY in hero mode (authenticated users see their
   nav-user + logout instead). Keeps a clear path to login without forcing
   the visitor through the YouTube-URL form first. */
.nav-signin { display: none; }
body.is-hero-mode .nav-signin {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  margin-left: var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: #0b0c12;
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  box-shadow: var(--glow-accent-soft);
  transition: transform var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
body.is-hero-mode .nav-signin:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow-accent);
}

/* ── Hero shell with aurora backdrop ────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: clamp(var(--space-10), 9vw, 8rem) var(--space-4) var(--space-12);
  max-width: 880px;
  margin: 0 auto;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -50% 20% -50%;
  background: var(--gradient-aurora);
  pointer-events: none;
  z-index: -1;
}

/* ── H1 with gradient text ──────────────────────────────────────────── */
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-5);
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .sub {
  color: var(--color-text-muted);
  font-size: clamp(var(--text-md), 1.6vw, var(--text-lg));
  line-height: var(--leading-relaxed);
  margin: 0 auto var(--space-8);
  max-width: 560px;
}

/* ── Pill-shaped URL form with glow on focus ────────────────────────── */
.hero-form {
  display: flex;
  gap: var(--space-2);
  background: rgba(20, 22, 31, 0.72);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  padding: var(--space-2);
  max-width: 580px;
  margin: 0 auto var(--space-3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.hero-form:focus-within {
  border-color: var(--color-accent);
  box-shadow: var(--glow-focus-ring);
}

.hero-form input[type="url"],
.hero-form input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  padding: var(--space-3) var(--space-5);
  outline: none;
  min-width: 0;
  border-radius: var(--radius-pill);
}
.hero-form input::placeholder { color: var(--color-text-subtle); }

.hero-form button {
  background: linear-gradient(180deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease),
              filter var(--duration-fast) var(--ease);
  box-shadow: var(--glow-accent-soft);
}
.hero-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: var(--glow-accent);
}
.hero-form button:active { transform: translateY(0); }

.hero-form-error {
  color: var(--color-danger);
  font-size: var(--text-xs);
  min-height: 18px;
  margin-bottom: var(--space-4);
}

.hero-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  margin-bottom: var(--space-10);
}

/* ── Preview card (replaces broken demo MP4 placeholder) ──────────────
   * A CSS-only stylized window suggesting the product UI. Until a real
   * demo loop is recorded, this carries the visual without a 404'd asset.
   * Glassmorphism panel + gradient border + faux clip list inside. */
.hero-demo {
  position: relative;
  margin: 0 auto;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-2xl);
  background:
    linear-gradient(135deg, rgba(94, 106, 210, 0.12), rgba(94, 106, 210, 0.02) 60%),
    rgba(20, 22, 31, 0.7);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--glow-accent-soft), 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.hero-demo-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: rgba(13, 14, 22, 0.5);
}
.hero-demo-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-text-subtle);
  opacity: 0.5;
}
.hero-demo-dot.r { background: #ff5f57; opacity: 0.7; }
.hero-demo-dot.y { background: #febc2e; opacity: 0.7; }
.hero-demo-dot.g { background: #28c840; opacity: 0.7; }
.hero-demo-url {
  margin-left: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}
.hero-demo-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
}
.hero-demo-clip {
  background: rgba(28, 31, 44, 0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-2);
  text-align: left;
}
.hero-demo-clip .badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.05em;
}
.hero-demo-clip .title {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}
.hero-demo-clip .meta {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  font-family: var(--font-mono);
}

@media (max-width: 600px) {
  .hero { padding: var(--space-8) var(--space-3) var(--space-6); }
  .hero-form { flex-direction: column; border-radius: var(--radius-xl); }
  .hero-form button { width: 100%; }
  .hero-demo-body { grid-template-columns: 1fr; }
}
