/*
 * BolsilloMedico · landing. Mismos tokens que la app (docs/DISENO.md):
 * Día de fábrica, Noche con prefers-color-scheme o el botón de tema.
 * Space Grotesk para titulares y cifras, Inter para el texto, Instrument
 * Serif en cursiva para una palabra de acento.
 */

/* ---------- Tokens ---------- */
:root {
  --bg: #f2f8f4;
  --bg-2: #e7f3ed;
  --surface: #ffffff;
  --surface-2: #f7fbf9;
  --line: rgba(14, 42, 34, 0.12);
  --line-strong: rgba(14, 42, 34, 0.22);
  --text: #0e2a22;
  --muted: #43605a;
  --faint: #4b665f;
  --accent: #137a55;
  --accent-fill: #1fa97a;
  --accent-soft: rgba(31, 169, 122, 0.13);
  --primary: #0e2a22;
  --on-primary: #ffffff;
  --forest: #0e2a22;
  --forest-2: #0b1512;
  --on-forest: #edf5f0;
  --on-forest-muted: #b5c9c0;
  --mint: #5fd9a8;
  --peach: #ffc9a8;
  --coral: #c4392d;
  --warn-bg: #fff4de;
  --warn-line: #f0d49a;
  --warn-text: #7a4f00;
  --glow-1: rgba(95, 217, 168, 0.42);
  --glow-2: rgba(255, 201, 168, 0.5);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 24px 48px -32px rgba(14, 42, 34, 0.35);
  --header-bg: rgba(242, 248, 244, 0.78);
  --header-h: 68px;
  --sheen: rgba(255, 255, 255, 0.34);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-xxl: 36px;
  --gutter: 20px;
  --max: 1160px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #07110e;
    --bg-2: #0b1512;
    --surface: #12221d;
    --surface-2: #0f1d19;
    --line: rgba(237, 245, 240, 0.1);
    --line-strong: rgba(237, 245, 240, 0.2);
    --text: #edf5f0;
    --muted: #a9bdb4;
    --faint: #9cb2a8;
    --accent: #5fd9a8;
    --accent-fill: #34c68e;
    --accent-soft: rgba(95, 217, 168, 0.12);
    --primary: #eef6f1;
    --on-primary: #0a1712;
    --forest: #0f2a21;
    --forest-2: #0b1512;
    --coral: #ff8a7e;
    --warn-bg: rgba(255, 196, 92, 0.1);
    --warn-line: rgba(255, 196, 92, 0.3);
    --warn-text: #ffd58a;
    --glow-1: rgba(31, 169, 122, 0.3);
    --glow-2: rgba(255, 170, 110, 0.1);
    --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -32px rgba(0, 0, 0, 0.6);
    --header-bg: rgba(7, 17, 14, 0.72);
    --sheen: rgba(31, 169, 122, 0.3);
    --photo: brightness(0.72) saturate(0.9);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #07110e;
  --bg-2: #0b1512;
  --surface: #12221d;
  --surface-2: #0f1d19;
  --line: rgba(237, 245, 240, 0.1);
  --line-strong: rgba(237, 245, 240, 0.2);
  --text: #edf5f0;
  --muted: #a9bdb4;
  --faint: #9cb2a8;
  --accent: #5fd9a8;
  --accent-fill: #34c68e;
  --accent-soft: rgba(95, 217, 168, 0.12);
  --primary: #eef6f1;
  --on-primary: #0a1712;
  --forest: #0f2a21;
  --forest-2: #0b1512;
  --coral: #ff8a7e;
  --warn-bg: rgba(255, 196, 92, 0.1);
  --warn-line: rgba(255, 196, 92, 0.3);
  --warn-text: #ffd58a;
  --glow-1: rgba(31, 169, 122, 0.3);
  --glow-2: rgba(255, 170, 110, 0.1);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 48px -32px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(7, 17, 14, 0.72);
  --sheen: rgba(31, 169, 122, 0.3);
  --photo: brightness(0.72) saturate(0.9);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent);
  font-size: 1.1em;
  line-height: 0.9;
  padding-right: 0.04em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Cabecera: fija; al bajar se compacta y gana vidrio (el cuerpo reserva su alto) ---------- */
