/* =====================================================================
 * Nítido — estilos compartidos (calibrador, gracias, legales, 404)
 * La landing (index.html) tiene sus estilos propios en línea.
 * ===================================================================== */
:root {
    --bg: #0A0F1F; --panel: #0F1630; --surface: #151D3B; --surface2: #1B2547;
    --line: #232D52; --line2: #33407A;
    --text: #EEF2FF; --text2: #A3AFD1; --text3: #8591B5;
    --cyan: #22B8F0; --blue: #2F6BF0; --mint: #1FD4B4; --violet: #7B4DF2; --pink: #FF7AB6; --red: #FF7A8A; --yellow: #FFE14D; --warn: #FFB547;
    --flow: linear-gradient(120deg, var(--mint), var(--cyan) 35%, var(--blue) 68%, var(--violet));
    --btn: linear-gradient(120deg, var(--blue), var(--violet));
    --display: 'Sora', system-ui, sans-serif;
    --body: 'Figtree', system-ui, sans-serif;
    --radius: 22px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
[hidden] { display: none !important }
html { scroll-behavior: smooth }
body { background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column }
main { flex: 1 }
a { color: inherit }
img, svg, canvas { display: block; max-width: 100% }
button { font: inherit; color: inherit }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto }
.narrow { width: min(820px, 100% - 32px); margin-inline: auto }
.grad { background: var(--flow); -webkit-background-clip: text; background-clip: text; color: transparent }
.eyebrow { font: 600 12.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan) }
.tiny { font-size: 12.5px; color: var(--text3) }
.muted { color: var(--text2) }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

/* Fondo */
.stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 78% 12%, #fff6, transparent),
    radial-gradient(1.5px 1.5px at 42% 64%, #fff5, transparent), radial-gradient(1px 1px at 88% 72%, #fff7, transparent),
    radial-gradient(1px 1px at 24% 86%, #fff5, transparent), radial-gradient(1.5px 1.5px at 62% 34%, #fff6, transparent);
    animation: twinkle 6s ease-in-out infinite alternate }
.glow { position: fixed; z-index: -1; pointer-events: none; width: 680px; aspect-ratio: 1; right: -220px; top: -260px; background: radial-gradient(circle, rgba(123,77,242,.28), transparent 65%); animation: glow 9s ease-in-out infinite alternate }
@keyframes twinkle { to { opacity: .45 } }
@keyframes glow { to { transform: translate(-80px, 60px) scale(1.1) } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(10,15,31,.82); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s }
.nav.scrolled { border-color: var(--line) }
.nav__in { display: flex; align-items: center; gap: 1.4rem; height: 66px }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font: 800 1.15rem var(--display); letter-spacing: .04em }
.mark { width: 32px; height: 32px; border-radius: 10px; background: var(--flow); display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(34,184,240,.7) }
.mark svg { width: 17px; height: 17px }
.mark path { animation: eqb 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center }
.mark path:nth-child(2) { animation-delay: -.2s } .mark path:nth-child(3) { animation-delay: -.4s } .mark path:nth-child(4) { animation-delay: -.6s } .mark path:nth-child(5) { animation-delay: -.8s }
@keyframes eqb { 50% { transform: scaleY(.55) } }
.nav__links { display: flex; gap: 1.5rem; margin-left: auto; font-size: 14.5px; color: var(--text2) }
.nav__links a { text-decoration: none } .nav__links a:hover, .nav__links a[aria-current] { color: var(--text) }
.nav .btn { flex: none }
.privacy-pill { display: inline-flex; align-items: center; gap: .4rem; font-size: 12.5px; color: var(--text2); border: 1px solid var(--line2); border-radius: 999px; padding: .25rem .7rem; background: var(--surface) }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 15px var(--body); padding: .8rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer; color: var(--text); background: none; transition: filter .2s, transform .2s, border-color .2s, background .2s; white-space: nowrap }
.btn:hover { transform: translateY(-2px) } .btn:active { transform: scale(.98) }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none }
.btn--primary { background: var(--btn); color: #fff; box-shadow: 0 14px 36px -14px rgba(91,76,240,.9) }
.btn--primary:hover { filter: brightness(1.12) }
.btn--ghost { border-color: var(--line2) } .btn--ghost:hover { border-color: var(--cyan) }
.btn--soft { background: var(--surface2); border-color: var(--line2) }
.btn--sm { padding: .5rem 1rem; font-size: 14px }
.btn--lg { padding: 1rem 1.8rem; font-size: 16.5px }
.btn--shine { position: relative; overflow: hidden }
.btn--shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite }
@keyframes shine { 60%, 100% { transform: translateX(120%) } }

