:root {
  --bg: #f4f8f6;
  --bg2: #ffffff;
  --bg3: #eef5f3;
  --bg4: #dfe9e6;
  --border: rgba(20, 55, 48, .1);
  --text: #1a2623;
  --muted: #5c6d68;
  --accent: #2eb8a4;
  --accent2: #259985;
  --accent-dim: rgba(46, 184, 164, .18);
  --danger: #d94858;
  --warn: #b8922a;
  --radius: 12px;
  --font: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

.page-light {
  --shadow-sm: 0 2px 12px rgba(15, 45, 40, .06);
  --shadow-md: 0 8px 32px rgba(15, 45, 40, .08);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
  padding: 0.35rem 0;
}
.header-actions {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end;
}
.header-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: #25d366;
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.header-wa:hover {
  filter: brightness(1.06);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}
.header-wa:active { transform: scale(0.97); }
.header-wa:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}
.header-wa-icon {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.header-link {
  font-size: .8125rem; font-weight: 600; color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.header-link:hover { color: var(--accent); }
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}
.brand-logo:hover {
  opacity: 0.85;
}
.brand-logo img {
  height: 58px;
  width: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
@media (min-width: 768px) {
  .brand-logo img {
    height: 80px;
    max-height: 80px;
  }
}
.footer-logo img {
  height: 60px;
  filter: grayscale(100%) opacity(0.6);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-weight: 600; font-size: .875rem;
  padding: .6rem 1.2rem; border-radius: var(--radius);
  border: none; cursor: pointer; text-decoration: none;
  transition: background .2s, box-shadow .2s, opacity .2s;
}
.btn-sm { padding: .45rem .9rem; font-size: .8125rem; }
.btn-lg { padding: .75rem 1.6rem; font-size: .9375rem; }
.btn-accent {
  background: linear-gradient(180deg, #3dccb8, var(--accent)); color: #0a1210;
}
.btn-accent:hover {
  background: var(--accent2);
  box-shadow: 0 4px 20px rgba(46, 184, 164, .3);
}
.btn-outline {
  background: var(--bg2); color: var(--text); border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: #0f3d36;
  background: var(--accent-dim);
}
.btn:disabled { opacity: .35; pointer-events: none; }

/* ── Landing hero: texto fijo + círculo con bolas + carrusel solo tarjetas ── */
.landing-hero {
  background: var(--bg);
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 clamp(2rem, 5vw, 3.25rem);
}
/* Centro vertical de las fichas = centro del círculo (misma caja que .landing-orbit-layer) */
.landing-cards-carousel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(900px, 98%);
  max-width: 100%;
  margin: 0;
  padding: 0 0.35rem;
  box-sizing: border-box;
}
.landing-carousel-viewport {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
}
/* Carril infinito: desplazamiento lineal continuo hacia la izquierda (bucle sin saltos) */
.landing-marquee-track {
  display: flex;
  width: max-content;
  animation: landing-marquee-orbit 40s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}
.landing-marquee-panel {
  flex: 0 0 auto;
  width: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.15rem;
}
@keyframes landing-marquee-orbit {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-marquee-track {
    animation: none;
    transform: translateX(0);
  }
}
/* Pausa al pasar / enfocar / mantener pulsada una ficha */
.landing-carousel-viewport:has(.landing-card-link:hover) .landing-marquee-track,
.landing-carousel-viewport:has(.landing-card-link:focus-visible) .landing-marquee-track,
.landing-carousel-viewport:has(.landing-card-link:active) .landing-marquee-track {
  animation-play-state: paused;
}
@media (max-width: 520px) {
  .landing-cards-carousel {
    width: min(720px, 96%);
  }
}
.landing-hero-wrap {
  max-width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}
.landing-hero-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 32px rgba(15, 40, 35, .06), 0 1px 0 rgba(255, 255, 255, .8) inset;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(46, 184, 164, .12);
}
.landing-hero-visual {
  position: relative;
  /* Altura mínima: el círculo centrado aquí comparte el mismo centro que las fichas (50% + translate -50%) */
  min-height: min(62vw, 360px);
  padding: clamp(0.5rem, 2vmin, 1rem) 0;
}
.landing-orbit-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.landing-orbit-svg {
  width: min(118%, 540px);
  height: auto;
  max-height: min(92vw, 520px);
  opacity: 0.92;
}
.landing-ring { fill: none; stroke: rgba(46, 184, 164, .16); stroke-width: 1; }
.landing-ring-dim { stroke: rgba(120, 140, 135, .11); }
.landing-orbit-arm {
  transform-origin: 0 0;
}
.landing-orbit-arm--outer {
  animation: landing-orbit-spin 48s linear infinite;
}
.landing-orbit-arm--inner {
  animation: landing-orbit-spin 34s linear infinite reverse;
}
@keyframes landing-orbit-spin {
  to { transform: rotate(360deg); }
}
.landing-orbit-ball {
  fill: #2eb8a4;
}
.landing-orbit-ball--soft {
  fill: #3dccb8;
  opacity: 0.65;
}
@media (prefers-reduced-motion: reduce) {
  .landing-orbit-arm--outer,
  .landing-orbit-arm--inner {
    animation: none;
  }
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  padding: clamp(1.85rem, 4.5vw, 3.1rem) clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 2.75rem);
}
.landing-hero-copy {
  padding-top: 0.95rem;
}
@media (min-width: 900px) {
  .landing-hero-inner {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2.5rem);
  }
  .landing-hero-visual {
    min-height: 440px;
    width: 100%;
  }
}

