/* =========================================================
   SOL.LUZ · Sistema de diseño
   Editorial + tecnología + arquitectura contemporánea.
   Mobile first. Tokens primero, componentes después.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Color */
  --forest-950: #08201a;
  --forest-900: #0e2a23;
  --forest-800: #153a30;
  --navy-950: #071322;
  --navy-900: #0a1a2f;
  --navy-700: #1b3150;
  --paper: #faf8f3;          /* blanco cálido */
  --paper-2: #f2efe7;        /* gris cálido para fondos alternos */
  --white: #ffffff;
  --emerald: #1fb586;        /* acento: botones, indicadores */
  --emerald-soft: #8fe3c6;
  --emerald-ink: #0a7a55;    /* texto verde sobre claro (≥ 4.5:1) */
  /* Amarillo solar: SOLO acento. Texto amarillo únicamente sobre verde/azul oscuro (≥ 9:1).
     Sobre blanco o papel es decorativo (1,5:1); para texto sobre claro usar --sun-ink (≥ 6:1). */
  --sun: #ffc530;
  --sun-ink: #7a5a00;
  --paper-warm: #f6efe2;     /* tono cálido para secciones alternas */
  --ink: #0a1a2f;
  --ink-2: #4e5660;          /* texto secundario (≥ 5:1 sobre paper) */
  --line: #e2ded4;
  --line-strong: #6e747b;    /* borde de campos (≥ 3:1) */
  --line-dark: rgba(255, 255, 255, .16);
  --on-dark: #ffffff;
  --on-dark-2: rgba(255, 255, 255, .82);
  --warn-bg: #fff4dc; --warn-line: #e8c77a; --warn-ink: #6a4a00;
  --error: #b42318;

  /* Tipografía */
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-ui: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-display: clamp(2.6rem, 1.3rem + 6.2vw, 6.6rem);
  --fs-h2: clamp(2rem, 1.3rem + 2.8vw, 3.6rem);
  --fs-h3: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
  --fs-lead: clamp(1.06rem, 1rem + .35vw, 1.25rem);
  --fs-small: .875rem;
  --fs-micro: .75rem;

  /* Espacio (escala 4/8) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --section: clamp(72px, 10vw, 136px);
  --gutter: 16px;

  /* Forma */
  --r-1: 4px; --r-2: 12px; --r-3: 24px;
  --sh-1: 0 1px 2px rgba(10, 26, 47, .06);
  --sh-2: 0 12px 32px -16px rgba(10, 26, 47, .22);
  --sh-3: 0 40px 80px -40px rgba(10, 26, 47, .45);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 64px;
  --bar-h: 0px;              /* barra inferior móvil */
}
@media (max-width: 899px) { :root { --bar-h: 64px; } }
@media (max-width: 399px) { :root { --bar-h: 80px; } }
@media (min-width: 600px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; font-family: var(--f-ui); font-size: 1rem; line-height: 1.6; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; padding-bottom: var(--bar-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.06; letter-spacing: -.02em; font-weight: 400; }
h2 { font-family: var(--f-display); font-size: var(--fs-h2); font-variation-settings: "opsz" 144; }
h3 { font-family: var(--f-ui); font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0 0 1em; }
em { font-style: italic; }
[hidden] { display: none !important; }
section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 12px); }
::selection { background: var(--emerald-soft); color: var(--navy-950); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--emerald-ink); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible, .on-dark:focus-visible { outline-color: var(--emerald-soft); }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--white); padding: 12px 16px; border-radius: var(--r-1); box-shadow: var(--sh-2); }
.skip:focus { top: 12px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dark { background: var(--forest-900); color: var(--on-dark); }
.dark p { color: var(--on-dark-2); }
/* Tarjetas claras dentro de secciones oscuras (formulario, revisión): vuelven al texto oscuro */
.dark .form p, .dark .review p { color: var(--ink-2); }
.dark .form .form__group { color: var(--ink); }
.navy { background: var(--navy-900); color: var(--on-dark); }

/* ---------- 3. Tipografía de apoyo ---------- */
/* Antetítulo: texto normal con un pequeño «sol» amarillo (detalle propio de la marca) */
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 var(--s-4);
  font-family: var(--f-ui); font-size: .92rem; font-weight: 600; letter-spacing: 0; color: var(--emerald-ink);
}
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(255, 197, 48, .22); flex: none; }
.dark .kicker, .navy .kicker { color: var(--emerald-soft); }
.lead { font-size: var(--fs-lead); color: var(--ink-2); max-width: 38rem; }
.dark .lead, .navy .lead { color: var(--on-dark-2); }
.display-em { font-style: italic; font-weight: 300; color: var(--emerald-ink); }
.dark .display-em, .navy .display-em { color: var(--emerald-soft); }
.hero .display-em { color: var(--sun); }

