/* ─────────────────────────────────────────────────────────────
   nltv.ru - TV-first download landing
   Palette matches rustisland.ru (#4f7cff / #7c5cff / #c94fff)
   Typography scaled for 10-foot viewing: body 22px, title 88px.
   Layout fixed at 1920×1080 (Android TV default), graceful down-scale
   to laptop / phone via the @media queries at the bottom.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #0a0a14;
  --bg2: #0f1120;
  --text: #c8d0e0;
  --text-dim: #64748b;
  --text-bright: #ffffff;
  --accent: #4f7cff;
  --accent2: #7c5cff;
  --accent3: #c94fff;
  --gradient: linear-gradient(135deg, #4f7cff 0%, #7c5cff 50%, #c94fff 100%);
  --gradient-text: linear-gradient(135deg, #4f7cff, #c94fff);
  --border: rgba(255, 255, 255, 0.06);
  --radius: 20px;
  --radius-lg: 28px;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  /* TV safe-action area: modern TVs no longer overscan but older Samsung/LG
     sets occasionally clip the outer 2-3% of the frame. This padding keeps
     the hero away from the edges. */
  padding: 5vh 6vw;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(79, 124, 255, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(201, 79, 255, 0.10), transparent 50%),
    var(--bg);
}

/* ─── Ambient background (subset of rustisland orbs/grid) ─── */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.32;
  animation: orbFloat 24s ease-in-out infinite;
}
.orb-1 {
  width: 680px; height: 680px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -18%; left: -12%;
}
.orb-2 {
  width: 580px; height: 580px;
  background: radial-gradient(circle, var(--accent2), transparent 70%);
  bottom: -22%; right: -12%;
  animation-delay: -8s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.06); }
  66%      { transform: translate(-30px, 40px) scale(0.96); }
}
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(79, 124, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 124, 255, 0.025) 1px, transparent 1px);
  background-size: 96px 96px;
}

/* ─── Hero column ─── */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