.landing-crumb {
  margin: 0 0 .85rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8a9693;
}
.landing-crumb span { opacity: .45; }

.landing-title {
  margin: 4rem 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: #0f1715;
  line-height: 1.12;
}

.landing-lead-wrap {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  max-width: 36rem;
}
.landing-accent-bar {
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2eb8a4, #5ed4c4);
  flex-shrink: 0;
  min-height: 3.25rem;
  margin-top: .15rem;
}
.landing-lead {
  margin: 0;
  font-size: .95rem;
  line-height: 1.65;
  color: #5c6a66;
  font-weight: 450;
}
.landing-lead strong { color: #2d4540; font-weight: 600; }

.landing-hardware-preview {
  margin-top: 1.1rem;
  max-width: 100%;
}
.landing-hardware-preview img {
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: darken;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  filter: drop-shadow(0 10px 20px rgba(15, 45, 40, .08));
}
@media (max-width: 900px) {
  .landing-hardware-preview {
    margin-top: 1.15rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

.landing-cards {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(0.55rem, 2.2vw, 1rem);
  width: 100%;
  margin: 0 auto;
}

.landing-card {
  /* Mismo ancho entre sí (incl. LPR): reparten el espacio por igual, tope máximo común */
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 142px;
  background: linear-gradient(165deg, rgba(46, 184, 164, .1) 0%, rgba(245, 250, 249, .95) 48%, #f7faf9 100%);
  border: 1px solid rgba(46, 184, 164, .14);
  border-radius: 16px;
  padding: 1rem 0.62rem;
  text-align: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  border-bottom: 2px solid rgba(46, 184, 164, .08);
  scroll-snap-align: start;
}
a.landing-card-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.landing-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.landing-card-title,
.landing-card-text {
  display: block;
}
@media (max-width: 599px) {
  .landing-cards {
    justify-content: center;
    padding-bottom: 0.35rem;
    margin: 0 -0.15rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    gap: 0.5rem;
  }
  .landing-card {
    flex: 0 0 112px;
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }
}
.landing-card:hover,
.landing-card:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(15, 55, 48, .1), 0 4px 12px rgba(46, 184, 164, .12);
}
.landing-card-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto .65rem;
  color: #1a9d8c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease;
}
.landing-card-icon svg { width: 100%; height: 100%; }
.landing-marquee-panel .landing-card:nth-child(1) .landing-card-icon {
  animation: landing-icon-drift 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: 0s;
}
.landing-marquee-panel .landing-card:nth-child(2) .landing-card-icon {
  animation: landing-icon-drift 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: 0.5s;
}
.landing-marquee-panel .landing-card:nth-child(3) .landing-card-icon {
  animation: landing-icon-drift 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: 1s;
}
.landing-marquee-panel .landing-card:nth-child(4) .landing-card-icon {
  animation: landing-icon-drift 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: 1.5s;
}
@keyframes landing-icon-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-marquee-panel .landing-card-icon {
    animation: none;
  }
}
.landing-card-title {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2a3d38;
}
.landing-card-text {
  margin: .35rem 0 0;
  font-size: .68rem;
  line-height: 1.4;
  color: #7a8884;
  overflow-wrap: anywhere;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 1.25rem;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  position: relative;
  z-index: 8;
  pointer-events: auto;
}
.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 2.35rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0a1210;
  background: linear-gradient(180deg, #3dccb8, #2eb8a4);
  box-shadow: 0 4px 20px rgba(46, 184, 164, .35), 0 1px 0 rgba(255, 255, 255, .4) inset;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.landing-cta:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
  box-shadow: 0 8px 28px rgba(46, 184, 164, .4), 0 1px 0 rgba(255, 255, 255, .45) inset;
}
.landing-cta:active { transform: scale(.98); }

/* ── Demo section ── */
.demo-section {
  padding-bottom: clamp(3rem, 10vw, 5rem);
  background: var(--bg);
}
.demo-header {
  text-align: center; margin-bottom: 2rem;
}

.demo-global-auth {
  margin: -0.5rem auto 1.25rem;
  max-width: 1080px;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0a1210;
  background: linear-gradient(90deg, rgba(46, 184, 164, .2), rgba(46, 230, 200, .35), rgba(46, 184, 164, .2));
  border: 2px solid rgba(46, 184, 164, .55);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(46, 184, 164, .2);
  animation: demo-auth-pop .45s ease-out;
}
.demo-global-auth[hidden] {
  display: none !important;
}
@keyframes demo-auth-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-global-auth { animation: none; }
}
.demo-header h2 {
  margin: 0 0 .5rem; font-size: 1.5rem; font-weight: 700; color: #0f1715;
}
.demo-sub { margin: 0; color: var(--muted); max-width: 36rem; margin-inline: auto; line-height: 1.55; }

