/*
 * ZenoIPTV shared stylesheet
 * Dark theme: black, purple and electric blue.
 *
 * 1. Tokens
 * 2. Base
 * 3. Layout
 * 4. Header & navigation
 * 5. Buttons
 * 6. Hero
 * 7. Sections & cards
 * 8. Pricing
 * 9. Accordion
 * 10. Forms
 * 11. Prose (legal pages)
 * 12. Footer
 * 13. Utilities
 */

/* 1. Tokens ------------------------------------------------ */
:root {
  --bg: #050507;
  --bg-elevated: #0d0b16;
  --surface: #13111f;
  --surface-2: #1a1729;
  --border: #2a2540;
  --border-strong: #3d3560;

  --text: #f2f0fa;
  --text-muted: #b3adc9;
  --text-faint: #8a84a3;

  --purple: #8b5cf6;
  --purple-strong: #7c3aed;
  --purple-soft: #c4b5fd;
  --blue: #00b4ff;
  --blue-strong: #0a84ff;
  --blue-soft: #7dd3fc;

  --gradient: linear-gradient(120deg, var(--purple-strong) 0%, var(--blue-strong) 100%);
  --gradient-text: linear-gradient(100deg, var(--purple-soft) 0%, var(--blue) 100%);
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 18px 50px -18px rgba(10, 132, 255, 0.55);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-space: clamp(64px, 9vw, 112px);
  --header-h: 72px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: dark;
}

/* 2. Base -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

main {
  flex: 1 0 auto;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue-soft);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

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

::selection {
  background: var(--purple-strong);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--blue);
  color: #000;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #000;
}

/* 3. Layout ------------------------------------------------ */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(780px + 2 * var(--gutter));
}

.section {
  padding-block: var(--section-space);
}

.section--alt {
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(124, 58, 237, 0.12), transparent 70%),
    var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

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

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid--2,
.grid--3,
.grid--4 {
  grid-template-columns: 1fr;
}

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

@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* 4. Header & navigation ----------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 7, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.logo__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.logo__accent {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

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

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: block;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  padding: 24px var(--gutter) 40px;
  background: var(--bg);
  overflow-y: auto;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}

.site-nav__link[aria-current="page"] {
  box-shadow: inset 3px 0 0 var(--purple);
}

.site-nav__cta {
  margin-top: 16px;
}

/* Without JavaScript the toggle cannot work, so show the menu inline. */
html:not(.js) .nav-toggle { display: none; }
html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: 12px; }
html:not(.js) .site-nav { display: block; width: 100%; }
html:not(.js) .site-nav__list { flex-direction: row; flex-wrap: wrap; }

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

  .site-nav,
  .site-nav.is-open {
    display: block;
    position: static;
    padding: 0;
    background: none;
    overflow: visible;
  }

  .site-nav__list {
    flex-direction: row;
    align-items: center;
    gap: 2px;
  }

  .site-nav__link {
    padding: 8px 12px;
    font-size: 0.9375rem;
  }

  .site-nav__link[aria-current="page"] {
    background: none;
    box-shadow: inset 0 -2px 0 var(--blue);
    border-radius: 0;
  }

  .site-nav__cta {
    margin: 0 0 0 12px;
  }
}

