/* v3 — identidad vigente de d2do (brandbook): tinta + azul señal, Chakra Petch (títulos), DM Sans (texto), DM Mono (datos). */
:root {
  --ink: #14161b;
  --muted: #5f6571;
  --line: #e7e9ed;
  --bg: #f5f6f8;
  --surface: #fff;
  --signal: #2438f5;
  /* Alerta: un solo set de colores para las tres tarjetas */
  --alert-fill: #fde6e3; --alert-line: #f3c2bc; --alert-ink: #b42318;
  --r-card: 6px;
  --r-btn: 4px;
  --font-title: "Chakra Petch", "DM Sans", system-ui, sans-serif;
  --font-text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-data: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.6 var(--font-text); color: var(--ink); background: var(--surface); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* Header */
.mast { border-bottom: 1px solid var(--line); background: var(--surface); }
.mast .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.mast img { height: 28px; width: auto; display: block; }

/* Buttons: 40 px de alto, radio chico, sin sombras */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 20px; border: 1px solid var(--ink); border-radius: var(--r-btn); background: var(--ink); color: #fff; font: 600 15px/1 var(--font-text); text-decoration: none; cursor: pointer; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: #d3d7de; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.line-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }

/* Secciones */
section { padding: 72px 0; }
.hero { padding: 152px 0 140px; background: var(--bg); border-bottom: 1px solid var(--line); }
.tag { display: inline-block; margin: 0 0 20px; font: 500 12.5px/1 var(--font-data); letter-spacing: .04em; text-transform: lowercase; color: var(--signal); }
h1, h2 { font-family: var(--font-title); font-weight: 600; margin: 0; }
h1 { font-size: clamp(36px, 7vw, 76px); line-height: 1.08; letter-spacing: -.025em; max-width: 18ch; margin-bottom: 22px; }
h2 { font-size: clamp(24px, 4.4vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin-bottom: 32px; }
.lede { font-size: clamp(18px, 3vw, 22px); color: var(--muted); margin: 0 0 32px; max-width: 34ch; }
.note { color: var(--muted); font-size: 14px; margin: 16px 0 0; }


/* Pasos */




@media (max-width: 720px) {
  section { padding: 48px 0; }
  .hero { padding: 84px 0 76px; }
  .hero .btn, .cta-actions .btn { width: 100%; }
}

/* ---------- Hero en azul señal con trama de puntos ---------- */
.hero { position: relative; overflow: hidden; background: var(--signal); color: #fff; border-bottom: 0; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero .lede { color: rgba(255, 255, 255, .9); }
.hero .btn { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn:hover { background: var(--bg); }
.hero .btn-cta { min-height: 54px; padding: 0 26px; font-size: 17px; gap: 10px; transition: transform .15s ease, background .15s ease; }
.hero .btn-cta .arr { transition: transform .15s ease; }
.hero .btn-cta:hover { transform: translateY(-2px); }
.hero .btn-cta:hover .arr { transform: translateX(4px); }
/* Escritorio: título en tres líneas fijas y bajada en una sola */
.br-d { display: none; }
@media (min-width: 900px) {
  .br-d { display: inline; }
  .hero h1 { max-width: none; }
  .hero .lede { max-width: none; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .hero .btn-cta, .hero .btn-cta .arr { transition: none; } .hero .btn-cta:hover, .hero .btn-cta:hover .arr { transform: none; } }
.hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Preguntas interactivas ---------- */
.qa { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: repeat(5, auto) 1fr; column-gap: 40px; align-items: start; }
.qa-item { display: contents; }
.qa-q { grid-column: 1; display: flex; align-items: baseline; gap: 14px; width: 100%; text-align: left; padding: 20px 4px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--muted); font: 600 19px/1.3 var(--font-title); letter-spacing: -.01em; cursor: pointer; transition: color .15s ease; }
.qa-item:last-child .qa-q { border-bottom: 1px solid var(--line); }
.qa-n { font: 500 12.5px/1 var(--font-data); color: var(--muted); transition: color .15s ease; }
.qa-q:hover { color: var(--ink); }
.qa-q[aria-expanded="true"] { color: var(--ink); box-shadow: inset 3px 0 0 var(--signal); padding-left: 16px; }
.qa-q[aria-expanded="true"] .qa-n { color: var(--signal); }
.qa-panel { grid-column: 2; grid-row: 1 / span 6; background: var(--bg); border-radius: var(--r-card); padding: 28px; display: flex; flex-direction: column; gap: 20px; min-height: 320px; }
.qa-panel > p:first-child { margin: 0; color: var(--ink); font-size: 18px; }
.js .qa-panel[data-off] { display: flex; visibility: hidden; opacity: 0; pointer-events: none; }
.js .qa-panel:not([data-off]) { animation: panel-in .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.viz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; display: grid; gap: 12px; }
.viz small { color: var(--muted); font-size: 13px; }
.num { font: 600 48px/1 var(--font-text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.num span { color: #8b919c; }
.state { display: inline-block; justify-self: start; padding: 3px 8px; border-radius: 3px; font-size: 12.5px; font-weight: 600; }
.state.ok { color: #137549; background: #e2f3e9; }
.state.warn { color: #8c5a00; background: #fcefd2; }
.state.alert { color: #b42318; background: #fde6e3; }
.state.neutral { color: var(--muted); background: #e7e9ed; }
.viz svg { width: 100%; height: auto; display: block; }
.viz-range { transition: border-color .3s ease; }
.viz-range.alert { border-color: #f3c2bc; }
.vr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.viz-range .num { transition: color .3s ease; }
.viz-range.alert .num { color: #b42318; }
.viz-range .num [data-int] { color: inherit; }
.viz-range .num .dec { color: #8b919c; }
.viz-range svg { overflow: visible; }
.viz-range .band { fill: #e2f3e9; }
.viz-range .lim { stroke: #b42318; stroke-width: 1.2; stroke-dasharray: 4 3; }
.viz-range .lim-t { font: 500 9px var(--font-data); fill: #b42318; }
.viz-range .area { fill: rgba(20, 22, 27, .05); }
.viz-range .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-range .dot { fill: var(--signal); }
.viz-range.alert .dot { fill: #b42318; }
.viz-range .ring { fill: none; stroke: var(--signal); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ring-pulse 1.6s ease-out infinite; }
.viz-range.alert .ring { stroke: #b42318; }
@keyframes ring-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }
.viz-range .ticks text { font: 500 9px var(--font-data); fill: var(--muted); }
.notice { display: grid; gap: 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
/* Aviso como notificación de d2do: símbolo, app, hora y estado arriba; título y dato abajo */
.n-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font: 500 11.5px/1 var(--font-data); color: var(--muted); }
.n-head img { width: 15px; height: auto; display: block; }
.n-head span:nth-child(2) { color: var(--ink); }
.n-head .n-time::before { content: "· "; }
.n-head .state { margin-left: auto; font-family: var(--font-text); }
.notice small { font-family: var(--font-data); font-size: 12px; }
.notice.alert-n { background: var(--alert-fill); border-color: var(--alert-line); }
.notice.alert-n strong { color: var(--alert-ink); }
.notice.alert-n .state.alert { background: var(--alert-ink); color: #fff; }
/* La alerta entra de golpe cada vez que se abre la pregunta */
.viz-alert { gap: 0; }
/* El lugar de la alerta se abre y empuja hacia abajo al aviso anterior, como un historial */
/* Antes de que la pregunta esté activa no hay alerta: solo los avisos viejos */
.notice-slot { display: grid; grid-template-rows: 0fr; }
.notice-slot .notice.alert-n { opacity: 0; }
.qa-panel.play .notice-slot { grid-template-rows: 1fr; }
.qa-panel.play .notice-slot .notice.alert-n { opacity: 1; }
.notice-slot-in { min-height: 0; overflow: hidden; margin: 0 -12px; padding: 0 12px; }
.notice-slot-in .notice { margin-bottom: 12px; }
.qa-panel.play .notice-slot { animation: slot-open .4s cubic-bezier(.22, 1, .36, 1) .35s backwards; }
@keyframes slot-open { from { grid-template-rows: 0fr; } to { grid-template-rows: 1fr; } }
.qa-panel.play .notice.alert-n { animation: notif-in .5s cubic-bezier(.34, 1.56, .64, 1) .5s backwards, notif-shake .45s ease 1.05s; }
.qa-panel.play .notice.alert-n .state.alert { animation: tag-pulse .9s ease-out 1.15s 2; }
@keyframes notif-in { from { opacity: 0; transform: translateY(-22px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes notif-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes tag-pulse { from { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); } to { box-shadow: 0 0 0 10px rgba(180, 35, 24, 0); } }
.notice small { color: var(--muted); }
.viz-alert { background: transparent; border: 0; padding: 0; }
.viz-map { padding: 0; overflow: hidden; }
.map { position: relative; }
.map svg { display: block; width: 100%; height: auto; }
.map .land { fill: #eceef1; }
.map .water { fill: #d6dcfb; }
.map .park { fill: #dcefe3; }
.map .roads-casing path { fill: none; stroke: #d3d7de; stroke-width: 9; stroke-linecap: round; }
.map .roads path { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; }
.map .labels text { font: 500 6.5px var(--font-data); fill: #8b919c; letter-spacing: .02em; }
.map .labels .park-t { fill: #137549; }
.map .route-full { fill: none; stroke: var(--signal); stroke-opacity: .25; stroke-width: 3.5; stroke-linejoin: round; stroke-dasharray: 2 4; stroke-linecap: round; }
.map .trail { fill: none; stroke: var(--signal); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.map .dest path { fill: var(--ink); }
.map .dest circle { fill: #fff; }
.map .veh .cone { fill: var(--signal); opacity: .16; }
.map .veh .halo { fill: #fff; }
.map .veh .core { fill: var(--signal); }
.map-chip { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); font-size: 12.5px; }
.map-chip .spd { font: 500 12px var(--font-data); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 7ch; }
.map-zoom { position: absolute; right: 10px; bottom: 34px; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); }
.map-zoom span { width: 24px; height: 24px; display: grid; place-items: center; color: var(--muted); font-size: 15px; }
.map-zoom span + span { border-top: 1px solid var(--line); }
.map-scale { position: absolute; left: 10px; bottom: 8px; display: flex; align-items: center; gap: 6px; font: 500 10px var(--font-data); color: var(--muted); }
.map-scale i { width: 40px; height: 5px; border: 1.5px solid var(--muted); border-top: 0; }
.viz-level .num [data-lint] { color: inherit; }
.viz-level .num .dec { color: #8b919c; }
.viz-level { transition: border-color .3s ease; }
.viz-level.alert { border-color: #f3c2bc; }
.viz-level.alert .num { color: #b42318; }
.gauge { display: grid; gap: 4px; margin-top: 4px; }
.gauge-track { position: relative; height: 18px; background: #e7e9ed; border-radius: 3px; overflow: hidden; }
.gauge-fill { position: absolute; inset: 0 auto 0 0; width: 92%; background: var(--ink); transition: background-color .3s ease; }
.viz-level.warn .gauge-fill { background: #8c5a00; }
.viz-level.alert .gauge-fill { background: #b42318; }
.gauge-min { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #b42318; }
.gauge-ticks { position: relative; height: 6px; }
.gauge-ticks i { position: absolute; top: 0; width: 1px; height: 6px; background: #b8bdc6; }
.gauge-ticks i:nth-child(odd) { height: 4px; }
.gauge-labels { position: relative; display: flex; justify-content: space-between; font: 500 9.5px var(--font-data); color: var(--muted); }
.gauge-labels .min-l { position: absolute; transform: translateX(-50%); color: #b42318; white-space: nowrap; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cash-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.cash-legend i { width: 9px; height: 9px; border-radius: 2px; margin-left: 6px; }
.cash-legend i.in { background: #2a8a4f; }
.cash-legend i.out { background: #cc4b37; }
.cash-total { display: flex; align-items: baseline; gap: 12px; }
.cash-total small { font: 500 12.5px var(--font-data); color: var(--muted); }
.cash-total .num { font-variant-numeric: tabular-nums; }
.viz-cash .axis { stroke: #d3d7de; stroke-width: 1; }
.viz-cash .b-in { fill: #2a8a4f; }
.viz-cash .b-out { fill: #cc4b37; }

@media (max-width: 720px) {
  /* Celular: carrusel horizontal de tarjetas, todas del mismo alto */
  .qa { display: flex; align-items: stretch; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 4px; scroll-padding: 0 20px; scrollbar-width: none; }
  .qa::-webkit-scrollbar { display: none; }
  .qa-item { flex: 0 0 86%; scroll-snap-align: start; display: flex; flex-direction: column; background: var(--bg); border-radius: var(--r-card); }
  .qa-q, .qa-item:last-child .qa-q, .qa-q[aria-expanded="true"] { border: 0; padding: 20px 20px 4px; color: var(--ink); box-shadow: none; cursor: default; }
  .qa-q .qa-n { color: var(--signal); }
  .qa-panel, .js .qa-panel[data-off] { flex: 1; display: flex; visibility: visible; opacity: 1; pointer-events: auto; background: transparent; margin: 0; padding: 8px 20px 20px; min-height: 0; }
  .qa-panel > p:first-child { font-size: 16.5px; }
  .qa-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
  .qa-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #d3d7de; cursor: pointer; transition: width .2s ease, background .2s ease; }
  .qa-dots button[aria-current="true"] { width: 22px; border-radius: 4px; background: var(--signal); }
  .num { font-size: 40px; }
  .map-chip { right: 10px; flex-wrap: wrap; row-gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .qa-panel, .viz-range .ring, .ev-card, .ev-card .state, .notice-slot, .notice.alert-n, .notice.alert-n .state { animation: none !important; }
}

/* ---------- Qué nos diferencia: bento ---------- */
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { --mx: 50%; --my: 50%; position: relative; overflow: hidden; grid-column: span 3; display: grid; gap: 10px; align-content: start; min-height: 200px; padding: 24px; background: var(--bg); border-radius: var(--r-card); }
.card.wide { grid-column: span 4; }
.card:nth-child(3) { grid-column: span 2; }
.card:nth-child(2) { grid-column: span 2; }
.card:nth-child(4) { grid-column: span 4; }
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s ease; background: radial-gradient(260px circle at var(--mx) var(--my), rgba(36, 56, 245, .10), transparent 70%); }
.card.ink::after { background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 255, 255, .12), transparent 70%); }
.card:hover::after { opacity: 1; }
.card .idx { font: 500 13px/1 var(--font-data); color: var(--signal); margin-bottom: 14px; }
.card strong { font: 600 clamp(20px, 2.6vw, 28px)/1.2 var(--font-title); letter-spacing: -.015em; max-width: 22ch; }
.card p { margin: 0; color: var(--muted); max-width: 40ch; }
.card.ink { background: var(--ink); color: #fff; }
.card.ink .idx { color: #8fa0ff; }
.card.ink p { color: rgba(255, 255, 255, .78); }

/* aparición al hacer scroll: una vez, ≤ 16 px */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal]:nth-child(2) { transition-delay: .12s; }
.js [data-reveal]:nth-child(3) { transition-delay: .24s; }
.js [data-reveal]:nth-child(4) { transition-delay: .36s; }
.js [data-reveal]:nth-child(5) { transition-delay: .48s; }

/* ---------- Mail: la dirección es el botón ---------- */

@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr; }
  .card, .card.wide, .card:nth-child(2), .card:nth-child(3), .card:nth-child(4) { grid-column: auto; min-height: 0; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .card::after { transition: none; }
}

/* ---------- Diferencias: 5 tarjetas ---------- */
.card:nth-child(1) { grid-column: span 4; }
.card:nth-child(2) { grid-column: span 2; }
.card:nth-child(3), .card:nth-child(4), .card:nth-child(5) { grid-column: span 2; }

/* ---------- Footer: cierre en tinta con la marca gigante ---------- */
.foot { position: relative; overflow: hidden; background: var(--ink); color: rgba(255, 255, 255, .78); padding: 64px 0 0; border: 0; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr); gap: 40px; }
.foot-tag { display: inline-block; margin-bottom: 14px; font: 500 12.5px/1 var(--font-data); letter-spacing: .04em; color: #8fa0ff; }
.foot-brand p { margin: 0; color: #fff; font: 600 clamp(20px, 2.4vw, 26px)/1.25 var(--font-title); letter-spacing: -.01em; max-width: 24ch; }
.foot-col { display: grid; gap: 10px; align-content: start; }
.foot-col h3 { margin: 0 0 4px; font: 500 12.5px/1 var(--font-data); letter-spacing: .04em; color: rgba(255, 255, 255, .5); text-transform: lowercase; }
.foot-col a { color: #fff; text-decoration: none; width: fit-content; border-bottom: 1px solid rgba(255, 255, 255, .25); }
.foot-col a:hover { border-color: #fff; }
.foot-mail { font-family: var(--font-data); font-size: 14px; }

@media (max-width: 720px) {
  .card:nth-child(n) { grid-column: auto; }
  .foot { padding-top: 44px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ---------- Un caso: tres columnas con numerales grandes ---------- */
#caso { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-lead { font: 600 clamp(30px, 5.4vw, 60px)/1.05 var(--font-title); letter-spacing: -.03em; max-width: 20ch; text-wrap: balance; margin: 0 0 44px; }
.case-lead em { font-style: normal; color: var(--signal); }
.case-cols { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.case-cols::before { content: ""; position: absolute; top: -2px; left: 0; width: var(--fill, 100%); height: 3px; background: var(--signal); border-radius: 2px; transition: width 1.1s cubic-bezier(.22, 1, .36, 1); z-index: 1; }
.case-cols.reset::before { transition: none; }
.js .case-cols[data-reveal] { transform: none; }
/* Nodo de cada etapa sobre la línea: se pinta cuando la barra llega */
.case-cols li { position: relative; }
.case-cols li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid #d3d7de; box-sizing: border-box; transition: background .3s ease, border-color .3s ease; z-index: 1; }
.case-cols li + li::before { left: -5px; }
.case-cols li.on::before { background: var(--signal); border-color: var(--signal); }
.case-cols li::before { z-index: 2; }
/* Etapa activa en tinta, las otras atenuadas */
/* La etapa activa se destaca atenuando el texto de las otras, no el li entero: así las bolitas y la línea nunca bajan de opacidad */
.case-cols li > * { transition: opacity .4s ease; }
.case-cols.playing li > * { opacity: .4; }
.case-cols.playing li.cur > * { opacity: 1; }
.js .case-cols:not(.in) li { opacity: 0; transform: translateY(14px); }
.case-cols li { padding: 28px 36px 12px; display: grid; align-content: start; gap: 12px; transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1); }
.case-cols li:first-child { padding-left: 0; }
.case-cols li + li { border-left: 1px solid var(--line); }
.big { display: block; font: 600 clamp(20px, 2.2vw, 26px)/1.2 var(--font-title); letter-spacing: -.015em; color: var(--ink); }
.case-cols p { margin: 0; color: var(--muted); font-size: 16px; max-width: 34ch; }

/* ---------- Contacto: grilla a la vista ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--signal); color: #fff; padding: 96px 0; --gx: 50%; --gy: 50%; }
.cta-band::after { content: ""; position: absolute; inset: auto 0 0 0; height: 60%; pointer-events: none; background: radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, .28), transparent 65%); }
.contact-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .26) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .26) 1px, transparent 1px); background-size: 56px 56px; background-position: center; -webkit-mask-image: radial-gradient(ellipse 85% 90% at center, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 85% 90% at center, #000 40%, transparent 100%); }
.contact-grid.hot { background-image: linear-gradient(rgba(255, 255, 255, .7) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .7) 1px, transparent 1px); -webkit-mask-image: radial-gradient(200px circle at var(--gx) var(--gy), #000, transparent); mask-image: radial-gradient(200px circle at var(--gx) var(--gy), #000, transparent); opacity: 0; transition: opacity .3s ease; }
.cta-band:hover .contact-grid.hot { opacity: 1; }
.contact-card { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 56px 40px; display: grid; justify-items: center; gap: 16px; text-align: center; background: var(--ink); color: #fff; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; }
.contact-card .tag { margin: 0; color: #8fa0ff; }
.contact-card h2 { color: #fff; font-size: clamp(32px, 6vw, 58px); line-height: 1.05; letter-spacing: -.03em; margin: 0; max-width: 16ch; }
.contact-sub { margin: 0 0 12px; color: rgba(255, 255, 255, .78); font-size: 18px; max-width: 36ch; }
.contact-card .btn.wa { min-height: 56px; padding: 0 28px; font-size: 17px; background: var(--signal); border-color: var(--signal); color: #fff; }
.contact-card .btn.wa:hover { background: #3b4dff; border-color: #3b4dff; }
.contact-mail { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; color: rgba(255, 255, 255, .6); font: 500 12.5px/1 var(--font-data); letter-spacing: .04em; }
.contact-card .mail-copy { min-height: 40px; padding: 0 14px; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .3); font-size: 15px; }
.contact-card .mail-copy:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

@media (max-width: 720px) {
  .case-cols { grid-template-columns: 1fr; }
  .case-cols li, .case-cols li:first-child { padding: 24px 0 8px; }
  .case-cols li + li { border-left: 0; border-top: 1px solid var(--line); }
  /* Celular: cronología vertical, con riel a la izquierda y la línea azul que baja */
  .case-cols { border-top: 0; padding-left: 30px; }
  .case-cols::after { content: ""; position: absolute; left: 4px; top: var(--start, 35px); height: var(--rail, calc(100% - 35px)); width: 2px; background: var(--line); }
  .case-cols::before { top: var(--start, 35px); left: 3.5px; width: 3px; height: var(--fill, calc(100% - 35px)); transition: height 1.1s cubic-bezier(.22, 1, .36, 1); }
  .case-cols li::before, .case-cols li + li::before { left: -30px; top: 30px; }
  .cta-band { padding: 56px 0; }
  .contact-card { padding: 36px 20px; }
  .contact-card .btn.wa { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .case-cols:not(.in) li, .case-cols::before, .case-cols li, .case-cols li > * { transition: none; }
  .js .case-cols:not(.in) li { opacity: 1; transform: none; }
}

/* Botón del mail (base) */
.mail-copy { text-decoration: none; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: var(--r-btn); font: 500 15px/1 var(--font-data); cursor: pointer; transition: background .15s ease, border-color .15s ease; }



/* ---------- Paneles: el recuadro llena el alto disponible ---------- */
@media (min-width: 721px) { .qa-dots { display: none; } }
.qa-panel > .viz { flex: 1 1 auto; min-height: 0; }
.qa-panel { align-self: stretch; }
.viz-range { display: flex; flex-direction: column; }
.viz-range svg { margin: auto 0; }
.viz-range .avisos { margin-top: auto; }

/* ¿Pasó algo?: historial que se corta con un degradé en el borde inferior */
.viz-alert { position: relative; overflow: hidden; min-height: 240px; }
/* El historial no suma altura: llena el lugar que deja la tarjeta y se corta abajo */
.alert-feed { position: absolute; inset: 0; display: flex; flex-direction: column; }
.viz-alert .notice.quiet + .notice.quiet { margin-top: 12px; }
.viz-alert::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(rgba(245, 246, 248, 0), var(--bg)); pointer-events: none; }

/* Mapa: llena el recuadro; la cámara sigue al vehículo */
.viz-map { display: flex; flex-direction: column; }
.viz-map .map { flex: 1; min-height: 260px; overflow: hidden; }
.viz-map .map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .labels text { font-size: 10px; }
.map .labels .water-t { fill: #6f7fd9; }
.map .roads-casing path { stroke-width: 13; }
.map .roads path { stroke-width: 10; }
.map .route-full, .map .trail { stroke-width: 4.5; }

/* Nivel: barra vertical que ocupa todo el alto */
.viz-level { display: flex; flex-direction: column; }
.lv-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; min-height: 200px; }
.lv-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lv-info .avisos { margin-top: auto; }
/* Avisos (temperatura y nivel): el mismo bloque, separado del resto del panel */
.avisos { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.avisos-t { font: 500 11.5px/1 var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.avisos-list { display: grid; gap: 6px; min-height: 46px; align-content: center; }
/* Card de avisos (temperatura y nivel): una sola, que cambia de estado en el lugar. Mismo tamaño en todos los estados */
.ev-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); transition: background-color .35s ease, border-color .35s ease; }
.ev-card img { width: 15px; height: auto; display: block; }
.ev-card .ev-x { display: grid; gap: 1px; min-width: 0; }
.ev-card strong, .ev-card small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-card strong { font: 600 13px/1.2 var(--font-text); color: var(--ink); transition: color .35s ease; }
.ev-card small { font: 500 11.5px/1.3 var(--font-data); color: var(--muted); }
.ev-card .state { font: 600 11.5px/1.4 var(--font-text); white-space: nowrap; transition: background-color .35s ease, color .35s ease; }
.ev-card[data-kind="warn"] { background: #fcefd2; border-color: #efd8a0; }
.ev-card[data-kind="warn"] strong { color: #8c5a00; }
.ev-card[data-kind="warn"] .state { background: #8c5a00; color: #fff; }
.ev-card[data-kind="alert"] { background: var(--alert-fill); border-color: var(--alert-line); }
.ev-card[data-kind="alert"] strong { color: var(--alert-ink); }
.ev-card[data-kind="alert"] .state { background: var(--alert-ink); color: #fff; }
/* Al entrar en alerta: un pulso de color alrededor de la card, sin mover nada */
.ev-card.flash { animation: card-flash 1.1s ease-out 2; }
@keyframes card-flash { from { box-shadow: 0 0 0 0 rgba(180, 35, 24, .4); } to { box-shadow: 0 0 0 9px rgba(180, 35, 24, 0); } }
@media (prefers-reduced-motion: reduce) { .ev-card, .ev-card * { transition: none !important; } }
.lv-gauge { display: flex; gap: 8px; }
.lv-scale { position: relative; width: 50px; font: 500 9.5px var(--font-data); color: var(--muted); }
.lv-scale span { position: absolute; right: 0; bottom: var(--p); transform: translateY(50%); white-space: nowrap; }
.lv-scale .min-l { color: #b42318; }
.lv-scale .u { font-style: normal; }
.lv-track { position: relative; width: 32px; background: #e7e9ed; border-radius: 4px; }
.lv-track .gauge-fill { position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: var(--lvl, 92%); border-radius: 0 0 4px 4px; }
.lv-track .gauge-min { position: absolute; left: -4px; right: -4px; top: auto; bottom: 25%; width: auto; height: 2px; margin: 0; }
.lv-ticks i { position: absolute; left: -7px; bottom: var(--p); width: 5px; height: 1px; background: #b8bdc6; }

/* Caja: saldo arriba y barras que llenan el resto */
.viz-cash { display: flex; flex-direction: column; }
.cash-total { display: grid; gap: 4px; }
.cash-total .num { font-size: clamp(28px, 8vw, 40px); white-space: nowrap; }
.cash-chart { position: relative; flex: 1; min-height: 140px; display: flex; flex-direction: column; overflow: hidden; }
.cash-chart svg { flex: 1; width: 100%; height: auto; min-height: 0; }
.cash-days { position: relative; height: 18px; }
.cash-days span { position: absolute; top: 5px; transform: translateX(-50%); font: 500 10px var(--font-data); color: var(--muted); white-space: nowrap; }
.cash-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.cash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cash-legend i { margin-left: 0; }

.lv-info .num { font-size: clamp(30px, 9vw, 44px); white-space: nowrap; }

/* Un caso en celular: la línea sigue al scroll, sin retardo */
.case-cols.scrolly::before { transition: none; }
.case-cols.scrolly li > * { transition: opacity .25s ease; }

/* Qué nos diferencia en celular: todas las tarjetas claras (apiladas, la tinta no compone) */
@media (max-width: 720px) {
  .card.ink { background: var(--bg); color: var(--ink); }
  .card.ink .idx { color: var(--signal); }
  .card.ink p { color: var(--muted); }
}

/* Hero en celular: el aire vertical crece con el alto de la pantalla (más presencia en teléfonos altos, igual en los chicos) */
@media (max-width: 720px) {
  .hero { padding: clamp(84px, 15vh, 170px) 0 clamp(76px, 14vh, 160px); padding: clamp(84px, 15svh, 170px) 0 clamp(76px, 14svh, 160px); }
  .hero h1 { font-size: clamp(36px, 9.5vw, 48px); text-wrap: balance; }
}

/* Qué nos diferencia en celular: tarjetas apiladas al scrollear */
@media (max-width: 720px) {
  .bento { display: block; padding-bottom: 8px; }
  .card { position: sticky; min-height: 180px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--bg); }
  .card:nth-child(1) { top: 16px; }
  .card:nth-child(2) { top: 28px; background: var(--surface); }
  .card:nth-child(3) { top: 40px; }
  .card:nth-child(4) { top: 52px; background: var(--surface); }
  .card:nth-child(5) { top: 64px; }
  .js .card[data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Qué nos diferencia: el número va a la izquierda del título, como en las preguntas */
.card { grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: baseline; }
.card .idx { margin-bottom: 0; }
.card p { grid-column: 2; }


/* Nivel en escritorio: barra horizontal (en celular queda vertical, llenando la tarjeta) */
@media (min-width: 721px) {
  .lv-body { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
  .lv-info { display: contents; }
  .lv-info .num { order: 1; }
  .lv-gauge { order: 2; flex-direction: column-reverse; gap: 10px; }
  .lv-info .avisos { order: 3; margin-top: auto; }
  .lv-track { width: 100%; height: 28px; }
  .lv-track .gauge-fill { top: 0; bottom: 0; right: auto; width: var(--lvl, 92%); height: auto; border-radius: 4px 0 0 4px; }
  .lv-track .gauge-min { top: -4px; bottom: -4px; left: 25%; right: auto; width: 2px; height: auto; margin-left: -1px; }
  .lv-ticks i { left: var(--p); bottom: -9px; width: 1px; height: 5px; }
  .lv-scale { width: auto; height: 14px; margin-top: 4px; }
  .lv-scale span { right: auto; bottom: auto; top: 0; left: var(--p); transform: translateX(-50%); }
  .lv-scale span:first-child { transform: translateX(-100%); }
  .lv-scale span:last-child { transform: none; }
}

/* Escritorio: texto de la pregunta en la lista y tres tanques en «¿Cuánto queda?» */
.lv-second, .qa-desc { display: none; }
@media (min-width: 721px) {
  .qa-panel > p:first-child { display: none; }
  .qa-q > span:last-child { display: grid; gap: 8px; }
  .qa-q[aria-expanded="true"] .qa-desc { display: block; font: 400 14.5px/1.5 var(--font-text); color: var(--muted); letter-spacing: 0; }
  .lv-second { display: grid; gap: 8px; order: 3; padding-top: 16px; border-top: 1px solid var(--line); }
  .lv-third { order: 3; }
  .lv-info .avisos { order: 4; }
  .lv2-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
  .lv2-val { font: 600 15px var(--font-text); color: var(--ink); font-variant-numeric: tabular-nums; }
  .lv-track.lv2 { height: 18px; }
  .lv-track.lv2 .gauge-fill { background: var(--ink); }
}

/* Fila compacta en la columna angosta del nivel (celular): símbolo y etiqueta arriba, texto abajo */
@media (max-width: 720px) {
  .lv-info .ev-card { grid-template-columns: auto auto; justify-content: space-between; align-items: center; align-content: start; row-gap: 4px; padding: 6px 8px; }
  .lv-info .ev-card .ev-x { grid-column: 1 / -1; grid-row: 2; }
  .lv-info .ev-card small { font-size: 11px; }
  /* Barra vertical más angosta (sin «%» en la escala): la card de avisos gana ancho y su texto entra en una línea */
  .lv-body { column-gap: 10px; }
  .lv-gauge { gap: 6px; }
  .lv-scale { width: 36px; }
  .lv-scale .u { display: none; }
  .lv-track { width: 24px; }
}

/* ---------- Footer: isologotipo gigante, cortado abajo y con una luz que lo recorre ---------- */
@property --lx { syntax: '<length-percentage>'; inherits: true; initial-value: 50%; }
@property --ly { syntax: '<length-percentage>'; inherits: true; initial-value: 20%; }
.foot-mark { --w: min(98vw, 2400px); margin-top: 20px; height: calc(var(--w) * .165); overflow: hidden; position: relative; }
/* el logo mide 4,29 : 1; se muestra el 70 % de arriba y el resto queda cortado */
.foot-mark-box { --lx: 50%; --ly: 20%; position: relative; width: var(--w); aspect-ratio: 3064.64 / 714; margin-left: 50%; transform: translateX(-50%); animation: light-sweep 9s ease-in-out infinite alternate; }
.foot-mark.is-pointer .foot-mark-box { animation: none; }
@keyframes light-sweep { from { --lx: 14%; } to { --lx: 86%; } }
/* brillo azul detrás de las letras */
.foot-mark-box::before { content: ""; position: absolute; inset: -30% 0 0; background: radial-gradient(circle 46% at var(--lx) var(--ly), rgba(36, 56, 245, .55), rgba(36, 56, 245, 0) 70%); pointer-events: none; }
/* las letras: el SVG como máscara de un fondo con la luz (blanca cerca del foco, tenue lejos) */
.foot-mark-logo { position: absolute; inset: 0; background: radial-gradient(circle 22vw at var(--lx) var(--ly), rgba(255, 255, 255, .95), rgba(176, 188, 255, .5) 45%, rgba(255, 255, 255, 0) 78%), linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04)); -webkit-mask: url(assets/d2do-isologotipo-blanco.svg) center top / 100% auto no-repeat; mask: url(assets/d2do-isologotipo-blanco.svg) center top / 100% auto no-repeat; }
@media (max-width: 720px) { .foot-mark { --w: 98vw; } .foot-mark-logo { background: radial-gradient(circle 60vw at var(--lx) var(--ly), rgba(255, 255, 255, .95), rgba(176, 188, 255, .5) 45%, rgba(255, 255, 255, 0) 78%), linear-gradient(to bottom, rgba(255, 255, 255, .2), rgba(255, 255, 255, .04)); } }
@media (prefers-reduced-motion: reduce) { .foot-mark-box { animation: none; } }
