/* ============================================================
   VidCatcher — marketing site stylesheet
   Dark-first design system with a full light theme override.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  /* Surfaces (dark default) */
  --surface-0: #0a0b0d;
  --surface-1: #101214;
  --surface-2: #15181b;
  --surface-3: #1b1f23;

  /* Text */
  --text-primary: #f5f7fa;
  --text-secondary: #cdd5df;
  --text-tertiary: #8b93a1;
  --text-quaternary: #5d6675;

  /* Accent */
  --accent: #3e8bff;
  --accent-hover: #5c9dff;
  --accent-ink: #ffffff;
  --accent-tint: rgba(62, 139, 255, 0.12);
  --accent-ring: rgba(62, 139, 255, 0.25);
  --cyan: #38d4e8;
  --green: #2dd68c;
  --amber: #f5b544;
  --red: #f06a6a;

  /* Borders & shadows */
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);

  /* Header */
  --header-bg: rgba(10, 11, 13, 0.82);

  /* Decorative */
  --icon-tile-bg: var(--accent-tint);
  --grid-line: rgba(255, 255, 255, 0.035);
  --hero-glow-a: rgba(62, 139, 255, 0.14);
  --hero-glow-b: rgba(56, 212, 232, 0.08);
  --card-hover-bg: var(--surface-2);

  /* Type scale */
  --text-nano: 0.6875rem;
  --text-micro: 0.75rem;
  --text-sm: 0.875rem;
  --text-body: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: clamp(2.25rem, 5vw, 3.25rem);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --container: 1120px;
  --header-h: 64px;
}

[data-theme="light"] {
  --surface-0: #ffffff;
  --surface-1: #f5f7fa;
  --surface-2: #eef1f5;
  --surface-3: #e6eaef;

  --text-primary: #14181f;
  --text-secondary: #3c4552;
  --text-tertiary: #66707f;
  --text-quaternary: #98a1ae;

  --accent: #0b6bdf;
  --accent-hover: #0a5ec2;
  --accent-tint: rgba(11, 107, 223, 0.1);
  --accent-ring: rgba(11, 107, 223, 0.22);
  --cyan: #0aa2b8;
  --green: #149a5f;
  --amber: #c07c10;
  --red: #d44747;

  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);

  --header-bg: rgba(255, 255, 255, 0.85);

  --icon-tile-bg: var(--accent-tint);
  --grid-line: rgba(15, 23, 42, 0.04);
  --hero-glow-a: rgba(62, 139, 255, 0.1);
  --hero-glow-b: rgba(56, 212, 232, 0.07);
  --card-hover-bg: #ffffff;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent-ring);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

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

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 14px 26px;
  font-size: var(--text-body);
  border-radius: 12px;
}

.btn-sm {
  padding: 7px 14px;
  font-size: var(--text-micro);
}

.btn-chrome {
  background: var(--green);
  color: #05230f;
}

.btn-chrome:hover {
  background: #43e39b;
}

