/* TarifasLuzBaratas.com by Solareia
   Marca Solareia (globals de wearesolareia.com): primario #014044, acento #60C495, menta del logo #8CFFB9.
   Tipografía: Outfit (titulares, cifras) + Roboto (texto, fuente de marca).
   Radios: tarjetas 20px, campos 12px, botones y chips en píldora.
   Movimiento: ease-out fuerte para entradas, <300ms en interacción, todo desactivable con prefers-reduced-motion. */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #014044;
  --brand-2: #025a5f;
  --brand-ink: #012a2d;
  --brand-deep: #011c1e;
  --accent: #60c495;
  --accent-strong: #3fa877;
  --mint: #8cffb9;

  --bg: #f3f7f5;
  --surface: #ffffff;
  --surface-2: #ecf2ef;
  --text: #0d201f;
  --muted: #4a5d5a;
  --border: #d8e3df;
  --focus: #0b7a6f;
  --eyebrow: #1d6e4a;
  --danger: #b42318;
  --shadow: 0 1px 2px rgb(1 64 68 / .05), 0 18px 40px -18px rgb(1 64 68 / .22);
  --shadow-lg: 0 40px 80px -30px rgb(1 28 30 / .55);

  --font-display: "Outfit", "Roboto", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-card: 20px;
  --r-input: 12px;
  --r-pill: 999px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081413;
    --surface: #0f1f1d;
    --surface-2: #142926;
    --text: #e6efed;
    --muted: #a3b6b2;
    --border: #21403b;
    --focus: #8cffb9;
    --eyebrow: #8cffb9;
    --danger: #ff8a80;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 18px 40px -18px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #081413; --surface: #0f1f1d; --surface-2: #142926; --text: #e6efed; --muted: #a3b6b2;
  --border: #21403b; --focus: #8cffb9; --eyebrow: #8cffb9; --danger: #ff8a80;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 18px 40px -18px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; scroll-padding-bottom: 104px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.025em; margin: 0; font-weight: 700; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.hero :focus-visible:not(.lead *), .final :focus-visible:not(.lead *), .dock :focus-visible, .fab-phone:focus-visible,
.live__now :focus-visible, .site-footer :focus-visible, .tile--brand :focus-visible { outline-color: var(--mint); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: var(--r-input); }
.skip:focus { top: 12px; }

/* Máscara de marca (icono enchufe-hoja de Solareia) */
.brand__mark {
  display: inline-block; width: 28px; height: 28px; flex: none; background: var(--mint);
  -webkit-mask: url("../img/solareia-mark-96.png") center / contain no-repeat;
  mask: url("../img/solareia-mark-96.png") center / contain no-repeat;
}
.brand__mark--xl { width: 64px; height: 64px; }

