/*
 * kalmi.es · hoja de estilos. Sistema Opaline Glass (identidad/opaline/kit).
 * La flor es de vidrio; la interfaz es sobria: Geist, superficies sólidas, un solo botón principal.
 * Bosque y crema hacen casi todo; menta, salvia y melocotón son acentos.
 * Movimiento: solo transform y opacity, 160 / 240 / 400 ms, sin rebotes. La flor va en css/flor.css.
 */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/geist.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/fredoka.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bosque: #062c21;
  --bosque-700: #0a382b;
  --bosque-600: #104536;
  --pino: #1f6b55;
  --salvia: #a8c8b2;
  --salvia-clara: #bcd8c4;
  --menta: #d6efe0;
  --crema: #f7ebdd;
  --melocoton: #ffd6b3;
  --fondo: #fcf7ef;
  --superficie: #fffdf9;
  --borde: #dbe7dd;
  --borde-calido: #eadfce;
  /* Texto secundario: AA sobre fondo claro (6,3:1) y sobre bosque (9:1). */
  --tinta-2: #49635a;
  --tinta-3: #587066;
  --claro-2: #c9dacd;
  --claro-3: #9db8a8;
  --linea: color-mix(in oklab, var(--bosque) 12%, transparent);
  --linea-clara: color-mix(in oklab, var(--crema) 16%, transparent);
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --r-xl: 28px;
  --sombra: 0 16px 42px rgba(6, 44, 33, 0.07), 0 2px 9px rgba(6, 44, 33, 0.035);
  --gutter: clamp(16px, 4vw, 40px);
  --ancho: 1200px;
  --f-marca: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --f: 'Geist', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: 96px; }
html, body { margin: 0; }
body {
  background: var(--fondo);
  color: var(--bosque);
  font: 400 clamp(16px, 0.2vw + 15.4px, 18px) / 1.55 var(--f);
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a, button { touch-action: manipulation; }
::selection { background: var(--menta); color: var(--bosque); }
:focus-visible { outline: 3px solid var(--pino); outline-offset: 3px; border-radius: 10px; }
.oscuro :focus-visible { outline-color: var(--salvia); }

.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--crema); color: var(--bosque); font-weight: 600; text-decoration: none; }
.saltar:focus { top: 12px; }