/* ---------- 4. Botones y enlaces ---------- */
.btn {
  --bg: var(--emerald); --fg: var(--navy-950); --bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px; border-radius: var(--r-1); border: 1px solid var(--bd);
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; text-align: center; cursor: pointer; line-height: 1.2;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn .arr { transition: transform .25s var(--ease); }
@media (hover: hover) { .btn:hover .arr { transform: translateX(4px); } }
.btn:active { transform: translateY(1px); }
.btn.is-done { --bg: var(--sun); --fg: var(--navy-950); --bd: var(--sun); }
.btn--primary:hover { --bg: #36c897; }
.btn--line { --bg: transparent; --fg: var(--ink); --bd: var(--ink); }
.btn--line:hover { --bg: var(--ink); --fg: var(--paper); }
.btn--line-light { --bg: transparent; --fg: var(--white); --bd: rgba(255, 255, 255, .7); }
.btn--line-light:hover { --bg: var(--white); --fg: var(--navy-950); }
.btn--light { --bg: var(--paper); --fg: var(--navy-950); }
.btn--light:hover { --bg: var(--white); }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: .875rem; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--emerald-ink);
  text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s var(--ease);
  min-height: 44px;
}
.link:hover { background-size: 100% 1px; }
.dark .link, .navy .link { color: var(--emerald-soft); }
.linklike { background: none; border: 0; padding: 0; color: var(--emerald-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- 5. Cabecera ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); color: var(--white); transition: background .3s, color .3s, box-shadow .3s; }
.nav.is-solid { background: rgba(250, 248, 243, .94); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: var(--s-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-mono); font-weight: 600; font-size: 1.05rem; letter-spacing: .04em; min-height: 44px; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand .b-sun { fill: var(--sun); }
.brand .b-ray { stroke: var(--sun); stroke-width: 1.6; stroke-linecap: round; fill: none; }
/* Sobre fondo claro el sol del logo necesita un contorno para verse */
.nav.is-solid .brand .b-sun, .page .brand .b-sun { stroke: var(--sun-ink); stroke-width: .8; }
.nav.is-solid .brand .b-ray, .page .brand .b-ray { stroke: #e0a800; }
.brand b { color: var(--emerald); font-weight: 600; }
.nav.is-solid .brand b { color: var(--emerald-ink); }
.nav__links { list-style: none; margin: 0; padding: 0; display: none; }
.nav__links a { text-decoration: none; font-size: .925rem; font-weight: 500; padding: 10px 2px; display: inline-block; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__tel { display: none; }
.nav__burger {
  margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-1); border: 1px solid currentColor; background: transparent;
  display: grid; place-content: center; gap: 6px; cursor: pointer; color: inherit;
}
.nav__burger span { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .25s; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.nav__links.is-open {
  display: flex; flex-direction: column; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; padding: var(--s-5) var(--gutter);
  background: var(--paper); color: var(--ink); overflow-y: auto; border-top: 1px solid var(--line);
}
.nav__links.is-open li { border-bottom: 1px solid var(--line); }
.nav__links.is-open a { display: block; padding: 18px 0; font-family: var(--f-display); font-size: 1.75rem; }
.nav__links.is-open a::after { display: none; }
html.menu-open { overflow: hidden; }
html.menu-open .nav { background: var(--paper); color: var(--ink); }
@media (min-width: 900px) {
  .nav__links { display: flex; gap: 28px; margin-left: auto; }
  .nav__tel { display: inline-flex; }
  .nav__burger { display: none; }
}

/* ---------- 6. Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--white); background: var(--forest-950); overflow: hidden; padding: calc(var(--header-h) + 48px) 0 56px; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media .ph { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.hero__media img { transform: scale(1.06); animation: settle 2.4s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 32, 26, .7) 0%, rgba(8, 32, 26, .25) 38%, rgba(8, 32, 26, .9) 82%), linear-gradient(90deg, rgba(8, 32, 26, .55), transparent 70%); }
.hero__line { position: absolute; z-index: -1; right: -10%; top: 14%; width: min(720px, 140vw); opacity: .55; pointer-events: none; }
.hero__line path { fill: none; stroke: var(--emerald-soft); stroke-width: 1; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: drawline 2.6s .4s var(--ease) forwards; }
.hero__line circle { fill: var(--emerald-soft); opacity: 0; animation: fadein .8s 2.6s forwards; }
@keyframes drawline { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
.hero__title { font-family: var(--f-display); font-weight: 300; font-size: var(--fs-display); line-height: .96; letter-spacing: -.035em; font-variation-settings: "opsz" 144; margin-bottom: var(--s-5); }
.hero__title span { display: block; }
.hero__title { font-size: clamp(3.1rem, 1.6rem + 7vw, 7.2rem); }
.hero__lead { font-size: var(--fs-lead); color: var(--on-dark-2); max-width: 30rem; margin-bottom: var(--s-6); }
.hero__actions { display: grid; gap: var(--s-3); max-width: 520px; }
.hero__meta { list-style: none; padding: 0; margin: var(--s-7) 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-2); }
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta li::before { content: ""; width: 6px; height: 6px; background: var(--sun); border-radius: 50%; }
.hero__note { margin-top: var(--s-5); font-size: var(--fs-micro); color: rgba(255, 255, 255, .7); }
/* Visible por defecto; la animación solo decora (si no se ejecuta, el texto se ve igual) */
.hero .enter { animation: enter .9s var(--ease) backwards; }
.hero .enter:nth-child(2) { animation-delay: .1s; } .hero .enter:nth-child(3) { animation-delay: .2s; } .hero .enter:nth-child(4) { animation-delay: .3s; } .hero .enter:nth-child(5) { animation-delay: .4s; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } }
@media (min-width: 600px) { .hero__actions { grid-template-columns: auto auto; justify-content: start; } }
@media (min-width: 900px) { .hero { align-items: center; padding-bottom: 80px; } .hero__line { right: 2%; } }

/* Hero: imagen, rejilla y entrada rápida */
.hero__actions { align-items: center; }
.hero__link { color: var(--white); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(255, 197, 48, .8); text-underline-offset: 5px; text-decoration-thickness: 2px; padding: 10px 4px; justify-self: start; }
.hero__link:hover { text-decoration-color: var(--sun); color: var(--sun); }
.hero__media picture, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: end; width: 100%; }
.hero__quick {
  border: 0; border-top: 3px solid var(--sun); background: var(--navy-900);
  border-radius: 0 0 var(--r-2) var(--r-2); padding: var(--s-5); max-width: 420px; color: var(--white);
}
.hero__quick-k { font-size: .85rem; font-weight: 600; color: var(--sun); margin: 0 0 var(--s-2); }
.hero__quick label { display: block; font-family: var(--f-display); font-weight: 300; font-size: 1.45rem; line-height: 1.15; margin-bottom: var(--s-4); }
.hero__quick-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2); }
.hero__quick-in { position: relative; }
.hero__quick-in input {
  width: 100%; height: 52px; border-radius: var(--r-1); border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .08);
  color: var(--white); font: 600 1.15rem var(--f-ui); padding: 0 40px 0 16px; -moz-appearance: textfield; appearance: textfield;
}
.hero__quick-in input::-webkit-outer-spin-button, .hero__quick-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hero__quick-in input::placeholder { color: rgba(255, 255, 255, .5); }
.hero__quick-in input:focus { outline: 2px solid var(--emerald-soft); outline-offset: 2px; border-color: transparent; }
.hero__quick-in span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--on-dark-2); font-weight: 600; }
.hero__quick .btn { height: 52px; }
.hero__quick-help { font-size: var(--fs-micro); color: var(--on-dark-2); margin: var(--s-3) 0 0; }
.hero__quick-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid rgba(255, 255, 255, .14); }
.hero__quick-links a { color: var(--white); font-size: var(--fs-small); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); padding: 6px 0; }
.hero__quick-links a:hover { border-color: var(--emerald-soft); }
.hero__credit { position: absolute; right: var(--gutter); bottom: 14px; margin: 0; font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.hero .kicker { color: var(--white); text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
@media (max-width: 999px) {
  .hero__shade { background: linear-gradient(180deg, rgba(8, 32, 26, .78) 0%, rgba(8, 32, 26, .62) 45%, rgba(8, 32, 26, .9) 75%); }
  .hero__lead, .hero__meta { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
}
@media (max-width: 599px) {
  .hero { padding-bottom: 40px; }
  .hero__actions .btn { white-space: normal; text-align: center; justify-content: center; line-height: 1.25; }
  .hero__grid { gap: var(--s-6); }
  .hero__quick { padding: var(--s-4); max-width: none; }
  .hero__quick label { font-size: 1.2rem; margin-bottom: var(--s-3); }
  .hero__meta { margin-top: var(--s-5); }
  .hero__credit { bottom: 8px; }
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-8); }
  .hero__quick { justify-self: end; margin-bottom: 8px; }
}

/* Resultados: nota y acciones */
.blk__note { font-size: var(--fs-small); color: var(--ink-2); margin: var(--s-3) 0 0; }
.res-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-5); }
.res-actions small { color: var(--ink-2); font-size: var(--fs-micro); flex: 1 1 220px; }
.print-only { display: none; }
/* Teléfonos: nunca partidos en dos líneas */
a[href^="tel:"], [data-cfg="telefono"], [data-cfg="telefonoIntl"] { white-space: nowrap; }
.faq__aside h2 { margin-bottom: var(--s-4); }
@media (min-width: 900px) { #form-rapido { position: sticky; top: calc(var(--header-h) + 16px); } }

/* ---------- 7. Secciones ---------- */
.section { padding: var(--section) 0; position: relative; }
.section--alt { background: var(--paper-2); }
.head { margin-bottom: var(--s-7); max-width: 820px; }
.head--split { max-width: none; display: grid; gap: var(--s-5); align-items: end; }
.head--center { text-align: center; margin-inline: auto; }
.head--center .kicker { justify-content: center; }
.head--center .lead { margin-inline: auto; }
@media (min-width: 900px) { .head--split { grid-template-columns: 1.3fr 1fr; gap: var(--s-8); } }

/* Revelado al hacer scroll (solo opacidad + 12 px) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 8. Beneficios (rejilla con filetes) ---------- */
/* Beneficios: una frase grande + tres puntos en línea (en vez de tarjetas numeradas) */
.statement { font-family: var(--f-display); font-weight: 300; font-size: clamp(2rem, 1.2rem + 3.6vw, 4.2rem); line-height: 1.06; letter-spacing: -.025em; max-width: 20ch; margin: 0 0 var(--s-8); font-variation-settings: "opsz" 144; }
.statement__em { font-style: italic; color: var(--emerald-ink); background: linear-gradient(transparent 72%, rgba(255, 197, 48, .45) 72%, rgba(255, 197, 48, .45) 92%, transparent 92%); }
.points { display: grid; gap: var(--s-6); }
.points > div { border-top: 2px solid var(--ink); padding-top: var(--s-4); }
.points h3 { font-size: 1.15rem; margin: 0 0 var(--s-2); }
.points p { margin: 0; color: var(--ink-2); max-width: 38ch; }
@media (min-width: 800px) { .points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7); } }
.ruled { display: grid; border-top: 1px solid var(--line); }
.ruled > * { padding: var(--s-6) 0; border-bottom: 1px solid var(--line); }
.ruled .num { font-family: var(--f-mono); font-size: var(--fs-micro); color: var(--emerald-ink); letter-spacing: .1em; display: block; margin-bottom: var(--s-4); }
.ruled h3 { margin-bottom: var(--s-3); }
.ruled p { color: var(--ink-2); margin: 0; max-width: 34ch; }
@media (min-width: 700px) {
  .ruled { grid-template-columns: repeat(2, 1fr); }
  .ruled > * { padding: var(--s-6) var(--s-6) var(--s-6) 0; }
  .ruled > *:nth-child(2n) { padding-left: var(--s-6); border-left: 1px solid var(--line); }
}
@media (min-width: 1100px) {
  .ruled { grid-template-columns: repeat(4, 1fr); }
  .ruled > * { padding: var(--s-6) var(--s-5) var(--s-7); }
  .ruled > *:not(:first-child) { border-left: 1px solid var(--line); }
  .ruled > *:first-child { padding-left: 0; }
}

