/* =============================================================================
   WARIGOO · Landing
   Hoja única de estilos. Sin frameworks, sin build, sin dependencias.
   Todos los valores salen de tokens.css.

   Regla 85/12/3 aplicada al scroll de la landing:
   · 85% neutros cálidos y fotos
   · 12% acciones (botones primarios rellenos)
   ·  3% gradiente de marca — solo el banner del mockup y la franja CTA,
     que nunca son visibles a la vez.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   01 · Reset y base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  /* `clip` y no `hidden`: `overflow: hidden` convierte el elemento en contenedor
     de scroll y rompe el `position: sticky` del header. `clip` recorta sin crear
     contenedor. El desbordamiento real —el resplandor del hero— lo contiene
     además `.wg-hero { overflow: hidden }`. */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--wg-font);
  font-size: var(--wg-body-size);
  line-height: var(--wg-body-lh);
  font-weight: 400;
  color: var(--wg-text-primary);
  background: var(--wg-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--wg-primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

/* Foco visible y consistente: nunca se quita sin reemplazo. */
:focus-visible {
  outline: 3px solid var(--wg-primary);
  outline-offset: 2px;
  border-radius: var(--wg-radius-sm);
}

::selection { background: var(--wg-primary-100); color: var(--wg-primary-900); }

.wg-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wg-skip-link {
  position: absolute;
  top: -100px; left: var(--wg-gutter);
  z-index: 200;
  padding: var(--wg-space-3) var(--wg-space-4);
  background: var(--wg-primary);
  color: var(--wg-on-primary);
  border-radius: var(--wg-radius-md);
  font-weight: 700;
  transition: top var(--wg-base) var(--wg-ease-emphasis);
}
.wg-skip-link:focus { top: var(--wg-space-3); text-decoration: none; }

/* -----------------------------------------------------------------------------
   02 · Layout
   -------------------------------------------------------------------------- */
.wg-container {
  width: 100%;
  max-width: var(--wg-maxw);
  margin-inline: auto;
  padding-inline: var(--wg-gutter);
}

.wg-section { padding-block: var(--wg-space-18); }
@media (min-width: 768px) { .wg-section { padding-block: var(--wg-space-24); } }

.wg-section--sunken { background: var(--wg-surface-sunken); }
.wg-section--elevated { background: var(--wg-surface-elevated); }

.wg-section__head { max-width: 62ch; margin-bottom: var(--wg-space-10); }
.wg-section__head--center { margin-inline: auto; text-align: center; }

/* -----------------------------------------------------------------------------
   03 · Tipografía (roles del DS)
   -------------------------------------------------------------------------- */
.wg-overline {
  display: inline-block;
  font-size: var(--wg-overline-size);
  line-height: var(--wg-overline-lh);
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--wg-primary-text);
  margin-bottom: var(--wg-space-3);
}

.wg-hero-title {
  font-size: var(--wg-hero-size);
  line-height: var(--wg-hero-lh);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--wg-text-primary);
  text-wrap: balance;
}

.wg-section-title {
  font-size: var(--wg-section-size);
  line-height: var(--wg-section-lh);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.wg-title {
  font-size: var(--wg-title-size);
  line-height: var(--wg-title-lh);
  font-weight: 700;
  letter-spacing: -0.2px;
}

.wg-subtitle {
  font-size: var(--wg-subtitle-size);
  line-height: var(--wg-subtitle-lh);
  font-weight: 700;
}

.wg-lead {
  font-size: var(--wg-lead-size);
  line-height: var(--wg-lead-lh);
  color: var(--wg-text-secondary);
  text-wrap: pretty;
}

.wg-body { font-size: var(--wg-body-size); line-height: var(--wg-body-lh); }
.wg-body-strong { font-size: var(--wg-body-size); line-height: var(--wg-body-lh); font-weight: 700; }
.wg-caption {
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  font-weight: 500;
  color: var(--wg-text-muted);
}

.wg-text-secondary { color: var(--wg-text-secondary); }
.wg-text-muted { color: var(--wg-text-muted); }
.wg-deep { color: var(--wg-primary-800); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-deep { color: var(--wg-primary); }
}

/* -----------------------------------------------------------------------------
   04 · Iconos — set Essential outline, retícula 24, trazo 1.8, currentColor
   -------------------------------------------------------------------------- */
.wg-icon {
  width: 24px; height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wg-icon--16 { width: 16px; height: 16px; }
.wg-icon--18 { width: 18px; height: 18px; }
.wg-icon--20 { width: 20px; height: 20px; }
.wg-icon--28 { width: 28px; height: 28px; stroke-width: 1.6; }

/* -----------------------------------------------------------------------------
   05 · Botones — alto 48, radio 10, texto body-strong
   Uno primario relleno por zona visible. El destructivo nunca lleva relleno.
   -------------------------------------------------------------------------- */
.wg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wg-space-2);
  min-height: var(--wg-button-h);
  padding: var(--wg-space-3) var(--wg-space-6);
  border: 1.5px solid transparent;
  border-radius: var(--wg-radius-md);
  font-size: var(--wg-body-size);
  line-height: var(--wg-body-lh);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  white-space: normal;      /* los botones crecen en alto, no cortan texto */
  transition: background-color var(--wg-fast) var(--wg-ease-emphasis),
              border-color var(--wg-fast) var(--wg-ease-emphasis),
              color var(--wg-fast) var(--wg-ease-emphasis),
              transform var(--wg-fast) var(--wg-ease-emphasis);
}
.wg-btn:hover { text-decoration: none; }
.wg-btn:active { transform: translateY(1px); }

