/* Llegamos · web. Mismos colores y letras que la app (src/theme/tokens.ts). Sin nada de fuera. */

@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/BricolageGrotesque_700Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('/fonts/BricolageGrotesque_800ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/Figtree_400Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/Figtree_500Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('/fonts/Figtree_600SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --bg: #F2F5F3;
  --surface: #FFFFFF;
  --surface-alt: #E7ECE9;
  --border: #D9E1DD;
  --hairline: #E4EAE7;
  --text: #13211C;
  --muted: #4F5E58;
  --faint: #5E6D67;
  --primary: #00805A;
  --primary-pressed: #006A4A;
  --primary-soft: #D9EFE6;
  --on-primary: #FFFFFF;
  --on-primary-soft: #006A4A;
  --partner: #8E44B8;
  --partner-soft: #F0E3F7;
  --warning: #92600A;
  --warning-soft: #F6EAD3;
  --shadow: 0 1px 2px rgba(11, 26, 20, .05), 0 8px 24px rgba(11, 26, 20, .06);
  --shadow-raised: 0 24px 60px rgba(11, 26, 20, .18);
  --radius: 18px;
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1311;
    --surface: #141D1A;
    --surface-alt: #1C2724;
    --border: #2A3632;
    --hairline: #212C29;
    --text: #E6EEEA;
    --muted: #9DADA7;
    --faint: #869690;
    --primary: #22A87C;
    --primary-pressed: #1C9169;
    --primary-soft: #123A2E;
    --on-primary: #04241A;
    --on-primary-soft: #3FC795;
    --partner: #AE76DB;
    --partner-soft: #2D1F3A;
    --warning: #E0A645;
    --warning-soft: #372A13;
    --shadow: none;
    --shadow-raised: 0 24px 60px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-pressed); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

/* ---------- Cabecera ---------- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--hairline); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 21px/1 var(--display); letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 16px; }
.nav a:hover { color: var(--text); }
@media (max-width: 760px) { .nav { display: none; } .top .btn { margin-left: auto; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; font: 600 16px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-pressed); color: var(--on-primary); }
.btn-ghost { background: var(--surface-alt); color: var(--text); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------- Portada ---------- */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero { padding-top: 40px; } .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 600; font-size: 14px; }
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.hero h1 { font-weight: 800; font-size: clamp(40px, 6.4vw, 68px); letter-spacing: -.035em; margin-top: 20px; }
.hero h1 span { color: var(--primary); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); margin-top: 20px; max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 18px; border-radius: 14px; background: var(--text); color: var(--bg); text-decoration: none; }
.store svg { width: 24px; height: 24px; fill: currentColor; }
.store small { display: block; font-size: 12px; opacity: .75; line-height: 1.2; }
.store strong { display: block; font: 600 17px/1.2 var(--body); }
.store[aria-disabled='true'] { cursor: default; }
.note { margin-top: 16px; font-size: 15px; color: var(--faint); }

/* ---------- El móvil de la portada ---------- */
.phone { justify-self: center; width: min(340px, 100%); aspect-ratio: 9 / 18.5; border-radius: 46px; padding: 12px; background: #0B1A14; box-shadow: var(--shadow-raised); position: relative; }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; width: 92px; height: 24px; margin-left: -46px; border-radius: 14px; background: #0B1A14; z-index: 2; }
.screen { height: 100%; border-radius: 35px; background: var(--bg); overflow: hidden; padding: 52px 16px 16px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.screen .hi { display: flex; align-items: center; gap: 10px; }
.screen .hi img { width: 30px; height: 30px; }
.screen .hi b { display: block; font: 600 16px/1.2 var(--body); }
.screen .hi small { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); }
.today { padding: 14px; }
.today .label { color: var(--muted); font-weight: 600; font-size: 13px; }
.today .figure { font: 800 46px/1 var(--display); letter-spacing: -.04em; margin: 4px 0 8px; display: flex; align-items: flex-start; gap: 2px; }
.today .figure sup { font: 700 20px/1 var(--display); margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: 12px; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-alt); margin-top: 12px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 46%; background: var(--primary); border-radius: 4px; }
.meter b { position: absolute; top: -2px; bottom: -2px; left: 52%; width: 2px; background: var(--text); }
.meter-cap { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }
.fake-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.fake-btn.primary { background: var(--primary); color: var(--on-primary); }
.fake-btn.second { background: var(--surface-alt); }
.goal { padding: 12px; display: grid; gap: 8px; }
.goal .row { display: flex; justify-content: space-between; align-items: center; }
.goal b { font-weight: 600; font-size: 14px; }
.goal small { color: var(--muted); }
.goal .bar { height: 7px; border-radius: 4px; background: var(--surface-alt); display: flex; overflow: hidden; }
.goal .bar i { background: var(--primary); width: 38%; }
.goal .bar em { background: var(--partner); width: 23%; }