/* ---------- Botones ---------- */
.btn {
  --b-bg: var(--accent); --b-fg: var(--brand-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; padding: 0 1.6rem; border: 0; border-radius: var(--r-pill);
  background: var(--b-bg); color: var(--b-fg); font: 600 1.02rem/1 var(--font-display); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn--block { width: 100%; }
.btn--ghost { --b-bg: transparent; --b-fg: var(--text); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn .icon { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { --b-bg: var(--mint); box-shadow: 0 10px 24px -10px rgb(96 196 149 / .8); }
  .btn--ghost:hover { --b-bg: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
  .btn:hover .icon--nudge { transform: translateX(3px); }
}

/* ---------- Botones flotantes ---------- */
.fab-phone {
  position: fixed; top: 16px; right: 16px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px;
  border-radius: var(--r-pill); color: #fff; text-decoration: none; font: 600 .95rem var(--font-display);
  background: rgb(1 42 45 / .86); border: 1px solid rgb(255 255 255 / .16);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 10px 30px -12px rgb(0 0 0 / .5);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.fab-phone .icon { color: var(--mint); }
.fab-phone:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .fab-phone:hover { background: var(--brand); } }
@media (max-width: 520px) { .fab-phone { width: 44px; padding: 0; justify-content: center; } .fab-phone span { display: none; } }

.dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: var(--r-pill); background: rgb(1 34 37 / .8); border: 1px solid rgb(255 255 255 / .12);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 20px 50px -18px rgb(0 0 0 / .6);
  transform: translate(-50%, calc(100% + 32px)); opacity: 0; pointer-events: none;
  transition: transform 350ms var(--ease-out), opacity 250ms ease;
}
.dock.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.dock__brand { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.dock__link { color: rgb(255 255 255 / .82); text-decoration: none; font: 500 .92rem var(--font-display); padding: 10px 14px; border-radius: var(--r-pill); transition: background-color 200ms ease, color 200ms ease; white-space: nowrap; }
.dock__call { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--mint); background: rgb(255 255 255 / .06); }
.dock__cta { min-height: 44px; padding-inline: 1.2rem; font-size: .95rem; white-space: nowrap !important; }
.dock a { transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.dock a:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .dock__link:hover { background: rgb(255 255 255 / .08); color: #fff; } }
@media (max-width: 720px) { .dock__link, .dock__brand { display: none; } .dock { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .dock { transition: opacity 200ms ease; transform: translate(-50%, 0); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #025a5f 0%, var(--brand) 38%, var(--brand-deep) 100%);
  padding: clamp(56px, 8vw, 88px) 0 clamp(56px, 7vw, 88px);
}
.hero__aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero__aurora span { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(60px); opacity: .5; }
.hero__aurora span:first-child { left: -18vmax; top: -24vmax; background: radial-gradient(circle, rgb(96 196 149 / .55), transparent 62%); }
.hero__aurora span:last-child { right: -22vmax; bottom: -30vmax; background: radial-gradient(circle, rgb(140 255 185 / .35), transparent 60%); }
@media (prefers-reduced-motion: no-preference) {
  .hero__aurora span:first-child { animation: drift 22s ease-in-out infinite alternate; }
  .hero__aurora span:last-child { animation: drift 28s ease-in-out -6s infinite alternate-reverse; }
}
@keyframes drift { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.08); } }
.hero::after { /* rejilla sutil que da profundidad sin competir con el texto */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent);
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: clamp(240px, 30vw, 360px); height: auto; margin-bottom: clamp(24px, 3.5vw, 36px); }
.hero__title { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 700; max-width: 17ch; line-height: 1.04; letter-spacing: -.035em; }
.hero__title em { font-style: normal; color: var(--mint); display: block; }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.hero__title .w > span { display: inline-block; }
.hero__sub { margin-top: 1.2rem; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: rgb(255 255 255 / .8); max-width: 46ch; }
@media (prefers-reduced-motion: no-preference) {
  .hero__logo { animation: logo-in 900ms var(--ease-out) both; }
  .hero__title .w > span { animation: word-up 800ms var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 55ms); }
  .hero__sub { animation: fade-up 700ms 520ms var(--ease-out) both; }
  .lead--hero { animation: fade-up 800ms 640ms var(--ease-out) both; }
}
@keyframes logo-in { from { transform: translateY(12px) scale(.96); } }
@keyframes word-up { from { transform: translateY(105%); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Formulario ---------- */
.lead {
  background: var(--surface); color: var(--text); border-radius: var(--r-card);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-lg); text-align: left;
}
.lead--hero { width: 100%; max-width: 640px; margin-top: clamp(24px, 3.5vw, 36px); }
.lead__head { text-align: center; }
.lead__title { font-size: 1.4rem; font-weight: 700; }
.lead__intro { color: var(--muted); font-size: .96rem; margin-top: .3rem; }
.lead form { display: grid; gap: 14px; margin-top: 16px; }

/* Selector de modo: asesor o contratación propia */
.lead-switch { margin-top: 18px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); isolation: isolate; }
.seg__thumb {
  position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: var(--r-pill); background: var(--brand); box-shadow: 0 6px 16px -8px rgb(1 64 68 / .7);
  transition: transform 300ms var(--ease-out);
}
.lead-switch[data-mode="contrato"] .seg__thumb { transform: translateX(100%); }
.seg__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 10px;
  border: 0; background: none; border-radius: var(--r-pill); cursor: pointer; color: var(--muted);
  font: 600 .95rem var(--font-display); transition: color 200ms ease;
}
.seg__btn .icon { width: 1.1em; height: 1.1em; }
.seg__btn[aria-selected="true"] { color: #fff; }
.seg__btn[aria-selected="true"] .icon { color: var(--mint); }
.seg__btn:active { transform: scale(.98); }
.seg__intro { margin-top: 14px; text-align: center; color: var(--muted); font-size: .92rem; }
@media (prefers-reduced-motion: no-preference) { .seg__panel:not([hidden]) { animation: fade-up 320ms var(--ease-out); } }
@media (prefers-reduced-motion: reduce) { .seg__thumb { transition: none; } }
@media (max-width: 400px) { .seg__btn { font-size: .84rem; gap: 6px; } .seg__btn .icon { display: none; } }
.lead--hero form, .lead--final form, .modal .lead form { grid-template-columns: 1fr 1fr; }
.lead form > .field--full, .lead form > button, .lead form > .lead__trust { grid-column: 1 / -1; }
.lead form > * { min-width: 0; }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: var(--r-input);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: 400 1rem var(--font-body); transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 20%, transparent); }
.field.is-invalid input, .field.is-invalid .drop { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .85rem; }
.field__error:empty { display: none; }
.drop {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1.5px dashed var(--border); border-radius: var(--r-input); background: var(--surface-2);
  cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease;
}
.drop:hover, .drop.is-drag { border-color: var(--accent-strong); }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--mint); flex: none; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .drop:hover .drop__icon { transform: translateY(-2px); } }
.drop__text { font-size: .92rem; line-height: 1.35; min-width: 0; }
.drop__text strong { display: block; }
.drop__text span { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.drop.has-file { border-style: solid; border-color: var(--accent-strong); }
.field label.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--muted); line-height: 1.45; font-weight: 400; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.consent a { color: var(--text); }
.hp { position: absolute; left: -9999px; }
.lead__trust { display: flex; align-items: center; gap: 8px; justify-content: center; font-size: .82rem; color: var(--muted); }
.lead__trust .icon { color: var(--accent-strong); }
@media (max-width: 560px) {
  .lead--hero form, .lead--final form, .modal .lead form { grid-template-columns: 1fr; }
}