/* ---------- 9. Autoconsumo explicado ---------- */
.flow { display: grid; gap: var(--s-6); align-items: center; }
.flow__switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-1); padding: 3px; margin-bottom: var(--s-5); }
.flow__switch button { min-height: 44px; padding: 0 18px; border: 0; background: none; border-radius: 2px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.flow__switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.flow__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.flow__steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--ink-2); }
.flow__steps b { color: var(--ink); }
.flow__steps .dotn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: .75rem; background: var(--forest-900); color: var(--white); }
.diagram { width: 100%; height: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-2); }
.diagram .d-label { font-family: var(--f-mono); font-size: 11px; fill: var(--ink-2); letter-spacing: .04em; }
.diagram .d-strong { font-family: var(--f-ui); font-size: 13px; font-weight: 600; fill: var(--ink); }
.diagram .d-box { fill: var(--paper); stroke: var(--line-strong); stroke-width: 1; }
.diagram .d-path { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.diagram .d-flow { fill: none; stroke: var(--emerald); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 10; animation: flowdash 1.2s linear infinite; }
.diagram .d-flow--grid { stroke: var(--navy-700); }
.diagram .d-flow--bat { stroke: #c08a12; }
.diagram .d-sun { fill: var(--sun); stroke: #e0a800; stroke-width: 1; transition: opacity .4s; }
.diagram .d-moon { fill: var(--navy-700); transition: opacity .4s; }
.diagram [data-when] { transition: opacity .4s; }
.diagram.is-night [data-when="day"], .diagram:not(.is-night) [data-when="night"] { opacity: 0; }
@keyframes flowdash { to { stroke-dashoffset: -24; } }
@media (min-width: 900px) { .flow { grid-template-columns: .9fr 1.1fr; gap: var(--s-8); } }

/* ---------- 10. Sobre SOL.LUZ ---------- */
.about { display: grid; gap: var(--s-7); align-items: center; }
.about__facts { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; border-top: 1px solid var(--line-dark); }
.about__facts li { display: grid; grid-template-columns: 120px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line-dark); }
.about__facts span { font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-soft); padding-top: 3px; }
.about__facts b { font-weight: 500; color: var(--white); }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-9); align-items: start; } .about h2 { font-size: clamp(2.6rem, 1.4rem + 3vw, 4.4rem); line-height: 1.02; } }
.about h2 .display-em { color: var(--sun); }

