/* ============================================================
   Asesor Rappi — hoja de estilos única
   Tokens y dirección visual: docs/02-design-system.md
   Mobile-first (375px). Todo movimiento CSS vive al final,
   dentro de @media (prefers-reduced-motion: no-preference).
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --fondo: #0C0C10;
  --fondo-panel: #16161C;
  --naranja: #FF7A00;
  --amarillo: #FFC93C;
  --degrade-fuego: linear-gradient(100deg, #FF7A00 0%, #FFC93C 100%);
  --crema: #FFF6EA;
  --gris-humo: #9B9BA4;
  --rojo-brasa: #E8452C;

  --text-xs: 0.8rem;
  --text-base: 1rem;
  --text-lg: 1.2rem;
  --text-xl: 1.6rem;
  --text-2xl: clamp(2.2rem, 7vw, 3.6rem);
  --text-hero: clamp(2.8rem, 11vw, 6rem);

  --fuente-display: "Archivo Black", "Archivo", sans-serif;
  --fuente-cuerpo: "Archivo", sans-serif;

  --espacio-seccion: clamp(4rem, 10vw, 7rem);
  --radio-tarjeta: 16px;
  --glow-naranja: 0 0 24px rgba(255, 122, 0, 0.35);
}

/* ---------- Reset y base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--fondo);
  color: var(--crema);
  font-family: var(--fuente-cuerpo);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
ul[role="list"], ol[role="list"] { list-style: none; }

a { color: var(--amarillo); }

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

.contenedor {
  width: min(100% - 2.5rem, 1080px);
  margin-inline: auto;
}

.contenedor-angosto { max-width: 760px; }

.seccion {
  padding-block: var(--espacio-seccion);
  scroll-margin-top: 4.5rem; /* compensa el header sticky en anclas */
}

/* tinte alternado para separar bloques de contenido */
.seccion-tinte {
  background: linear-gradient(
    180deg,
    rgba(255, 122, 0, 0.045) 0%,
    rgba(22, 22, 28, 0.55) 18%,
    rgba(22, 22, 28, 0.55) 82%,
    rgba(12, 12, 16, 0) 100%
  );
}

.seccion-titulo {
  font-family: var(--fuente-display);
  font-size: var(--text-2xl);
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-align: center;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
  text-wrap: balance;
}

.seccion-titulo-izq { text-align: left; }

.seccion-cierre {
  text-align: center;
  margin-top: clamp(1.5rem, 5vw, 2.5rem);
  max-width: 32rem;
  margin-inline: auto;
}

.seccion-cierre strong { color: var(--amarillo); }

/* ---------- Tratamientos de texto ---------- */
.texto-fuego {
  background: var(--degrade-fuego);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.texto-outline { color: var(--crema); }

@supports (-webkit-text-stroke: 2px white) {
  .texto-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--crema);
  }
}

/* ---------- Íconos ---------- */
.icono { width: 22px; height: 22px; fill: currentColor; flex: none; }
.icono-chico { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.icono.check { width: 18px; height: 18px; fill: var(--amarillo); }

/* ---------- Botón CTA ---------- */
.boton-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--degrade-fuego);
  color: var(--fondo);
  font-family: var(--fuente-cuerpo);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: var(--glow-naranja);
}

.boton-cta-grande {
  min-height: 60px;
  padding: 0.9rem 2.25rem;
  font-size: 1.15rem;
}

.boton-cta-chico {
  min-height: 44px;
  padding: 0.45rem 1.15rem;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: none; /* el glow queda para el flotante y la comida */
}

@media (max-width: 430px) {
  .boton-cta-chico { font-size: 0.82rem; padding: 0.4rem 0.8rem; }
  .header-marca { font-size: 0.85rem; }
  .header-fila { gap: 0.6rem; }
}

/* ============================================================
   HEADER NAVEGABLE (sticky)
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 16, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 122, 0, 0.15);
}

.header-fila {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.header-marca {
  font-family: var(--fuente-display);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--crema);
  text-decoration: none;
  margin-right: auto;
  padding-block: 0.5rem;
}

.header-links {
  display: none;
}

.header-links a {
  color: var(--crema);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.6rem 0.4rem;
}

.header-links a:hover { color: var(--amarillo); }

/* scrollspy: enlace de la sección visible */
.header-links a.activo {
  color: var(--amarillo);
  text-decoration: underline;
  text-decoration-color: var(--naranja);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.header-menu-boton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--amarillo);
}

