/* GOMES WiFi — portal cautivo. Sin fuentes externas: antes de autenticarse no hay internet. */
:root {
  --ink: #13233f;
  --brand: #1f5fd1;      /* reemplazar por el azul oficial de GOMES */
  --sun: #f6b835;
  --sun-text: #2a1d00;
  --bg: #eef2f6;
  --surface: #ffffff;
  --text: #13233f;
  --muted: #5b6b82;
  --line: #d5dde8;
  --danger: #c2362f;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1726;
    --surface: #17243a;
    --text: #e8eef7;
    --muted: #9aabc4;
    --line: #2a3a55;
    --brand: #5b8ff0;
    --danger: #ff7a70;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font); font-size: 17px; line-height: 1.45;
  background: var(--bg); color: var(--text);
}
a { color: var(--link, var(--brand)); }

/* Banda superior: el elemento con personalidad */
.band { background: var(--ink); color: #fff; padding: 18px 20px 30px; position: relative; overflow: hidden; }
.band::after {
  content: ""; position: absolute; right: -78px; top: -78px; width: 140px; height: 140px;
  border-radius: 50%; border: 20px solid var(--sun); opacity: .9;
}
.band-inner { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.signal { width: 34px; height: 26px; fill: none; stroke: var(--sun); stroke-width: 5; stroke-linecap: round; }
.signal circle { fill: var(--sun); stroke: none; }
.brand { font-size: 18px; letter-spacing: .02em; }
.brand b { font-weight: 800; }
.hero { position: relative; z-index: 1; max-width: 520px; margin: 34px auto 0; }
.hero h1 { font-size: clamp(30px, 8.5vw, 42px); line-height: 1.05; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; max-width: 12ch; }
.hero p { margin: 0; color: #c9d5e8; font-size: 17px; }
.hero-sm { margin-top: 24px; }
.hero-sm h1 { font-size: clamp(26px, 7vw, 34px); max-width: none; }

.wrap { width: 100%; max-width: 520px; margin: -14px auto 0; padding: 0 16px 32px; flex: 1; position: relative; z-index: 2; }

/* Opciones de conexión */
.choice {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 16px; border: 1px solid var(--line);
}
.choice:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--sun); outline-offset: 2px;
}
.choice-title { display: block; font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.choice-text { display: block; color: var(--muted); font-size: 15px; }
.choice-free {
  background: var(--sun); color: var(--sun-text); border: 0; border-radius: var(--radius-lg);
  padding: 22px 20px; margin-bottom: 12px; box-shadow: 0 10px 24px -14px rgba(19,35,63,.55);
}
.choice-free .choice-title { font-size: 24px; }
.choice-free .choice-text { color: var(--sun-text); opacity: .8; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-client { border-top: 4px solid var(--brand); }
.choice-paid { border-top: 4px solid var(--ink); }
@media (prefers-color-scheme: dark) { .choice-paid { border-top-color: var(--muted); } }
@media (max-width: 360px) { .choice-row { grid-template-columns: 1fr; } }

/* Espacios para publicidad (fase 5) */
.ad-slot { margin: 12px 0; border-radius: var(--radius-sm); overflow: hidden; }
.ad-slot img { display: block; width: 100%; height: auto; }

/* Formularios */
.form { background: var(--surface); border-radius: var(--radius-lg); padding: 20px 18px; border: 1px solid var(--line); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=email], select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; min-height: 48px;
}
.code { font-size: 28px; letter-spacing: .4em; text-align: center; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 10px 0; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.has-error input, .has-error select { border-color: var(--danger); }
.err { display: block; color: var(--danger); font-size: 14px; margin-top: 4px; }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--brand-text, #fff); background: var(--brand);
  border: 0; border-radius: var(--radius-sm); padding: 14px; min-height: 52px; margin-top: 16px;
}
.btn-quiet { background: transparent; color: var(--link, var(--brand)); border: 1px solid var(--line); }
.lead { font-size: 18px; margin: 28px 4px 0; }
.prose { background: var(--surface); border-radius: var(--radius-lg); padding: 4px 18px; border: 1px solid var(--line); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 18px 20px; font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .choice-free { transition: transform .12s; }
  .choice-free:active { transform: scale(.98); }
}

.redeem { display: block; text-align: center; margin: 16px 0 4px; font-size: 15px; font-weight: 600; }

/* ---------- Sondeo ---------- */
.survey-q { font-size: clamp(24px, 6.4vw, 32px) !important; line-height: 1.15 !important; max-width: 22ch !important; }
.survey { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 8px; }
.step { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.step legend { font-weight: 700; font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 0; }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 14px; }
.ages { display: flex; flex-wrap: wrap; gap: 8px; border-radius: var(--radius-sm); transition: box-shadow .2s; }
.ages.need { box-shadow: 0 0 0 3px var(--danger); }
.age { position: relative; }
.age input { position: absolute; opacity: 0; inset: 0; }
.age span { display: block; padding: 10px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 600; font-size: 15px; }
.age input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.age input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.cands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .cands { grid-template-columns: repeat(3, 1fr); } }
.cand { font: inherit; color: var(--text); cursor: pointer; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 0 10px; overflow: hidden; display: flex; flex-direction: column; }
.cand img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.cand-name { font-weight: 700; font-size: 15px; margin: 8px 6px 0; line-height: 1.2; }
.cand-org { font-size: 13px; color: var(--muted); margin: 2px 6px 0; line-height: 1.2; }
.cand:active { transform: scale(.98); }
.cand:focus-visible, .other:focus-visible, .skip:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.others { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.other { font: inherit; font-weight: 600; cursor: pointer; padding: 14px; min-height: 50px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.skip { display: block; width: 100%; margin-top: 8px; font: inherit; font-size: 15px; color: var(--muted); background: none; border: 0; padding: 12px; cursor: pointer; text-decoration: underline; }
.survey-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); font-weight: 600; padding: 10px 12px; border-radius: var(--radius-sm); margin: 0 0 14px; }

/* Sondeo: sin el aro decorativo, para que el texto se lea limpio y el diseño sea neutral */
.t-pillarodecide .band::after { display: none; }

/* ---------- Planes y pago ---------- */
.choice-row.single { grid-template-columns: 1fr; }
.plans { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.plan { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer; background: var(--bg); }
.plan input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.plan:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--surface); }
.plan-body { flex: 1; display: flex; flex-direction: column; }
.plan-name { font-weight: 700; }
.plan-desc { font-size: 14px; color: var(--muted); }
.plan-price { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 2px 4px; }
.paybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; }
.paybox-tip { margin: 0 0 12px; font-size: 15px; }
.codebox { background: var(--surface); border: 2px dashed var(--sun); border-radius: var(--radius-lg); padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.codebox-label { font-weight: 600; color: var(--muted); font-size: 14px; }
.codebox-code { font-size: 40px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.codebox-help { font-size: 14px; color: var(--muted); }
.code-alpha { text-transform: uppercase; letter-spacing: .3em; }
.hero-sm p { max-width: 30ch; }

/* ---------- Clientes ---------- */
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.center { text-align: center; }
input[type=password] { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; min-height: 48px; }
.devices { display: grid; gap: 10px; }
.device { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.device-body { flex: 1; display: flex; flex-direction: column; }
.device-name { font-weight: 700; }
.device-meta { font-size: 13px; color: var(--muted); }
.device-btn { width: auto; margin: 0; min-height: 44px; padding: 10px 14px; }

/* ---------- Publicidad ---------- */
.ad-slot { margin: 12px 0; position: relative; }
.ad-track { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--line); }
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; pointer-events: none; display: block; }
.ad-slide.on { opacity: 1; pointer-events: auto; }
.ad-slide img, .ad-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-sound { position: absolute; right: 8px; bottom: 8px; font: inherit; font-size: 12px; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); border: 0; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.ad-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.ad-dot.on { background: var(--brand); width: 20px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .ad-slide { transition: none; } }
.logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; }


