/* Open IPTV — landing page. Colours follow the app theme (ui/theme/Theme.kt). */
:root {
  --bg: #070b12;
  --surface: #0d1420;
  --surface-2: #16202f;
  --line: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --teal: #5eead4;
  --violet: #a78bfa;
  --blue: #3b82f6;
  --radius: 20px;
  --max: 1120px;
  --nav-h: 64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--text); color: var(--bg); padding: .5rem 1rem; border-radius: 8px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(1.25rem, calc((100% - var(--max)) / 2));
  background: rgb(7 11 18 / .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; }
.nav nav { display: flex; gap: 1.4rem; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav nav a:hover { color: var(--text); }
.lang { display: flex; gap: .15rem; margin-left: 1.2rem; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang a { color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: .2rem .55rem; border-radius: 999px; }
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { background: var(--teal); color: #042f2e; }
.nav { gap: 1rem; }
.nav nav { margin-left: auto; }
@media (max-width: 640px) { .nav nav a:not(:nth-child(2)) { display: none; } .lang { margin-left: .6rem; } }

/* ---------- shared ---------- */
section { padding: clamp(4rem, 9vw, 7rem) max(1.25rem, calc((100% - var(--max)) / 2)); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; color: var(--teal); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.meta { font-size: .9rem; color: var(--muted); }
.grad { background: linear-gradient(90deg, var(--teal), var(--blue) 55%, var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1rem; }
.cta--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .9rem 1.4rem; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--teal); color: #042f2e; box-shadow: 0 8px 30px rgb(94 234 212 / .25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgb(94 234 212 / .35); }
.btn--ghost { color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.btn--ghost:hover { background: var(--surface-2); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

/* ---------- phone frame ---------- */
.phone {
  position: relative; width: min(300px, 70vw); aspect-ratio: 9 / 19.5;
  border-radius: 42px; padding: 10px; background: #1b2433;
  box-shadow: 0 0 0 1px #2c3a50, 0 40px 80px -20px rgb(0 0 0 / .8), 0 0 120px -30px rgb(59 130 246 / .45);
}
.phone > img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 32px; background: var(--surface); }
.phone--stack > img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); opacity: 0; transform: scale(.97); transition: opacity .5s ease, transform .5s ease; }
.phone--stack > img.is-active { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100svh - var(--nav-h)); display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, .65fr); gap: 2rem; align-items: center;
  background:
    radial-gradient(60rem 30rem at 85% 20%, rgb(59 130 246 / .16), transparent 60%),
    radial-gradient(40rem 30rem at 10% 90%, rgb(167 139 250 / .12), transparent 60%);
}
.hero h1 { font-size: clamp(2.4rem, 4.8vw, 4.2rem); white-space: nowrap; }
.hero__phone { display: flex; justify-content: center; }
.hero__phone .phone { transform: rotate(-4deg); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: rotate(-4deg) translateY(-12px); } }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3.4rem); white-space: normal; }
  .hero .lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero__phone .phone { width: min(240px, 60vw); }
}

/* ---------- pills ---------- */
.pills { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; max-width: 34rem; }
.pills li { padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .88rem; }
.pills li::before { content: "✓ "; color: var(--teal); }
@media (max-width: 860px) { .pills { justify-content: center; margin-inline: auto; } }

