/* Totebag — hoja de estilos compartida (landing + legales) */
:root {
  --crema: #f5efe0;
  --crema-clara: #fbf7ee;
  --amarillo: #f5c737;
  --carbon: #2d2d2d;
  --blanco: #ffffff;
  --muted: #8c8c8c;
  --border: #e5e0d5;
  --success: #038141;
  --max: 720px; /* texto de lectura (legales) */
  /* Fluido: crece con la ventana (90vw) con tope 1540px. Así el margen lateral
     cumple 60-100px @1440 y <=200px @1920 (un valor fijo no puede con ambos). */
  --max-wide: min(90vw, 1540px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--carbon);
  background: var(--crema);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden; /* el plátano puede asomar sin generar scroll horizontal */
}

a {
  color: var(--carbon);
  text-decoration: underline;
  text-underline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

/* Marcador de contenido pendiente de rellenar (visible a propósito) */
mark {
  background: #ffe9a6;
  color: #7a5c00;
  padding: 0 4px;
  border-radius: 3px;
  font-style: normal;
}

/* ---------- Cabecera / navegación ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 20px 24px;
}

.wordmark {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--carbon);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wordmark img {
  width: 32px;
  height: 32px;
}

.nav-legal a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-left: 18px;
}

.nav-legal a:hover {
  color: var(--carbon);
}

/* ---------- Contenedor de contenido ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px;
}

/* ---------- Landing ---------- */
/* DOS componentes independientes:
   A = .hero-copy (texto + Google Play)
   B = .hero-art  (móvil + plátano, bloqueados entre sí como un solo objeto)
   Escritorio: A izquierda, B derecha. Al estrechar: B ARRIBA, A DEBAJO. */
.hero {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  align-items: center;
  justify-content: center; /* bloque cohesivo centrado; NO space-between (dejaba hueco muerto) */
  gap: 72px;
}

/* Componente A: texto. Ancho tope 620px (legible); junto al showcase forman un
   bloque centrado, sin hueco muerto en medio. */
.hero-copy {
  flex: 0 1 620px;
  min-width: 0;
}

.hero-copy h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.hero-copy p {
  max-width: 46ch;
}

.hero-copy h1 .accent {
  color: var(--amarillo);
}

.hero-copy p {
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.5;
  color: #4a4a4a;
  margin: 0 0 24px;
  max-width: 42ch;
}

/* Componente showcase: TAMAÑO MÁXIMO fijo en escritorio (440px) que ESCALA hacia
   abajo como una imagen en móvil (width: min + aspect-ratio). El interior se mide
   en cqw → escala uniforme, sin descomponerse ni salirse. */
.hero-art {
  container-type: inline-size;
  position: relative;
  flex: 0 0 auto;
  width: min(480px, 100%);
  aspect-ratio: 360 / 520;
}

/* Tote de acento, detrás de todo (esquina inferior derecha) */
.hero-illus {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 1cqw;
  width: 39cqw;
  height: auto;
}

/* Blob suave de fondo */
.bg-blob {
  position: absolute;
  z-index: 0;
  top: 6.7cqw;
  right: -1.7cqw;
  width: 41.7cqw;
  height: 41.7cqw;
  border-radius: 50%;
  background: #f5c737;
  opacity: 0.14;
}

/* Móvil: centrado en la caja, arriba. Esquinas curvas. */
.phone {
  position: absolute;
  z-index: 2;
  top: 6.7cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 69.5cqw;
  background: #2d2d2d;
  border-radius: 8.3cqw;
  padding: 1.4cqw;
  box-sizing: border-box;
  overflow: hidden;
}

.phone-screen {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 7.2cqw;
  background: #000;
}

/* ---- Tarjetas UI flotantes (showcase) — medidas en cqw (escalan con la caja) ---- */
.ui-card {
  position: absolute;
  z-index: 3;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3.9cqw;
  box-shadow: 0 2.2cqw 6cqw rgba(45, 45, 45, 0.12);
  padding: 2.5cqw 3.3cqw;
  display: flex;
  align-items: center;
  gap: 2.5cqw;
}

.ui-card strong {
  font-weight: 700;
  color: var(--carbon);
  line-height: 1.1;
}

.ui-card__label {
  color: var(--muted);
  font-size: 3.05cqw;
  line-height: 1.2;
}

/* Salud de compra: DENTRO de la caja (left>=0), solapando el borde del móvil.
   Nunca sangra fuera (evita el recorte real medido en 360-400px). */
.ui-card--health {
  top: 1.7cqw;
  left: 0;
}
.gauge {
  width: 9.4cqw;
  height: 9.4cqw;
  flex: 0 0 auto;
}
.ui-card__txt {
  display: flex;
  flex-direction: column;
  gap: 0.5cqw;
}
.ui-card__txt strong {
  font-size: 4.7cqw;
}
.ui-card__txt strong span {
  font-size: 3.05cqw;
  color: var(--muted);
  font-weight: 600;
}

/* Gasto (roza el lateral derecho del móvil) */
.ui-card--spend {
  top: 25.5cqw;
  right: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5cqw;
}
.ui-amount {
  font-size: 5cqw;
}
.ui-delta {
  font-size: 2.9cqw;
  font-weight: 700;
  color: var(--success);
}

/* Producto con Nutriscore (roza la esquina inferior-izquierda) */
.ui-card--product {
  bottom: 1cqw;
  left: 0;
}
.nutri {
  flex: 0 0 auto;
  width: 7.2cqw;
  height: 7.2cqw;
  border-radius: 1.9cqw;
  color: #fff;
  font-weight: 700;
  font-size: 3.9cqw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nutri--a {
  background: var(--success);
}
.ui-prod {
  display: flex;
  flex-direction: column;
  gap: 1.4cqw;
}
.ui-prod strong {
  font-size: 3.6cqw;
}
.ui-bar {
  display: block;
  width: 20.5cqw;
  height: 1.7cqw;
  border-radius: 999px;
  background: #ede7d9;
  overflow: hidden;
}
.ui-bar i {
  display: block;
  width: 84%;
  height: 100%;
  background: var(--success);
  border-radius: 999px;
}
.ui-price {
  font-size: 3.3cqw;
  font-weight: 700;
  color: var(--carbon);
}

/* Al estrechar: primero el texto (A) y debajo el móvil (B), todo centrado */
@media (max-width: 860px) {
  .hero {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
  }
  .hero-copy {
    flex: 0 0 auto;
    max-width: 640px;
    text-align: center;
  }
  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }
  .badges {
    justify-content: center;
  }
  /* B ya es un componente de ancho fijo (idéntico en desktop/móvil): no se toca,
     solo se apila debajo del texto. */
}


.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pill {
  display: inline-block;
  background: var(--blanco);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}

.pill--soon {
  background: var(--crema-clara);
  color: var(--muted);
}

/* Badge de Google Play (sombreado / deshabilitado, sin redirección de momento) */
.play-badge {
  display: inline-flex;
  opacity: 0.5;
  filter: grayscale(0.25);
  cursor: default;
  user-select: none;
}

.play-badge svg {
  display: block;
  width: clamp(150px, 40vw, 178px);
  height: auto;
}

/* Bloque "Qué hace por ti" — imagen-forward, horizontal en desktop */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.value-item {
  text-align: center;
}

.value-media {
  width: 260px;
  height: 260px;
  max-width: 100%;
  border-radius: 50%;
  background: var(--crema-clara);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.value-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transform: scale(1.1);
}

/* Ajuste por imagen (el icono no está centrado dentro del PNG → lo empujamos).
   Valores a ojo; afinar tras ver el render. */
.value-media--salud img {
  object-fit: contain;
  transform: scale(0.68);
}
.value-media--gasto img {
  object-fit: contain;
  transform: scale(0.68); /* igualado al plátano: mismo relleno interno (~96-97%) */
}
.value-media--alt img {
  transform: scale(1.15);
}

/* Placeholder mientras no llega la imagen (se quita el atributo data-ph al añadirla) */
.value-media[data-ph]::after {
  content: attr(data-ph);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.value-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.value-item p {
  margin: 0;
  color: #4a4a4a;
  font-size: 15px;
}

/* Franjas de sección */
.section {
  background: var(--blanco);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section .inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 48px 24px;
}

.section h2 {
  font-size: 26px;
  margin: 0 0 28px;
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--crema-clara);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.feature .emoji {
  font-size: 28px;
}

.feature h3 {
  margin: 12px 0 8px;
  font-size: 18px;
}

.feature p {
  margin: 0;
  color: #4a4a4a;
  font-size: 15px;
}

/* "Cómo funciona" — LISTA vertical (distinta del grid de "Qué hace por ti") */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--blanco);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
}

