/* ============================================================
   components.css — Componentes y micro-interacciones
   ============================================================ */

/* ---------- Icono base (blindaje: nunca un SVG a tamaño nativo) ---------- */
.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-accent-text);
  margin-bottom: var(--sp-4);
}
.section__title {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: clamp(28px, 3.5vw, 48px);
  line-height: 1.1;
  margin-bottom: var(--sp-12);
  max-width: 560px;
}

/* ---------- Logo ---------- */
.logo {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--c-text);
}
.logo span { color: var(--c-accent-text); }

/* ---------- Lang buttons ---------- */
.lang-btn {
  color: var(--c-text-dim);
  border: 1px solid transparent;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: color var(--dur-base), border-color var(--dur-base);
}
.lang-btn:hover { color: var(--c-text); }
.lang-btn.is-active { color: var(--c-accent-text); border-color: var(--c-accent-text); }

/* Separador + botón de tema en la lang-bar */
.lang-sep { width: 1px; height: 16px; background: var(--c-border-2); margin: 0 2px; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  color: var(--c-text-dim);
  border: 1px solid transparent;
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base);
}
.theme-btn:hover { color: var(--c-text); border-color: var(--c-border-2); }
.theme-btn .icon { width: 15px; height: 15px; }
/* muestra el icono según el tema activo (sol en oscuro = "ir a claro") */
.theme-btn .icon--sun { display: block; }
.theme-btn .icon--moon { display: none; }
[data-theme="light"] .theme-btn .icon--sun { display: none; }
[data-theme="light"] .theme-btn .icon--moon { display: block; }

/* ---------- Nav links ---------- */
.nav__link {
  color: var(--c-text-dim);
  font-size: 14px;
  transition: color var(--dur-base);
}
.nav__link:hover { color: var(--c-text); }
.nav__link.is-active { color: var(--c-accent-text); }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--c-accent);
  --btn-fg: var(--c-accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: 15px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out-expo),
              opacity var(--dur-fast), background var(--dur-base), color var(--dur-base);
}
.btn:active { transform: translateY(0) scale(0.99); }
.btn .icon { width: 18px; height: 18px; }

.btn--primary { background: var(--btn-bg); color: var(--btn-fg); font-weight: var(--fw-bold); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-accent); }

.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border-2);
}
.btn--ghost:hover { border-color: var(--c-border-strong); }

.btn--dark { background: var(--c-bg); color: var(--c-text); font-weight: var(--fw-bold); }
.btn--dark:hover { transform: translateY(-2px); }

.btn--nav {
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-weight: var(--fw-medium);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
}
.btn--nav:hover { opacity: 0.88; }

.btn--block { width: 100%; }

/* ---------- Botón con máquina de estados ---------- */
.btn-state { position: relative; overflow: hidden; }
.btn-state[data-state="loading"] { pointer-events: none; opacity: 0.9; }
.btn-state[data-state="success"] { background: var(--c-success); color: var(--c-success-ink); }
.btn-state[data-state="error"]   { background: var(--c-error);   color: #fff; }
.btn-state[data-state="error"]   { animation: shake 0.4s var(--ease-std); }

.btn-state__icon { display: none; width: 18px; height: 18px; }
.btn-state[data-state="success"] .btn-state__icon--check,
.btn-state[data-state="error"]   .btn-state__icon--x { display: block; }

/* spinner CSS puro */
.spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: var(--c-accent-ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-state[data-state="loading"] .spinner { display: inline-block; }
.btn-state[data-state="loading"] .btn-state__label { opacity: 0.6; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

/* ---------- Hero text ---------- */
.hero__tag {
  display: inline-block;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent-line);
  color: var(--c-accent-text);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-6);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 68px);
  font-weight: var(--fw-display);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: var(--sp-6);
}
.hero__title em { font-style: normal; color: var(--c-accent-text); }
.hero__sub {
  color: var(--c-text-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--sp-8);
}

/* ---------- Trust badges ---------- */
.trust-item { display: flex; flex-direction: column; gap: 2px; }
.trust-item strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--fw-display);
  color: var(--c-accent-text);
}
.trust-item span { font-size: 12px; color: var(--c-text-dim); letter-spacing: 0.04em; }

/* ============================================================
   WIZARD / FORM CARD
   ============================================================ */
.form-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  position: relative;
  box-shadow: var(--shadow-md);
}
.form-card__badge {
  position: absolute;
  top: -12px; left: 24px;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

/* Cabecera: back + progreso */
.form-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  min-height: 28px;
}
.form-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  color: var(--c-text-dim);
  border: 1px solid var(--c-border-2);
  transition: color var(--dur-base), border-color var(--dur-base), opacity var(--dur-base);
}
.form-back:hover { color: var(--c-text); border-color: var(--c-border-strong); }
.form-back[hidden] { display: none; }