/* Guía tipo tutorial (español Chile) */
.demo-coach {
  margin: 0 auto 1.25rem;
  max-width: 1080px;
  padding: 0.85rem 1rem 1rem;
  background: linear-gradient(135deg, rgba(46, 184, 164, 0.08), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(46, 184, 164, 0.22);
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(15, 45, 40, 0.06);
}
.demo-coach-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.demo-coach-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  background: var(--accent-dim);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
}
.demo-coach-dots {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.demo-coach-dots li {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}
.demo-coach-dots li.is-on {
  background: var(--accent);
  transform: scale(1.15);
}
.demo-coach-msg {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
}
.demo-coach-msg strong {
  color: #0f1715;
  font-weight: 700;
}
.is-demo-focus {
  position: relative;
  z-index: 2;
  outline: 2px solid var(--accent) !important;
  outline-offset: 3px;
  border-radius: var(--radius);
  transition: outline-color 0.2s, box-shadow 0.2s;
}
@media (prefers-reduced-motion: no-preference) {
  .is-demo-focus {
    animation: demo-guide-pulse 1.8s ease-in-out infinite;
  }
}
@keyframes demo-guide-pulse {
  0%, 100% {
    outline-color: var(--accent);
    box-shadow: 0 0 0 0 rgba(46, 184, 164, 0.28);
  }
  50% {
    outline-color: var(--accent2);
    box-shadow: 0 0 0 5px rgba(46, 184, 164, 0.12);
  }
}
.sidebar-btn.is-demo-focus {
  border-radius: 10px;
  background: var(--accent-dim) !important;
}

/* Tutorial: barra lateral bloqueada hasta terminar el recorrido */
.demo-sidebar.is-sidebar-locked .sidebar-btn {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.48;
}
.demo-sidebar.is-sidebar-locked .sidebar-brand {
  opacity: 0.55;
}

/* ── Demo app shell ── */
.demo-app {
  display: grid;
  grid-template-columns: 64px 1fr;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  min-height: 460px;
  box-shadow: var(--shadow-md, 0 8px 32px rgba(15, 45, 40, .08));
}

/* Sidebar */
.demo-sidebar {
  background: var(--bg3);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center;
  padding: .75rem 0; gap: .25rem;
}
.sidebar-brand {
  font-weight: 800; font-size: .7rem; letter-spacing: .1em;
  color: var(--accent); margin-bottom: .75rem;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); border-radius: 8px;
}
.sidebar-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .6rem; font-weight: 600; font-family: var(--font);
  padding: .55rem .3rem; border-radius: 8px; width: 56px;
  transition: background .15s, color .15s;
}
.sidebar-btn svg { width: 18px; height: 18px; }
.sidebar-btn:hover { background: var(--bg4); color: var(--text); }
.sidebar-btn.active { background: var(--accent-dim); color: var(--accent); }

