/* Escribano Energía · hoja de estilo de la web
   Paleta del logotipo; tema claro y oscuro según el sistema del visitante. */

@font-face {
  font-family: "Archivo";
  src: url("fuentes/archivo.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fuentes/source-sans-3.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fuentes/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fuentes/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --ink: #101B33;
  --muted: #56637C;
  --line: #D9E1EC;
  --brand: #0B2257;     /* azul marino de «ESCRIBANO» */
  --panel: #1456B0;     /* azul de las células */
  --sun: #F2AE00;       /* el sol */
  --leaf: #177F36;      /* verde de «ENERGÍA», oscurecido para contraste AA */
  --grid: #E6ECF4;
  --import: #C2416B;
  --on-brand: #FFFFFF;
  --band: #0B2257;
  --band-ink: #FFFFFF;
  --sel: #FFF6D6;        /* fondo de un recuadro marcado */
  --glow: rgba(242, 174, 0, 0.28);   /* halo al pasar por encima */
  --wa: #107F42;        /* texto junto al glifo de WhatsApp (contraste AA) */
  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1120; --surface: #111B30; --ink: #E7EDF7; --muted: #9AA8C2;
    --line: #23324F; --brand: #CBD8F6; --panel: #5D95E8; --sun: #F5B92A;
    --leaf: #4CC46F; --grid: #1A2741; --import: #E77C9E; --on-brand: #0A1120;
    --band: #15244A; --band-ink: #E7EDF7; --wa: #4CD787; --sel: #2A2614;
    --glow: rgba(245, 185, 42, 0.30);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* lo oculto queda oculto aunque sea un botón */
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
}
img, video, svg { max-width: 100%; }
a { color: var(--panel); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); color: var(--brand); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; font-weight: 750; font-stretch: 108%; }
h3 { font-size: 1.12rem; line-height: 1.25; font-weight: 700; font-stretch: 104%; }
p { margin: 0; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--brand); color: var(--on-brand);
  padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.saltar:focus { top: 12px; }
.eyebrow {
  font: 600 0.78rem/1 var(--f-body); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--leaf);
}
.lead { color: var(--muted); font-size: 1.15rem; max-width: 60ch; }

/* Botones: se iluminan al pasar por encima */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; border-radius: 999px;
  font: 700 1rem/1 var(--f-body); padding: 0.85em 1.4em; text-decoration: none;
  border: 2px solid var(--brand); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px var(--glow), 0 10px 26px -12px var(--sun); }
.btn-main { background: var(--brand); color: var(--on-brand); }
.btn-main:hover { background: var(--panel); border-color: var(--panel); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--sel); border-color: var(--sun); }
.btn-wa { background: var(--surface); color: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: var(--sel); }
.btn-wa img { width: 22px; height: 22px; display: block; }

/* Cabecera: logotipo centrado y grande; debajo, el menú.
   Al desplazar, el logotipo se va y queda fija la fila del menú. */
.top {
  --logo-w: 320px;
  position: sticky; top: calc(-1 * (var(--logo-w) * 0.34722 + 12px)); z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 16px; padding-block: 12px 10px; position: relative; }
.logo { display: block; flex: 1 0 100%; }
.logo picture { display: block; width: var(--logo-w); max-width: 100%; margin: 0 auto; }
.logo img { display: block; width: 100%; height: auto; }
.menu { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.2; padding: 0.55em 1.15em;
  border: 1.5px solid var(--line); border-radius: 999px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s; }
.menu a:hover { border-color: var(--sun); background: var(--sel); color: var(--brand);
  box-shadow: 0 0 0 4px var(--glow), 0 0 18px -4px var(--sun); }
.menu .btn { color: var(--on-brand); padding: 0.55em 1.15em; border-width: 1.5px; line-height: 1.2; }
.menu .btn:hover { background: var(--panel); border-color: var(--panel); color: var(--on-brand); }
.abrir { display: none; background: none; border: 1.5px solid var(--line); border-radius: 999px;
  color: var(--ink); font: 600 0.95rem var(--f-body); padding: 8px 22px; cursor: pointer; }