.wg-btn--primary {
  background: var(--wg-primary);
  color: var(--wg-on-primary);
}
.wg-btn--primary:hover { background: var(--wg-primary-700); }
.wg-btn--primary:active { background: var(--wg-primary-pressed); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-btn--primary:hover { background: var(--wg-primary-pressed); }
}

.wg-btn--secondary {
  background: transparent;
  color: var(--wg-text-primary);
  border-color: var(--wg-border);   /* borde neutro, no rojo */
}
.wg-btn--secondary:hover {
  background: var(--wg-surface-sunken);
  border-color: var(--wg-neutral-200);
}

.wg-btn--text {
  min-height: auto;
  padding: var(--wg-space-2) 0;
  color: var(--wg-primary-text);    /* 600 para pasar 4.5:1 en texto pequeño */
  background: none;
}
.wg-btn--text:hover { text-decoration: underline; }

/* Sobre el gradiente: contorno blanco, nunca un segundo relleno rojo. */
.wg-btn--on-brand {
  background: #FFFFFF;
  color: var(--wg-primary-800);
}
.wg-btn--on-brand:hover { background: var(--wg-primary-50); }

.wg-btn--on-brand-outline {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.55);
}
.wg-btn--on-brand-outline:hover { background: rgba(255, 255, 255, 0.12); }

.wg-btn--block { width: 100%; }
.wg-btn--lg { min-height: 56px; padding-inline: var(--wg-space-8); }

.wg-btn[aria-disabled="true"], .wg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.wg-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wg-space-3);
  align-items: center;
}

/* -----------------------------------------------------------------------------
   06 · Chips, badges y píldoras
   -------------------------------------------------------------------------- */
.wg-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--wg-space-2);
  min-height: 40px;
  padding: var(--wg-space-2) var(--wg-space-4);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-pill);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-secondary);
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  font-weight: 700;
  white-space: nowrap;
}
.wg-chip--selected {
  background: var(--wg-primary-surface);
  border-color: var(--wg-primary-200);
  color: var(--wg-primary-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-chip--selected { border-color: var(--wg-primary); }
}

.wg-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wg-space-2);
}

.wg-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--wg-space-1);
  padding: 3px var(--wg-space-2);
  border-radius: var(--wg-radius-sm);
  font-size: var(--wg-overline-size);
  line-height: var(--wg-overline-lh);
  font-weight: 700;
  letter-spacing: 0.4px;
}
.wg-badge--discount { background: var(--wg-primary); color: var(--wg-on-primary); }
.wg-badge--ad { background: rgba(28, 25, 23, 0.62); color: #FFFFFF; backdrop-filter: blur(4px); }
.wg-badge--new { background: var(--wg-primary-surface); color: var(--wg-primary-text); }
.wg-badge--closed { background: var(--wg-surface-sunken); color: var(--wg-text-muted); }

/* -----------------------------------------------------------------------------
   07 · Cards
   -------------------------------------------------------------------------- */
.wg-card {
  background: var(--wg-surface-elevated);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  padding: var(--wg-space-6);
  box-shadow: var(--wg-e1);
}

.wg-grid {
  display: grid;
  gap: var(--wg-space-3);
}
@media (min-width: 640px) { .wg-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .wg-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) { .wg-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .wg-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* -----------------------------------------------------------------------------
   08 · Header
   -------------------------------------------------------------------------- */
.wg-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wg-surface);  /* fallback: navegadores sin color-mix */
  background: color-mix(in srgb, var(--wg-surface) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--wg-base) var(--wg-ease-emphasis),
              box-shadow var(--wg-base) var(--wg-ease-emphasis);
}
.wg-header.is-stuck {
  border-bottom-color: var(--wg-border);
  box-shadow: var(--wg-e2);
}