/* ---------- Banda de logos ---------- */
.logos { padding: 40px 0 8px; text-align: center; }
.logos__head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
.logos__label { font: 500 .92rem var(--font-display); color: var(--muted); }
.marquee__toggle { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; transition: transform 160ms var(--ease-out); }
.marquee__toggle .icon { width: 14px; height: 14px; }
.marquee__toggle:active { transform: scale(.94); }
.marquee.is-paused .marquee__track { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .marquee__toggle { display: none; } }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; }
.marquee__group { display: flex; gap: 14px; padding-right: 14px; }
.marquee__item { width: 168px; height: 72px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.marquee__item img { max-width: 118px; max-height: 34px; width: auto; height: auto; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { width: auto; justify-content: center; }
  .marquee__group { flex-wrap: wrap; justify-content: center; padding: 0 16px; }
  .marquee__group[aria-hidden] { display: none; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section__head { max-width: 720px; margin: 0 auto clamp(28px, 4vw, 44px); text-align: center; }
.section__head h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 700; }
.section__head p { margin: .9rem auto 0; color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: .8rem; }

/* ---------- Comparador ---------- */
.controls {
  max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 26px; box-shadow: var(--shadow);
}
.range { display: grid; gap: 8px; }
.range__top { display: flex; justify-content: space-between; align-items: baseline; font-size: .92rem; font-weight: 600; }
.range output { font: 700 1.15rem var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); }
.range input { width: 100%; accent-color: var(--brand); height: 28px; }
:root[data-theme="dark"] .range input { accent-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .range input { accent-color: var(--accent); } }
.range small { color: var(--muted); font-size: .8rem; }
.updated { max-width: 860px; margin: 16px auto 32px; text-align: center; font-size: .86rem; color: var(--muted); }
.updated .icon { color: var(--accent-strong); vertical-align: -3px; margin-right: 6px; }
@media (max-width: 700px) { .controls { grid-template-columns: 1fr; gap: 18px; padding: 18px; } }

.ranking-wrap { container-type: inline-size; max-width: 920px; margin: 0 auto; }
.ranking { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.logo-tile { width: 132px; height: 64px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.logo-tile img { max-width: 104px; max-height: 32px; width: auto; height: auto; object-fit: contain; }
.offer {
  position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) max-content max-content; gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px 22px;
  transition: border-color 200ms ease, box-shadow 250ms ease;
}
@media (hover: hover) and (pointer: fine) { .offer:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); box-shadow: var(--shadow); } }
.offer__name { font: 700 1.1rem var(--font-display); letter-spacing: -.01em; }
.offer__tariff { color: var(--muted); font-size: .9rem; }
.offer__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.offer__prices { display: grid; grid-template-columns: repeat(3, max-content); justify-content: start; gap: 4px 18px; font-size: .8rem; color: var(--muted); }
.offer__prices b { display: block; white-space: nowrap; color: var(--text); font: 600 .98rem var(--font-display); font-variant-numeric: tabular-nums; }
.offer__cost { text-align: right; }
.offer__cost .amount { font: 700 1.75rem var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.offer__cost .per { color: var(--muted); font-size: .8rem; display: block; }
.offer__cost .btn { margin-top: 8px; min-height: 42px; padding-inline: 1.2rem; font-size: .92rem; }
.offer--quote .offer__cost .amount { font-size: 1.1rem; }
.offer--top {
  border: 2px solid var(--accent); padding-top: 32px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface) 70%);
  box-shadow: var(--shadow);
}
.offer__badge {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--brand); color: #fff; font: 600 .8rem var(--font-display); padding: 6px 14px 6px 10px; border-radius: var(--r-pill);
  box-shadow: 0 8px 20px -10px rgb(1 64 68 / .8);
}
.offer__badge .icon { color: var(--mint); }
.offer--top .offer__cost .amount { color: var(--brand); }
:root[data-theme="dark"] .offer--top .offer__cost .amount { color: var(--mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .offer--top .offer__cost .amount { color: var(--mint); } }
.rank-sep { text-align: center; font: 500 .88rem var(--font-display); color: var(--muted); margin: 18px 0 4px; }
.offer__est { font-size: .75rem; color: var(--muted); text-align: center; }
@container (max-width: 820px) {
  .offer { grid-template-columns: auto 1fr; gap: 14px 16px; padding: 18px; }
  .offer--top { padding-top: 32px; }
  .offer__prices { grid-column: 1 / -1; }
  .offer__cost { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .offer__cost .btn { margin-top: 0; }
}
@container (max-width: 520px) {
  .offer { grid-template-columns: 1fr; }
  .logo-tile { width: 140px; height: 56px; }
  .offer__prices { grid-template-columns: 1fr 1fr; }
}

/* ---------- Ahorro + pasos ---------- */
.savings { background: var(--surface); border-block: 1px solid var(--border); }
.savings__num { color: var(--eyebrow); font-variant-numeric: tabular-nums; white-space: nowrap; }
:root[data-theme="dark"] .savings__num { color: var(--mint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .savings__num { color: var(--mint); } }
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 980px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; text-align: center; }
.steps::before { /* línea que conecta los pasos: se dibuja al entrar en pantalla */
  content: ""; position: absolute; top: 32px; left: 16.66%; right: 16.66%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--mint)); transform-origin: left; border-radius: 2px;
}
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.steps__ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--mint); box-shadow: 0 0 0 8px var(--surface); margin-bottom: 8px; }
.steps__ic .icon { width: 28px; height: 28px; }
.steps h3 { font-size: 1.2rem; font-weight: 700; }
.steps p { color: var(--muted); max-width: 30ch; }
@media (prefers-reduced-motion: no-preference) {
  .js .steps::before { transform: scaleX(0); transition: transform 1200ms var(--ease-in-out) 200ms; }
  .js .steps.is-in::before { transform: scaleX(1); }
  .js .steps li { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  .js .steps.is-in li { opacity: 1; transform: none; }
  .js .steps.is-in li:nth-child(2) { transition-delay: 350ms; }
  .js .steps.is-in li:nth-child(3) { transition-delay: 700ms; }
}
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { top: 32px; bottom: 32px; left: 50%; right: auto; width: 2px; height: auto; transform-origin: top; background: linear-gradient(180deg, var(--accent), var(--mint)); }
  .js .steps::before { transform: scaleY(0); }
  .js .steps.is-in::before { transform: scaleY(1); }
  .steps li { background: var(--surface); padding-bottom: 8px; }
}