@media (max-width: 860px) {
  .top { --logo-w: min(100vw - 32px, 520px); }
  .abrir { display: block; }
  .menu { display: none; }
  .menu.visible { display: flex; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 8px; background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
  .menu.visible a { text-align: center; padding: 12px; }
}

/* Inicio: lema, simulación a todo el ancho y, debajo, el texto; todo centrado */
.hero .wrap { display: grid; justify-items: center; text-align: center;
  gap: clamp(22px, 3vw, 34px); padding-block: clamp(28px, 5vw, 56px) clamp(40px, 6vw, 72px); }
.hero-cab { display: grid; gap: 12px; justify-items: center; min-width: 0; }
/* El lema, siempre en un renglón: el tamaño se ajusta al ancho disponible */
.hero h1 { white-space: nowrap; font-size: min(3.6rem, calc((100vw - 32px) / 13.4)); }
.subtitulo { font: 650 clamp(0.82rem, 2.4vw, 1.05rem)/1.35 var(--f-display); font-stretch: 106%;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--leaf); text-wrap: balance; }
.hero-text { display: grid; gap: 20px; justify-items: center; min-width: 0; max-width: 1040px; }
.tiempos { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 0;
  font: 650 clamp(1.05rem, 1.9vw, 1.3rem)/1.3 var(--f-display); font-stretch: 106%; color: var(--brand); }
.tiempos span { display: inline-flex; align-items: center; gap: 10px; }
.tiempos span + span::before { content: ""; width: 7px; height: 7px; border-radius: 1px; background: var(--sun); transform: rotate(45deg); }
.tiempos .medio { color: var(--leaf); }
/* En pantallas estrechas, una frase por renglón y sin rombos: queda simétrico */
@media (max-width: 860px) {
  .tiempos { flex-direction: column; align-items: center; gap: 4px; }
  .tiempos span + span::before { display: none; }
}
.hero-text .acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
@media (max-width: 900px) {
  .hero h1 { font-stretch: 106%; font-size: min(3.4rem, calc((100vw - 32px) / 12.7)); }
}

.dia {
  width: 100%; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(16px, 2.4vw, 26px) clamp(14px, 2.4vw, 28px) 16px; display: grid; gap: 14px; min-width: 0;
  text-align: center; box-shadow: 0 22px 48px -32px rgba(11, 34, 87, 0.5);
}
.dia-cab { display: grid; justify-items: center; gap: 8px; }
.dia-cab strong { font: 700 clamp(1rem, 1.6vw, 1.2rem)/1.2 var(--f-display); color: var(--brand); font-stretch: 104%; }
.chip { font: 600 0.72rem/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--leaf); border: 1px solid currentColor; border-radius: 999px; padding: 5px 10px; }
.unidades { font: 400 0.8rem/1.2 var(--f-data); color: var(--muted); }
.repetir { display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font: 600 0.8rem/1 var(--f-body); color: var(--panel); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px;
  transition: border-color 0.2s, box-shadow 0.25s, background-color 0.2s; }
.repetir:hover { border-color: var(--sun); background: var(--sel); box-shadow: 0 0 0 3px var(--glow); }
.repetir[hidden] { display: none; }
#grafico { width: 100%; height: auto; display: block; overflow: visible; }
#grafico text { font-family: var(--f-data); font-size: 11px; fill: var(--muted); }
#grafico .g-hora { font-size: 12px; font-weight: 500; fill: var(--ink);
  paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