/* Barra de progreso */
.progress {
  flex: 1;
  height: 4px;
  background: var(--c-surface-3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 25%;
  background: var(--c-accent);
  border-radius: var(--radius-pill);
  transition: width var(--dur-step) var(--ease-out-expo);
}

/* Dots */
.step-dots { display: flex; gap: 6px; }
.step-dots__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid var(--c-border-strong);
  transition: transform var(--dur-base) var(--ease-spring), background var(--dur-base), border-color var(--dur-base);
}
.step-dots__dot.is-done { background: var(--c-accent); border-color: var(--c-accent-text); }
.step-dots__dot.is-current { border-color: var(--c-accent-text); transform: scale(1.25); }

/* Viewport de pasos con altura animada */
.steps-viewport {
  position: relative;
  overflow: hidden;
  transition: height var(--dur-step) var(--ease-out-expo);
}
.wizard-step {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  border: 0;            /* reset del borde nativo de <fieldset> */
  min-inline-size: 0;   /* evita el min-content de <fieldset> */
  padding: 0;
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity var(--dur-step) var(--ease-out-expo),
              transform var(--dur-step) var(--ease-out-expo);
}
.wizard-step.is-active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.wizard-step.is-leaving {
  opacity: 0;
  transform: translateX(-24px);
}

.wizard-step__q {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-5);
}

/* ---------- Quickfill (VIN / Typenschein → autorrellena) ---------- */
.quickfill { margin-bottom: var(--sp-5); }
.quickfill__hint { display: block; font-size: 12px; color: var(--c-text-dim); margin-bottom: 8px; }
.quickfill__row { display: flex; gap: 8px; align-items: stretch; }
.quickfill__field { flex: 1; }
.quickfill__btn { padding: 0 16px; flex-shrink: 0; }
.quickfill__btn .spinner { display: none; }
.quickfill__btn.is-loading .spinner { display: inline-block; }
.quickfill__btn.is-loading .icon { display: none; }
.quickfill__sep {
  display: flex; align-items: center; gap: 12px;
  margin-top: var(--sp-5);
  color: var(--c-text-dim); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.quickfill__sep::before, .quickfill__sep::after {
  content: ''; flex: 1; height: 1px; background: var(--c-border);
}

/* ---------- Tarjetas táctiles (vehículo / condición) ---------- */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  text-align: left;
  background: var(--c-surface-3);
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius-md);
  padding: var(--sp-4);
  min-height: 44px;
  transition: transform var(--dur-base) var(--ease-out-expo),
              border-color var(--dur-base), background var(--dur-base), box-shadow var(--dur-base);
}
.choice:hover { transform: scale(1.02); border-color: var(--c-border-strong); box-shadow: var(--shadow-sm); }
.choice.is-selected {
  border-color: var(--c-accent-text);
  background: var(--c-accent-soft);
}
.choice__icon { width: 30px; height: 30px; color: var(--c-text); }
.choice.is-selected .choice__icon { color: var(--c-accent-text); }
.choice__label { font-weight: var(--fw-medium); font-size: 15px; }
.choice__desc { font-size: 12px; color: var(--c-text-dim); line-height: 1.4; }
.choice__check {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-spring);
}
.choice.is-selected .choice__check { opacity: 1; transform: scale(1); }
.choice__check .icon { width: 12px; height: 12px; }

/* ---------- Campos de formulario (floating label) ---------- */
.field { position: relative; margin-bottom: var(--sp-4); }
.field__control {
  width: 100%;
  background: var(--c-surface-3);
  border: 1px solid var(--c-border-2);
  color: var(--c-text);
  font-size: 15px;
  padding: 18px 14px 8px;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field__control::placeholder { color: transparent; transition: color var(--dur-fast); }
/* el placeholder (pista de ejemplo) solo se ve al enfocar, ya con la label flotada */
.field__control:focus::placeholder { color: var(--c-text-faint); }
.field__control:focus {
  border-color: var(--c-accent-text);
  box-shadow: 0 0 0 3px var(--c-accent-glow);
}
.field__label {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 14px;
  color: var(--c-text-dim);
  pointer-events: none;
  transition: transform var(--dur-fast) var(--ease-out-expo), font-size var(--dur-fast), color var(--dur-fast);
}
.field__control:focus + .field__label,
.field__control:not(:placeholder-shown) + .field__label {
  transform: translateY(-9px);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-accent-text);
}
.field--error .field__control { border-color: var(--c-error); }
.field--error .field__label { color: var(--c-error); }
.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-error);
}
.field--error .field__error { display: flex; }
.field__error .icon { width: 13px; height: 13px; flex-shrink: 0; }