/* ---------- Precio PVPC ---------- */
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-strong); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent-strong); opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .pulse::after { animation: pulse 2s var(--ease-out) infinite; } }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(3); opacity: 0; } }
.live__grid { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; max-width: 1040px; margin: 0 auto; }
.live__now { background: linear-gradient(160deg, var(--brand-2), var(--brand) 55%, var(--brand-ink)); color: #fff; border-radius: var(--r-card); padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.live__label { font: 500 .95rem var(--font-display); color: rgb(255 255 255 / .82); }
.live__price { font: 700 clamp(2.8rem, 5vw, 3.6rem)/1 var(--font-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.live__price small { font: 500 1rem var(--font-body); color: rgb(255 255 255 / .75); letter-spacing: 0; }
.live__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.live__stat { background: rgb(255 255 255 / .08); border-radius: 12px; padding: 10px 12px; font-size: .8rem; color: rgb(255 255 255 / .75); }
.live__stat b { display: block; color: #fff; font: 600 1rem var(--font-display); font-variant-numeric: tabular-nums; }
.live__now.is-stale .live__price { opacity: .55; }
.chart { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chart__bars { --n: 24; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: end; gap: 4px; height: 230px; }
.bar { position: relative; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); min-height: 4px; transform-origin: bottom; }
.bar.is-cheap { background: var(--accent-strong); }
.bar.is-high { background: color-mix(in srgb, #e5484d 70%, var(--surface-2)); }
.bar.is-now { outline: 2px solid var(--text); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .bar:hover::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    background: var(--text); color: var(--bg); font-size: .75rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; white-space: nowrap; z-index: 2;
  }
}
@media (prefers-reduced-motion: no-preference) { .chart.is-ready .bar { animation: grow 700ms var(--ease-out) both; animation-delay: calc(var(--i) * 18ms); } }
@keyframes grow { from { transform: scaleY(0); } }
.chart__axis { --n: 24; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; font-size: .7rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; overflow: hidden; }
.chart__axis span { white-space: nowrap; }
.chart__axis span:nth-child(odd) { visibility: hidden; }
@media (max-width: 600px) { .chart__axis span:nth-child(odd), .chart__axis span:not(:nth-child(3n+1)) { visibility: hidden; } .chart__axis span:nth-child(3n+1) { visibility: visible; overflow: visible; } }
.chart__legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .82rem; color: var(--muted); }
.chart__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.skeleton { background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: breathe 1.4s ease-in-out infinite alternate; } }
@keyframes breathe { to { opacity: .45; } }
.chart__error { color: var(--muted); font-size: .9rem; }
.chart__details summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--eyebrow); width: fit-content; }
.chart__details table { margin-top: 12px; width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.chart__details tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 16px; }
.chart__details thead { display: none; }
.chart__details tr { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 900px) { .live__grid { grid-template-columns: 1fr; } .chart__bars { height: 170px; gap: 2px; } .chart__axis { gap: 2px; } }

/* ---------- Por qué Solareia (bento) ---------- */
.bento { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: auto auto; gap: 14px; max-width: 1040px; margin: 0 auto; }
.tile { border-radius: var(--r-card); padding: 26px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.tile h3 { font-size: 1.22rem; font-weight: 700; }
.tile p { color: var(--muted); font-size: .98rem; }
.tile > .icon { width: 30px; height: 30px; color: var(--accent-strong); }
.tile--brand {
  grid-row: span 2; justify-content: flex-end; min-height: 340px; border: 0; color: #fff; position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 70% at 20% 0%, rgb(96 196 149 / .35), transparent 60%), linear-gradient(160deg, var(--brand-2), var(--brand) 50%, var(--brand-deep));
}
.tile--brand .brand__mark--xl { position: absolute; top: 26px; left: 26px; }
.tile--brand h3 { font-size: 1.6rem; }
.tile--brand p { color: rgb(255 255 255 / .8); }
.tile__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--mint); font: 600 1.05rem var(--font-display); text-decoration: none; }
.tile--wide { grid-column: 2 / -1; flex-direction: row; align-items: center; gap: 16px; background: var(--surface-2); }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .tile--brand { grid-row: auto; min-height: 280px; }
  .tile--wide { grid-column: auto; flex-direction: column; align-items: flex-start; }
}

