/* ─────────────────────────────────────────────────────────────────────────────
   planbum.com · la web pública
   Los dos estilos de la app: Black Mint (oscuro, por defecto) y Mediterranean
   Soul (claro: si el móvil está en modo claro o si se elige abajo). Mismos
   colores, radios y letras que frontend/src/theme/tokens.ts. El degradado
   menta → Klein va solo en el símbolo; los botones usan el acento del estilo.
   ───────────────────────────────────────────────────────────────────────────── */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fuentes/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('fuentes/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-display: swap; src: url('fuentes/inter-800.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('fuentes/jakarta-400.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('fuentes/jakarta-600.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('fuentes/jakarta-700.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('fuentes/jakarta-800.woff2') format('woff2'); }

/* ── Black Mint ── */
:root {
  color-scheme: dark;
  --bg: #0A0A0B;
  --surface: #151517;
  --surface2: #1E1E22;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #FFFFFF;
  --text2: #A1A1AA;
  --text3: #6E6E78;
  --accent: #2FE6A8;
  --accent-pressed: #21C892;
  --accent-soft: rgba(47, 230, 168, 0.14);
  --accent-text: #2FE6A8;
  --on-accent: #04130D;
  --gold: #FBBF24;
  --gold-soft: rgba(251, 191, 36, 0.12);
  --gold-line: rgba(251, 191, 36, 0.35);
  --glow: rgba(47, 230, 168, 0.20);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --header: rgba(10, 10, 11, 0.78);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-card: 24px;
  --r-button: 14px;
  --r-chip: 999px;
}

/* ── Mediterranean Soul ── */
@media (prefers-color-scheme: light) {
  :root:not([data-estilo='black-mint']) {
    color-scheme: light;
    --bg: #F3F6FA;
    --surface: #FFFFFF;
    --surface2: #ECF1F7;
    --line: rgba(14, 27, 44, 0.08);
    --line-strong: rgba(14, 27, 44, 0.16);
    --text: #0E1B2C;
    --text2: #526071;
    --text3: #8692A3;
    --accent: #2B3BFF;
    --accent-pressed: #1E2BD6;
    --accent-soft: rgba(43, 59, 255, 0.09);
    --accent-text: #2B3BFF;
    --on-accent: #FFFFFF;
    --gold: #B87F0D;
    --gold-soft: rgba(232, 163, 23, 0.12);
    --gold-line: rgba(232, 163, 23, 0.40);
    --glow: rgba(43, 59, 255, 0.10);
    --shadow: 0 30px 70px rgba(14, 27, 44, 0.18);
    --header: rgba(243, 246, 250, 0.82);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --r-card: 28px;
    --r-button: 999px;
  }
}
:root[data-estilo='mediterranean'] {
  color-scheme: light;
  --bg: #F3F6FA;
  --surface: #FFFFFF;
  --surface2: #ECF1F7;
  --line: rgba(14, 27, 44, 0.08);
  --line-strong: rgba(14, 27, 44, 0.16);
  --text: #0E1B2C;
  --text2: #526071;
  --text3: #8692A3;
  --accent: #2B3BFF;
  --accent-pressed: #1E2BD6;
  --accent-soft: rgba(43, 59, 255, 0.09);
  --accent-text: #2B3BFF;
  --on-accent: #FFFFFF;
  --gold: #B87F0D;
  --gold-soft: rgba(232, 163, 23, 0.12);
  --gold-line: rgba(232, 163, 23, 0.40);
  --glow: rgba(43, 59, 255, 0.10);
  --shadow: 0 30px 70px rgba(14, 27, 44, 0.18);
  --header: rgba(243, 246, 250, 0.82);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-card: 28px;
  --r-button: 999px;
}

/* Cada imagen viene en los dos estilos; se ve la del estilo activo. */
.claro { display: none !important; }
@media (prefers-color-scheme: light) {
  :root:not([data-estilo='black-mint']) .claro { display: block !important; }
  :root:not([data-estilo='black-mint']) .oscuro { display: none !important; }
}
:root[data-estilo='mediterranean'] .claro { display: block !important; }
:root[data-estilo='mediterranean'] .oscuro { display: none !important; }

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
/* El alto lo marca el CSS (aspect-ratio o 100 %), no el atributo height de la etiqueta. */
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
.envoltorio { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .envoltorio { padding: 0 32px; } }
.saltar { position: absolute; left: -9999px; top: 8px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); }
.saltar:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ── Marca: símbolo Núcleo + planbum ── */
.marca { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.marca svg { width: 32px; height: 32px; flex: none; }
.marca span { font-family: 'Plus Jakarta Sans', var(--font); font-weight: 700; font-size: 21px; letter-spacing: -0.035em; line-height: 1; }

/* ── Botones ── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-button);
  font: 600 16px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color 220ms ease-out, transform 220ms ease-out, border-color 220ms ease-out;
}
.boton svg { width: 18px; height: 18px; }
.boton:active { transform: scale(0.98); }
.boton-principal { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.boton-principal:hover { background: var(--accent-pressed); }
.boton-secundario { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.boton-secundario:hover { border-color: var(--text3); }
.boton-pequeno { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ── Cabecera ── */
.cabecera {
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease-out;
}
.cabecera.con-borde { border-bottom-color: var(--line); }
.cabecera .envoltorio { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.menu { display: none; gap: 28px; }
.menu a { text-decoration: none; color: var(--text2); font-size: 15px; font-weight: 600; transition: color 220ms ease-out; }
.menu a:hover { color: var(--text); }
.acciones { display: flex; align-items: center; gap: 6px; }
.acciones .entrar { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--text); padding: 10px 12px; }
@media (min-width: 900px) { .menu { display: flex; } }

/* ── Portada ── */
.portada { position: relative; overflow: hidden; padding: 40px 0 72px; }
.portada::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none;
}
.portada .envoltorio { position: relative; display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .portada { padding: 64px 0 96px; }
  .portada .envoltorio { grid-template-columns: 1.1fr 0.9fr; gap: 32px; }
}
.antetitulo {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  padding: 7px 12px; border-radius: var(--r-chip); background: var(--accent-soft); color: var(--accent-text);
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.antetitulo i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.portada h1 { font-size: clamp(44px, 9.5vw, 84px); letter-spacing: -0.045em; line-height: 0.98; }
.portada h1 em { font-style: normal; color: var(--accent-text); }
.entradilla { margin-top: 22px; max-width: 34em; font-size: clamp(17px, 2vw, 20px); color: var(--text2); }
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.nota { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; max-width: 30em; font-size: 14px; line-height: 1.45; color: var(--text3); }
.nota svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--text2); }

/* Móvil con captura */
.movil {
  position: relative; width: 270px; aspect-ratio: 390 / 844; flex: none;
  padding: 9px; border-radius: 46px; background: #0B0B0D;
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow);
}
.movil img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 38px; background: var(--surface); }
.escaparate { position: relative; display: flex; justify-content: center; padding: 0 0 24px; }
.escaparate .movil { width: min(300px, 74vw); }
.tarjeta-whatsapp {
  position: absolute; left: max(0px, calc(50% - 250px)); bottom: -6px; width: min(270px, 62vw);
  padding: 8px; border-radius: 16px; background: var(--surface); color: var(--text);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: rotate(-4deg);
}
.tarjeta-whatsapp img { width: 100%; border-radius: 10px; aspect-ratio: 1200 / 630; object-fit: cover; }
.tarjeta-whatsapp b { display: block; margin: 8px 4px 0; font-size: 13px; line-height: 1.3; }
.tarjeta-whatsapp small { display: block; margin: 2px 4px 4px; font-size: 12px; color: var(--text2); }
@media (min-width: 960px) { .tarjeta-whatsapp { left: -10px; bottom: 40px; } }