.wg-header__inner {
  display: flex;
  align-items: center;
  gap: var(--wg-space-4);
  min-height: 72px;
}

.wg-logo { display: flex; align-items: center; flex: none; }
.wg-logo img { height: 40px; width: auto; }
.wg-logo--light { display: block; }
.wg-logo--dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-logo--light { display: none; }
  :root:not([data-theme="light"]) .wg-logo--dark { display: block; }
}

.wg-nav { margin-left: auto; }
.wg-nav__list { display: flex; align-items: center; gap: var(--wg-space-1); }
.wg-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--wg-hit-min);
  padding-inline: var(--wg-space-3);
  border-radius: var(--wg-radius-md);
  color: var(--wg-text-secondary);
  font-size: var(--wg-body-size);
  font-weight: 700;
}
.wg-nav__link:hover {
  color: var(--wg-text-primary);
  background: var(--wg-surface-sunken);
  text-decoration: none;
}

.wg-header__cta { flex: none; }

.wg-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--wg-hit-min);
  height: var(--wg-hit-min);
  margin-left: auto;
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-primary);
  cursor: pointer;
}

@media (max-width: 960px) {
  .wg-burger { display: inline-flex; }
  .wg-nav {
    position: fixed;
    inset: 72px 0 auto 0;
    margin: 0;
    padding: var(--wg-space-4) var(--wg-gutter) var(--wg-space-6);
    background: var(--wg-surface-elevated);
    border-bottom: 1px solid var(--wg-border);
    box-shadow: var(--wg-e3);
    display: none;
  }
  .wg-nav.is-open { display: block; }
  .wg-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .wg-nav__link { min-height: 52px; border-radius: var(--wg-radius-md); }
  .wg-nav__cta-mobile { margin-top: var(--wg-space-3); }
  .wg-header__cta { display: none; }
}
@media (min-width: 961px) {
  .wg-nav__cta-mobile { display: none; }
}

/* -----------------------------------------------------------------------------
   09 · Hero
   -------------------------------------------------------------------------- */
.wg-hero {
  position: relative;
  padding-block: var(--wg-space-14) var(--wg-space-18);
  overflow: hidden;
}

/* Resplandor de marca al 3%: decorativo, muy por debajo del texto. */
.wg-hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -120px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255, 58, 15, 0.16) 0%, rgba(255, 58, 15, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

.wg-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--wg-space-14);
  align-items: center;
}
@media (min-width: 960px) {
  .wg-hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--wg-space-10); }
}

.wg-hero__copy > * + * { margin-top: var(--wg-space-5); }
.wg-hero__lead { max-width: 52ch; }

.wg-hero__note {
  display: flex;
  align-items: center;
  gap: var(--wg-space-2);
  color: var(--wg-text-muted);
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  font-weight: 500;
}

.wg-hero__art { display: flex; justify-content: center; }

/* -----------------------------------------------------------------------------
   10 · Mockup del teléfono — Home del app de cliente, 360dp
   -------------------------------------------------------------------------- */
.wg-phone {
  position: relative;
  width: 100%;
  max-width: 360px;
  border: 10px solid var(--wg-neutral-900);
  border-radius: 40px;
  background: var(--wg-surface);
  box-shadow: var(--wg-e3);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-phone { border-color: var(--wg-neutral-700); }
}

.wg-phone__notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 132px; height: 24px;
  background: var(--wg-neutral-900);
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-phone__notch { background: var(--wg-neutral-700); }
}

.wg-phone__screen {
  background: var(--wg-surface);
  padding: var(--wg-space-8) var(--wg-space-4) var(--wg-space-4);
  display: grid;
  gap: var(--wg-space-3);
}

.wg-phone__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wg-space-3);
}
.wg-phone__address { min-width: 0; }
.wg-phone__address .wg-caption { margin-bottom: 2px; }
.wg-phone__address strong {
  display: flex;
  align-items: center;
  gap: var(--wg-space-1);
  font-size: var(--wg-body-size);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wg-phone__cart {
  position: relative;
  flex: none;
  color: var(--wg-text-primary);
}
.wg-phone__cart-count {
  position: absolute;
  top: -6px; right: -8px;
  min-width: 18px; height: 18px;
  padding-inline: 4px;
  display: grid;
  place-items: center;
  border-radius: var(--wg-radius-pill);
  background: var(--wg-primary);
  color: var(--wg-on-primary);
  font-size: 10px;
  font-weight: 800;
}

.wg-phone__search {
  display: flex;
  align-items: center;
  gap: var(--wg-space-2);
  height: 44px;
  padding-inline: var(--wg-space-3);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-muted);
  font-size: var(--wg-caption-size);
}