/* menú desplegable mobile */
.header-links.abierto {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--fondo-panel);
  border-bottom: 1px solid rgba(255, 122, 0, 0.25);
  padding: 0.5rem 1.25rem 1rem;
}

.header-links.abierto a {
  min-height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 122, 0, 0.1);
}

@media (min-width: 960px) {
  .header-links {
    display: flex;
    gap: 1.5rem;
    position: static;
  }
  .header-menu-boton { display: none; }
}

/* ---------- Badges sticker ---------- */
.badge-sticker {
  display: inline-block;
  font-family: var(--fuente-display);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amarillo);
  background: var(--fondo);
  border: 2px solid var(--amarillo);
  border-radius: 10px;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}

/* ---------- Sparkles ---------- */
.sparkle { position: absolute; fill: var(--amarillo); }
.sparkle-1 { width: 20px; height: 20px; top: 8%; left: 12%; }
.sparkle-2 { width: 13px; height: 13px; top: 18%; right: 8%; }
.sparkle-3 { width: 16px; height: 16px; bottom: 6%; left: 22%; }

/* ============================================================
   1. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100svh - 4rem); /* descuenta el header sticky */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3.5rem 4.5rem;
  overflow: hidden;
  /* resplandor ambiental fijo detrás de la comida */
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 122, 0, 0.12), transparent 45%),
    var(--fondo);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-visual {
  position: relative;
  height: clamp(240px, 56vw, 340px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* grupo de comidas: protagonista + satélites */
.hero-comidas {
  position: relative;
  width: 100%;
  height: 100%;
}

.comida-item { position: absolute; }

.comida-protagonista {
  width: clamp(140px, 32vw, 230px);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 28px rgba(255, 122, 0, 0.4));
  z-index: 1;
}

.comida-sat { opacity: 0.9; }

.comida-sat-1 {
  width: clamp(78px, 18vw, 130px);
  left: 4%;
  top: 6%;
  transform: rotate(-10deg);
}

.comida-sat-2 {
  width: clamp(70px, 16vw, 116px);
  right: 5%;
  bottom: 4%;
  transform: rotate(8deg);
}

.comida-sat-3 {
  width: clamp(64px, 15vw, 108px);
  left: 10%;
  bottom: 0;
  transform: rotate(-6deg);
}

.comida-svg { width: 100%; aspect-ratio: 200 / 180; height: auto; }

/* los badges siempre por delante de la comida (que usa z-index: 1) */
.badge-48 { position: absolute; z-index: 2; top: 6%; right: 10%; transform: rotate(6deg); }
.badge-alta { position: absolute; z-index: 2; bottom: 2%; right: 16%; transform: rotate(-4deg); }
.badge-fijos { position: absolute; z-index: 2; left: 0; top: 44%; transform: rotate(-5deg); }

.hero-titulo {
  font-family: var(--fuente-display);
  font-size: var(--text-hero);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero-linea { display: block; overflow: hidden; padding-block: 0.04em; }
.hero-linea-texto { display: inline-block; }

.hero-subtitulo {
  font-size: var(--text-lg);
  max-width: 30rem;
  margin-top: 1.25rem;
  color: var(--crema);
}

.hero-cta { margin-top: 1.75rem; }

.hero-microcopy {
  margin-top: 0.75rem;
  font-size: var(--text-xs);
  color: var(--gris-humo);
}

.hero-scroll {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  color: var(--amarillo);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.hero-scroll-flecha { font-size: 1.2rem; }

/* ============================================================
   2. ¿POR QUÉ SUMARTE A RAPPI?
   ============================================================ */
.porque-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.porque-tarjeta {
  background: var(--fondo-panel);
  border: 1px solid rgba(255, 122, 0, 0.25);
  border-radius: var(--radio-tarjeta);
  padding: 1.5rem 1.3rem;
}

.porque-icono {
  width: 44px;
  height: 44px;
  margin-bottom: 0.9rem;
}

.porque-tarjeta h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.porque-tarjeta p {
  color: var(--crema);
  font-size: 0.95rem;
  max-width: 42ch;
}

/* ============================================================
   2. VALOR CONCRETO
   ============================================================ */
.datos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.dato-tarjeta {
  background: var(--fondo-panel);
  border: 1px solid rgba(255, 122, 0, 0.25);
  border-radius: var(--radio-tarjeta);
  padding: 1.4rem 1.1rem;
  text-align: center;
}

.dato-numero {
  font-family: var(--fuente-display);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1;
  color: var(--amarillo);
}

.dato-prefijo, .dato-sufijo { font-size: 0.55em; }

.dato-etiqueta {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--crema);
  line-height: 1.4;
}

/* ============================================================
   3. CÓMO FUNCIONA
   ============================================================ */
.pasos-wrapper {
  position: relative;
  margin-block: 2rem;
}

.pasos-linea {
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: calc(1.5rem - 2px);
  width: 3px;
  background: linear-gradient(180deg, #FF7A00 0%, #FFC93C 100%);
  border-radius: 2px;
  transform-origin: top center;
}

.pasos {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.paso {
  position: relative;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.paso-numero {
  flex: none;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fondo-panel);
  border: 2px solid var(--naranja);
  font-family: var(--fuente-display);
  font-size: 1.3rem;
  color: var(--amarillo);
  position: relative;
  z-index: 1;
}

.paso-texto h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.paso-texto p { color: var(--crema); max-width: 34rem; }

/* ---------- Chips de productos (dentro del acordeón) ---------- */
.chips-etiqueta {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris-humo);
  padding: 0 0.25rem 0.6rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--amarillo);
  border: 1px solid rgba(255, 201, 60, 0.45);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* ============================================================
   5. TU MAYOR PREOCUPACIÓN (acordeón de apertura única)
   ============================================================ */
.objeciones-subtitulo {
  text-align: center;
  color: var(--crema);
  font-size: var(--text-lg);
  margin: -1.5rem auto 2.25rem;
}

.acordeon {
  background: var(--fondo-panel);
  border-radius: var(--radio-tarjeta);
  padding: 0.5rem 1.25rem;
}

.objecion + .objecion { border-top: 1px solid rgba(255, 122, 0, 0.15); }

/* item destacado por rubro: personalización invisible pero visible
   como jerarquía (borde fuego + tinte), nunca como "selector" */
.objecion.destacada {
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, #FF7A00, #FFC93C) 1;
  background: rgba(255, 122, 0, 0.05);
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
}

.objecion.destacada .objecion-toggle { color: var(--amarillo); }

.objecion-pregunta { font-size: inherit; }

.objecion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 44px;
  padding: 1rem 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--fuente-cuerpo);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--crema);
  text-align: left;
}

