/* Super Nova IPTV – sito informativo */
:root {
    --accent: #1FA2FF;
    --nebula: #7B5CFF;
    --nebula-light: #B69CFF;
    --deep: #03040B;
    --navy: #0B1030;
    --card: rgba(20, 27, 61, .62);
    --line: rgba(255, 255, 255, .1);
    --text: #E8ECFF;
    --muted: #A9B4D8;
    --cosmic: linear-gradient(90deg, #1FA2FF, #7B5CFF);
    --radius: 18px;
    --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    font: 17px/1.6 "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--deep);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

/* ---------- Cielo stellato (solo CSS) ---------- */
.sky {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 60% 45% at 88% 12%, rgba(123, 92, 255, .30), transparent 70%),
        radial-gradient(ellipse 55% 45% at 5% 75%, rgba(31, 162, 255, .16), transparent 70%),
        radial-gradient(ellipse 50% 35% at 50% 110%, rgba(255, 92, 168, .08), transparent 70%),
        linear-gradient(180deg, var(--navy), var(--deep) 55%);
}
.sky::before, .sky::after {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(1.2px 1.2px at 10% 20%, #fff, transparent),
        radial-gradient(1px 1px at 25% 65%, #cfe3ff, transparent),
        radial-gradient(1.4px 1.4px at 40% 30%, #fff, transparent),
        radial-gradient(1px 1px at 55% 80%, #e2d6ff, transparent),
        radial-gradient(1.6px 1.6px at 70% 15%, #fff, transparent),
        radial-gradient(1px 1px at 82% 55%, #fff4dc, transparent),
        radial-gradient(1.2px 1.2px at 92% 85%, #fff, transparent),
        radial-gradient(1px 1px at 15% 90%, #fff, transparent),
        radial-gradient(1.3px 1.3px at 60% 45%, #cfe3ff, transparent),
        radial-gradient(1px 1px at 33% 8%, #fff, transparent);
    background-size: 520px 520px;
    animation: twinkle 6s ease-in-out infinite alternate;
}
.sky::after { background-size: 760px 760px; background-position: 130px 210px; animation-delay: -3s; opacity: .7; }
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sky::before, .sky::after { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Layout ---------- */
.wrap { width: min(var(--max), 100% - 32px); margin: 0 auto; }
section { padding: 88px 0; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: clamp(28px, 4vw, 42px); }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 680px; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .28em; font-size: 13px; text-transform: uppercase; margin-bottom: 10px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
.logo span {
    background: linear-gradient(90deg, var(--accent), var(--nebula-light));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 10px rgba(31, 162, 255, .45));
}
.logo .s { font-size: 10px; font-weight: 700; letter-spacing: .9em; }
.logo .n { font-size: 28px; font-weight: 900; letter-spacing: .12em; }

/* ---------- Barra ---------- */
header.bar {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    background: rgba(3, 4, 11, .62); border-bottom: 1px solid var(--line);
}
header.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
header.bar nav { display: flex; align-items: center; gap: 22px; }
header.bar nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
header.bar nav a:hover { color: #fff; }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
@media (max-width: 720px) { header.bar nav a.opt { display: none; } }

/* ---------- Pulsanti ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 999px; font-weight: 700; text-decoration: none;
    color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn.primary { background: var(--cosmic); border-color: transparent; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(31, 162, 255, .35); }
.btn[aria-disabled="true"] { opacity: .75; cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: none; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 900; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; background: var(--cosmic); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notice {
    margin-top: 22px; padding: 14px 18px; border-radius: 14px; font-size: 15px; color: var(--muted);
    background: rgba(31, 162, 255, .08); border: 1px solid rgba(31, 162, 255, .25);
}
.devices { position: relative; padding: 0 14% 64px 0; }
.devices .tv {
    border-radius: 14px; border: 6px solid #10152e; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(123, 92, 255, .25);
}
.devices .phone {
    position: absolute; width: 26%; right: 0; bottom: 0;
    border-radius: 26px; border: 6px solid #10152e; box-shadow: 0 30px 70px rgba(0, 0, 0, .7);
}
@media (max-width: 900px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .devices { margin-top: 12px; }
}

/* ---------- Funzioni ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.grid.speed { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid, .grid.speed { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid, .grid.speed { grid-template-columns: 1fr; } }
.card {
    padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
    transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(31, 162, 255, .5); transform: translateY(-3px); }
.card .ico {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px;
    background: var(--cosmic); box-shadow: 0 8px 24px rgba(123, 92, 255, .35);
}
.card .ico svg { width: 24px; height: 24px; fill: #fff; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- Galleria ---------- */
.tabs { display: flex; gap: 8px; justify-content: center; margin: 30px 0 22px; flex-wrap: wrap; }
.tabs button {
    font: inherit; font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer;
    padding: 9px 20px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.tabs button[aria-selected="true"] { color: #fff; background: var(--cosmic); border-color: transparent; }
.gallery {
    display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px;
    scrollbar-width: thin; scrollbar-color: var(--nebula) transparent;
}
.gallery img { scroll-snap-align: center; border-radius: 14px; border: 1px solid var(--line); flex: 0 0 auto; }
.gallery.tv img { width: min(760px, 86vw); }
.gallery.phone img.p { height: min(560px, 110vw); width: auto; }
.gallery.phone img.l { height: min(280px, 55vw); width: auto; align-self: center; }
.gallery[hidden] { display: none; }

/* ---------- Piattaforme ---------- */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 36px; }
.platform { padding: 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.platform h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.platform h3 svg { width: 30px; height: 30px; fill: var(--accent); }
.platform ul { margin: 12px 0 18px; padding-left: 20px; color: var(--muted); }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(123, 92, 255, .2); color: var(--nebula-light); }

/* ---------- Passi ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 36px; counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
    border-radius: 50%; background: var(--cosmic); font-weight: 900;
}
.step p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 36px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* ---------- Pagine di testo (privacy) ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 0 80px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); }
.doc h2 { font-size: 22px; color: var(--accent); margin-top: 36px; }
.doc p, .doc li { color: var(--text); }
.doc .muted { color: var(--muted); font-size: 15px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }

/* ---------- Selettore lingua ---------- */
.langs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs a { padding: 3px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
.langs a[aria-current="true"] { background: var(--cosmic); color: #fff; }
.langs a:hover { color: #fff; }

/* ---------- Numeri ---------- */
.stats-band { padding: 8px 0 24px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
    padding: 22px 20px; border-radius: var(--radius); text-align: center;
    background: linear-gradient(135deg, rgba(123, 92, 255, .18), rgba(31, 162, 255, .1)); border: 1px solid var(--line);
}
.stat strong {
    display: block; font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; line-height: 1.1;
    background: var(--cosmic); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 14.5px; }
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Velocità ---------- */
.grid.speed .card { background: linear-gradient(160deg, rgba(31, 162, 255, .12), var(--card)); }

/* ---------- Piattaforme su tre colonne ---------- */
.platforms.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Contatti ---------- */
.contact {
    padding: 48px 24px; border-radius: 28px;
    background: radial-gradient(ellipse at 20% 0%, rgba(123, 92, 255, .3), transparent 60%),
                radial-gradient(ellipse at 90% 100%, rgba(31, 162, 255, .22), transparent 60%), var(--card);
    border: 1px solid var(--line);
}
@media (max-width: 720px) { header.bar nav { gap: 10px; } }

/* ---------- Versioni (cinque schede) ---------- */
.platforms.five { display: flex; flex-wrap: wrap; justify-content: center; }
.platforms.five .platform { flex: 1 1 300px; max-width: 362px; }
.platform { display: flex; flex-direction: column; }
.platform ul { flex: 1; }
.platform .badge { align-self: flex-start; }
.badge.link { background: var(--cosmic); color: #fff; text-decoration: none; padding: 7px 16px; box-shadow: 0 8px 22px rgba(31, 162, 255, .3); }
.badge.link:hover { transform: translateY(-1px); }

/* ---------- Raspberry Pi in primo piano ---------- */
.spotlight {
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
    padding: 44px; border-radius: 28px; border: 1px solid var(--line);
    background: radial-gradient(ellipse at 100% 0%, rgba(123, 92, 255, .32), transparent 60%),
                radial-gradient(ellipse at 0% 100%, rgba(31, 162, 255, .2), transparent 60%), var(--card);
}
.spotlight h2 { margin-top: 0; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.checks li strong { color: var(--text); }
.checks svg { flex: 0 0 22px; width: 22px; height: 22px; margin-top: 2px; padding: 3px; border-radius: 50%; fill: #fff; background: var(--cosmic); }
.spotlight .shots { position: relative; padding: 0 0 22% 0; }
.spotlight .shots img { border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.spotlight .shots .back { width: 88%; }
.spotlight .shots .front { position: absolute; width: 72%; right: 0; bottom: 0; }
@media (max-width: 900px) {
    .spotlight { grid-template-columns: 1fr; padding: 28px 20px; }
}