.wg-phone__stories {
  display: flex;
  gap: var(--wg-space-3);
  overflow: hidden;
}
.wg-story { display: grid; gap: 4px; justify-items: center; width: 60px; }
.wg-story__ring {
  width: 56px; height: 56px;
  border-radius: var(--wg-radius-pill);
  padding: 2.5px;
  background: var(--wg-neutral-200);           /* vista */
}
.wg-story--unseen .wg-story__ring {
  background: linear-gradient(135deg, #FF3A0F, #E51304);  /* no vista */
}
.wg-story__avatar {
  width: 100%; height: 100%;
  border-radius: var(--wg-radius-pill);
  border: 2px solid var(--wg-surface);
  background: var(--wg-surface-sunken);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--wg-text-secondary);
}
.wg-story--placeholder .wg-story__avatar {
  background: var(--wg-gradient-brand);
  color: #FFFFFF;
}
.wg-story__name {
  font-size: 10px;
  line-height: 13px;
  font-weight: 500;
  color: var(--wg-text-muted);
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wg-phone__chips { display: flex; gap: var(--wg-space-2); overflow: hidden; }
.wg-phone__chips .wg-chip { min-height: 32px; padding: 4px var(--wg-space-3); font-size: 12px; }

/* Única superficie de gradiente del mockup (el 3%). */
.wg-promo {
  border-radius: var(--wg-radius-lg);
  background: var(--wg-gradient-brand);
  color: #FFFFFF;
  padding: var(--wg-space-3) var(--wg-space-4);
}
.wg-promo__title { font-size: var(--wg-body-size); line-height: var(--wg-body-lh); font-weight: 800; }
.wg-promo__meta { font-size: 11px; line-height: 14px; font-weight: 500; opacity: 0.92; margin-top: 2px; }

.wg-phone__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.wg-phone__section-head span:first-child { font-size: var(--wg-subtitle-size); font-weight: 700; }
.wg-phone__section-head span:last-child { font-size: 12px; font-weight: 700; color: var(--wg-primary-text); }

/* Card de negocio · la foto nunca define el alto (ratio fijo 16:9). */
.wg-biz {
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-elevated);
  overflow: hidden;
  box-shadow: var(--wg-e1);
}
.wg-biz__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--wg-surface-sunken);
  display: grid;
  place-items: center;
}
/* La foto se desatura al 85% para que no compita con el rojo de marca. */
.wg-biz__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(var(--wg-photo-saturation));
}
.wg-biz__cover--placeholder { background: var(--wg-gradient-brand); }
.wg-biz__placeholder-w { font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, 0.92); }
.wg-biz__badges {
  position: absolute;
  top: var(--wg-space-2); left: var(--wg-space-2);
  display: flex;
  gap: var(--wg-space-1);
}
.wg-biz__body { padding: var(--wg-space-3); display: grid; gap: 2px; }
.wg-biz__name { font-size: var(--wg-body-size); font-weight: 700; }
.wg-biz__meta { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--wg-text-muted); }
.wg-biz--closed .wg-biz__cover, .wg-biz--closed .wg-biz__body { opacity: 0.68; }

/* -----------------------------------------------------------------------------
   11 · Franja de métricas
   -------------------------------------------------------------------------- */
.wg-stats {
  display: grid;
  gap: var(--wg-space-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 860px) { .wg-stats { grid-template-columns: repeat(4, 1fr); } }

.wg-stat {
  padding: var(--wg-space-5) var(--wg-space-4);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-elevated);
}
.wg-stat__value {
  font-size: var(--wg-display-size);
  line-height: var(--wg-display-lh);
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--wg-primary-800);
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wg-stat__value { color: var(--wg-primary); }
}
.wg-stat__label { margin-top: var(--wg-space-1); }

/* -----------------------------------------------------------------------------
   12 · Pasos
   -------------------------------------------------------------------------- */
.wg-step {
  position: relative;
  padding: var(--wg-space-6);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-elevated);
  box-shadow: var(--wg-e1);
}
.wg-step__icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: var(--wg-radius-md);
  background: var(--wg-primary-surface);
  color: var(--wg-primary-text);
  margin-bottom: var(--wg-space-4);
}
.wg-step__number {
  position: absolute;
  top: var(--wg-space-5); right: var(--wg-space-5);
  font-size: var(--wg-overline-size);
  font-weight: 700;
  letter-spacing: 1.1px;
  color: var(--wg-text-muted);
}
.wg-step__title { margin-bottom: var(--wg-space-2); }

/* -----------------------------------------------------------------------------
   13 · Tracking — stepper vertical (color + icono + etiqueta)
   -------------------------------------------------------------------------- */
.wg-tracking {
  display: grid;
  gap: var(--wg-space-10);
  align-items: center;
}
@media (min-width: 900px) { .wg-tracking { grid-template-columns: 1fr 1fr; } }