/* ---------- 11. Imágenes provisionales ---------- */
.ph {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--r-2); aspect-ratio: 4 / 3; isolation: isolate;
  background: radial-gradient(90% 70% at 85% 10%, rgba(31, 181, 134, .28), transparent 60%), linear-gradient(160deg, var(--forest-800), var(--navy-950));
}
.ph::before {
  content: ""; position: absolute; inset: 40% -10% -30% 20%; z-index: -1; opacity: .7;
  background-image: linear-gradient(rgba(143, 227, 198, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 227, 198, .2) 1px, transparent 1px);
  background-size: 30px 19px; transform: perspective(520px) rotateX(56deg) rotateZ(-16deg);
}
.ph::after { content: attr(data-label); position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: -1; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.ph img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.ph__note { position: absolute; z-index: 2; left: 10px; top: 10px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 2px; background: rgba(7, 19, 34, .72); color: #fff; }
.ph--tall { aspect-ratio: 4 / 5; }
.ph--wide { aspect-ratio: 16 / 10; }
.hero .ph::after { display: none; }

/* ---------- 12. Servicios ---------- */
.services { display: grid; gap: var(--s-4); }
/* Servicios secundarios: lista con filetes, sin iconos repetidos */
.svc-list { margin: var(--s-7) 0 0; display: grid; border-top: 1px solid var(--line); }
.svc-list > div { display: grid; gap: var(--s-2); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.svc-list dt { font-family: var(--f-display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; }
.svc-list dd { margin: 0; color: var(--ink-2); max-width: 62ch; }
.svc-list .tag { display: inline-block; margin-left: 6px; vertical-align: middle; }
@media (min-width: 800px) { .svc-list > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-7); align-items: baseline; } }
.svc { position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-2); transition: border-color .25s; }
@media (hover: hover) { .svc:hover { border-color: var(--emerald-ink); } }
.svc p { color: var(--ink-2); margin: 0; }
.svc--feature { padding: 0; overflow: hidden; }
.svc--feature .ph { border-radius: 0; }
.svc__body { padding: var(--s-5) var(--s-6) var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.tag { align-self: flex-start; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-ink); border: 1px solid currentColor; padding: 3px 8px; border-radius: 2px; }
.tag--warn { color: var(--warn-ink); background: var(--warn-bg); border-color: var(--warn-line); }
.svc__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-1); background: var(--forest-900); }
.svc__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--emerald-soft); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 700px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .services { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s-6); } .svc--feature + .svc--feature { margin-top: var(--s-9); } }

/* ---------- 13. Proceso ---------- */
.proceso { display: grid; gap: var(--s-7); align-items: start; }
.timeline { list-style: none; counter-reset: s; padding: 0; margin: var(--s-6) 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); opacity: .5; }
.timeline::after { content: ""; position: absolute; left: 15px; top: 6px; width: 1px; height: calc(var(--tl, 0) * (100% - 12px)); background: var(--emerald-ink); }
.timeline li { counter-increment: s; position: relative; padding: 0 0 var(--s-6) 56px; }
.timeline li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; background: var(--paper-2); border: 1px solid var(--emerald-ink); border-radius: 50%; font-family: var(--f-mono); font-size: 11px; color: var(--emerald-ink); }
.timeline b { font-weight: 600; font-size: 1.1rem; }
.timeline p { color: var(--ink-2); margin: 4px 0 0; }
@media (max-width: 899px) { .proceso__media { order: 2; aspect-ratio: 16 / 10; } .proceso__media img { object-position: 50% 35%; } }
@media (min-width: 900px) { .proceso { grid-template-columns: 1fr 1.1fr; gap: var(--s-9); } .proceso__media { position: sticky; top: calc(var(--header-h) + 24px); } }

