/* Mando TV: estilos de la web. Un solo archivo, sin dependencias. */
:root {
  --marca: #e0457b;          /* cambia con la marca de TV elegida */
  --marca-oscura: #b8325f;
  --tinta: #0d0f17;
  --papel: #ffffff;
  --suave: #f3f4f8;
  --tenue: #2f3545;
  --telefono: #07080c;
  --radio: 32px;
  --margen: clamp(16px, 4vw, 48px);
  --ancho: 1240px;
  --t-marca: 600ms cubic-bezier(.2, .8, .2, 1);
  --titular: "Archivo", system-ui, sans-serif;
  --texto: "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 18px;
  line-height: 1.55;
  color: var(--tinta);
  background: var(--papel);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--tinta); color: var(--papel); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 var(--margen); }

/* ---------- Barra superior ---------- */
.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--titular); font-weight: 900;
  font-stretch: 75%; font-size: 26px; letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 34px; height: 34px; }
.barra nav { display: flex; gap: clamp(12px, 3vw, 32px); align-items: center; }
.barra nav a { text-decoration: none; font-weight: 600; font-size: 16px; }
.barra nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.boton-barra { background: var(--tinta); color: var(--papel); padding: 10px 18px; border-radius: 999px; }
.boton-barra:hover { text-decoration: none !important; transform: translateY(-1px); }

/* ---------- Hero ---------- */
.escena {
  background: var(--marca);
  transition: background-color var(--t-marca);
  padding: 0 0 var(--margen);
  color: var(--tinta);
}
.panel {
  position: relative;
  background: rgba(255, 255, 255, .16);
  border-radius: var(--radio);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  min-height: min(760px, calc(100svh - 110px));
  padding: clamp(24px, 4vw, 56px);
  gap: clamp(24px, 4vw, 56px);
}
.gigante {
  position: absolute; left: 50%; top: 2%; transform: translateX(-50%); z-index: 0;
  margin: 0; text-align: center; pointer-events: none; user-select: none;
  font-family: var(--titular); font-weight: 900; font-stretch: 62%;
  font-size: clamp(120px, 15vw, 230px); line-height: .8; letter-spacing: -.03em;
  color: rgba(255, 255, 255, .34);
  white-space: nowrap;
}
.escaparate { position: relative; display: grid; place-items: center; min-height: 600px; padding-top: 70px; }
.sombra-suelo {
  position: absolute; z-index: 1; bottom: 4%; width: 54%; height: 34px; border-radius: 50%;
  background: rgba(0, 0, 0, .28); filter: blur(18px);
  animation: sombra 6s ease-in-out infinite;
}

