/* ============================================================
   Aero IPTV — Apple-style design language
   No external fonts, CDN, analytics, or tracking.
   System font stack mirrors SF Pro on Apple devices.
   Light / dark via prefers-color-scheme.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  color-scheme: light dark;

  /* Neutrals */
  --bg:           #f5f5f7;
  --bg-hero:      #000000;
  --bg-section:   #ffffff;
  --bg-section-alt: #f5f5f7;
  --text:         #1d1d1f;
  --text-hero:    #f5f5f7;
  --text-muted:   #6e6e73;
  --text-hero-muted: #a1a1a6;

  /* Accent */
  --accent:       #0071e3;
  --accent-h:     #0077ed;

  /* Borders */
  --border:       rgba(0,0,0,.08);
  --border-nav:   rgba(0,0,0,.12);

  /* Typography — mirrors SF Pro */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --max-w:      980px;
  --prose-w:    720px;
  --nav-h:      52px;
  --section-v:  96px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:              #000000;
    --bg-hero:         #000000;
    --bg-section:      #1d1d1f;
    --bg-section-alt:  #000000;
    --text:            #f5f5f7;
    --text-muted:      #86868b;
    --border:          rgba(255,255,255,.1);
    --border-nav:      rgba(255,255,255,.12);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -.022em;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ============================================================
   NAV — sticky, frosted glass Apple style
   ============================================================ */
.site-nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,245,247,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-nav);
}

@media (prefers-color-scheme: dark) {
  .site-nav-bar {
    background: rgba(29,29,31,.72);
  }
}

/* Hero page — nav is dark/transparent over black hero */
.site-nav-bar.nav-dark {
  background: rgba(0,0,0,.72);
  border-bottom-color: rgba(255,255,255,.1);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
  height: var(--nav-h);
}

.site-nav .logo {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--text);
}
.nav-dark .logo { color: #f5f5f7; }

.site-nav .logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: .8125rem;
}
.nav-links a { color: var(--text-muted); font-weight: 400; }
.nav-dark .nav-links a { color: rgba(245,245,247,.68); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-dark .nav-links a:hover { color: #f5f5f7; }
.nav-links a[aria-current="page"] { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-section-alt);
  border-top: 1px solid var(--border);
  padding: 24px 22px;
  font-size: .75rem;
  letter-spacing: -.016em;
  color: var(--text-muted);
}
.site-footer .footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); text-decoration: none; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   PROSE PAGES (privacy, support)
   ============================================================ */
.prose-page {
  max-width: var(--prose-w);
  margin: 0 auto;
  padding: 56px 22px 96px;
}
.prose-page h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.1;
  margin-bottom: .25em;
}
.prose-page h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.025em;
  margin-top: 2.5em;
  margin-bottom: .5em;
}
.prose-page p  { margin-bottom: .8em; }
.prose-page dd { margin-bottom: .8em; }
.prose-page dt {
  font-weight: 600;
  margin-top: 1.25em;
  letter-spacing: -.022em;
}
.prose-page dd { margin-left: 0; color: var(--text-muted); }
.prose-page .updated {
  color: var(--text-muted);
  font-size: .9375rem;
  margin-bottom: 2em;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-hero);
  text-align: center;
  padding: 80px 22px 0;
  /* hero bleeds to full width */
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* Eyebrow label */
.hero .eyebrow {
  display: block;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.016em;
  color: var(--accent);
  margin-bottom: .4em;
}

.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.05;
  color: #f5f5f7;
  margin-bottom: .4em;
}

.hero .tagline {
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  font-weight: 400;
  letter-spacing: -.022em;
  line-height: 1.47059;
  color: var(--text-hero-muted);
  max-width: 580px;
  margin: 0 auto 2.25rem;
}

/* App Store badge */
.badge-link {
  display: inline-block;
  margin-bottom: 56px;
}
.badge-link:focus-visible { border-radius: 14px; }
.badge-link svg { display: block; }

/* Hero screenshot — full-width, no border-radius on top */
.hero-screenshot {
  max-width: 880px;
  margin: 0 auto;
}

/* ---------- Features ---------- */
.section-features {
  background: var(--bg-section);
  padding: var(--section-v) 22px;
}

.section-features .section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 56px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

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

.feature-card {
  padding: 48px 28px 52px;
  text-align: center;
  /* subtle separator between cards */
  border-right: 1px solid var(--border);
}
.feature-card:last-child { border-right: none; }

.feature-card .icon {
  width: 56px;
  height: 56px;
  color: var(--accent);
  margin: 0 auto 24px;
  /* soft tinted circle behind icon */
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 14px;
  padding: 10px;
  box-sizing: content-box;
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: .5em;
}

.feature-card p {
  font-size: .875rem;
  line-height: 1.6;
  letter-spacing: -.012em;
  color: var(--text-muted);
  max-width: 200px;
  margin: 0 auto;
}

/* ---------- Bring-your-own-playlist ---------- */
.section-byop {
  background: var(--bg-section-alt);
  padding: var(--section-v) 22px;
  border-top: 1px solid var(--border);
}