/* Tarjetas, chips, globos */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem }
.panel { background: radial-gradient(ellipse at 50% 0%, rgba(123,77,242,.16), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: 1.5rem }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { border: 1px solid var(--line2); background: var(--bg); color: var(--text2); font: 600 14px var(--body); border-radius: 999px; padding: .45rem .9rem; cursor: pointer; transition: background .2s, color .2s, transform .15s, border-color .2s }
.chip:hover { border-color: var(--cyan) }
.chip:active { transform: scale(.95) }
.chip[aria-pressed="true"], .chip.on { background: var(--btn); color: #fff; border-color: transparent }
.bubble { position: relative; background: #fff; color: #0A0F1F; font: 600 15px/1.4 var(--body); padding: .8rem 1rem; border-radius: 18px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.7) }
.bubble b { color: var(--violet) }
.tag { display: inline-flex; align-items: center; gap: .3rem; font: 700 12px var(--body); border-radius: 999px; padding: .2rem .65rem; background: rgba(31,212,180,.15); color: var(--mint); white-space: nowrap }
.tag--off { background: rgba(255,122,138,.15); color: var(--red) }
.tag--val { background: rgba(47,107,240,.22); color: #A9C2FF }
.tag--warn { background: rgba(255,181,71,.15); color: var(--warn) }
.alert { border-radius: 16px; padding: 1rem 1.1rem; border: 1px solid var(--line2); background: var(--surface) }
.alert--warn { background: rgba(255,181,71,.08); border-color: rgba(255,181,71,.5) }
.alert--bad { background: rgba(255,122,138,.08); border-color: rgba(255,122,138,.5) }
.alert--ok { background: rgba(31,212,180,.08); border-color: rgba(31,212,180,.5) }

/* Formularios */
.field { display: grid; gap: .35rem; font: 600 13.5px var(--body); color: var(--text2) }
select, input[type=text] { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line2); border-radius: 12px; padding: .7rem .85rem; font: 500 15px var(--body) }
select:focus, input[type=text]:focus { outline: 2px solid var(--cyan); outline-offset: 1px }
input[type=range] { width: 100%; accent-color: var(--cyan) }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease }
.reveal.in { opacity: 1; transform: none }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 2.2rem 0 2.6rem; color: var(--text3); font-size: 14px; margin-top: 4rem }
.site-foot .row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center }
.site-foot nav { display: flex; gap: 1.3rem; flex-wrap: wrap }
.site-foot a { text-decoration: none } .site-foot a:hover { color: var(--text) }
.site-foot .tiny { margin-top: 1rem }