/* ---------- 14. Formularios (compartido) ---------- */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .label { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req, .opt { font-weight: 400; color: var(--ink-2); font-size: .8rem; }
/* Formulario: qué pasa después + grupos */
.form__next { list-style: none; counter-reset: paso; margin: 0; padding: 0; display: grid; gap: 6px; }
.form__next li { counter-increment: paso; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: baseline; font-size: .92rem; color: var(--ink-2); }
.form__next li::before { content: counter(paso); width: 24px; height: 24px; border-radius: 50%; background: var(--sun); color: var(--navy-950); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.form__next b { color: var(--ink); font-weight: 600; }
.form__group { margin: var(--s-3) 0 -4px; font-weight: 700; font-size: 1rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.form__group small { display: block; font-weight: 400; color: var(--ink-2); font-size: .85rem; }
.input, .field input:not([type="range"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--r-1); border: 1px solid var(--line-strong);
  background: var(--white); font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--emerald-ink); box-shadow: 0 0 0 3px rgba(10, 122, 85, .22); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--error); }
.err { color: var(--error); font-size: .82rem; min-height: 1.2em; display: block; }
.hintbtn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--emerald-ink); background: none; color: var(--emerald-ink); font-family: var(--f-mono); font-size: .8rem; cursor: pointer; padding: 0; position: relative; flex: none; }
.hintbtn::after { content: ""; position: absolute; inset: -8px; }
.hintbtn[aria-expanded="true"] { background: var(--emerald-ink); color: var(--white); }
.hint-box { background: var(--paper-2); border-left: 3px solid var(--emerald-ink); padding: 12px 14px; border-radius: 0 var(--r-1) var(--r-1) 0; font-size: .9rem; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; cursor: pointer; min-height: 44px; padding-top: 2px; }
.check input { width: 22px; height: 22px; accent-color: var(--emerald-ink); flex: none; margin-top: 1px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { flex: 1 1 auto; position: relative; min-width: 72px; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.seg span { display: grid; place-items: center; min-height: 46px; padding: 6px 10px; border-radius: var(--r-1); border: 1px solid var(--line-strong); font-weight: 500; font-size: .9rem; text-align: center; transition: background .15s, color .15s, border-color .15s; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.seg input:focus-visible + span { outline: 2px solid var(--emerald-ink); outline-offset: 2px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; --fill: 50%; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--emerald-ink) var(--fill), var(--line) var(--fill)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--emerald-ink) var(--fill), var(--line) var(--fill)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--white); border: 2px solid var(--emerald-ink); box-shadow: var(--sh-2); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 2px solid var(--emerald-ink); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(10, 122, 85, .3); }
.range-out { font-family: var(--f-mono); font-size: 2rem; line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.range-out small { font-size: .9rem; color: var(--ink-2); letter-spacing: 0; }

/* ---------- 15. Calculadora ---------- */
.section--calc { background: var(--navy-900); color: var(--white); }
.section--calc .lead { color: var(--on-dark-2); }
.section--calc > .wrap > .head .kicker { color: var(--emerald-soft); }
.calc { background: var(--paper); color: var(--ink); border-radius: var(--r-3); overflow: hidden; box-shadow: var(--sh-3); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); background: var(--white); }
.tabs button { min-height: 60px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: .95rem; color: var(--ink-2); position: relative; padding: 0 12px; }
.tabs button small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--emerald); }
.calc__panel { display: grid; grid-template-columns: minmax(0, 1fr); }
.calc__form { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; align-self: start; gap: var(--s-5); padding: var(--s-5) var(--s-4); min-width: 0; }
.calc__grid2, .params__grid, .calc__form fieldset { grid-template-columns: minmax(0, 1fr); }
.calc__form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--s-4); min-width: 0; }
.calc__form legend { font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-ink); margin-bottom: var(--s-3); padding: 0; }
.calc__grid2 { display: grid; gap: var(--s-4); }
.params { border-top: 1px solid var(--line); padding-top: var(--s-4); }
.params summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.params summary::-webkit-details-marker { display: none; }
.params summary::before { content: "+"; font-family: var(--f-mono); width: 20px; color: var(--emerald-ink); }
.params[open] summary::before { content: "−"; }
.params__grid { display: grid; gap: var(--s-4); margin-top: var(--s-4); }
.form-error { color: var(--error); font-weight: 600; margin: 0; }
.upload { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px dashed var(--line-strong); border-radius: var(--r-2); background: var(--white); }
.upload h3 { font-size: 1rem; }
.upload p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.upload__btn { justify-self: start; position: relative; }
.upload__btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload__btn:focus-within { outline: 2px solid var(--emerald-ink); outline-offset: 3px; }
.upload__preview { border-radius: var(--r-1); overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.upload__preview img { width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.upload__preview iframe { width: 100%; height: 480px; border: 0; display: block; }
.upload__preview .rm { display: block; width: 100%; min-height: 44px; border: 0; background: var(--ink); color: var(--white); cursor: pointer; font-weight: 600; }

/* Resultados */
.results { background: var(--white); border-top: 1px solid var(--line); padding: var(--s-5) var(--s-4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-content: start; min-width: 0; }
.blk { min-width: 0; }
.res-top { background: var(--forest-900); color: var(--white); border-radius: var(--r-2); padding: var(--s-5); }
.res-top .k { font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-soft); }
.res-top .big { color: var(--sun); font-family: var(--f-mono); font-size: clamp(2rem, 1.4rem + 3vw, 2.9rem); line-height: 1.05; letter-spacing: -.04em; margin: 8px 0; font-variant-numeric: tabular-nums; }
.res-top p { margin: 0; color: rgba(255, 255, 255, .9); font-size: .95rem; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.kpi { padding: 14px; border-bottom: 1px solid var(--line); }
.kpi:nth-child(odd) { border-right: 1px solid var(--line); }
.kpi small { display: block; font-size: .78rem; color: var(--ink-2); line-height: 1.3; }
.kpi b { display: block; font-family: var(--f-mono); font-weight: 500; font-size: 1.1rem; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi--accent b { color: var(--emerald-ink); }
.blk { border: 1px solid var(--line); border-radius: var(--r-2); padding: var(--s-4); }
.blk h3 { font-family: var(--f-mono); font-weight: 500; line-height: 1.4; font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-ink); margin-bottom: var(--s-3); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-weight: 400; }
.tbl td:last-child, .tbl th:last-child { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl--scen th { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tbl--scen td:not(:first-child), .tbl--scen th:not(:first-child) { text-align: right; font-family: var(--f-mono); padding-left: 8px; white-space: nowrap; }
.tbl--scen .best { color: var(--emerald-ink); font-weight: 600; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.swipe-hint { display: none; font-size: .78rem; color: var(--ink-2); margin: 0 0 6px; }
@media (max-width: 479px) { .swipe-hint { display: block; } .tbl--scen { font-size: .82rem; } }
.assump { font-size: .86rem; color: var(--ink-2); }
.assump ul { margin: 0; padding-left: 18px; }
.assump li { margin-bottom: 4px; }
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: var(--r-1); padding: 12px 14px; font-size: .9rem; }

.chart { width: 100%; max-width: 520px; height: auto; overflow: visible; display: block; }
.res-note { margin: 0; font-size: .92rem; color: var(--ink-2); }
.chart text { fill: var(--ink-2); font-size: 11px; font-family: var(--f-mono); }
.chart .axis { stroke: var(--line); }
.chart .c-now { fill: #9aa3ad; } .chart .c-pv { fill: var(--emerald); } .chart .c-bat { fill: var(--forest-900); }
.chart .val { fill: var(--ink); font-weight: 600; }
.chart .ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln-pv { stroke: var(--emerald); } .chart .ln-bat { stroke: var(--forest-900); }
.chart .cost { stroke-dasharray: 4 4; stroke-width: 1.2; }
.chart .cost-pv { stroke: var(--emerald-ink); } .chart .cost-bat { stroke: var(--forest-900); }
.chart.anim .bar { transform-box: fill-box; transform-origin: bottom; animation: grow .8s var(--ease) both; }
.chart.anim .ln { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.4s var(--ease) forwards; }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.calc__cta { display: grid; gap: var(--s-4); padding: var(--s-5) var(--s-4); background: var(--forest-900); color: var(--white); }
.calc__cta h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); text-transform: none; }
.calc__cta p { margin: 6px 0 0; color: var(--on-dark-2); }
.calc__legal { font-size: .82rem; color: var(--on-dark-2); margin: var(--s-4) 0 0; max-width: 70rem; }
.calc__legal b { color: var(--white); }

@media (min-width: 640px) {
  .calc__form, .results, .calc__cta { padding-left: var(--s-6); padding-right: var(--s-6); }
  .calc__grid2, .params__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .calc__grid2 .full { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(odd) { border-right: 0; } .kpi:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
}
@media (min-width: 1000px) {
  .calc__panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .calc__panel .upload-wrap { grid-column: 1 / -1; }
  .results { border-top: 0; border-left: 1px solid var(--line); }
  .calc__cta { grid-template-columns: 1fr auto; align-items: center; padding: var(--s-6) var(--s-7); }
}

/* ---------- 16. Proyectos ---------- */
.note-demo { font-size: .9rem; color: var(--ink-2); border-left: 2px solid var(--warn-line); padding: 4px 0 4px 14px; margin: 0; max-width: 46ch; }
.slider__track { display: flex; gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: var(--s-4); margin: 0 calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.slider__track::-webkit-scrollbar { display: none; }
.proj { flex: 0 0 84%; scroll-snap-align: start; margin: 0; }
.proj .ph { margin-bottom: var(--s-4); }
.proj h3 { font-size: 1.1rem; margin-bottom: 4px; }
.proj p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.slider__nav { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.slider__btn { width: 48px; height: 48px; border-radius: var(--r-1); border: 1px solid var(--ink); background: transparent; cursor: pointer; font-size: 1rem; }
.slider__btn:hover { background: var(--ink); color: var(--paper); }
.slider__count { font-family: var(--f-mono); font-size: .85rem; color: var(--ink-2); margin-left: auto; }
@media (min-width: 700px) { .proj { flex-basis: calc(50% - 8px); } }
@media (min-width: 1100px) { .proj { flex-basis: calc(33.333% - 11px); } }

/* ---------- 17. FAQ con buscador ---------- */
.faq { display: grid; gap: var(--s-7); }
.faq__search { position: relative; margin-bottom: var(--s-4); }
.faq__search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); stroke: var(--ink-2); fill: none; stroke-width: 2; pointer-events: none; }
.faq__search input { padding-left: 42px !important; }
.faq__cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-5); }
.faq__cats button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; font-size: .85rem; font-weight: 500; }
.faq__cats button[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 600; position: relative; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: 1.3rem; font-weight: 400; color: var(--emerald-ink); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 20px; margin: 0; max-width: 62ch; }
.faq__empty { padding: var(--s-5) 0; color: var(--ink-2); }
@media (min-width: 900px) { .faq { grid-template-columns: .8fr 1.2fr; gap: var(--s-9); } .faq__aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }

/* ---------- 18. Ayudas (banda) ---------- */
.ayudas-line { padding: var(--s-7) 0; background: var(--paper-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ayudas-line p { margin: 0; font-size: var(--fs-lead); max-width: 70ch; }
.ayudas-line a { color: var(--emerald-ink); font-weight: 600; white-space: nowrap; text-underline-offset: 4px; }
.band { display: grid; gap: var(--s-5); align-items: center; padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-2); background: var(--white); }
.band h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
.band p { margin: 6px 0 0; color: var(--ink-2); }
@media (min-width: 800px) { .band { grid-template-columns: 1fr auto; padding: var(--s-6) var(--s-7); } }

/* ---------- 19. Contacto ---------- */
.contact { display: grid; gap: var(--s-7); }
.contact__list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-dark); }
.contact__list li { display: grid; grid-template-columns: 110px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line-dark); }
.contact__list .k { font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-soft); padding-top: 3px; }
.contact__list address, .contact__list a, .contact__list span { font-style: normal; font-weight: 500; color: var(--white); }
.contact__list a { text-decoration: none; }
.contact__list small { display: block; color: var(--on-dark-2); font-weight: 400; margin-top: 2px; }
.contact__btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin: var(--s-5) 0; }
.contact__btns .btn:first-child { grid-column: auto; }
.contact__alt { margin: 0 0 var(--s-5); color: var(--on-dark-2); }
.contact__alt a { color: var(--white); text-decoration-color: var(--sun); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.map { position: relative; border-radius: var(--r-2); overflow: hidden; aspect-ratio: 4 / 3; background: var(--forest-800); border: 1px solid var(--line-dark); }
.map::before { content: ""; position: absolute; inset: 0; opacity: .3; background-image: linear-gradient(rgba(143, 227, 198, .3) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 227, 198, .3) 1px, transparent 1px); background-size: 32px 32px; }
.map__ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; }
.map__ph p { margin: 0; color: var(--on-dark-2); font-size: .9rem; max-width: 30ch; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.form { background: var(--paper); color: var(--ink); border-radius: var(--r-3); padding: var(--s-5) var(--s-4); display: grid; gap: var(--s-4); }
.form h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; }
.demo-banner { font-size: .86rem; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); border-radius: var(--r-1); padding: 10px 12px; }
.estimate-carry pre, .review pre { white-space: pre-wrap; word-break: break-word; font-family: var(--f-mono); font-size: .8rem; line-height: 1.55; background: var(--paper-2); border-radius: var(--r-1); padding: 12px; margin: 8px 0 0; color: var(--ink); }
.review { margin-top: var(--s-6); background: var(--paper); color: var(--ink); border-radius: var(--r-3); padding: var(--s-5); border: 2px solid var(--emerald); }
.review h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; margin-bottom: 8px; }
.review p { color: var(--ink-2); }
.review__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s-4); }
.review__status { margin: 12px 0 0; font-weight: 600; color: var(--emerald-ink); min-height: 1.2em; }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; padding: var(--s-6); } .form .full { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .contact { grid-template-columns: .9fr 1.1fr; gap: var(--s-9); align-items: start; } }