body {
  padding-top: var(--header-h);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-fill) 30%, var(--mint) 62%, transparent);
  opacity: 0;
  transform: scaleX(0.2);
  transition: opacity 0.4s ease, transform 0.7s var(--ease-out);
  pointer-events: none;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom-color: var(--line);
  box-shadow: 0 18px 40px -34px rgba(4, 22, 16, 0.5);
}

.site-header.is-scrolled::after {
  opacity: 0.65;
  transform: none;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
  transition: min-height 0.35s var(--ease-out);
}

.site-header.is-scrolled .wrap {
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  margin-right: auto;
  min-height: 44px;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  transition: transform 0.5s var(--ease-out);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

/* Píldoras; la tinta (.nav-ink) marca la sección visible. */
.nav {
  position: relative;
  display: none;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.nav a {
  position: relative;
  z-index: 1;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--text);
}

.nav a:hover:not([aria-current]) {
  background: var(--accent-soft);
}

.nav-ink {
  position: absolute;
  inset: 4px auto 4px 0;
  width: var(--ink-w, 0);
  transform: translateX(var(--ink-x, 0));
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -8px rgba(4, 22, 16, 0.35);
  opacity: 0;
  transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out), opacity 0.3s ease;
}

.nav-ink::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 18px;
  height: 3px;
  margin-left: -9px;
  border-radius: 999px;
  background: var(--accent-fill);
  box-shadow: 0 0 10px 1px var(--glow-1);
}

.nav.has-active .nav-ink {
  opacity: 1;
}

.nav-cta {
  display: none;
}

/* Menú del teléfono (lo arma js/site.js). */
.menu-toggle span {
  grid-area: 1 / 1;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), opacity 0.2s ease;
}

.menu-toggle span:first-child { transform: translateY(-6px); }
.menu-toggle span:last-child { transform: translateY(6px); }
[aria-expanded='true'] > span:first-child { transform: rotate(45deg); }
[aria-expanded='true'] > span:nth-child(2) { opacity: 0; }
[aria-expanded='true'] > span:last-child { transform: rotate(-45deg); }

@media (max-width: 879px) {
  .js .menu-toggle {
    display: inline-grid;
  }

  .js .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: 0 30px 60px -28px rgba(4, 22, 16, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.35s var(--ease-out), visibility 0s 0.35s;
  }

  .js .is-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.35s var(--ease-out);
  }

  .js .nav a {
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-size: 1.05rem;
    color: var(--text);
    opacity: 0;
    translate: 0 -6px;
    transition: opacity 0.3s ease, translate 0.4s var(--ease-out), background-color 0.2s ease;
  }

  .js .is-open .nav a {
    opacity: 1;
    translate: none;
    transition-delay: calc(var(--i, 0) * 45ms + 60ms);
  }

  .js .nav a[aria-current] {
    background: var(--accent-soft);
  }

  .nav-ink {
    display: none;
  }

  .js .nav .nav-cta {
    display: flex;
    margin-top: 6px;
    background: var(--primary);
    color: var(--on-primary);
    justify-content: center;
    font-weight: 600;
  }
}

@media (min-width: 560px) {
  .js .nav .nav-cta {
    display: none;
  }
}

.theme-toggle,
.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.js .theme-toggle {
  display: inline-grid;
}

.theme-toggle .icon {
  width: 20px;
  height: 20px;
}

.theme-toggle .moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .sun {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .sun {
    display: none;
  }

  :root:not([data-theme='light']) .theme-toggle .moon {
    display: block;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.header-cta {
  display: none;
}

/* «Descargar»: brillo que cruza de vez en cuando. */
.header-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 8px 20px -12px rgba(4, 22, 16, 0.6);
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease;
}

.header-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, var(--sheen) 50%, transparent 70%);
  transform: translateX(-110%);
  animation: sheen 7s 2.5s ease-in-out infinite;
}

.header-cta:hover {
  box-shadow: 0 10px 26px -10px var(--accent-fill);
}

@media (min-width: 560px) {
  .header-cta {
    display: inline-flex;
  }
}