/* ---------- Teléfono dibujado ---------- */
.telefono {
  --inclinacion: -9deg;
  position: relative; z-index: 2;
  width: min(290px, 74vw);
  aspect-ratio: 9 / 17.6;
  border-radius: 48px;
  background: #1b1d24;
  padding: 11px;
  transform: rotate(var(--inclinacion));
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .45), 0 18px 30px -12px rgba(0, 0, 0, .35),
    inset 0 0 0 2px rgba(255, 255, 255, .08);
  animation: flotar 6s ease-in-out infinite;
}
.pantalla {
  position: relative; height: 100%; border-radius: 38px; overflow: hidden;
  background: var(--telefono); color: #f4f6fa;
  font-size: 11px; line-height: 1.3;
  display: flex; flex-direction: column;
  transition: background-color .5s, color .5s;
}
.pantalla::before { /* luz del color de la marca, como en la app */
  content: ""; position: absolute; inset: -20% -30% auto; height: 70%;
  background: radial-gradient(closest-side, var(--marca), transparent);
  opacity: .55; transition: background .6s;
}
.isla { position: relative; width: 84px; height: 24px; border-radius: 20px; background: #000; margin: 9px auto 6px; z-index: 2; }
.app { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; padding: 4px 14px 12px; gap: 10px; }
.app-cabecera { display: flex; align-items: center; justify-content: space-between; }
.app-tv { font-weight: 700; font-size: 14px; }
.app-estado { display: flex; align-items: center; gap: 5px; font-size: 10px; opacity: .8; }
.app-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.encender { width: 30px; height: 30px; border-radius: 50%; background: #ff6b6b; display: grid; place-items: center; }
.encender svg { width: 14px; height: 14px; }
.vidrio {
  background: rgba(255, 255, 255, .1);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.fila-teclas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tecla { padding: 9px 4px; text-align: center; font-weight: 600; font-size: 10px; border-radius: 14px; }
.cruceta {
  position: relative; width: 78%; aspect-ratio: 1; margin: 4px auto; border-radius: 50%;
  display: grid; place-items: center;
}
.cruceta .flecha { position: absolute; width: 12px; height: 12px; border: solid currentColor; border-width: 2.5px 2.5px 0 0; opacity: .85; }
.cruceta .arriba { top: 13%; transform: rotate(-45deg); }
.cruceta .abajo { bottom: 13%; transform: rotate(135deg); }
.cruceta .izq { left: 13%; transform: rotate(-135deg); }
.cruceta .der { right: 13%; transform: rotate(45deg); }
.ok {
  width: 40%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: #f4f6fa; color: #0b0d16; font-weight: 800; font-size: 15px;
  box-shadow: 0 0 26px color-mix(in srgb, var(--marca) 70%, transparent);
  transition: box-shadow .6s;
}
.balancines { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.balancin { display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 0; height: 92px; font-weight: 700; }
.balancin small { font-size: 9px; opacity: .7; font-weight: 600; }
.balancin b { font-size: 16px; line-height: 1; }
.pestanas { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border-radius: 20px; font-size: 9px; text-align: center; font-weight: 600; }
.pestanas span { padding: 6px 0; border-radius: 13px; opacity: .7; }
.pestanas .activa { background: rgba(255, 255, 255, .16); opacity: 1; }

/* Tema claro del teléfono */
.telefono.claro .pantalla { background: #f2f3f7; color: #111522; }
.telefono.claro .vidrio { background: rgba(255, 255, 255, .75); box-shadow: 0 1px 2px rgba(11, 16, 32, .08); }
.telefono.claro .ok { background: #111522; color: #fff; }
.telefono.claro .pestanas .activa { background: rgba(11, 16, 32, .08); }
.telefono.claro .pantalla::before { opacity: .35; }

/* ---------- Ficha (interfaz de "compra") ---------- */
.ficha { position: relative; z-index: 1; max-width: 520px; }
.ficha h1 {
  font-family: var(--titular); font-weight: 900; font-stretch: 72%;
  font-size: clamp(54px, 6.6vw, 96px); line-height: .92; letter-spacing: -.02em; word-spacing: .06em;
  margin: 0;
}
.bajada { font-size: clamp(18px, 1.6vw, 21px); margin: 20px 0 0; max-width: 32ch; }
.precio { display: flex; align-items: baseline; gap: 14px; margin: 26px 0 0; flex-wrap: wrap; }
.precio strong { font-family: var(--titular); font-weight: 900; font-stretch: 80%; font-size: 44px; line-height: 1; letter-spacing: -.02em; }
.precio span { font-weight: 600; }
.etiqueta-grupo { font-weight: 700; font-size: 16px; margin: 26px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.marcas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.marcas button {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  padding: 14px 6px; border-radius: 14px; border: 0;
  background: rgba(255, 255, 255, .55); color: var(--tinta);
  transition: background-color .25s, color .25s, transform .15s;
}
.marcas button:hover { background: rgba(255, 255, 255, .85); }
.marcas button:active { transform: scale(.96); }
.marcas button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }
.flechas { display: flex; gap: 8px; }
.flechas button {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .55); display: grid; place-items: center; transition: transform .15s, background-color .2s;
}
.flechas button:hover { background: #fff; }
.flechas button:active { transform: scale(.9); }
.flechas svg { width: 18px; height: 18px; }
.temas { display: flex; gap: 12px; align-items: center; }
.punto {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); transition: transform .2s, box-shadow .2s;
}
.punto[data-tema="oscuro"] { background: #07080c; }
.punto[data-tema="claro"] { background: #f2f3f7; }
.punto[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--marca), 0 0 0 6px var(--tinta); transform: scale(1.06); }
.temas small { font-size: 15px; font-weight: 600; }
.acciones { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.boton {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 700; font-size: 17px; padding: 16px 24px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--tinta); color: var(--papel); transition: transform .15s, background-color .2s;
}
.boton:hover { transform: translateY(-2px); }
.boton:active { transform: translateY(0) scale(.97); }
.boton.claro { background: rgba(255, 255, 255, .7); color: var(--tinta); }
.boton svg { width: 20px; height: 20px; }
.nota { font-size: 15px; margin-top: 14px; }

/* ---------- Secciones ---------- */
section { padding: clamp(80px, 12vw, 180px) 0 0; }
.titulo-seccion {
  font-family: var(--titular); font-weight: 900; font-stretch: 72%;
  font-size: clamp(44px, 6vw, 88px); line-height: .92; letter-spacing: -.03em; margin: 0 0 20px;
}
.intro { font-size: clamp(19px, 1.7vw, 22px); max-width: 52ch; margin: 0; }

/* Lo que puedes hacer: lista grande a dos columnas con la pieza de la app al lado */
.funciones { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; margin-top: 56px; }
.lista-funciones { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.lista-funciones li { display: grid; gap: 4px; }
.lista-funciones b { font-family: var(--titular); font-stretch: 85%; font-weight: 800; font-size: 28px; letter-spacing: -.01em; line-height: 1.1; }
.lista-funciones span { color: var(--tenue); }
.piezas { display: grid; gap: 20px; position: sticky; top: 24px; }
.pieza {
  background: var(--telefono); color: #f4f6fa; border-radius: 28px; padding: 26px; position: relative; overflow: hidden;
}
.pieza::before { content: ""; position: absolute; inset: -40% -20% auto; height: 90%; background: radial-gradient(closest-side, var(--marca), transparent); opacity: .5; transition: background .6s; }
.pieza > * { position: relative; }
.pieza h3 { margin: 0 0 14px; font-size: 17px; }
.touchpad { height: 170px; border-radius: 20px; display: grid; place-items: center; font-weight: 600; opacity: .9; position: relative; }
.touchpad .dedo { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .55); animation: deslizar 3.2s ease-in-out infinite; }
.teclado { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; font-size: 17px; }
.teclado .cursor { width: 2px; height: 20px; background: currentColor; animation: parpadeo 1s steps(1) infinite; }
.entradas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.entradas span { padding: 14px 6px; border-radius: 14px; text-align: center; font-weight: 600; font-size: 15px; }
.entradas .sel { background: #f4f6fa; color: #0b0d16; }

/* Cómo se conecta: bloque de color de marca a todo lo ancho */
.franja { background: var(--marca); transition: background-color var(--t-marca); margin-top: clamp(80px, 12vw, 180px); padding: clamp(64px, 9vw, 130px) 0; }
.franja section { padding: 0; }
.pasos { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px); counter-reset: paso; }
.pasos li { background: rgba(255, 255, 255, .55); border-radius: 26px; padding: 28px; }
.pasos b { display: block; font-family: var(--titular); font-stretch: 80%; font-weight: 900; font-size: 30px; line-height: 1.05; margin-bottom: 10px; letter-spacing: -.01em; }
.pasos p { margin: 0; }

/* Precio */
.planes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.plan { border-radius: 30px; padding: clamp(28px, 4vw, 48px); background: var(--suave); }
.plan.pro { background: var(--tinta); color: var(--papel); }
.plan h3 { font-family: var(--titular); font-weight: 900; font-stretch: 75%; font-size: 56px; line-height: .9; margin: 0; letter-spacing: -.03em; }
.plan .cuanto { font-size: 20px; font-weight: 700; margin: 12px 0 22px; }
.plan ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

/* Privacidad en corto */
.promesa { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.promesa ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.promesa li { background: var(--suave); border-radius: 20px; padding: 20px 24px; font-weight: 600; }

/* Preguntas */
.preguntas { margin-top: 40px; display: grid; gap: 10px; max-width: 900px; }
details { background: var(--suave); border-radius: 20px; padding: 0 24px; }
summary { cursor: pointer; font-weight: 700; font-size: 19px; padding: 20px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 26px; line-height: .8; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p, details ol, details ul { margin: 0 0 20px; max-width: 65ch; }
details ol, details ul { padding-left: 1.3em; display: grid; gap: 6px; }

/* Contacto */
.contacto { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.correo { font-family: var(--titular); font-weight: 900; font-stretch: 75%; font-size: clamp(34px, 5.4vw, 76px); letter-spacing: -.03em; line-height: 1; text-decoration: none; overflow-wrap: anywhere; }
.correo:hover { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px; }

/* Pie */
.pie { background: var(--tinta); color: var(--papel); margin-top: clamp(80px, 12vw, 180px); padding: 56px 0 28px; overflow: hidden; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: center; font-size: 16px; }
.pie-enlaces nav { display: flex; gap: 24px; flex-wrap: wrap; }
.pie-enlaces a { text-decoration: none; }
.pie-enlaces a:hover { text-decoration: underline; }
.pie-gigante { font-family: var(--titular); font-weight: 900; font-stretch: 62%; font-size: clamp(110px, 25vw, 380px); line-height: .78; letter-spacing: -.04em; margin: 40px 0 0; color: var(--marca); transition: color var(--t-marca); }
.pie small { display: block; margin-top: 20px; color: #b8bdca; font-size: 14px; }

/* ---------- Páginas de texto (privacidad, soporte) ---------- */
.cabecera-pagina { background: var(--marca); padding-bottom: clamp(48px, 7vw, 96px); }
.cabecera-pagina h1 { font-family: var(--titular); font-weight: 900; font-stretch: 70%; font-size: clamp(56px, 9vw, 130px); line-height: .9; letter-spacing: -.035em; margin: clamp(32px, 6vw, 72px) 0 18px; }
.cabecera-pagina p { font-size: 20px; max-width: 52ch; margin: 0; }
.documento { max-width: 760px; }
.documento h2 { font-family: var(--titular); font-stretch: 80%; font-weight: 900; font-size: 36px; line-height: 1.05; letter-spacing: -.02em; margin: 56px 0 14px; }
.documento h3 { font-size: 21px; margin: 32px 0 8px; }
.documento p, .documento li { font-size: 18px; }
.documento ul, .documento ol { padding-left: 1.3em; display: grid; gap: 8px; }
.documento .fecha { color: var(--tenue); font-size: 16px; }

/* ---------- Animaciones ---------- */
@keyframes flotar { 0%, 100% { transform: rotate(var(--inclinacion)) translateY(0); } 50% { transform: rotate(calc(var(--inclinacion) + 2deg)) translateY(-16px); } }
@keyframes sombra { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.86); opacity: .7; } }
@keyframes deslizar { 0% { transform: translate(-70px, 30px); opacity: 0; } 15% { opacity: 1; } 60% { transform: translate(70px, -30px); opacity: 1; } 80%, 100% { transform: translate(70px, -30px); opacity: 0; } }
@keyframes parpadeo { 50% { opacity: 0; } }
@keyframes cambio { from { transform: rotate(var(--inclinacion)) translateY(24px) scale(.96); opacity: .4; } }
.telefono.cambiando { animation: cambio .55s cubic-bezier(.2, .8, .2, 1), flotar 6s ease-in-out .55s infinite; }

.aparece { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.aparece.visible { opacity: 1; transform: none; }
.sin-js .aparece { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .aparece { opacity: 1; transform: none; }
}

/* ---------- Tableta y teléfono ---------- */
@media (max-width: 960px) {
  .panel { grid-template-columns: 1fr; min-height: 0; }
  .escaparate { min-height: 520px; order: -1; }
  .ficha { max-width: none; }
  .funciones, .promesa, .planes { grid-template-columns: 1fr; }
  .piezas { position: static; }
  .pasos { grid-template-columns: 1fr; }
  .contacto { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .barra nav a:not(.boton-barra) { display: none; }
  .panel { border-radius: 24px; padding: 20px 16px 24px; }
  .escaparate { min-height: 470px; padding-top: 60px; }
  .gigante { font-size: 33vw; }
  .telefono { width: min(250px, 66vw); }
  .marcas { grid-template-columns: repeat(2, 1fr); }
  .acciones .boton { flex: 1 1 100%; justify-content: center; }
}

/* Panel de correo (correo.js) */
.panel-correo {
  border: 0; border-radius: 28px; padding: 36px 32px 28px; width: min(460px, calc(100vw - 32px));
  background: var(--papel); color: var(--tinta); box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.panel-correo::backdrop { background: rgba(13, 15, 23, .55); }
.panel-correo[open] { animation: panel-entra .28s cubic-bezier(.2, .8, .2, 1); }
.panel-correo h2 { font-family: var(--titular); font-weight: 900; font-stretch: 75%; font-size: 44px; line-height: 1; margin: 0 0 12px; letter-spacing: -.02em; }
.panel-correo p { margin: 0; }
.panel-correo-dir { font-weight: 700; font-size: 24px; margin: 4px 0 22px !important; overflow-wrap: anywhere; }
.panel-correo-acciones { display: grid; gap: 10px; }
.panel-correo-acciones .boton { justify-content: center; width: 100%; font-family: inherit; }
.panel-correo .boton.claro { background: var(--suave); }
.panel-correo-aviso { min-height: 1.5em; margin-top: 12px !important; font-weight: 600; text-align: center; }
.panel-correo-cerrar { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--suave); font-size: 24px; line-height: 1; cursor: pointer; color: var(--tinta); }
@keyframes panel-entra { from { opacity: 0; transform: translateY(16px) scale(.97); } }
