/* Celestina Soluciones — sitio público. Sin dependencias externas. */
:root {
  --paper: #faf8f3;
  --paper-2: #f1ede3;
  --ink: #14161f;
  --muted: #545a6b;
  --line: #dcd7c9;
  --navy: #1a237e;
  --navy-dark: #0f1547;
  --accent: #ff6f00;
  --accent-text: #a94100;
  --ok: #2e7d32;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 84px; }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

/* Tipografía */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.2rem; color: #2b2f3c; max-width: 60ch; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand-mark { width: 34px; height: 34px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--sans); font-size: .85rem; font-weight: 800; border-radius: 6px; letter-spacing: .02em; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; padding: 10px 0; display: inline-block; }
.nav a.btn { padding: 9px 16px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-text); }
.menu-toggle { display: none; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 16px; min-height: 44px; font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.menu-toggle:active, .menu-toggle[aria-expanded="true"] { background: var(--paper-2); }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 22px; border-radius: 6px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; transition: transform .12s ease, background .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--ink); }
.btn.primary:hover { background: #ff8a2e; color: var(--ink); }
.btn.secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.secondary:hover { background: var(--navy); color: #fff; }
.btn.light { background: #fff; color: var(--navy-dark); }
.btn.light:hover { background: var(--paper-2); color: var(--navy-dark); }
.btn.small { padding: 9px 16px; font-size: .92rem; }
.btn svg { width: 19px; height: 19px; fill: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Hero */
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: start; }
.hero h1 { max-width: 16ch; }
.hero.page-hero h1 { max-width: 22ch; font-size: clamp(2rem, 4.4vw, 2.9rem); }
.facts { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 22px; margin: 0; list-style: none; }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.facts li:last-child { border-bottom: 0; }
.facts strong { font-family: var(--serif); font-size: 1.05rem; }
.facts span { color: var(--muted); font-size: .92rem; }
.trust-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.trust-bar ul { list-style: none; margin: 0; padding: 16px 0; display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: .92rem; font-weight: 600; }
.trust-bar li::before { content: "✓ "; color: var(--ok); font-weight: 800; }

/* Secciones */
.section { padding: 72px 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--navy-dark); color: #e9ebf7; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark .eyebrow { color: #ffb067; }
.section.dark a { color: #ffd0a1; }
.section-head { max-width: 760px; margin-bottom: 38px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.section.dark .section-head p { color: #c4c9e6; }
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; }
.card h3 { margin-bottom: .45em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); background: #e8eaf8; padding: 3px 9px; border-radius: 4px; margin-bottom: 12px; }
.card.link { display: flex; flex-direction: column; }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 700; }
a.card { color: inherit; text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
a.card:hover { border-color: var(--navy); transform: translateY(-2px); color: inherit; }
a.card .more { color: var(--navy); }
.card.dark { background: #171e5c; border-color: #2b3380; color: #dfe2f6; }

.problem { border-left: 4px solid var(--accent); background: #fff; padding: 16px 20px; border-radius: 0 8px 8px 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 500; }

.checks { list-style: none; padding: 0; margin: 0 0 1.1em; }
.checks li { position: relative; padding: 7px 0 7px 28px; }
.checks li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 10px; height: 10px; background: var(--accent); border-radius: 2px; }

/* Método */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps li { counter-increment: s; border-top: 3px solid var(--accent); padding-top: 14px; }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: #ffb067; line-height: 1; margin-bottom: 8px; }
.steps h3 { font-size: 1.05rem; margin-bottom: .35em; }
.steps p { font-size: .94rem; color: #c4c9e6; margin: 0; }
.principle { margin-top: 36px; padding: 22px 26px; border: 1px solid #3a43a0; border-radius: 8px; background: #171e5c; font-size: 1.08rem; }
.principle strong { color: #fff; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--paper-2); font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.hl, th.hl { background: #fff4e8; }
td:first-child { font-weight: 600; }

/* Chips de sistemas */
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 18px; }
.chips li { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 600; font-size: .96rem; }
.chips li.main { border-color: var(--navy); color: var(--navy); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 30px 28px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.timeline .when { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); }
.timeline h3 { margin: 2px 0 2px; font-size: 1.15rem; }
.timeline .where { color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
.timeline p { margin-bottom: .5em; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 700; 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-text); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 22px 18px; color: #2b2f3c; }
.faq details > div p:last-child { margin-bottom: 0; }

/* CTA final */
.cta-final { background: var(--navy); color: #fff; padding: 72px 0; }
.cta-final h2 { color: #fff; max-width: 20ch; }
.cta-final p { color: #d6daf3; max-width: 56ch; }
.cta-final .contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 6px; }
.cta-final .contact-list a { color: #ffd0a1; }

/* Footer */
.site-footer { background: var(--ink); color: #b9bccb; padding: 44px 0 90px; font-size: .94rem; }
.site-footer a { color: #e5e7f0; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h2 { font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer .legal { margin-top: 30px; padding-top: 18px; border-top: 1px solid #2c2f3d; font-size: .84rem; }

/* Breadcrumb */
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }

/* Contenido largo (subpáginas) */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 18px; bottom: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: calc(18px + env(safe-area-inset-right, 0px)); z-index: 60; background: #25d366; color: #0b2e13; font-weight: 800; padding: 13px 18px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: .95rem; }
.wa-float:hover { color: #0b2e13; background: #3fe07c; }
.wa-float svg { width: 22px; height: 22px; fill: currentColor; }

/* Responsive */
@media (max-width: 920px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 28px; }
  .grid.c3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 22px 20px; flex-direction: column; align-items: flex-start; gap: 0; max-height: calc(100vh - 66px); max-height: calc(100dvh - 66px); overflow-y: auto; }
  .nav a { padding: 13px 0; min-width: 44px; }
  .nav a.btn { margin-top: 10px; padding: 13px 20px; }
  .nav.open { display: flex; }
}
@media (max-width: 620px) {
  .grid.c2, .grid.c3, .steps { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 40px 0 32px; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
}
@media (max-width: 620px) {
  table { font-size: .88rem; }
  th, td { padding: 10px 9px; overflow-wrap: anywhere; hyphens: auto; }
  .table-wrap.wide table { min-width: 600px; }
  .table-wrap.wide { position: relative; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
@media print {
  .site-header, .wa-float, .cta-final { display: none; }
}