/* ---------- 20. Pie ---------- */
.footer { background: var(--navy-950); color: var(--on-dark-2); padding: var(--s-8) 0 var(--s-6); font-size: .9rem; }
.footer__grid { display: grid; gap: var(--s-6); }
.footer .brand { color: var(--white); }
.footer h4 { font-family: var(--f-mono); font-size: var(--fs-micro); letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-soft); margin-bottom: var(--s-3); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.footer a { text-decoration: none; color: var(--white); display: inline-block; padding: 6px 0; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer address { font-style: normal; color: var(--white); line-height: 1.7; }
.footer__base { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line-dark); display: grid; gap: var(--s-3); font-size: .82rem; }
.footer__demo { color: #ffd68a; }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- 21. Barra de acciones móvil ---------- */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: rgba(250, 248, 243, .96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mbar .btn { min-height: 48px; padding-left: 10px; padding-right: 10px; gap: 6px; white-space: normal; line-height: 1.2; text-align: center; }
.mbar { grid-template-columns: 1fr 1fr 1.35fr; }
.mbar svg { width: 18px; height: 18px; flex: none; }
/* En móvil, Luz se abre desde la barra inferior: nada flota sobre el contenido */
@media (max-width: 899px) { .chat__fab { display: none !important; } }
@media (min-width: 900px) { .mbar { display: none; } }
html.chat-open .mbar, html.menu-open .mbar { display: none; }

/* ---------- 22. LUZ · asistente ---------- */
.chat { position: fixed; z-index: 70; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); }
.chat__fab {
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px 0 8px; border-radius: 28px; border: 0; cursor: pointer;
  background: var(--forest-900); color: var(--white); box-shadow: var(--sh-3); font-weight: 600; font-size: .92rem;
  transition: transform .25s var(--ease), background .2s;
}
.chat__fab:hover { background: var(--forest-800); }
.chat__fab:active { transform: scale(.97); }
.chat__fab .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--sun); display: grid; place-items: center; }
.chat__fab .ico svg { width: 24px; height: 24px; fill: none; stroke: var(--navy-950); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 380px) { .chat__fab .txt { display: none; } .chat__fab { padding: 0 8px; } }
html.chat-open .chat__fab { display: none; }
@media (min-width: 560px) { html.chat-open .chat__fab { display: flex; } }