/* 5. Buttons ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.8);
}

.btn--primary:hover {
  color: #fff;
  box-shadow: 0 14px 36px -10px rgba(10, 132, 255, 0.9);
}

.btn--outline {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--outline:hover {
  color: #fff;
  border-color: var(--blue);
}

.btn--sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 0.9375rem;
}

.btn--block {
  width: 100%;
}

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

/* 6. Hero -------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 10vw, 120px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.hero::before {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -160px;
  background: rgba(124, 58, 237, 0.35);
}

.hero::after {
  width: 460px;
  height: 460px;
  bottom: -220px;
  right: -120px;
  background: rgba(0, 180, 255, 0.25);
}

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

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero__title .highlight,
.highlight {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 600px;
  margin-bottom: 32px;
}

.hero__note {
  margin-top: 20px;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.hero__summary {
  width: 100%;
  padding: clamp(24px, 4vw, 40px);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(0, 180, 255, 0.12), transparent 65%),
    var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
}

.hero__benefits {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.hero__benefits li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.hero__benefits li > span {
  color: var(--blue-soft);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero__benefits strong,
.hero__benefits small {
  display: block;
}

.hero__benefits small {
  margin-top: 2px;
  color: var(--text-muted);
}

/* Page header (inner pages) */
.page-hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 88px) clamp(32px, 5vw, 56px);
  background:
    radial-gradient(70% 120% at 0% 0%, rgba(124, 58, 237, 0.22), transparent 60%),
    radial-gradient(60% 120% at 100% 0%, rgba(0, 180, 255, 0.14), transparent 60%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.page-hero .lead {
  max-width: 720px;
  margin-bottom: 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* 7. Sections & cards -------------------------------------- */
.card {
  position: relative;
  padding: 28px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

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

.card p:last-child {
  margin-bottom: 0;
}

.card p {
  color: var(--text-muted);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(0, 180, 255, 0.2));
  border: 1px solid var(--border-strong);
  color: var(--blue-soft);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card--link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card--link:hover {
  color: inherit;
  border-color: var(--purple);
  transform: translateY(-2px);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue);
}

.steps h3 {
  margin-bottom: 8px;
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

.device-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-list li {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.device-list h3 {
  margin-bottom: 6px;
  font-size: 1.0625rem;
}

.device-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.notice {
  padding: 20px 24px;
  background: rgba(0, 180, 255, 0.06);
  border: 1px solid rgba(0, 180, 255, 0.35);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice strong {
  color: var(--text);
}

.cta-band {
  position: relative;
  padding: clamp(36px, 6vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 140% at 0% 0%, rgba(124, 58, 237, 0.45), transparent 60%),
    radial-gradient(80% 140% at 100% 100%, rgba(0, 180, 255, 0.35), transparent 60%),
    var(--surface);
  border: 1px solid var(--border-strong);
  text-align: center;
}

.cta-band p {
  max-width: 620px;
  margin-inline: auto;
  color: var(--text-muted);
}

.cta-band .btn-row {
  justify-content: center;
  margin-top: 24px;
}

.empty-state {
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.empty-state p {
  max-width: 560px;
  margin-inline: auto;
  color: var(--text-muted);
}

.empty-state .btn-row {
  justify-content: center;
}

/* 8. Pricing ----------------------------------------------- */
.pricing {
  text-align: center;
}

.pricing__cards {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  text-align: left;
}

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

@media (min-width: 1080px) {
  .pricing__cards { grid-template-columns: repeat(4, 1fr); }
}

.pricing__fallback {
  text-align: left;
}

.price-card {
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.price-card--accent {
  border-color: transparent;
  background:
    linear-gradient(180deg, var(--surface-2), var(--bg-elevated)) padding-box,
    var(--gradient) border-box;
  border: 1px solid transparent;
  box-shadow: var(--glow);
}

.price-card__title {
  margin-bottom: 4px;
  font-size: 1.125rem;
  color: var(--text);
}

.price-card__tier {
  margin-bottom: 12px;
  color: var(--purple-soft);
  font-size: 0.875rem;
  font-weight: 700;
}

.price-card__options {
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-option {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.price-option__details {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.price-option__duration {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.price-option__amount {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.price-option__link {
  margin-top: 10px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.875rem;
}

.pricing__note {
  margin-top: 28px;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

/* 9. Accordion --------------------------------------------- */
.accordion {
  border-top: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item h3 {
  margin: 0;
  font-size: inherit;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px 4px;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.accordion-trigger:hover {
  color: var(--blue-soft);
}

.accordion-icon {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
}

.accordion-icon::before,
.accordion-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.accordion-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  border-color: var(--purple);
  color: var(--purple-soft);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

html:not(.js) .accordion-icon {
  display: none;
}

.accordion-panel {
  padding: 0 4px 22px;
  color: var(--text-muted);
}

.accordion-panel p:last-child {
  margin-bottom: 0;
}

.faq-group + .faq-group {
  margin-top: 56px;
}

.faq-group h2 {
  font-size: 1.5rem;
}

/* 10. Contact ---------------------------------------------- */
.contact-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

.contact-aside .card + .card {
  margin-top: 20px;
}

/* 11. Prose (legal pages) ---------------------------------- */
.prose {
  color: var(--text-muted);
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 1.5rem;
  color: var(--text);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.6em;
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
  margin: 0 0 1em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose strong {
  color: var(--text);
}

.updated {
  margin-top: 16px;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

/* 12. Footer ----------------------------------------------- */
.site-footer {
  margin-top: auto;
  padding-block: 56px 32px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.site-footer__grid {
  display: grid;
  gap: 36px;
}

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

@media (min-width: 960px) {
  .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
}

.site-footer p {
  color: var(--text-muted);
}

.site-footer h2 {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
}

.site-footer__bottom p {
  margin: 0;
  color: inherit;
}

/* 13. Utilities -------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-lg { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }

.error-code {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover,
  .card--link:hover {
    transform: none;
  }
}

.h3 {
  font-size: 1.25rem;
}

main:focus {
  outline: none;
}

@media (min-width: 960px) {
  .steps--2 { grid-template-columns: repeat(2, 1fr); }
}
