/* Coffee Coach — landing / páginas legales.
   Paleta "Organic Minimalist" tomada del design system de la app.
   Dirección "Ficha de receta": tipografía editorial, capturas reales de la app,
   matcha como único acento. Tema claro y oscuro vía light-dark(). */

:root {
  /* Tema: el sistema decide por defecto; [data-theme] en <html> lo fuerza.
     Cada token se declara dos veces a propósito: el primer valor es el
     respaldo para navegadores sin light-dark(), el segundo es el real. */
  color-scheme: light dark;

  --coffee: #553722;
  --coffee: light-dark(#553722, #c79a70);
  --coffee-light: #6f4e37;
  --coffee-light: light-dark(#6f4e37, #d8b28a);
  --on-coffee: #ffffff;
  --on-coffee: light-dark(#ffffff, #1b1512);
  --cream-accent: #eec1a4;
  --matcha: #7a8f5a;
  --matcha: light-dark(#7a8f5a, #a8c27d);
  --paper: #ffffff;
  --paper: light-dark(#ffffff, #14100e);
  --paper-2: #fff8f5;
  --paper-2: light-dark(#fff8f5, #1c1613);
  --card: #ffffff;
  --card: light-dark(#ffffff, #1c1613);
  --ink: #221a14;
  --ink: light-dark(#221a14, #f0e8e2);
  --ink-soft: #50453e;
  --ink-soft: light-dark(#50453e, #b6a89f);
  --outline: #e4d7d0;
  --outline: light-dark(#e4d7d0, #322822);
  --outline-strong: #d4c3ba;
  --outline-strong: light-dark(#d4c3ba, #46392f);
  /* Titulares y superficies de botón: se invierten entre temas. */
  --heading: #2c241e;
  --heading: light-dark(#2c241e, #f8f3ef);
  --btn-bg: #2c241e;
  --btn-bg: light-dark(#2c241e, #f0e4d9);
  --btn-fg: #ffffff;
  --btn-fg: light-dark(#ffffff, #241c17);
  --header-bg: rgba(255, 255, 255, 0.85);
  --header-bg: light-dark(rgba(255, 255, 255, 0.85), rgba(20, 16, 14, 0.85));
  --halo: rgba(238, 193, 164, 0.38);
  --halo: light-dark(rgba(238, 193, 164, 0.38), rgba(199, 154, 112, 0.16));
  /* El marco del teléfono es un degradado: light-dark() solo admite colores,
     así que se compone con dos tokens. */
  --phone-1: #f2e9e3;
  --phone-1: light-dark(#f2e9e3, #3b302a);
  --phone-2: #d8c8bf;
  --phone-2: light-dark(#d8c8bf, #241c17);
  --phone-edge: rgba(85, 55, 34, 0.07);
  --phone-edge: light-dark(rgba(85, 55, 34, 0.07), rgba(255, 255, 255, 0.08));

  --max-w: 1140px;
  /* Una sola escala de radios: contenedores y elementos internos. */
  --radius: 16px;
  --radius-sm: 12px;
  /* light-dark() solo admite colores, así que el tema viaja en el color de la
     sombra y la geometría queda fija. */
  --sh-1: rgba(85, 55, 34, 0.12);
  --sh-1: light-dark(rgba(85, 55, 34, 0.12), rgba(0, 0, 0, 0.5));
  --sh-2: rgba(85, 55, 34, 0.08);
  --sh-2: light-dark(rgba(85, 55, 34, 0.08), rgba(0, 0, 0, 0.4));
  --sh-3: rgba(85, 55, 34, 0.28);
  --sh-3: light-dark(rgba(85, 55, 34, 0.28), rgba(0, 0, 0, 0.65));
  --shadow: 0 12px 40px var(--sh-1);
  --shadow-sm: 0 4px 16px var(--sh-2);
  --shadow-lg: 0 30px 60px -18px var(--sh-3);
  /* Mismas familias que la app: Outfit (títulos) + Inter (cuerpo). */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Outfit", var(--font-body);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* El botón de tema fuerza uno u otro; sin atributo manda el sistema. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Foco visible para navegación con teclado (accesibilidad). */
:focus-visible {
  outline: 2px solid var(--coffee);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Enlace "saltar al contenido": solo visible al tabular. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 50;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus-visible { top: 12px; }

body {
  margin: 0;
  /* clip (y no hidden) recorta el halo del hero sin romper el header sticky. */
  overflow-x: clip;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .section-title, .hero h1, .cta h2,
.feature-num, .store-btn .sb-bottom, .doc h1 {
  font-family: var(--font-display);
}

/* Evita palabras huérfanas en títulos y viudas en párrafos. */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* height:auto es imprescindible: sin él, los atributos width/height del HTML
   (que evitan saltos de layout) fijan una altura literal y deforman la imagen. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--coffee-light); }

.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Entrada escalonada al entrar en viewport. Solo se oculta si hay JS:
   sin JS el contenido se ve igual (la clase .js la pone app.js). */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease) var(--reveal-delay, 0ms),
              transform 0.7s var(--ease) var(--reveal-delay, 0ms);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--outline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand img { width: 38px; height: 38px; border-radius: var(--radius-sm); }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--outline-strong);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-switch button:hover { background: var(--paper-2); color: var(--coffee); }
.lang-switch button.active { background: var(--coffee); color: var(--on-coffee); }
.lang-switch button.active:hover { background: var(--coffee); color: var(--on-coffee); }

/* Controles de la cabecera: idioma y tema comparten caja. */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--outline-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.theme-toggle:hover {
  background: var(--paper-2);
  color: var(--coffee);
  border-color: var(--coffee-light);
}
.theme-toggle svg { width: 18px; height: 18px; }

/* ---------- Hero (split asimétrico) ---------- */
.hero { padding: 88px 0 96px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 72px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4rem);
  line-height: 1.03;
  margin: 0 0 20px;
  color: var(--heading);
  letter-spacing: -0.035em;
  font-weight: 700;
}
.hero p.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin: 0 0 34px;
  max-width: 42ch;
}

/* Marco de teléfono: contenedor CSS alrededor de la captura real. */
.phone-shot {
  position: relative;
  display: grid;
  place-items: center;
  /* Halo cálido detrás del teléfono: se dibuja dentro de la caja, así que no
     ensancha el documento en móvil. */
  background: radial-gradient(circle at 50% 50%, var(--halo), rgba(238, 193, 164, 0) 62%);
}
.phone {
  position: relative;
  width: 276px;
  max-width: 100%;
  padding: 8px;
  border-radius: 34px;
  background: linear-gradient(155deg, var(--phone-1), var(--phone-2));
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--phone-edge);
}
.phone img,
.phone-video { width: 100%; height: auto; display: block; border-radius: 27px; }
.phone--sm { width: 228px; }
.phone--xs { width: 176px; }

/* Hero: el teléfono con el video y una nota breve debajo. */
.hero-media { margin: 0; gap: 18px; }
.hero-media figcaption {
  max-width: 30ch;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Dos capturas superpuestas: la principal y, detrás y más abajo, su detalle. */
.phone-duo {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0 0 56px 96px;
  /* Contexto de apilado propio: el teléfono de atrás (z-index -1) queda
     detrás del principal pero no detrás del fondo de la sección. */
  isolation: isolate;
}
.phone-duo .phone--back {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: -1;
  rotate: -4deg;
}

/* Movimiento ligado al scroll (solo donde el navegador lo soporta y sin
   movimiento reducido): los teléfonos suben un poco más lento que la página y
   la captura de atrás gira al asentarse. Sin JS: si no hay soporte, quedan
   quietos y la página se ve igual. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feature-media .phone,
    .cta .phone {
      animation: phone-drift linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    .phone-duo .phone--back { animation-name: phone-drift-back; }
  }
}
@keyframes phone-drift {
  from { translate: 0 48px; }
  to   { translate: 0 -48px; }
}
@keyframes phone-drift-back {
  from { translate: 0 90px; rotate: -9deg; }
  to   { translate: 0 -30px; rotate: -2deg; }
}

/* ---------- Botones de tienda ---------- */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
  box-shadow: var(--shadow-sm);
}
.store-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store-btn:active { transform: translateY(1px) scale(0.99); box-shadow: var(--shadow-sm); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn .sb-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn .sb-top { font-size: 0.7rem; opacity: 0.85; }
.store-btn .sb-bottom { font-size: 1.05rem; font-weight: 600; }
.store-btn[data-disabled="true"] { opacity: 0.75; cursor: default; }
.store-btn[data-disabled="true"]:hover { transform: none; box-shadow: var(--shadow-sm); }
/* App Store ya está publicada: color de marca propio para distinguirla de Android (aún "próximamente"). */
.store-btn[data-store="ios"]:not([data-disabled="true"]) {
  background: #000000;
  background: light-dark(#000000, #ffffff);
  color: #ffffff;
  color: light-dark(#ffffff, #000000);
}

.soon-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--matcha);
  margin: 0 0 14px;
}
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--heading);
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 18ch;
  font-weight: 600;
}
.section-sub {
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
  font-size: 1.05rem;
}

/* ---------- Métodos (chips con scroll-snap) ---------- */
.methods { padding: 24px 0 88px; }
.methods-head { margin-bottom: 28px; }
.methods-track {
  display: flex;
  list-style: none;
  margin: 0;
  padding-left: 0;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  /* overflow-x recorta también en vertical: este relleno deja sitio al chip
     elevado en :hover para que no se corte por arriba. */
  padding: 0 0 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--outline-strong) transparent;
}
/* Nombres de método: son etiquetas informativas, no controles. Sin borde,
   sin hover y sin cursor de puntero para no prometer una acción inexistente. */
.method {
  flex: none;
  scroll-snap-align: start;
  padding: 2px 26px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--heading);
  border-left: 1px solid var(--outline-strong);
}
.method:first-child { padding-left: 0; border-left: 0; }

/* ---------- Features 01-02 (split imagen/texto alternado) ---------- */
.feature-split {
  padding: 0 0 96px;
}
.feature-split .wrap {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 56px;
  align-items: center;
}
/* La segunda invierte el orden para romper la lectura en zigzag. */
.feature-split--flip .wrap { grid-template-columns: 0.8fr 1fr; }
.feature-split--flip .feature-media { order: -1; }
.feature-num {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--matcha);
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}
.feature-split h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 600;
}
.feature-split p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0;
  max-width: 44ch;
}

/* ---------- Features 03-04 (dos columnas, sin cajas) ---------- */
.feature-cols {
  padding: 0 0 96px;
}
.feature-cols .wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
}
.feature-cols article { max-width: 42ch; }
.feature-cols h2 {
  font-size: 1.45rem;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  font-weight: 600;
}
.feature-cols p { color: var(--ink-soft); margin: 0; }

/* ---------- CTA de cierre (franja a ancho completo) ---------- */
.cta {
  background: var(--paper-2);
  border-top: 1px solid var(--outline);
  padding: 88px 0 96px;
}
.cta .wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.cta h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 600;
}
.cta p { margin: 0 0 30px; color: var(--ink-soft); font-size: 1.05rem; max-width: 40ch; }
.cta .phone { background: linear-gradient(160deg, var(--phone-1), var(--phone-2)); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--outline);
  padding: 40px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--coffee); text-decoration: underline; }

/* Enlace a redes: icono + etiqueta, alineados ópticamente. */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.social-link svg { width: 18px; height: 18px; flex: none; transform: translateY(-0.5px); }
.social-link:hover { color: var(--coffee); }

/* ---------- Legal / content pages ---------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--heading);
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.doc .updated {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 32px;
}
.doc h2 {
  color: var(--heading);
  margin: 40px 0 12px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.doc h3 { color: var(--heading); margin: 24px 0 8px; font-size: 1.05rem; font-weight: 600; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p { max-width: 68ch; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--coffee-light); }
.doc .contact-card {
  background: var(--paper-2);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}
.doc .contact-card a { font-weight: 600; }

/* Página 404 */
.notfound { padding-top: 88px; }
.notfound-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-top: 28px;
}
.notfound-links a { color: var(--coffee-light); text-decoration: none; font-weight: 600; }
.notfound-links a:hover { text-decoration: underline; }
.notfound-links .back-link { margin-bottom: 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--coffee-light);
  font-weight: 600;
  margin-bottom: 24px;
}