.wg-stepper { display: grid; gap: 0; }
.wg-stepper__item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--wg-space-3);
  padding-bottom: var(--wg-space-6);
  position: relative;
}
.wg-stepper__item:last-child { padding-bottom: 0; }
.wg-stepper__item::before {
  content: "";
  position: absolute;
  left: 15px; top: 30px; bottom: 2px;
  width: 2px;
  background: var(--wg-border);
}
.wg-stepper__item:last-child::before { display: none; }

/* Relleno del nodo: lleno = cumplido · anillo = actual · vacío = pendiente.
   Funciona en escala de grises, sin depender del color. */
.wg-stepper__node {
  width: 32px; height: 32px;
  border-radius: var(--wg-radius-pill);
  display: grid;
  place-items: center;
  border: 2px solid var(--wg-border);
  background: var(--wg-surface-elevated);
  z-index: 1;
  /* Sin `color` propio: hereda el del item para que `currentColor` sea el
     color del estado. El paso pendiente lo tiñe con .wg-stepper__item--pending. */
}
.wg-stepper__item--done .wg-stepper__node {
  background: currentColor;
  border-color: currentColor;
}
.wg-stepper__item--done .wg-icon { color: var(--wg-surface-elevated); }
.wg-stepper__item--current .wg-stepper__node {
  border-color: currentColor;
  border-width: 3px;
  background: var(--wg-surface-elevated);
}
.wg-stepper__item--done.wg-s-aceptado   { color: var(--wg-status-aceptado); }
.wg-stepper__item--done.wg-s-preparando { color: var(--wg-status-preparando); }
.wg-stepper__item--current.wg-s-camino  { color: var(--wg-status-camino); }
.wg-stepper__item--pending              { color: var(--wg-text-muted); }

.wg-stepper__label {
  font-size: var(--wg-body-size);
  line-height: var(--wg-body-lh);
  font-weight: 700;
  color: var(--wg-text-primary);
}
.wg-stepper__item--pending .wg-stepper__label { color: var(--wg-text-muted); font-weight: 400; }
.wg-stepper__meta { font-size: var(--wg-caption-size); line-height: var(--wg-caption-lh); color: var(--wg-text-muted); }

.wg-status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--wg-space-2);
  padding: var(--wg-space-2) var(--wg-space-3);
  border: 1px solid currentColor;
  border-radius: var(--wg-radius-pill);
  font-size: var(--wg-caption-size);
  font-weight: 700;
}
.wg-status-pill--camino { color: var(--wg-status-camino); }

.wg-feature-list { display: grid; gap: var(--wg-space-4); }
.wg-feature-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--wg-space-3);
  align-items: start;
}
.wg-feature-list .wg-icon { color: var(--wg-success); margin-top: 1px; }

/* -----------------------------------------------------------------------------
   14 · Audiencias (negocios / motorizados)
   -------------------------------------------------------------------------- */
.wg-audience {
  display: grid;
  gap: var(--wg-space-6);
  padding: var(--wg-space-8);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-xl);
  background: var(--wg-surface-elevated);
  box-shadow: var(--wg-e1);
}
.wg-audience__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-sunken);
  color: var(--wg-primary-text);
}
.wg-audience__list { display: grid; gap: var(--wg-space-3); }
.wg-audience__list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--wg-space-3);
  align-items: start;
  color: var(--wg-text-secondary);
}
.wg-audience__list .wg-icon { color: var(--wg-primary-text); margin-top: 2px; }

/* -----------------------------------------------------------------------------
   15 · Franja CTA con gradiente (la otra superficie promocional)
   -------------------------------------------------------------------------- */
.wg-cta-band {
  background: var(--wg-gradient-brand);
  color: #FFFFFF;
  border-radius: var(--wg-radius-xl);
  padding: var(--wg-space-10) var(--wg-space-8);
  text-align: center;
}
.wg-cta-band .wg-overline { color: rgba(255, 255, 255, 0.86); }
.wg-cta-band .wg-section-title { color: #FFFFFF; }
.wg-cta-band p { color: rgba(255, 255, 255, 0.92); max-width: 56ch; margin-inline: auto; }
.wg-cta-band .wg-btn-row { justify-content: center; margin-top: var(--wg-space-8); }

/* -----------------------------------------------------------------------------
   16 · Formulario
   -------------------------------------------------------------------------- */
.wg-form-wrap {
  display: grid;
  gap: var(--wg-space-10);
}
@media (min-width: 960px) { .wg-form-wrap { grid-template-columns: 0.9fr 1.1fr; gap: var(--wg-space-14); } }

.wg-form { display: grid; gap: var(--wg-space-5); }

.wg-field { display: grid; gap: var(--wg-space-2); }
.wg-label { font-size: var(--wg-body-size); font-weight: 700; }
.wg-label__hint { font-weight: 400; color: var(--wg-text-muted); }

.wg-input, .wg-select, .wg-textarea {
  width: 100%;
  min-height: var(--wg-input-h);
  padding: var(--wg-space-3) var(--wg-space-4);
  border: 1.5px solid var(--wg-border);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-primary);
  font-size: var(--wg-body-size);
  line-height: var(--wg-body-lh);
  transition: border-color var(--wg-fast) var(--wg-ease-emphasis);
}
.wg-input::placeholder, .wg-textarea::placeholder { color: var(--wg-text-muted); }
.wg-input:focus, .wg-select:focus, .wg-textarea:focus {
  border-color: var(--wg-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--wg-primary-surface);
}
.wg-textarea { min-height: 120px; resize: vertical; }