/* ── Secciones ── */
.seccion { padding: 64px 0; }
@media (min-width: 900px) { .seccion { padding: 96px 0; } }
.seccion + .seccion { border-top: 1px solid var(--line); }
.cabeza { max-width: 760px; margin-bottom: 44px; }
.cabeza.centrada { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }
.cabeza h2 { font-size: clamp(32px, 5.6vw, 54px); }
.cabeza p { margin-top: 16px; font-size: clamp(17px, 2vw, 19px); color: var(--text2); }

/* Tipos de plan */
.tipos { display: grid; gap: 16px; }
@media (min-width: 760px) { .tipos { grid-template-columns: repeat(3, 1fr); } }
.tipo { overflow: hidden; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.tipo .dibujo { aspect-ratio: 360 / 200; overflow: hidden; background: var(--surface2); }
.tipo .dibujo img { width: 100%; height: 100%; object-fit: cover; }
.tipo .texto { padding: 20px 22px 24px; }
.tipo h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 22px; letter-spacing: -0.02em; }
.tipo p { margin-top: 8px; color: var(--text2); font-size: 16px; }
.pronto { padding: 4px 9px; border-radius: 999px; background: rgba(255, 176, 32, 0.14); color: #FFB020; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
@media (prefers-color-scheme: light) { :root:not([data-estilo='black-mint']) .pronto { background: #FFF5E0; color: #B86E00; } }
:root[data-estilo='mediterranean'] .pronto { background: #FFF5E0; color: #B86E00; }
.escenarios { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 28px; color: var(--text2); font-size: 15px; }
.escenarios ul { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.escenarios li { width: 64px; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); }
.escenarios li img { width: 100%; aspect-ratio: 360 / 200; object-fit: cover; }

/* Cómo funciona */
.pasos { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: paso; }
@media (min-width: 720px) { .pasos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .pasos { grid-template-columns: repeat(4, 1fr); } }
.paso { position: relative; padding: 26px 22px 24px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); counter-increment: paso; }
.paso::before { content: counter(paso); position: absolute; top: 20px; right: 22px; font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--line-strong); }
.icono { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.icono svg { width: 22px; height: 22px; }
.paso h3 { margin-top: 18px; font-size: 20px; letter-spacing: -0.02em; }
.paso p { margin-top: 8px; font-size: 15.5px; color: var(--text2); }

/* Funciones con captura */
.funcion { display: grid; gap: 36px; align-items: center; padding: 48px 0; }
.funcion:first-child { padding-top: 0; }
.funcion:last-child { padding-bottom: 0; }
.funcion + .funcion { border-top: 1px solid var(--line); }
.funcion .movil { margin: 0 auto; }
@media (min-width: 900px) {
  .funcion { grid-template-columns: 1fr 1fr; gap: 64px; padding: 72px 0; }
  .funcion:first-child { padding-top: 0; }
  .funcion:last-child { padding-bottom: 0; }
  .funcion.al-reves .figura { order: -1; }
}
.funcion .figura { position: relative; display: flex; justify-content: center; }
.funcion .figura::before { content: ''; position: absolute; inset: 10% 5%; background: radial-gradient(closest-side, var(--glow), transparent); }
.funcion h3 { font-size: clamp(28px, 4.4vw, 42px); }
.funcion p { margin-top: 16px; font-size: 18px; color: var(--text2); max-width: 30em; }
.lista { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.lista li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 600; }
.lista svg { width: 22px; height: 22px; flex: none; padding: 4px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }

/* Despedidas (el dorado es de la despedida, quien organiza y los logros) */
.despedidas { position: relative; overflow: hidden; }
.despedidas .kicker { color: var(--gold); }
.despedidas .icono { background: var(--gold-soft); color: var(--gold); }
.honor { display: grid; gap: 40px; align-items: center; margin-bottom: 56px; }
@media (min-width: 960px) { .honor { grid-template-columns: 1.15fr 0.85fr; gap: 56px; } }
.honor .tarjeta { border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1px var(--gold-line), var(--shadow); }
.honor .tarjeta img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.honor figcaption { margin-top: 14px; font-size: 14px; color: var(--text3); }
.parejas { display: flex; justify-content: center; gap: 14px; }
.parejas .movil { width: min(220px, 43vw); padding: 7px; border-radius: 36px; }
.parejas .movil img { border-radius: 30px; }
.parejas .movil:last-child { margin-top: 48px; }
.rejilla { display: grid; gap: 14px; }
@media (min-width: 640px) { .rejilla { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .rejilla { grid-template-columns: repeat(3, 1fr); } }
.pieza { padding: 24px 22px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.pieza h3 { margin-top: 16px; font-size: 19px; letter-spacing: -0.02em; }
.pieza p { margin-top: 6px; font-size: 15.5px; color: var(--text2); }

/* Dos estilos */
.estilos .pareja { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.estilos figure { margin: 0; text-align: center; }
.estilos figure .movil { width: min(260px, 42vw); padding: 8px; border-radius: 40px; }
.estilos figure .movil img { border-radius: 33px; }
.estilos figcaption { margin-top: 18px; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.estilos figcaption small { display: block; margin-top: 2px; font-weight: 400; font-size: 14px; color: var(--text2); }
.selector { display: inline-flex; gap: 4px; margin-top: 26px; padding: 4px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); }
.selector button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent;
  color: var(--text2); font: 600 14px/1 var(--font); cursor: pointer; transition: background-color 220ms ease-out, color 220ms ease-out;
}
.selector button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 0 0 1px var(--line); }
.selector i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; vertical-align: -1px; }

/* Preguntas */
.preguntas { display: grid; gap: 12px; max-width: 820px; margin: 0 auto; }
.preguntas details { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.preguntas summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; cursor: pointer; list-style: none; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary svg { width: 20px; height: 20px; flex: none; color: var(--text3); transition: transform 220ms ease-out; }
.preguntas details[open] summary svg { transform: rotate(45deg); }
.preguntas details p { padding: 0 22px 22px; color: var(--text2); font-size: 16px; }

/* Cierre: el texto arriba y la escena del barco debajo, a todo el ancho */
.cierre { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cierre .envoltorio { position: relative; padding-top: 80px; padding-bottom: 8px; text-align: center; }
.cierre .simbolo { width: 72px; height: 72px; margin: 0 auto 22px; }
.cierre h2 { font-size: clamp(34px, 6vw, 60px); }
.cierre p { margin: 16px auto 0; max-width: 30em; color: var(--text2); font-size: 18px; }
.cierre .botones { justify-content: center; }
.cierre .fondo { position: relative; height: 240px; }
.cierre .fondo img { width: 100%; height: 100%; object-fit: cover; object-position: 74% 100%; }
.cierre .fondo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, transparent 45%); }
@media (min-width: 900px) { .cierre .fondo { height: 380px; } }

/* Pie */
.pie { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text2); }
.pie .envoltorio { display: grid; gap: 24px; }
@media (min-width: 760px) { .pie .envoltorio { grid-template-columns: 1fr auto; align-items: center; } }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pie nav a { text-decoration: none; }
.pie nav a:hover { color: var(--text); }
.pie .lema { margin-top: 8px; color: var(--text3); }

/* Entrada suave (FadeIn de la app: 320 ms, 8 px). web.js solo oculta lo que aún
   no se ve; sin JS o con "reducir movimiento", todo visible desde el principio. */
[data-aparece] { transition: opacity 320ms ease-out, transform 320ms ease-out; }
[data-aparece].oculto { opacity: 0; transform: translateY(8px); }
@media (prefers-reduced-motion: reduce) { [data-aparece] { transition: none; } }
.sprite { position: absolute; }
.punto-menta { background: #2FE6A8; }
.punto-klein { background: #2B3BFF; }
.tipo .dibujo picture, .cierre .fondo picture { display: block; height: 100%; }