/* ───────────────────────── Piezas comunes ───────────────────────── */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--bosque); color: var(--crema); font: 600 15px/1 var(--f); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform 160ms var(--suave), background-color 160ms var(--suave); }
.boton:active { transform: scale(0.97); }
.boton[data-t='s'] { min-height: 44px; padding: 0 18px; font-size: 14px; }
.boton[data-v='suave'] { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, currentColor 30%, transparent); }
.oscuro .boton:not([data-v]) { background: var(--crema); color: var(--bosque); }
@media (hover: hover) and (pointer: fine) {
  .boton:hover { background: var(--bosque-600); }
  .oscuro .boton:not([data-v]):hover { background: #fffaf2; }
  .boton[data-v='suave']:hover { background: color-mix(in oklab, currentColor 9%, transparent); }
}
.acciones { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.antetitulo { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tinta-2); }
.antetitulo i { width: 28px; height: 1px; background: currentColor; opacity: 0.7; }
.oscuro .antetitulo { color: var(--claro-2); }

h1, h2, h3 { font-family: var(--f); font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(31px, 1.5rem + 2.2vw, 54px); line-height: 1.06; letter-spacing: -0.037em; }
h3 { letter-spacing: -0.025em; }
p { text-wrap: pretty; }
em { font-style: normal; }
.oscuro h2 em { color: var(--salvia-clara); }

section { padding: clamp(64px, 8vw, 120px) var(--gutter); }
section > * { max-width: var(--ancho); margin-inline: auto; }
.oscuro { background: var(--bosque); color: var(--crema); }

/* ───────────────────────── Barra ───────────────────────── */
.barra { --alto-barra: 68px; position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; min-height: var(--alto-barra); padding: 12px max(var(--gutter), env(safe-area-inset-right)) 12px max(var(--gutter), env(safe-area-inset-left)); background: var(--bosque); color: var(--crema); transition: background-color 240ms var(--suave), box-shadow 240ms var(--suave); }
.barra[data-bajado] { box-shadow: 0 1px 0 var(--linea-clara); }
.marca { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 600 28px/1 var(--f-marca); letter-spacing: -0.01em; border-radius: 14px; }
.marca-flor { width: 36px; flex: none; }
.marca span { transform: translateY(-1px); }
.barra-fin { justify-self: end; display: flex; align-items: center; gap: 6px; }
.enlace-suave { padding: 12px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--claro-2); text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .enlace-suave:hover { color: var(--crema); } }
/* La barra de la portada: una pastilla de cristal que flota. Marca, secciones y el botón, siempre a la vista. */
#barra { --alto-barra: 60px; top: max(12px, env(safe-area-inset-top)); width: min(calc(100% - 24px), 1120px); margin: 12px auto 0; grid-template-columns: auto 1fr auto; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px; background: rgba(12, 62, 47, 0.5); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
#barra[data-bajado] { background: rgba(6, 44, 33, 0.88); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 32px rgba(3, 20, 15, 0.28); }
#barra .marca { font-size: 26px; }
#barra .marca-flor { width: 34px; }
.barra-nav { display: none; justify-self: center; gap: 2px; }
.barra-nav a { padding: 11px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--claro-2); text-decoration: none; white-space: nowrap; transition: color 160ms var(--suave), background-color 160ms var(--suave); }
.barra-nav a[aria-current] { color: var(--crema); background: rgba(247, 235, 221, 0.1); }
@media (hover: hover) and (pointer: fine) { .barra-nav a:hover { color: var(--crema); } }
#barra .barra-fin { grid-column: 3; }
@media (max-width: 479px) { #barra .enlace-suave { display: none; } }
@media (min-width: 900px) { .barra-nav { display: flex; } }

/* ───────────────────────── Portada ─────────────────────────
   La escena de la referencia aprobada (03_hero_onboarding_concept): todo centrado, la flor de vidrio
   con lo que conecta alrededor, esferas de ambiente y un único botón. Es el único sitio con cristal
   en la interfaz. */
.portada { position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; text-align: center; gap: clamp(22px, 3vw, 30px); margin-top: -72px; padding: calc(72px + clamp(18px, 3vw, 36px)) var(--gutter) clamp(40px, 6vw, 64px); background: radial-gradient(ellipse 95% 65% at 50% 64%, #1f6d53 0, #14573f 30%, #0b3d2e 62%, var(--bosque) 100%); border-radius: 0 0 clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px); }
.portada > * { margin: 0; max-width: none; }
.portada h1 { font-size: clamp(38px, 1.5rem + 3.6vw, 72px); line-height: 1.05; letter-spacing: -0.04em; }
.h-fija { display: block; }
/* La rueda: «Tú a lo tuyo.» y «Kalmi.» no se mueven; lo de en medio rueda hacia arriba y deja paso a la
   siguiente frase. La anchura acompaña, así «Kalmi.» se desliza a su sitio en vez de saltar. */
.h-linea { display: flex; justify-content: center; align-items: center; gap: 0.24em; white-space: nowrap; }
.h-linea mark { line-height: 1.2; }
.rueda { position: relative; display: inline-block; height: 1.2em; line-height: 1.2; overflow: hidden; transition: width 520ms var(--suave); }
.rueda > span { display: block; white-space: nowrap; will-change: transform, opacity; }
.rueda > span + span { position: absolute; right: 0; top: 0; }
.portada mark { color: var(--salvia-clara); background: none; }
.entradilla { margin: 16px auto 0; font-size: clamp(17px, 0.4vw + 15.6px, 20px); line-height: 1.5; color: var(--claro-2); max-width: 36ch; }
.portada-texto { position: relative; z-index: 2; animation: entra 400ms var(--suave) both; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Esferas de ambiente, fuera de foco. */
.portada-luces, .luces { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.portada-luces i, .luces i { position: absolute; z-index: -1; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #d3ead8 0, #9cc8aa 34%, #4c9373 74%, #2d735a 100%); filter: blur(7px); }
.portada-luces i:nth-child(1) { width: clamp(120px, 16vw, 240px); left: 22%; bottom: clamp(-150px, -9vw, -60px); opacity: 0.22; }
.portada-luces i:nth-child(2) { width: clamp(90px, 11vw, 170px); right: 24%; top: clamp(-90px, -6vw, -40px); opacity: 0.16; }

.portada-escena { position: relative; width: min(100%, 900px); display: grid; justify-items: center; gap: 18px; }
.colina { position: absolute; z-index: 0; left: 50%; top: clamp(190px, 60vw, 262px); width: max(150%, 900px); height: 900px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse 60% 26% at 50% 0, rgba(255, 236, 196, 0.34) 0, rgba(190, 226, 200, 0.26) 34%, rgba(118, 178, 144, 0.16) 62%, rgba(60, 130, 100, 0.1) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); pointer-events: none; }
.flor-gran { position: relative; z-index: 1; transform-origin: 50% 82%; will-change: transform; width: min(92vw, 380px); margin-block: -9%; cursor: pointer; --bo-halo: 1; animation: aparece 600ms var(--suave) 80ms backwards; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
@keyframes aparece { from { opacity: 0; transform: scale(0.96); } }
/* Dos trazos de luz, como en la referencia. */
.destellos { position: absolute; right: 13%; top: 7%; width: 13%; aspect-ratio: 1; transform-origin: 10% 90%; }
.destellos::before, .destellos::after { content: ''; position: absolute; bottom: 0; left: 0; width: 15%; border-radius: 999px; background: #fff3d6; transform-origin: 50% 100%; }
.destellos::before { height: 78%; left: 20%; transform: rotate(20deg); }
.destellos::after { height: 62%; left: 58%; bottom: -14%; transform: rotate(46deg); }

.fichas { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 360px; }
.ficha { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px 8px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--crema); background: linear-gradient(160deg, rgba(196, 228, 206, 0.3), rgba(150, 200, 170, 0.14)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.ficha svg, .lemas svg, .boton svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ficha svg { width: 18px; height: 18px; }

.portada-accion { position: relative; z-index: 2; display: grid; justify-items: center; gap: 14px; }
.boton-gran { min-height: 56px; padding: 0 30px; gap: 14px; font-size: 17px; box-shadow: 0 0 0 6px rgba(247, 235, 221, 0.1), 0 14px 44px rgba(255, 233, 189, 0.22); }
.boton svg { width: 20px; height: 20px; stroke-width: 2; }
.portada-nota { font-size: 14px; color: var(--claro-2); }
.portada-nota a { text-underline-offset: 3px; padding: 10px 0; }
.lemas { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--claro-2); }
.lemas li { display: inline-flex; align-items: center; gap: 8px; padding: 2px clamp(12px, 3vw, 24px); }
.lemas li + li { box-shadow: -1px 0 0 var(--linea-clara); }
.lemas svg { width: 18px; height: 18px; color: var(--salvia-clara); }

@media (max-width: 360px) { .portada h1 { font-size: 32px; } .lemas li { padding-inline: 9px; font-size: 14px; } }
/* En el móvil, el botón va antes que la escena: se ve sin desplazar. */
@media (min-width: 900px) {
  /* Todo lo de la escena se mide con --h, que sale del alto de la ventana: el botón queda a la vista
     sin desplazar entre 700 y 900 px de alto. Por debajo, el botón sube encima de la escena. */
  .portada { --h: clamp(270px, calc(100svh - 470px), 400px); }
  .portada h1 { font-size: clamp(42px, min(1.5rem + 3.6vw, 9.4svh), 72px); }
  .entradilla { max-width: 76ch; }
  .portada-escena { width: calc(var(--h) * 2.16); height: var(--h); align-content: center; }
  .flor-gran { width: calc(var(--h) * 1.25); margin-block: calc(var(--h) * -0.125); }
  .colina { top: calc(var(--h) * 0.765); width: 1500px; height: 1500px; }
  .fichas { position: absolute; inset: 0; max-width: none; display: block; z-index: 1; pointer-events: none; }
  .ficha { position: absolute; display: grid; justify-items: center; gap: calc(var(--h) * 0.022); width: calc(var(--h) * 0.36); padding: calc(var(--h) * 0.053) 6px calc(var(--h) * 0.043); border-radius: calc(var(--h) * 0.09); font-size: clamp(12.5px, calc(var(--h) * 0.0385), 16px); rotate: var(--giro, 0deg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 44px rgba(3, 20, 15, 0.2); }
  .ficha svg { width: calc(var(--h) * 0.082); height: calc(var(--h) * 0.082); }
  .f1 { left: 9%; top: 0%; --giro: 5deg; }
  .f2 { left: -1%; top: 34%; --giro: -2deg; }
  .f3 { left: 8%; top: 68%; --giro: 4deg; }
  .f4 { right: 7%; top: 6%; --giro: -5deg; }
  .f5 { right: 2%; top: 50%; --giro: 3deg; }
}

/* El coro: seis Kalmis grandes asomando por los lados, cada uno con su ánimo. Son ambiente con carácter:
   no tapan el texto ni el botón, y en el móvil quedan dos pequeños arriba. */
.coro { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.coro-flor { position: absolute; width: var(--t); rotate: var(--giro, 0deg); pointer-events: auto; --bo-halo: 0.55; animation: aparece 700ms var(--suave) calc(120ms + var(--o, 0) * 90ms) backwards; }
.coro-flor .bo-mira { --mx: var(--ojos-x, 0px); --my: var(--ojos-y, 0px); }
.c1 { --t: clamp(170px, 21vw, 340px); left: clamp(-90px, -4vw, -30px); top: 7%; --o: 1; --giro: -9deg; --ojos-x: 3.4px; --ojos-y: 1.4px; }
.c2 { --t: clamp(150px, 17vw, 280px); left: clamp(-70px, -3vw, -20px); top: 41%; --o: 3; --giro: 8deg; --ojos-x: 3.6px; --ojos-y: -0.6px; }
.c3 { --t: clamp(170px, 21vw, 340px); left: clamp(-80px, -3.5vw, -24px); bottom: 5%; --o: 5; --giro: -6deg; --ojos-x: 3.4px; --ojos-y: -2px; }
.c4 { --t: clamp(160px, 19vw, 310px); right: clamp(-85px, -3.6vw, -26px); top: 8%; --o: 2; --giro: 11deg; --ojos-x: -3.4px; --ojos-y: 1.4px; }
.c5 { --t: clamp(150px, 17vw, 280px); right: clamp(-70px, -3vw, -20px); top: 42%; --o: 4; --giro: -8deg; --ojos-x: -2.4px; --ojos-y: 0px; }
.c6 { --t: clamp(170px, 21vw, 340px); right: clamp(-85px, -3.6vw, -26px); bottom: 4%; --o: 6; --giro: 7deg; --ojos-x: -3.4px; --ojos-y: -2px; }
@media (max-width: 1099px) { .c2, .c5 { display: none; } }
@media (max-width: 759px) {
  .c3, .c6 { display: none; }
  .c1 { --t: 128px; left: -58px; top: auto; bottom: 22%; }
  .c4 { --t: 120px; right: -54px; top: auto; bottom: 34%; }
}
/* Las fichas flotan despacio, cada una a su ritmo. */
.ficha { animation: flota-ficha var(--dura, 7s) ease-in-out var(--desfase, 0s) infinite; }
.f1 { --dura: 7.2s; --desfase: -1.2s; } .f2 { --dura: 8.4s; --desfase: -3.4s; } .f3 { --dura: 6.6s; --desfase: -0.4s; }
.f4 { --dura: 7.8s; --desfase: -2.6s; } .f5 { --dura: 6.9s; --desfase: -4.4s; }
@keyframes flota-ficha { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@media (max-width: 899px) { .ficha { animation: none; } }

/* ───────────────────────── Dos mundos ───────────────────────── */
.mundos { display: grid; gap: 20px; }
.mundos > * { margin: 0; max-width: none; }
.mundos-cab { margin-bottom: clamp(8px, 2vw, 24px); }
.mundos-cab h2 { margin: 18px 0 16px; }
.mundos-cab h2 em { display: block; color: var(--pino); }
.mundos-cab > p:last-child { color: var(--tinta-2); max-width: 52ch; font-size: clamp(17px, 0.4vw + 15.6px, 19px); }
.mundo { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: start; gap: 6px; padding: clamp(24px, 3.4vw, 44px); border-radius: clamp(24px, 4vw, 44px); transition: transform 240ms var(--suave), box-shadow 240ms var(--suave); }
.mundo-personal { background: linear-gradient(160deg, #fdf5ea, var(--crema)); box-shadow: inset 0 0 0 1px var(--borde-calido), var(--sombra); --bo-halo: 0; }
.mundo-empresa { background: radial-gradient(ellipse 80% 90% at 80% 10%, #22705a 0, #135240 36%, #0a3a2c 70%, var(--bosque) 100%); box-shadow: 0 30px 70px rgba(6, 44, 33, 0.2); --bo-halo: 0.7; }
.mundo-flores { display: flex; align-items: flex-end; height: clamp(120px, 15vw, 176px); margin: -8px 0 14px -10px; }
.mundo-flores .bo { width: auto; height: 100%; flex: none; }
.mundo-flores .bo + .bo { margin-left: -5%; }
.mundo-empresa .mundo-flores .bo:nth-child(1), .mundo-empresa .mundo-flores .bo:nth-child(3) { height: 62%; margin-bottom: 9%; }
.mundo-empresa .mundo-flores .bo:nth-child(2) { z-index: 1; }
.mundo h3 { font-size: clamp(26px, 1.3rem + 1.4vw, 40px); line-height: 1.08; letter-spacing: -0.035em; margin: 8px 0 18px; max-width: 16ch; }
.mundo ul { display: grid; gap: 12px; }
.mundo li { position: relative; padding-left: 22px; color: var(--tinta-2); max-width: 44ch; }
.mundo li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--pino); }
.mundo-empresa li { color: var(--claro-2); }
.mundo-empresa li::before { background: var(--salvia); }
.mundo-empresa .etiqueta { color: var(--claro-2); }
@media (hover: hover) and (pointer: fine) { .mundo:hover { transform: translateY(-4px); } }
@media (min-width: 900px) {
  .mundos { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: calc(var(--ancho) + 2 * var(--gutter)); margin-inline: auto; }
  .mundos-cab { grid-column: 1 / -1; }
}

/* ───────────────────────── Conversación ─────────────────────────
   Un escenario oscuro con un teléfono de verdad: marco, barra de estado, cabecera de chat, conversación
   que avanza sola dentro de la pantalla y caja de escribir. Los cuatro pasos de la izquierda son botones:
   llevan la conversación a ese momento. */
.demo { display: grid; gap: clamp(36px, 5vw, 72px); margin-top: clamp(8px, 1.5vw, 20px); padding-block: clamp(48px, 7vw, 96px); background: radial-gradient(ellipse 60% 80% at 76% 46%, #22705a 0, #135240 34%, #0a3a2c 66%, var(--bosque) 100%); }
.demo > * { margin: 0; max-width: none; }
.demo-texto { position: relative; z-index: 1; }
.demo-texto h2 { margin: 18px 0 16px; }
.demo-texto h2 em { display: block; }
.demo-entrada { color: var(--claro-2); max-width: 42ch; font-size: clamp(17px, 0.4vw + 15.6px, 19px); }
.pasos-demo { margin-top: clamp(24px, 3vw, 36px); display: grid; gap: 6px; counter-reset: paso; max-width: 520px; }
.pasos-demo button { counter-increment: paso; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 2px 14px; align-items: center; width: 100%; padding: 13px 16px 13px 12px; border: 0; border-radius: 20px; background: transparent; color: var(--claro-2); font: inherit; text-align: left; cursor: pointer; user-select: none; -webkit-user-select: none; transition: background-color 240ms var(--suave), box-shadow 240ms var(--suave), transform 160ms var(--suave); }
.pasos-demo button::before { content: counter(paso); grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(247, 235, 221, 0.1); color: var(--crema); font: 600 14px/1 var(--f); transition: background-color 240ms var(--suave), color 240ms var(--suave); }
.pasos-demo b { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; color: var(--crema); }
.pasos-demo span { grid-column: 2; font-size: 15px; line-height: 1.4; color: var(--claro-3); transition: color 240ms var(--suave); }
.pasos-demo button:active { transform: scale(0.985); }
.pasos-demo button[aria-current] { background: linear-gradient(160deg, rgba(196, 228, 206, 0.22), rgba(150, 200, 170, 0.08)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.pasos-demo button[aria-current]::before { background: var(--crema); color: var(--bosque); }
.pasos-demo button[aria-current] span { color: var(--claro-2); }
@media (hover: hover) and (pointer: fine) { .pasos-demo button:not([aria-current]):hover { background: rgba(247, 235, 221, 0.06); } }

/* El teléfono: un iPhone a escala. Proporciones y capas del marco tomadas de Devices.css (MIT,
   github.com/picturepan2/devices.css, iPhone 14 Pro: 428 × 868, bisel 19, pantalla 390 con radio 49).
   Todo lo de dentro se mide con --u (un píxel del diseño, que sale del ancho del propio teléfono),
   así se encoge entero sin recolocarse. Su tamaño NO depende del contenido: no baila al cargar. */
.movil { --alto: clamp(520px, calc(100svh - 176px), 760px); position: relative; z-index: 1; justify-self: center; width: min(100%, calc(var(--alto) / 2.028)); }
.movil::before { content: ''; position: absolute; inset: -10% -42%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 196, 0.28), rgba(190, 226, 200, 0.12) 55%, transparent); pointer-events: none; }
.iphone { position: relative; aspect-ratio: 428 / 868; container-type: inline-size; }
/* --u es un píxel del diseño a 428 de ancho. Todo lo de dentro se mide con él. */
.iphone-u { --u: 0.23364cqw; position: absolute; inset: 0; }
/* @iphone */
.iphone-marco { position: absolute; inset: 0; padding: calc(19 * var(--u)); border-radius: calc(68 * var(--u)); background: #020403; border: calc(1 * var(--u)) solid #5c5956; box-shadow: inset 0 0 calc(4 * var(--u)) calc(2 * var(--u)) rgba(255, 255, 255, 0.82), inset 0 0 0 calc(6 * var(--u)) #6f6b68, 0 calc(70 * var(--u)) calc(120 * var(--u)) rgba(1, 12, 9, 0.55), 0 calc(22 * var(--u)) calc(44 * var(--u)) rgba(1, 12, 9, 0.34); }
/* Líneas de antena y botones laterales */
.iphone-marco::before, .iphone-marco::after { content: ''; position: absolute; left: 0; width: 100%; height: calc(7 * var(--u)); border: solid rgba(1, 1, 1, 0.3); border-width: 0 calc(7 * var(--u)); z-index: 3; pointer-events: none; }
.iphone-marco::before { top: calc(85 * var(--u)); } .iphone-marco::after { bottom: calc(85 * var(--u)); }
.iphone-btn { position: absolute; width: calc(4 * var(--u)); border-radius: calc(2 * var(--u)); background: linear-gradient(90deg, #403d3b, #6b6765); }
.iphone-btn-1 { left: calc(-3 * var(--u)); top: calc(115 * var(--u)); height: calc(32 * var(--u)); }
.iphone-btn-2 { left: calc(-3 * var(--u)); top: calc(175 * var(--u)); height: calc(62 * var(--u)); }
.iphone-btn-3 { left: calc(-3 * var(--u)); top: calc(255 * var(--u)); height: calc(62 * var(--u)); }
.iphone-btn-4 { right: calc(-3 * var(--u)); top: calc(200 * var(--u)); height: calc(100 * var(--u)); background: linear-gradient(270deg, #403d3b, #6b6765); }
.movil-pantalla { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: calc(49 * var(--u)); background: #efe4d3; isolation: isolate; }
/* Isla dinámica con su lente */
.iphone-isla { position: absolute; z-index: 5; left: 50%; top: calc(11 * var(--u)); width: calc(122 * var(--u)); height: calc(35 * var(--u)); margin-left: calc(-61 * var(--u)); border-radius: calc(20 * var(--u)); background: #020403; }
.iphone-isla::after { content: ''; position: absolute; right: calc(16 * var(--u)); top: calc(12 * var(--u)); width: calc(10 * var(--u)); height: calc(10 * var(--u)); border-radius: 50%; background: radial-gradient(farthest-corner at 20% 20%, #6074bf 0, transparent 40%), radial-gradient(farthest-corner at 80% 80%, #513785 0, #24555e 20%, transparent 50%); box-shadow: 0 0 calc(1 * var(--u)) calc(1 * var(--u)) rgba(255, 255, 255, 0.05); }
/* Reflejo del cristal */
.iphone-brillo { position: absolute; inset: 0; z-index: 6; border-radius: calc(49 * var(--u)); background: linear-gradient(118deg, rgba(255, 255, 255, 0.11) 0, rgba(255, 255, 255, 0.03) 22%, transparent 36%); pointer-events: none; }

.movil-barra { display: flex; align-items: center; justify-content: space-between; height: calc(54 * var(--u)); padding: calc(8 * var(--u)) calc(32 * var(--u)) 0 calc(38 * var(--u)); background: var(--bosque-700); color: var(--crema); font: 600 calc(17 * var(--u))/1 var(--f); letter-spacing: calc(-0.16 * var(--u)); flex: none; }
.movil-iconos { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); }
.movil-iconos svg { height: calc(12.499 * var(--u)); width: auto; }
.movil-cab { display: flex; align-items: center; gap: calc(11 * var(--u)); padding: calc(8 * var(--u)) calc(16 * var(--u)) calc(12 * var(--u)) calc(8 * var(--u)); background: var(--bosque-700); color: var(--crema); flex: none; box-shadow: 0 calc(1 * var(--u)) 0 rgba(0, 0, 0, 0.12); position: relative; z-index: 2; }
.movil-atras { width: calc(26 * var(--u)); height: calc(26 * var(--u)); opacity: 0.75; flex: none; }
.movil-avatar { display: grid; place-items: center; width: calc(44 * var(--u)); height: calc(44 * var(--u)); border-radius: 50%; background: var(--bosque-600); flex: none; }
.avatar-flor { width: calc(34 * var(--u)); }
.movil-quien { display: grid; line-height: 1.15; }
.movil-quien b { font: 600 calc(20 * var(--u))/1 var(--f-marca); letter-spacing: calc(-0.16 * var(--u)); }
.movil-quien small { font-size: calc(13.501 * var(--u)); color: var(--claro-3); margin-top: calc(4 * var(--u)); }

/* La conversación: una ventana y una pista. Sin JS la ventana se desliza con el dedo; con JS la pista
   se mueve por transformación, así cada mensaje nuevo empuja a los demás de forma continua. */
.chat { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background-color: #efe4d3; background-image: radial-gradient(circle at calc(1 * var(--u)) calc(1 * var(--u)), rgba(6, 44, 33, 0.06) calc(1.2 * var(--u)), transparent calc(1.6 * var(--u))); background-size: calc(19 * var(--u)) calc(19 * var(--u)); }
.chat::-webkit-scrollbar { display: none; }
.chat-pista { display: flex; flex-direction: column; gap: calc(10 * var(--u)); margin: 0; padding: calc(16 * var(--u)) calc(12 * var(--u)) calc(16 * var(--u)); font-size: calc(16.499 * var(--u)); line-height: 1.38; color: var(--bosque); }
.chat-pista > * { flex: none; }
.dia { align-self: center; }
.dia span { display: inline-block; padding: calc(5 * var(--u)) calc(13 * var(--u)); border-radius: calc(999 * var(--u)); background: rgba(255, 253, 249, 0.88); color: var(--tinta-2); font-size: calc(12.499 * var(--u)); font-weight: 600; letter-spacing: calc(0.96 * var(--u)); text-transform: uppercase; }
.msg { position: relative; max-width: 86%; padding: calc(10 * var(--u)) calc(13 * var(--u)) calc(23 * var(--u)); border-radius: calc(19 * var(--u)); box-shadow: 0 calc(1 * var(--u)) calc(1 * var(--u)) rgba(6, 44, 33, 0.08); }
.msg time { position: absolute; right: calc(12 * var(--u)); bottom: calc(6 * var(--u)); font-size: calc(12 * var(--u)); font-weight: 500; color: var(--tinta-3); }
.de-kalmi { align-self: flex-start; background: var(--superficie); border-top-left-radius: calc(5 * var(--u)); transform-origin: 0 100%; }
.de-ti { align-self: flex-end; background: var(--menta); border-top-right-radius: calc(5 * var(--u)); transform-origin: 100% 100%; }
.de-ti time { color: var(--tinta-2); }
.corta { padding-right: calc(56 * var(--u)); padding-bottom: calc(10 * var(--u)); }
.corta time { bottom: calc(10 * var(--u)); }
.msg b { font-weight: 600; }
.msg > p + p, .msg > div + p, .msg > p + div { margin-top: calc(9 * var(--u)); }
.resumen { margin-top: calc(9 * var(--u)); display: grid; gap: calc(8 * var(--u)); }
.resumen li { display: grid; grid-template-columns: calc(66 * var(--u)) 1fr; gap: calc(9 * var(--u)); align-items: baseline; }
.resumen span { justify-self: start; padding: calc(2 * var(--u)) calc(9 * var(--u)); border-radius: calc(999 * var(--u)); background: var(--crema); font-size: calc(12.499 * var(--u)); font-weight: 600; }

.voz { display: flex; align-items: center; gap: calc(11 * var(--u)); min-width: calc(240 * var(--u)); }
.voz-boton { display: grid; place-items: center; width: calc(41 * var(--u)); height: calc(41 * var(--u)); border-radius: 50%; background: var(--bosque); color: var(--menta); flex: none; }
.voz-boton svg { width: calc(19 * var(--u)); }
.voz-onda { display: flex; align-items: center; gap: calc(3 * var(--u)); height: calc(32 * var(--u)); flex: 1; }
.voz-onda i { display: block; width: calc(3 * var(--u)); border-radius: calc(3 * var(--u)); background: var(--bosque); opacity: 0.55; height: calc(var(--h, 40) * 1%); transform-origin: center; }
.voz-onda i:nth-child(4n+1) { --h: 35; } .voz-onda i:nth-child(4n+2) { --h: 80; } .voz-onda i:nth-child(4n+3) { --h: 55; } .voz-onda i:nth-child(5n) { --h: 100; } .voz-onda i:nth-child(7n) { --h: 25; }
.voz-tiempo { font-size: calc(13.501 * var(--u)); font-weight: 600; color: var(--tinta-2); }
.transcrito { font-size: calc(15.501 * var(--u)); color: var(--tinta-2); }
.transcrito span { display: block; font-size: calc(12 * var(--u)); font-weight: 600; letter-spacing: calc(1.28 * var(--u)); text-transform: uppercase; margin-bottom: calc(2 * var(--u)); color: var(--pino); }

.borrador { margin-top: calc(10 * var(--u)); padding: calc(13 * var(--u)) calc(14 * var(--u)); border-radius: calc(14 * var(--u)); background: var(--fondo); border: calc(1 * var(--u)) dashed color-mix(in oklab, var(--bosque) 30%, transparent); font-size: calc(15.501 * var(--u)); display: grid; gap: calc(3 * var(--u)); }
.borrador p:has(> small) { display: flex; align-items: baseline; }
.borrador small { flex: none; display: inline-block; width: calc(58 * var(--u)); font-size: calc(13 * var(--u)); font-weight: 600; color: var(--tinta-3); }
.borrador-cab { margin-bottom: calc(5 * var(--u)); }
.sello { display: inline-flex; padding: calc(5 * var(--u)) calc(11 * var(--u)); border-radius: calc(999 * var(--u)); background: var(--bosque); color: var(--menta); font-size: calc(12 * var(--u)); font-weight: 600; letter-spacing: calc(0.96 * var(--u)); text-transform: uppercase; }
.borrador-cuerpo { margin-top: calc(7 * var(--u)); padding-top: calc(9 * var(--u)); border-top: calc(1 * var(--u)) solid var(--linea); }

.adjunto { display: flex; align-items: center; gap: calc(13 * var(--u)); padding: calc(11 * var(--u)); border-radius: calc(14 * var(--u)); background: var(--fondo); }
.adjunto-hoja { position: relative; display: flex; flex-direction: column; gap: calc(4 * var(--u)); justify-content: flex-end; width: calc(46 * var(--u)); height: calc(58 * var(--u)); padding: calc(8 * var(--u)); border-radius: calc(9 * var(--u)) calc(16 * var(--u)) calc(9 * var(--u)) calc(9 * var(--u)); background: var(--bosque); flex: none; }
.adjunto-hoja b { position: absolute; top: calc(7 * var(--u)); left: calc(8 * var(--u)); font: 700 calc(11 * var(--u))/1 var(--f); color: var(--menta); letter-spacing: calc(0.64 * var(--u)); }
.adjunto-hoja i { display: block; height: calc(3 * var(--u)); border-radius: calc(2 * var(--u)); background: var(--crema); opacity: 0.6; }
.adjunto-hoja i:last-child { width: 60%; }
.adjunto b { display: block; font-size: calc(15.501 * var(--u)); }
.adjunto small { display: block; font-size: calc(13.501 * var(--u)); color: var(--tinta-2); }

/* «Escribiendo…»: al final de la pista, donde saldrá el siguiente mensaje. */
.escribiendo { order: 99; align-self: flex-start; display: none; gap: calc(6 * var(--u)); padding: calc(15 * var(--u)) calc(16 * var(--u)); border-radius: calc(19 * var(--u)) calc(19 * var(--u)) calc(19 * var(--u)) calc(5 * var(--u)); background: var(--superficie); box-shadow: 0 calc(1 * var(--u)) calc(1 * var(--u)) rgba(6, 44, 33, 0.08); transform-origin: 0 100%; }
.escribiendo i { width: calc(8 * var(--u)); height: calc(8 * var(--u)); border-radius: 50%; background: var(--bosque); opacity: 0.4; }

/* Caja de escribir: se ve cómo Lucía teclea o graba antes de que salga su mensaje. */
.movil-escribe { position: relative; z-index: 2; display: flex; align-items: center; gap: calc(9 * var(--u)); padding: calc(9 * var(--u)) calc(12 * var(--u)) calc(30 * var(--u)); background: #efe4d3; box-shadow: 0 calc(-1 * var(--u)) 0 rgba(6, 44, 33, 0.06); flex: none; }
.movil-escribe::after { content: ''; position: absolute; left: 50%; bottom: calc(9 * var(--u)); width: calc(134 * var(--u)); height: calc(5 * var(--u)); margin-left: calc(-67 * var(--u)); border-radius: calc(5 * var(--u)); background: rgba(6, 44, 33, 0.34); }
.movil-escribe span { flex: 1; min-width: 0; min-height: calc(44 * var(--u)); display: flex; align-items: center; padding: 0 calc(18 * var(--u)); border-radius: calc(999 * var(--u)); background: var(--superficie); color: var(--tinta-3); font-size: calc(16.499 * var(--u)); white-space: nowrap; overflow: hidden; box-shadow: 0 calc(1 * var(--u)) calc(1 * var(--u)) rgba(6, 44, 33, 0.06); }
.movil-escribe span[data-lleno] { color: var(--bosque); }
.movil-escribe span[data-lleno]::after { content: ''; width: calc(2 * var(--u)); height: calc(20 * var(--u)); margin-left: calc(2 * var(--u)); background: var(--pino); }
.movil-escribe > i { position: relative; display: grid; place-items: center; width: calc(46 * var(--u)); height: calc(46 * var(--u)); border-radius: 50%; background: var(--pino); color: var(--crema); flex: none; }
.movil-escribe svg { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.movil-escribe > i::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--pino); opacity: 0; }
/* @fin-iphone */
.voz[data-suena] .voz-onda i { animation: onda 0.9s ease-in-out calc(var(--k, 0) * 0.05s) 2; }
@keyframes onda { 0%, 100% { transform: scaleY(1); opacity: 0.55; } 50% { transform: scaleY(0.4); opacity: 1; } }
.escribiendo[data-visible] { display: flex; animation: globo 300ms var(--suave) both; }
.escribiendo i { animation: pulso 1.2s ease-in-out infinite; }
.escribiendo i:nth-child(2) { animation-delay: 0.15s; } .escribiendo i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulso { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 0.9; transform: translateY(-18%); } }
.movil-escribe span[data-lleno]::after { animation: cursor 1s steps(1) infinite; }
@keyframes cursor { 50% { opacity: 0; } }
.movil-escribe > i[data-graba]::before { animation: graba 1.1s var(--suave) infinite; }
@keyframes graba { from { opacity: 0.5; transform: scale(1); } to { opacity: 0; transform: scale(2.1); } }
.movil-escribe > i { transition: transform 160ms var(--suave), background-color 240ms var(--suave); }
.movil-escribe > i[data-graba] { background: #c8553d; }
.movil-escribe > i[data-envia] { transform: scale(0.88); }

.movil-pie { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-height: 44px; margin-top: 18px; color: var(--claro-3); font-size: 13px; text-align: center; }
.repetir { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: rgba(247, 235, 221, 0.12); color: var(--crema); font-weight: 600; font-size: 13px; cursor: pointer; user-select: none; -webkit-user-select: none; transition: transform 160ms var(--suave), background-color 160ms var(--suave); }
.repetir:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .repetir:hover { background: rgba(247, 235, 221, 0.2); } }

/* Con JS: la ventana no se desliza; la pista viaja. Cada globo sale de su esquina. */
.chat[data-reproduce] { overflow: hidden; }
.chat[data-reproduce] .chat-pista { will-change: transform; transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1); }
.chat[data-reproduce] [data-msg]:not([data-visto]) { display: none; }
.chat[data-reproduce] [data-msg][data-visto] { animation: globo 460ms cubic-bezier(0.2, 1.12, 0.38, 1) both; }
.chat[data-salto] .chat-pista { transition-duration: 0ms; }
.chat[data-salto] [data-msg][data-visto] { animation: none; }
@keyframes globo { from { opacity: 0; transform: translateY(14px) scale(0.9); } to { opacity: 1; transform: none; } }

/* Barra de avance del paso que está sonando. */
.pasos-demo button { position: relative; overflow: hidden; }
.pasos-demo button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--salvia-clara); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
.pasos-demo button[data-corre]::after { opacity: 0.9; animation: avance var(--dura, 3s) linear both; }
@keyframes avance { to { transform: scaleX(1); } }

@media (max-width: 959px) {
  /* En el móvil los pasos son una fila que se desliza: el teléfono queda cerca. */
  .pasos-demo { grid-auto-flow: column; grid-auto-columns: minmax(232px, 76%); gap: 8px; max-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
  .pasos-demo::-webkit-scrollbar { display: none; }
  .pasos-demo li { scroll-snap-align: center; }
  .pasos-demo button { height: 100%; align-items: start; background: rgba(247, 235, 221, 0.05); }
  .movil { --alto: clamp(500px, calc(100svh - 130px), 700px); }
}
@media (min-width: 960px) {
  .demo { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding-inline: max(var(--gutter), calc((100% - var(--ancho)) / 2)); }
  .movil { width: calc(var(--alto) / 2.028); margin-right: clamp(0px, 5vw, 80px); }
}

/* ───────────────────────── Así se usa ───────────────────────── */
.uso { background: linear-gradient(180deg, var(--fondo), var(--crema) 22%, var(--crema) 78%, var(--fondo)); }
.uso-entrada { margin-top: 14px; font-size: clamp(17px, 0.4vw + 15.6px, 19px); color: var(--tinta-2); }
.verbos { margin-top: clamp(36px, 5vw, 64px); display: grid; gap: 16px; }
.verbos li { padding: clamp(22px, 3vw, 32px); border-radius: var(--r-xl); background: var(--superficie); box-shadow: inset 0 0 0 1px var(--borde-calido), var(--sombra); }
.verbo-flor { display: block; width: 84px; margin: -6px 0 14px -8px; --bo-halo: 0; }
.verbos h3 { font-size: clamp(24px, 1.2rem + 1vw, 32px); line-height: 1.1; letter-spacing: -0.03em; }
.verbos li > p:not(.globo) { margin-top: 10px; color: var(--tinta-2); max-width: 32ch; }
.globo { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; padding: 11px 15px; border-radius: 18px 18px 6px 18px; background: var(--menta); font-weight: 500; font-size: 15px; line-height: 1.35; }
.globo-voz span { display: inline-flex; align-items: center; gap: 3px; height: 22px; }
.globo-voz i:nth-child(odd) { --h: 45; } .globo-voz i:nth-child(even) { --h: 95; } .globo-voz i:nth-child(3n) { --h: 65; }
.globo-voz { font-size: 14px; font-weight: 600; }
@media (min-width: 860px) { .verbos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* ───────────────────────── Conecta ───────────────────────── */
.conecta { display: grid; gap: clamp(40px, 6vw, 80px); background: radial-gradient(ellipse 70% 90% at 82% 50%, #1b6049 0, #0f4a39 38%, var(--bosque) 82%); }
.conecta > * { margin: 0; max-width: none; }
.conecta h2 em { display: block; }
.conecta-texto > p { margin-top: 18px; color: var(--claro-2); max-width: 40ch; }
.servicios { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.servicios li { padding: 8px 14px; border-radius: 999px; background: rgba(196, 228, 206, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08); font-weight: 500; font-size: 14px; color: var(--claro-2); }
.conecta .letra { margin-top: 22px; font-size: 14px; color: var(--claro-3); }
.panel-mini { justify-self: center; width: min(100%, 440px); padding: 20px; border-radius: var(--r-xl); background: linear-gradient(165deg, rgba(196, 228, 206, 0.2), rgba(150, 200, 170, 0.07)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 70px rgba(3, 20, 15, 0.3); display: grid; gap: 10px; }
.panel-cab { display: flex; align-items: center; gap: 10px; font: 600 20px/1 var(--f-marca); }
.panel-flor { width: 40px; }
.panel-tit { margin: 8px 0 6px; font: 600 clamp(22px, 2.4vw, 28px)/1.1 var(--f); letter-spacing: -0.03em; }
.viva { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-l); background: var(--superficie); color: var(--bosque); }
.viva b { display: block; font: 600 16px/1.2 var(--f); letter-spacing: -0.015em; }
.viva small { display: block; font-size: 13.5px; color: var(--tinta-2); margin-top: 2px; }
.viva em { margin-left: auto; padding: 8px 14px; border-radius: 999px; background: var(--crema); font-size: 13.5px; font-weight: 600; color: var(--bosque); }
.viva-apagada { background: transparent; color: var(--crema); box-shadow: inset 0 0 0 1px var(--linea-clara); }
.viva-apagada small { color: var(--claro-3); }
.viva > i { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--claro-3); }
.viva > i.latido { background: var(--pino); box-shadow: 0 0 0 4px color-mix(in oklab, var(--pino) 22%, transparent); }
@media (min-width: 900px) {
  .conecta { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; padding-inline: max(var(--gutter), calc((100% - var(--ancho)) / 2)); }
  .panel-mini { justify-self: end; }
}

/* ───────────────────────── Oficios ───────────────────────── */
.oficios { display: grid; gap: 20px; }
.oficios::before { background: radial-gradient(ellipse 30% 36% at 12% 40%, rgba(214, 239, 224, 0.8), transparent 70%), radial-gradient(ellipse 24% 28% at 90% 66%, rgba(255, 214, 179, 0.28), transparent 70%); }
.oficios > * { margin: 0; max-width: none; }
.oficios-cab { margin-bottom: clamp(12px, 2vw, 28px); }
.oficios-cab p { margin-top: 16px; color: var(--tinta-2); max-width: 46ch; font-size: clamp(17px, 0.4vw + 15.6px, 19px); }
.oficio { padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-xl); background: var(--superficie); box-shadow: inset 0 0 0 1px var(--borde-calido), var(--sombra); }
.oficio h3 { font-size: clamp(26px, 1.3rem + 1.4vw, 38px); line-height: 1.08; letter-spacing: -0.035em; margin: 10px 0 20px; }
.oficio ul { display: grid; gap: 12px; }
.oficio li { padding-left: 22px; position: relative; color: var(--tinta-2); }
.oficio li::before { content: ''; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--pino); }
.oficio li b { color: var(--bosque); font-weight: 600; }
.etiqueta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tinta-2); }
.piloto { padding: 4px 10px; border-radius: 999px; background: var(--melocoton); color: var(--bosque); letter-spacing: 0.06em; }
.oficio-casa { background: linear-gradient(160deg, #fbf1e4, var(--crema)); }
.oficio-dice { margin-top: 26px; padding: 13px 16px; border-radius: 18px 18px 18px 6px; background: var(--superficie); font-weight: 500; max-width: 46ch; }
.oficio-mas { display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 12px; border-radius: var(--r-xl); border: 1px dashed color-mix(in oklab, var(--bosque) 26%, transparent); color: var(--tinta-2); font-weight: 500; justify-self: start; }
.flor-mini { width: 44px; flex: none; }
@media (min-width: 900px) {
  .oficios { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; row-gap: 20px; max-width: calc(var(--ancho) + 2 * var(--gutter)); margin-inline: auto; }
  .oficios-cab { grid-column: 1 / 9; }
  .oficio-casa { grid-column: 1 / 8; }
  .oficio-luz { grid-column: 8 / 13; }
  .oficio-mas { grid-column: 1 / 13; }
}

/* ───────────────────────── Espacios ───────────────────────── */
.espacios { display: grid; gap: clamp(40px, 6vw, 80px); padding-top: clamp(24px, 4vw, 56px); }
.espacios > * { margin: 0; max-width: none; }
.espacios-texto p { margin-top: 18px; color: var(--tinta-2); max-width: 44ch; }
.esquema { position: relative; display: grid; gap: 12px; padding-left: 26px; width: min(100%, 500px); justify-self: center; }
.esquema::before { content: ''; position: absolute; left: 7px; top: 30px; bottom: 60px; width: 2px; border-radius: 2px; background: var(--borde-calido); }
.esp { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; border-radius: var(--r-l); }
.esp::before { content: ''; position: absolute; left: -19px; top: 34px; width: 16px; height: 2px; border-radius: 2px; background: var(--borde-calido); }
.esp b { display: block; font: 600 17px/1.2 var(--f); letter-spacing: -0.02em; }
.esp small { display: block; font-size: 14px; margin-top: 2px; }
.esp-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-m); font: 600 14px/1 var(--f); }
.esp-yo { background: var(--crema); width: 82%; }
.esp-yo small { color: var(--tinta-2); }
.esp-yo .esp-ico { background: var(--superficie); }
.esp-empresa { background: radial-gradient(ellipse 90% 120% at 90% 0, #175341 0, var(--bosque) 70%); color: var(--crema); box-shadow: 0 30px 60px rgba(6, 44, 33, 0.18); }
.esp-empresa small { color: var(--claro-3); }
.esp-empresa .esp-ico { background: var(--menta); color: var(--bosque); }
.equipo { grid-column: 1 / -1; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linea-clara); display: grid; gap: 2px; }
.equipo-quien { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.cara-rosa { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--melocoton); color: var(--bosque); font: 600 13px/1 var(--f); }
.permiso { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; color: var(--claro-3); }
.permiso[data-on] { color: var(--crema); }
.permiso i { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--bosque-600); box-shadow: inset 0 0 0 1px var(--linea-clara); flex: none; }
.permiso i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--claro-3); }
.permiso[data-on] i { background: var(--salvia); box-shadow: none; }
.permiso[data-on] i::after { background: var(--bosque); transform: translateX(18px); }
@media (min-width: 900px) {
  .espacios { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; max-width: calc(var(--ancho) + 2 * var(--gutter)); margin-inline: auto; }
  .esquema { justify-self: end; }
}

/* ───────────────────────── Tú decides ───────────────────────── */
.decides { display: grid; gap: clamp(28px, 5vw, 72px); background: radial-gradient(ellipse 60% 90% at 16% 50%, #124a3a 0, #0a392c 42%, var(--bosque) 80%); }
.decides > * { margin: 0; max-width: none; }
.decides-flor { width: clamp(150px, 34vw, 320px); justify-self: start; }
.decides-entrada { margin-top: 20px; font-size: clamp(17px, 0.4vw + 15.6px, 19px); color: var(--claro-2); max-width: 42ch; }
.promesas { margin-top: 32px; display: grid; }
.promesas li { position: relative; padding: 14px 0 14px 30px; border-top: 1px solid var(--linea-clara); color: var(--crema); }
.promesas li::before { content: ''; position: absolute; left: 2px; top: 1.45em; width: 8px; height: 8px; border-radius: 50%; background: var(--salvia); }
@media (min-width: 900px) {
  .decides { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); align-items: center; padding-inline: max(var(--gutter), calc((100% - var(--ancho)) / 2)); }
  .decides-flor { justify-self: center; }
}

/* ───────────────────────── Acceso ───────────────────────── */
.acceso { padding-bottom: clamp(56px, 8vw, 96px); }
.acceso-caja { position: relative; isolation: isolate; display: grid; justify-items: start; gap: 16px; padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl); background: var(--crema); overflow: hidden; }
/* Diagonal Scatter: solo en la mitad sin texto. */
.acceso-patron { position: absolute; inset: 0 0 0 auto; width: 46%; z-index: -1; pointer-events: none; background: url('/img/patron-diagonal.svg') right center / cover no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); display: none; }
.acceso-flor { width: clamp(96px, 22vw, 160px); --bo-halo: 0; }
.acceso-caja h2 { max-width: 16ch; }
.acceso-caja p { max-width: 46ch; color: var(--tinta-2); font-size: clamp(17px, 0.4vw + 15.6px, 19px); }
.acceso-caja .acciones { margin-top: 10px; gap: 8px 20px; }
.enlace-claro { font-weight: 600; font-size: 15px; text-underline-offset: 4px; padding: 12px 2px; border-radius: 8px; }
@media (min-width: 900px) {
  .acceso-caja { min-height: 380px; align-content: center; }
  .acceso-caja > * { max-width: 50%; }
  .acceso-patron { display: block; max-width: none; }
  .acceso-flor { display: none; }
}

/* ───────────────────────── Islas, ambiente y aparición ───────────────────────── */
.isla { position: relative; isolation: isolate; overflow: hidden; border-radius: clamp(24px, 4vw, 44px); margin-inline: clamp(8px, 1.5vw, 20px); }
.luces i:nth-child(1) { width: clamp(140px, 22vw, 320px); right: clamp(-150px, -8vw, -50px); top: clamp(-150px, -9vw, -60px); opacity: 0.42; }
.luces i:nth-child(2) { width: clamp(120px, 18vw, 260px); left: clamp(-130px, -8vw, -50px); bottom: clamp(-130px, -8vw, -50px); opacity: 0.34; }
.luces i:nth-child(3) { width: clamp(70px, 9vw, 130px); left: 44%; top: clamp(-70px, -5vw, -30px); opacity: 0.2; }
/* Ambiente de las secciones claras: a todo el ancho de la ventana, aunque la sección sea más estrecha. */
.oficios { position: relative; }
.oficios::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none; }
/* Lo que no está en pantalla no se mueve. */
.quieta .bo-capas, .quieta .bo-capas *, .quieta .ficha, .quieta .desfile-flor { animation-play-state: paused !important; }
/* Tarjetas que responden al puntero: se levantan un poco. */
.verbos li, .oficio, .panel-mini { transition: transform 240ms var(--suave), box-shadow 240ms var(--suave); }
@media (hover: hover) and (pointer: fine) {
  .verbos li:hover, .oficio:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--borde-calido), 0 26px 60px rgba(6, 44, 33, 0.11), 0 4px 12px rgba(6, 44, 33, 0.05); }
  .panel-mini:hover { transform: translateY(-4px); }
}
/* Aparición al llegar: solo con JS (clase en <html>) y con movimiento permitido. Sin JS, todo se ve.
   Al acabar de entrar (data-asentado) la pieza recupera su transición corta, la del puntero. */
.js [data-revela]:not([data-asentado]) { transition: opacity 500ms var(--suave) calc(var(--i, 0) * 80ms), transform 700ms var(--suave) calc(var(--i, 0) * 80ms); }
.js [data-revela]:not([data-visto]) { opacity: 0; transform: translateY(18px); }
/* El teléfono solo se funde: no se desplaza al aparecer. */
.js [data-revela='funde']:not([data-visto]) { transform: none; }

/* ───────────────────────── Pie ───────────────────────── */
.pie { position: relative; display: grid; gap: 22px 40px; margin-top: clamp(8px, 2vw, 24px); padding: clamp(40px, 6vw, 72px) max(var(--gutter), calc((100% - var(--ancho)) / 2)) max(32px, env(safe-area-inset-bottom)); border-radius: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px) 0 0; background: radial-gradient(ellipse 60% 120% at 12% 0, #124a3a 0, var(--bosque) 70%); color: var(--claro-2); font-size: 14.5px; }
.pie a { text-underline-offset: 3px; font-weight: 500; color: var(--crema); }
.pie nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.pie nav a { padding: 8px 0; text-decoration: none; color: var(--claro-2); }
@media (hover: hover) and (pointer: fine) { .pie nav a:hover { color: var(--crema); } }
.pie-marca { display: inline-flex; align-items: center; gap: 10px; font: 600 34px/1 var(--f-marca); color: var(--crema); }
.pie-flor { width: 44px; }
.pie-lema { margin-top: 12px; font-size: clamp(20px, 1rem + 1vw, 28px); font-weight: 600; letter-spacing: -0.03em; color: var(--salvia-clara); }
.pie-firma { padding-top: 20px; border-top: 1px solid var(--linea-clara); color: var(--claro-3); }
@media (min-width: 820px) {
  .pie:has(.pie-cab) { grid-template-columns: 1fr auto; align-items: end; }
  .pie-nav { max-width: 420px; justify-content: flex-end; }
  .pie-firma { grid-column: 1 / -1; }
}

/* El cierre: lema, botón y un desfile de Kalmis sobre su colina, con el nombre enorme detrás. */
.pie-gran { isolation: isolate; overflow: hidden; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; padding-top: clamp(56px, 8vw, 112px); text-align: center; background: radial-gradient(ellipse 90% 70% at 50% 78%, #1f6d53 0, #14573f 30%, #0b3d2e 62%, var(--bosque) 100%); }
.pie-gran .luces i:nth-child(1) { left: clamp(-150px, -8vw, -50px); right: auto; top: 18%; opacity: 0.3; }
.pie-gran .luces i:nth-child(2) { left: auto; right: clamp(-130px, -8vw, -50px); bottom: 26%; opacity: 0.3; }
.pie-cierre { display: grid; justify-items: center; gap: 26px; position: relative; z-index: 2; }
.pie-gran .pie-lema { margin: 0; font-size: clamp(34px, 1.5rem + 3.2vw, 68px); line-height: 1.05; letter-spacing: -0.04em; color: var(--crema); }
.pie-gran .pie-lema em { display: block; color: var(--salvia-clara); }
.pie-gigante { position: absolute; z-index: 0; left: 50%; bottom: clamp(96px, 11vw, 150px); transform: translateX(-50%); margin: 0; font: 600 clamp(150px, 31vw, 470px)/0.74 var(--f-marca); letter-spacing: -0.03em; color: rgba(247, 235, 221, 0.055); white-space: nowrap; user-select: none; -webkit-user-select: none; pointer-events: none; }
.desfile { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; width: min(100%, 980px); margin-top: clamp(20px, 4vw, 48px); padding-bottom: clamp(26px, 4vw, 54px); }
.desfile-flor { position: relative; z-index: 1; width: var(--t); flex: none; margin-inline: clamp(-34px, -2.6vw, -12px); margin-bottom: var(--sube, 0px); rotate: var(--giro, 0deg); cursor: pointer; --bo-halo: 0.7; touch-action: manipulation; }
.d1 { --t: clamp(96px, 15vw, 190px); --giro: -8deg; --sube: -1%; }
.d2 { --t: clamp(110px, 17vw, 220px); --giro: 6deg; --sube: 3%; z-index: 2; }
.d3 { --t: clamp(150px, 24vw, 310px); --sube: 4%; z-index: 3; --bo-halo: 1; }
.d4 { --t: clamp(110px, 17vw, 220px); --giro: -5deg; --sube: 3%; z-index: 2; }
.d5 { --t: clamp(96px, 15vw, 190px); --giro: 8deg; --sube: -1%; }
.desfile-suelo { position: absolute; z-index: 0; left: 50%; bottom: -560px; width: max(140%, 1100px); height: 720px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse 60% 26% at 50% 0, rgba(255, 236, 196, 0.3) 0, rgba(190, 226, 200, 0.22) 34%, rgba(118, 178, 144, 0.14) 62%, rgba(60, 130, 100, 0.08) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); pointer-events: none; }
.pie-bajo { position: relative; z-index: 2; display: grid; gap: 16px 32px; width: 100%; padding-top: 22px; border-top: 1px solid var(--linea-clara); text-align: left; }
.pie-bajo .pie-marca { font-size: 26px; }
.pie-bajo .pie-flor { width: 34px; }
.pie-bajo .pie-firma { padding-top: 0; border-top: 0; }
@media (min-width: 820px) {
  .pie-bajo { grid-template-columns: auto 1fr; align-items: center; }
  .pie-bajo .pie-nav { max-width: none; justify-content: flex-end; }
  .pie-bajo .pie-firma { grid-column: 1 / -1; }
}
@media (max-width: 559px) { .d1, .d5 { display: none; } .desfile-flor { margin-inline: -14px; } }

/* ───────────────────────── Páginas sencillas (legal, 404) ───────────────────────── */
.sencilla { min-height: calc(100svh - 230px); display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); --bo-halo: 0; }
.sencilla > div { display: grid; justify-items: center; gap: 16px; max-width: 34rem; }
.sencilla .bo { width: 140px; }
.sencilla h1 { font-size: clamp(30px, 1.4rem + 2.4vw, 48px); line-height: 1.08; letter-spacing: -0.035em; }
.sencilla p { color: var(--tinta-2); font-size: clamp(17px, 0.4vw + 15.6px, 19px); }

/* ───────────────────────── Reducir movimiento ─────────────────────────
   Más suave, no nada: se quitan los desplazamientos y quedan fundidos cortos. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-property: opacity, background-color, color !important; transition-duration: 160ms !important; }
  .chat[data-reproduce] [data-msg] { opacity: 1; transform: none; }
  .js [data-revela] { opacity: 1 !important; transform: none !important; }
}