/* ---------- Guía ---------- */
.guide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 1040px; margin: 0 auto; }
.guide article { padding: 26px 26px 26px 30px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.guide article::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--accent), var(--mint)); }
.guide h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.guide p { color: var(--muted); }
@media (max-width: 760px) { .guide { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; transition: border-color 200ms ease, box-shadow 200ms ease; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font: 600 1.05rem var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 250ms var(--ease-out); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .faq details[open] p { animation: fade-up 300ms var(--ease-out); } }

/* ---------- CTA final ---------- */
.section--final { padding-top: 0; }
.final {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #025a5f 0%, var(--brand) 40%, var(--brand-deep) 100%);
  border-radius: 32px; padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 64px);
  display: flex; flex-direction: column; align-items: center;
}
.final__copy h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 700; }
.final__copy h2 em { font-style: normal; color: var(--mint); display: block; }
.final__copy p { color: rgb(255 255 255 / .82); margin: 1rem auto 0; max-width: 46ch; font-size: 1.08rem; }
.lead--final { width: 100%; max-width: 640px; margin-top: 32px; }
.final__contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 28px; }
.final__contact a { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 1.02rem var(--font-display); }
.final__contact .icon { color: var(--mint); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 72px); background: var(--brand-deep); color: rgb(255 255 255 / .72); font-size: .9rem; text-align: center; padding-bottom: 96px; }
.site-footer .wrap { padding-block: 56px 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer__logo { width: 240px; height: auto; }
.footer__claim { max-width: 52ch; }
.footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.footer__links--legal { padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .12); width: 100%; max-width: 720px; }
.site-footer a { color: rgb(255 255 255 / .82); text-decoration: none; }
.site-footer a:hover { color: var(--mint); }
.footer__addr { color: rgb(255 255 255 / .6); }
.footer__legal { font-size: .78rem; color: rgb(255 255 255 / .55); max-width: 72ch; }