.chevron { color: var(--amarillo); flex: none; font-size: 1.1rem; line-height: 1; }

.objecion.abierta .chevron { transform: rotate(180deg); }

.objecion-panel {
  display: grid;
  grid-template-rows: 0fr;
}

/* cierre inicial instantáneo (ver main.js) */
.acordeon.sin-transicion .objecion-panel,
.acordeon.sin-transicion .chevron { transition: none !important; }

.objecion.abierta .objecion-panel { grid-template-rows: 1fr; }

.objecion-contenido { overflow: hidden; }

.objecion-contenido p {
  padding: 0 0.25rem 1.1rem;
  max-width: 65ch;
  color: var(--crema);
}

.objecion-contenido .chips { padding: 0 0.25rem 1.2rem; }

/* ============================================================
   6. QUIÉN TE ASESORA
   ============================================================ */
.quien-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.quien-lateral {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.quien-caption {
  text-align: center;
  font-weight: 700;
  line-height: 1.35;
}

.quien-caption span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gris-humo);
}

.quien-sparkle {
  width: 18px;
  height: 18px;
  top: -12px;
  right: 8%;
}

.quien-foto {
  width: min(75%, 300px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radio-tarjeta);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--fondo-panel), var(--fondo-panel)) padding-box,
    var(--degrade-fuego) border-box;
}

.quien-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radio-tarjeta) - 2px);
}

.quien-texto > p { max-width: 65ch; }

.quien-bullets {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.quien-bullets li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
}

/* ============================================================
   7. CTA FINAL
   ============================================================ */
