/* home.css - the Strong IPTV 8K home page (server/templates/index.html).
   One self-contained stylesheet: light by default, dark with [data-theme="dark"]
   (theme.js). The hero stage is always dark so the device image glows.
   Effects: animated aurora, glass nav, scroll reveal, cursor spotlight on cards,
   rotating gradient border on the featured plan, marquee, count-up stats,
   image tilt. Everything calms down with prefers-reduced-motion. */

:root {
  --bg: #fafafc;
  --bg-soft: #f2f1f7;
  --card: #ffffff;
  --ink: #0d0b14;
  --text: #4a4658;
  --muted: #7b7689;
  --line: rgba(13, 11, 20, .08);
  --line-strong: rgba(13, 11, 20, .14);
  --accent: #7c4ddb;
  --accent-2: #4f7cff;
  --accent-soft: rgba(124, 77, 219, .1);
  --grad: linear-gradient(100deg, #b089ff 0%, #7c4ddb 35%, #4f7cff 70%, #33d1c6 100%);
  --shadow: 0 1px 2px rgba(13, 11, 20, .04), 0 12px 32px -12px rgba(13, 11, 20, .12);
  --shadow-lg: 0 30px 80px -30px rgba(55, 25, 120, .35);
  --radius: 20px;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 68px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #08070d;
  --bg-soft: #0f0d17;
  --card: #12101b;
  --ink: #f5f3fb;
  --text: #b6b0c6;
  --muted: #8a849b;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --accent: #a382f5;
  --accent-soft: rgba(163, 130, 245, .14);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -24px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 100px -40px rgba(124, 77, 219, .45);
  color-scheme: dark;
}

/* MARK: Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 650; letter-spacing: -.025em; line-height: 1.08; }
h2 { font-size: clamp(32px, 4.6vw, 52px); }
h2 span, h1 span { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s linear infinite; }
h3 { font-size: 18px; letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes shimmer { to { background-position: 200% center; } }

/* MARK: Buttons */
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font: 600 15px/1 var(--sans); white-space: nowrap; cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .2s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.98); }
.button::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s ease; }
.button:hover::after { transform: translateX(120%); }
.button-primary { background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px -10px rgba(13, 11, 20, .5); }
[data-theme="dark"] .button-primary { background: #fff; color: #0d0b14; }
.hero .button-primary, .button-light { background: #fff; color: #0d0b14; box-shadow: 0 10px 40px -10px rgba(163, 130, 245, .6); }
.button-outline, .button-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.button-outline:hover { border-color: var(--ink); }
.hero .button-outline, .button-ghost { border-color: rgba(255, 255, 255, .25); color: #fff; background: rgba(255, 255, 255, .04); backdrop-filter: blur(8px); }
.hero .button-outline:hover, .button-ghost:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); }
.button-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.text-link { display: inline-flex; gap: 6px; color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* MARK: Navigation (glass, sticky) */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); transition: background .3s ease, box-shadow .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.nav { background: var(--bg); }
.nav.is-scrolled { background: rgba(250, 250, 252, .8); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 750; font-size: 19px; letter-spacing: -.03em; }
.brand-word span { color: var(--accent); }
.brand-badge { padding: 3px 7px; border-radius: 7px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.nav-links { display: flex; gap: 4px; margin-inline: auto; }
.nav-links a { padding: 8px 12px; border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 500; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.nav-mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-login { padding: 8px 10px; color: var(--text); font-size: 14px; font-weight: 500; }
.nav-login:hover { color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.menu-toggle { display: none; gap: 4px; }
.menu-toggle span { display: block; width: 16px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .25s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-2.6px) rotate(-45deg); }

/* Language menu (server: i18n.js langMenu) */
.lang-menu { position: relative; }
.lang-menu summary { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 12px; font-weight: 650; letter-spacing: .04em; list-style: none; cursor: pointer; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary svg { width: 15px; height: 15px; }
.lang-menu ul { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 190px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.lang-menu li a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); font-size: 14px; }
.lang-menu li a b { width: 26px; color: var(--accent); font-size: 11px; letter-spacing: .06em; }
.lang-menu li a:hover, .lang-menu li a[aria-current="true"] { background: var(--accent-soft); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* Language suggestion bar (server: i18n.js langBanner) */
.lang-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 10px 18px; background: #14112a; color: #efeaff; font-size: 14px; text-align: center; }
.lang-banner a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 600; }
.lang-banner-go { background: #fff; color: #2c1b63; }
.lang-banner-stay { border: 1px solid rgba(255, 255, 255, .3); }

/* MARK: Hero */
.hero { position: relative; padding-top: 6px; }
/* A dark rounded "stage" under the menu: the device image glows on it in both themes. */
.hero-stage { position: relative; overflow: hidden; margin: 0 12px; padding: clamp(56px, 9vw, 110px) 0 0; border-radius: 32px; background: #07060c; color: #c8c2d8; isolation: isolate; box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset; }
.hero-stage h1 { color: #fff; font-size: clamp(42px, 7.4vw, 92px); letter-spacing: -.045em; line-height: .98; max-width: 14ch; margin: 22px auto 0; }
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero-lede { max-width: 620px; margin: 22px auto 0; font-size: clamp(16px, 1.6vw, 19px); color: #b9b2cc; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.hero-how { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: #a8a1bd; font-size: 14px; }
.hero-how span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; font-size: 9px; }
.hero-how:hover { color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; background: rgba(255, 255, 255, .05); color: #d8d1ea; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; backdrop-filter: blur(10px); }
.live-dot { position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 0 rgba(62, 224, 143, .6); animation: ping 2s ease-out infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 8px rgba(62, 224, 143, 0); } }
.hero-art { position: relative; width: min(920px, 100%); margin: 40px auto 0; transform-style: preserve-3d; transition: transform .4s ease-out; }
/* A static glow behind the devices: much cheaper than a drop-shadow filter on a moving image. */
.hero-art::before { content: ""; position: absolute; inset: 18% 12% 6%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 77, 219, .55), rgba(79, 124, 255, .2) 60%, transparent); filter: blur(30px); }
.hero-art img { position: relative; width: 100%; animation: float 7s ease-in-out infinite; will-change: transform; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* Aurora: three soft blobs drifting behind the hero (and the closing band) */
.aurora { position: absolute; inset: -20%; z-index: -1; filter: blur(80px) saturate(140%); opacity: .75; pointer-events: none; }
.aurora i { position: absolute; width: 46vw; height: 46vw; max-width: 720px; max-height: 720px; border-radius: 50%; mix-blend-mode: screen; animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { top: 5%; left: 10%; background: radial-gradient(closest-side, #7c4ddb, transparent); }
.aurora i:nth-child(2) { top: 15%; right: 5%; background: radial-gradient(closest-side, #3a5bff, transparent); animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { bottom: 0; left: 35%; background: radial-gradient(closest-side, #19b8ad, transparent); opacity: .7; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vw) scale(1.15); } 100% { transform: translate(-4vw, 6vw) scale(.95); } }
.hero-grid { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }

/* Stats row, overlapping the bottom of the hero */
.stats { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); margin: -46px auto 0; max-width: 980px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow-lg); }
.stats div { padding: 22px 24px; display: flex; flex-direction: column-reverse; gap: 2px; }
.stats div + div { border-inline-start: 1px solid var(--line); }
.stats dd { margin: 0; color: var(--ink); font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats dd small { color: var(--accent); font-size: .6em; }
.stats dt { color: var(--muted); font-size: 13px; }

/* MARK: Marquee */
.marquee { margin: 56px 0 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-direction: reverse; }

/* MARK: Sections */
.section { position: relative; padding: clamp(72px, 10vw, 120px) 0 0; }
.section-head { max-width: 700px; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p, .lede { margin-top: 16px; font-size: 17px; }
.section-head .text-link { margin-top: 18px; }
.eyebrow { display: inline-block; margin-bottom: 14px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow-line { display: none; }

/* Cards + cursor spotlight */
.card { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.spot { overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), var(--accent-soft), transparent 45%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.spot:hover::before { opacity: 1; }
.card p { margin-top: 8px; font-size: 15px; }
.card-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* MARK: Plans (server: pages.js plansHtml / billingToggleHtml, app.js trial CTA) */
.plans-section { overflow-x: hidden; overflow-x: clip; }
.plans-glow { position: absolute; top: 20%; left: 50%; width: min(900px, 100%); height: 600px; transform: translateX(-50%); background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none; z-index: -1; }
.billing-row { display: flex; justify-content: center; margin: -16px 0 36px; }
.billing-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.billing-copy { display: none; }
.billing-control { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.billing-option { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: 600 14px var(--sans); cursor: pointer; transition: background .25s, color .25s; }
.billing-option span { padding: 2px 7px; border-radius: 999px; background: rgba(62, 196, 120, .14); color: #1f9d5c; font-size: 11px; font-weight: 700; }
[data-theme="dark"] .billing-option span { color: #57e09a; }
.billing-option.is-selected { background: var(--ink); color: var(--bg); }
[data-theme="dark"] .billing-option.is-selected { background: #fff; color: #0d0b14; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan-card { position: relative; display: flex; flex-direction: column; padding: 30px 26px 24px; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease; }
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.is-popular { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, conic-gradient(from var(--angle, 0deg), #b089ff, #4f7cff, #33d1c6, #7c4ddb, #b089ff) border-box; border: 1.5px solid transparent; animation: spin 6s linear infinite; }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(124, 77, 219, .6); }
.plan-overline { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.plan-card h3 { margin-top: 6px; font-size: 24px; }
.plan-desc { margin-top: 6px; font-size: 14px; color: var(--muted); }
.plan-card .price { display: flex; align-items: baseline; gap: 6px; margin-top: 22px; }
.plan-card .price strong { color: var(--ink); font-size: 46px; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-period { color: var(--muted); font-size: 14px; }
.billing-note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.plan-features { display: grid; gap: 10px; margin: 22px 0 26px; padding: 0; list-style: none; font-size: 14.5px; color: var(--text); }
.plan-features li { display: flex; gap: 10px; align-items: flex-start; }
.plan-features svg { flex: none; width: 18px; height: 18px; margin-top: 2px; padding: 2px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.plan-card .button { width: 100%; margin-top: auto; }
.plan-card.is-popular .button-primary { background: var(--grad); background-size: 200% auto; color: #fff; animation: shimmer 6s linear infinite; }
.plan-more { margin-top: 14px; font-size: 13px; }
.plan-more summary { display: flex; justify-content: center; gap: 6px; color: var(--muted); cursor: pointer; list-style: none; }
.plan-more summary::-webkit-details-marker { display: none; }
.plan-more summary::after { content: "+"; font-weight: 700; }
.plan-more[open] summary::after { content: "–"; }
.plan-more dl { display: grid; gap: 8px; margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.plan-more dl div { display: flex; justify-content: space-between; gap: 12px; }
.plan-more dt { color: var(--muted); }
.plan-more dd { margin: 0; color: var(--ink); text-align: end; }
.plans-foot { margin-top: 24px; text-align: center; color: var(--muted); font-size: 13px; }
.trial-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; max-width: 760px; margin: 28px auto 0; padding: 18px 22px; border: 1px dashed var(--line-strong); border-radius: 18px; background: var(--card); }
.trial-cta strong { display: block; color: var(--ink); }
.trial-cta span { color: var(--muted); font-size: 14px; }

/* MARK: Steps */
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.step-no { display: inline-block; margin-bottom: 18px; font-size: 13px; font-weight: 700; letter-spacing: .1em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps-row small { display: inline-block; margin-top: 14px; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-size: 12px; }

/* MARK: Devices */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.checklist { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding-inline-start: 34px; }
.checklist li::before { content: ""; position: absolute; inset-inline-start: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.5L12 5.3' fill='none' stroke='%237c4ddb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checklist strong { display: block; color: var(--ink); }
.checklist span { font-size: 15px; }
.works { margin-top: 24px; font-size: 14px; color: var(--muted); }
.works b { margin-inline-end: 6px; color: var(--ink); font-size: 11px; letter-spacing: .1em; }
.media { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow-lg); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.media:hover img { transform: scale(1.05); }
.media figcaption { position: absolute; inset-inline: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; background: rgba(10, 8, 18, .55); color: #fff; font-weight: 600; backdrop-filter: blur(14px); }
.media figcaption small { margin-inline-start: auto; color: #c9c2dc; font-weight: 500; }

/* MARK: Discover tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 24px; background: #111; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s ease; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgba(6, 5, 12, .92)); }
.tile:hover img { transform: scale(1.06); }
.tile-body { position: absolute; inset-inline: 22px; bottom: 22px; display: grid; gap: 8px; color: #fff; }
.tile-tag { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(8px); }
.tile strong { font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.tile small { color: #cfc8de; font-size: 14px; line-height: 1.5; }

/* MARK: Guide (server: app.js guideHtml) */
.guide-section .section-heading { max-width: 700px; margin: 0 auto 40px; text-align: center; }
.guide-section .section-heading p { margin-top: 16px; font-size: 17px; }
.guide-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.guide-toc { position: sticky; top: calc(var(--nav-h) + 20px); padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); font-size: 14px; }
.guide-toc strong { color: var(--ink); }
.guide-toc ol { margin: 12px 0 0; padding-inline-start: 18px; display: grid; gap: 8px; }
.guide-toc a:hover { color: var(--accent); }
.guide-article { display: grid; gap: 34px; }
.guide-part h3 { margin-bottom: 10px; font-size: 22px; }
.guide-part p, .guide-part li { font-size: 16px; }
.guide-part p + p { margin-top: 12px; }
.guide-part ul, .guide-part ol { display: grid; gap: 6px; padding-inline-start: 20px; }
.guide-cta { margin-top: 6px; }

/* MARK: FAQ (server: app.js faqHtml) */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq .section-head { position: sticky; top: calc(var(--nav-h) + 20px); }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: border-color .25s, box-shadow .25s; }
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.faq-item summary { position: relative; padding: 18px 54px 18px 20px; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
[dir="rtl"] .faq-item summary { padding: 18px 20px 18px 54px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { position: absolute; top: 50%; inset-inline-end: 18px; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--accent-soft); }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 1.6px; margin: -.8px 0 0 -5px; background: var(--accent); transition: transform .25s; }
.faq-plus::after { transform: rotate(90deg); }
.faq-item[open] .faq-plus::after { transform: rotate(0); }
.faq-item p { padding: 0 20px 20px; font-size: 15px; }

/* MARK: Closing band */
.cta-band { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; overflow: hidden; padding: clamp(36px, 6vw, 64px); border-radius: 32px; background: #07060c; color: #c8c2d8; isolation: isolate; }
.cta-band h2 { color: #fff; }
.cta-band p { margin-top: 14px; max-width: 520px; }
.cta-band .eyebrow { color: #c6b1ff; }
.cta-band .aurora { opacity: .6; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cta-actions small { flex-basis: 100%; color: #9d97b0; font-size: 13px; }

/* MARK: Footer */
.footer { margin-top: clamp(72px, 10vw, 120px); padding: 56px 0 28px; border-top: 1px solid var(--line); }
.footer-main { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { margin-top: 12px; color: var(--muted); font-size: 14px; }
.footer-col { display: grid; gap: 10px; align-content: start; font-size: 14px; }
.footer-col strong { color: var(--ink); font-size: 13px; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* MARK: Scroll reveal (only once home.js is running, so nothing hides without JavaScript) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* MARK: Responsive */
@media (max-width: 1020px) {
  .nav-links a { padding: 8px 9px; }
  .nav-login { display: none; }
  .features, .plans, .tiles { grid-template-columns: repeat(2, 1fr); }
  .steps-row { grid-template-columns: repeat(2, 1fr); }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc { position: static; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav-links { position: fixed; inset: var(--nav-h) 12px auto; z-index: 49; display: none; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow-lg); }
  .nav-links.is-open { display: flex; animation: pop .18s ease-out; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-mobile-only { display: block; }
  .nav-actions .button-sm { display: none; }
  .split, .faq { grid-template-columns: 1fr; }
  .faq .section-head { position: static; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .hero-stage { margin: 0 6px; border-radius: 0 0 24px 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
  .stats div:nth-child(3) { border-inline-start: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats div { padding: 16px 18px; }
  .features, .plans, .tiles, .steps-row { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 4 / 3; }
  .media { aspect-ratio: 4 / 3; }
  .plan-card .price strong { font-size: 40px; }
  .lang-menu summary svg { display: none; }
  .footer-main { grid-template-columns: 1fr; }
  .cta-band { border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* MARK: Floating corner buttons (server: pages.js floatButtons), same as app.css */
.float-corners { --float-gap: max(20px, env(safe-area-inset-bottom)); position: fixed; z-index: 60; inset-inline: 0; bottom: 0; pointer-events: none; }
.float-btn { position: absolute; bottom: var(--float-gap); display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; pointer-events: auto; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.float-btn:hover { transform: translateY(-3px); }
.float-btn:focus-visible, .float-note-link:focus-visible, .float-note-close:focus-visible { outline: 3px solid #c9a8ff; outline-offset: 3px; }
.float-wa { inset-inline-end: max(20px, env(safe-area-inset-right)); background: #fff; box-shadow: 0 12px 30px rgba(20,120,50,.35), 0 0 0 1px rgba(0,0,0,.04); }
.float-wa svg { width: 40px; height: 40px; }
.float-wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; animation: waPulse 2.6s ease-out infinite; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(39,180,62,.5); } 70%, 100% { box-shadow: 0 0 0 16px rgba(39,180,62,0); } }

/* Trial: round 24h button with a red "1" badge */
.float-trial-wrap { position: absolute; bottom: 0; inset-inline-start: max(20px, env(safe-area-inset-left)); }
.float-trial { inset-inline-start: 0; color: #fff; background: linear-gradient(130deg, #9e6bff, #6b3dc2); box-shadow: 0 14px 34px rgba(107,61,194,.5), inset 0 0 0 1px rgba(255,255,255,.2); }
.float-trial-icon svg { display: block; width: 40px; height: 40px; }
.float-trial-icon text, .float-note-icon text { font-family: var(--sans); }
.float-badge { position: absolute; top: -3px; inset-inline-end: -3px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #ff3b5c; color: #fff; font: 700 11px/1 var(--sans); box-shadow: 0 0 0 2px #fff; }
.float-trial-wrap.is-seen .float-badge { display: none; }

/* The notification bubble above the button */
.float-note { position: absolute; bottom: calc(var(--float-gap) + 74px); inset-inline-start: 0; width: min(300px, calc(100vw - 40px)); pointer-events: auto; opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom left; transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1.25); }
[dir="rtl"] .float-note { transform-origin: bottom right; }
.float-note.is-in { opacity: 1; transform: none; }
.float-note::after { content: ""; position: absolute; bottom: -7px; inset-inline-start: 23px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(40,20,80,.08); }
.float-note-link { position: relative; z-index: 1; display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 14px; border-radius: 18px; background: #fff; color: #160f24; text-decoration: none; box-shadow: 0 18px 50px rgba(30,10,70,.35), 0 0 0 1px rgba(124,77,219,.12); }
[dir="rtl"] .float-note-link { padding: 14px 14px 14px 40px; }
.float-note-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: linear-gradient(130deg, #9e6bff, #6b3dc2); }
.float-note-icon svg { width: 32px; height: 32px; }
.float-note-copy { display: grid; gap: 3px; min-width: 0; }
.float-note-copy small { color: #7c4ddb; font: 700 11px/1.2 var(--sans); letter-spacing: .02em; text-transform: uppercase; }
.float-note-copy strong { font: 700 15px/1.25 var(--sans); letter-spacing: -.009em; }
.float-note-copy span { color: #5b5170; font-size: 13px; line-height: 1.4; }
.float-note-link:hover strong { color: #6b3dc2; }
.float-note-close { position: absolute; z-index: 2; top: 8px; inset-inline-end: 8px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #8a809c; font: 400 20px/1 sans-serif; cursor: pointer; }
.float-note-close:hover { background: #f1ecfa; color: #160f24; }
[data-theme="dark"] .float-note-link, [data-theme="dark"] .float-note::after { background: #1b1430; }
[data-theme="dark"] .float-note-link { color: #fbf9ff; box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(195,171,255,.18); }
[data-theme="dark"] .float-note-copy small { color: #c9a8ff; }
[data-theme="dark"] .float-note-copy span { color: #b9add0; }
[data-theme="dark"] .float-note-link:hover strong { color: #c9a8ff; }
[data-theme="dark"] .float-note-close:hover { background: rgba(255,255,255,.08); color: #fff; }

@media (max-width: 560px) {
  .float-corners { --float-gap: max(16px, env(safe-area-inset-bottom)); }
  .float-btn { width: 54px; height: 54px; }
  .float-wa { inset-inline-end: max(16px, env(safe-area-inset-right)); }
  .float-wa svg { width: 36px; height: 36px; }
  .float-trial-wrap { inset-inline-start: max(16px, env(safe-area-inset-left)); }
  .float-trial-icon svg { width: 36px; height: 36px; }
  .float-note { bottom: calc(var(--float-gap) + 66px); width: min(290px, calc(100vw - 32px)); }
  .float-note::after { inset-inline-start: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .float-wa::before { animation: none; }
  .float-btn, .float-btn:hover, .float-note { transition: none; transform: none; }
}
@media print { .float-corners { display: none; } }.float-trial, .float-note-icon { background: linear-gradient(130deg, #9e6bff, #4f7cff); }

/* Clearer spacing and quieter surfaces for the main IPTV page. */
.home .hero-stage{background:linear-gradient(145deg,#101b30,#172840);padding-block:clamp(48px,7vw,100px)}
.home .hero-grid{opacity:.08}.home .hero h1{max-width:900px;margin-inline:auto;letter-spacing:-.045em;line-height:1.08}
.home .hero-lede{max-width:650px;margin-inline:auto;line-height:1.75}.home .hero-actions{gap:14px;flex-wrap:wrap}
.home .plan-card{border-radius:20px;box-shadow:0 8px 28px #0f172a0a;padding:30px}.home .plan-card.is-popular{box-shadow:0 12px 36px #2563eb12}
.home .billing-note{min-height:48px;line-height:1.6}.home .button{border-radius:10px;min-height:48px}.home section{scroll-margin-top:90px}
@media(prefers-reduced-motion:reduce){.home *{animation:none!important;transition:none!important}}

.home .promotion-banner{display:flex;justify-content:center;align-items:center;gap:16px;flex-wrap:wrap;padding:14px 24px;background:#ecfdf5;color:#14532d;font-size:14px}.home .promotion-banner a{font-weight:700;text-decoration:underline}
