/* Landings públicas: ciudadano, administración y app. Movimiento cuidado y respetuoso de reduced-motion. */
.site-header { position: sticky; top: 0; z-index: 80; transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), backdrop-filter var(--t); }
.site-header.scrolled { background: rgba(255,255,255,.86); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(16,36,58,.25); }
.site-header .bar { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.site-header .brand b { font-size: 1rem; }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.site-nav a.nl { color: var(--ink); font-weight: 550; font-size: .93rem; padding: 8px 12px; border-radius: 10px; position: relative; white-space: nowrap; }
.site-header .brand b { white-space: nowrap; }
.site-nav a.nl::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--primary); transform: scaleX(0); transform-origin: left; transition: transform var(--t) var(--ease); }
.site-nav a.nl:hover { text-decoration: none; }
.site-nav a.nl:hover::after { transform: scaleX(1); }
.env-switch { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.env-switch a { padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none !important; }
.env-switch a.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.dark-page .env-switch { background: rgba(255,255,255,.08); } .dark-page .env-switch a { color: #a9b8cf; } .dark-page .env-switch a.on { background: rgba(255,255,255,.14); color: #fff; }
.mobile-toggle { display: none; }
@media (max-width: 1080px) {
  .site-nav { position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 84px 20px 24px; box-shadow: var(--sh-3); transform: translateY(-110%); transition: transform 320ms var(--ease); z-index: -1; }
  .site-nav.open { transform: none; }
  .site-nav a.nl { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .mobile-toggle { display: grid; margin-left: auto; }
  .dark-page .site-nav { background: var(--ink); }
}

/* hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 88px; isolation: isolate; }
.aurora { position: absolute; inset: -20% -10% auto -10%; height: 130%; z-index: -2; filter: blur(60px) saturate(1.2); opacity: .9; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: multiply; animation: drift 18s ease-in-out infinite alternate; }
.aurora .a1 { width: 520px; height: 520px; left: -60px; top: -80px; background: #cfe0ff; }
.aurora .a2 { width: 460px; height: 460px; right: 4%; top: 0; background: #fbe7a6; animation-duration: 22s; animation-delay: -6s; }
.aurora .a3 { width: 420px; height: 420px; left: 35%; top: 30%; background: #dfe9ff; animation-duration: 26s; animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 33% { transform: translate(60px,40px) scale(1.08); } 66% { transform: translate(-40px,70px) scale(.95); } 100% { transform: translate(30px,-30px) scale(1.05); } }
.grid-bg { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(16,36,58,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(16,36,58,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { display: none; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; font-weight: 600; box-shadow: var(--sh-1); }
.eyebrow .tag { background: var(--accent); color: var(--ink); border-radius: 999px; padding: 2px 8px; font-size: .72rem; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem); line-height: 1.04; letter-spacing: -.035em; margin: 18px 0 16px; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(100deg, var(--primary) 10%, #5b8def 45%, #c99a0e 90%); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% auto; animation: gradMove 8s ease-in-out infinite alternate; }
@keyframes gradMove { to { background-position: 100% center; } }
.hero .lead { font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: #3b4f68; max-width: 560px; }
.search-hero { position: relative; margin-top: 26px; max-width: 620px; }
.search-hero .box { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 8px 8px 8px 18px; box-shadow: 0 20px 50px -20px rgba(36,87,197,.45), 0 0 0 1px var(--line); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.search-hero .box:focus-within { box-shadow: 0 24px 60px -18px rgba(36,87,197,.55), 0 0 0 3px rgba(36,87,197,.25); transform: translateY(-2px); }
.search-hero input { flex: 1; border: 0; outline: none; font: 500 1.05rem var(--font); min-height: 48px; min-width: 0; background: transparent; }
.search-hero .glow { position: absolute; inset: -2px; border-radius: 20px; background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, rgba(36,87,197,.55), rgba(241,198,68,.7), transparent 100%); z-index: -1; filter: blur(6px); animation: spinAng 6s linear infinite; opacity: .7; }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinAng { to { --ang: 360deg; } }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: 16px; box-shadow: var(--sh-3); border: 1px solid var(--line); padding: 8px; z-index: 30; animation: pop var(--t) var(--ease); max-height: 380px; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none !important; }
.suggest a:hover, .suggest a.active { background: var(--primary-50); }
.suggest .dep { font-size: .75rem; color: var(--muted); }
.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick-chips .chip { background: rgba(255,255,255,.8); backdrop-filter: blur(6px); }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; max-width: 600px; }
@media (max-width: 520px) { .hero-stats { grid-template-columns: 1fr 1fr; } }
.hero-stats b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.hero-stats span { font-size: .8rem; color: var(--muted); }
.hero-visual { position: relative; height: 540px; perspective: 1200px; }
.float-card { position: absolute; background: #fff; border-radius: 20px; box-shadow: 0 30px 60px -25px rgba(16,36,58,.35), 0 0 0 1px rgba(16,36,58,.06); padding: 18px; will-change: transform; transition: transform 600ms var(--ease); }
.float-card.fc1 { left: 8%; top: 10px; width: 340px; animation: floaty 7s ease-in-out infinite; }
.float-card.fc2 { right: -10px; top: 250px; width: 280px; animation: floaty 8s ease-in-out infinite -2s; }
.float-card.fc3 { left: 0; bottom: 0; width: 300px; animation: floaty 9s ease-in-out infinite -4s; }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.mini-row { display: flex; align-items: center; gap: 10px; }
.mini-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #5b8def); border-radius: inherit; animation: grow 2.4s var(--ease) both; }
@keyframes grow { from { width: 0; } }
.check-anim { width: 22px; height: 22px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; flex: none; }
.check-anim svg path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: draw 800ms 600ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* sections */
.section { padding: 84px 0; position: relative; }
.section.alt { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--primary); margin-bottom: 10px; display: inline-block; }
.section h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); letter-spacing: -.025em; }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal="left"] { transform: translateX(-30px); } [data-reveal="right"] { transform: translateX(30px); } [data-reveal="zoom"] { transform: scale(.94); }
[data-reveal].in { opacity: 1; transform: none; }

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 700px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cat { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; overflow: hidden; transition: transform 300ms var(--ease), box-shadow 300ms var(--ease), border-color 300ms; }
.cat::before { content: ""; position: absolute; inset: auto -40% -60% auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(36,87,197,.14), transparent 70%); transform: scale(.6); opacity: 0; transition: all 400ms var(--ease); }
.cat:hover { transform: translateY(-5px); box-shadow: 0 24px 40px -24px rgba(16,36,58,.35); border-color: #cddaf0; }
.cat:hover::before { transform: scale(1.4); opacity: 1; }
.cat .ci { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; transition: transform 400ms var(--ease), background 300ms; }
.cat:hover .ci { transform: rotate(-8deg) scale(1.08); background: var(--primary); color: #fff; }
.cat b { font-size: 1rem; }
.cat small { color: var(--muted); line-height: 1.4; }
.cat .n { position: absolute; top: 14px; right: 14px; font-size: .75rem; font-weight: 700; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; position: relative; counter-reset: st; }
.steps::before { content: ""; position: absolute; top: 28px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1.4s var(--ease); }
.steps.in::before { --p: 1; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .steps::before { display: none; } } @media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; text-align: left; }
.step .sn { width: 56px; height: 56px; border-radius: 18px; background: #fff; border: 2px solid var(--primary); color: var(--primary); font-weight: 800; font-size: 1.2rem; display: grid; place-items: center; margin-bottom: 14px; position: relative; z-index: 1; box-shadow: 0 10px 24px -12px rgba(36,87,197,.6); }
.step:nth-child(4) .sn { border-color: #d9a90f; color: #8a6500; }

.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } @media (max-width: 640px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-card { position: relative; background: #fff; border-radius: 20px; border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; transform-style: preserve-3d; transition: transform 250ms var(--ease), box-shadow 250ms var(--ease); overflow: hidden; }
.demo-card:hover { box-shadow: 0 30px 50px -30px rgba(16,36,58,.45); }
.demo-card .shine { position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(36,87,197,.10), transparent 40%); opacity: 0; transition: opacity 250ms; pointer-events: none; }
.demo-card:hover .shine { opacity: 1; }
.demo-card .who { display: flex; gap: 12px; align-items: center; }
.demo-card .story { font-size: 1.02rem; font-weight: 650; line-height: 1.35; }
.demo-card .role { font-size: .78rem; color: var(--muted); }
.demo-card .actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.demo-card.staff { background: linear-gradient(160deg, #fff, var(--surface)); }
.cred { display: none; background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: .84rem; }
.cred.show { display: block; animation: fadeUp var(--t) var(--ease); }

.preview-shell { border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 50px 80px -40px rgba(16,36,58,.4); overflow: hidden; }
.preview-top { display: flex; gap: 6px; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; }
.preview-top i { width: 11px; height: 11px; border-radius: 50%; background: #e2e8f0; display: block; }
.preview-top i:nth-child(1) { background: #f87171; } .preview-top i:nth-child(2) { background: #fbbf24; } .preview-top i:nth-child(3) { background: #34d399; }
.preview-top .url { margin-left: 12px; font-size: .75rem; color: var(--muted); background: #fff; border-radius: 999px; padding: 3px 12px; }
.preview-body { padding: 20px; min-height: 360px; }

.site-footer { background: var(--ink); color: #b7c4d8; padding: 56px 0 28px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; font-size: .95rem; }
.site-footer .foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .site-footer .foot-grid { grid-template-columns: 1fr 1fr; } } @media (max-width: 520px) { .site-footer .foot-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 18px; font-size: .8rem; color: #8ea0b8; }

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------ administración (oscuro) */
.dark-page { background: #0b1726; color: #c9d5e6; }
.dark-page .site-header.scrolled { background: rgba(11,23,38,.8); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.dark-page .site-header .brand b { color: #fff; }
.dark-page .site-nav a.nl { color: #cfdaea; }
.dark-page h1, .dark-page h2, .dark-page h3 { color: #fff; }
.dark-page .muted { color: #8ea0b8; }
.dark-page .section.alt { background: #0f1e33; }
.dark-hero { position: relative; overflow: hidden; padding: 70px 0 90px; }
.dark-hero .beam { position: absolute; width: 900px; height: 900px; left: 50%; top: -520px; transform: translateX(-50%); background: conic-gradient(from 180deg, transparent, rgba(36,87,197,.55), rgba(241,198,68,.35), transparent 60%); filter: blur(80px); animation: beam 14s linear infinite; z-index: 0; opacity: .8; }
@keyframes beam { to { transform: translateX(-50%) rotate(360deg); } }
.dark-hero .container { position: relative; z-index: 1; }
.dark-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 20px; backdrop-filter: blur(8px); transition: transform 300ms var(--ease), border-color 300ms; }
.dark-card:hover { transform: translateY(-4px); border-color: rgba(241,198,68,.4); }
.dept-chip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: #e2e9f4; }
.dept-chip b { color: var(--accent); font-size: .8rem; letter-spacing: .06em; }
.console { background: #071220; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.console .ct { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .8rem; color: #8ea0b8; }
.console .cb { padding: 16px; display: grid; gap: 10px; }
.console .kc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.console .kc div { background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px; }
.console .kc b { display: block; color: #fff; font-size: 1.3rem; }
.console .kc span { font-size: .72rem; color: #8ea0b8; }
.console .line { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); font-size: .85rem; animation: slideIn 600ms var(--ease) both; }
.console .line:nth-child(2) { animation-delay: .15s; } .console .line:nth-child(3) { animation-delay: .3s; } .console .line:nth-child(4) { animation-delay: .45s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bars span { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent), #b98b0a); transform-origin: bottom; animation: rise 1.4s var(--ease) both; }
.bars span:nth-child(odd) { background: linear-gradient(180deg, #5b8def, var(--primary)); }
@keyframes rise { from { transform: scaleY(0); } }

/* ------------------------------------------ app landing */
.app-stage { min-height: calc(100vh - 32px); background: radial-gradient(900px 600px at 15% 20%, #e5edff, transparent 60%), radial-gradient(700px 500px at 90% 90%, #fdf1c7, transparent 60%), #f7f9fd; display: grid; place-items: center; padding: 24px 16px 40px; position: relative; overflow: hidden; }
.app-stage .orbit { position: absolute; border: 1px dashed rgba(36,87,197,.18); border-radius: 50%; animation: spin 80s linear infinite; }
.app-layout { display: grid; grid-template-columns: auto 380px; gap: 56px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 960px) { .app-layout { grid-template-columns: 1fr; gap: 28px; justify-items: center; } }
.device { width: 390px; height: 800px; max-height: calc(100vh - 90px); min-height: 640px; border-radius: 56px; background: #0b1726; padding: 14px; box-shadow: 0 60px 120px -40px rgba(16,36,58,.55), inset 0 0 0 2px #2a3a52, 0 0 0 10px rgba(255,255,255,.6); position: relative; animation: deviceIn 900ms var(--ease) both; }
@keyframes deviceIn { from { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.96); } to { opacity: 1; transform: none; } }
.device::before { content: ""; position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; border-radius: 20px; background: #000; z-index: 3; }
.device iframe { width: 100%; height: 100%; border: 0; border-radius: 44px; background: #fff; }
.side-card { background: #fff; border-radius: 26px; padding: 26px; box-shadow: var(--sh-3); border: 1px solid var(--line); animation: fadeUp 900ms 200ms var(--ease) both; }
.install-steps { display: grid; gap: 10px; margin-top: 14px; }
.install-steps div { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.install-steps > div > b { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: .75rem; flex: none; }
@media (max-width: 520px) { .app-stage { display: none; } }

/* acceso rápido a la demo */
.quick-demo { margin-top: 22px; max-width: 620px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--sh-2); display: grid; gap: 10px; }
.qd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 680px) { .qd-grid { grid-template-columns: 1fr; } }
.qd-btn { width: 100%; height: 100%; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--ink); transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t); min-height: 44px; }
.qd-btn:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--sh-2); }
.qd-btn b { display: block; font-size: .86rem; line-height: 1.25; }
.qd-btn small { display: block; font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* accesos de administración */
.access-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 800px) { .access-list { grid-template-columns: 1fr; } }
.access-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.access-row .code { color: var(--accent); font-size: .8rem; letter-spacing: .06em; width: 38px; }
.access-row .name { flex: 1; color: #e2e9f4; }
.access-row .acts { display: flex; gap: 6px; }
.access-row .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
/* demo-banner más discreto */
.demo-banner { font-size: .72rem; padding: 4px 12px; }