@media (min-width: 880px) {
  .nav {
    display: flex;
  }
}

/* ---------- Hero ---------- */
/* Suben bajo la cabecera transparente. */
.hero,
.invite {
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + 40px);
}

.hero {
  position: relative;
  isolation: isolate;
  padding-bottom: 72px;
  overflow: clip;
}

/* Fondo: brillos que derivan, grano finísimo, luz que sigue al cursor y el latido del logo. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: -12% -8% -4%;
  background:
    radial-gradient(44% 50% at 76% 38%, var(--glow-1), transparent 70%),
    radial-gradient(34% 40% at 6% 92%, var(--glow-2), transparent 72%),
    radial-gradient(30% 34% at 40% 0%, var(--accent-soft), transparent 70%);
  animation: drift 16s ease-in-out infinite alternate;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-light {
  position: absolute;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-1), transparent);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero.is-lit .hero-light {
  opacity: 0.55;
}

.hero-beat {
  position: absolute;
  z-index: -1;
  left: 0;
  bottom: 6px;
  width: 100%;
  height: 100px;
  fill: none;
  stroke: var(--accent-fill);
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.hero-beat path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.35;
  animation: draw 2.4s 0.4s var(--ease-out) forwards;
}

/* Destello de monitor. */
.hero-beat .blip {
  stroke-width: 2.4;
  stroke-dasharray: 0.05 0.95;
  opacity: 0;
  filter: drop-shadow(0 0 4px var(--accent-fill));
  animation: blip 7s 2.6s linear infinite;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero-copy > * {
  animation: rise-in 0.8s var(--ease-out) both;
}

.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(5) { animation-delay: 0.32s; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-fill);
}

.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-fill);
  opacity: 0;
  animation: ping 2.4s var(--ease-out) infinite;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.7rem, 1.55rem + 5.4vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero h1 .serif {
  font-size: 1.14em;
}

.lead {
  margin-top: 22px;
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.25rem);
  color: var(--muted);
  max-width: 33em;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* Insignias propias (no son las oficiales de Apple ni de Google). */
.store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  min-width: 176px;
  padding: 8px 18px 8px 14px;
  border-radius: 13px;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  text-decoration: none;
  line-height: 1.1;
  transition: transform 0.2s var(--ease-out);
}


.store .icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.7;
}

.store span {
  display: flex;
  flex-direction: column;
}

.store small {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
}

.store strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.store .soon {
  position: absolute;
  top: -9px;
  right: -8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--peach);
  color: #4a2410;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.35);
}

.store:not(.is-soon) .soon {
  display: none;
}

/* En el teléfono, las dos insignias del hero van lado a lado y más bajas. */
@media (max-width: 559px) {
  .stores--hero {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
    margin-top: 26px;
  }

  .stores--hero .store {
    min-width: 0;
    min-height: 50px;
    gap: 8px;
    padding: 8px 10px;
  }

  .stores--hero .store .icon {
    width: 22px;
    height: 22px;
  }

  .stores--hero .store strong {
    font-size: 1rem;
    white-space: nowrap;
  }

  .stores--hero .store small {
    font-size: 0.64rem;
    white-space: nowrap;
  }
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-notes li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-notes .icon {
  color: var(--accent);
}

/* Teléfonos: marco en CSS alrededor de la captura real. */
.phone {
  --w: 280px;
  position: relative;
  width: var(--w);
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.155);
  background: linear-gradient(155deg, #2a3d36 0%, #0a1511 30%, #050b09 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07) inset,
    0 0 0 1px rgba(5, 11, 9, 0.6),
    0 50px 90px -40px rgba(4, 22, 16, 0.6),
    0 22px 36px -22px rgba(4, 22, 16, 0.5);
}

.phone::before {
  content: '';
  position: absolute;
  right: -3px;
  top: 24%;
  width: 3px;
  height: 13%;
  border-radius: 0 3px 3px 0;
  background: #1d2b26;
}

.phone::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(var(--w) * 0.012);
  width: 18%;
  height: calc(var(--w) * 0.012);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.phone img {
  width: 100%;
  aspect-ratio: 375 / 812;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--w) * 0.125);
  background: #e7f3ed;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}