/* ---------- Página de enlaces (/links, tipo linktree) ---------- */
.links {
  max-width: 440px;
  margin: 0 auto;
  padding: 64px 16px 56px;
  text-align: center;
}
/* Entrada escalonada: cada bloque sube y aparece en orden. */
.links > * { animation: links-in 0.7s var(--ease) both; }
.links > :nth-child(2) { animation-delay: 0.08s; }
.links > :nth-child(3) { animation-delay: 0.16s; }
.links > :nth-child(4) { animation-delay: 0.24s; }
.links > :nth-child(n + 5) { animation-delay: 0.32s; }
@keyframes links-in { from { opacity: 0; transform: translateY(14px); } }

.links-logo {
  position: relative;
  width: 96px;
  margin: 0 auto 20px;
}
/* Halo cálido detrás del logo. */
.links-logo::before {
  content: "";
  position: absolute;
  inset: -36px;
  z-index: -1;
  background: radial-gradient(closest-side, var(--halo), transparent);
}
.links-logo img { border-radius: 26px; box-shadow: var(--shadow); }
/* El lienzo animado tiene transparencia alrededor del cuadro: la sombra sigue su forma. */
.links-logo canvas { display: block; filter: drop-shadow(0 10px 20px var(--sh-1)); }
.links h1 {
  margin: 0;
  color: var(--heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.links-handle {
  display: inline-block;
  margin-top: 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.links-handle:hover { color: var(--coffee); }
.links-hero p { margin: 10px 0 0; color: var(--ink-soft); }

.links-social { display: flex; justify-content: center; gap: 12px; margin: 22px 0 32px; }
.links-social a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--heading);
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s;
}
.links-social a:hover { background: var(--paper-2); color: var(--coffee); transform: translateY(-3px); }
.links-social svg { width: 30px; height: 30px; }

/* Botón principal: celular con flecha de descarga y un brillo que lo recorre. */
.links-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 14px;
  border-radius: 20px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-align: left;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.links-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--btn-fg) 18%, transparent) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: links-shine 4.5s ease-in-out 1.2s infinite;
}
.links-cta:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 8px 24px var(--sh-1); }
.links-cta:active { transform: translateY(0) scale(0.99); }
.links-cta-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--btn-fg) 12%, transparent);
}
.links-cta-icon svg {
  width: 30px;
  height: 30px;
  animation: links-buzz 4.5s ease-in-out 1.2s infinite;
}
.links-cta-arrow-down { animation: links-drop 1.6s ease-in-out infinite; }
.links-cta-text { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.links-cta-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.links-cta-sub { font-size: 0.85rem; opacity: 0.75; }
.links-cta-go { width: 22px; height: 22px; flex: none; transition: transform 0.25s var(--ease); }
.links-cta:hover .links-cta-go { transform: translateX(4px); }

@keyframes links-shine { 0%, 45% { transform: translateX(-100%); } 75%, 100% { transform: translateX(100%); } }
/* Vibra un instante, como un aviso, y luego descansa. */
@keyframes links-buzz {
  0%, 62%, 100% { transform: rotate(0); }
  65% { transform: rotate(-12deg); }
  69% { transform: rotate(10deg); }
  73% { transform: rotate(-7deg); }
  77% { transform: rotate(4deg); }
  81% { transform: rotate(0); }
}
@keyframes links-drop {
  0% { transform: translateY(-2px); opacity: 0; }
  30%, 70% { opacity: 1; }
  100% { transform: translateY(2px); opacity: 0; }
}

.links-stores {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.links-stores span { display: inline-flex; align-items: center; gap: 6px; }
.links-stores svg { width: 15px; height: 15px; }

.links-site {
  display: inline-block;
  margin-top: 36px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.links-site:hover { color: var(--coffee); text-decoration: underline; }
.links-footer { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }

/* Granos de fondo: capa fija detrás de todo; la máscara los apaga en el centro. */
.links-beans {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  color: var(--coffee);
  opacity: 0.16;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 35%, #000 100%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 35%, #000 100%);
}
.links-beans .bean {
  position: absolute;
  height: auto;
  aspect-ratio: 3 / 4;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  transform: rotate(var(--r));
  animation: links-float var(--d) ease-in-out calc(var(--d) * -0.37) infinite alternate;
}
@keyframes links-float {
  to { transform: translate(6px, -18px) rotate(calc(var(--r) + 14deg)); }
}

@media (prefers-reduced-motion: reduce) {
  .links > *, .links-beans .bean, .links-cta::after, .links-cta-icon svg, .links-cta-arrow-down { animation: none; }
}

/* i18n: mostrar/ocultar según idioma activo en <html lang> */
[data-lang] { display: none; }
html[lang="es"] [data-lang="es"],
html[lang="en"] [data-lang="en"] { display: revert; }

/* Respeta la preferencia de movimiento reducido del sistema. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero .wrap,
  .feature-split .wrap,
  .feature-cols .wrap,
  .cta .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero .wrap { text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .store-buttons { justify-content: center; }
  .phone-shot { order: -1; }
  .hero .phone { width: min(240px, 66%); }
  .feature-split--flip .feature-media { order: 0; }
  .feature-split, .feature-cols { padding-bottom: 64px; }
  .methods { padding-bottom: 64px; }
  .cta { padding: 64px 0 72px; text-align: center; }
  .cta p { margin-left: auto; margin-right: auto; }
  .cta .store-buttons { justify-content: center; }
  .cta .phone-shot { order: 0; }
  .section-title { max-width: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .phone-duo { padding: 0 0 40px 64px; }
  .phone-duo .phone--sm { width: 200px; }
  .phone-duo .phone--xs { width: 140px; }
  /* scroll-padding: sin él, el scroll-snap alinea el primer método contra el
     borde de la pantalla y se come el relleno izquierdo. */
  .methods-track { margin: 0 -20px; padding: 0 20px 10px; scroll-padding-inline: 20px; }
}
