:root {
  --navy-900: #08152B;
  --navy-800: #0B1F3A;
  --navy-700: #12294F;
  --navy-600: #17335F;
  --teal-500: #00E5C7;
  --teal-600: #00C2A8;
  --teal-700: #00A48F;
  --coral-500: #FF5A5F;
  --white: #FFFFFF;
  --bg: #F4F6FA;
  --bg-soft: #EDF1F7;
  --ink: #0B1F3A;
  --ink-soft: #3D4B63;
  --ink-faint: #8593AB;
  --line: #E3E8F0;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 30px rgba(11, 31, 58, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(11, 31, 58, 0.14);
  --font-display: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: inherit; }
.text-accent { color: var(--teal-500); }

#app { min-height: 100%; display: flex; flex-direction: column; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 56px);
  background: var(--navy-800);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--white);
  letter-spacing: 1px;
}
.topbar__brand .dot { color: var(--teal-500); }
.topbar__event {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9FB0CC;
}
.topbar__home {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.topbar__home svg { width: 20px; height: 20px; }
.topbar__home:active { transform: scale(0.94); }
.topbar__home:hover { background: rgba(255,255,255,0.14); }

/* ---------- Screens ---------- */
#screens { flex: 1; position: relative; }
.screen {
  display: none;
  padding: clamp(24px, 4vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
  animation: fadeUp .45s ease;
}
.screen.is-active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Home / Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 55%, #0A3A52 100%);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  overflow: hidden;
  margin-bottom: 36px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,199,0.28) 0%, rgba(0,229,199,0) 70%);
  pointer-events: none;
}
.hero__eyebrow {
  color: var(--teal-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  position: relative;
}
.hero__title {
  color: var(--white);
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.18;
  margin: 16px 0 18px;
  position: relative;
  max-width: 820px;
}
.hero__subtitle {
  color: #C7D3E6;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.6;
  max-width: 680px;
  position: relative;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.topic-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 26px 22px;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 168px;
}
.topic-card:hover, .topic-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0,194,168,0.4);
}
.topic-card:active { transform: translateY(-1px) scale(0.99); }
.topic-card__icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--teal-500);
  display: flex; align-items: center; justify-content: center;
}
.topic-card__icon svg { width: 24px; height: 24px; }
.topic-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.topic-card p {
  font-size: 13.5px;
  color: var(--ink-faint);
  line-height: 1.5;
}
.topic-card__arrow {
  margin-top: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--teal-700);
}
.topic-card__arrow svg { width: 16px; height: 16px; transition: transform .18s ease; }
.topic-card:hover .topic-card__arrow svg { transform: translateX(4px); }

/* ---------- Back button ---------- */
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: var(--ink-soft); font-weight: 600; font-size: 14px;
  padding: 10px 4px; margin-bottom: 8px;
}
.btn-back svg { width: 16px; height: 16px; }
.btn-back:hover { color: var(--navy-800); }

/* ---------- Questions ---------- */
.q-header { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; }
.q-icon {
  flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--teal-500);
  display: flex; align-items: center; justify-content: center;
}
.q-icon svg { width: 28px; height: 28px; }
.q-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--teal-700); margin-bottom: 4px; }
.q-header h2 { font-size: clamp(20px, 3vw, 28px); color: var(--ink); }
.q-subtitle { color: var(--ink-faint); font-size: 14px; margin-top: 6px; }

.q-progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 28px; }
.q-progress__bar { height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--teal-500)); border-radius: 999px; transition: width .3s ease; }

.q-form { display: flex; flex-direction: column; gap: 26px; }
.q-block__label { font-size: 15.5px; font-weight: 700; color: var(--ink); margin-bottom: 12px; display: block; }
.q-block__hint { font-size: 13px; font-weight: 500; color: var(--teal-700); margin-left: 6px; }
.q-options { display: flex; flex-wrap: wrap; gap: 10px; }
.q-chip {
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.q-chip:hover { border-color: var(--teal-600); }
.q-chip.is-selected {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}
.q-chip.is-selected::before { content: "✓ "; color: var(--teal-500); }
.q-text {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--white);
}
.q-text:focus { outline: none; border-color: var(--teal-600); }
textarea.q-text { font-family: var(--font-body); line-height: 1.5; resize: vertical; min-height: 86px; }
.q-text::placeholder { color: var(--ink-faint); }