/* Capas: entrada y flotación animan translate/rotate/scale; cursor y parallax escriben transform (js). */
.hero-visual .phone--front {
  --w: min(66vw, 268px);
  z-index: 2;
  margin-right: 18%;
  animation:
    rise 1s var(--ease-out) both,
    float 7s 1s ease-in-out infinite;
}

.hero-visual .phone--back {
  --w: min(56vw, 236px);
  position: absolute;
  z-index: 1;
  right: max(0px, calc(50% - min(66vw, 268px) * 0.95));
  top: 7%;
  rotate: 6deg;
  animation:
    rise-tilt 1.15s 0.12s var(--ease-out) both,
    float 9s 1.27s ease-in-out infinite reverse;
}

.hero-visual [data-depth] {
  will-change: transform;
}

.medi-float {
  position: absolute;
  z-index: 3;
  left: max(0px, calc(50% - min(66vw, 268px) * 0.98));
  bottom: 9%;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  max-width: min(84%, 300px);
}

/* Medi entra con rebote y su globo justo después. */
.medi-float img {
  width: 68px;
  height: 68px;
  flex: none;
  filter: drop-shadow(0 10px 14px rgba(4, 22, 16, 0.25));
  animation:
    pop-in 0.75s 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    bob 5s 1.6s ease-in-out infinite alternate;
}

.medi-float .globe {
  transform-origin: 0 100%;
  animation: pop-in 0.6s 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.globe {
  padding: 12px 14px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px -18px rgba(4, 22, 16, 0.45);
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text);
}

.globe b {
  font-family: var(--font-display);
  font-weight: 600;
}

.code {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

@media (min-width: 920px) {
  .hero {
    padding-top: calc(var(--header-h) + 64px);
    padding-bottom: 104px;
  }

  .hero-beat {
    bottom: 18px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .hero-visual {
    min-height: 660px;
  }

  .hero-visual .phone--front {
    --w: 290px;
    margin-right: 22%;
  }

  .hero-visual .phone--back {
    --w: 252px;
    right: 0;
    top: 5%;
  }

  .medi-float {
    left: -4%;
    bottom: 12%;
  }
}

/*
 * Imágenes generadas (landing/assets/gen/): ocultas y sin descargar (loading
 * lazy + display none) salvo que <html data-gen="…"> las nombre. Ese atributo
 * lo escribe `node scripts/landing-check.mjs --fix` según los archivos que haya.
 */
.gen,
.gen-band {
  display: none;
}

[data-gen~='hero'] .gen-hero,
[data-gen~='bloque-pase'] .gen-bloque-pase,
[data-gen~='bloque-turno'] .gen-bloque-turno,
[data-gen~='bloque-privacidad'] .gen-bloque-privacidad,
[data-gen~='bloque-pase'] .gen-band,
[data-gen~='bloque-turno'] .gen-band,
[data-gen~='bloque-privacidad'] .gen-band {
  display: block;
}

.gen-band {
  padding-bottom: 72px;
}

.gen-grid {
  display: grid;
  gap: 16px;
  /* Una por fila en el teléfono y tres juntas desde 720 px: nunca dos y una sola. */
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .gen-grid { grid-template-columns: repeat(3, 1fr); }
  .gen-grid figure { aspect-ratio: 3 / 4; }
}

.gen-grid figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-xl);
  background: var(--bg-2);
  box-shadow: var(--shadow-card);
}

.gen-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gen-grid figcaption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.gen-grid figcaption b {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}

/* ---------- Franja: los signos de la hoja ---------- */
.signs {
  border-block: 1px solid var(--line);
  background: var(--surface-2);
  padding: 40px 0;
}

.signs .wrap {
  display: grid;
  gap: 28px;
  align-items: center;
}

.signs h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem);
}

.signs p {
  color: var(--muted);
  margin-top: 8px;
  max-width: 30em;
}

.sign-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sign-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.3;
}

.glyph {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 44px;
  height: 44px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
}

