/* Espliego · landing. Sin frameworks. Lavanda botánica, Nunito, radio 16. */

@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/nunito-Regular.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/nunito-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700 800; font-style: normal; font-display: swap; src: url("/assets/fonts/nunito-Bold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;

  --bg: #fbf9ff;
  --surface: #ffffff;
  --soft: #f3eefc;
  --ink: #1f1a2e;
  --muted: #5b536e;
  --line: #e4dcf2;
  --primary: #6b4fa8;
  --primary-strong: #573b95;
  --on-primary: #ffffff;
  --primary-tint: #ece5fa;
  --leaf: #2f7a52;
  --leaf-tint: #e2f3e9;
  --link: #5a3f98;
  --shadow: 0 1px 2px rgb(61 42 110 / .06), 0 8px 24px rgb(61 42 110 / .08);
  --shadow-lg: 0 2px 4px rgb(61 42 110 / .08), 0 24px 56px rgb(61 42 110 / .16);

  --radius: 16px;
  --radius-pill: 999px;
  --wrap: 1120px;
  --header: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15111f;
    --surface: #1f1930;
    --soft: #1a1528;
    --ink: #f1edfa;
    --muted: #b6adcb;
    --line: #342b4d;
    --primary: #b9a3f2;
    --primary-strong: #cdbcf7;
    --on-primary: #21143f;
    --primary-tint: #2c2347;
    --leaf: #7fd1a3;
    --leaf-tint: #1b3027;
    --link: #c9b8f6;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .35), 0 24px 56px rgb(0 0 0 / .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); max-width: 22ch; }
h3 { font-size: 1.15rem; line-height: 1.25; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 700; }
small { font-size: .85em; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 18px; height: 18px; }
.ico--lg { width: 30px; height: 30px; }

/* ---------- Cabecera fija ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  height: var(--header);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top__in { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; }
.brand img { border-radius: 10px; }
.top__nav { display: none; margin-left: auto; gap: 4px; }
.top__nav a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.top__nav a:hover { color: var(--ink); background: var(--primary-tint); }
.menu { margin-left: auto; position: relative; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font: 700 1rem/1 "Nunito", system-ui, sans-serif;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px rgb(107 79 168 / .28); }
.btn--primary:hover { background: var(--primary-strong); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--primary); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.btn--ghost:hover { background: var(--primary-tint); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn--store { justify-content: flex-start; gap: 12px; min-height: 56px; padding: 0 22px; background: var(--ink); color: var(--bg); border-radius: 14px; }
.btn--store span { display: grid; line-height: 1.15; text-align: left; font-size: 1.05rem; }
.btn--store small { font-size: .72rem; font-weight: 600; opacity: .8; }
.btn--store:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
[data-store].is-soon { opacity: .6; cursor: default; pointer-events: none; }
[data-store].is-soon span::after { content: "Próximamente"; font-size: .72rem; font-weight: 700; color: inherit; }

/* ---------- Menú «Usar Espliego» ---------- */
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary .ico { transform: rotate(180deg); }
.menu > summary .ico { transition: transform .2s ease; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 12px);
  width: min(88vw, 340px);
  padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
}
.menu[open] .menu__panel { animation: pop .18s ease-out; }
.menu__item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.menu__item:hover, .menu__item:focus-visible { background: var(--primary-tint); }
.menu__item .ico { color: var(--primary); }
.menu__item span { display: grid; line-height: 1.25; }
.menu__item small { color: var(--muted); font-size: .85rem; }
.menu__qr { display: flex; align-items: center; gap: 14px; margin: 6px 4px 4px; padding: 12px; border-radius: 14px; background: var(--soft); }
.menu__qr img { border-radius: 8px; flex: none; }
.menu__qr p { font-size: .88rem; color: var(--muted); line-height: 1.4; }

/* La QR solo tiene sentido cuando se mira desde un ordenador. */
.only-desktop { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 760px) { .only-desktop { display: flex; } }