/* ---------- Mascota en la portada (Gombot) ---------- */
.has-hero .band { padding-bottom: 46px; }
.has-hero .band::after { display: none; }
.has-hero .hero h1, .has-hero .hero p { max-width: 58%; }
.mascot { position: absolute; right: max(4px, calc(50% - 270px)); bottom: -26px; height: 210px; width: auto; z-index: 1; pointer-events: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.mascot-sm { height: 170px; }
@media (prefers-reduced-motion: no-preference) {
  .mascot { animation: float 4.5s ease-in-out infinite; transform-origin: bottom center; }
  @keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
}
@media (max-width: 360px) { .mascot { height: 170px; } .has-hero .hero h1 { font-size: 28px; } }
.logo { height: 38px; }

/* ---------- Sondeo: Santiago de Píllaro (verde, amarillo y rojo de su bandera) ---------- */
.t-pillarodecide .band::after {
  display: block; content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: auto;
  width: auto; height: 6px; border: 0; border-radius: 0; opacity: 1;
  background: linear-gradient(90deg, #1e7b3c 0 33.33%, #f7c600 33.33% 66.66%, #c8102e 66.66% 100%);
}
.t-pillarodecide .band { border-bottom: 4px solid #f7c600; }
.t-pillarodecide .signal { stroke: #f7c600; } .t-pillarodecide .signal circle { fill: #f7c600; }
.brand-place { font-size: 13px; color: rgba(255,255,255,.8); border-left: 1px solid rgba(255,255,255,.35); padding-left: 10px; }
.place { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1d1d1d; background: var(--sun); padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; }
.t-pillarodecide .step-n { background: var(--ink); }
.t-pillarodecide .step:nth-of-type(2) .step-n { background: var(--brand); }
.t-pillarodecide .age input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.t-pillarodecide .ages.need { box-shadow: 0 0 0 3px var(--brand); }

/* foto del candidato (predomina) + logo del movimiento (pequeño, en la esquina) */
.cand-photo { position: relative; display: block; }
.cand-photo > img:first-child { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.cand-logo { position: absolute; right: 6px; bottom: 6px; width: 30%; max-width: 54px; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.cand img.cand-logo { position: absolute; right: 6px; bottom: 6px; width: 30%; max-width: 54px; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* Política de privacidad (texto editable) */
.policy { padding: 6px 18px 14px; }
.policy h2 { font-size: 19px; margin: 20px 0 6px; line-height: 1.2; }
.policy p { margin: 10px 0; } .policy ul { margin: 10px 0; padding-left: 22px; } .policy li { margin: 4px 0; }
