/* CumpleRD — design tokens */
:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --ink: #0b1b33;
  --ink-2: #44546b;
  --ink-3: #6b7a90;
  --line: #e2e8f0;
  --brand: #0a3d62;
  --brand-2: #0f5a8f;
  --accent: #0fa97f;
  --accent-ink: #067a5a;
  --warn: #c2410c;
  --warn-bg: #fff4ec;
  --hero-from: #08263f;
  --hero-to: #0f5a8f;
  --shadow: 0 1px 2px rgba(11,27,51,.06), 0 8px 24px rgba(11,27,51,.06);
  --shadow-lg: 0 2px 4px rgba(11,27,51,.06), 0 24px 56px rgba(11,27,51,.14);
  --radius: 14px;
  --maxw: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220; --surface: #101b2e; --surface-2: #15233b;
    --ink: #eaf0f8; --ink-2: #aab8cc; --ink-3: #7f90a8; --line: #1f2f48;
    --brand: #6cb6ee; --brand-2: #3d9be0; --accent: #2dd4a4; --accent-ink: #2dd4a4;
    --warn: #fb923c; --warn-bg: #2a1a0f;
    --hero-from: #06101d; --hero-to: #0c3a5e;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 56px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --bg: #0a1220; --surface: #101b2e; --surface-2: #15233b;
  --ink: #eaf0f8; --ink-2: #aab8cc; --ink-3: #7f90a8; --line: #1f2f48;
  --brand: #6cb6ee; --brand-2: #3d9be0; --accent: #2dd4a4; --accent-ink: #2dd4a4;
  --warn: #fb923c; --warn-bg: #2a1a0f;
  --hero-from: #06101d; --hero-to: #0c3a5e;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section.alt { background: var(--surface-2); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 12px;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
}
.logo span em { font-style: normal; color: var(--accent-ink); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); text-decoration: none; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #04281e; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 68px; background: var(--surface);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 16px;
    border-bottom: 1px solid var(--line); display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; text-decoration: none !important;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04281e; box-shadow: 0 6px 18px rgba(15,169,127,.35); }