/* Panels */
.demo-main { padding: 1.5rem; position: relative; overflow: hidden; }
.demo-panel {
  display: none; flex-direction: column; gap: 1.25rem;
  animation: fadeUp .3s ease-out;
}
.demo-panel.active { display: flex; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-top {
  display: flex; align-items: center; justify-content: space-between;
}
.panel-top h3 { margin: 0; font-size: 1.05rem; font-weight: 700; color: #0f1715; }
.badge {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .3rem .6rem; border-radius: 20px;
  background: var(--bg3); color: var(--muted); border: 1px solid var(--border);
}
.badge.open { background: var(--accent-dim); color: var(--accent); }
.badge-count {
  min-width: 1.6rem; text-align: center;
  background: var(--accent-dim); color: var(--accent);
}

.panel-hint {
  margin: 0; font-size: .8125rem; color: var(--muted); font-style: italic;
}
.panel-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Gate animation ── */
.gate-visual {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  padding: 1.5rem 0;
}
.gate-road {
  position: relative;
  width: 200px; height: 100px;
  background:
    repeating-linear-gradient(90deg, var(--bg4) 0 8px, transparent 8px 16px) bottom / 100% 3px no-repeat,
    linear-gradient(to right, var(--bg3) 0 4px, transparent 4px) left / 100% 100% no-repeat;
  border-bottom: 2px solid var(--muted);
}
.gate-post {
  position: absolute; left: 6px; bottom: 0;
  width: 10px; height: 50px;
  background: var(--muted); border-radius: 3px 3px 0 0;
}
.gate-arm {
  position: absolute; left: 11px; bottom: 46px;
  width: 140px; height: 6px;
  background: var(--danger);
  border-radius: 3px;
  transform-origin: left center;
  transition: transform .8s cubic-bezier(.4,0,.2,1), background .4s;
}
.gate-arm.open {
  transform: rotate(-80deg);
  background: var(--accent);
}
.gate-status {
  margin: 0; font-size: .8125rem; color: var(--muted); text-align: center;
}

/* ── Visit form ── */
.visit-form {
  display: flex; flex-direction: column; gap: .85rem;
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
.form-group {
  display: flex; flex-direction: column; gap: .3rem;
}
.form-group label {
  font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.form-group input,
.form-group select {
  font-family: var(--font); font-size: .9375rem;
  padding: .55rem .7rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.form-group input:focus,
.form-group select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-group input::placeholder { color: rgba(90, 108, 104, .45); }
.form-group-btn {
  display: flex; align-items: flex-end;
}

/* ── Camera ── */
.visit-layout {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 900px) {
  .visit-layout { grid-template-columns: minmax(0, 1fr) 200px; }
}
.cam-box {
  display: flex; flex-direction: column; gap: .5rem;
}
.cam-viewport {
  position: relative;
  width: 100%; aspect-ratio: 1;
  max-width: 200px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.cam-viewport video,
.cam-viewport canvas { display: none; }
.cam-viewport video.active {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.cam-viewport img {
  display: none; width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
.cam-viewport img.active { display: block; }
.cam-overlay {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  pointer-events: none;
}
.cam-overlay.active { display: flex; }
.cam-crosshair {
  width: 60%; height: 60%;
  border: 2px solid rgba(46, 184, 164, .65);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(255, 255, 255, .45);
}
.cam-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  color: var(--muted); font-size: .75rem; font-weight: 600;
}
.cam-placeholder.hidden { display: none; }
.cam-flash {
  position: absolute; inset: 0;
  background: white; opacity: 0;
  pointer-events: none;
  transition: opacity .1s;
}
.cam-flash.fire {
  animation: flash .4s ease-out;
}
@keyframes flash {
  0% { opacity: .85; }
  100% { opacity: 0; }
}

/* Procesando rostro (Visitas) — feedback visible mientras corre face-api */
.cam-processing {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background: rgba(248, 252, 250, 0.97);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cam-processing[hidden] {
  display: none !important;
}
.cam-processing.is-active {
  opacity: 1;
  pointer-events: auto;
}
.cam-processing-card {
  width: 100%;
  max-width: 11.5rem;
  text-align: center;
}
.cam-processing-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 0.65rem;
  border: 3px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cam-spin 0.85s linear infinite;
}
@keyframes cam-spin {
  to { transform: rotate(360deg); }
}
.cam-processing-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg4);
  overflow: hidden;
  margin-bottom: 0.55rem;
}
.cam-processing-bar-fill {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  animation: cam-bar-indeterminate 1.1s ease-in-out infinite;
}
@keyframes cam-bar-indeterminate {
  0% { transform: translateX(-100%); width: 40%; }
  50% { width: 65%; }
  100% { transform: translateX(280%); width: 35%; }
}
.cam-processing-title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f1715;
  line-height: 1.35;
}
.cam-processing-hint {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .cam-processing-spinner,
  .cam-processing-bar-fill {
    animation: none;
  }
  .cam-processing-spinner {
    border-top-color: var(--accent2);
    opacity: 0.85;
  }
  .cam-processing-bar-fill {
    width: 100%;
    transform: none;
    opacity: 0.7;
  }
}

.cam-actions {
  display: flex; gap: .4rem; flex-wrap: wrap;
}

/* ── Lector facial (demo) ── */
.lector-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 900px) {
  .lector-layout {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    align-items: center;
  }
}
.lector-intro {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.lector-lead {
  margin: 0;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--text);
}
.lector-reg-hint {
  margin: 0;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
  padding: .5rem .65rem;
  background: var(--accent-dim);
  border-radius: 10px;
  border: 1px solid rgba(46, 184, 164, .2);
}
.lector-reg-hint.is-ok {
  border-color: rgba(46, 184, 164, .45);
  color: #1e5c52;
}
.lector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .25rem;
}
.lector-device-wrap {
  display: flex;
  justify-content: center;
}
.lector-device {
  width: 100%;
  max-width: 260px;
  border-radius: 18px;
  padding: 10px 10px 12px;
  background: linear-gradient(165deg, #1a2220 0%, #0d1211 42%, #151c1a 100%);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, .18),
    0 22px 48px rgba(15, 40, 35, .25),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  border: 1px solid rgba(46, 184, 164, .12);
  transition: box-shadow .35s ease, border-color .35s;
}
.lector-device.is-live {
  border-color: rgba(46, 184, 164, .28);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, .2),
    0 24px 56px rgba(46, 184, 164, .15),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}
.lector-device.is-scanning {
  animation: lector-device-pulse 1.8s ease-in-out infinite;
}
@keyframes lector-device-pulse {
  0%, 100% { box-shadow: 0 24px 56px rgba(46, 184, 164, .12); }
  50% { box-shadow: 0 28px 64px rgba(46, 184, 164, .22); }
}
.lector-device.is-ok {
  border-color: rgba(46, 200, 140, .55);
  animation: lector-ok-flash .9s ease-out;
}
@keyframes lector-ok-flash {
  0% { box-shadow: 0 0 0 0 rgba(46, 200, 140, .5); }
  100% { box-shadow: 0 24px 48px rgba(46, 184, 164, .2); }
}
.lector-bezel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
}
.lector-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a4542;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
  transition: background .25s, box-shadow .25s;
}
.lector-device.is-live .lector-led {
  background: #2ee6c8;
  box-shadow: 0 0 10px rgba(46, 230, 200, .75);
}
.lector-device.is-scanning .lector-led {
  animation: lector-led-blink .6s ease-in-out infinite;
}
@keyframes lector-led-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.lector-device.is-ok .lector-led {
  background: #3ae07a;
  box-shadow: 0 0 12px rgba(58, 224, 122, .85);
  animation: none;
  opacity: 1;
}
.lector-model {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(200, 220, 214, .45);
}
.lector-screen {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #050807;
  border: 1px solid rgba(0, 0, 0, .45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.lector-screen video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scaleX(-1);
}
.lector-device.is-live .lector-screen video {
  display: block;
}
.lector-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: rgba(180, 200, 195, .35);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.lector-device.is-live .lector-placeholder {
  display: none;
}
.lector-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.lector-device.is-live .lector-overlay {
  opacity: 1;
}
.lector-overlay.is-hidden {
  opacity: 0 !important;
}
.lector-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 52% 58% at 50% 38%,
    transparent 0%,
    transparent 42%,
    rgba(0, 0, 0, .28) 58%,
    rgba(0, 0, 0, .72) 100%
  );
}
.lector-brackets {
  position: absolute;
  inset: 0;
  --b: 2px;
  --c: rgba(46, 230, 200, .88);
  --o: 12%;
  --i: 22%;
}
.lector-brackets span {
  position: absolute;
  width: 18%;
  height: 18%;
  border: var(--b) solid var(--c);
  opacity: .9;
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(46, 230, 200, .25);
}
.lector-brackets span:nth-child(1) {
  top: var(--o); left: var(--i);
  border-right: none; border-bottom: none;
}
.lector-brackets span:nth-child(2) {
  top: var(--o); right: var(--i);
  border-left: none; border-bottom: none;
}
.lector-brackets span:nth-child(3) {
  bottom: var(--o); left: var(--i);
  border-right: none; border-top: none;
}
.lector-brackets span:nth-child(4) {
  bottom: var(--o); right: var(--i);
  border-left: none; border-top: none;
}
.lector-scan-sweep {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 18%;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 230, 200, .15), rgba(46, 230, 200, .85), rgba(46, 230, 200, .15), transparent);
  opacity: 0;
  filter: blur(0.5px);
}
.lector-device.is-scanning .lector-scan-sweep {
  opacity: 1;
  animation: lector-sweep 2.2s ease-in-out infinite;
}
@keyframes lector-sweep {
  0% { top: 22%; opacity: .4; }
  50% { top: 58%; opacity: 1; }
  100% { top: 22%; opacity: .4; }
}
.lector-overlay-msg {
  position: absolute;
  bottom: 10%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(230, 250, 245, .88);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .8);
  transition: font-size 0.2s ease, padding 0.2s ease, background 0.2s ease;
  z-index: 4;
}
/* Autorización: mensaje grande al centro + parpadeo para captar la mirada */
.lector-overlay-msg.is-authorized {
  bottom: auto;
  top: 50%;
  left: 6%;
  right: 6%;
  transform: translateY(-50%);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  line-height: 1.25;
  padding: 0.7rem 0.65rem;
  border-radius: 10px;
  text-transform: none;
  color: #f2fff8;
  background: rgba(8, 72, 52, 0.92);
  border: 2px solid rgba(80, 220, 150, 0.95);
  box-shadow:
    0 0 0 0 rgba(80, 220, 150, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
  animation: lector-auth-banner-pulse 0.75s ease-in-out infinite;
}
@keyframes lector-auth-banner-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(80, 220, 150, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-50%) scale(1);
  }
  50% {
    box-shadow:
      0 0 22px 8px rgba(80, 220, 150, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1.03);
  }
}
.lector-screen.is-auth-highlight {
  box-shadow:
    inset 0 0 0 2px rgba(80, 220, 150, 0.55),
    0 0 24px rgba(46, 200, 140, 0.25);
  animation: lector-screen-auth-glow 0.9s ease-in-out infinite;
}
@keyframes lector-screen-auth-glow {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(80, 220, 150, 0.45), 0 0 18px rgba(46, 200, 140, 0.2); }
  50% { box-shadow: inset 0 0 0 3px rgba(120, 255, 180, 0.65), 0 0 32px rgba(46, 200, 140, 0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .lector-overlay-msg.is-authorized {
    animation: none;
    box-shadow: 0 0 18px rgba(80, 220, 150, 0.4);
  }
  .lector-screen.is-auth-highlight {
    animation: none;
  }
}
.lector-flash-ok {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(58, 224, 122, .45) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
}
.lector-flash-ok.is-on {
  animation: lector-flash-ok-anim .7s ease-out forwards;
}
@keyframes lector-flash-ok-anim {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}
.lector-bezel-bottom {
  padding-top: 10px;
  display: flex;
  justify-content: center;
}
.lector-grill {
  display: block;
  width: 42%;
  height: 5px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #2a3330 0 3px, #1a2220 3px 5px);
  opacity: .7;
}
@media (prefers-reduced-motion: reduce) {
  .lector-device.is-scanning,
  .lector-device.is-ok {
    animation: none;
  }
  .lector-device.is-scanning .lector-led {
    animation: none;
  }
  .lector-device.is-scanning .lector-scan-sweep {
    animation: none;
    opacity: .6;
    top: 40%;
  }
}

/* ── QR Panel ── */
.qr-flow {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 700px) {
  .qr-flow { grid-template-columns: 1fr 180px 200px; gap: 1.25rem; }
}
.qr-step {
  display: flex; flex-direction: column; gap: .6rem;
}
.qr-step-label {
  margin: 0; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent);
}
.qr-gen-form {
  display: flex; flex-direction: column; gap: .6rem;
}
.qr-code-box {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.qr-code-box canvas { display: none; border-radius: 8px; }
.qr-code-box canvas.active { display: block; }
.qr-placeholder-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  width: 160px; height: 160px;
  border: 2px dashed var(--border); border-radius: 8px;
  color: var(--muted); font-size: .7rem; font-weight: 600;
}
.qr-placeholder-box.hidden { display: none; }
.qr-info {
  margin: 0; font-size: .65rem; color: var(--muted); text-align: center; max-width: 170px;
}