/* ---------- story (sticky scroll) ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.step { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; opacity: .35; transition: opacity .4s; }
.step.is-active { opacity: 1; }
.step p { color: var(--muted); font-size: 1.1rem; max-width: 30rem; }
.step__n { font-size: .9rem !important; font-weight: 700; color: var(--violet) !important; letter-spacing: .1em; }
.step__img { display: none; }
.story__sticky { position: sticky; top: calc(var(--nav-h) + 4vh); height: calc(100vh - var(--nav-h) - 8vh); display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.story__sticky .phone { width: auto; height: min(78vh, 640px); }
.dots { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.dots li { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .3s, transform .3s; }
.dots li.is-active { background: var(--teal); transform: scale(1.4); }

@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .story__sticky { display: none; }
  .step { min-height: auto; opacity: 1; padding-block: 2rem; text-align: center; align-items: center; }
  .step__img { display: block; width: min(240px, 62vw); aspect-ratio: 9 / 19.5; object-fit: cover; object-position: top; border-radius: 28px; margin-top: 1rem; box-shadow: 0 0 0 8px #1b2433, 0 30px 60px -20px #000; }
}

/* ---------- wide band ---------- */
.wide { padding-top: 2rem; }
.wide__frame { border-radius: var(--radius); padding: 10px; background: #1b2433; box-shadow: 0 40px 80px -30px #000; max-width: 900px; margin: 0 auto 3.5rem; }
.wide__frame img { width: 100%; aspect-ratio: 2340 / 1080; object-fit: cover; border-radius: 12px; background: var(--surface); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.features > div { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.features p { color: var(--muted); margin: 0; }

/* ---------- ethos ---------- */
.ethos { max-width: 1000px; margin: 0 auto; padding-inline: 1.25rem; }
.ethos__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-top: 2rem; }
.ethos__cols > div { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ethos__cols p { color: var(--muted); margin: 0 0 .6em; }

/* ---------- download ---------- */
.download { text-align: center; background: linear-gradient(180deg, transparent, rgb(94 234 212 / .05) 40%, transparent); }
.download .lead { margin-inline: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 3rem 0 2rem; text-align: left; }
.card { padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card p { color: var(--muted); margin: 0 0 .6em; }
.card__note { font-size: .85rem; }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps .card { counter-increment: step; }
.steps .card h3::before { content: counter(step) " · "; color: var(--violet); }
.verify { max-width: 38rem; margin: 0 auto; text-align: left; color: var(--muted); }
.verify summary { cursor: pointer; color: var(--text); }
pre { background: var(--surface); border: 1px solid var(--line); padding: .8rem 1rem; border-radius: 10px; overflow-x: auto; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* ---------- notice ---------- */
.notice { max-width: 760px; margin: 0 auto; padding-inline: 1.25rem; }
.notice p { color: var(--muted); }
.notice h3 { margin-top: 2rem; }

/* ---------- about ---------- */
.about { padding-block: clamp(3rem, 7vw, 5rem); }
.about__card {
  max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(28rem 16rem at 0% 0%, rgb(94 234 212 / .10), transparent 60%),
    radial-gradient(28rem 16rem at 100% 100%, rgb(167 139 250 / .12), transparent 60%),
    var(--surface);
}
.about__avatar { width: 100%; max-width: 220px; aspect-ratio: 1; border-radius: 28px; object-fit: cover; box-shadow: 0 0 0 1px var(--line), 0 24px 50px -20px #000, 0 0 60px -20px rgb(94 234 212 / .5); }
.about__body h2 { margin-bottom: .2em; }
.about__role { color: var(--teal) !important; font-weight: 600; margin-bottom: 1rem !important; }
.about__body p:not(.eyebrow):not(.about__role) { color: var(--muted); }
.about__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .8rem; margin: 1.4rem 0; padding: 0; }
.about__stats > div { padding: .7rem .9rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.about__stats dt { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.about__stats dd { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.3; }
.links { list-style: none; padding: 0; margin: 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.links .btn { padding: .55rem 1.1rem; font-size: .95rem; }
@media (max-width: 720px) {
  .about__card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .about__avatar { max-width: 160px; border-radius: 50%; }
  .links { justify-content: center; }
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2rem 1.25rem; text-align: center; color: var(--muted); font-size: .9rem; }
.footer p { margin: .3rem 0; }
.footer__small { font-size: .8rem; opacity: .7; }

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

/* Non-English visitors: hide the page until the translation is applied (set by the
   inline script in <head>). The animation reveals it after 1.2 s no matter what. */
html[data-i18n-state="pending"] body { opacity: 0; animation: i18n-reveal 0s 1.2s forwards; }
@keyframes i18n-reveal { to { opacity: 1; } }
