:root {
	--azul: #0466bb;
	--azul-oscuro: #034f91;
	--verde: #22d2a4;
	--celeste: #e9f2fe;
	--tinta: #0b2f57;
	--texto: #4d5f73;
	--rojo: #ff4d75;
	--header: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
	font-family: 'Mulish', Helvetica, Arial, sans-serif;
	color: var(--texto);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; }

/* ---------- Intro (loader) ---------- */
body.con-intro { overflow: hidden; }
.intro {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle at 80% 110%, rgba(34, 210, 164, .28) 0, rgba(34, 210, 164, 0) 45%),
		linear-gradient(160deg, #0466bb 0%, #034f91 100%);
	transition: opacity .6s ease, visibility 0s linear .6s;
}
.intro.is-fuera { opacity: 0; visibility: hidden; }
.intro__centro { width: min(340px, 78vw); text-align: center; }
.intro__logo { display: block; width: min(260px, 70vw); height: auto; margin: 0 auto 40px; animation: intro-entra .7s ease both; }
.intro__calle {
	position: relative;
	height: 30px;
	/* calle punteada como la línea central de la escena */
	background: linear-gradient(90deg, rgba(255, 255, 255, .35) 50%, transparent 0) 0 100% / 18px 3px repeat-x;
	animation: intro-entra .7s .1s ease both;
}
.intro__progreso {
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 0;
	border-radius: 3px;
	background: var(--verde);
	box-shadow: 0 0 12px rgba(34, 210, 164, .7);
	animation: intro-avance var(--intro-dur, 2.2s) cubic-bezier(.45, .05, .35, 1) forwards;
}
.intro__auto {
	position: absolute;
	left: 0;
	bottom: 3px;
	transform: translateX(-50%);
	animation: intro-auto var(--intro-dur, 2.2s) cubic-bezier(.45, .05, .35, 1) forwards;
}
.intro__auto svg { display: block; animation: intro-rebote .32s ease-in-out infinite alternate; }
.intro__texto {
	margin: 22px 0 0;
	color: rgba(255, 255, 255, .85);
	font: 600 14px 'Montserrat', sans-serif;
	letter-spacing: .04em;
	animation: intro-entra .7s .2s ease both;
}
.intro__texto:after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: intro-puntos 1.2s steps(4) infinite; }
.intro__iniciar {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 18px 34px;
	border: 0;
	border-radius: 100px;
	background: var(--verde);
	color: #fff;
	font: 700 18px 'Montserrat', sans-serif;
	cursor: pointer;
	box-shadow: 0 0 0 0 rgba(34, 210, 164, .5), 0 14px 30px rgba(0, 30, 70, .35);
	animation: intro-entra .5s ease both, intro-latido 2s 1s ease-out infinite;
	transition: transform .2s ease;
}
.intro__iniciar svg { fill: currentColor; }
.intro__iniciar:hover { transform: scale(1.04); }
.intro__iniciar:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.intro__iniciar[hidden], .intro__nota { display: none; }
.intro.is-listo .intro__calle, .intro.is-listo .intro__texto { display: none; }
.intro.is-listo .intro__nota {
	display: block;
	margin: 16px 0 0;
	color: rgba(255, 255, 255, .75);
	font: 500 13px 'Montserrat', sans-serif;
	animation: intro-entra .5s .15s ease both;
}
/* Selector de idioma (visible junto al botón de inicio) */
.idioma { display: none; }
.intro.is-listo .idioma {
	display: inline-flex;
	gap: 4px;
	margin-top: 22px;
	padding: 4px;
	border-radius: 100px;
	background: rgba(255, 255, 255, .12);
	animation: intro-entra .5s .2s ease both;
}
.idioma button {
	min-width: 92px;
	height: 36px;
	padding: 0 16px;
	border: 0;
	border-radius: 100px;
	background: transparent;
	color: rgba(255, 255, 255, .85);
	font: 600 14px 'Montserrat', sans-serif;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.idioma button:hover { background: rgba(255, 255, 255, .12); }
.idioma button[aria-pressed="true"] { background: #fff; color: var(--azul); }
.idioma button:focus-visible { outline: 3px solid var(--verde); outline-offset: 2px; }
@keyframes intro-latido {
	0% { box-shadow: 0 0 0 0 rgba(34, 210, 164, .55), 0 14px 30px rgba(0, 30, 70, .35); }
	100% { box-shadow: 0 0 0 22px rgba(34, 210, 164, 0), 0 14px 30px rgba(0, 30, 70, .35); }
}
@keyframes intro-entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes intro-avance { to { width: 100%; } }
@keyframes intro-auto { to { left: 100%; } }
@keyframes intro-rebote { to { transform: translateY(-1.5px); } }
@keyframes intro-puntos { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Cabecera ---------- */
.top {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 20;
	height: var(--header);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 max(16px, 5vw);
	background: rgba(4, 102, 187, .96);
	backdrop-filter: saturate(140%) blur(10px);
	box-shadow: 0 2px 14px rgba(4, 50, 100, .22);
}
.top__logo img { display: block; width: 172px; height: auto; }
.top__nav { display: flex; gap: 8px; }
.top__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: 100px;
	color: #fff;
	text-decoration: none;
	font: 500 14px 'Montserrat', sans-serif;
	transition: background-color .2s;
}
.top__pill:hover { background: rgba(255, 255, 255, .12); }
.top__pill--verde { background: rgba(34, 210, 164, .18); }
.top__pill--verde:hover { background: rgba(34, 210, 164, .3); }

/* ---------- Escenario ---------- */
.stage {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	padding-top: var(--header);
	overflow: hidden;
	background: radial-gradient(ellipse 80% 70% at 60% 45%, #f4f9ff 0%, #e6f0fd 100%);
}
#escena { display: block; width: 100%; height: 100%; touch-action: pan-y; }

/* Tarjetas ancladas a la escena */
.overlays { position: absolute; inset: var(--header) 0 0 0; pointer-events: none; }
.tag {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, calc(-100% - 14px));
	opacity: 0;
	transition: opacity .35s ease;
	white-space: nowrap;
	padding: 10px 14px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 10px 28px rgba(4, 70, 140, .16);
	font: 600 13px/1.25 'Montserrat', sans-serif;
	color: var(--tinta);
	will-change: transform;
}
.tag.is-on { opacity: 1; }
.tag:after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	background: inherit;
	transform: translateX(var(--dx, 0px)) rotate(45deg);
	border-radius: 2px;
}
.tag small { display: block; margin-top: 3px; font: 400 12px 'Mulish', sans-serif; color: var(--texto); }
.tag--azul { background: var(--azul); color: #fff; }
.tag--azul small { color: rgba(255, 255, 255, .8); }
.tag--verde { background: var(--verde); color: #fff; }
.tag--verde small { color: rgba(255, 255, 255, .9); }
.tag--rojo { background: var(--rojo); color: #fff; }
.tag--chico { padding: 5px 9px; border-radius: 10px; font-size: 12px; }
.tag--chico:after { width: 8px; height: 8px; margin-left: -4px; bottom: -4px; }

/* Velocímetro */
.speed { min-width: 150px; }
.speed__val { font: 800 30px/1 'Montserrat', sans-serif; letter-spacing: -.02em; }
.speed__val span { font-size: 13px; font-weight: 600; margin-left: 4px; color: var(--texto); }
.speed__bar { position: relative; height: 6px; margin: 8px 0 6px; border-radius: 4px; background: #e3edf9; overflow: hidden; }
.speed__bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: var(--verde); }
.speed__bar b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--tinta); opacity: .5; }
.speed__estado { font: 600 12px 'Montserrat', sans-serif; color: var(--texto); }
.speed.is-over .speed__val { color: var(--rojo); }
.speed.is-over .speed__bar i { background: var(--rojo); }
.speed.is-over .speed__estado { color: var(--rojo); }

/* Ficha del dispositivo */
.device { padding: 14px 16px; transform: translate(24px, -50%); }
.device:after { left: -6px; top: 50%; bottom: auto; margin: -6px 0 0; }
.device h3 { margin: 0 0 8px; font: 700 14px 'Montserrat', sans-serif; color: var(--azul); }
.device ul { margin: 0; padding: 0; list-style: none; }
.device li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	font: 600 13px 'Montserrat', sans-serif;
	color: #9aa8b8;
	transition: color .3s;
}
.device li:before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #cfdbe8;
	box-shadow: 0 0 0 3px rgba(207, 219, 232, .35);
	transition: background .3s, box-shadow .3s;
}
/* el punto nunca se achica aunque el texto ocupe dos líneas */
.device li:before { flex: none; }
.device li.is-on { color: var(--tinta); }
/* Paso 4: infracciones detectables (en rojo) */
.multas h3 { color: var(--rojo); }
.device.multas li.is-on:before { background: var(--rojo); box-shadow: 0 0 0 4px rgba(255, 77, 117, .22); }
.device li.is-on:before { background: var(--verde); box-shadow: 0 0 0 4px rgba(34, 210, 164, .25); }