.step .num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--amarillo);
  color: var(--carbon);
  font-weight: 700;
}

.step-icon {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.step-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.step-text strong {
  font-size: 16px;
  color: var(--carbon);
}
.step-text span {
  font-size: 14px;
  line-height: 1.4;
  color: #4a4a4a;
}

.privacy-note {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.privacy-note h2 {
  font-size: 24px;
  margin: 0 0 12px;
}

.privacy-note p {
  color: #4a4a4a;
  margin: 0 auto;
  max-width: 56ch;
}

/* ---------- Documentos legales ---------- */
.legal h1 {
  font-size: 30px;
  margin: 8px 0 4px;
}

.legal .updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 32px;
}

.legal h2 {
  font-size: 20px;
  margin: 36px 0 10px;
  padding-top: 8px;
}

.legal h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}

.legal p,
.legal li {
  color: #333;
}

.legal ul {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 8px;
}

.legal .lead {
  font-weight: 600;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
}

.callout {
  background: var(--crema-clara);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 24px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout p:first-child {
  margin-top: 0;
}

/* ---------- Pie ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.site-footer .inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 18px;
}

.site-footer a:hover {
  color: var(--carbon);
}

/* ---------- Responsive ---------- */
/* El apilado del hero (móvil arriba, texto debajo) se controla en su propia
   media query (max-width: 860px) más arriba. */
@media (max-width: 780px) {
  .features,
  .value-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .nav-legal {
    display: none;
  }
}