.btn-primary:hover { background: #12bd8e; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-light:hover { background: rgba(255,255,255,.2); }
.btn-sm { padding: 9px 16px; font-size: .92rem; border-radius: 10px; }

/* Hero */
.hero {
  background: radial-gradient(1200px 500px at 85% -10%, rgba(15,169,127,.35), transparent 60%),
              linear-gradient(160deg, var(--hero-from), var(--hero-to));
  color: #fff; padding: 84px 0 96px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(600px 400px at 70% 30%, #000, transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero .lead { color: rgba(255,255,255,.82); }
.hero h1 .hl { color: #5ef0c3; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); font-size: .85rem; font-weight: 500; margin-bottom: 22px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #5ef0c3; box-shadow: 0 0 0 4px rgba(94,240,195,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(94,240,195,0); } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: rgba(255,255,255,.75); }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: #5ef0c3; }

.countdown-card {
  background: var(--surface); color: var(--ink); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg);
}
.countdown-card .label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warn); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 18px; }
.cd-unit { background: var(--surface-2); border-radius: 12px; padding: 14px 6px; text-align: center; }
.cd-unit b { display: block; font-size: 2rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cd-unit small { color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.countdown-card p { color: var(--ink-2); font-size: .94rem; margin-bottom: 16px; }
.risk { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: .88rem; font-weight: 500; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 56px 0 64px; } }

/* Cards & grids */
.grid { display: grid; gap: 22px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .g3, .g2 { grid-template-columns: 1fr; } .section { padding: 60px 0; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink);
}
.card p { color: var(--ink-2); margin-bottom: 0; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); margin-bottom: 14px; }
.tag.good { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); }
.card ul { padding: 0; margin: 14px 0 0; list-style: none; }
.card li { padding-left: 26px; position: relative; color: var(--ink-2); margin-bottom: 8px; font-size: .95rem; }
.card li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 16px var(--accent);
}
.card li.no::before { box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 16px var(--ink-3); }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before {
  content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: var(--bg); font-weight: 800; margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: .94rem; margin: 0; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat b { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
.stat span { color: var(--ink-2); font-size: .92rem; }

/* FAQ */
.faq { max-width: 780px; margin: 40px auto 0; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 18px; margin: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); color: #fff; border-radius: 24px;
  padding: 56px 40px; text-align: center; box-shadow: var(--shadow-lg);
}
.cta-band .lead { color: rgba(255,255,255,.8); margin: 0 auto 26px; }
.signup { display: flex; gap: 10px; max-width: 520px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.signup input {
  flex: 1 1 260px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; font-size: 1rem; font-family: inherit;
}
.signup input::placeholder { color: rgba(255,255,255,.65); }
.form-note { font-size: .82rem; color: rgba(255,255,255,.7); margin-top: 12px; }
.form-ok { display: none; font-weight: 600; color: #5ef0c3; }

/* Page header */
.page-head { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 56px 0 44px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.crumbs { font-size: .88rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-3); }

/* Guide */
.guide-layout { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.toc h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.toc a { display: block; padding: 7px 0; color: var(--ink-2); font-size: .94rem; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.gstep { padding: 0 0 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.gstep:last-child { border: 0; }
.gstep h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.gstep h2 .n { display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--bg); font-size: 1rem; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; background: var(--surface); cursor: pointer; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--accent); }
.check span { color: var(--ink-2); }
.check input:checked + span { text-decoration: line-through; color: var(--ink-3); }
.callout { border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 18px 0; box-shadow: var(--shadow); }
.callout.warn { border-color: var(--warn); }
.callout p { margin: 0; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); border-radius: 12px; overflow: hidden; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }

/* Calculator */
.calc-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.result { position: sticky; top: 92px; }
.total { font-size: 2.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
.line-item { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.line-item small { display: block; color: var(--ink-3); }
.line-item b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-3); font-size: .85rem; }

/* Articles */
.article { max-width: 760px; margin: 0 auto; }
.article h2 { font-size: 1.55rem; margin-top: 2.2em; scroll-margin-top: 90px; }
.article h3 { margin-top: 1.6em; }
.article p, .article li { color: var(--ink-2); font-size: 1.04rem; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.article li { margin-bottom: .45em; }
.article strong { color: var(--ink); }
.meta { color: var(--ink-3); font-size: .88rem; margin-top: 10px; }
.sources { margin-top: 3em; padding-top: 1.4em; border-top: 1px solid var(--line); }
.sources h2 { font-size: 1.1rem; margin-top: 0; }
.sources li { font-size: .92rem; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 14px; }
@media (max-width: 800px) { .related { grid-template-columns: 1fr; } }
.related a.card { text-decoration: none; padding: 20px; }
.related a.card strong { display: block; color: var(--ink); margin-bottom: 4px; }
.related a.card span { color: var(--ink-2); font-size: .9rem; }

/* Chat de mensajes */
.cb { position: fixed; right: 20px; bottom: 20px; z-index: 80; font-family: inherit; }
.cb [hidden] { display: none !important; }
.cb-launcher {
  display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font: 600 .95rem/1 inherit; font-family: inherit;
  padding: 14px 20px; border-radius: 99px; color: #04281e; background: var(--accent); box-shadow: 0 10px 30px rgba(15,169,127,.45);
  transition: transform .15s;
}
.cb-launcher:hover { transform: translateY(-2px); }
.cb-open .cb-launcher { display: none; }
.cb-panel {
  width: min(380px, calc(100vw - 24px)); max-height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.cb-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; color: #fff; background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); }
.cb-title strong { display: block; font-size: 1rem; }
.cb-title small { opacity: .8; font-size: .78rem; }
.cb-close { background: rgba(255,255,255,.14); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 9px; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.cb-log { flex: 1; min-height: 120px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.cb-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: .94rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.cb-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.cb-user { align-self: flex-end; background: var(--brand); color: var(--bg); border-bottom-right-radius: 4px; }
.cb-compose { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.cb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cb-field span { display: block; font-size: .74rem; font-weight: 600; color: var(--ink-3); margin-bottom: 3px; }
.cb-text, .cb-input { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: .93rem; }
.cb-row { display: flex; gap: 8px; align-items: flex-end; }
.cb-input { resize: none; max-height: 110px; flex: 1; }
.cb-send { width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: var(--accent); color: #04281e; display: grid; place-items: center; cursor: pointer; }
.cb-send:disabled { opacity: .5; cursor: not-allowed; }
.cb-err { margin: 0; font-size: .82rem; color: var(--warn); }
.cb-wa { display: block; text-align: center; padding: 10px; font-size: .9rem; font-weight: 600; border-top: 1px solid var(--line); }
.cb-note { margin: 0; padding: 8px 14px 12px; font-size: .74rem; color: var(--ink-3); background: var(--surface); }
@media (max-width: 520px) {
  .cb { right: 12px; bottom: 12px; }
  .cb-launcher span { display: none; }
  .cb-launcher { padding: 14px; }
  .cb-fields { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--surface); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.foot-grid a { display: block; color: var(--ink-2); padding: 4px 0; font-size: .94rem; }
.disclaimer { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .82rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
