/* Colori e sfumatura presi dall'app (Theme.kt): notte, arancio, rosa. */
:root {
  --night: #0B0A14;
  --surface: #17151F;
  --raised: #221F2D;
  --ink: #F5F3FA;
  --mist: #A39FB5;
  --orange: #FF8A2A;
  --pink: #EA1F6B;
  --zap: linear-gradient(100deg, var(--orange), var(--pink));
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --edge: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--orange); text-underline-offset: 3px; }
a:focus-visible, kbd:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
p { margin: 0; }

/* Testata e piede */
.top, .bottom { display: flex; align-items: center; gap: 28px; padding: 24px var(--edge); }
.top nav { margin-left: auto; display: flex; gap: 24px; }
.top nav a, .bottom a { color: var(--mist); text-decoration: none; font-weight: 500; font-size: 16px; }
.top nav a:hover, .bottom a:hover { color: var(--ink); }
.logo { font: 700 28px/1 var(--display); letter-spacing: -0.04em; text-decoration: none; background: var(--zap); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo.small { font-size: 20px; }
.bottom { flex-wrap: wrap; color: var(--mist); font-size: 15px; padding-top: 40px; padding-bottom: 48px; border-top: 1px solid var(--raised); margin-top: 120px; }
.bottom .logo { margin-right: 8px; }

/* Hero: il televisore che fa zapping */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding: clamp(32px, 6vw, 88px) var(--edge) 40px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 92px); }
.lead { font-size: clamp(19px, 1.6vw, 22px); color: var(--mist); margin-top: 28px; max-width: 34em; }
.platforms { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms li { padding: 7px 14px; border-radius: 999px; background: var(--surface); font-weight: 500; font-size: 15px; }
.soon { margin-top: 20px; font-weight: 600; }

.tv { margin: 0; }
.tv-screen { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 0 0 10px #050409, 0 40px 120px -30px rgba(234, 31, 107, 0.45); }
.channel { position: absolute; inset: 0; transition: none; }
/* Ogni canale è una scena astratta: la sfumatura dell'app per i canali senza logo, più un movimento lento. */
.channel::before, .channel::after { content: ""; position: absolute; }
.channel[data-ch="0"] { background: radial-gradient(120% 90% at 20% 30%, #2f6fd6, #0c1f4d 70%); }
.channel[data-ch="0"]::before { left: 8%; right: 8%; bottom: 22%; height: 2px; background: rgba(255,255,255,.5); box-shadow: 0 -18px 0 rgba(255,255,255,.25), 0 -36px 0 rgba(255,255,255,.15); }
.channel[data-ch="1"] { background: linear-gradient(180deg, #1d7a3e 0 55%, #145c2e 55%); }
.channel[data-ch="1"]::before { inset: 18% 30% auto; height: 64%; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; transform: scaleY(.35); }
.channel[data-ch="1"]::after { left: 50%; top: 18%; bottom: 18%; width: 2px; background: rgba(255,255,255,.55); }
.channel[data-ch="2"] { background: radial-gradient(80% 70% at 70% 40%, #ff8a2a, #6b1240 60%, #1a0614); }
.channel[data-ch="2"]::before { left: -10%; right: -10%; bottom: 0; height: 30%; background: #12040c; border-radius: 50% 50% 0 0; }
.channel[data-ch="3"] { background: conic-gradient(from 200deg at 50% 60%, #ffcc00, #ff5fa2, #7b61ff, #2bd9c5, #ffcc00); }
.channel[data-ch="3"]::before { width: 28%; aspect-ratio: 1; left: 36%; top: 26%; border-radius: 50%; background: #fff6; animation: bob 2.4s ease-in-out infinite; }
.channel[data-ch="4"] { background: repeating-linear-gradient(90deg, #120f2b 0 6%, #1d1845 6% 12%); }
.channel[data-ch="4"]::before { left: 10%; right: 10%; bottom: 20%; height: 50%; background: repeating-linear-gradient(90deg, var(--pink) 0 3%, transparent 3% 5%); -webkit-mask: linear-gradient(0deg, #000 30%, transparent); mask: linear-gradient(0deg, #000 30%, transparent); animation: eq 1s steps(4) infinite alternate; }
@keyframes bob { 50% { transform: translateY(-12%); } }
@keyframes eq { to { transform: scaleY(.6); transform-origin: bottom; } }

.static { position: absolute; inset: 0; opacity: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 3px), #08070d; pointer-events: none; }
.tv-screen.zapping .static { animation: flick .28s ease-out; }
@keyframes flick { 0% { opacity: 1; } 100% { opacity: 0; } }

.osd { position: absolute; top: 5%; right: 5%; }
.osd-num { font: 700 clamp(28px, 4vw, 56px)/1 var(--display); color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.banner { position: absolute; left: 4%; right: 4%; bottom: 5%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 14px; padding: 14px 18px; border-radius: 16px; background: rgba(11, 10, 20, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.tv-screen.zapping .banner { transform: translateY(12px); opacity: 0; transition: none; }
.live { grid-row: span 2; align-self: center; padding: 3px 9px; border-radius: 6px; background: #E5243B; font-size: 13px; font-weight: 600; color: #fff; }
.banner-name { font-size: clamp(15px, 1.5vw, 19px); }
.banner-show { grid-column: 2; color: var(--mist); font-size: 14px; }
.banner-next { grid-column: 3; grid-row: 1 / span 2; color: var(--mist); font-size: 14px; }
.bar { grid-column: 1 / -1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.15); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--progress, 40%); background: var(--zap); }
.tv figcaption { margin-top: 26px; color: var(--mist); font-size: 15px; display: flex; align-items: center; gap: 8px; }
kbd { font: 600 14px/1 var(--body); padding: 6px 9px; border-radius: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--raised); cursor: pointer; }
kbd:hover { border-color: var(--orange); }

/* Guida */
.guide-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding: 140px var(--edge) 0; }
.section-copy h2, .features h2, .screens h2, .privacy-band h2, .english h2 { font-size: clamp(32px, 3.6vw, 52px); }
.section-copy p, .screens > p { margin-top: 24px; color: var(--mist); max-width: 36em; }

.epg { background: var(--surface); border-radius: 22px; padding: 18px; }
.epg-head { display: grid; grid-template-columns: 44% 1fr; gap: 18px; margin-bottom: 18px; }
.epg-preview { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: linear-gradient(180deg, #1d7a3e 0 55%, #145c2e 55%); overflow: hidden; }
.epg-preview .live { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 7px; }
.pv-title { position: absolute; left: 10px; bottom: 8px; font-weight: 600; font-size: 13px; }
.epg-info strong { display: block; font-family: var(--display); font-size: 18px; }
.epg-info span { display: block; color: var(--orange); font-size: 14px; margin-top: 4px; }
.epg-info p { color: var(--mist); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.epg-grid { position: relative; display: grid; gap: 6px; --label: 130px; --slot: calc((100% - var(--label)) / 8); }
.times, .row { display: flex; gap: 6px; }
.times span { flex: 2; font-size: 12px; color: var(--mist); }
.times span:first-child { flex: 0 0 calc(var(--label) - 6px); }
.ch { flex: 0 0 calc(var(--label) - 6px); display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; overflow: hidden; white-space: nowrap; }
.ch i { width: 26px; height: 18px; border-radius: 4px; flex: none; background: linear-gradient(135deg, hsl(var(--h) 65% 55%), hsl(calc(var(--h) + 30) 75% 25%)); }
.p { flex: var(--w); min-width: 0; padding: 10px 10px; border-radius: 8px; background: var(--raised); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.is-focus .ch { color: var(--orange); }
.p.now { background: var(--ink); color: var(--night); font-weight: 600; }
.now-line { position: absolute; top: 22px; bottom: 0; left: calc(var(--label) + (100% - var(--label)) * .42); width: 2px; background: var(--orange); border-radius: 2px; animation: now 18s linear infinite alternate; }
@keyframes now { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

/* Funzioni: un elenco, non una griglia di schede */
.features { padding: 140px var(--edge) 0; }
.feature-list { margin: 48px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 96px); }
.feature-list div { padding: 24px 0; border-top: 1px solid var(--raised); }
.feature-list dt { font-family: var(--display); font-weight: 500; font-size: 20px; }
.feature-list dd { margin: 8px 0 0; color: var(--mist); max-width: 32em; }

/* Schermi */
.screens { padding: 140px var(--edge) 0; }
.devices { list-style: none; padding: 0; margin: 56px 0 0; display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-end; }
.devices li { display: flex; flex-direction: column; gap: 14px; font-weight: 600; font-size: 16px; }
.devices svg { width: 72px; height: 48px; fill: none; stroke: var(--orange); stroke-width: 2; stroke-linecap: round; }

/* Privacy */
.privacy-band { margin: 140px var(--edge) 0; padding: clamp(32px, 5vw, 64px); border-radius: 28px; background: var(--zap); color: #fff; }
.privacy-band h2 { font-size: clamp(36px, 5vw, 72px); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 40px; }
.facts p { font-size: 17px; line-height: 1.55; }
.text-link { display: inline-block; margin-top: 40px; color: #fff; font-weight: 600; }

.english { padding: 120px var(--edge) 0; }
.english h2 { font-size: clamp(24px, 2.4vw, 32px); }
.english p { margin-top: 16px; color: var(--mist); max-width: 40em; }

/* Pagine di testo (informativa) */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 24px 0; }
.doc h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 20px; }
.doc h2 { font-size: 22px; margin: 44px 0 10px; }
.doc h3 { font-size: 18px; margin: 32px 0 6px; }
.doc p, .doc li { color: #d9d6e3; }
.doc p + p { margin-top: 14px; }
.doc .lead { margin-top: 0; }
.doc .note { color: var(--mist); font-size: 15px; margin-top: 12px; }
.doc hr { border: 0; border-top: 1px solid var(--raised); margin: 64px 0; }
.doc code { font-size: .9em; background: var(--surface); padding: 2px 6px; border-radius: 6px; }

@media (max-width: 900px) {
  .hero, .guide-section { grid-template-columns: 1fr; }
  .guide-section { padding-top: 96px; }
  .feature-list, .facts { grid-template-columns: 1fr; }
  .top nav a:not(:last-child) { display: none; }
  .epg-head { grid-template-columns: 1fr; }
  .epg-grid { --label: 96px; }
  .banner-next { display: none; }
}

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