/* IPTV PREMIUM WORLD — landing page
   Paleta a condizer com a app: fundo azul-noite, azul oceano, violeta e acentos néon subtis. */
:root {
  --bg: #05070d;
  --bg-2: #0a0f1c;
  --surface: rgba(17, 24, 40, 0.62);
  --surface-solid: #0d1220;
  --line: rgba(140, 170, 220, 0.14);
  --text: #eaf2ff;
  --muted: #9aa8c2;
  --ocean: #5b9bd5;
  --violet: #8b7cf6;
  --rose: #cf7e9e;
  --teal: #3fa9a0;
  --cyan: #00e5ff;
  --live: #e5484d;
  --radius: 22px;
  --max: 1200px;
  --grad: linear-gradient(135deg, var(--ocean), var(--violet));
  --grad-text: linear-gradient(100deg, #9fd0ff 0%, #5b9bd5 35%, #8b7cf6 70%, #d6a6ff 100%);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", system-ui, sans-serif; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ocean); color: #001018; padding: 10px 16px; border-radius: 10px; z-index: 100; font-weight: 700; }
.skip:focus { top: 16px; }

/* ---------- Fundo: aurora animada + grelha tech ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 60vw; height: 60vw; left: -15vw; top: -20vw; background: #2c5f93; }
.aurora span:nth-child(2) { width: 50vw; height: 50vw; right: -15vw; top: 10vh; background: #5a46b8; animation-duration: 28s; }
.aurora span:nth-child(3) { width: 45vw; height: 45vw; left: 25vw; bottom: -30vw; background: #6b2f5c; animation-duration: 34s; opacity: .3; }
@keyframes drift { to { transform: translate3d(6vw, 4vh, 0) scale(1.15); } }
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: .35;
}

/* ---------- Navegação ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: rgba(5, 7, 13, 0.62); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand b { font-family: "Space Grotesk", sans-serif; font-size: 18px; letter-spacing: .08em; display: block; line-height: 1; }
.brand small { font-size: 10px; letter-spacing: .4em; color: var(--ocean); font-weight: 700; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .2s; }
.nav ul a:hover { color: var(--text); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 40px -10px rgba(91, 155, 213, .8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(139, 124, 246, .9); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--ocean); outline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1.1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(91, 155, 213, .12); border: 1px solid rgba(91, 155, 213, .35);
  color: #b9dbff; font-size: 13px; font-weight: 600; letter-spacing: .02em; margin-bottom: 22px;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; }
.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: shine 8s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; color: var(--teal); }

/* Dispositivos (TV + telemóvel) */
.devices { position: relative; perspective: 1600px; }
.tv {
  position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(160deg, #1b2440, #0b1020);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .06), 0 0 120px -30px rgba(91, 155, 213, .6);
  transform: rotateY(-8deg) rotateX(4deg); transform-style: preserve-3d; transition: transform .6s;
}
.tv::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 30%; height: 14px; transform: translateX(-50%); border-radius: 0 0 14px 14px; background: linear-gradient(#141b2e, #0a0f1a); }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.screen img.on { opacity: 1; }
.screen::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 40%); pointer-events: none; }
.phone {
  position: absolute; right: -4%; bottom: -14%; width: 27%; border-radius: 26px; padding: 7px;
  background: linear-gradient(160deg, #222c48, #0b1020); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .08);
  transform: rotate(6deg); animation: float 6s ease-in-out infinite;
}
.phone img { border-radius: 20px; }
@keyframes float { 50% { transform: rotate(6deg) translateY(-12px); } }
.chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
  background: rgba(13, 18, 32, .85); border: 1px solid var(--line); backdrop-filter: blur(10px);
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow); animation: float2 7s ease-in-out infinite;
}
.chip svg { width: 18px; height: 18px; }
.chip.c1 { left: -6%; top: 10%; color: #ffd27a; }
.chip.c2 { left: -2%; bottom: 4%; color: #b9a8ff; animation-delay: -3s; }
@keyframes float2 { 50% { transform: translateY(-10px); } }

/* ---------- Faixa de formatos ---------- */
.formats { padding: 28px 0; border-block: 1px solid var(--line); background: rgba(10, 15, 28, .5); }
.formats ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 34px; list-style: none; margin: 0; padding: 0; }
.formats li { color: var(--muted); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.formats li b { color: var(--text); }

/* ---------- Secções ---------- */
section { padding: 100px 0; }
.head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.head h2 { font-size: clamp(32px, 4.2vw, 50px); }
.head p { color: var(--muted); font-size: 18px; }
.kicker { color: var(--ocean); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: 12px; margin-bottom: 14px; display: block; }

/* Números */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: -40px; }
.stat { text-align: center; padding: 26px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 42px; line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14px; }

/* Funcionalidades */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); backdrop-filter: blur(12px); overflow: hidden;
  transition: transform .3s, border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(139, 124, 246, .6), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-4px); }