.chat__panel {
  position: fixed; inset: 0; z-index: 80; height: var(--vvh, 100dvh); width: 100%;
  display: flex; flex-direction: column; overflow: hidden; background: var(--paper);
  padding-top: env(safe-area-inset-top); animation: chatin .28s var(--ease);
}
@supports not (height: 100dvh) { .chat__panel { height: var(--vvh, 100vh); } }
@keyframes chatin { from { opacity: 0; transform: translateY(12px); } }
@media (min-width: 560px) {
  .chat__panel {
    inset: auto; right: max(16px, env(safe-area-inset-right)); bottom: calc(80px + env(safe-area-inset-bottom));
    width: 400px; height: min(660px, calc(var(--vvh, 100dvh) - 112px)); border-radius: var(--r-3); border: 1px solid var(--line); box-shadow: var(--sh-3); padding-top: 0;
  }
}
html.chat-lock, html.chat-lock body { overflow: hidden; }
@media (min-width: 560px) { html.chat-lock, html.chat-lock body { overflow: visible; } }

.chat__head { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 16px; background: var(--forest-900); color: var(--white); min-width: 0; }
.chat__avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); flex: none; }
.chat__avatar svg { width: 22px; height: 22px; fill: none; stroke: var(--navy-950); stroke-width: 1.7; stroke-linecap: round; }
.chat__titles { min-width: 0; flex: 1; }
.chat__head h2 { font-family: var(--f-ui); font-size: 1rem; font-weight: 700; letter-spacing: .06em; line-height: 1.2; }
.chat__head p { margin: 0; font-size: .8rem; line-height: 1.25; color: var(--emerald-soft); }
.chat__hbtn { width: 44px; height: 44px; border-radius: var(--r-1); border: 0; background: transparent; color: var(--white); cursor: pointer; flex: none; display: grid; place-items: center; }
.chat__hbtn:hover { background: rgba(255, 255, 255, .1); }
.chat__hbtn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