.q-text-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mic-btn, .clear-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13.5px; font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.mic-btn:hover, .clear-btn:hover { border-color: var(--teal-600); color: var(--ink); }
.mic-btn svg, .clear-btn svg { width: 16px; height: 16px; }
.mic-btn.is-recording {
  background: var(--coral-500);
  border-color: var(--coral-500);
  color: var(--white);
  animation: mic-pulse 1s ease-in-out infinite;
}
.mic-btn.is-busy { opacity: 0.55; pointer-events: none; }
.clear-btn { background: transparent; }
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(255, 90, 95, 0); }
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  color: var(--navy-900);
  border: none;
  font-weight: 800;
  font-size: 15px;
  padding: 16px 30px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  box-shadow: 0 10px 24px rgba(0,194,168,0.28);
}
.btn-primary svg { width: 18px; height: 18px; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-generate { margin-top: 8px; width: 100%; }

.btn-ghost {
  background: none;
  border: 1.5px solid var(--line);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: 999px;
  cursor: pointer;
}

/* ---------- Loading ---------- */
.screen--loading { display: none; min-height: 60vh; align-items: center; justify-content: center; }
.screen--loading.is-active { display: flex; }
.loader { text-align: center; }
.loader__ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 5px solid var(--line);
  border-top-color: var(--teal-500);
  margin: 0 auto 24px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader__text { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink); }
.loader__sub { margin-top: 8px; color: var(--ink-faint); font-size: 14px; }

/* ---------- Results ---------- */
.results-hero {
  position: relative;
  margin: 8px 0 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 55%, #0A3A52 100%);
  box-shadow: var(--shadow-card);
}
.results-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at top right, black, transparent 70%);
  pointer-events: none;
}
.results-hero::after {
  content: "";
  position: absolute;
  top: -30%; right: -8%;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,199,0.24) 0%, rgba(0,229,199,0) 70%);
  pointer-events: none;
}
.results-hero__tag {
  position: relative;
  display: inline-block;
  background: rgba(0,229,199,0.15);
  border: 1px solid rgba(0,229,199,0.4);
  color: var(--teal-500);
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  padding: 6px 12px; border-radius: 999px;
  margin-bottom: 16px;
}
.results-hero__content {
  position: relative;
  max-width: 760px;
}
.results-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--teal-500); margin-bottom: 8px; }
.results-hero__content h2 { font-size: clamp(20px, 2.6vw, 27px); line-height: 1.4; color: var(--white); font-weight: 700; font-family: var(--font-body); }

/* ---------- Hero figure (imagen IA como pieza propia) ---------- */
.hero-figure { margin: 0 0 28px; }
.hero-figure__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: var(--bg-soft);
  aspect-ratio: 16 / 9;
}
.hero-figure__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity .6s ease;
}
.hero-figure__img.is-loaded { opacity: 1; }
/* Al cargar, el marco adopta la proporción de la imagen para mostrar el diagrama completo */
.hero-figure.is-loaded .hero-figure__frame { aspect-ratio: auto; }
.hero-figure__skeleton {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-700) 55%, #0A3A52 100%);
  color: #9FB0CC;
  font-size: 13px; font-weight: 600;
  transition: opacity .35s ease;
}
.hero-figure__shimmer {
  width: 46px; height: 46px; border-radius: 50%;
  border: 4px solid rgba(0,229,199,0.25);
  border-top-color: var(--teal-500);
  animation: spin 0.9s linear infinite;
}
.hero-figure__skeleton.is-hidden { opacity: 0; pointer-events: none; }
.hero-figure.is-empty { display: none; }
.hero-figure figcaption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
}

.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 860px) { .results-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow-card);
}
.card h3 {
  font-size: 16px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.card-kicker {
  font-size: 11px; font-weight: 800;
  background: var(--navy-800); color: var(--teal-500);
  padding: 3px 8px; border-radius: 6px;
  letter-spacing: 1px;
}

.abc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; counter-reset: abc; }
.abc-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.55;
  counter-increment: abc;
}
.abc-list li::before {
  content: counter(abc);
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy-800); color: var(--white);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li {
  position: relative;
  padding-left: 26px;
  padding-bottom: 18px;
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.5;
}
.timeline li::before {
  content: "";
  position: absolute; left: 4px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(0,229,199,0.18);
}
.timeline li::after {
  content: "";
  position: absolute; left: 8px; top: 14px; bottom: 0;
  width: 2px; background: var(--line);
}
.timeline li:last-child::after { display: none; }
.timeline li:last-child { padding-bottom: 0; }