.section-byop .section-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.byop-icon-wrap {
  width: 64px;
  height: 64px;
  color: var(--accent);
  margin: 0 auto 28px;
}

.section-byop h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.1;
  margin-bottom: .5em;
}

.section-byop p {
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -.022em;
  color: var(--text-muted);
  margin-bottom: .75em;
}
.section-byop p:last-child { margin-bottom: 0; }
.section-byop strong { color: var(--text); font-weight: 600; }

/* ---------- Player frame (hero screenshot) ---------- */
.player-frame {
  position: relative;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}

.player-photo {
  display: block;
  width: 100%;
  height: auto;
}

/* Top bar — full-width, dark gradient from top (matches app) */
.player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  text-align: left;
  background: linear-gradient(to bottom, rgba(0,0,0,.65) 0%, transparent 100%);
}

/* Header row — chevron, logo, name, badge, actions all vertically centered */
.player-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-logo {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: block;
}

.player-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  white-space: nowrap;
}

/* Now / Next — indented to sit under the channel name */
.player-sub {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 98px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,.45);
  border-radius: 999px;
  padding: 4px 11px;
  letter-spacing: .02em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34c759;
}

.player-now {
  font-size: 14px;
  color: rgba(255,255,255,.75);
  white-space: nowrap;
}

.player-next {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
}

.player-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Bare control glyph — no chrome at rest (matches app's ControlButton) */
.ctrl-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  flex-shrink: 0;
}
.ctrl-glyph svg { width: 21px; height: 21px; }
.player-top-actions .ctrl-glyph svg { width: 18px; height: 18px; }
.ctrl-back { width: 28px; }
.ctrl-back svg { width: 21px; height: 21px; }
.ctrl-dim { color: rgba(255,255,255,.28); }

/* Bottom controls — single centered floating pill */
.player-controls {
  position: absolute;
  bottom: 32px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.player-pill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 11px 18px 9px;
  border-radius: 20px;
  background: rgba(20,18,14,.4);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

.player-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-time-label {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.85);
  width: 38px;
  text-align: right;
  flex-shrink: 0;
}
.player-time-right { text-align: left; }

.player-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.22);
  border-radius: 2px;
  position: relative;
}

.player-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 58%;
  background: #fff;
  border-radius: 2px;
}

.player-thumb {
  position: absolute;
  top: 50%;
  left: 58%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.player-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.player-buttons .ctrl-glyph {
  width: 38px;
  height: 38px;
}
.player-buttons .ctrl-glyph svg { width: 19px; height: 19px; }
.player-buttons .ctrl-glyph:nth-child(2) svg,
.player-buttons .ctrl-glyph:nth-child(4) svg { width: 20px; height: 20px; }

/* Play/pause — prominent, faint ring + fill */
.ctrl-play {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
}
.ctrl-play svg { width: 25px !important; height: 25px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  :root { --section-v: 64px; }
  .hero { padding: 56px 20px 0; }
  .feature-card { border-right: none; border-bottom: 1px solid var(--border); }
  .feature-card:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  .site-nav { padding: 0 16px; }
  .hero h1 { letter-spacing: -.04em; }
}

/* Player overlay scales down with the shrinking hero photo */
@media (max-width: 620px) {
  .player-top { padding: 12px; gap: 4px; }
  .player-head { gap: 9px; }
  .player-logo { width: 30px; height: 30px; border-radius: 6px; }
  .player-name { font-size: 15px; }
  .live-badge { font-size: 10px; padding: 2px 7px; gap: 4px; }
  .live-dot { width: 5px; height: 5px; }
  .player-sub { padding-left: 62px; }
  .player-now { font-size: 11px; }
  .player-next { font-size: 10px; }

  .player-top-actions { gap: 1px; }
  .ctrl-glyph { width: 30px; height: 30px; }
  .ctrl-glyph svg { width: 16px; height: 16px; }
  .player-top-actions .ctrl-glyph svg { width: 14px; height: 14px; }
  .ctrl-back { width: 20px; }
  .ctrl-back svg { width: 16px; height: 16px; }

  .player-controls { bottom: 14px; padding: 0 12px; }
  .player-pill { max-width: 300px; padding: 8px 12px 7px; gap: 6px; border-radius: 15px; }
  .player-progress-row { gap: 8px; }
  .player-time-label { font-size: 10px; width: 30px; }
  .player-thumb { width: 10px; height: 10px; }
  .player-buttons { gap: 8px; }
  .player-buttons .ctrl-glyph { width: 30px; height: 30px; }
  .player-buttons .ctrl-glyph svg { width: 16px; height: 16px; }
  .player-buttons .ctrl-glyph:nth-child(2) svg,
  .player-buttons .ctrl-glyph:nth-child(4) svg { width: 17px; height: 17px; }
  .ctrl-play { width: 38px !important; height: 38px !important; }
  .ctrl-play svg { width: 20px !important; height: 20px !important; }
}
