/* ==========================================================================
   DoorPop marketing site — shared design system
   Palette mirrors lib/theme/app_colors.dart / app_theme.dart exactly, so the
   website reads as the same product as the Android TV app:
     background   #121212   focusCyan  #00D4FF   talkBlue  #2196F3
     liveGreen    #34C759   popupSurface #2A2A2A  glass borders ~14% white
   ========================================================================== */

:root {
  --bg: #121212;
  --bg-raised: #171717;
  --surface: #2a2a2a;
  --surface-glass: rgba(255, 255, 255, 0.06);
  --border-glass: rgba(255, 255, 255, 0.14);
  --border-glass-strong: rgba(255, 255, 255, 0.24);

  --cyan: #00d4ff;
  --blue: #2196f3;
  --green: #34c759;
  --red: #ff3b30;

  --text-primary: #f5f6f7;
  --text-secondary: rgba(245, 246, 247, 0.72);
  --text-muted: rgba(245, 246, 247, 0.52);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-glow: 0 0 0 1px var(--border-glass), 0 20px 60px -20px rgba(0, 212, 255, 0.25);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 30px -18px rgba(0, 0, 0, 0.6);

  --max-width: 1180px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji';
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Ambient background glow, shared by every page for visual continuity. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 420px at 12% -8%, rgba(0, 212, 255, 0.14), transparent 60%),
    radial-gradient(600px 380px at 100% 0%, rgba(33, 150, 243, 0.12), transparent 55%),
    var(--bg);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cyan);
  color: #001018;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* -------------------------------------------------------------------- nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(18, 18, 18, 0.72);
  border-bottom: 1px solid var(--border-glass);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand .pop {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--text-primary);
  background: var(--surface-glass);
}

.nav-cta {
  display: none;
}

@media (min-width: 720px) {
  .nav-cta {
    display: inline-flex;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: var(--surface-glass);
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 720px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-links {
  display: none;
}

@media (min-width: 720px) {
  .nav-links {
    display: flex;
  }
}

.nav-links.is-open {
  display: flex;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 12px 24px 20px;
  background: rgba(18, 18, 18, 0.97);
  border-bottom: 1px solid var(--border-glass);
}

.nav-links.is-open a {
  padding: 14px 16px;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #041018;
  box-shadow: 0 12px 30px -10px rgba(0, 212, 255, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(0, 212, 255, 0.7);
}

.btn-secondary {
  background: var(--surface-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-glass-strong);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.6;
  cursor: default;
  transform: none !important;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 88px 0 72px;
}

.hero-inner {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.25);
}

h1 {
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 800;
}

h1 .accent {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 54ch;
  margin: 0 0 34px;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art .glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.28), transparent 65%);
  filter: blur(10px);
  z-index: 0;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: min(320px, 60vw);
  height: min(320px, 60vw);
  border-radius: 28%;
  box-shadow: var(--shadow-glow);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------- badge */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.pill svg {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

/* -------------------------------------------------------------- sections */

section {
  padding: 76px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.kicker {
  display: block;
  color: var(--cyan);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: -0.015em;
  margin: 0 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 17px;
  margin: 0;
}

/* -------------------------------------------------------------- features */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--surface-glass), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-strong);
  box-shadow: 0 20px 40px -20px rgba(0, 212, 255, 0.35);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--cyan);
  margin-bottom: 18px;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ------------------------------------------------------------- timeline */

.timeline {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
  position: relative;
}

.timeline-step {
  position: relative;
  padding-top: 8px;
}

.timeline-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #041018;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px -10px rgba(0, 212, 255, 0.55);
}

.timeline-step h3 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 700;
}

.timeline-step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

@media (min-width: 720px) {
  .timeline {
    grid-template-columns: repeat(4, 1fr);
  }
  .timeline-step::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% + 40px);
    right: calc(-50% + 40px);
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.5), rgba(33, 150, 243, 0.1));
  }
  .timeline-step:last-child::after {
    display: none;
  }
}

/* ---------------------------------------------------------- screenshots */

