/*
 * Landing de QR-PLATE. Sitio estático: sin build, se publica la carpeta tal cual.
 *
 * Paleta de la marca:
 *   fondo/base            #e2e8f0  azul claro
 *   texto                 #1e293b  azul oscuro apagado
 *   títulos y destacados  #172a78 y #203ca7
 *   detalle               #2563eb  azul vívido — poco, a propósito: sobre el
 *                                  fondo da 4,2:1, no sirve para texto chico.
 *
 * Tipografías: títulos en Squartiqa (pendiente el archivo; mientras, Oxanium),
 * cuerpo en Oxanium. Para sumar Squartiqa: poner el .woff2 en `fuentes/`,
 * descomentar su @font-face y agregarla al frente de --font-titulo.
 */

@font-face {
  font-family: "Oxanium";
  src: url("fuentes/Oxanium-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/*
@font-face {
  font-family: "Squartiqa";
  src: url("fuentes/Squartiqa.woff2") format("woff2");
  font-display: swap;
}
*/

:root {
  --bg: #e2e8f0;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --border: #cbd5e1;
  --text: #1e293b;
  --muted: #475569;
  --title: #172a78;
  --accent: #203ca7;
  --vivid: #2563eb;
  --ok: #166534;
  --on-accent: #ffffff;

  --font-titulo: "Oxanium", system-ui, sans-serif;
  --font-cuerpo: "Oxanium", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;

  --header-h: 76px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cuerpo);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--vivid);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Logo ---------- */

/* El PNG de la marca se usa como máscara: se pinta con `currentColor`, así el
   mismo archivo sirve en azul sobre claro y en claro sobre el panel azul. */
.logo {
  display: block;
  aspect-ratio: 419 / 77;
  background: currentColor;
  -webkit-mask: url("img/logo-qr-plate.png") center / contain no-repeat;
  mask: url("img/logo-qr-plate.png") center / contain no-repeat;
}

/* ---------- Estructura ---------- */

.shell {
  position: relative;
  height: 100dvh;
  overflow: hidden;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(23, 42, 120, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 42, 120, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15));
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.orb-1 {
  width: 38rem;
  height: 38rem;
  background: #93b4ff;
  right: -18rem;
  top: -16rem;
}

.orb-2 {
  width: 30rem;
  height: 30rem;
  background: #ffffff;
  left: -14rem;
  bottom: -14rem;
  animation-delay: -3s;
}

/* ---------- Encabezado ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 34px;
  border-bottom: 1px solid var(--border);
  background: rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  justify-self: start;
  color: var(--title);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.brand .logo {
  width: 220px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vivid);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.7);
  animation: pulseDot 2s ease-in-out infinite;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
}

.btn-primary:hover {
  background: var(--title);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  min-height: 50px;
  padding: 0 22px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-primary.btn-lg {
  box-shadow: 0 10px 30px rgba(32, 60, 167, 0.22);
}

.btn-primary.btn-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(32, 60, 167, 0.3);
}

.btn-text {
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  padding: 0;
}

.icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.btn-primary:hover .icon {
  transform: translateX(3px);
}

.icon-down {
  transform: rotate(90deg);
}

.icon-up {
  transform: rotate(-90deg);
}

/* ---------- Navegación lateral ---------- */

.section-nav {
  position: fixed;
  z-index: 55;
  right: 23px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-item,
.next-section,
.back-to-top {
  text-decoration: none;
}

.nav-item {
  width: 104px;
  display: grid;
  grid-template-columns: 22px 24px 1fr;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 4px 0;
  color: #64748b;
  cursor: pointer;
  text-align: left;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
}

.nav-line {
  height: 1px;
  background: currentColor;
}

.nav-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(5px);
  transition: 0.25s ease;
}

.nav-item:hover,
.nav-item[aria-current="true"] {
  color: var(--accent);
}

.nav-item:hover .nav-label,
.nav-item[aria-current="true"] .nav-label {
  opacity: 1;
  transform: none;
}

.nav-item[aria-current="true"] .nav-line {
  height: 2px;
}

/* Sobre el panel azul de contacto, la navegación pasa a claro. */
body[data-panel="contacto"] .nav-item {
  color: #a5b4fc;
}

body[data-panel="contacto"] .nav-item:hover,
body[data-panel="contacto"] .nav-item[aria-current="true"] {
  color: #ffffff;
}

/* ---------- Paneles ---------- */

.viewport {
  position: relative;
  z-index: 1;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior: y contain;
  scrollbar-width: none;
}

.viewport::-webkit-scrollbar {
  display: none;
}

.panel {
  position: relative;
  min-height: 100dvh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: calc(var(--header-h) + 36px) 9vw 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.panel[data-active="true"] .animate {
  animation: panelIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.micro-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
}

h1,
h2,
h3 {
  font-family: var(--font-titulo);
  color: var(--title);
}

.accent-text {
  color: var(--accent);
}

.next-section {
  position: absolute;
  right: 9vw;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  cursor: pointer;
}

/* ---------- 01 Inicio ---------- */

.hero-layout {
  width: min(1220px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 5vw;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-title {
  margin: 22px 0 0;
  font-size: clamp(3.4rem, 6.2vw, 6.5rem);
  /* No menos de 1: con menos, las tildes de IDENTIFICÁ/ESCANEÁ/ACTUÁ pisan el
     renglón de arriba. */
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 780;
}

.hero-title span {
  display: block;
}

.hero-lead {
  max-width: 610px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit {
  position: absolute;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  border: 1px solid rgba(23, 42, 120, 0.14);
  border-radius: 50%;
  animation: slowRotate 22s linear infinite;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(23, 42, 120, 0.09);
  inset: 12%;
}

.orbit::after {
  inset: 26%;
}

.orbit span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vivid);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.6);
}

.orbit span:nth-child(1) {
  left: 49%;
  top: -4px;
}

.orbit span:nth-child(2) {
  right: 8%;
  bottom: 22%;
}

.orbit span:nth-child(3) {
  left: 6%;
  bottom: 28%;
}

.plate-stage {
  position: relative;
  z-index: 2;
  width: min(46vw, 610px);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(145deg, #ffffff, var(--surface-2));
  box-shadow:
    0 30px 70px rgba(23, 42, 120, 0.18),
    inset 0 1px #ffffff;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  animation: plateFloat 5s ease-in-out infinite;
}

.plate-topbar,
.plate-telemetry {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.plate-topbar {
  padding: 1px 4px 12px;
}

.plate-telemetry {
  padding: 12px 4px 1px;
}

.plate-telemetry b {
  color: var(--title);
  margin-right: 4px;
}

.status-ok {
  color: var(--ok);
}

.plate-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.scan-beam {
  position: absolute;
  z-index: 4;
  left: 4%;
  right: 4%;
  top: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--vivid), transparent);
  box-shadow: 0 0 16px var(--vivid);
  opacity: 0.8;
  animation: scanBeam 3.6s ease-in-out infinite;
}

.scan-card {
  position: absolute;
  z-index: 5;
  right: -2%;
  bottom: 4%;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid rgba(32, 60, 167, 0.25);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(23, 42, 120, 0.18);
  animation: cardHover 4s ease-in-out infinite;
}

.scan-card strong,
.scan-card small {
  display: block;
}

.scan-card strong {
  margin-top: 3px;
  font-size: 0.88rem;
  color: var(--title);
}

.scan-card small {
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--muted);
}

.scan-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- 02 Sistema ---------- */

.section-intro {
  width: min(1220px, 100%);
  margin: 0 auto 34px;
}

.section-title {
  margin: 18px 0 0;
  font-size: clamp(2.6rem, 4.3vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 760;
}

.dual-system {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.system-card {
  position: relative;
  min-height: 410px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.85);
  padding: 20px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(23, 42, 120, 0.06);
}

.card-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.system-card > p {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.hardware-plate {
  position: relative;
  height: 255px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hardware-image {
  width: min(86%, 500px);
  height: auto;
  border-radius: 7px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

.callout {
  position: absolute;
  padding: 5px 8px;
  border: 1px solid rgba(32, 60, 167, 0.3);
  border-radius: 4px;
  background: var(--surface);
  color: var(--accent);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.callout::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 1px;
  background: rgba(32, 60, 167, 0.4);
}

.callout-a {
  left: 2%;
  top: 16%;
}

.callout-a::after {
  left: 100%;
  width: 58px;
}

.callout-b {
  right: 1%;
  top: 33%;
}

.callout-b::after {
  right: 100%;
  width: 52px;
}

.callout-c {
  left: 8%;
  bottom: 14%;
}

.callout-c::after {
  left: 100%;
  width: 44px;
}

.device-frame {
  width: min(84%, 420px);
  margin: 19px auto 0;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(23, 42, 120, 0.12);
}

.device-top {
  display: flex;
  justify-content: space-between;
  color: var(--title);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.device-status {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 17px 2px;
}

.device-status strong {
  display: block;
  margin-top: 5px;
  font-size: 0.88rem;
  color: var(--title);
}

.ok-pill {
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(22, 101, 52, 0.1);
  color: var(--ok);
  font-size: 0.6rem;
  font-weight: 800;
}

.device-rows {
  display: grid;
  gap: 6px;
}

.device-rows span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 10px;
  background: var(--surface-2);
  border-radius: 7px;
}

.device-rows b {
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.device-rows i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
}

.device-pulse {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.62rem;
}

.device-pulse span:first-child {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---------- 03 Flujo ---------- */

.flow-rail {
  width: min(1180px, 100%);
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: 1fr 110px 1fr 110px 1fr;
  align-items: center;
}

.flow-step {
  min-height: 260px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.85);
  transition: 0.3s ease;
}

.flow-step:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.step-node {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 34px;
  border: 1px solid rgba(32, 60, 167, 0.35);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
}

.flow-step h3 {
  margin: 8px 0 0;
  font-size: 1.45rem;
}

.flow-step p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.flow-signal {
  position: relative;
  height: 1px;
  background: var(--border);
}

.flow-signal span {
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vivid);
  box-shadow: 0 0 10px var(--vivid);
  animation: signalMove 2.4s linear infinite;
}

.flow-footer {
  width: min(1180px, 100%);
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.flow-footer b {
  color: #94a3b8;
}

/* ---------- 04 Beneficios ---------- */

.benefit-layout {
  width: min(1220px, 100%);
  margin: auto;
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 5vw;
  align-items: center;
}

.section-intro-compact > p {
  max-width: 460px;
  margin: 24px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-card {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.85);
  transition: 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(23, 42, 120, 0.1);
}

.feature-icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  margin-bottom: 24px;
}

.feature-card h3 {
  margin: 8px 0 0;
  font-size: 1.12rem;
}

.feature-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

/* ---------- 05 Contacto: el único panel en azul de marca ---------- */

.contact-panel {
  text-align: center;
  background: var(--title);
  color: #e2e8f0;
}

.contact-panel h2,
.contact-panel .accent-text {
  color: #ffffff;
}

.contact-panel .accent-text {
  color: #93b4ff;
}

.contact-panel .eyebrow {
  border-color: rgba(226, 232, 240, 0.25);
  color: #c7d2fe;
}

.contact-core {
  position: relative;
  width: min(940px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-core .eyebrow {
  max-width: 420px;
}

.contact-title {
  margin: 22px 0 0;
  font-size: clamp(3.2rem, 6vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 780;
}

.contact-core > p {
  max-width: 650px;
  margin: 26px 0 0;
  color: #c7d2fe;
  font-size: 1rem;
  line-height: 1.75;
}

.contact-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.contact-panel .btn-primary {
  background: #ffffff;
  color: var(--title);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-panel .btn-primary:hover {
  background: #e2e8f0;
}

.contact-panel .btn-ghost {
  background: transparent;
  border-color: rgba(226, 232, 240, 0.4);
  color: #ffffff;
}

.contact-panel .btn-ghost:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.contact-meta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 13px;
  color: #a5b4fc;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-meta a {
  text-decoration: none;
}

.contact-meta a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.contact-halo {
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  left: 50%;
  top: 48%;
  margin: -310px 0 0 -310px;
  border: 1px solid rgba(147, 180, 255, 0.18);
  border-radius: 50%;
  animation: slowRotate 25s linear infinite;
}

.contact-halo::before,
.contact-halo::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(147, 180, 255, 0.1);
  border-radius: 50%;
  inset: 12%;
}

.contact-halo::after {
  inset: 27%;
}

.contact-halo span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #93b4ff;
  box-shadow: 0 0 12px #93b4ff;
}

.contact-halo span:nth-child(1) {
  top: -3px;
  left: 50%;
}

.contact-halo span:nth-child(2) {
  right: 8%;
  top: 28%;
}

.contact-halo span:nth-child(3) {
  left: 13%;
  bottom: 17%;
}

.back-to-top {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: #c7d2fe;
  font-size: 0.72rem;
  cursor: pointer;
}

/* ---------- Animaciones ---------- */

@keyframes panelIn {
  from {
    opacity: 0.25;
    transform: translateY(24px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floatOrb {
  to {
    transform: translate3d(45px, 25px, 0) scale(1.08);
  }
}

@keyframes pulseDot {
  50% {
    opacity: 0.45;
  }
}

@keyframes plateFloat {
  50% {
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg) translateY(-8px);
  }
}

@keyframes scanBeam {
  0%,
  15% {
    top: 18%;
    opacity: 0;
  }
  25%,
  75% {
    opacity: 0.8;
  }
  90%,
  100% {
    top: 72%;
    opacity: 0;
  }
}

@keyframes cardHover {
  50% {
    transform: translateY(-7px);
  }
}

@keyframes slowRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes signalMove {
  from {
    left: 0;
  }
  to {
    left: 100%;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 1050px) {
  .header {
    grid-template-columns: 1fr auto;
  }
  .header-meta {
    display: none;
  }
  .section-nav {
    right: 8px;
  }
  .nav-item {
    width: 42px;
    grid-template-columns: 16px 22px;
  }
  .nav-label {
    display: none;
  }
  .panel {
    padding-left: 6vw;
    padding-right: 6vw;
  }
  .hero-layout,
  .benefit-layout {
    gap: 3vw;
  }
  .hero-visual {
    min-height: 470px;
  }
  .flow-rail {
    grid-template-columns: 1fr 62px 1fr 62px 1fr;
  }
  .flow-step {
    padding: 20px;
  }
  .system-card {
    min-height: 390px;
  }
}

/* ---------- Teléfono ----------
   Sin paneles de pantalla completa ni snap: en un teléfono el contenido de un
   panel no entra en el alto, y un panel con scroll propio adentro de otro
   scroll se traba con el dedo. Acá es una página común que se desplaza. */

@media (max-width: 780px) {
  :root {
    --header-h: 64px;
  }
  .shell,
  .viewport {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }
  .header {
    padding: 0 16px;
    grid-template-columns: 1fr auto;
  }
  .brand .logo {
    width: 150px;
  }
  .header-actions .btn-ghost {
    display: none;
  }
  .header-actions .btn {
    min-height: 38px;
    padding: 0 13px;
    font-size: 0.7rem;
  }
  .section-nav,
  .next-section,
  .orbit {
    display: none;
  }
  .panel {
    height: auto;
    min-height: 0;
    padding: 64px 20px;
    justify-content: flex-start;
  }
  #inicio {
    padding-top: calc(var(--header-h) + 36px);
  }
  .hero-layout {
    display: flex;
    flex-direction: column;
    gap: 36px;
  }
  .hero-title {
    font-size: clamp(3rem, 15vw, 5rem);
  }
  .hero-lead {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
  }
  .hero-actions {
    flex-wrap: wrap;
  }
  .hero-visual {
    width: 100%;
    min-height: 0;
    padding-bottom: 48px;
  }
  .plate-stage {
    width: 100%;
    padding: 10px;
    transform: none;
    animation: none;
  }
  .plate-topbar,
  .plate-telemetry {
    font-size: 0.52rem;
  }
  .scan-card {
    right: 8px;
    bottom: 0;
    min-width: 0;
    padding: 10px 12px;
  }
  .scan-icon {
    width: 28px;
    height: 28px;
  }
  .section-intro {
    margin: 0 0 22px;
  }
  .section-title {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
  }
  .dual-system {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .system-card {
    min-height: 0;
    padding: 16px;
  }
  .hardware-plate {
    height: 190px;
  }
  .callout {
    font-size: 0.5rem;
  }
  .system-card > p {
    position: static;
    margin-top: 14px;
    font-size: 0.84rem;
  }
  .flow-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
  }
  .flow-step {
    width: 100%;
    min-height: 0;
    padding: 16px;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
  }
  .step-node {
    grid-row: 1 / 4;
    margin: 0;
    width: 40px;
    height: 40px;
  }
  .flow-step .micro-label,
  .flow-step h3,
  .flow-step p {
    grid-column: 2;
  }
  .flow-step h3 {
    font-size: 1.15rem;
  }
  .flow-step p {
    font-size: 0.84rem;
    margin-top: 4px;
  }
  .flow-signal {
    display: none;
  }
  .flow-footer {
    margin-top: 16px;
    gap: 8px;
    font-size: 0.56rem;
    flex-wrap: wrap;
  }
  .benefit-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
  }
  .benefit-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .feature-card {
    min-height: 0;
    padding: 18px;
  }
  .feature-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
  }
  .contact-panel {
    padding-bottom: 96px;
  }
  .contact-title {
    font-size: clamp(2.8rem, 14vw, 4.6rem);
  }
  .contact-actions {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
  }
  .contact-halo {
    width: 100vw;
    height: 100vw;
    margin: -50vw 0 0 -50vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .viewport {
    scroll-behavior: auto;
  }
}

/* ---------- Página de texto (política de privacidad) ---------- */

.doc-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.doc-header-inner,
.doc {
  width: min(760px, 100%);
  margin: 0 auto;
  padding-inline: 20px;
}

.doc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.doc-header .logo {
  width: 200px;
  color: var(--title);
}

.doc {
  padding-block: 48px 72px;
  font-size: 0.98rem;
  line-height: 1.75;
}

.doc h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.doc .vigencia {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.doc h2 {
  margin: 40px 0 8px;
  font-size: 1.2rem;
}

.doc p,
.doc ul {
  margin: 8px 0 0;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 6px;
}

.doc a {
  color: var(--accent);
}

.doc code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.doc .aviso {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.86rem;
}

.doc-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

@media (max-width: 780px) {
  .doc-header .logo {
    width: 150px;
  }
}