/* Teléfono con prefijo CH */
.field--phone .field__control { padding-left: 58px; }
.field__prefix {
  position: absolute;
  left: 14px; top: 16px;
  font-size: 15px;
  color: var(--c-text-dim);
  pointer-events: none;
}
.field--phone .field__label { left: 58px; }

/* ---------- Typeahead (marca) ---------- */
.typeahead { position: relative; }
.typeahead__list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: var(--z-sticky);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.typeahead__list[hidden] { display: none; }
.typeahead__opt {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--c-text);
  transition: background var(--dur-fast);
}
.typeahead__opt:hover, .typeahead__opt.is-active { background: var(--c-accent-soft); color: var(--c-accent-text); }
.typeahead__empty { padding: 12px 14px; font-size: 13px; color: var(--c-text-dim); }

/* ---------- Segmented control (año) ---------- */
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--c-surface-3);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border-2);
}
.segmented__seg {
  padding: 9px 4px;
  font-size: 13px;
  color: var(--c-text-dim);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.segmented__seg:hover { color: var(--c-text); }
.segmented__seg.is-selected { background: var(--c-accent); color: var(--c-accent-ink); font-weight: var(--fw-medium); }

.link-toggle {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Slider (km) ---------- */
.slider-wrap { display: flex; flex-direction: column; gap: var(--sp-3); }
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--c-border-2);
  border-radius: var(--radius-pill);
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-accent);
  cursor: pointer;
  border: 3px solid var(--c-bg);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.slider:active::-webkit-slider-thumb { transform: scale(1.2); }
.slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-accent);
  cursor: pointer;
  border: 3px solid var(--c-bg);
}
.slider-readout {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.slider-readout strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-display);
  color: var(--c-accent-text);
}
.slider-readout span { font-size: 12px; color: var(--c-text-dim); }

/* ---------- Consentimiento RGPD/nLPD ---------- */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: var(--sp-4) 0;
  font-size: 12.5px;
  color: var(--c-text-muted);
  line-height: 1.5;
}
.consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--c-accent-text); flex-shrink: 0; }
.consent a { color: var(--c-accent-text); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pantalla final ---------- */
.wizard-done { text-align: center; padding: var(--sp-6) 0; }
.wizard-done__check {
  width: 64px; height: 64px;
  margin: 0 auto var(--sp-5);
  border-radius: 50%;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-accent-text);
  animation: pop 0.5s var(--ease-spring);
}
.wizard-done__check .icon { width: 30px; height: 30px; }
.wizard-done h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: var(--fw-display);
  margin-bottom: var(--sp-3);
}
.wizard-done p { color: var(--c-text-muted); font-size: 14px; margin-bottom: var(--sp-6); }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.form-card.is-success { animation: cardPulse 0.5s var(--ease-out-expo); }
@keyframes cardPulse { 50% { transform: scale(1.01); } }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.step {
  position: relative;
  background: var(--c-surface);
  padding: var(--sp-8) var(--sp-6);
  overflow: hidden;
  transition: background var(--dur-base);
}
.step:hover { background: var(--c-surface-2); }
.step:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.step:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.step__num {
  position: absolute;
  top: -10px; right: 14px;
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: var(--fw-display);
  color: var(--c-step-num);
  line-height: 1;
}
.step__icon {
  width: 30px; height: 30px;
  color: var(--c-accent-text);
  margin-bottom: var(--sp-5);
}
.step h3 {
  font-family: var(--font-display);
  font-size: 17px; font-weight: var(--fw-bold);
  margin-bottom: var(--sp-3);
}
.step p { font-size: 13px; color: var(--c-text-dim); line-height: 1.6; }

/* ============================================================
   WHY US
   ============================================================ */
.why-list { display: flex; flex-direction: column; gap: var(--sp-5); }
.why-list li { display: flex; gap: var(--sp-4); align-items: flex-start; }
.why-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: var(--c-accent-soft);
  border: 1px solid var(--c-accent-line);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-accent-text);
}
.why-icon .icon { width: 20px; height: 20px; }
.why-list h3 { font-family: var(--font-display); font-size: 15px; margin-bottom: 4px; }
.why-list p { font-size: 13px; color: var(--c-text-dim); }