@media (max-width: 380px) { .brand { font-size: 1.1rem; } .brand img { width: 30px; height: 30px; } .btn--sm { padding: 0 14px; } }
@media (min-width: 900px) { .top__nav { display: flex; } .menu { margin-left: 8px; } }

/* ---------- Estructura común ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section--soft { background: var(--soft); }
.head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.head--left { margin-bottom: 0; align-content: start; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 800; color: var(--primary); }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 56ch; }
.stats__after { margin-top: 22px; }
.hl { color: var(--primary); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--primary) 22%, transparent) 62%); }
.note { margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--primary-tint); color: var(--ink); font-size: .98rem; }
.fine { font-size: .9rem; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: grid; gap: 10px; align-content: start; }
.card p { color: var(--muted); }
.card--icon .ico { color: var(--primary); margin-bottom: 4px; }
.card--accent { background: var(--primary); border-color: transparent; }
.card--accent h3, .card--accent p { color: var(--on-primary); }
.card--accent p { opacity: .92; }

.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0; pointer-events: none; }
.hero::before { width: 520px; height: 520px; right: -120px; top: -140px; background: color-mix(in srgb, var(--primary) 30%, transparent); }
.hero::after { width: 420px; height: 420px; left: -160px; bottom: -160px; background: color-mix(in srgb, var(--leaf) 16%, transparent); }
.hero__in { position: relative; z-index: 1; display: grid; gap: 48px; align-items: center; }
.hero__text { display: grid; gap: 22px; justify-items: start; }
.hero__text .lead { margin-top: -4px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 6px 14px; border-radius: var(--radius-pill); background: var(--leaf-tint); color: var(--leaf); font-weight: 700; font-size: .92rem; }
.pills li::before { content: "✓"; margin-right: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.15fr .85fr; gap: 64px; } }

.hero__art { position: relative; display: grid; place-items: center; padding: 24px 0; }

/* Teléfono de ejemplo (HTML/CSS, sin capturas) */
.phone {
  width: min(100%, 292px);
  min-height: 600px;
  border-radius: 36px; padding: 16px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px;
  transform: rotate(2deg);
}
.phone__head { display: flex; align-items: center; gap: 12px; padding: 6px 6px 0; }
.phone__head img, .contact__av, .steps__av, .float { border-radius: 50%; object-fit: cover; }
.phone__head > div { display: grid; line-height: 1.25; justify-items: start; gap: 2px; }
.chip { font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--primary-tint); color: var(--primary); }
.phone__aud { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: .82rem; border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.phone__aud .ico { color: var(--primary); }
.phone__aud b { color: var(--ink); }
.phone__msgs { display: grid; gap: 8px; padding: 8px 4px; align-content: end; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.35; }
.msg--in { justify-self: start; background: var(--primary-tint); border-bottom-left-radius: 6px; }
.msg--out { justify-self: end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.phone__composer { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.phone__composer .ico { color: var(--primary); }

.float { position: absolute; z-index: 2; box-shadow: var(--shadow); border: 3px solid var(--surface); animation: bob 6s ease-in-out infinite; }
.float--a { top: 2%; left: 2%; }
.float--b { right: 4%; top: 22%; animation-delay: -2s; }
.float--c { bottom: 4%; left: 8%; animation-delay: -4s; }
@media (max-width: 899px) { .float--a { left: 6%; } .float--c { left: 10%; } }

/* ---------- Estadísticas y riesgos ---------- */
.stats { display: grid; gap: 18px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { display: grid; gap: 8px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); align-content: start; }
.stat__n { font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--primary); }
.stat span { font-size: 1.08rem; font-weight: 600; }
.stat small { color: var(--muted); }

.risks { margin-top: 40px; display: grid; gap: 16px; }
.risks h3 { color: var(--muted); font-weight: 700; }
.risks ul { display: grid; gap: 12px; }
.risks li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: color-mix(in srgb, #c0392b 8%, var(--surface)); border: 1px solid color-mix(in srgb, #c0392b 22%, var(--line)); font-weight: 600; }
.risks .ico { color: #b83a2e; }
@media (prefers-color-scheme: dark) { .risks .ico { color: #ff9a8f; } }
@media (min-width: 760px) { .risks ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .risks ul { grid-template-columns: repeat(4, 1fr); } .risks li { flex-direction: column; align-items: flex-start; } }

/* ---------- Qué es ---------- */
.steps { display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps .card { padding-top: 30px; }
.steps__av { width: 64px; height: 64px; border: 3px solid var(--primary-tint); }

/* ---------- Edades ---------- */
.ages { display: grid; gap: 18px; }
@media (min-width: 860px) { .ages { grid-template-columns: repeat(3, 1fr); } }
.age { position: relative; display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.age::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; }
.age--1::before { background: var(--primary); }
.age--2::before { background: color-mix(in srgb, var(--primary) 55%, var(--leaf)); }
.age--3::before { background: var(--leaf); }
.age__tag { justify-self: start; padding: 4px 12px; border-radius: var(--radius-pill); background: var(--primary-tint); color: var(--primary); font-weight: 800; font-size: .85rem; }
.age p { color: var(--muted); }

/* ---------- Transparencia ---------- */
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } }
.rows { display: grid; gap: 14px; }
.row { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.row .ico { color: var(--primary); margin-top: 2px; }
.row p { color: var(--muted); }

/* ---------- Privacidad (franja oscura) ---------- */
.section--dark { background: #2b1d4f; color: #f4effd; }
.section--dark .eyebrow { color: #cdbcf7; }
.section--dark .lead { color: #d9ccf5; }
.section--dark h2 { color: #fff; }
.card--glass { background: rgb(255 255 255 / .07); border-color: rgb(255 255 255 / .14); box-shadow: none; }
.card--glass h3 { color: #fff; }
.card--glass p { color: #d9ccf5; }
.card--glass .ico { color: #bfe9cf; }
@media (prefers-color-scheme: dark) { .section--dark { background: #1d1433; } }

/* ---------- Contacto ---------- */
.contact { display: grid; gap: 24px; align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.contact__av { width: 84px; height: 84px; border: 4px solid var(--primary-tint); }
.contact__body { display: grid; gap: 14px; justify-items: start; }
.contact h2 { max-width: none; }
@media (min-width: 760px) { .contact { grid-template-columns: auto 1fr; gap: 40px; } .contact__av { width: 140px; height: 140px; } }

/* ---------- Pie ---------- */
.foot { padding: 40px 0 48px; border-top: 1px solid var(--line); }
.foot__in { display: grid; gap: 22px; }
.foot__brand { display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .95rem; }
.foot__links a { color: var(--muted); text-decoration: none; }
.foot__links a:hover { color: var(--link); text-decoration: underline; }
.foot__legal { font-size: .82rem; color: var(--muted); max-width: 70ch; }
.foot__legal a { color: inherit; }
@media (min-width: 860px) { .foot__in { grid-template-columns: 1fr auto; } .foot__legal { grid-column: 1 / -1; } }

/* ---------- /descargar/ ---------- */
.dl { background: radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent), var(--bg); }
.dl__main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.dl__card { width: min(100%, 440px); display: grid; gap: 18px; justify-items: stretch; padding: 32px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.dl__card .brand { justify-self: start; }
.dl__card h1 { font-size: 2rem; }
.dl__card .stores { display: grid; gap: 12px; }
.dl__card .fine { text-align: center; }

/* ---------- Movimiento ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* Aparición al hacer scroll: solo si hay JS (si no, todo se ve). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .grid .reveal:nth-child(3n+2), .js .stats .reveal:nth-child(2), .js .ages .reveal:nth-child(2) { transition-delay: .08s; }
.js .grid .reveal:nth-child(3n), .js .stats .reveal:nth-child(3), .js .ages .reveal:nth-child(3) { transition-delay: .16s; }

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