/* ---------- Modales ---------- */
dialog.modal {
  width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0;
  border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: 0 40px 80px -20px rgb(0 0 0 / .5);
}
dialog.modal::backdrop { background: rgb(1 28 30 / .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: no-preference) {
  dialog.modal[open] { animation: pop 280ms var(--ease-out); }
  dialog.modal[open]::backdrop { animation: fade 240ms ease; }
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.modal .lead { box-shadow: none; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform 160ms var(--ease-out); }
.modal__close:active { transform: scale(.94); }
.modal__pick { display: flex; align-items: center; gap: 14px; padding: 12px; margin-top: 14px; border-radius: 14px; background: var(--surface-2); }
.modal__pick .logo-tile { width: 96px; height: 48px; }
.modal__pick .logo-tile img { max-width: 76px; max-height: 24px; }
.modal__pick b { display: block; font-family: var(--font-display); }
.modal__pick span { color: var(--muted); font-size: .88rem; }
dialog.modal--legal { width: min(760px, calc(100vw - 32px)); }
.legal { padding: clamp(24px, 4vw, 40px); padding-top: 28px; }
.legal__title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin: 0 48px 1rem 0; }
.legal h3 { font-size: 1.08rem; margin: 1.6rem 0 .5rem; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: .7rem; }
.thanks { text-align: center; padding: 40px 28px 32px; }
.thanks .icon { width: 64px; height: 64px; color: var(--accent-strong); margin: 0 auto 16px; }
.thanks h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 700; }
.thanks p { color: var(--muted); margin: 1rem auto 1.6rem; max-width: 48ch; }

/* ---------- Revelado al hacer scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* Teléfonos estrechos: menos padding anidado */
@media (max-width: 420px) {
  .final { padding: 32px 14px; border-radius: 24px; }
  .lead { padding: 18px 14px; }
  .btn { white-space: normal; text-align: center; line-height: 1.2; padding-inline: 1rem; }
}