.chat__log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 20px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 90%; min-width: 0; padding: 12px 14px; border-radius: 14px; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; animation: chatin .25s var(--ease); }
.msg p { margin: 0 0 .6em; } .msg p:last-child { margin: 0; }
.msg--bot { background: var(--white); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; max-width: 96%; }
.msg--user { max-width: 82%; background: var(--forest-900); color: var(--white); border-top-right-radius: 4px; align-self: flex-end; }
.msg--meta { align-self: center; max-width: 100%; background: none; padding: 0 8px; font-size: .78rem; color: var(--ink-2); text-align: center; }
.msg__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg__actions button { max-width: 100%; white-space: normal; text-align: left; min-height: 40px; font-size: .86rem; font-weight: 600; padding: 8px 12px; border-radius: var(--r-1); background: var(--forest-900); color: var(--white); border: 0; cursor: pointer; }
.msg__actions button.alt { background: transparent; color: var(--emerald-ink); border: 1px solid var(--emerald-ink); }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }

.chat__foot { flex: none; background: var(--white); border-top: 1px solid var(--line); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); display: grid; gap: 8px; min-width: 0; }
@media (min-width: 560px) { .chat__foot { padding-bottom: 10px; } }
.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 96px; overflow-y: auto; overflow-x: hidden; min-width: 0; padding: 2px; }
.chat__chips button { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: left; line-height: 1.25; min-height: 36px; font-size: .82rem; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); cursor: pointer; }
.chat__chips button:hover { border-color: var(--emerald-ink); color: var(--emerald-ink); }
.chat__form { display: flex; gap: 8px; min-width: 0; align-items: center; }
.chat__topics { width: 44px; height: 44px; flex: none; border-radius: var(--r-1); border: 1px solid var(--line-strong); background: var(--white); cursor: pointer; display: grid; place-items: center; }
.chat__topics[aria-expanded="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chat__topics svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; }
.chat__form input { flex: 1 1 auto; min-width: 0; height: 44px; border-radius: var(--r-1); border: 1px solid var(--line-strong); padding: 0 14px; font-size: 16px; background: var(--paper); }
.chat__form input:focus-visible { outline: none; border-color: var(--emerald-ink); box-shadow: 0 0 0 3px rgba(10, 122, 85, .2); background: var(--white); }
.chat__send { width: 44px; height: 44px; border-radius: var(--r-1); border: 0; background: var(--emerald); color: var(--navy-950); cursor: pointer; flex: none; display: grid; place-items: center; }
.chat__send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat__note { margin: 0; font-size: .72rem; color: var(--ink-2); text-align: center; }

/* ---------- 23. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal, .hero .enter { opacity: 1; transform: none; }
  .diagram .d-flow { stroke-dasharray: none; }
}

/* ---------- 24. Impresión / PDF del resultado de la calculadora ---------- */
@media print {
  @page { margin: 14mm; }
  body.print-calc { background: #fff; padding: 0; color: #000; }
  body.print-calc > *:not(main), body.print-calc main > section:not(#calculadora) { display: none !important; }
  body.print-calc #calculadora { padding: 0; }
  body.print-calc #calculadora .head, body.print-calc .tabs, body.print-calc .calc__form, body.print-calc .calc__cta,
  body.print-calc .res-actions, body.print-calc .swipe-hint, body.print-calc .linklike { display: none !important; }
  body.print-calc .calc { border: 0; box-shadow: none; padding: 0; background: #fff; }
  body.print-calc .calc__panel, body.print-calc .results { display: block; }
  body.print-calc .scroll-x { overflow: visible; }
  body.print-calc .chart { max-height: 200px; width: auto; max-width: 100%; }
  body.print-calc .blk, body.print-calc .kpis, body.print-calc .res-top { break-inside: avoid; }
  body.print-calc .print-only { display: block; }
  .print-head { border-bottom: 2px solid #0e2a23; padding-bottom: 8px; margin-bottom: 16px; }
  .print-head b { display: block; font-size: 16pt; font-family: var(--f-display); font-weight: 400; }
  .print-head span { display: block; font-size: 9pt; color: #444; }
  body.print-calc * { animation: none !important; transition: none !important; }
  body.print-calc .reveal { opacity: 1 !important; transform: none !important; }
}