/* ─── Brand block ─── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.brand-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow:
    0 12px 40px rgba(79, 124, 255, 0.35),
    0 2px 12px rgba(0, 0, 0, 0.5);
}
.brand-title {
  font-size: 88px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text-bright);
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.brand-sub {
  font-size: 40px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: -0.01em;
}
.brand-tv {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}
.brand-tagline {
  margin-top: 4px;
  font-size: 22px;
  color: var(--text);
  max-width: 620px;
  line-height: 1.5;
}

/* ─── The big download button ─── */
/* Intentionally huge: 120 px tall, ~42 px text - legible from 3 m. */
.dl-btn {
  --btn-h: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 560px;
  height: var(--btn-h);
  padding: 0 56px;
  text-decoration: none;
  color: #fff;
  background: var(--gradient);
  border: none;
  border-radius: calc(var(--btn-h) / 2);
  font-family: inherit;
  font-weight: 700;
  box-shadow:
    0 10px 40px rgba(79, 124, 255, 0.38),
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition:
    transform 0.18s cubic-bezier(.2,.8,.2,1),
    box-shadow 0.18s ease;
  outline: none;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dl-btn:hover,
.dl-btn:focus-visible,
.dl-btn:focus {
  /* :focus-visible first, but TV remotes often don't set :focus-visible - so
     plain :focus also lights up. Same treatment either way. */
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 18px 60px rgba(79, 124, 255, 0.55),
    0 0 0 4px rgba(124, 92, 255, 0.55),
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.dl-btn:active {
  transform: translateY(-1px) scale(1.005);
}
.dl-btn-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.dl-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
.dl-btn-main {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.dl-btn-meta {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0;
  line-height: 1.2;
  min-height: 1em;
}

/* Subtle pulse when the button is first focused on cold load so the user
   sees "this is the thing you want to press", even without a cursor. */
@keyframes focusPulse {
  0%, 100% { box-shadow: 0 10px 40px rgba(79, 124, 255, 0.38), 0 0 0 4px rgba(124, 92, 255, 0.40); }
  50%      { box-shadow: 0 10px 40px rgba(79, 124, 255, 0.38), 0 0 0 8px rgba(124, 92, 255, 0.25); }
}
.dl-btn.focus-pulse:focus-visible,
.dl-btn.focus-pulse:focus {
  animation: focusPulse 2s ease-in-out infinite;
}

/* ─── Compatibility pill strip (replaces old details card) ─── */
/* Version + size are already announced in the button meta. This row
   only needs to answer "will it run on my box?" at a glance, so
   pills are louder than label/value rows and read fine from 3 m. */
.compat {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
}
.compat-pill {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.08);
  border: 1px solid rgba(124, 140, 200, 0.18);
  color: var(--text-bright);
  white-space: nowrap;
}
.mono {
  font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

/* ─── Install note ─── */
.install-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 640px;
  padding: 18px 22px;
  background: rgba(79, 124, 255, 0.06);
  border: 1px solid rgba(79, 124, 255, 0.16);
  border-radius: var(--radius);
  text-align: left;
}
.install-note svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.install-note p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
}

/* ─── Footer ─── */
.page-footer {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.page-footer a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.page-footer a:hover,
.page-footer a:focus-visible {
  color: var(--accent);
}
.footer-dot { opacity: 0.5; }

/* ─── State: loaded / error ─── */
.dl-btn.is-ready .dl-btn-meta { opacity: 0.95; }
.dl-btn.is-error .dl-btn-meta { color: #ffcece; }

/* ───────────────────────────────────────────────────────────
   Responsive scaling
   1920 is our design target. Below that, pixel-scale the whole
   hero down so nothing wraps awkwardly on phones, laptops, or
   portrait TV browsers. We use rem-free px values + a couple of
   breakpoints because CSS clamp() math is hard to debug on TV.
   ─────────────────────────────────────────────────────────── */

/* Tablets / laptops */
@media (max-width: 1200px) {
  .hero { gap: 32px; }
  .brand-icon { width: 92px; height: 92px; border-radius: 22px; }
  .brand-title { font-size: 64px; gap: 14px; }
  .brand-sub { font-size: 30px; }
  .brand-tagline { font-size: 18px; }
  .dl-btn {
    --btn-h: 96px;
    min-width: 440px;
    padding: 0 42px;
    gap: 18px;
  }
  .dl-btn-icon { width: 36px; height: 36px; }
  .dl-btn-main { font-size: 24px; }
  .dl-btn-meta { font-size: 14px; }
}

/* Phones & portrait-mode TV browsers */
@media (max-width: 640px) {
  body { padding: 4vh 5vw; }
  .hero { gap: 24px; }
  .brand-icon { width: 76px; height: 76px; border-radius: 18px; }
  .brand-title {
    font-size: 44px;
    flex-direction: column;
    gap: 4px;
  }
  .brand-sub { font-size: 22px; }
  .brand-tagline { font-size: 15px; }
  .dl-btn {
    --btn-h: 84px;
    min-width: 0;
    width: 100%;
    padding: 0 24px;
    gap: 14px;
  }
  .dl-btn-icon { width: 30px; height: 30px; }
  .dl-btn-main { font-size: 19px; }
  .dl-btn-meta { font-size: 12px; }
  .compat { gap: 8px; }
  .compat-pill { font-size: 12px; padding: 6px 12px; }
  .install-note p { font-size: 14px; }
  .page-footer { font-size: 12px; }
}

/* 4K TVs - scale the hero up rather than leave it stranded top-left */
@media (min-width: 2400px) {
  .hero { max-width: 1400px; gap: 56px; }
  .brand-icon { width: 152px; height: 152px; border-radius: 34px; }
  .brand-title { font-size: 120px; }
  .brand-sub { font-size: 56px; }
  .brand-tagline { font-size: 30px; max-width: 900px; }
  .dl-btn {
    --btn-h: 160px;
    min-width: 760px;
    padding: 0 72px;
    gap: 30px;
  }
  .dl-btn-icon { width: 56px; height: 56px; }
  .dl-btn-main { font-size: 42px; }
  .dl-btn-meta { font-size: 20px; }
  .compat { gap: 14px; }
  .compat-pill { font-size: 20px; padding: 12px 24px; }
  .install-note p { font-size: 22px; }
}

/* Users who prefer less motion - kill the orb animation */
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  .dl-btn { transition: none; }
  .dl-btn.focus-pulse:focus { animation: none; }
}
