/* IPTV Smarters — Landing Page */
:root {
  --primary: #be7dfb;
  --primary-dark: #9e47ff;
  --primary-glow: rgba(190, 125, 251, 0.45);
  --bg-dark: #1e182c;
  --bg-mid: #262435;
  --bg-card: #2d2a3b;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-faint: rgba(255, 255, 255, 0.4);
  --header-h: 72px;
  --radius: 14px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

/* ── Header ─────────────────────────────────────────── */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(30, 24, 44, 0.82);
  backdrop-filter: blur(18px);
  border-color: rgba(255, 255, 255, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px var(--primary-glow);
}

.logo__icon svg { width: 22px; height: 22px; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav__links a {
  font-size: 0.925rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.925rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 8px 28px var(--primary-glow);
}

.btn--primary:hover {
  box-shadow: 0 12px 36px rgba(190, 125, 251, 0.55);
  transform: translateY(-1px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }

.btn--lg { padding: 16px 32px; font-size: 1rem; }

.nav__login {
  padding: 10px 22px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__poster-wall {
  position: absolute;
  inset: -10% 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0.55;
  transform: rotate(-4deg) scale(1.15);
  filter: saturate(1.15);
}

.poster-row {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scroll-left 45s linear infinite;
}

.poster-row--reverse {
  animation: scroll-right 52s linear infinite;
}

.poster-row--slow { animation-duration: 60s; }

.poster-row img {
  width: 160px;
  height: 240px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes scroll-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(30, 24, 44, 0.75) 0%, rgba(30, 24, 44, 0.35) 40%, rgba(30, 24, 44, 0.92) 100%),
    linear-gradient(135deg, rgba(158, 71, 255, 0.35) 0%, transparent 50%, rgba(30, 24, 44, 0.8) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 48px) 0 80px;
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(190, 125, 251, 0.15);
  border: 1px solid rgba(190, 125, 251, 0.3);
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 24px;
  animation: fade-up 0.8s var(--ease) both;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 14ch;
  animation: fade-up 0.8s 0.1s var(--ease) both;
}

.hero__title span {
  background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  margin-top: 20px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 52ch;
  animation: fade-up 0.8s 0.2s var(--ease) both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
  animation: fade-up 0.8s 0.3s var(--ease) both;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: fade-up 0.8s 0.4s var(--ease) both;
}

.hero__stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
}

.hero__stat span {
  font-size: 0.875rem;
  color: var(--text-faint);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Sections ─────────────────────────────────────────── */
section { padding: 100px 0; }

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-desc {
  margin-top: 16px;
  color: var(--text-muted);
  max-width: 56ch;
  font-size: 1.05rem;
}

.features {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 56px;
}

.feature-card {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(190, 125, 251, 0.25);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(158, 71, 255, 0.25), rgba(190, 125, 251, 0.15));
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin-top: 56px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(190, 125, 251, 0.25);
  line-height: 1;
  margin-bottom: 16px;
}

.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.925rem; }

/* Devices */
.devices {
  background: var(--bg-mid);
}

.devices__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.device-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.device-card svg { color: var(--primary); margin: 0 auto 16px; }
.device-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.device-card p { color: var(--text-muted); font-size: 0.9rem; }

/* CTA Banner */
.cta-banner {
  padding: 80px 0;
}

.cta-banner__inner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 64px 48px;
  background: linear-gradient(135deg, var(--primary-dark), #6b21a8);
  text-align: center;
}

.cta-banner__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15), transparent 50%);
}

.cta-banner__inner h2 {
  position: relative;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-banner__inner p {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  max-width: 48ch;
  margin: 0 auto 32px;
}

.cta-banner__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.btn--white {
  background: #fff;
  color: var(--primary-dark);
}

.btn--white:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); }

/* Footer */
.footer {
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.925rem;
  max-width: 32ch;
}

.footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--text-muted); font-size: 0.925rem; transition: color 0.2s; }
.footer a:hover { color: var(--primary); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Mobile nav */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .menu-toggle { display: block; }

  .nav.open .nav__links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(30, 24, 44, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .devices__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .poster-row img { width: 120px; height: 180px; }
}

@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 24px; }
  .cta-banner__inner { padding: 48px 24px; }
}