/* En el móvil el gráfico se reduce: se agrandan sus rótulos para que se lean */
@media (max-width: 520px) { #grafico text { font-size: 17px; } #grafico .g-hora { font-size: 19px; } }
.g-rejilla { stroke: var(--grid); stroke-width: 1; }
.g-sol { fill: var(--sun); fill-opacity: 0.85; }
.g-bateria { fill: var(--panel); fill-opacity: 0.85; }
.g-red { fill: var(--import); fill-opacity: 0.85; }
.g-consumo { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linejoin: round; }
.g-cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.g-halo-a { stop-color: var(--sun); stop-opacity: 0.7; }
.g-halo-b { stop-color: var(--sun); stop-opacity: 0; }
.g-rayo { stroke: var(--sun); stroke-width: 2.2; stroke-linecap: round; }
.g-nucleo { fill: var(--sun); stroke: #FFF4CC; stroke-width: 1.5; }
.g-foton { fill: #FFFFFF; stroke: var(--sun); stroke-width: 1.2; }
.leyenda { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px;
  font-size: 0.85rem; color: var(--muted); }
.leyenda i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.leyenda .l-sol { background: var(--sun); }
.leyenda .l-bateria { background: var(--panel); }
.leyenda .l-red { background: var(--import); }
.leyenda .l-consumo { background: var(--brand); height: 3px; vertical-align: 3px; }
.cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  border-top: 1px solid var(--line); padding-top: 14px; min-height: 58px; }
.cifras div { display: grid; gap: 2px; min-width: 0; justify-items: center; }
.cifras b { font: 500 clamp(1.15rem, 2vw, 1.45rem)/1.1 var(--f-data); color: var(--ink); font-variant-numeric: tabular-nums; }
.cifras small { font-size: 0.8rem; color: var(--muted); line-height: 1.25; }
.nota { font-size: 0.8rem; color: var(--muted); max-width: 80ch; margin: 0 auto; }
@media (max-width: 520px) { .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; } }

/* Franja de garantías */
.franja { border-block: 1px solid var(--line); background: var(--surface); }
.franja ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; padding-block: 18px; }
.franja li { text-align: center; text-wrap: balance; font-weight: 600; line-height: 1.3; min-width: 0; }
.franja li::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px; border-radius: 2px;
  background: var(--leaf); transform: translateY(-1px) rotate(45deg); }
@media (max-width: 860px) { .franja ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .franja ul { grid-template-columns: minmax(0, 1fr); } }

/* Secciones: cabeceras centradas */
section.bloque .wrap { padding-block: clamp(48px, 7vw, 88px); display: grid; gap: 32px; }
.cab-bloque { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; justify-items: center; text-align: center; }

/* Recuadros: servicios, pasos del estudio, equipo */
.servicios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.servicio { background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 22px; display: grid; gap: 10px; justify-items: center; align-content: start;
  text-align: center; min-width: 0; }
.servicio:hover { border-color: var(--sun); transform: translateY(-3px);
  box-shadow: 0 0 0 4px var(--glow), 0 20px 36px -24px rgba(11, 34, 87, 0.55); }
.icono { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grid); color: var(--panel); transition: background-color 0.25s, color 0.25s; }
.servicio:hover .icono { background: var(--sun); color: #0B2257; }
.servicio p { color: var(--muted); font-size: 0.98rem; }
.servicio .dato { font: 400 0.78rem/1.3 var(--f-data); color: var(--panel); }
@media (max-width: 900px) { .servicios { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .servicios { grid-template-columns: minmax(0, 1fr); } }

/* Estudio */
.estudio { background: var(--band); color: var(--band-ink); }
.estudio h2, .estudio h3 { color: var(--band-ink); }
.estudio .eyebrow { color: var(--sun); }
.estudio .lead { color: var(--band-ink); opacity: 0.82; }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: paso; }
.pasos li { display: grid; gap: 10px; justify-items: center; align-content: start; text-align: center;
  counter-increment: paso; min-width: 0; padding: 24px 22px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 3px solid var(--sun); border-radius: 16px; }
.pasos li:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-3px);
  box-shadow: 0 0 0 4px rgba(242, 174, 0, 0.22), 0 0 30px -8px rgba(242, 174, 0, 0.55); }
.pasos li::before { content: "Paso " counter(paso); font: 500 0.8rem/1 var(--f-data); color: var(--sun); letter-spacing: 0.04em; }
.pasos p { opacity: 0.85; }
.entrega { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.entrega span { border: 1px solid currentColor; border-radius: 999px; padding: 6px 14px; font-size: 0.92rem;
  opacity: 0.9; transition: color 0.2s, border-color 0.2s, box-shadow 0.25s, opacity 0.2s; }
.entrega span:hover { color: var(--sun); opacity: 1; box-shadow: 0 0 0 3px rgba(242, 174, 0, 0.22), 0 0 18px -4px var(--sun); }
@media (max-width: 820px) { .pasos { grid-template-columns: minmax(0, 1fr); } }

/* Obras */
.destacada { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px);
  align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(14px, 2.5vw, 24px); }