.why-visual {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-10);
  text-align: center;
}
.big-number {
  font-family: var(--font-display);
  /* Fluido: 96px en desktop, baja en móvil para que "500+" no fuerce el ancho
     de la tarjeta (antes 96px fijo en móviles >379px → desbordaba). */
  font-size: clamp(48px, 13vw, 96px);
  font-weight: var(--fw-display);
  color: var(--c-accent-text);
  line-height: 1;
}
.big-label { font-size: 14px; color: var(--c-text-dim); margin-top: var(--sp-2); }
.why-divider { width: 40px; height: 2px; background: var(--c-border-2); margin: var(--sp-6) auto; }
.regions { display: flex; justify-content: center; gap: var(--sp-3); flex-wrap: wrap; }
.region-tag {
  background: var(--c-surface-3);
  border: 1px solid var(--c-border);
  font-size: 12px;
  color: var(--c-text-dim);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
}
.testimonial__stars { color: var(--c-accent-text); font-size: 14px; margin-bottom: var(--sp-4); letter-spacing: 2px; }
.testimonial p { font-size: 14px; color: var(--c-text-muted); line-height: 1.6; margin-bottom: var(--sp-5); }
.reviewer { display: flex; gap: var(--sp-3); align-items: center; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #555);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: var(--fw-medium);
  flex-shrink: 0;
}
.reviewer__name { font-size: 13px; font-weight: var(--fw-medium); }
.reviewer__loc { font-size: 12px; color: var(--c-text-dim); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: var(--fw-display);
  color: var(--c-accent-ink);
  max-width: 520px;
}
.phone-big {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--fw-display);
  color: var(--c-accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.phone-big .icon { width: 22px; height: 22px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer__brand p {
  color: var(--c-text-dim);
  font-size: 13px;
  line-height: 1.7;
  margin-top: var(--sp-3);
  max-width: 300px;
}
.footer h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  margin-bottom: var(--sp-4);
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--c-text-dim); font-size: 13px; transition: color var(--dur-base); }
.footer__col a:hover { color: var(--c-text); }
.footer__bottom p { font-size: 12px; color: var(--c-text-faint); }

/* ============================================================
   HAMBURGER + DRAWER + MOBILE BAR
   ============================================================ */
.nav__toggle {
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--c-text);
}
.hamburger { position: relative; width: 22px; height: 14px; }
.hamburger span {
  position: absolute; left: 0;
  width: 100%; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out-expo), opacity var(--dur-base);
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 6px; }
.hamburger span:nth-child(3) { top: 12px; }
.nav__toggle[aria-expanded="true"] .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .hamburger span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity var(--dur-base);
}
.drawer-overlay.is-open { opacity: 1; }
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100dvh;
  width: min(82vw, 320px);
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  z-index: var(--z-drawer);
  padding: var(--sp-8) var(--sp-6);
  transform: translateX(100%);
  transition: transform var(--dur-step) var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.drawer.is-open { transform: translateX(0); }
/* Cerrado = realmente oculto (el responsive pone display:flex y pisaba [hidden]),
   si no, el drawer fixed queda fuera de pantalla a la derecha y genera scroll horizontal. */
.drawer[hidden] { display: none; }
.drawer__close { align-self: flex-end; width: 40px; height: 40px; color: var(--c-text-dim); }
.drawer__close .icon { width: 22px; height: 22px; }
.drawer a {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: var(--fw-bold);
  color: var(--c-text);
}
.drawer a:hover { color: var(--c-accent-text); }

.mobile-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: var(--z-mobilebar);
  background: var(--c-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}
.mobile-bar a {
  display: flex;
  min-width: 0; /* allow grid items to shrink — prevents the bar overflowing the viewport (fixed el → horizontal scroll) */
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: var(--radius-md);
  font-weight: var(--fw-medium);
  font-size: 15px;
}
.mobile-bar .icon { width: 18px; height: 18px; }
.mobile-bar__call { background: var(--c-surface-2); color: var(--c-text); border: 1px solid var(--c-border-2); }
.mobile-bar__eval { background: var(--c-accent); color: var(--c-accent-ink); font-weight: var(--fw-bold); }

/* ---------- Toast (errores no intrusivos) ---------- */
.toast-region {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-error);
  color: var(--c-text);
  font-size: 14px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  animation: toastIn var(--dur-step) var(--ease-out-expo);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Entrada animada del hero ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
  .hero__content > * { animation: fadeUp var(--dur-slow) ease both; }
  .hero__content > *:nth-child(1) { animation-delay: 0.05s; }
  .hero__content > *:nth-child(2) { animation-delay: 0.12s; }
  .hero__content > *:nth-child(3) { animation-delay: 0.19s; }
  .hero__content > *:nth-child(4) { animation-delay: 0.26s; }
  .hero__content > *:nth-child(5) { animation-delay: 0.33s; }
  .hero__form { animation: fadeUp var(--dur-slow) ease 0.3s both; }
}