.wg-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%237A716E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--wg-space-3) center;
  padding-right: var(--wg-space-10);
}

.wg-phone-input { display: grid; grid-template-columns: auto 1fr; }
.wg-phone-input__prefix {
  display: grid;
  place-items: center;
  min-height: var(--wg-input-h);
  padding-inline: var(--wg-space-4);
  border: 1.5px solid var(--wg-border);
  border-right: 0;
  border-radius: var(--wg-radius-md) 0 0 var(--wg-radius-md);
  background: var(--wg-surface-sunken);
  color: var(--wg-text-secondary);
  font-weight: 700;
}
.wg-phone-input .wg-input { border-radius: 0 var(--wg-radius-md) var(--wg-radius-md) 0; }

/* Error: dice qué pasó y qué hacer, en una sola frase. */
.wg-field--error .wg-input,
.wg-field--error .wg-select,
.wg-field--error .wg-textarea,
.wg-field--error .wg-phone-input__prefix { border-color: var(--wg-danger); }
.wg-error {
  display: none;
  align-items: center;
  gap: var(--wg-space-2);
  color: var(--wg-danger);
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  font-weight: 500;
}
.wg-field--error .wg-error { display: flex; }

.wg-counter { justify-self: end; color: var(--wg-text-muted); font-variant-numeric: tabular-nums; }

.wg-checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--wg-space-3);
  align-items: start;
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  color: var(--wg-text-secondary);
}
.wg-checkbox input { width: 20px; height: 20px; margin: 0; accent-color: var(--wg-primary); }

/* Honeypot anti-spam: fuera de pantalla, nunca visible ni enfocable. */
.wg-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.wg-contact-aside { display: grid; gap: var(--wg-space-5); align-content: start; }
.wg-contact-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--wg-space-3);
  align-items: center;
}
.wg-contact-item__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-sunken);
  color: var(--wg-primary-text);
}

/* -----------------------------------------------------------------------------
   17 · FAQ
   -------------------------------------------------------------------------- */
.wg-faq { display: grid; gap: var(--wg-space-3); max-width: 800px; margin-inline: auto; }

.wg-faq__item {
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-elevated);
  overflow: hidden;
}
.wg-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wg-space-4);
  min-height: var(--wg-hit-min);
  padding: var(--wg-space-4) var(--wg-space-5);
  cursor: pointer;
  font-size: var(--wg-subtitle-size);
  line-height: var(--wg-subtitle-lh);
  font-weight: 700;
  list-style: none;
}
.wg-faq__item summary::-webkit-details-marker { display: none; }
.wg-faq__item summary .wg-icon {
  color: var(--wg-text-muted);
  transition: transform var(--wg-base) var(--wg-ease-emphasis);
}
.wg-faq__item[open] summary .wg-icon { transform: rotate(180deg); }
.wg-faq__answer {
  padding: 0 var(--wg-space-5) var(--wg-space-5);
  color: var(--wg-text-secondary);
  max-width: 68ch;
}

/* -----------------------------------------------------------------------------
   18 · Footer
   -------------------------------------------------------------------------- */
.wg-footer {
  background: var(--wg-surface-sunken);
  border-top: 1px solid var(--wg-border);
  padding-block: var(--wg-space-14) var(--wg-space-8);
}
.wg-footer__grid {
  display: grid;
  gap: var(--wg-space-10);
}
@media (min-width: 760px) { .wg-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.wg-footer__title {
  font-size: var(--wg-overline-size);
  line-height: var(--wg-overline-lh);
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--wg-text-muted);
  margin-bottom: var(--wg-space-4);
}
.wg-footer__list { display: grid; gap: var(--wg-space-1); }
.wg-footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--wg-text-secondary);
  font-weight: 500;
}
.wg-footer__list a:hover { color: var(--wg-text-primary); }