.glyph--bed {
  width: 44px;
  border: 2px solid var(--text);
  border-radius: 50%;
  font-size: 1.05rem;
}

.glyph--p span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--coral);
  border-radius: 50%;
  color: var(--coral);
  font-size: 0.9rem;
}

.glyph--box span {
  padding: 2px 8px;
  border: 2px solid var(--text);
  border-radius: 4px;
  font-size: 0.9rem;
}

.glyph--gone span {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .signs .wrap {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  }

  .sign-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

}

/* ---------- Secciones ---------- */
.section {
  padding: 88px 0;
}

.section--tight {
  padding-bottom: 64px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-head h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.4rem);
  letter-spacing: -0.035em;
}

.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Beneficios ---------- */
.features {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
}

.feature {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px 26px 0;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.feature::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(70% 55% at 50% 100%, var(--glow-1), transparent 70%);
  opacity: 0.7;
}

.feature:nth-child(even)::before {
  background: radial-gradient(70% 55% at 50% 100%, var(--glow-2), transparent 70%);
}

.feature .num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.feature h3 {
  margin-top: 10px;
  font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 28em;
}

.peek {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  height: 290px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}

.peek .phone {
  --w: 248px;
  align-self: flex-start;
  transition: transform 0.6s var(--ease-out);
}


/* Medi: la tarjeta ancha, en verde bosque. */
.feature--medi {
  background: var(--forest);
  border-color: transparent;
  color: var(--on-forest);
  padding-bottom: 28px;
}

.feature--medi::before {
  background:
    radial-gradient(50% 70% at 85% 40%, rgba(31, 169, 122, 0.45), transparent 70%),
    radial-gradient(30% 50% at 0% 100%, rgba(255, 201, 168, 0.14), transparent 70%);
  opacity: 1;
}

.feature--medi .num {
  color: var(--mint);
}

.feature--medi p {
  color: var(--on-forest-muted);
}

.feature--medi .serif {
  color: var(--mint);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  max-width: 420px;
}

.chat .me {
  align-self: flex-end;
  padding: 10px 14px;
  border-radius: 18px 18px 6px 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 0.95rem;
}

.chat .medi {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat .medi img {
  width: 56px;
  height: 56px;
  flex: none;
}

.chat .globe {
  color: var(--text);
}

.medi-art {
  display: none;
}

@media (min-width: 680px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature--medi {
    grid-column: 1 / -1;
  }
}

@media (min-width: 680px) and (max-width: 999px) {
  /* Cinco tarjetas en dos columnas: la quinta va a lo ancho para no dejar un hueco. */
  .feature:nth-child(5) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1000px) {
  .features {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .feature {
    grid-column: span 2;
  }

  .feature--lg {
    grid-column: span 3;
  }

  .feature--lg .peek {
    height: 340px;
  }

  .feature--lg .peek .phone {
    --w: 280px;
  }

  .feature--medi {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 220px;
    gap: 32px;
    align-items: center;
    padding: 40px 44px;
  }

  .feature--medi .chat {
    margin-top: 0;
  }

  .medi-art {
    display: block;
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.35));
  }
}

/* ---------- Privacidad ---------- */
.privacy {
  padding: 24px 0;
}

.privacy-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 32px;
  align-items: center;
  padding: 44px 26px;
  border-radius: var(--r-xxl);
  background: var(--forest-2);
  color: var(--on-forest);
}

.privacy-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45% 60% at 100% 0%, rgba(31, 169, 122, 0.42), transparent 70%),
    radial-gradient(35% 55% at 0% 100%, rgba(255, 201, 168, 0.12), transparent 70%);
}

.privacy-panel .kicker {
  color: var(--mint);
}

.privacy-panel h2 {
  margin-top: 12px;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem);
  letter-spacing: -0.035em;
}

.privacy-panel h2 .serif {
  color: var(--mint);
}

.privacy-panel > div > p {
  margin-top: 14px;
  color: var(--on-forest-muted);
  max-width: 34em;
}

.checks {
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checks .tick {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(95, 217, 168, 0.16);
  color: var(--mint);
}

.checks .tick .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.checks b {
  color: #fff;
  font-weight: 600;
}

.checks span {
  color: var(--on-forest-muted);
}

.privacy-panel .link-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--mint);
  font-weight: 600;
}