.destacada video { width: 100%; max-width: 100%; aspect-ratio: 474 / 850; object-fit: cover; display: block;
  border-radius: var(--radius); background: var(--grid); }
.destacada .texto { display: grid; gap: 14px; min-width: 0; justify-items: center; text-align: center; }
.destacada .texto p { color: var(--muted); max-width: 56ch; }
.destacada h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.destacada ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.destacada li { display: flex; gap: 10px; align-items: flex-start; }
.destacada li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 2px; background: var(--sun); transform: rotate(45deg); }
@media (max-width: 760px) { .destacada { grid-template-columns: minmax(0, 1fr); } .destacada video { max-width: 340px; margin: 0 auto; } }
.galeria { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; }
.galeria figure { margin: 0; display: grid; gap: 10px; min-width: 0; align-content: start; text-align: center; }
.marco { display: block; overflow: hidden; border-radius: 14px; background: var(--grid);
  transition: box-shadow 0.3s; }
.galeria img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  transition: transform 0.6s ease; }
.galeria figure:hover .marco { box-shadow: 0 0 0 4px var(--glow), 0 18px 34px -22px rgba(11, 34, 87, 0.6); }
.galeria figure:hover img { transform: scale(1.05); }
.galeria figcaption { display: grid; gap: 2px; }
.galeria figcaption b { font: 700 1rem/1.25 var(--f-display); font-stretch: 104%; color: var(--ink); }
.galeria figcaption span { color: var(--muted); font-size: 0.93rem; }
.videos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; align-items: center; }
.videos > span { font-weight: 600; margin-right: 4px; }
.videos a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--brand);
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 0.93rem;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s; }
.videos a::before { content: ""; width: 0; height: 0; border-left: 9px solid var(--import); border-block: 6px solid transparent; }
.videos a:hover { border-color: var(--sun); background: var(--sel); box-shadow: 0 0 0 4px var(--glow); }
@media (max-width: 900px) { .galeria { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .galeria { grid-template-columns: minmax(0, 1fr); } }

/* Quiénes somos */
.equipo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center; gap: 16px; }
.equipo li { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--leaf); border-radius: 16px; }
.equipo li:hover { border-color: var(--sun); transform: translateY(-3px); box-shadow: 0 0 0 4px var(--glow); }
.equipo b { font-family: var(--f-display); font-stretch: 104%; font-size: 1.1rem; color: var(--brand); }
.equipo span { color: var(--muted); }
@media (max-width: 560px) { .equipo { grid-template-columns: minmax(0, 1fr); } }