.wg-social { display: flex; gap: var(--wg-space-2); }
.wg-social a {
  display: grid;
  place-items: center;
  width: var(--wg-hit-min); height: var(--wg-hit-min);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-secondary);
}
.wg-social a:hover { color: var(--wg-primary-text); border-color: var(--wg-primary-200); }

/* Libro de Reclamaciones — obligatorio en Perú, enlace visible en el footer. */
.wg-libro {
  display: inline-flex;
  align-items: center;
  gap: var(--wg-space-3);
  padding: var(--wg-space-3) var(--wg-space-4);
  border: 1.5px solid var(--wg-border);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-primary);
  font-size: var(--wg-caption-size);
  font-weight: 700;
}
.wg-libro:hover { border-color: var(--wg-neutral-200); text-decoration: none; }
.wg-libro__book {
  width: 34px; height: 26px;
  border-radius: 3px;
  background: var(--wg-gradient-brand);
  display: grid;
  place-items: center;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 800;
}

.wg-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wg-space-4);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--wg-space-10);
  padding-top: var(--wg-space-6);
  border-top: 1px solid var(--wg-border);
  color: var(--wg-text-muted);
  font-size: var(--wg-caption-size);
}

/* -----------------------------------------------------------------------------
   18b · Documentos legales — prosa larga, lectura cómoda
   -------------------------------------------------------------------------- */
.wg-legal { max-width: 72ch; }

.wg-legal h2 {
  font-size: var(--wg-title-size);
  line-height: var(--wg-title-lh);
  font-weight: 700;
  letter-spacing: -0.2px;
  margin-top: var(--wg-space-14);
  margin-bottom: var(--wg-space-4);
  padding-top: var(--wg-space-6);
  border-top: 1px solid var(--wg-border);
}
.wg-legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.wg-legal h3 {
  font-size: var(--wg-subtitle-size);
  line-height: var(--wg-subtitle-lh);
  font-weight: 700;
  margin-top: var(--wg-space-8);
  margin-bottom: var(--wg-space-3);
}

.wg-legal p,
.wg-legal li {
  font-size: var(--wg-body-size);
  line-height: 1.7;
  color: var(--wg-text-secondary);
}
.wg-legal p + p { margin-top: var(--wg-space-4); }
/* Un párrafo que sigue a una lista o una tabla también necesita aire. */
.wg-legal ul + p,
.wg-legal ol + p,
.wg-legal table + p,
.wg-legal ul + h3,
.wg-legal ol + h3 { margin-top: var(--wg-space-5); }
.wg-legal strong { color: var(--wg-text-primary); }

.wg-legal ul, .wg-legal ol {
  margin-top: var(--wg-space-4);
  padding-left: var(--wg-space-5);
  display: grid;
  gap: var(--wg-space-3);
}
.wg-legal ul { list-style: disc; }
.wg-legal ol { list-style: decimal; }
.wg-legal li::marker { color: var(--wg-text-muted); }

.wg-legal table {
  width: 100%;
  margin-top: var(--wg-space-5);
  border-collapse: collapse;
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
}
.wg-legal th, .wg-legal td {
  text-align: left;
  vertical-align: top;
  padding: var(--wg-space-3);
  border-bottom: 1px solid var(--wg-border);
}
.wg-legal th {
  font-weight: 700;
  color: var(--wg-text-primary);
  background: var(--wg-surface-sunken);
}
.wg-legal td { color: var(--wg-text-secondary); }

/* Identificación del titular: lo único que queda por completar. */
.wg-legal-entity {
  display: grid;
  gap: var(--wg-space-2);
  padding: var(--wg-space-5);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-elevated);
  box-shadow: var(--wg-e1);
}
.wg-legal-entity dl { display: grid; gap: var(--wg-space-2); margin: 0; }
.wg-legal-entity div { display: grid; grid-template-columns: 180px 1fr; gap: var(--wg-space-3); }
.wg-legal-entity dt {
  font-size: var(--wg-caption-size);
  font-weight: 700;
  color: var(--wg-text-muted);
}
.wg-legal-entity dd {
  margin: 0;
  font-size: var(--wg-body-size);
  color: var(--wg-text-primary);
}
@media (max-width: 560px) {
  .wg-legal-entity div { grid-template-columns: 1fr; gap: 0; }
}

/* Marcador de dato que solo el titular puede completar. */
.wg-fill {
  display: inline-block;
  padding: 2px var(--wg-space-2);
  border: 1.5px dashed var(--wg-warning);
  border-radius: var(--wg-radius-sm);
  background: var(--wg-surface-sunken);
  color: var(--wg-warning);
  font-size: var(--wg-caption-size);
  font-weight: 700;
}