.privacy-art {
  justify-self: center;
  width: min(62vw, 300px);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.4));
  animation: float 8s ease-in-out infinite;
}

@media (min-width: 900px) {
  .privacy-panel {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
    padding: 64px 64px;
  }

  .privacy-art {
    width: 320px;
  }
}

/* ---------- Planes ---------- */
.plans-art {
  width: 112px;
  height: 112px;
  margin: 0 auto 4px;
}

.plans {
  display: grid;
  gap: 16px;
  max-width: 900px;
  margin-inline: auto;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.plan h3 {
  font-size: 1.5rem;
}

.plan .for {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.plan-key {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--muted);
}

.plan-key strong {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
}

.plan--featured .plan-key {
  background: rgba(95, 217, 168, 0.14);
  color: var(--on-forest-muted);
}

.plan--featured .plan-key strong,
.plan--featured li b {
  color: #fff;
}

.plan li b {
  color: var(--text);
  font-weight: 600;
}

.plan ul {
  display: grid;
  gap: 10px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
}

.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.plan li .icon {
  margin-top: 0.22em;
  color: var(--accent);
  stroke-width: 2.3;
}

.plan .btn {
  margin-top: auto;
}

.plan--featured {
  overflow: hidden;
  isolation: isolate;
  background: var(--forest);
  color: var(--on-forest);
  border-color: transparent;
}

.plan--featured::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(112deg, transparent 38%, rgba(95, 217, 168, 0.14) 50%, transparent 62%) 140% 0 / 250% 100% no-repeat;
  animation: glass 14s linear infinite;
}

.plan--featured .for {
  color: var(--on-forest-muted);
}

.plan--featured li .icon {
  color: var(--mint);
}

.plan--featured .btn-primary {
  background: #eef6f1;
  color: #0a1712;
}

.badge {
  position: absolute;
  top: 26px;
  right: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(95, 217, 168, 0.16);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 700;
}

.fineprint {
  max-width: 720px;
  margin: 28px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (min-width: 760px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Descarga ---------- (aquí va gen/hero.webp: a sangre a la derecha; arriba en el teléfono) */
.download {
  padding-bottom: 72px;
}

.download-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 32px;
  align-items: center;
  justify-items: center;
  padding: 48px 24px;
  border-radius: var(--r-xxl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.download-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 70% at 100% 0%, var(--glow-1), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, var(--glow-2), transparent 72%);
}

.download-photo {
  width: calc(100% + 48px);
  max-width: none;
  margin: -48px -24px -64px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 40% 42%;
  filter: var(--photo, none);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}

.download-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download .app-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  border-radius: 22px;
  box-shadow: 0 24px 40px -20px rgba(4, 22, 16, 0.55);
  animation: float 6s ease-in-out infinite;
}

.download h2 {
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.4rem);
  letter-spacing: -0.035em;
}

.download p {
  margin-top: 12px;
  color: var(--muted);
}

.download .stores {
  justify-content: center;
}

/* El QR, solo donde tiene sentido: en una pantalla que no es el teléfono. */
.qr-card {
  display: none;
}

@media (min-width: 900px) {
  .download-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    justify-items: start;
    min-height: 480px;
    padding: 56px 64px;
    text-align: left;
  }

  .download-photo {
    position: absolute;
    inset: 0 0 0 auto;
    width: 50%;
    height: 100%;
    margin: 0;
    aspect-ratio: auto;
    object-position: 30% 38%;
    -webkit-mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5) 22%, #000 48%);
    mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5) 22%, #000 48%);
  }

  .download-copy {
    align-items: flex-start;
  }

  .download .stores {
    justify-content: flex-start;
  }

  .qr-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 0;
    padding: 10px 18px 10px 10px;
    border-radius: var(--r-lg);
    background: #fff;
    border: 1px solid rgba(14, 42, 34, 0.1);
    box-shadow: 0 20px 40px -28px rgba(4, 22, 16, 0.45);
  }

  .qr-card img {
    width: 96px;
    height: 96px;
  }

  .qr-card figcaption {
    max-width: 190px;
    color: #43605a;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .qr-card figcaption b {
    display: block;
    color: #0e2a22;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
  }
}