/* Contacto */
.contacto { background: var(--surface); border-top: 1px solid var(--line); }
.contacto-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.datos { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 24px; text-align: center; }
.datos dl { margin: 0; display: grid; gap: 18px; }
.datos dt { font: 600 0.78rem/1 var(--f-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.datos dd { margin: 6px 0 0; font-size: 1.05rem; }
.datos .correo { font: 500 1rem/1.3 var(--f-data); color: var(--brand); overflow-wrap: anywhere; text-decoration: none; }
.datos .tel { font: 500 1.2rem/1.3 var(--f-data); color: var(--brand); text-decoration: none; }
.datos .correo:hover, .datos .tel:hover { text-decoration: underline; }
.datos .mapa { font-size: 0.95rem; }
.formulario { display: grid; gap: 14px; align-content: start; background: var(--bg); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; }
.formulario > p { color: var(--muted); font-size: 0.95rem; text-align: center; }
.formulario input, .formulario textarea, .formulario .caja { background-color: var(--surface); }
.formulario .opcion input:checked + .caja { background-color: var(--sel); }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
form .ancho { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.95rem; }
label > input, label > select, label > textarea { margin-top: auto; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: 400 1rem/1.4 var(--f-body); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
textarea { min-height: 96px; resize: vertical; }
.check { flex-direction: row; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
/* Qué quiere instalar: recuadros que se marcan (varios a la vez) */
.opciones { border: 0; margin: 0; padding: 0; min-width: 0; }
.opciones legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 0.95rem; }
.opciones legend small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.rejilla-opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.opcion { display: block; position: relative; font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; padding: 0; }
.caja { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; height: 100%; min-height: 92px; padding: 14px 30px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); line-height: 1.25;
  transition: border-color 0.6s, background-color 0.15s, box-shadow 0.8s; }
.caja svg { transition: color 0.6s; }
.caja svg { color: var(--panel); flex: none; }
.caja::after { content: ""; position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface) center / 12px no-repeat; }
.opcion:hover .caja { border-color: var(--sun); box-shadow: 0 0 0 3px var(--glow); }
.opcion input:checked + .caja { border-color: var(--sun); box-shadow: inset 0 0 0 1px var(--sun); background-color: var(--sel); }
.opcion input:checked + .caja::after { border-color: var(--sun); background-color: var(--sun);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2257' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.opcion input:focus-visible + .caja { outline: 3px solid var(--sun); outline-offset: 2px; }
/* Inicio: elección rápida, al ancho de la simulación */
.rapido { width: 100%; display: grid; gap: 18px; justify-items: center; }
.opciones-inicio { width: 100%; }
.opciones-inicio legend { width: 100%; text-align: center; margin-bottom: 14px;
  font: 700 clamp(1.05rem, 1.8vw, 1.25rem)/1.3 var(--f-display); font-stretch: 104%; color: var(--brand); }
.opciones-inicio legend small { font: 400 0.9rem var(--f-body); }
.opciones-inicio .rejilla-opciones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.opciones-inicio .caja { min-height: 108px; font-size: 1rem; background-color: var(--surface); }
.opciones-inicio .opcion input:checked + .caja { background-color: var(--sel); }
@media (max-width: 700px) { .opciones-inicio .rejilla-opciones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* El recuadro de turno se ilumina despacio */
.caja.brilla { border-color: var(--sun); box-shadow: 0 0 0 4px var(--glow), 0 0 28px -6px var(--sun); }
.caja.brilla svg { color: var(--sun); }
#grafico.repetible { cursor: pointer; }
.enviar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.aviso { grid-column: 1 / -1; font-size: 0.95rem; color: var(--leaf); text-align: center; }
.aviso.falta { color: var(--import); }
@media (max-width: 820px) { .contacto-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { form { grid-template-columns: minmax(0, 1fr); } }

/* Páginas legales y de error */
.legal .wrap { max-width: 820px; padding-block: clamp(36px, 6vw, 72px); display: grid; gap: 14px; }
.legal .wrap > .eyebrow, .legal h1, .legal .actualizado { text-align: center; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.2rem; margin-top: 14px; }
.legal p, .legal li { color: var(--ink); max-width: 68ch; }
.legal ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.legal .actualizado { color: var(--muted); font-size: 0.92rem; }
.ficha { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.ficha div { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ficha dt { color: var(--muted); font-weight: 600; }
.ficha dd { margin: 0; overflow-wrap: anywhere; }
.pendiente { color: var(--import); }
.volver { font-weight: 700; text-decoration: none; }
@media (max-width: 520px) { .ficha div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

footer { background: var(--bg); border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding-block: 26px; font-size: 0.9rem; color: var(--muted); }
.lema { color: var(--brand); font-family: var(--f-display); margin-right: 8px; }
.pie-legal { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.pie-legal a { color: var(--muted); }

/* Movimiento: recuadros que se elevan y bloques que aparecen al llegar a ellos */
.servicio, .pasos li, .equipo li { transition: border-color 0.2s, background-color 0.2s, box-shadow 0.25s, transform 0.25s; }
.revelar { opacity: 0; translate: 0 22px; }
.revelar, .revelar.visto { transition: opacity 0.7s ease, translate 0.7s ease, border-color 0.2s, background-color 0.2s, box-shadow 0.25s, transform 0.25s; }
.revelar.visto { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .revelar { opacity: 1; translate: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .btn:hover, .servicio:hover, .pasos li:hover, .equipo li:hover { transform: none; }
  .galeria figure:hover img { transform: none; }
}
