/* ============================================================
   Lista de Compras · Shared List — Estilos del sitio
   Paleta y sistema de diseño extraídos de la app (Flutter).
   ============================================================ */

:root {
  /* Marca */
  --color-primary:        #1565C0;
  --color-primary-light:  #2196F3;
  --color-primary-50:     #E3F2FD;
  --gradient-brand:       linear-gradient(135deg, #1565C0 0%, #42A5F5 100%);
  --gradient-button:      linear-gradient(90deg, #1565C0 0%, #2196F3 100%);

  /* Acento positivo */
  --color-success:        #4CAF50;
  --color-success-light:  #C8E6C9;

  /* Texto */
  --color-text-primary:   #1A1A2E;
  --color-text-secondary: #6B7280;

  /* Fondos y bordes */
  --color-bg-base:        #FFFFFF;
  --color-bg-soft:        #EEF2F7;
  --color-bg-card:        #FFFFFF;
  --color-border-soft:    #DCE3EC;

  /* Estados */
  --color-error:          #F44336;
  --color-warning:        #FFA000;

  /* Radios y sombras */
  --radius-card:   16px;
  --radius-btn:    12px;
  --shadow-card:   0 4px 12px rgba(28, 40, 64, 0.08);
  --shadow-hover:  0 8px 24px rgba(28, 40, 64, 0.12);
  --shadow-strong: 0 18px 50px rgba(20, 50, 110, 0.28);

  /* Layout */
  --container:     1200px;
  --header-h:      72px;

  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text-primary);
  background: var(--color-bg-base);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p  { color: var(--color-text-secondary); }

/* ---------- Utilidades de layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section--soft { background: var(--color-bg-soft); }
.section__head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { margin-bottom: 14px; }
.section__head p  { font-size: 1.05rem; }
.eyebrow {
  display: inline-block; font-size: .82rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--color-primary); margin-bottom: 12px;
}

@media (min-width: 1024px) {
  body { font-size: 18px; }
  .container { padding: 0 48px; }
  .section { padding: 104px 0; }
}

/* ---------- Skip link / accesibilidad ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--color-primary); color: #fff; padding: 10px 18px;
  border-radius: 8px; transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Botones / Badges de tienda
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 1rem; padding: 14px 26px; border-radius: var(--radius-btn);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn--primary { background: var(--gradient-button); color: #fff; box-shadow: 0 6px 18px rgba(21,101,192,.32); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(21,101,192,.42); }
.btn--ghost { background: rgba(255,255,255,.16); color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn--ghost:hover { background: rgba(255,255,255,.26); }

.store-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #000; color: #fff; border-radius: 12px; padding: 10px 18px;
  border: 1px solid rgba(255,255,255,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.store-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-badge__txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge__txt small { font-size: .68rem; font-weight: 400; opacity: .85; }
.store-badge__txt strong { font-size: 1.05rem; font-weight: 600; }

/* ============================================================
   Header / Nav
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: #fff; transition: color .25s ease; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span b { font-weight: 700; }
.brand span small { display: block; font-size: .7rem; font-weight: 500; opacity: .8; letter-spacing: .02em; }

.nav { display: none; align-items: center; gap: 28px; }
.nav a { font-weight: 500; font-size: .98rem; color: #fff; opacity: .9; transition: color .25s ease, opacity .2s ease; }
.nav a:hover { opacity: 1; }
.nav .btn { padding: 10px 20px; font-size: .95rem; }

/* Estado: header sólido al hacer scroll */
.header.scrolled { background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); box-shadow: 0 2px 16px rgba(28,40,64,.08); }
.header.scrolled .brand { color: var(--color-text-primary); }
.header.scrolled .nav a { color: var(--color-text-primary); }
.header.scrolled .nav .btn--ghost { color: var(--color-primary); border-color: var(--color-primary); background: transparent; }
.header.scrolled .menu-toggle span { background: var(--color-text-primary); }

/* Hamburger */
.menu-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 8px; }
.menu-toggle span { width: 24px; height: 2.5px; background: #fff; border-radius: 2px; transition: background .25s ease, transform .25s ease, opacity .25s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Menú móvil desplegable */
.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 99;
  background: #fff; box-shadow: 0 12px 30px rgba(28,40,64,.14);
  display: flex; flex-direction: column; padding: 16px 24px 24px;
  transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform .25s ease, opacity .25s ease;
}
.mobile-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-nav a { padding: 14px 4px; font-weight: 500; color: var(--color-text-primary); border-bottom: 1px solid var(--color-border-soft); }
.mobile-nav .btn { margin-top: 18px; }