/* ---------- Microinteracciones con ratón (transform; la entrada usa translate) ---------- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature,
  .plan,
  .sign-list li,
  .store {
    transition:
      transform 0.35s var(--ease-out),
      box-shadow 0.35s ease,
      border-color 0.35s ease,
      opacity 0.8s var(--ease-out) var(--d, 0ms),
      translate 0.8s var(--ease-out) var(--d, 0ms);
  }

  .feature:hover,
  .plan:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--accent-fill) 40%, var(--line));
    box-shadow: var(--shadow-card), 0 34px 60px -38px rgba(4, 22, 16, 0.55);
  }

  .sign-list li:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent-fill) 40%, var(--line));
  }

  a.store[href]:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -16px rgba(0, 0, 0, 0.6);
  }

  .gen-grid img {
    transition: transform 1.2s var(--ease-out);
  }

  .gen-grid figure:hover img {
    transform: scale(1.04);
  }

  .feature:hover .peek .phone {
    transform: translateY(-12px) rotate(-1.5deg);
  }
}

/* La charla con Medi se escribe al entrar. */
.feature--medi.is-in .chat > * {
  animation: pop-in 0.55s 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.feature--medi.is-in .chat .me {
  transform-origin: 100% 100%;
  animation-delay: 0.2s;
}

.feature--medi.is-in .chat .medi {
  transform-origin: 0 100%;
  animation-delay: 0.85s;
}

/* ---------- Preguntas ---------- */
.faq-grid {
  display: grid;
  gap: 32px;
}

.faq-side h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 1.35rem + 2.8vw, 3.2rem);
  letter-spacing: -0.035em;
}

.faq-side p {
  margin-top: 14px;
  color: var(--muted);
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--accent);
  transition: rotate 0.3s var(--ease-out);
}

.faq details[open] summary .icon {
  rotate: 45deg;
}

.faq details p {
  padding: 0 4px 22px;
  color: var(--muted);
  max-width: 40em;
}

.faq details[open] p {
  animation: rise-in 0.45s var(--ease-out) both;
}

.faq summary {
  transition: color 0.2s ease;
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary .icon {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
}

@media (min-width: 900px) {
  .faq-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 64px;
  }
}

/* ---------- Pie ---------- */
.site-footer {
  margin-top: 40px;
  padding: 48px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-grid p {
  margin-top: 10px;
  max-width: 26em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
}

.footer-links a:hover {
  background: var(--accent-soft);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

/* ---------- Páginas de texto (legales, soporte, borrar cuenta) ---------- */
.doc {
  max-width: 760px;
  padding-top: 40px;
  padding-bottom: 56px;
}

/* En su propia línea: si no, un rótulo corto («Soporte») se sube junto a «Inicio». */
.back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.back:hover {
  color: var(--text);
}

.doc h1 {
  margin-top: 16px;
  font-size: clamp(2.3rem, 1.6rem + 3vw, 3.6rem);
  letter-spacing: -0.035em;
}

.doc .intro {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--muted);
}

.draft {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.draft .icon {
  margin-top: 0.1em;
}

.doc-sec {
  margin-top: 36px;
}

.doc-sec h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.doc-sec h2 .n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
}

.doc-sec p,
.doc-sec li {
  color: var(--muted);
}

.doc-sec p {
  margin-top: 12px;
}

.doc-sec strong {
  color: var(--text);
  font-weight: 600;
}

.doc-sec ul,
.doc-sec ol {
  margin: 12px 0 0;
  padding-left: 1.3em;
}

.doc-sec li + li {
  margin-top: 6px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0 !important;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 56px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.steps li + li {
  margin-top: 10px !important;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--text);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.path {
  font-weight: 600;
  color: var(--text);
}

.card {
  margin-top: 16px;
  padding: 22px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
}

.mail-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 1.2vw, 1.6rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---------- Invitación (/i/<CODIGO>) ---------- */
.invite {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-bottom: 72px;
  text-align: center;
}

.invite::before {
  content: '';
  position: absolute;
  inset: -10% -10% 0;
  z-index: -1;
  background:
    radial-gradient(45% 45% at 50% 20%, var(--glow-1), transparent 70%),
    radial-gradient(35% 40% at 100% 100%, var(--glow-2), transparent 72%);
}

.invite .wrap {
  max-width: 640px;
}

.invite-art {
  width: 150px;
  height: 150px;
  margin: 0 auto;
  animation: pop 0.7s var(--ease-out) both;
}

/* /descargar: el ícono de la app en lugar de la ilustración. */
.invite-art--icon {
  width: 104px;
  height: 104px;
  margin-bottom: 18px;
  border-radius: 26px;
  box-shadow: 0 24px 40px -20px rgba(4, 22, 16, 0.55);
}

.invite h1 {
  margin-top: 8px;
  font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.4rem);
  letter-spacing: -0.035em;
}

.invite .lead {
  margin-inline: auto;
}

.code-card {
  margin: 30px auto 0;
  padding: 26px 20px 22px;
  max-width: 460px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.code-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.code-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 1.6rem + 5vw, 3.6rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  word-spacing: 0.1em;
}

.code-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.copy-status {
  min-height: 1.5em;
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--accent);
}

