/* Botón Antipánico · prototipo
   Tokens de marca (start.mjs brand, Chivo) y el CSS de página que el kit no trae: lo que va dentro de
   cada visual. En WordPress este archivo pasa tal cual a assets/css del tema hijo. */

:root {
  --p-bg: #f7f7f5; --p-surface: #ecebe7; --p-ink: #14161a; --p-muted: #4a4e55;
  --p-accent: #c8102e; --p-accent-ink: #f7f7f5; --p-action: #c8102e; --p-action-ink: #f7f7f5;
  --p-inv-bg: #14161a; --p-inv-surface: #212326; --p-inv-ink: #f7f7f5; --p-inv-muted: #979999;
  --p-inv-accent: #c8102e; --p-inv-accent-ink: #f7f7f5; --p-inv-action: #c8102e; --p-inv-action-ink: #f7f7f5;
  --font-display: "Chivo", system-ui, sans-serif;
  --font-text: "Chivo", system-ui, sans-serif;
  --font-mono: "Chivo Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400;
  --display-tracking: -0.03em;
  --display-tracking-xl: -0.04em;
  --ly-scale: 0.96;

  /* el producto: los colores de la ventana de alerta y de la consola reales */
  --apb-red: #8f0a12;
  --apb-red-soft: #fde9e7;
  --apb-win: #0b6fc6;
  --apb-line: #d9dbdf;
  --apb-ok: #1b7a3a;
  --apb-ease: cubic-bezier(.23, 1, .32, 1);
}

/* ---------------------------------------------------------------- logo */
.nav__logo img, .closing .nav__logo img { width: 32px; height: 32px; flex: none; }
.nav__logo { gap: 10px; }