.wg-toc {
  padding: var(--wg-space-5);
  border: 1px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-sunken);
}
.wg-toc ol { counter-reset: toc; list-style: none; padding: 0; gap: var(--wg-space-2); }
.wg-toc li { counter-increment: toc; }
.wg-toc li::before {
  content: counter(toc) ". ";
  color: var(--wg-text-muted);
  font-weight: 700;
}
.wg-toc a { font-weight: 500; }

/* -----------------------------------------------------------------------------
   18c · Formulario del Libro de Reclamaciones
   -------------------------------------------------------------------------- */
.wg-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--wg-space-10);
  display: grid;
  gap: var(--wg-space-5);
}
.wg-fieldset legend {
  padding: 0;
  /* El <legend> queda fuera del flujo del grid, así que el `gap` del fieldset
     no lo separa del primer campo: la separación va aquí. */
  margin-bottom: var(--wg-space-5);
  font-size: var(--wg-subtitle-size);
  line-height: var(--wg-subtitle-lh);
  font-weight: 700;
  color: var(--wg-text-primary);
}
.wg-fieldset__step {
  display: block;   /* dentro del <legend>, encima del título de la sección */
  font-size: var(--wg-overline-size);
  line-height: var(--wg-overline-lh);
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--wg-primary-text);
  margin-bottom: var(--wg-space-1);
}

.wg-field-row { display: grid; gap: var(--wg-space-5); }
@media (min-width: 620px) { .wg-field-row--2 { grid-template-columns: 1fr 1fr; } }

/* Reclamo vs. Queja: la norma exige distinguirlos y explicar la diferencia. */
.wg-radio-cards { display: grid; gap: var(--wg-space-3); }
@media (min-width: 620px) { .wg-radio-cards { grid-template-columns: 1fr 1fr; } }

.wg-radio-card {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--wg-space-3);
  align-items: start;
  padding: var(--wg-space-4);
  border: 1.5px solid var(--wg-border);
  border-radius: var(--wg-radius-lg);
  background: var(--wg-surface-elevated);
  cursor: pointer;
  transition: border-color var(--wg-fast) var(--wg-ease-emphasis),
              background-color var(--wg-fast) var(--wg-ease-emphasis);
}
.wg-radio-card:hover { border-color: var(--wg-neutral-200); }
.wg-radio-card input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--wg-primary); }
.wg-radio-card:has(input:checked) {
  border-color: var(--wg-primary);
  background: var(--wg-primary-surface);
}
.wg-radio-card__title { font-size: var(--wg-body-size); font-weight: 700; color: var(--wg-text-primary); }
.wg-radio-card__desc {
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  color: var(--wg-text-secondary);
  margin-top: 2px;
}

.wg-notice {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--wg-space-3);
  align-items: start;
  padding: var(--wg-space-4);
  border: 1px solid var(--wg-border);
  border-left: 4px solid var(--wg-info);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
  color: var(--wg-text-secondary);
}
.wg-notice .wg-icon { color: var(--wg-info); margin-top: 1px; }

/* -----------------------------------------------------------------------------
   19 · Aviso de contenido provisional (quitar antes de publicar)
   -------------------------------------------------------------------------- */
.wg-draft-note {
  display: flex;
  gap: var(--wg-space-3);
  align-items: flex-start;
  padding: var(--wg-space-3) var(--wg-space-4);
  border: 1.5px dashed var(--wg-warning);
  border-radius: var(--wg-radius-md);
  background: var(--wg-surface-elevated);
  color: var(--wg-text-secondary);
  font-size: var(--wg-caption-size);
  line-height: var(--wg-caption-lh);
}
.wg-draft-note .wg-icon { color: var(--wg-warning); }

/* -----------------------------------------------------------------------------
   20 · Motion — entradas suaves, sin rebotes, respetando Reduce Motion
   -------------------------------------------------------------------------- */
/* El estado oculto SOLO se aplica si hay JavaScript (la clase `wg-js` la pone un
   script inline en el <head>). Sin JS, o si main.js no carga, el contenido se ve
   igual: nunca se esconde algo cuya única forma de aparecer es un script. */
.wg-js .wg-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--wg-slow) var(--wg-ease-emphasis),
              transform var(--wg-slow) var(--wg-ease-emphasis);
}
.wg-js .wg-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .wg-js .wg-reveal { opacity: 1; transform: none; }  /* solo opacidad, sin desplazamiento */
}

/* -----------------------------------------------------------------------------
   21 · Impresión
   -------------------------------------------------------------------------- */
@media print {
  .wg-header, .wg-cta-band, .wg-phone, .wg-burger { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
  .wg-js .wg-reveal { opacity: 1 !important; transform: none !important; }
}