/* ---------- Secciones ---------- */
section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: 19px; margin-top: 14px; }
.kicker { color: var(--primary); font-weight: 600; font-size: 15px; letter-spacing: .02em; margin-bottom: 10px; display: block; }

/* La cuenta del mes */
.equation { display: grid; grid-template-columns: repeat(4, 1fr) auto 1fr; gap: 12px; align-items: stretch; }
.eq { padding: 20px; }
.eq small { display: block; color: var(--muted); font-weight: 500; font-size: 15px; }
.eq strong { display: block; font: 700 26px/1.2 var(--display); margin-top: 6px; }
.eq.result { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.eq.result small { color: inherit; opacity: .85; }
.op { display: grid; place-items: center; font: 700 28px/1 var(--display); color: var(--faint); }
@media (max-width: 900px) { .equation { grid-template-columns: 1fr; } .op { padding: 0; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; counter-reset: paso; }
.step { padding: 24px; }
.step::before { counter-increment: paso; content: counter(paso); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--on-primary-soft); font-weight: 700; margin-bottom: 16px; }
.step h3 { font-size: 21px; }
.step p { color: var(--muted); margin-top: 8px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* Funciones */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 24px; }
.feature .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 20px; }
.feature p { color: var(--muted); margin-top: 8px; font-size: 16px; }
.tag { display: inline-block; margin-top: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-alt); color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* En pareja */
.couple { background: var(--surface); border-block: 1px solid var(--hairline); }
.couple .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .couple .wrap { grid-template-columns: 1fr; } }
.venn { position: relative; width: min(420px, 100%); aspect-ratio: 1.4; margin-inline: auto; }
.venn span { position: absolute; top: 0; width: 71%; aspect-ratio: 1; border-radius: 50%; display: grid; align-content: center; font-weight: 600; font-size: 16px; }
.venn .a { left: 0; background: color-mix(in srgb, var(--primary) 18%, transparent); border: 2px solid var(--primary); padding-left: 12%; justify-items: start; color: var(--primary); }
.venn .b { right: 0; background: color-mix(in srgb, var(--partner) 18%, transparent); border: 2px solid var(--partner); padding-right: 12%; justify-items: end; color: var(--partner); }
.venn .mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 18px/1.1 var(--display); text-align: center; }
.venn .mid small { display: block; font: 500 13px/1.3 var(--body); color: var(--muted); margin-top: 4px; }
.list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.list li::before { content: ''; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300805A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center / 13px no-repeat; }
.list b { display: block; font-weight: 600; }
.list span { color: var(--muted); }

/* Privacidad */
.privacy .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.privacy .item { padding: 24px; }
.privacy .item h3 { font-size: 19px; }
.privacy .item p { color: var(--muted); margin-top: 8px; font-size: 16px; }
@media (max-width: 900px) { .privacy .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .privacy .grid { grid-template-columns: 1fr; } }

/* Preguntas */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font: 600 18px/1.35 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 400 26px/1 var(--body); color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; max-width: 68ch; }

/* Final */
.cta { text-align: center; }
.cta .card { padding: 56px 24px; background: var(--primary); color: var(--on-primary); border: 0; }
.cta h2 { font-size: clamp(30px, 4vw, 46px); }
.cta p { margin: 14px auto 28px; max-width: 34em; opacity: .9; font-size: 19px; }
.cta .btn { background: var(--on-primary); color: var(--primary); }
.cta .btn:hover { opacity: .92; color: var(--primary); }

/* Pie */
footer { padding: 40px 0 56px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
footer a { color: var(--muted); }
@media (max-width: 600px) { footer nav { margin-left: 0; } }

/* ---------- Páginas legales ---------- */
.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; }
.legal .updated { color: var(--faint); margin-top: 12px; }
.legal h2 { font-size: 24px; margin: 44px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 10px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .summary { margin-top: 28px; padding: 20px 22px; border-radius: var(--radius); background: var(--primary-soft); color: var(--on-primary-soft); }
.legal .summary p { color: inherit; }
.todo { background: var(--warning-soft); color: var(--warning); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
th { background: var(--surface-alt); font-weight: 600; color: var(--text); }
td { color: var(--muted); background: var(--surface); }
tr:last-child td { border-bottom: 0; }

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 20px; }
.notfound h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; }
.notfound p { color: var(--muted); margin: 14px 0 28px; }

.couple-title { font-size: clamp(30px, 4vw, 44px); }
.more { margin-top: 28px; }

.tip { padding: 12px; display: grid; gap: 2px; }
.tip b { font-weight: 600; font-size: 14px; }
.tip small { color: var(--muted); }
.tabs { margin-top: auto; display: flex; justify-content: space-around; align-items: center; padding-top: 10px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 11px; font-weight: 500; }
.tabs .on { color: var(--primary); font-weight: 600; }
.tabs .plus { width: 38px; height: 38px; border-radius: 13px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 22px; }