.arch-diagram { display: flex; flex-direction: column; }
.arch-layer {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px 16px 56px;
}
.arch-layer + .arch-layer { margin-top: 26px; }
.arch-layer__step {
  position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--teal-500);
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px var(--white);
  flex-shrink: 0;
}
.arch-layer__name { font-weight: 800; font-size: 14px; color: var(--navy-800); min-width: 170px; flex-shrink: 0; }
.arch-layer__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-chip {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.arch-connector {
  position: relative;
  height: 26px;
  margin-left: 2px;
}
.arch-connector::before {
  content: "";
  position: absolute; left: 15px; top: -10px; bottom: -10px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--teal-500) 0 4px, transparent 4px 8px);
}
.arch-connector::after {
  content: "";
  position: absolute; left: 9px; bottom: -12px;
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--teal-500);
}
@media (max-width: 700px) {
  .arch-layer { flex-direction: column; align-items: flex-start; gap: 10px; padding-left: 20px; padding-top: 34px; }
  .arch-layer__step { left: 20px; top: 16px; transform: none; }
  .arch-layer__name { min-width: 0; }
}

/* ---------- Estimaciones (MVP vs Full) ---------- */
.estimations-section {
  margin: 0 0 24px;
}
.estimations-header {
  margin-bottom: 14px;
}
.estimations-header h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.estimations-subtitle {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
}
.estimation-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 800px) {
  .estimation-cards {
    grid-template-columns: 1fr;
  }
}
.estimation-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.estimation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(11, 31, 58, 0.08);
}
.estimation-card--mvp {
  border: 2px solid var(--teal-500);
  background: linear-gradient(180deg, rgba(0, 229, 199, 0.04) 0%, var(--white) 35%);
  position: relative;
}
.estimation-card--full {
  border: 1px solid var(--line);
}
.estimation-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.estimation-card__title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
}
.estimation-card__scope {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
}
.est-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}
.est-tag--mvp {
  background: var(--teal-500);
  color: var(--navy-900);
  box-shadow: 0 2px 8px rgba(0, 229, 199, 0.35);
}
.est-tag--full {
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.costs-list { list-style: none; margin: 0 0 14px; padding: 0; }
.costs-list li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--bg-soft);
  font-size: 14px;
}
.costs-list li span:first-child { color: var(--ink-soft); }
.costs-list li span:last-child { color: var(--ink); font-weight: 700; white-space: nowrap; }
.costs-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 6px; margin-bottom: 8px;
}
.costs-total span { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: 0.5px; }
.costs-total strong { font-size: 20px; color: var(--teal-700); font-family: var(--font-display); }
.costs-note { font-size: 12px; color: var(--ink-faint); }

.contact-hint { color: var(--ink-faint); font-size: 13.5px; margin-bottom: 18px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form__row { display: flex; gap: 10px; }
.contact-form__row input { flex: 1; min-width: 0; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"] {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 14.5px;
  color: var(--ink);
  transition: all .2s ease;
}
.contact-form input:focus { outline: none; border-color: var(--teal-600); }
.contact-form input.is-autofilled {
  border-color: var(--teal-500);
  background-color: #F0FDFA;
  animation: autofillPulse 1.2s ease;
}
@keyframes autofillPulse {
  0% { background-color: rgba(0, 229, 199, 0.25); }
  100% { background-color: #F0FDFA; }
}
.contact-form__note { font-size: 12.5px; color: var(--ink-faint); text-align: center; margin-top: 2px; }
.contact-form .btn-primary { margin-top: 6px; width: 100%; }

/* ---------- Modal Divider ---------- */
.modal-divider {
  display: flex; align-items: center; text-align: center;
  margin: 18px 0 14px;
  color: var(--ink-faint); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.modal-divider::before, .modal-divider::after {
  content: ""; flex: 1; border-bottom: 1px solid var(--line);
}
.modal-divider span { padding: 0 10px; }

/* ---------- Badge Scanner ---------- */
.badge-scanner {
  background: var(--navy-900);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--white);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}
.badge-scanner.is-disabled {
  opacity: 0.65;
  pointer-events: none;
}
.badge-scanner__header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.badge-scanner__icon {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(0, 229, 199, 0.15);
  color: var(--teal-500);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.badge-scanner__icon svg { width: 20px; height: 20px; }
.badge-scanner__title { font-size: 14.5px; font-weight: 700; color: var(--white); margin: 0 0 2px; }
.badge-scanner__subtitle { font-size: 12px; color: #9FB2CE; margin: 0; }

.badge-scanner__viewport {
  position: relative;
  width: 100%;
  height: 220px;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.badge-scanner__viewport video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); /* espejo para cámara frontal */
}
.badge-scanner__guide {
  position: absolute;
  top: 18px; bottom: 18px; left: 24px; right: 24px;
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 12px;
  pointer-events: none;
}
.badge-guide-corner {
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--teal-500);
  border-style: solid;
  border-width: 0;
}
.badge-guide-corner.top-left { top: -2px; left: -2px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 8px; }
.badge-guide-corner.top-right { top: -2px; right: -2px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 8px; }
.badge-guide-corner.bottom-left { bottom: -2px; left: -2px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 8px; }
.badge-guide-corner.bottom-right { bottom: -2px; right: -2px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 8px; }

.badge-scanner__laser {
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal-500), transparent);
  box-shadow: 0 0 8px var(--teal-500);
  animation: laserScan 2.4s ease-in-out infinite;
}
@keyframes laserScan {
  0% { top: 0%; opacity: 0.2; }
  50% { top: 100%; opacity: 1; }
  100% { top: 0%; opacity: 0.2; }
}