/* ---------- Panel del paso ---------- */
.panel {
	position: absolute;
	left: max(16px, 5vw);
	top: calc(var(--header) + 40px);
	z-index: 5;
	width: min(400px, 36vw);
	padding: 26px 28px 28px;
	border-radius: 24px;
	background: rgba(255, 255, 255, .86);
	backdrop-filter: blur(14px) saturate(140%);
	box-shadow: 0 24px 60px rgba(4, 70, 140, .14);
}
.panel__eyebrow {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 100px;
	background: var(--verde);
	color: #fff;
	font: 700 13px 'Montserrat', sans-serif;
}
.panel__head { position: relative; margin-top: 18px; min-height: 92px; display: flex; align-items: flex-end; }
.panel__num {
	position: absolute;
	left: -6px;
	top: -14px;
	font: 800 120px/1 'Montserrat', sans-serif;
	color: #d6e6fb;
	letter-spacing: -.04em;
	user-select: none;
}
.panel__title {
	position: relative;
	margin: 0;
	padding-left: 64px;
	font: 700 30px/1.15 'Montserrat', sans-serif;
	letter-spacing: -.02em;
	color: var(--tinta);
}
/* Prólogo: sin número de paso */
.panel.is-prologo .panel__num { display: none; }
.panel.is-prologo .panel__title { padding-left: 0; }
.panel__text { margin: 14px 0 0; font-size: 17px; line-height: 1.6; }
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.panel.is-changing .panel__title,
.panel.is-changing .panel__text,
.panel.is-changing .panel__num { animation: entra .45s ease both; }
.panel.is-changing .panel__text { animation-delay: .06s; }