@media (min-width: 880px) {
  .nav { display: flex; }
  .menu-toggle, .mobile-nav { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; background: var(--gradient-brand); color: #fff; padding: calc(var(--header-h) + 56px) 0 80px; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(circle at 80% 10%, rgba(255,255,255,.18), transparent 45%);
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.hero__title { color: #fff; margin-bottom: 20px; }
.hero__sub { color: rgba(255,255,255,.92); font-size: 1.12rem; max-width: 540px; margin-bottom: 30px; }
.hero__cta { margin-bottom: 18px; }
.hero__trust { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: rgba(255,255,255,.88); flex-wrap: wrap; }
.hero__trust svg { width: 16px; height: 16px; }

.hero__media { position: relative; display: flex; justify-content: center; }
.hero__shot {
  width: min(280px, 78vw); border-radius: 28px; box-shadow: var(--shadow-strong);
  transform: rotate(3deg); border: 6px solid rgba(255,255,255,.9);
}
.hero__icon {
  position: absolute; top: -18px; left: calc(50% - 150px); width: 64px; height: 64px;
  border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.25);
  background: #fff; padding: 6px; transform: rotate(-6deg);
}
.hero__rating {
  position: absolute; bottom: 18px; right: calc(50% - 168px);
  background: #fff; color: var(--color-text-primary); border-radius: 14px; padding: 10px 14px;
  box-shadow: var(--shadow-hover); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem;
}
.hero__rating .stars { color: #FFB300; letter-spacing: 1px; }

@media (min-width: 920px) {
  .hero { padding: calc(var(--header-h) + 80px) 0 110px; }
  .hero__grid { grid-template-columns: 1.15fr .85fr; gap: 40px; }
  .hero__shot { width: min(330px, 90%); }
  .hero__icon { left: calc(50% - 185px); width: 76px; height: 76px; }
}

/* ============================================================
   Bloque "problema" (texto centrado)
   ============================================================ */
.story { max-width: 760px; margin: 0 auto; text-align: center; }
.story h2 { margin-bottom: 28px; }
.story p { font-size: 1.1rem; margin-bottom: 20px; }
.story p strong { color: var(--color-text-primary); }

/* ============================================================
   Cómo funciona (4 pasos)
   ============================================================ */
.steps { display: grid; grid-template-columns: 1fr; gap: 22px; }
.step { background: var(--color-bg-card); border: 1px solid var(--color-border-soft); border-radius: var(--radius-card); padding: 28px 24px; box-shadow: var(--shadow-card); position: relative; }
.step__num { font-size: 2.4rem; font-weight: 700; color: var(--color-primary-50); line-height: 1; margin-bottom: 6px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: .98rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   Features (6 cards)
   ============================================================ */
.features { display: grid; grid-template-columns: 1fr; gap: 22px; }
.feature { background: var(--color-bg-card); border: 1px solid var(--color-border-soft); border-radius: var(--radius-card); padding: 30px 26px; box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature__icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 1.7rem; background: var(--color-primary-50); margin-bottom: 18px; }
.feature h3 { margin-bottom: 10px; }
.feature p { font-size: .98rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   Casos de uso (4)
   ============================================================ */
.cases { display: grid; grid-template-columns: 1fr; gap: 20px; }
.case { background: var(--color-bg-card); border: 1px solid var(--color-border-soft); border-radius: var(--radius-card); padding: 26px 22px; box-shadow: var(--shadow-card); text-align: center; }
.case__emoji { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.case h3 { font-size: 1.15rem; margin-bottom: 6px; }
.case p { font-size: .94rem; }
@media (min-width: 560px) { .cases { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cases { grid-template-columns: repeat(4, 1fr); } }

/* ============================================================
   Demo (carrusel de screenshots)
   ============================================================ */
.demo { background: var(--gradient-brand); color: #fff; }
.demo .section__head h2 { color: #fff; }
.demo .section__head p { color: rgba(255,255,255,.9); }
.carousel {
  display: flex; gap: 22px; overflow-x: auto; padding: 8px 24px 28px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 auto; scroll-snap-align: center; width: 240px; text-align: center; }
.slide img { width: 100%; border-radius: 22px; box-shadow: var(--shadow-strong); border: 5px solid rgba(255,255,255,.9); margin-bottom: 14px; }
.slide span { font-size: .92rem; color: rgba(255,255,255,.92); display: block; padding: 0 6px; }
@media (min-width: 1024px) { .slide { width: 270px; } }

/* ============================================================
   Sin paywall
   ============================================================ */
.free { background: linear-gradient(180deg, rgba(76,175,80,.06), rgba(76,175,80,.02)); }
.free__box {
  display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center;
  background: #fff; border: 1.5px solid var(--color-success-light); border-radius: 24px;
  padding: 40px 30px; box-shadow: var(--shadow-card); max-width: 980px; margin: 0 auto;
}
.free__icon { width: 96px; height: 96px; border-radius: 50%; background: var(--color-success-light); display: grid; place-items: center; font-size: 3rem; margin: 0 auto; }
.free h2 { margin-bottom: 16px; }
.free p { font-size: 1.05rem; }
.free .price-pill { display: inline-block; margin-top: 18px; background: var(--color-success); color: #fff; font-weight: 600; padding: 8px 18px; border-radius: 999px; font-size: .95rem; }
@media (min-width: 820px) { .free__box { grid-template-columns: 180px 1fr; padding: 56px 50px; } }

/* ============================================================
   Privacidad (3 pilares)
   ============================================================ */
.pillars { display: grid; grid-template-columns: 1fr; gap: 26px; max-width: 980px; margin: 0 auto; text-align: center; }
.pillar__icon { font-size: 2.2rem; margin-bottom: 12px; }
.pillar h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pillar p { font-size: .96rem; }
.privacy-link { text-align: center; margin-top: 36px; }
.privacy-link a { color: var(--color-primary); font-weight: 600; border-bottom: 2px solid var(--color-primary-50); padding-bottom: 2px; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   FAQ (accordion)
   ============================================================ */
.faq { max-width: 800px; margin: 0 auto; }
.faq__item { background: #fff; border: 1px solid var(--color-border-soft); border-radius: var(--radius-card); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.faq__q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; padding: 20px 22px; font-weight: 600; font-size: 1.02rem; color: var(--color-text-primary); }
.faq__q .chev { flex-shrink: 0; width: 22px; height: 22px; transition: transform .25s ease; color: var(--color-primary); }
.faq__item.open .chev { transform: rotate(180deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { padding: 0 22px 20px; font-size: .98rem; }

/* ============================================================
   CTA final
   ============================================================ */
.cta-final { background: var(--gradient-brand); color: #fff; text-align: center; }
.cta-final h2 { color: #fff; margin-bottom: 14px; }
.cta-final p { color: rgba(255,255,255,.92); font-size: 1.1rem; margin-bottom: 30px; }
.cta-final .store-badges { justify-content: center; }
.cta-final .fineprint { margin-top: 22px; font-size: .9rem; color: rgba(255,255,255,.85); }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--color-text-primary); color: #fff; padding: 56px 0 28px; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.footer__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 14px; }
.footer__brand img { width: 36px; height: 36px; border-radius: 9px; }
.footer p { color: rgba(255,255,255,.6); font-size: .92rem; }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); margin-bottom: 16px; }
.footer__links a { display: block; color: rgba(255,255,255,.82); padding: 6px 0; font-size: .96rem; transition: color .2s ease; }
.footer__links a:hover { color: #fff; }
.footer__social { display: flex; gap: 14px; }
.footer__social span { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; opacity: .45; cursor: not-allowed; }
.footer__social span svg { width: 20px; height: 20px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; text-align: center; }
.footer__bottom p { font-size: .85rem; color: rgba(255,255,255,.5); }
.footer a.made-by { color: rgba(255,255,255,.82); border-bottom: 1px solid rgba(255,255,255,.3); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; } }

/* ============================================================
   Páginas legales / 404
   ============================================================ */
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--header-h) + 56px) 0 80px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 10px; }
.legal .updated { color: var(--color-text-secondary); font-size: .92rem; margin-bottom: 36px; }
.legal h2 { font-size: 1.3rem; margin: 36px 0 12px; color: var(--color-text-primary); }
.legal p, .legal li { color: var(--color-text-secondary); margin-bottom: 14px; font-size: 1rem; }
.legal ul { padding-left: 22px; list-style: disc; margin-bottom: 14px; }
.legal a { color: var(--color-primary); font-weight: 500; }
.legal .intro { font-size: 1.05rem; color: var(--color-text-primary); background: var(--color-primary-50); padding: 20px 22px; border-radius: var(--radius-card); }

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) 24px 60px; }
.notfound__emoji { font-size: 4.5rem; margin-bottom: 18px; }
.notfound h1 { margin-bottom: 14px; }
.notfound p { font-size: 1.08rem; margin-bottom: 28px; max-width: 460px; }
.notfound .store-badges { justify-content: center; margin-top: 26px; }

/* Header sólido permanente en páginas internas */
.header--solid { position: fixed; background: rgba(255,255,255,.95); backdrop-filter: saturate(180%) blur(12px); box-shadow: 0 2px 16px rgba(28,40,64,.08); }
.header--solid .brand { color: var(--color-text-primary); }
.header--solid .nav a { color: var(--color-text-primary); }
.header--solid .nav .btn--ghost { color: var(--color-primary); border-color: var(--color-primary); }
.header--solid .menu-toggle span { background: var(--color-text-primary); }

/* ---------- Animaciones de entrada (progressive enhancement) ---------- */
/* Por defecto, todo visible: si JS no corre, el contenido nunca queda oculto */
.reveal { opacity: 1; transform: none; }
/* Solo cuando JS está activo escondemos hasta que el observer dispare .in */
html.has-js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
html.has-js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html.has-js .reveal { opacity: 1; transform: none; }
}