/* ===== Nito (mascota) ===== */
.nito { display: block; width: 100%; height: auto; overflow: visible }
.nito .n-float { animation: tfloat 3.2s ease-in-out infinite }
.nito .n-shadow { transform-box: fill-box; transform-origin: center; animation: tshadow 3.2s ease-in-out infinite }
.nito .n-eyes { transform-box: fill-box; transform-origin: center; animation: tblink 5s infinite }
.nito .n-pupils { transition: transform .15s ease-out }
.nito .n-waves path { opacity: 0; animation: nwave 1.8s ease-out infinite }
.nito .n-waves .w2 { animation-delay: .35s }
.nito .n-eq rect { transform-box: fill-box; transform-origin: 50% 100%; animation: neq .9s ease-in-out infinite alternate }
.nito .n-eq rect:nth-child(2) { animation-delay: -.3s } .nito .n-eq rect:nth-child(3) { animation-delay: -.6s } .nito .n-eq rect:nth-child(4) { animation-delay: -.15s }
.nito .n-mic { transform-box: fill-box; transform-origin: center; animation: tpulse 1.4s ease-in-out infinite }
.nito.wave .n-arm-r { transform-box: fill-box; transform-origin: 30% 90%; animation: twave 1.1s ease-in-out infinite }
.nito.work .n-arm-l, .nito.work .n-arm-r { transform-box: fill-box; transform-origin: 50% 85%; animation: twork .5s ease-in-out infinite alternate }
.nito.work .n-arm-r { animation-delay: .25s }
.nito.listen .n-float { animation: tlisten 2.2s ease-in-out infinite }
.nito.happy .n-float { animation: thop .7s ease-in-out infinite }
.nito.sad .n-float { animation: tfloat 4.5s ease-in-out infinite; transform-origin: center }
@keyframes tfloat { 50% { transform: translateY(-12px) } }
@keyframes tlisten { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(-6deg) translateY(-4px) } }
@keyframes thop { 0%, 100% { transform: translateY(0) } 40% { transform: translateY(-22px) } 60% { transform: translateY(-18px) } }
@keyframes tshadow { 50% { transform: scaleX(.78); opacity: .18 } }
@keyframes tblink { 0%, 90%, 100% { transform: scaleY(1) } 93% { transform: scaleY(.08) } }
@keyframes twave { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(-32deg) } }
@keyframes twork { to { transform: rotate(-14deg) translateY(-4px) } }
@keyframes tpulse { 50% { transform: scale(1.18) } }
@keyframes nwave { 0% { opacity: 0; transform: translateX(-6px) } 30% { opacity: 1 } 100% { opacity: 0; transform: translateX(8px) } }
@keyframes neq { from { transform: scaleY(.25) } to { transform: scaleY(1) } }
@keyframes pop { from { opacity: 0; transform: scale(.7) translateY(8px) } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px) } }
@keyframes spin { to { transform: rotate(360deg) } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(31,212,180,.7) } 70%, 100% { box-shadow: 0 0 0 10px rgba(31,212,180,0) } }
.burst { position: fixed; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; z-index: 60; animation: burst 1.1s cubic-bezier(.2,.8,.3,1) forwards }
@keyframes burst { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0 } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 70; transform: translate(-50%, 140%); background: var(--surface2); border: 1px solid var(--line2); color: var(--text); padding: .75rem 1.1rem; border-radius: 14px; font-weight: 600; box-shadow: 0 20px 40px -18px #000; transition: transform .35s cubic-bezier(.3,1.3,.5,1); max-width: calc(100vw - 32px) }
.toast.show { transform: translate(-50%, 0) }

/* Páginas de texto (legales) */
.doc { padding: 3rem 0 1rem }
.doc h1 { font: 800 clamp(2rem, 5vw, 2.8rem)/1.1 var(--display); letter-spacing: -.02em; margin: .6rem 0 .6rem }
.doc .updated { color: var(--text3); font-size: 14px; margin-bottom: 2rem }
.doc h2 { font: 700 1.25rem var(--display); margin: 2rem 0 .6rem }
.doc p, .doc li { color: var(--text2) }
.doc p + p { margin-top: .7rem }
.doc ul { padding-left: 1.2rem; display: grid; gap: .4rem; margin-top: .5rem }
.doc b { color: var(--text) }
.doc .placeholder { background: rgba(255,181,71,.15); color: var(--warn); border-radius: 6px; padding: 0 .35rem; font-weight: 700 }
.doc .card { margin-top: 1.5rem }

@media (max-width: 760px) {
    .nav__links { display: none }
    .nav .btn { margin-left: auto }
    .privacy-pill { display: none }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important }
    .reveal { opacity: 1; transform: none }
}