/* ---------- Final del recorrido: puntos clave dentro del panel ---------- */
.resumen__lema {
	margin: 14px 0 0;
	font: 600 14px 'Montserrat', sans-serif;
	color: var(--texto);
	letter-spacing: .01em;
}
.resumen__lema strong {
	font-weight: 800;
	font-size: 17px;
	background: linear-gradient(90deg, #12b88d 0%, #0466bb 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.panel.is-changing .resumen__lema { animation: entra .6s .35s ease both; }
.resumen__titulo {
	margin: 14px 0 12px;
	font: 700 26px/1.15 'Montserrat', sans-serif;
	letter-spacing: -.02em;
	color: var(--tinta);
}
.resumen__lista { display: grid; gap: 9px; margin: 0 0 20px; padding: 0; list-style: none; }
.resumen__lista li {
	display: flex;
	align-items: center;
	gap: 11px;
	font: 600 14px/1.3 'Montserrat', sans-serif;
	color: var(--tinta);
}
.resumen__lista .m {
	position: relative;
	flex: none;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	color: #fff;
	isolation: isolate;
}
/* brillo superior para darle volumen */
.resumen__lista .m:after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(180deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 55%);
	pointer-events: none;
}
.resumen__lista .m--azul { background: linear-gradient(135deg, #2f8fe6 0%, #0466bb 100%); box-shadow: 0 6px 14px rgba(4, 102, 187, .3); }
.resumen__lista .m--rojo { background: linear-gradient(135deg, #ff8a7a 0%, #ff4d75 100%); box-shadow: 0 6px 14px rgba(255, 77, 117, .3); }
.resumen__lista .m--verde { background: linear-gradient(135deg, #4fe3bd 0%, #12b88d 100%); box-shadow: 0 6px 14px rgba(34, 210, 164, .35); }
.resumen__lista svg { position: relative; z-index: 1; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.resumen__lista svg .punto { fill: currentColor; stroke: none; }
.resumen__lista .m--azul svg .punto { fill: #4fe3bd; }  /* luz verde del dispositivo, como en la escena */
.resumen__lista .m--verde svg .punto { fill: #fff; }
.resumen__lista .m--rojo svg .punto { fill: #fff; }
@keyframes icono-entra { 0% { opacity: 0; transform: scale(.4) rotate(-12deg); } 70% { transform: scale(1.12) rotate(3deg); } 100% { opacity: 1; transform: none; } }
.panel.is-changing .resumen li .m { animation: icono-entra .55s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: inherit; }
.panel.is-changing .resumen { animation: entra .45s ease both; }
.panel.is-changing .resumen li { animation: entra .4s ease both; }
.panel.is-changing .resumen li:nth-child(2) { animation-delay: .05s; }
.panel.is-changing .resumen li:nth-child(3) { animation-delay: .1s; }
.panel.is-changing .resumen li:nth-child(4) { animation-delay: .15s; }
.panel.is-changing .resumen li:nth-child(5) { animation-delay: .2s; }
.panel.is-changing .resumen li:nth-child(6) { animation-delay: .25s; }
.final__acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.final__reiniciar, .final__whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 20px;
	border: 0;
	border-radius: 100px;
	font: 600 15px 'Montserrat', sans-serif;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s, box-shadow .2s, background-color .2s;
}
.final__reiniciar { background: var(--verde); color: #fff; box-shadow: 0 8px 20px rgba(34, 210, 164, .35); }
.final__reiniciar svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.final__reiniciar:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(34, 210, 164, .45); }
.final__whatsapp { background: #eef5fe; color: var(--azul); }
.final__whatsapp:hover { background: #dcebfc; }

/* ---------- Controles ---------- */
.controls {
	position: absolute;
	left: 50%;
	bottom: 28px;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 10px;
	transform: translateX(-50%);
	padding: 8px;
	border-radius: 100px;
	background: rgba(255, 255, 255, .9);
	backdrop-filter: blur(12px);
	box-shadow: 0 14px 40px rgba(4, 70, 140, .16);
}
.controls__play {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--azul);
	color: #fff;
	cursor: pointer;
}
.controls__play svg { fill: currentColor; }
.controls__play .i-play { display: none; }
.controls__play.is-paused .i-play { display: block; }
.controls__play.is-paused .i-pause { display: none; }
.controls__sonido {
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: #eef5fe;
	color: var(--azul);
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.controls__sonido svg { fill: currentColor; }
.controls__sonido .trazo { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.controls__sonido .i-on { display: none; }
.controls__sonido.is-on { background: var(--verde); color: #fff; }
.controls__sonido.is-on .i-on { display: block; }
.controls__sonido.is-on .i-off { display: none; }
.controls__sonido:hover { background: #dcebfc; }
/* Activo pero esperando un gesto del visitante (los navegadores no dejan sonar antes) */
.controls__sonido.is-pendiente { position: relative; color: var(--verde); background: #e3f8f2; }
.controls__sonido.is-pendiente:before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(34, 210, 164, .5);
	animation: latido 1.8s ease-out infinite;
}
@keyframes latido { to { box-shadow: 0 0 0 22px rgba(34, 210, 164, 0); } }
.sonido-aviso {
	position: absolute;
	right: 4px;
	bottom: calc(100% + 12px);
	padding: 8px 12px;
	border-radius: 12px;
	background: var(--tinta);
	color: #fff;
	font: 600 12px 'Montserrat', sans-serif;
	white-space: nowrap;
	box-shadow: 0 10px 24px rgba(4, 50, 100, .25);
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
	transition: opacity .3s ease, transform .3s ease;
}
.sonido-aviso:after {
	content: "";
	position: absolute;
	right: 16px;
	bottom: -5px;
	width: 10px;
	height: 10px;
	background: inherit;
	transform: rotate(45deg);
	border-radius: 2px;
}
.sonido-aviso.is-on { opacity: 1; transform: none; }
.controls__sonido.is-on:hover { background: #1bbf94; }
.steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.steps button {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px 0 8px;
	border: 0;
	border-radius: 100px;
	background: transparent;
	color: var(--texto);
	font: 600 13px 'Montserrat', sans-serif;
	cursor: pointer;
	overflow: hidden;
	transition: background-color .2s, color .2s;
}
.steps button:hover { background: #eef5fe; }
.steps .n {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e3edf9;
	color: var(--azul);
	font-weight: 700;
	transition: background-color .2s, color .2s;
}
/* Avance del paso: el fondo del botón se va llenando hasta pasar al siguiente */
.steps .n, .steps .label { position: relative; z-index: 1; }
.steps .bar { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.steps .bar i {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, rgba(34, 210, 164, .16), rgba(34, 210, 164, .32));
}
.steps .is-active button { background: #eef5fe; color: var(--tinta); }
.steps .is-active .n { background: var(--verde); color: #fff; }
.steps .is-done .n { background: var(--azul); color: #fff; }

.fallback {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	padding: 18px 22px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(4, 70, 140, .16);
	font-weight: 600;
}

/* ---------- Secciones finales ---------- */
/* ---------- Integración por API: puente entre la animación y el pie ---------- */
.stage:after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 120px;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(240, 246, 254, 0) 0%, #f0f6fe 100%);
}
.api {
	padding: 72px max(16px, 5vw) 96px;
	text-align: center;
	background: linear-gradient(180deg, #f0f6fe 0%, #fff 100%);
}
.api__eyebrow {
	display: inline-block;
	padding: 7px 14px;
	border-radius: 100px;
	background: rgba(34, 210, 164, .14);
	color: #0f9a77;
	font: 700 13px 'Montserrat', sans-serif;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.api__titulo {
	max-width: 820px;
	margin: 20px auto 44px;
	font: 700 32px/1.3 'Montserrat', sans-serif;
	letter-spacing: -.02em;
	color: var(--tinta);
}
.api__diagrama {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 760px;
	margin: 0 auto;
}
.api__nodo {
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 64px;
	padding: 0 20px;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(4, 70, 140, .12), inset 0 0 0 1px #e3edf9;
	font: 600 14px/1.25 'Montserrat', sans-serif;
	color: var(--tinta);
	text-align: left;
}
.api__nodo svg { fill: none; stroke: var(--azul); stroke-width: 1.8; stroke-linecap: round; }
.api__nodo--cdv { background: var(--azul); box-shadow: 0 14px 34px rgba(4, 102, 187, .3); }
.api__nodo--cdv img { display: block; width: 132px; height: auto; }
/* Enlace con datos fluyendo (mismo lenguaje que los avisos del paso 6) */
.api__enlace {
	position: relative;
	flex: 1;
	min-width: 90px;
	height: 64px;
	display: grid;
	place-items: center;
	background:
		radial-gradient(circle, var(--azul) 2.2px, transparent 2.6px) 0 50% / 14px 14px repeat-x;
	animation: flujo 1.2s linear infinite;
}
.api__enlace:before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle, var(--verde) 3px, transparent 3.4px) 0 50% / 70px 14px repeat-x;
	animation: flujo 1.2s linear infinite;
	opacity: .9;
}
@keyframes flujo { to { background-position: 70px 50%; } }
.api__api {
	position: relative;
	padding: 6px 12px;
	border-radius: 100px;
	background: var(--verde);
	color: #fff;
	font: 700 12px 'Montserrat', sans-serif;
	letter-spacing: .08em;
	box-shadow: 0 0 0 6px #f6faff;
}
.contacto {
	margin-top: 0;
	padding: 88px 16px 72px;
	text-align: center;
	color: #fff;
	background:
		radial-gradient(circle at 85% 110%, rgba(34, 210, 164, .28) 0, rgba(34, 210, 164, 0) 40%),
		linear-gradient(180deg, #0466bb 0%, #0458a3 100%);
}
.contacto img { display: block; width: 300px; max-width: 80%; height: auto; margin: 0 auto 32px; }
.contacto p { margin: 28px 0 0; font: 500 18px/1.8 'Montserrat', sans-serif; }
.contacto p a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.contacto p a:hover { color: var(--verde); border-color: var(--verde); }
.btn {
	display: inline-block;
	padding: 16px 40px;
	border-radius: 100px;
	background: var(--verde);
	color: #fff;
	text-decoration: none;
	font: 600 17px 'Montserrat', sans-serif;
	box-shadow: 0 6px 18px rgba(34, 210, 164, .35);
	transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(34, 210, 164, .45); }
.pie { padding: 18px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .7); background: #03406f; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	:root { --header: 56px; }
	.top { padding: 0 12px 0 16px; }
	.top__logo img { width: 132px; }
	.top__nav a:not(.top__pill--verde) { display: none; }
	.top__txt { display: none; }
	.top__pill { width: 40px; height: 40px; padding: 0; justify-content: center; }
	.top__pill img { width: 20px; height: 20px; }
	.stage { min-height: 520px; }
	.panel {
		top: auto;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
		left: 10px;
		right: 10px;
		width: auto;
		padding: 12px 16px 14px;
		border-radius: 18px;
		background: rgba(255, 255, 255, .92);
	}
	.panel__eyebrow { display: none; }
	.panel__head { margin-top: 0; min-height: 40px; }
	.panel__num { font-size: 58px; top: -6px; left: -4px; }
	.panel__title { padding-left: 34px; font-size: 19px; }
	.panel__text {
		font-size: 14px;
		line-height: 1.5;
		margin-top: 6px;
		display: -webkit-box;
		-webkit-line-clamp: 4;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	.controls { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 6px; gap: 6px; }
	.resumen__titulo { font-size: 19px; margin: 4px 0 10px; }
	.resumen__lema { margin-top: 8px; font-size: 12px; }
	.resumen__lema strong { font-size: 14px; }
	.resumen__lista { gap: 6px; margin-bottom: 14px; grid-template-columns: 1fr 1fr; column-gap: 10px; }
	.resumen__lista li { font-size: 12px; gap: 7px; align-items: flex-start; }
	.resumen__lista .m { width: 30px; height: 30px; border-radius: 9px; }
	.resumen__lista svg { width: 18px; height: 18px; }
	.panel.is-resumen .panel__eyebrow { display: inline-block; font-size: 11px; padding: 5px 10px; }
	.final__reiniciar, .final__whatsapp { height: 42px; padding: 0 16px; font-size: 14px; }
	.controls__play, .controls__sonido { width: 40px; height: 40px; }
	.steps { gap: 2px; }
	.steps button { height: 40px; }
	.steps .n { width: 28px; height: 28px; }
	/* Ficha del dispositivo: centrada sobre el objeto, como las demás tarjetas */
	.device { transform: translate(-50%, calc(-100% - 46px)); } /* por encima del dispositivo, sin taparlo */
	.device:after { left: 50%; top: auto; bottom: -6px; margin: 0 0 0 -6px; }
	.device { width: min(330px, calc(100vw - 20px)); max-width: none; white-space: normal; padding: 12px; }
	.device h3 { margin-bottom: 8px; font-size: 13px; }
	.device ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
	.device li {
		gap: 7px;
		align-items: center;
		min-height: 38px;
		padding: 6px 8px;
		border-radius: 10px;
		background: #f2f6fb;
		font-size: 11.5px;
		line-height: 1.2;
		transition: color .3s, background-color .3s;
	}
	.device li.is-on { background: #e3f8f2; }
	.multas li.is-on { background: #ffe8ee; }
	.device.multas li.is-on:before { box-shadow: 0 0 0 3px rgba(255, 77, 117, .22); }
	.device li:before { width: 7px; height: 7px; box-shadow: none; }
	.device li.is-on:before { box-shadow: 0 0 0 3px rgba(34, 210, 164, .25); }
	.api { padding: 48px 16px 64px; }
	.api__titulo { font-size: 22px; margin: 16px auto 32px; }
	.api__eyebrow { font-size: 11px; }
	.api__diagrama { flex-direction: column; }
	.api__nodo { min-height: 56px; }
	.api__enlace {
		width: 64px;
		height: 72px;
		min-width: 0;
		flex: none;
		background-position: 50% 0;
		background-size: 14px 14px;
		background-repeat: repeat-y;
		animation-name: flujoV;
	}
	.api__enlace:before { background-position: 50% 0; background-size: 14px 70px; background-repeat: repeat-y; animation-name: flujoV; }
	.contacto { padding: 64px 16px 56px; }
	.steps button { padding: 0 6px; }
	.steps .label { display: none; }
	.controls { bottom: 16px; }
	.tag { font-size: 12px; padding: 8px 11px; }
	.speed { min-width: 120px; }
	.speed__val { font-size: 24px; }
}

/* Teléfono en horizontal: pantalla baja, el panel va a la izquierda y compacto */
@media (max-width: 980px) and (orientation: landscape) and (max-height: 560px) {
	.stage { min-height: 0; }
	.panel {
		top: calc(var(--header) + 8px);
		bottom: auto;
		left: 10px;
		right: auto;
		width: min(320px, 42vw);
		padding: 10px 14px 12px;
	}
	.panel__text { -webkit-line-clamp: 3; font-size: 13px; }
	.controls { bottom: 8px; }
	/* Resumen final en pantallas bajas: compacto y sin pisar los controles */
	.panel { max-height: calc(100svh - var(--header) - 76px); overflow-y: auto; }
	.resumen__titulo { font-size: 16px; margin: 2px 0 6px; }
	.resumen__lema { margin-top: 4px; font-size: 11px; }
	.resumen__lema strong { font-size: 12px; }
	.resumen__lista { gap: 4px; column-gap: 8px; margin-bottom: 10px; }
	.resumen__lista li { font-size: 11px; line-height: 1.2; }
	.resumen__lista .m { width: 22px; height: 22px; border-radius: 7px; }
	.resumen__lista svg { width: 13px; height: 13px; }
	.final__reiniciar, .final__whatsapp { height: 36px; padding: 0 14px; font-size: 13px; }
}

@keyframes flujoV { to { background-position: 50% 70px; } }

/* Teléfonos bajos (iPhone mini/SE con las barras de Safari): ficha del dispositivo más compacta */
@media (max-width: 980px) and (max-height: 700px) and (orientation: portrait) {
	.device { transform: translate(-50%, calc(-100% - 24px)); padding: 9px 10px; }
	.device h3 { margin-bottom: 6px; font-size: 12px; }
	.device ul { gap: 4px; }
	.device li { min-height: 30px; padding: 4px 7px; font-size: 11px; }
	.panel { padding: 10px 14px 12px; }
	.panel__text { -webkit-line-clamp: 3; }
}

@media (prefers-reduced-motion: reduce) {
	.intro__auto svg, .intro__texto:after { animation: none; }
	.intro__iniciar { animation: none; }
	.panel.is-changing .resumen li .m { animation: none; }
	.api__enlace, .api__enlace:before, .controls__sonido.is-pendiente:before { animation: none; }
	.tag, .panel__title, .panel__text, .panel__num { transition: none; }
}

/* Velocímetro durante la detección de niños */
.speed.is-nino .speed__estado { color: #0f9a77; }
.speed.is-nino .speed__bar i { background: var(--verde); }
