/* ==========================================================================
   HD Video Downloader  |  Fusion Media
   Shared styles  -  Dark theme only
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Background + surfaces */
  --bg: #0F1411;
  --surface-1: #181E1A;
  --surface-2: #222A25;
  --surface-3: #2D352F;

  /* Brand */
  --red: #DF2B2E;
  --red-pressed: #C81E22;
  --accent: #FF5B52;
  --green: #46B36F;

  /* Text */
  --text: #F3F6F2;
  --text-2: #AAB1AC;
  --text-muted: #757C76;

  /* Borders */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  /* Gradient: logo + glow accents ONLY, never on buttons */
  --grad: linear-gradient(326.4deg, #EE5334 0%, #DF2B2E 100%);

  /* Radii */
  --r-card: 24px;
  --r-sm: 16px;
  --r-chip: 14px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-cta: 0 12px 32px rgba(223, 43, 46, 0.42);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 44px rgba(0, 0, 0, 0.4);

  /* Fonts */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --maxw: 1120px;
  --header-h: 72px;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Visible focus states for accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- Typography --------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3rem); /* ~36 - 48 */
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.625rem; /* 26 */
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.125rem; /* 18 */
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

small,
.small {
  font-size: 0.8125rem; /* 13 */
}

.lead {
  font-size: clamp(1rem, 2.5vw, 1.0625rem); /* 16 - 17 */
  color: var(--text-2);
}

/* ---- Layout helpers ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: clamp(56px, 9vw, 96px);
}

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

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

.text-secondary {
  color: var(--text-2);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ---- Buttons ------------------------------------------------------------ */
/* Buttons are FLAT red, never gradient */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--red);
  color: #ffffff;
  box-shadow: var(--shadow-cta);
}

.btn-primary:hover {
  background-color: var(--red-pressed);
  text-decoration: none;
}

.btn-primary:active {
  background-color: var(--red-pressed);
  transform: translateY(1px);
}

.btn-ghost {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background-color: var(--surface-3);
  text-decoration: none;
}

/* Google Play badge link */
.play-badge {
  display: inline-block;
  border-radius: 12px;
}

.play-badge img {
  height: 56px;
  width: auto;
}

.play-badge:hover {
  text-decoration: none;
}

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(15, 20, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

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

.brand-name {
  white-space: nowrap;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.nav-links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9375rem;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta .btn {
  padding: 11px 20px;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span::before {
  position: absolute;
  top: -6px;
}

.nav-toggle span::after {
  position: absolute;
  top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 8vw, 88px);
}

/* Glow accent uses the brand gradient (allowed on glows) */
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 460px;
  height: 460px;
  background: var(--grad);
  filter: blur(120px);
  opacity: 0.35;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy .lead {
  margin-bottom: 28px;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

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

/* Phone mockup placeholder */
.phone {
  justify-self: center;
  width: min(300px, 80vw);
  aspect-ratio: 9 / 19;
  border-radius: 40px;
  padding: 14px;
  background: var(--grad);
  box-shadow: var(--shadow-card);
  position: relative;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 91, 82, 0.18), transparent 60%),
    var(--surface-1);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.play-glyph {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(238, 83, 52, 0.4);
}

.play-glyph svg {
  width: 38px;
  height: 38px;
  fill: #ffffff;
  margin-left: 5px;
}

.phone-screen .phone-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
}

.phone-screen .phone-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
}

.phone-bar {
  width: 80%;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.phone-bar span {
  display: block;
  height: 100%;
  width: 64%;
  background: var(--green);
  border-radius: var(--r-pill);
}

/* ---- Feature cards ------------------------------------------------------ */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-chip);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* ---- How it works ------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step-num {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-cta);
}

.step-body h3 {
  margin-bottom: 4px;
}

.step-body p {
  margin: 0;
  color: var(--text-2);
}

/* ---- Disclaimer band ---------------------------------------------------- */
.disclaimer {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}

.disclaimer .container {
  padding-block: 24px;
}

.disclaimer p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: center;
}

/* ---- CTA band ----------------------------------------------------------- */
.cta-band {
  text-align: center;
}

.cta-card {
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(223, 43, 46, 0.18), transparent 60%),
    var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-card);
  padding: clamp(40px, 7vw, 64px) 24px;
  box-shadow: var(--shadow-card);
}

.cta-card h2 {
  margin-bottom: 10px;
}

.cta-card .lead {
  margin-bottom: 28px;
  max-width: 48ch;
  margin-inline: auto;
}

.cta-actions {
  display: flex;
  justify-content: center;
}

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  padding-block: 48px;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9375rem;
}

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

.footer-meta {
  color: var(--text-muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-meta p {
  margin: 0 0 6px;
}

/* ---- Legal pages -------------------------------------------------------- */
.legal {
  padding-block: clamp(48px, 8vw, 80px);
}

.legal-inner {
  max-width: 760px;
  margin-inline: auto;
}

.legal h1 {
  margin-bottom: 8px;
}

.legal .effective {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.legal h2 {
  font-size: 1.375rem;
  margin-top: 40px;
}

.legal h3 {
  margin-top: 28px;
}

.legal p,
.legal li {
  color: var(--text-2);
  font-size: 1rem;
}

.legal ul {
  padding-left: 22px;
  margin: 0 0 1rem;
}

.legal li {
  margin-bottom: 8px;
}

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

.legal strong {
  color: var(--text);
  font-weight: 700;
}

.back-link {
  display: inline-block;
  margin-top: 40px;
  font-weight: 600;
}

/* ---- Responsive --------------------------------------------------------- */
@media (min-width: 720px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .step {
    flex-direction: column;
  }
}

@media (min-width: 940px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .hero-copy {
    text-align: left;
  }
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid .card:nth-child(4),
  .card-grid .card:nth-child(5) {
    grid-column: span 1;
  }
  .footer-grid {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .footer-meta {
    flex-basis: 100%;
  }
}

/* Mobile nav behaviour */
@media (max-width: 859px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-strong);
    padding: 12px 20px 20px;
    transform: translateY(-130%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-card);
  }
  .nav[data-open="true"] {
    transform: translateY(0);
  }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-links li {
    border-bottom: 1px solid var(--border);
  }
  .nav-links a {
    display: block;
    padding: 16px 4px;
    font-size: 1rem;
  }
  .nav-cta {
    margin-top: 16px;
  }
  .nav-cta .btn {
    width: 100%;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