.shot-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.shot {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  background: var(--bg-raised);
  box-shadow: var(--shadow-card);
}

.shot-frame {
  aspect-ratio: 16 / 10;
  position: relative;
  background: radial-gradient(120% 120% at 50% 0%, rgba(0, 212, 255, 0.08), transparent 60%), #0c0c0c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

.shot-fallback svg {
  width: 40px;
  height: 40px;
  color: var(--cyan);
  opacity: 0.85;
}

.shot-fallback span {
  font-size: 13px;
  font-weight: 600;
}

.shot-caption {
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-glass);
}

/* ---------------------------------------------------------------- band */

.band {
  border-radius: var(--radius-lg);
  padding: 48px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.14), rgba(33, 150, 243, 0.08));
  border: 1px solid rgba(0, 212, 255, 0.28);
  text-align: center;
}

.band h2 {
  margin-bottom: 12px;
}

.band p {
  color: var(--text-secondary);
  margin: 0 0 28px;
  font-size: 17px;
}

.band .btn-row {
  justify-content: center;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 56px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 40px;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
  text-decoration: none;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 32ch;
}

.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.footer-col a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================ doc pages
   Shared prose layout for /support, /privacy, /terms.
   ========================================================================= */

.doc-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border-glass);
}

.doc-hero h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  margin-bottom: 14px;
}

.doc-hero p {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 60ch;
  margin: 0;
}

.doc-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 18px;
}

.doc-layout {
  display: grid;
  gap: 40px;
  padding: 48px 0 96px;
}

@media (min-width: 940px) {
  .doc-layout {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
}

.doc-toc {
  position: sticky;
  top: 96px;
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
}

.doc-toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.doc-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-toc li {
  counter-increment: toc;
}

.doc-toc a {
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
}

.doc-toc a::before {
  content: counter(toc);
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.doc-toc a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.doc-body {
  min-width: 0;
}

.doc-body section {
  padding: 0 0 40px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 40px;
  scroll-margin-top: 96px;
}

.doc-body section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.doc-body h2 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-body h2 .step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.14);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  flex: none;
}

.doc-body h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  color: var(--text-primary);
}

.doc-body p,
.doc-body li {
  color: var(--text-secondary);
  font-size: 15.5px;
}

.doc-body ul,
.doc-body ol {
  padding-left: 22px;
}

.doc-body strong {
  color: var(--text-primary);
}

.doc-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  margin: 18px 0;
}

.callout svg {
  width: 22px;
  height: 22px;
  color: var(--cyan);
  flex: none;
  margin-top: 2px;
}

.callout p {
  margin: 0;
}

/* -------------------------------------------------------------------- faq */

.faq-item {
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  font-size: 15.5px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .chev {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--cyan);
  transition: transform 0.2s ease;
}

.faq-item[open] summary .chev {
  transform: rotate(180deg);
}

.faq-item .faq-body {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 15px;
}

.faq-item .faq-body p:first-child {
  margin-top: 0;
}

.faq-item .faq-body a {
  color: var(--cyan);
}

/* --------------------------------------------------------------- contact */

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(33, 150, 243, 0.06));
  border: 1px solid rgba(0, 212, 255, 0.28);
}

.contact-card h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.contact-card p {
  margin: 0;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------- download */

.download-card {
  border-radius: var(--radius-lg);
  padding: 40px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.14), rgba(33, 150, 243, 0.08));
  border: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow: var(--shadow-card);
}

.download-card h2 {
  margin: 16px 0 10px;
}

.download-card > p {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 28px;
  max-width: 56ch;
}

.download-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 28px;
}

.download-stat {
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.download-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.download-stat-value {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-lg {
  padding: 18px 34px;
  font-size: 17px;
}

.download-unavailable {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
}

.download-unavailable svg {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  flex: none;
  margin-top: 2px;
}

.download-unavailable strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.download-unavailable p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.download-unavailable a {
  color: var(--cyan);
}

/* -------------------------------------------------------------- utilities */

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-logo {
    animation: none;
  }
}