/* Scanner box (virtual) */
.qr-scanner-box {
  position: relative;
  width: 180px; height: 180px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  margin: 0 auto;
}
.qr-scan-qr-img {
  position: absolute; inset: 20px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: 0; transition: opacity .4s;
}
.qr-scan-qr-img.visible { opacity: .25; }
.qr-scan-laser {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px 3px rgba(46,230,200,.6);
  opacity: 0; pointer-events: none;
  top: 0;
}
.qr-scan-laser.active {
  opacity: 1;
  animation: laserSweep 1.2s ease-in-out;
}
@keyframes laserSweep {
  0% { top: 10%; }
  50% { top: 85%; }
  100% { top: 10%; }
}
.qr-scan-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  color: var(--muted); font-size: .7rem; font-weight: 600;
}
.qr-scan-placeholder.hidden { display: none; }
.qr-scan-success {
  position: absolute; inset: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  background: rgba(255, 255, 255, .96);
  color: var(--accent); font-size: .85rem; font-weight: 700;
  animation: fadeUp .4s ease-out;
  border-radius: var(--radius);
}
.qr-scan-success span { color: #0f1715; }
.qr-scan-success.active { display: flex; }
.qr-step-scan { align-items: center; }
.qr-step-scan .btn { width: 100%; max-width: 200px; }
.qr-scan-result {
  text-align: center; font-size: .8125rem; color: var(--muted); min-height: 1.2em;
}
.qr-scan-result strong { color: #0f1715; }
.qr-scan-result .qr-authorized { color: var(--accent); font-weight: 700; }

/* ── Log ── */
.log-list {
  display: flex; flex-direction: column; gap: .5rem;
  max-height: 300px; overflow-y: auto;
  padding-right: .25rem;
}
.log-list::-webkit-scrollbar { width: 4px; }
.log-list::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 4px; }

.log-empty { margin: 2rem 0; text-align: center; color: var(--muted); font-size: .875rem; }

.log-entry {
  display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start;
  padding: .7rem .85rem;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  animation: fadeUp .35s ease-out;
  box-shadow: var(--shadow-sm, 0 1px 4px rgba(15, 45, 40, .04));
}
.log-entry.has-photo {
  grid-template-columns: auto 1fr auto auto;
}
.log-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
  flex-shrink: 0;
}
.log-icon.gate { background: var(--accent-dim); color: var(--accent); }
.log-icon.visit { background: rgba(100,140,255,.15); color: #6498ff; }
.log-icon.facial { background: rgba(46, 230, 200, .14); color: #1a9d8c; }
.log-icon.qr { background: rgba(240,192,80,.15); color: #f0c050; }
.log-text { font-size: .8125rem; line-height: 1.45; }
.log-text strong { font-weight: 600; color: #0f1715; }
.log-time { font-size: .7rem; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.log-photo {
  width: 40px; height: 40px; border-radius: 6px;
  object-fit: cover; border: 1px solid var(--border);
  flex-shrink: 0; cursor: pointer;
  transition: transform .2s;
}
.log-photo:hover { transform: scale(2.8); z-index: 10; position: relative; box-shadow: 0 12px 40px rgba(15, 45, 40, .2); }

/* ── CTA / contact ── */
.demo-cta {
  margin-top: 2.5rem;
}
.cta-box {
  text-align: center;
  padding: 2.5rem clamp(1rem, 5vw, 3rem);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm, 0 2px 12px rgba(15, 45, 40, .06));
}
.cta-box h3 {
  margin: 0 0 .5rem; font-size: 1.25rem; font-weight: 700; color: #0f1715;
}
.cta-box > p {
  margin: 0 0 1.5rem; color: var(--muted);
}

.cta-form {
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: center; max-width: 640px; margin: 0 auto;
}
.cta-form input[type="text"],
.cta-form input[type="email"],
.cta-form input[type="tel"] {
  flex: 1 1 160px;
  font-family: var(--font); font-size: .9375rem;
  padding: .65rem .85rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.cta-form input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.cta-form input::placeholder { color: rgba(90, 108, 104, .45); }
.cta-form .cta-full { flex: 1 1 100%; width: 100%; }
.cta-form .btn { flex: 1 1 100%; margin-top: .25rem; }

.cta-preagenda-intro {
  margin: .35rem 0 0;
  text-align: left;
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--muted);
  padding: .75rem 1rem;
  background: linear-gradient(135deg, rgba(46, 184, 164, .08), rgba(46, 184, 164, .02));
  border-radius: var(--radius);
  border: 1px solid rgba(46, 184, 164, .15);
}
.cta-preagenda-intro strong { color: #1e4a42; }
.cta-preagenda-intro em { font-style: normal; font-weight: 600; color: var(--accent2); }

.preagenda-toggle {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  text-align: left;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  margin: .15rem 0 0;
  padding: .5rem .25rem;
}
.preagenda-toggle input {
  margin-top: .2rem;
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.is-hidden { display: none !important; }

.preagenda-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-top: .5rem;
  padding: 1.15rem 1.1rem 1.25rem;
  background: linear-gradient(165deg, #f9fcfb 0%, #f2f8f6 100%);
  border: 1px solid rgba(46, 184, 164, .2);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(15, 55, 48, .06);
  align-items: start;
}
@media (max-width: 599px) {
  .preagenda-panel { grid-template-columns: 1fr; }
}
.preagenda-cal-card {
  background: var(--bg2);
  border-radius: 14px;
  padding: .65rem .75rem .85rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm, 0 2px 12px rgba(15, 45, 40, .06));
}
.preagenda-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.preagenda-cal-nav {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent2);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.preagenda-cal-nav:hover {
  background: rgba(46, 184, 164, .28);
}
.preagenda-cal-nav:active { transform: scale(.94); }
.preagenda-cal-title {
  font-weight: 700;
  font-size: .9rem;
  color: #0f1715;
}
.preagenda-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  text-align: center;
  margin-bottom: .35rem;
}
.preagenda-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.preagenda-day {
  aspect-ratio: 1;
  max-height: 2.35rem;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 600;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
}
.preagenda-day:hover:not(:disabled) {
  background: var(--accent-dim);
}
.preagenda-day:disabled {
  opacity: .28;
  cursor: not-allowed;
}
.preagenda-day.preagenda-day--weekend:not(.other-month) {
  opacity: .2;
}
.preagenda-day.other-month {
  color: #aab5b2;
  font-weight: 500;
}
.preagenda-day.today {
  box-shadow: inset 0 0 0 2px rgba(46, 184, 164, .45);
}
.preagenda-day.selected {
  background: linear-gradient(180deg, #3dccb8, var(--accent));
  color: #0a1210;
  box-shadow: 0 4px 12px rgba(46, 184, 164, .35);
}
.preagenda-slots-wrap { min-width: 0; }
.preagenda-slots-label {
  margin: 0 0 .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.preagenda-slots {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.preagenda-slot {
  padding: .4rem .55rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg2);
  font-family: var(--font);
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.preagenda-slot:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.preagenda-slot.selected {
  border-color: transparent;
  background: linear-gradient(180deg, #3dccb8, var(--accent));
  color: #0a1210;
  box-shadow: 0 3px 10px rgba(46, 184, 164, .3);
}
.preagenda-slot:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.preagenda-pick-hint {
  margin: .65rem 0 0;
  font-size: .75rem;
  color: var(--muted);
  line-height: 1.4;
}

.form-status {
  margin: .75rem 0 0; font-size: .875rem; min-height: 1.3em;
}
.form-status.ok { color: var(--accent); }
.form-status.err { color: var(--danger); }

.cta-accessories {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
/* Gana a .cta-box h3 para centrar el bloque igual que la foto */
.cta-box h3.cta-accessories-title {
  margin: 0 auto 1.25rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #0f1715;
  line-height: 1.4;
  max-width: 28rem;
}
.cta-team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem clamp(2.5rem, 8vw, 5rem);
  margin: 0.25rem 0 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 clamp(0.25rem, 2vw, 1rem);
}
.cta-team-card {
  margin: 0;
  padding: 0 clamp(0.5rem, 2vw, 1rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 260px;
}
.cta-team-region {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent2);
  line-height: 1.45;
  text-align: center;
  max-width: 11.5rem;
  padding: 0 0.15rem;
}
@media (max-width: 480px) {
  .cta-team-grid {
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
    padding: 0;
  }
  .cta-team-card {
    max-width: 280px;
  }
}

/* Escudo GOCONTROL Pro — WebP ligero, lazy, fuera del camino crítico */
.cta-escudo-pro {
  margin: 1.25rem auto 0;
  max-width: 300px;
  text-align: center;
}
.cta-escudo-pro picture {
  display: block;
  line-height: 0;
}
.cta-escudo-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(15, 45, 40, 0.08);
  vertical-align: middle;
}

.cta-portrait-ring {
  width: min(168px, 38vw);
  height: min(168px, 38vw);
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow:
    0 0 0 4px rgba(46, 184, 164, .12),
    0 12px 36px rgba(15, 55, 48, .12);
  background: var(--bg3);
}
.cta-portrait-ring img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.cta-accessories-caption {
  margin: 1.15rem auto 0;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 26rem;
  text-align: center;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.25rem;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg3) 100%);
}
/* Móvil primero: columna; escritorio: dos columnas juntas y centradas (evita hueco entre bloques) */
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.75rem;
  width: 100%;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}
.footer-tagline {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
}
.footer-contact {
  width: 100%;
  min-width: 0;
}
@media (min-width: 769px) {
  .footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 17rem) minmax(0, 26rem);
    align-items: start;
    column-gap: clamp(2rem, 4.5vw, 3.25rem);
    row-gap: 0;
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }
  .footer-brand {
    width: auto;
  }
  .footer-contact {
    width: auto;
  }
  .footer-tagline {
    padding-left: 0.75rem;
    border-left: 3px solid var(--accent);
    font-weight: 600;
    color: var(--text);
    opacity: 0.92;
    letter-spacing: 0.01em;
    max-width: 17rem;
  }
}
.footer-contact-title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-contact-title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-top: 0.45rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0.85;
}
.footer-contact-card {
  padding: 0.85rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.footer-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.footer-contact-row:first-child {
  padding-top: 0.15rem;
}
.footer-contact-row--last,
.footer-contact-row:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}
.footer-contact-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent2);
}
.footer-contact-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}
.footer-contact-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-contact-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.25;
}
.footer-address {
  margin: 0;
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
}
.footer-contact-value {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}
.footer-contact-link {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}
.footer-contact-link:hover {
  color: var(--accent);
  border-bottom-color: rgba(46, 184, 164, 0.45);
}
@media (max-width: 768px) {
  .footer-brand {
    text-align: center;
    align-items: center;
  }
  .footer-tagline {
    max-width: 22rem;
    padding-left: 0;
    border-left: none;
    font-weight: 500;
    color: var(--muted);
  }
  .footer-contact-title {
    text-align: center;
  }
  .footer-contact-title::after {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-contact-card {
    padding: 0.9rem 1rem;
  }
  .footer-contact-row {
    gap: 0.75rem;
    padding: 0.65rem 0;
  }
}
@media (max-width: 400px) {
  .footer {
    padding: 1.65rem 0 2rem;
  }
  .footer-contact-card {
    padding: 1rem;
    border-radius: 10px;
  }
  .footer-contact-icon {
    width: 2rem;
    height: 2rem;
  }
  .footer-contact-icon svg {
    width: 16px;
    height: 16px;
  }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .demo-app { grid-template-columns: 1fr; }
  .demo-sidebar {
    flex-direction: row; justify-content: center;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: .5rem;
  }
  .sidebar-brand { display: none; }
  .sidebar-btn { flex-direction: row; gap: 6px; width: auto; font-size: .7rem; padding: .5rem .7rem; }
}

/* -- Typewriter Animation -- */
.typewriter-fx span {
  opacity: 0;
  display: inline-block;
  white-space: pre-wrap;
}
.typewriter-fx.is-visible span {
  animation: type-char 0.2s ease-out forwards;
  animation-delay: calc(var(--char-index) * 0.035s);
}
@keyframes type-char {
  0% { opacity: 0; transform: translateY(6px) scale(0.9); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* -- Casos de Exito / YouTube Lite -- */
.success-stories {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  scroll-margin-top: 5.5rem;
}
.success-stories h3 {
  margin: 0 auto 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f1715;
}
.success-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
}
.success-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}
/* Facade Pattern for YT Shorts */
.yt-lite {
  position: relative;
  display: block;
  width: 100%;
  max-width: 260px; /* Estilo mobile/shorts */
  aspect-ratio: 9 / 16;
  background-color: #000;
  background-position: center;
  background-size: cover;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 55, 48, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.yt-lite:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(46, 184, 164, 0.2);
}
.yt-lite::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}
.yt-lite-playbtn {
  width: 65px;
  height: 65px;
  background-color: rgba(30, 30, 30, 0.8);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}
.yt-lite:hover .yt-lite-playbtn {
  background-color: #ff0000;
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1.1);
}
.yt-lite-playbtn::after {
  content: '';
  display: block;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 27px;
  margin-top: 20px;
}
.yt-lite iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