.card:hover::before { opacity: 1; }
.icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; background: var(--grad); box-shadow: 0 10px 30px -10px rgba(91, 155, 213, .8); }
.icon svg { width: 26px; height: 26px; color: #fff; }
.card h3 { font-size: 21px; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }
.ic-2 { background: linear-gradient(135deg, #8b7cf6, #5e4bc4); }
.ic-3 { background: linear-gradient(135deg, #3fa9a0, #23706a); }
.ic-4 { background: linear-gradient(135deg, #cf7e9e, #8a4f72); }
.ic-5 { background: linear-gradient(135deg, #e0a548, #a8722a); }

/* Catch-up */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split h2 { font-size: clamp(30px, 3.8vw, 46px); }
.split p { color: var(--muted); font-size: 17px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; flex: none; color: var(--teal); margin-top: 2px; }
.shot { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow), 0 0 100px -30px rgba(139, 124, 246, .6); }
.timeline { margin-top: 26px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.track { position: relative; height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.track i { position: absolute; inset: 0 30% 0 0; background: var(--grad); border-radius: 10px; animation: rewind 6s ease-in-out infinite; }
@keyframes rewind { 0%, 15% { right: 8%; } 50%, 65% { right: 52%; } 100% { right: 8%; } }
.labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.labels b { color: var(--live); }

/* Galeria */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.tabs button {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  color: var(--muted); font: 600 15px "Inter", sans-serif; cursor: pointer; transition: all .2s;
}
.tabs button[aria-selected="true"] { background: var(--grad); color: #fff; border-color: transparent; }
.gallery .tv { transform: none; max-width: 1000px; margin: 0 auto; }

/* Passos */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step::before {
  counter-increment: s; content: counter(s); position: absolute; top: -18px; left: 26px; width: 40px; height: 40px;
  border-radius: 12px; display: grid; place-items: center; background: var(--grad); font: 700 18px "Space Grotesk", sans-serif;
}
.step h3 { font-size: 20px; margin-top: 10px; }
.step p { color: var(--muted); margin: 0; }
.install { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.install details { border-radius: 16px; background: rgba(13, 18, 32, .6); border: 1px solid var(--line); padding: 18px 20px; }
.install summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.install summary::after { content: "+"; color: var(--ocean); font-size: 20px; line-height: 1; }
.install details[open] summary::after { content: "–"; }
.install ol { color: var(--muted); padding-left: 20px; margin: 14px 0 0; font-size: 15px; }
code, .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: rgba(91, 155, 213, .14); color: #cfe6ff; padding: 2px 8px; border-radius: 6px; font-size: .92em; }

/* Download */
.download {
  border-radius: 32px; padding: 56px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(800px circle at 20% 0%, rgba(91, 155, 213, .35), transparent 60%), radial-gradient(700px circle at 100% 100%, rgba(139, 124, 246, .35), transparent 60%), var(--surface-solid);
  border: 1px solid rgba(139, 124, 246, .35); box-shadow: 0 0 120px -40px rgba(139, 124, 246, .7);
}
.download h2 { font-size: clamp(32px, 4vw, 52px); }
.download p { color: var(--muted); }
.dl-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 22px; font-size: 14px; color: var(--muted); }
.dl-meta b { color: var(--text); }
.hash { margin-top: 12px; font-size: 12px; color: var(--muted); word-break: break-all; }

/* Registo MAC */
.register { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.mac-help { margin-top: 24px; display: grid; gap: 12px; }
.mac-help div { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.mac-help b { color: var(--text); }
.mac-help span { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: rgba(91, 155, 213, .18); color: var(--ocean); font-weight: 800; }
form.panel { padding: 34px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.field small { color: var(--muted); font-size: 12.5px; display: block; margin-top: 6px; }
input[type="text"], input[type="email"], select {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(5, 7, 13, .7);
  color: var(--text); font: 500 16px "Inter", sans-serif; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { border-color: var(--ocean); box-shadow: 0 0 0 4px rgba(91, 155, 213, .2); outline: none; }
input.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 18px; }
input[aria-invalid="true"] { border-color: var(--live); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ocean); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: 14px; padding: 14px 16px; border-radius: 14px; font-size: 15px; display: none; }
.form-msg.ok { display: block; background: rgba(63, 169, 160, .15); border: 1px solid rgba(63, 169, 160, .5); color: #b8f0e9; }
.form-msg.err { display: block; background: rgba(229, 72, 77, .12); border: 1px solid rgba(229, 72, 77, .5); color: #ffc9cb; }
.pricing { margin-top: 26px; padding: 22px; border-radius: 18px; border: 1px dashed rgba(139, 124, 246, .5); background: rgba(139, 124, 246, .08); }
.pricing h3 { font-size: 18px; margin-bottom: 6px; }
.pricing p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { max-width: 880px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 20px 24px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker, .install summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ocean); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 14px 0 0; }

/* Rodapé */
footer { border-top: 1px solid var(--line); padding: 48px 0 60px; color: var(--muted); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer h4 { color: var(--text); margin: 0 0 12px; font-size: 15px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }
.disclaimer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; grid-column: 1 / -1; }

/* Revelação ao fazer scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero .wrap, .split, .register { grid-template-columns: 1fr; }
  .devices { margin-top: 20px; }
  .features, .steps, .install { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 0; }
  .nav ul { display: none; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  section { padding: 70px 0; }
  .hero { padding-top: 40px; }
  .features, .steps, .install, .row2 { grid-template-columns: 1fr; }
  .download { padding: 36px 20px; }
  form.panel { padding: 24px 18px; }
  .chip { display: none; }
  .phone { width: 32%; right: -2%; }
  .nav .btn { padding: 9px 14px; font-size: 13px; width: auto; margin-left: auto; }
  .nav .wrap { gap: 12px; }
  .brand b { font-size: 15px; white-space: nowrap; }
  .brand img { width: 34px; height: 34px; }
  footer .wrap { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