.badge-scanner__status {
  position: absolute;
  bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(11, 31, 58, 0.85);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  color: #E2E8F0;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.badge-scanner__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-500);
  display: inline-block;
  animation: dotPulse 1.2s infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}
.badge-scanner__status.is-success .badge-scanner__dot { background: #10B981; }
.badge-scanner__status.is-error .badge-scanner__dot { background: #EF4444; }

/* ---------- CTA banner (invitación a agendar) ---------- */
.cta-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 8px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-800) 0%, #0A3A52 100%);
  box-shadow: var(--shadow-card);
}
.cta-banner::after {
  content: "";
  position: absolute;
  bottom: -40%; left: -6%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,199,0.22) 0%, rgba(0,229,199,0) 70%);
  pointer-events: none;
}
.cta-banner__text { position: relative; max-width: 560px; }
.cta-banner__kicker { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--teal-500); margin-bottom: 8px; }
.cta-banner__text h3 { font-size: clamp(18px, 2.4vw, 23px); color: var(--white); line-height: 1.35; margin-bottom: 8px; }
.cta-banner__hint { font-size: 13.5px; line-height: 1.6; color: #C7D3E6; }
.btn-cta-open { position: relative; flex-shrink: 0; white-space: nowrap; }
@media (max-width: 760px) {
  .cta-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cta-banner__text { max-width: none; }
  .btn-cta-open { justify-content: center; }
}

/* ---------- Floating CTA button ---------- */
.fab-cta {
  display: none;
  align-items: center; gap: 8px;
  position: fixed;
  right: 24px; bottom: 24px;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  color: var(--navy-900);
  border: none;
  font-weight: 800;
  font-size: 13.5px;
  padding: 15px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,194,168,0.4);
  z-index: 40;
  animation: fabPulse 2.6s ease-in-out infinite;
}
.fab-cta svg { width: 18px; height: 18px; }
.screen--results.is-active .fab-cta { display: inline-flex; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(0,194,168,0.4); }
  50% { box-shadow: 0 12px 30px rgba(0,194,168,0.7), 0 0 0 8px rgba(0,229,199,0.12); }
}
@media (max-width: 700px) {
  .fab-cta span { display: none; }
  .fab-cta { padding: 15px; right: 18px; bottom: 18px; }
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(8,21,43,0.6);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative;
  width: 100%; max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 26px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  transform: translateY(16px) scale(0.98);
  transition: transform .25s ease;
}
.modal--wide { max-width: 580px; }

@media (max-width: 600px) {
  .modal {
    padding: 24px 18px 20px;
    max-height: 94vh;
  }
  .contact-form__row {
    flex-direction: column;
    gap: 12px;
  }
  .badge-scanner__viewport {
    height: 190px;
  }
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal h3 { font-size: 19px; color: var(--ink); margin-bottom: 10px; padding-right: 28px; }
.modal__close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--bg-soft); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.modal__close svg { width: 16px; height: 16px; }
.modal__close:hover { background: var(--line); }

/* ---------- Thanks ---------- */
.screen--thanks { display: none; min-height: 60vh; align-items: center; justify-content: center; }
.screen--thanks.is-active { display: flex; }
.thanks { text-align: center; max-width: 420px; }
.thanks__icon {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
  color: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.thanks__icon svg { width: 36px; height: 36px; }
.thanks h2 { font-size: 26px; color: var(--ink); margin-bottom: 10px; }
.thanks p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin-bottom: 24px; }
.thanks .btn-primary { margin-bottom: 14px; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  padding: 20px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--navy-800);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--coral-500); color: var(--white); }