.invite .steps {
  margin: 34px auto 0;
  max-width: 520px;
  text-align: left;
}

.invite .stores {
  justify-content: center;
}

.invite-empty {
  display: none;
}

.invite.is-empty .invite-empty {
  display: block;
}

.invite.is-empty .code-card,
.invite.is-empty .invite-filled {
  display: none;
}

/* ---------- 404 ---------- */
.notfound {
  /* Solo arriba y abajo: el margen lateral es el de .wrap (--gutter). */
  padding-block: 56px 80px;
  text-align: center;
}

.notfound img {
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.notfound h1 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 1.6rem + 2.8vw, 3.2rem);
}

.notfound p {
  margin-top: 12px;
  color: var(--muted);
}

.notfound .btn {
  margin-top: 24px;
}

/* ---------- Entrada al hacer scroll: js/site.js arma (is-armed) solo lo que está bajo la pantalla ---------- */
.js [data-reveal] {
  transition:
    opacity 0.8s var(--ease-out) var(--d, 0ms),
    translate 0.8s var(--ease-out) var(--d, 0ms);
}

.js [data-reveal].is-armed {
  opacity: 0;
  translate: 0 26px;
}

.js [data-reveal].is-in {
  opacity: 1;
  translate: none;
}

/* ---------- Animaciones ---------- */
@keyframes rise { from { opacity: 0; translate: 0 48px; } }
@keyframes rise-tilt { from { opacity: 0; translate: 0 64px; rotate: 0deg; } }
@keyframes rise-in { from { opacity: 0; translate: 0 16px; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.92); } }
@keyframes pop-in { from { opacity: 0; scale: 0.5; translate: 0 14px; } }
@keyframes float { 50% { translate: 0 -10px; } }
@keyframes bob { to { transform: translateY(-8px) rotate(-3deg); } }
@keyframes drift { to { transform: translate3d(-3%, 4%, 0) scale(1.06); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glass { to { background-position: -40% 0; } }

@keyframes blip {
  0% { stroke-dashoffset: 1; opacity: 0; }
  8%, 52% { opacity: 0.9; }
  60%, 100% { stroke-dashoffset: -0.05; opacity: 0; }
}

@keyframes sheen {
  0%, 72% { transform: translateX(-110%); }
  100% { transform: translateX(110%); }
}

@keyframes ping {
  0% { opacity: 0.7; transform: scale(0.6); }
  80%, 100% { opacity: 0; transform: scale(1.6); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js [data-reveal] {
    opacity: 1;
    translate: none;
  }

  .hero-beat path {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 380px) {
  :root {
    --gutter: 16px;
  }

  .stores:not(.stores--hero) .store {
    flex: 1 1 100%;
  }
}

@media print {
  .site-header,
  .site-footer,
  .theme-toggle {
    display: none;
  }
}