.cta-final {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-final-comida {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.14;
  pointer-events: none;
}

.cta-final-comida .comida-svg { width: min(70vw, 460px); }

.cta-final-contenido { position: relative; z-index: 1; }

.cta-final-titulo {
  font-family: var(--fuente-display);
  font-size: clamp(2rem, 8.5vw, 5.5rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 1rem;
}

.cta-final-subtitulo {
  font-size: var(--text-lg);
  max-width: 28rem;
  margin: 0 auto 2rem;
}

.cta-final-microcopy {
  margin-top: 0.9rem;
  font-size: var(--text-xs);
  color: var(--gris-humo);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid rgba(255, 122, 0, 0.15);
  padding-block: 2.5rem;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--gris-humo);
}

.footer p + p { margin-top: 0.5rem; }

.footer-nombre {
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--crema);
}

.footer-link { color: var(--amarillo); text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

.footer-aclaracion { margin-top: 1rem; }

/* ============================================================
   BOTÓN FLOTANTE (permanente, todos los viewports)
   ============================================================ */
.boton-flotante {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--degrade-fuego);
  color: var(--fondo);
  box-shadow: var(--glow-naranja);
}

.boton-flotante .icono { width: 28px; height: 28px; }

/* ============================================================
   DESKTOP
   ============================================================ */
@media (min-width: 768px) {
  .hero-grid {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .hero-contenido { flex: 1.15; order: 1; min-width: 0; }

  /* en dos columnas el 11vw del token queda enorme y desborda */
  .hero-titulo { font-size: clamp(2.6rem, 6.2vw, 5.5rem); }

  .hero-visual {
    flex: 1;
    order: 2;
    height: clamp(300px, 38vw, 440px);
  }

  .comida-protagonista { width: clamp(200px, 22vw, 290px); }
  .comida-sat-1 { width: clamp(100px, 12vw, 150px); }
  .comida-sat-2 { width: clamp(90px, 10.5vw, 132px); }
  .comida-sat-3 { width: clamp(84px, 10vw, 124px); }

  .sparkle-1 { top: 14%; left: 6%; }
  .sparkle-3 { bottom: 12%; left: 10%; }

  .porque-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }

  .porque-tarjeta { padding: 1.9rem 1.7rem; }

  .datos-grid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }

  .dato-tarjeta { padding: 1.8rem 1.2rem; }

  .acordeon { padding: 0.75rem 2rem; }

  .objecion.destacada {
    margin-inline: -2rem;
    padding-inline: 2rem;
  }

  .quien-grid {
    flex-direction: row;
    align-items: flex-start;
    gap: 3.5rem;
  }

  /* la columna de la foto, centrada verticalmente contra el texto */
  .quien-lateral {
    flex: none;
    width: 300px;
    align-self: center;
  }

  .quien-foto { width: 100%; }
  .quien-texto { flex: 1; }
}

@media (min-width: 1024px) {
  .porque-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ============================================================
   MOVIMIENTO (todo detrás de prefers-reduced-motion)
   Las animaciones GSAP se activan con gsap.matchMedia() en
   js/animations.js bajo la misma condición.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .boton-cta {
    transition: transform 200ms ease, box-shadow 200ms ease;
  }

  .boton-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 36px rgba(255, 122, 0, 0.55);
  }

  .boton-cta:active { transform: scale(0.97); }

  /* glow que respira: excepción autorizada en 05-animations.md.
     Ahora vive en el flotante, el único botón WhatsApp permanente. */
  .boton-flotante {
    animation: respirar-glow 4s ease-in-out infinite alternate;
  }

  @keyframes respirar-glow {
    from { box-shadow: 0 0 20px rgba(255, 122, 0, 0.3); }
    to   { box-shadow: 0 0 38px rgba(255, 122, 0, 0.55); }
  }

  .footer-link, a { transition: color 200ms ease; }

  .chevron { transition: transform 250ms ease; }

  .objecion-panel { transition: grid-template-rows 250ms ease; }

  .hero-scroll-flecha {
    display: block;
    animation: flotar-flecha 2.2s ease-in-out infinite;
  }

  @keyframes flotar-flecha {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
  }
}

/* El foco nunca se anima */
:focus-visible { transition: none; }