/* ---------------------------------------------------------------- ventana de alerta (Windows) */
.apb-win { background: #fff; color: #14161a; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px rgb(20 22 26 / .14), 0 30px 60px -24px rgb(20 22 26 / .55); font: 400 14px/1.4 var(--font-text); }
.apb-win__bar { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; background: var(--apb-win); color: #fff; font-size: 12px; }
.apb-win__bar img { width: 14px; height: 14px; }
.apb-win__bar .sp { flex: 1; }
.apb-win__ctl { display: inline-flex; gap: 14px; opacity: .85; }
.apb-win__ctl i { width: 10px; height: 1px; background: currentColor; display: block; }
.apb-win__head { background: var(--apb-red); color: #fff; text-align: center; padding: 14px 16px; font: 500 22px/1.15 var(--font-display); letter-spacing: -0.01em; }
.apb-win__who { padding: 14px 20px 12px; display: grid; gap: 2px; }
.apb-win__who b { font-weight: 500; }
.apb-win__who dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; }
.apb-win__who dt { color: #5b5f66; } .apb-win__who dd { margin: 0; }
.apb-win__strip { display: flex; align-items: center; gap: 12px; background: var(--apb-red-soft); color: var(--apb-red); font-size: 12.5px; font-weight: 500; padding: 0 0 0 20px; height: 34px; }
.apb-win__strip span:first-child { flex: 1; }
.apb-win__strip .btnlike { height: 100%; display: inline-flex; align-items: center; padding: 0 16px; background: #fff; color: #14161a; border-left: 1px solid var(--apb-line); }
.apb-win__map { position: relative; background: #fbfbfa; height: 230px; overflow: hidden; }
.apb-win__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.apb-win__foot { position: relative; background: var(--apb-red); color: #fff; text-align: center; padding: 13px 16px; font: 500 16px/1.2 var(--font-text); letter-spacing: .01em; }
.apb-win__foot .done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--apb-ok); }
.apb-win__foot .done svg { width: 18px; height: 18px; }

/* el plano: paredes, salas, puestos y la chincheta que late */
.plan .wall { fill: none; stroke: #2a2d33; stroke-width: 5; }
.plan .room-a { fill: #ece8f6; } .plan .room-b { fill: #e2f4f6; }
.plan .desk { fill: #fff; stroke: #b9bec6; stroke-width: 1; }
.plan .lbl { font: 500 9px var(--font-text); fill: #3b3f46; letter-spacing: .04em; }
.plan .lbl--lg { font-size: 11px; }
.plan .exit { fill: #1f8f4d; } .plan .ext { fill: #d32f2f; }
.pin__dot { fill: #d0101e; }
.pin__ring { fill: none; stroke: #d0101e; stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .pin__ring { animation: apb-ping 1.6s var(--apb-ease) 4; }
  .pin__ring--b { animation-delay: .8s; }
  [data-ly-steps]:not(.is-playing) .pin__ring { animation-play-state: running; }
}
@keyframes apb-ping { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }

/* el hero: la ventana (apaisada) sobre la foto del gesto, en el marco del hero */
.hero--centred .hero__window { background: #2a2d33 url("../img/tecla-alt-oficina.jpg") center 62% / cover no-repeat; }
.hero__window .apb-win { max-width: 880px; margin-inline: auto; }
.apb-win__head { font-size: 18px; padding: 10px 16px; }
.apb-win__body { display: flex; }
.apb-win__info { flex: 5 1 0; min-width: 0; border-right: 1px solid var(--apb-line); }
.apb-win__plan { flex: 6 1 0; display: flex; flex-direction: column; min-width: 0; }
.apb-win__map { height: 176px; }
.apb-win__foot { font-size: 14px; padding: 12px 14px; }
@media (max-width: 1023px) {
  .apb-win__body { flex-direction: column; }
  .apb-win__info { border-right: 0; }
  .apb-win__plan { order: -1; }
  .apb-win__strip .btnlike { display: none; }
}
.hero__window [data-step] { transition: opacity .35s var(--apb-ease), transform .35s var(--apb-ease); }
.apb-win__foot .done.is-off { opacity: 0; transform: none; }
@media (max-width: 639px) {
  .apb-win__head { font-size: 17px; padding: 10px 12px; }
  .apb-win__who { padding: 10px 14px; font-size: 13px; }
  .apb-win__who dl dt:nth-of-type(n+3), .apb-win__who dl dd:nth-of-type(n+3) { display: none; }
  .apb-win__strip { font-size: 12px; padding-left: 14px; }
  .apb-win__strip .btnlike { display: none; }
  .apb-win__map { height: 112px; }
  .apb-win__strip { display: none; }
}

/* ---------------------------------------------------------------- la escena a puerta cerrada */
.scene__photo { margin-top: var(--s-7); aspect-ratio: 2.9 / 1; border-radius: var(--r-lg); overflow: hidden; }
.scene__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene__facts { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.scene__facts li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); }
.scene__facts li::before { content: ""; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--action); }
@media (max-width: 639px) { .scene__photo { aspect-ratio: 4 / 3; } .scene__photo img { object-position: 22% 50%; } }

/* ---------------------------------------------------------------- consola (app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: #fff; border: 1px solid var(--apb-line); border-radius: 14px; box-shadow: 0 30px 60px -36px rgb(20 22 26 / .45); overflow: hidden; font: 400 13px/1.45 var(--font-text); color: #14161a; }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--apb-line); }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, #fff); pointer-events: none; }
.app__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--apb-line); background: #f3f4f6; font-size: 12.5px; color: #3b3f46; }
.app__bar img { width: 16px; height: 16px; } .app__bar .sp { flex: 1; } .app__bar b { font-weight: 500; color: #14161a; }
.app__ribbon { grid-column: 1 / -1; display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--apb-line); background: #fafafa; }
.app__ribbon span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; color: #3b3f46; font-size: 12.5px; }
.app__ribbon span.is-on { background: #e9eef7; color: #0b4f96; font-weight: 500; }
.tree { padding: 14px 10px 14px 16px; display: grid; gap: 1px; }
.tree h4, .log h4 { margin: 0 0 8px; font: 500 12px/1.3 var(--font-text); color: #5b5f66; }
.tree__n { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 6px; padding-left: calc(8px + var(--d, 0) * 16px); white-space: nowrap; }
.tree__n i { width: 8px; height: 8px; border-radius: 2px; background: #b9bec6; flex: none; }
.tree__n.is-alert { background: var(--apb-red-soft); color: var(--apb-red); font-weight: 500; }
.tree__n.is-alert i { background: var(--apb-red); border-radius: 50%; }
.tree__n em { margin-left: auto; font-style: normal; font-size: 12px; color: #5b5f66; }
.tree__n.is-alert em { color: var(--apb-red); }
.terms { margin-top: 14px; border-top: 1px solid var(--apb-line); padding-top: 12px; display: grid; gap: 2px; }
.terms div { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 5px 8px; font-size: 12.5px; }
.terms b { font-weight: 500; } .terms .on { color: var(--apb-ok); } .terms .off { color: #8a8f97; }
.log { padding: 14px 18px; }
.log__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.log__head strong { font: 500 18px/1.2 var(--font-display); letter-spacing: -0.01em; }
.log__head .chip { margin-left: auto; height: 24px; padding: 0 10px; border-radius: 99px; display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; background: var(--apb-red-soft); color: var(--apb-red); }
.log__head .chip.is-closed { background: #e6f3ea; color: var(--apb-ok); }
.log ol { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid #eef0f2; }
.log time { font: 400 12.5px/1.45 var(--font-mono); color: #5b5f66; font-variant-numeric: tabular-nums; }
.log li b { font-weight: 500; }
.log li.is-key b { color: var(--apb-red); }
.log li.is-ok b { color: var(--apb-ok); }
.log [data-step] { transition: opacity .35s var(--apb-ease), transform .35s var(--apb-ease); }
#consola .app { height: clamp(420px, calc(100svh - 380px), 560px); grid-template-rows: auto auto minmax(0, 1fr); }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); }
  #consola .app { grid-template-rows: auto auto auto minmax(0, 1fr); height: 640px; }
  .app > .app__pane--list { max-height: 210px; }
  .app > .app__pane--list .terms { display: none; }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--apb-line); }
}
@media (max-width: 639px) {
  #consola .app { grid-template-rows: auto minmax(0, 1fr); height: 520px; }
  .app__ribbon, .app > .app__pane--list { display: none; }
  .log li { grid-template-columns: 56px 1fr; }
}

/* ---------------------------------------------------------------- escalado (counter-rolls + captura) */
.esc__stats { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.esc__stats .stat { display: grid; gap: var(--s-1); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.esc__stats .t-stat { margin: 0; white-space: nowrap; }
.esc__stats .t-small { margin: 0; color: var(--ink); font-size: var(--t-body); }
.frame--shot { background: var(--p-surface); border-radius: var(--r-lg); overflow: hidden; position: relative; aspect-ratio: 5 / 4; }
.frame--shot img { position: absolute; left: 48px; top: 48px; width: 1000px; max-width: none; border-radius: 10px; box-shadow: 0 0 0 1px rgb(20 22 26 / .12), 0 24px 48px -24px rgb(20 22 26 / .4); }
@media (max-width: 1279px) { .frame--shot img { width: 820px; left: 32px; top: 32px; } }
@media (max-width: 639px) { .frame--shot img { width: 600px; left: 16px; top: 16px; } }

/* ---------------------------------------------------------------- funciones: paneles */
#funciones .panel { --p-h: 300px; position: relative; overflow: hidden; background: var(--p-surface); }
@media (max-width: 639px) { #funciones .panel { --p-h: 200px; } }
.dg-net { position: absolute; inset: 0; width: 100%; height: 100%; }
.dg-net .pc rect { fill: #fff; stroke: #c9ccd1; }
.dg-net .pc path { stroke: #9aa0a6; fill: none; }
.dg-net .pc--src rect { stroke: var(--action); stroke-width: 1.5; }
.dg-net .pc text, .dg-net .lbl { font: 500 11px var(--font-text); fill: #3b3f46; }
.dg-net .srv rect { fill: #fff; stroke: #c9ccd1; }
.dg-net .x { stroke: var(--action); stroke-width: 2; stroke-linecap: round; }
.dg-net .wire { stroke: #c9ccd1; stroke-width: 1.2; fill: none; stroke-dasharray: 3 4; }
.dg-net .wave { fill: none; stroke: var(--action); stroke-width: 1.5; transform-box: view-box; opacity: 0; }
.dg-net .hit rect { stroke: var(--action); }
.dg-net .hit .band { stroke: var(--action); stroke-width: 10; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover .dg-net .wave, .dg-net.is-live .wave { animation: apb-wave 3s var(--apb-ease) infinite; }
  .dg-net .wave--b { animation-delay: 1s !important; } .dg-net .wave--c { animation-delay: 2s !important; }
}
@keyframes apb-wave { 0% { opacity: .9; r: 14; } 80% { opacity: 0; r: 120; } 100% { opacity: 0; r: 120; } }

.shot-crop { position: absolute; inset: 0; }
.shot-crop img { position: absolute; width: 980px; max-width: none; left: -40px; top: -60px; }
.shot-crop .pin { position: absolute; left: 323px; top: 172px; width: 40px; height: 40px; }
@media (max-width: 639px) { .shot-crop img { width: 760px; left: -30px; top: -40px; } .shot-crop .pin { left: 248px; top: 132px; } }

.vdi { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 0; padding: 0 28px; }
.vdi__n { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 13px; font-weight: 500; position: relative; z-index: 1; }
.vdi__n small { display: block; color: var(--muted); font-weight: 400; }
.vdi__box { width: 84px; height: 64px; border-radius: 10px; background: #fff; border: 1px solid #c9ccd1; display: grid; place-items: center; }
.vdi__box svg { width: 36px; height: 36px; stroke: #3b3f46; fill: none; stroke-width: 1.5; }
.vdi__n--hit .vdi__box { border-color: var(--action); box-shadow: 0 0 0 4px color-mix(in oklab, var(--action) 14%, transparent); }
.vdi__n--hit .vdi__box svg { stroke: var(--action); }
.vdi__line { position: absolute; left: 18%; right: 18%; top: calc(50% - 16px); height: 2px; background: repeating-linear-gradient(90deg, #c9ccd1 0 6px, transparent 6px 10px); }
.vdi__back { position: absolute; left: 18%; right: 50%; top: calc(50% + 46px); height: 2px; background: var(--action); transform-origin: right; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover .vdi__back { animation: apb-draw 2.8s var(--apb-ease) infinite; }
}
@keyframes apb-draw { 0% { transform: scaleX(0); } 45%, 100% { transform: scaleX(1); } }
@media (max-width: 639px) { .vdi { padding: 0 8px; } .vdi__box { width: 64px; height: 52px; } .vdi__n { font-size: 12px; } }

.deploy { position: absolute; inset: 24px 24px auto; background: #0f1114; color: #e9ecee; border-radius: 10px; padding: 16px 18px; font: 400 13px/1.7 var(--font-mono); box-shadow: 0 24px 48px -24px rgb(0 0 0 / .5); }
.deploy .c { color: #8a9099; } .deploy .ok { color: #7fd39b; } .deploy b { font-weight: 500; color: #fff; }
.deploy [data-step] { transition: opacity .35s var(--apb-ease), transform .35s var(--apb-ease); }
@media (max-width: 639px) { .deploy { inset: 16px 16px auto; font-size: 12px; } }

/* ---------------------------------------------------------------- sectores */
.sectors { row-gap: var(--s-6); }
.sector { display: grid; gap: var(--s-3); align-content: start; }
.sector__img { aspect-ratio: 3 / 1; border-radius: var(--r-lg); overflow: hidden; margin-bottom: var(--s-1); }
.sector__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sector h3 { margin: 0; font: 500 var(--t-card)/1.3 var(--font-text); }
.sector p { margin: 0; }

/* ---------------------------------------------------------------- modalidades */
.soon { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.plan__who { color: var(--muted); margin: 0; }
.plan__price { font: var(--display-weight) var(--t-stat)/1.05 var(--font-display); letter-spacing: var(--display-tracking); margin: 0; }
.plan__price--sm { font-size: var(--t-lead); line-height: 1.35; font-family: var(--font-text); letter-spacing: 0; }

/* ---------------------------------------------------------------- formulario */
.form-card { background: var(--p-surface); border-radius: var(--r-lg); padding: var(--s-7); }
.form-card .form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); max-width: none; }
.form-card .form > * { grid-column: 1; width: auto; margin: 0; }
.form-photo { margin-top: var(--s-6); aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; }
.form-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 639px) { .form-photo { aspect-ratio: 16 / 9; margin-bottom: var(--s-6); } }
@media (min-width: 640px) and (max-width: 1023px) { .form-photo { aspect-ratio: 3 / 4; } }
.form-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.check-row { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); align-items: start; font-size: var(--t-small); font-weight: 400; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action); }
@media (max-width: 639px) { .form-card { padding: var(--s-5); } .form-card .two { grid-template-columns: 1fr; } }
.notice { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); max-width: 46ch; }

/* ---------------------------------------------------------------- ritmo y piezas comunes */
main h2 + .t-lead, main .span-5 > h2 + p, main .span-4 > h2 + p { margin-top: var(--s-5); }
.close__word { font-size: clamp(44px, 9.2vw, 132px); white-space: nowrap; }
.closing__links .grid { align-items: start; }
@media (max-width: 639px) {
  .pill .muted { display: none; }
  .close__word { font-size: clamp(36px, 10.4vw, 64px); }
}

/* la ventana del hero en el teléfono: el plano corto y sin franja, para que el aviso se vea entero */
@media (max-width: 639px) {
  .hero__window .apb-win__map { height: 112px; }
  .hero__window .apb-win__head { font-size: 16px; padding: 8px 12px; }
  .hero__window .apb-win__foot { padding: 10px 12px; font-size: 13px; }
}

/* ---------------------------------------------------------------- tablet y teléfono */
@media (max-width: 1023px) {
  .sectors { row-gap: var(--s-5); }
  .sector { grid-column: 1 / -1; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); row-gap: var(--s-2); }
  .sector__img { grid-column: 1 / span 5; grid-row: 1 / span 2; margin: 0; aspect-ratio: 16 / 10; }
  .sector > :not(.sector__img) { grid-column: 6 / -1; }
  .sector h3 { align-self: end; }
  #solicitud .grid > .span-5 { grid-column: 1 / span 5; }
  #solicitud .grid > .form-card { grid-column: 6 / -1; }
  #solicitud .form-card { padding: var(--s-5); }
  #solicitud .form-card .two { grid-template-columns: 1fr; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .scene__photo { aspect-ratio: 16 / 9; }
}
@media (max-width: 639px) {
  .sector { column-gap: var(--s-3); }
  .sector__img { aspect-ratio: 1 / 1; }
  .sector p { font-size: var(--t-small); line-height: 1.5; }
  #funciones .panel { --p-h: 200px; }
  .deploy .c { display: none; }
  #modalidades, #sectores { --hm: 2; }
  #solicitud .grid > .span-5, #solicitud .grid > .form-card { grid-column: 1 / -1; }
  #como-funciona .mo-pc__visual img { aspect-ratio: 1 / 1; max-height: none; object-fit: cover; }
}
@media (max-width: 639px) { .app__role, .app__count { display: none; } }
@media (max-width: 639px) { main :where(.apb-s) > #como-funciona[data-moment]:not(.is-live) { height: auto; min-height: calc(2 * 100lvh); } }

/* el hero, afinado tras la primera captura: la foto tranquila, la ventana más baja para que el aviso quede sobre el fundido */
.hero--centred .hero__window { background-image: url("../img/nocturno.jpg"); background-position: center 45%; }
.hero--centred .hero__window > .ly-piece { top: var(--s-5); }
.apb-win__info { display: flex; flex-direction: column; }
.apb-win__foot { margin-top: auto; }
@media (min-width: 640px) { .hero__window .apb-win__map { height: 140px; } }

/* columna lateral con foto (modalidades, preguntas): la foto llena lo que queda, para que la fila tenga una altura */
.side-photo { margin-top: var(--s-6); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.side-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 1024px) {
  #modalidades .grid--top { align-items: stretch; }
  #modalidades .span-4:first-child { display: flex; flex-direction: column; }
  #modalidades .side-photo { flex: 1 1 0; min-height: 160px; aspect-ratio: auto; }
}
.footer__legal .legal-links { display: inline-flex; flex-wrap: wrap; gap: var(--s-4); }
.footer__firma { color: inherit; text-decoration: none; }
.footer__firma:is(:hover, :focus-visible) { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 639px) {
  .footer__legal { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
  .footer__sep { display: none; }
  .hero__window .apb-win__who dl dt:nth-of-type(n+2), .hero__window .apb-win__who dl dd:nth-of-type(n+2) { display: none; }
  .hero__window .apb-win__map { height: 96px; }
  .sector__img { aspect-ratio: 1 / 1; }
}@media (min-width: 640px) and (max-width: 1023px) { #modalidades, #preguntas { --h: 2; } }
@media (max-width: 639px) {
  #funciones .panel { --p-h: 176px; }
  #modalidades .side-photo { aspect-ratio: 2 / 1; }
  #modalidades .soon { margin-top: var(--s-5); }
  #solicitud { --hm: 2; }
  .form-photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 639px) { #preguntas .side-photo { aspect-ratio: 2.2 / 1; margin-top: var(--s-5); } }
@media (max-width: 639px) {
  .form-photo { aspect-ratio: 3 / 4; }
  #modalidades .side-photo { aspect-ratio: 4 / 3; }
  .sectors { row-gap: var(--s-5); }
  .sector { grid-column: auto / span 6; display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--s-2); }
  .sector__img, .sector > :not(.sector__img) { grid-column: 1; grid-row: auto; }
  .sector__img { aspect-ratio: 2 / 3; }
  .sector h3 { font-size: var(--t-body); align-self: start; }
  .sector p { font-size: var(--t-body); }
}@media (max-width: 639px) { #modalidades .side-photo { aspect-ratio: 16 / 9; } }
@media (max-width: 639px) { #como-funciona .mo-pc__visual img { aspect-ratio: 8 / 7; } }

/* ---------------------------------------------------------------- botón de la cabecera: latido y ondas
   El botón late (doble pulso y una onda roja que se expande) y, con cada latido, tres arcos salen de su
   esquina superior derecha, como las ondas del logotipo. Ciclo de 2,4 s. Al pasar el ratón o con el foco
   se detiene, para que el botón responda como los demás. Con «reducir movimiento» no se anima nada y los
   arcos quedan fijos. */
.btn--latido { position: relative; overflow: visible; }
.btn__ondas { position: absolute; width: 20px; height: 20px; pointer-events: none; left: calc(100% - 7px); bottom: calc(100% - 7px); }
.btn__ondas svg { display: block; width: 100%; height: 100%; overflow: visible; }
.btn__ondas path { fill: none; stroke: var(--action); stroke-width: 2.2; stroke-linecap: round; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .btn--latido { animation: apb-latido 2.4s cubic-bezier(.23, 1, .32, 1) infinite; }
  .btn--latido .btn__ondas path { animation: apb-onda 2.4s cubic-bezier(.23, 1, .32, 1) infinite; }
  .btn--latido .btn__ondas path:nth-child(2) { animation-delay: .12s; }
  .btn--latido .btn__ondas path:nth-child(3) { animation-delay: .24s; }
  .btn--latido:is(:hover, :focus-visible), .btn--latido:is(:hover, :focus-visible) .btn__ondas path { animation: none; }
}
@media (prefers-reduced-motion: reduce) { .btn__ondas path { opacity: .7; } }
@keyframes apb-latido {
  0%   { transform: scale(1);     box-shadow: 0 0 0 0 color-mix(in oklab, var(--action) 45%, transparent); }
  7%   { transform: scale(1.035); }
  14%  { transform: scale(1); }
  21%  { transform: scale(1.025); }
  30%  { transform: scale(1); }
  60%  { box-shadow: 0 0 0 12px transparent; }
  100% { transform: scale(1);     box-shadow: 0 0 0 0 transparent; }
}
@keyframes apb-onda { 0% { opacity: 0; } 8% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