[data-theme="light"] .btn-chrome {
  color: #06321a;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 28px;
  height: 28px;
  flex: none;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.main-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.main-nav a:hover {
  color: var(--text-primary);
  background: var(--surface-2);
}

.main-nav a[aria-current="page"] {
  color: var(--text-primary);
  background: var(--surface-2);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.nav-burger svg {
  width: 18px;
  height: 18px;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 820px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px 16px 16px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
    font-size: var(--text-body);
  }

  .header-actions .btn {
    display: none;
  }

  .nav-burger {
    display: grid;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 320px at 20% -10%, var(--hero-glow-a), transparent 70%),
    radial-gradient(700px 360px at 80% 0%, var(--hero-glow-b), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  font-size: var(--text-micro);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 760px;
  margin: 0 auto;
}

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

.hero-sub {
  max-width: 640px;
  margin: 20px auto 0;
  font-size: var(--text-lg);
  color: var(--text-tertiary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

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

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 860px;
  margin: 56px auto 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat {
  background: var(--surface-1);
  padding: 20px 16px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: var(--text-micro);
  color: var(--text-tertiary);
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--surface-1);
  border-block: 1px solid var(--border);
}

.section[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

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

.eyebrow {
  display: inline-block;
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-desc {
  margin-top: 12px;
  font-size: var(--text-lg);
  color: var(--text-tertiary);
}

/* ---------- Feature sections & cards ---------- */
.feature-group + .feature-group {
  margin-top: 72px;
}

.feature-group-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.feature-group-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent);
}

.feature-group-head h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-group-head p {
  margin-top: 4px;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  max-width: 560px;
}

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

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  transition: background-color 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.feature-card:hover {
  background: var(--card-hover-bg);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-card .feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--icon-tile-bg);
  color: var(--accent);
}

.feature-card .feature-icon .icon {
  width: 18px;
  height: 18px;
}

.feature-card h3 {
  font-size: var(--text-body);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.55;
}

/* Card modifier tints */
.tint-green .feature-icon {
  background: rgba(45, 214, 140, 0.12);
  color: var(--green);
}

.tint-amber .feature-icon {
  background: rgba(245, 181, 68, 0.12);
  color: var(--amber);
}

.tint-cyan .feature-icon {
  background: rgba(56, 212, 232, 0.12);
  color: var(--cyan);
}

/* ---------- How-to steps ---------- */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.howto-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.howto-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.howto-num {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: var(--text-sm);
}

.howto-step h3 {
  font-size: var(--text-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.howto-shot {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f1f2f4;
  box-shadow: var(--shadow-lg);
}

.howto-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.howto-step > p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.55;
}

@media (max-width: 1020px) {
  .howto-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .howto-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }
}

/* ---------- CTA panel ---------- */
.cta-panel {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(500px 260px at 15% 0%, var(--hero-glow-a), transparent 70%),
    radial-gradient(500px 260px at 85% 100%, var(--hero-glow-b), transparent 70%),
    var(--surface-1);
}

.cta-panel h2 {
  font-size: var(--text-3xl);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.cta-panel p {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--text-tertiary);
  font-size: var(--text-lg);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Screenshot slideshow (homepage hero visual) ---------- */
.slideshow {
  max-width: 820px;
  margin: 56px auto 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.slides {
  position: relative;
  aspect-ratio: 1280 / 660;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.slide.is-active {
  opacity: 1;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 14px;
  border-top: 1px solid var(--border);
}

.slide-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background: var(--text-quaternary);
  opacity: 0.45;
  transition: opacity 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.slide-dots button:hover {
  opacity: 0.8;
}

.slide-dots button.is-active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.2);
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
  font-size: var(--text-body);
  font-weight: 600;
}

.faq-q .icon {
  color: var(--text-quaternary);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-q .icon {
  transform: rotate(180deg);
}

.faq-a {
  display: none;
  padding: 0 20px 18px;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.65;
}

.faq-item.open .faq-a {
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-1);
  padding: 56px 0 32px;
  margin-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

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

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

.footer-brand p {
  margin-top: 14px;
  max-width: 300px;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.footer-title {
  font-size: var(--text-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-quaternary);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-links .icon {
  width: 14px;
  height: 14px;
}

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

.footer-disclaimer {
  margin-top: 16px;
  font-size: var(--text-nano);
  line-height: 1.6;
  color: var(--text-quaternary);
  max-width: 820px;
}

/* ---------- Consent banner ---------- */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: none;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  margin-inline: auto;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.consent.show {
  display: flex;
}

.consent p a {
  color: var(--accent);
}

.consent-buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 72px 0 24px;
  text-align: center;
}

.page-hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 620px;
  margin: 16px auto 0;
  font-size: var(--text-lg);
  color: var(--text-tertiary);
}

/* ---------- 404 ---------- */
.notfound {
  text-align: center;
  padding: 120px 0;
}

.notfound code {
  font-family: var(--font-mono);
  font-size: var(--text-6xl, 4rem);
  background: linear-gradient(92deg, var(--accent), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
