/* =========================================================
   CAT Consultant — hoja de estilos compartida
   Matriz + subsitios (Académico, Emprende, Estate)
   ========================================================= */

:root {
  /* Marca (extraída del logo) */
  --navy: #00113c;
  --navy-2: #0a1f5c;
  --blue: #0062f9;
  --orange: #ff9f00;
  --orange-soft: #ffb53d;

  /* Neutros */
  --ink: #0b1430;
  --text: #3b4560;
  --muted: #6b7591;
  --line: #e4e8f2;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, .86);
  --media-bg: linear-gradient(135deg, #cfe9e4, #e9eefb);
  --ok-bg: #e8f7ee;   --ok-fg: #14532d;
  --warn-bg: #fff4e0; --warn-fg: #7a4a00;
  --bad-bg: #fdecec;  --bad-fg: #7f1d1d;
  --info-bg: #eaf1ff; --info-fg: #0b2d6b;
  --flag: #b45309;
  color-scheme: light;

  /* Acento por defecto (se sobreescribe por rama) */
  --accent: var(--blue);
  --accent-2: var(--orange);
  --accent-ink: #ffffff;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 17, 60, .18);
  --shadow-lg: 0 30px 60px -20px rgba(0, 17, 60, .35);
  --max: 1180px;

  --font-head: "Lexend", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

/* Acento por rama */
body[data-branch="academico"] { --accent: var(--orange); --accent-2: var(--blue); --accent-ink: var(--navy); }
body[data-branch="emprende"]  { --accent: var(--blue);   --accent-2: var(--orange); }
body[data-branch="estate"]    { --accent: #0e8f7e;       --accent-2: var(--orange); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy); color: #c9d2ea; }
.section--dark h2, .section--dark h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
body[data-branch="academico"] .eyebrow { color: #d98200; }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head.center .eyebrow::before { display: none; }
.lead { font-size: 1.12rem; color: var(--muted); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -10px var(--accent); }
.btn--wa { background: #25d366; color: #fff; box-shadow: 0 10px 24px -10px #25d366; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #ffffff; color: var(--navy); }
.btn--outline-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--outline-light:hover { border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,17,60,.4); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 62px; width: auto; }
@media (max-width: 600px) { .brand-logo { height: 42px; } }
.brand svg { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: var(--navy); letter-spacing: -.01em; }
.brand-sub { font-family: var(--font-head); font-weight: 600; font-size: .62rem; letter-spacing: .14em; color: var(--orange); text-transform: uppercase; margin-top: 4px; }
body[data-branch="emprende"] .brand-sub { color: var(--blue); }
body[data-branch="estate"] .brand-sub { color: #0e8f7e; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--ink); transition: background .2s; }
.nav a:hover { background: var(--bg-soft); }
.nav .btn { padding: 10px 20px; font-size: .92rem; margin-left: 8px; }
.nav .btn:hover { background: #25d366; }

.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; border-radius: 10px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; transition: transform .25s, opacity .25s; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Barra superior de unidades (cross-navigation) */
.topbar { background: var(--navy); color: #aab6d6; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.topbar a { color: #dbe3f7; opacity: .8; transition: opacity .2s; }
.topbar a:hover, .topbar a.active { opacity: 1; color: #fff; }
.topbar a.active { font-weight: 600; }
.topbar .units { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.topbar .units::-webkit-scrollbar { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 96px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -20% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -40% -20%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero p.lead { max-width: 560px; margin-bottom: 30px; }
.hero h1 .hl { color: var(--accent); }
body[data-branch="academico"] .hero h1 .hl { color: #e68a00; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 36px; }
.hero-badges div { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--muted); }
.hero-badges strong { font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); }

.hero-visual { position: relative; }
.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 28px;
}
.float-chip {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 500; color: var(--ink);
  animation: float 6s ease-in-out infinite;
}
.float-chip .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.float-chip .dot svg { width: 18px; height: 18px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Tarjetas de unidades (matriz) ---------- */
.units-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.unit-card {
  --c: var(--blue);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.unit-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.unit-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.unit-card .icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--c); margin-bottom: 22px; }
.unit-card .icon svg { width: 30px; height: 30px; }
.unit-card .tag { font-family: var(--font-head); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c); margin-bottom: 6px; }
.unit-card h3 { font-size: 1.5rem; }
.unit-card ul { list-style: none; padding: 0; margin: 4px 0 28px; display: grid; gap: 8px; }
.unit-card li { display: flex; gap: 10px; font-size: .95rem; }
.unit-card li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: color-mix(in srgb, var(--c) 15%, #ffffff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300113c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; }
.unit-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; color: var(--c); }
.unit-card .more svg { width: 18px; height: 18px; transition: transform .2s; }
.unit-card:hover .more svg { transform: translateX(4px); }
.unit-card.u-acad { --c: #f29100; }
.unit-card.u-emp { --c: var(--blue); }
.unit-card.u-est { --c: #0e8f7e; }

/* ---------- Grillas de servicios ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
body[data-branch="academico"] .card .ic { color: #d98200; }
.card .ic svg { width: 26px; height: 26px; }
.card p { font-size: .95rem; margin-bottom: 14px; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; font-size: .78rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); }
.card .link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--accent); margin-top: 6px; }
body[data-branch="academico"] .card .link { color: #d98200; }
.card.featured { background: var(--navy); border-color: var(--navy); color: #c9d2ea; }
.card.featured h3 { color: #fff; }
.card.featured .ic { background: rgba(255,255,255,.1); color: var(--orange); }
.card.featured .chip { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.15); }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.section:not(.section--dark) .step { background: var(--surface); border-color: var(--line); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-head); font-weight: 700; font-size: 2.2rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--orange); display: block; margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; }
.step p { font-size: .93rem; margin: 0; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 26px 10px; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--ink); line-height: 1.1; }
.section--dark .stat strong { color: #fff; }
.stat strong span { color: var(--orange); }
.stat small { font-size: .92rem; color: var(--muted); }
.section--dark .stat small { color: #9fb0d8; }

.stats--text strong { font-size: 1.4rem; margin-bottom: 6px; }

/* ---------- Mini-lista de unidades (hero matriz) ---------- */
.unit-row { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.unit-row + .unit-row { margin-top: 12px; }
.unit-row:hover { transform: translateX(4px); border-color: var(--c); }
.unit-row .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.unit-row .ic svg { width: 24px; height: 24px; }
.unit-row strong { display: block; font-family: var(--font-head); color: var(--ink); }
.unit-row small { color: var(--muted); }
.unit-row > svg { width: 18px; height: 18px; margin-left: auto; color: var(--muted); flex: none; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 22px 0 30px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; }
.checklist li .ck { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
body[data-branch="academico"] .checklist li .ck { color: #d98200; }
.checklist li .ck svg { width: 15px; height: 15px; }
.checklist strong { color: var(--ink); display: block; font-family: var(--font-head); font-weight: 600; }
.checklist span { font-size: .94rem; }

/* ---------- Herramientas / lista de enlaces ---------- */
.tool-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 500; color: var(--ink); font-size: .94rem; transition: border-color .2s, transform .2s;
}
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
body[data-branch="academico"] .tool svg { color: #d98200; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-family: var(--font-head); font-weight: 600; color: var(--ink); 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); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; margin: 0; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: 28px; padding: 64px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #c9d2ea;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.cta::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,159,0,.35), transparent);
}
.cta h2 { color: #fff; }
.cta .btn-row { justify-content: flex-end; position: relative; z-index: 1; }

/* ---------- Formulario ---------- */
.form { display: grid; gap: 14px; }
.form > *, .results > * { min-width: 0; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--ink); }
.form input, .form select, .form textarea {
  font: inherit; color: var(--ink); padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.form textarea { min-height: 110px; resize: vertical; }
.form small { color: var(--muted); }

/* ---------- Propiedades (Estate) ---------- */
.prop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; display: flex; flex-direction: column; }
.prop:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.prop-media { position: relative; aspect-ratio: 4/3; background: var(--media-bg); display: grid; place-items: center; color: rgba(0,17,60,.25); }
.prop-media svg { width: 70px; height: 70px; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; }
.prop-badge { position: absolute; top: 14px; left: 14px; background: #ffffff; color: var(--navy); font-size: .75rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; }
.prop-badge.op { left: auto; right: 14px; background: var(--accent); color: #fff; }
.prop-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.prop-price { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.prop-loc { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.prop-feats { display: flex; gap: 16px; font-size: .86rem; color: var(--text); border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }
.prop-feats span { display: inline-flex; align-items: center; gap: 6px; }
.prop-feats svg { width: 16px; height: 16px; color: var(--accent); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-bar button { font: inherit; font-size: .9rem; font-weight: 500; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: all .2s; }
.filter-bar button.active, .filter-bar button:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.search-box { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 10px; display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; border: 1px solid var(--line); }
.search-box select { font: inherit; border: 0; background: var(--bg-soft); border-radius: 12px; padding: 14px; color: var(--ink); }

.notice { font-size: .85rem; padding: 10px 14px; border-radius: 10px; background: #fff7e6; border: 1px dashed #f0c46c; color: #7a5200; margin-bottom: 24px; }

/* ---------- Aliados ---------- */
.partners { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.partner { background: #ffffff; border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.partner img { height: 110px; width: auto; object-fit: contain; }
.partner small { color: #6b7591; }
.partner strong { color: #0b1430; font-family: var(--font-head); }

/* ---------- Proyecto / portafolio ---------- */
.project { display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.project + .project { margin-top: 28px; }
.project-media { position: relative; min-height: 320px; background: var(--media-bg); display: grid; place-items: center; color: rgba(0,17,60,.25); }
.project-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-media > svg { width: 80px; height: 80px; }
.project-media .partner-tag { position: absolute; left: 16px; bottom: 16px; background: #ffffff; border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow); }
.project-media .partner-tag img { height: 44px; width: auto; }
.project-body { padding: 34px; display: flex; flex-direction: column; }
.project-body .prop-loc { margin-bottom: 18px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0 0 22px; }
.fact { background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; }
.fact small { display: block; color: var(--muted); font-size: .78rem; }
.fact strong { color: var(--ink); font-family: var(--font-head); font-size: .98rem; }
.project-body .btn-row { margin-top: auto; }
.fine { font-size: .78rem; color: var(--muted); margin: 14px 0 0; }

.work { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.work:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-shot { aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s; }
.work:hover .work-shot img { transform: scale(1.03); }
.work-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.work-body p { font-size: .95rem; }
.work-body .link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue); }
.work-body .link svg { width: 16px; height: 16px; }

/* =========================================================
   Subpáginas (herramientas, blog, legales)
   ========================================================= */
.page-hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--bg-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-hero .lead { max-width: 760px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: .5; }

/* Herramientas */
.tool-app { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
.tool-app.wide { grid-template-columns: 1fr; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.15rem; margin-bottom: 16px; }
.form textarea.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }
.form .hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.form .check input { width: auto; }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.fs legend { font-size: .88rem; font-weight: 500; color: var(--ink); padding: 0; margin-bottom: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { display: block; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--ink); transition: all .15s; }
.seg input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn-row.tight { gap: 10px; }

.results { display: grid; gap: 18px; }
.results:empty::before {
  content: "Los resultados aparecerán aquí."; display: grid; place-items: center; min-height: 220px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: .95rem;
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--bg-soft); border-radius: 14px; padding: 16px; }
.kpi small { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 2px; }
.kpi strong { font-family: var(--font-head); font-size: 1.55rem; color: var(--ink); line-height: 1.2; }
.kpi.main { background: var(--navy); }
.kpi.main small { color: #9fb0d8; }
.kpi.main strong { color: #fff; }
.verdict { border-radius: 14px; padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.verdict svg { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.verdict strong { color: inherit; }
.verdict.ok { background: var(--ok-bg); color: var(--ok-fg); }
.verdict.warn { background: var(--warn-bg); color: var(--warn-fg); }
.verdict.bad { background: var(--bad-bg); color: var(--bad-fg); }
.verdict.info { background: var(--info-bg); color: var(--info-fg); }
.alert { border-radius: 12px; padding: 12px 14px; font-size: .9rem; background: var(--bad-bg); color: var(--bad-fg); }
.apa { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 12px 14px; font-size: .92rem; }
.apa small { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.data-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.data-table th, .data-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.data-table th { background: var(--bg-soft); color: var(--ink); font-weight: 600; font-family: var(--font-head); font-size: .82rem; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.flag { color: var(--flag); font-weight: 600; }
.data-table input { width: 72px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line); font: inherit; text-align: right; }
.data-table input.lbl { width: 110px; text-align: left; }
.chart { width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.chart text { font-family: var(--font-body); font-size: 11px; fill: var(--muted); }
.chart .gl { stroke: var(--line); }
.chart .gl2 { stroke: var(--line); stroke-opacity: .5; }
.chart text.axl { fill: var(--text); font-weight: 600; }
.charts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.formula { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: nowrap; }
.sub-h { font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1rem; margin: 4px 0 -6px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-grid .card h3 { font-size: 1.05rem; }
.info-grid .card ul { padding-left: 18px; margin: 0; font-size: .95rem; }
.info-grid .card li + li { margin-top: 6px; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; display: flex; gap: 12px; font-size: .95rem; }
.steps-list li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--navy); font-weight: 700; font-size: .8rem; display: grid; place-items: center; margin-top: 1px; }

.tool-card { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tool-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: #d98200; flex: none; }
.tool-card .ic svg { width: 24px; height: 24px; }
.tool-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.tool-card p { font-size: .9rem; margin: 0; color: var(--muted); }

.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video button { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #000 center/cover no-repeat; }
.video button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; transform: translate(-50%, -50%); border-radius: 14px; background: #ff0000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/26px no-repeat; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Artículos */
.article { max-width: 780px; margin: 0 auto; font-size: 1.04rem; overflow-wrap: anywhere; }
.article h2 { font-size: 1.55rem; margin-top: 1.8em; }
.article h3 { font-size: 1.15rem; margin-top: 1.4em; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 22px; }
.article li + li { margin-top: 6px; }
.article figure { margin: 24px 0; }
.article figure img { border-radius: 14px; border: 1px solid var(--line); margin: 0 auto; }
.article figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }
.article .callout { background: var(--bg-soft); border-left: 4px solid var(--orange); border-radius: 10px; padding: 16px 18px; margin: 22px 0; }
.article .callout p:last-child { margin: 0; }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.mini-card h4 { font-size: 1rem; margin-bottom: 6px; }
.mini-card p { font-size: .94rem; margin: 0; }
.mini-card .ex { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .92rem; }
.ref { padding-left: 2.2em; text-indent: -2.2em; }
.meta-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 18px 0; padding: 0; list-style: none; }
.meta-list li { background: var(--bg-soft); border-radius: 12px; padding: 12px 14px; font-weight: 500; color: var(--ink); font-size: .93rem; margin: 0 !important; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 26px; }
.compare div { border-radius: 12px; padding: 14px 16px; font-size: .94rem; }
.compare .before { background: var(--bad-bg); }
.compare .after { background: var(--ok-bg); }
.compare small { display: block; font-weight: 700; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; color: var(--ink); }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card .tag { font-family: var(--font-head); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #d98200; margin-bottom: 8px; }
.post-card p { font-size: .94rem; color: var(--muted); }
.post-card .link { margin-top: auto; font-weight: 600; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.post-card .link svg { width: 16px; height: 16px; }
.legal { max-width: 820px; margin: 0 auto; }
.legal ol { list-style: none; padding: 0; counter-reset: t; display: grid; gap: 14px; }
.legal li { counter-increment: t; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px 20px 64px; position: relative; }
.legal li::before { content: counter(t); position: absolute; left: 20px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.legal li h3 { font-size: 1.05rem; margin-bottom: 6px; }
.legal li p { margin: 0 0 6px; }
.legal li p:last-child { margin: 0; }
.ebook { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: center; }
.ebook img { border-radius: 10px; box-shadow: var(--shadow-lg); }
@media (max-width: 900px) {
  .tool-app, .info-grid, .ebook { grid-template-columns: minmax(0, 1fr); }
  .ebook img { max-width: 220px; }
}
@media (max-width: 600px) {
  .charts-2, .cards-2, .compare { grid-template-columns: 1fr; }
  .panel { padding: 20px; }
  .legal li { padding: 18px 18px 18px 58px; }
}
@media print {
  .topbar, .header, .footer, .wa-float, .no-print, .page-hero .btn-row { display: none !important; }
  .tool-app { grid-template-columns: 1fr; }
  .panel { box-shadow: none; }
}

/* ---------- Modo nocturno ---------- */
:root[data-theme="dark"] {
  --ink: #eef2fb;
  --text: #c3cbe0;
  --muted: #8f9bbd;
  --line: #243052;
  --bg: #0a1022;
  --bg-soft: #0f1731;
  --surface: #131c38;
  --header-bg: rgba(10, 16, 34, .86);
  --media-bg: linear-gradient(135deg, #12332f, #18213f);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
  --ok-bg: #0f2e1d;   --ok-fg: #a7e9c0;
  --warn-bg: #33250a; --warn-fg: #ffd58a;
  --bad-bg: #3a1518;  --bad-fg: #ffb4b4;
  --info-bg: #10224a; --info-fg: #b9d0ff;
  --flag: #ffb35c;
  color-scheme: dark;
}
:root[data-theme="dark"] .section--dark,
:root[data-theme="dark"] .card.featured,
:root[data-theme="dark"] .kpi.main { background: #061233; border-color: #1c2a55; }
:root[data-theme="dark"] .footer { background: #050a1a; }
:root[data-theme="dark"] .seg input:checked + span,
:root[data-theme="dark"] .legal li::before { background: var(--blue); border-color: var(--blue); }
:root[data-theme="dark"] .hero-card img,
:root[data-theme="dark"] .article figure img,
:root[data-theme="dark"] .work-shot img { filter: brightness(.92); }
:root[data-theme="dark"] .partner { box-shadow: none; }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }

/* Botón de tema */
.theme-toggle {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; flex: none; transition: border-color .2s, transform .2s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
html { transition: background-color .2s; }

/* ---------- Comunidad de WhatsApp ---------- */
.community { padding: 48px 0 72px; background: var(--bg); }
.community-box {
  display: flex; align-items: center; gap: 22px; padding: 26px 30px; border-radius: 22px;
  background: color-mix(in srgb, #25d366 9%, var(--surface)); border: 1px solid color-mix(in srgb, #25d366 35%, var(--line));
}
.community-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #25d366; color: #fff; flex: none; }
.community-ic svg { width: 28px; height: 28px; }
.community-text { flex: 1; min-width: 0; }
.community-text h2 { font-size: 1.3rem; margin-bottom: 4px; }
.community-text p { margin: 0; color: var(--muted); }
@media (max-width: 700px) {
  .community-box { flex-direction: column; align-items: flex-start; padding: 24px; }
  .community-box .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.footer { background: #000a26; color: #8e9bbf; padding: 72px 0 28px; font-size: .93rem; }
.footer .cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.25fr; gap: 32px; margin-bottom: 48px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a:hover { color: #fff; }
.footer .brand-name { color: #fff; }
.footer .socials { display: flex; gap: 10px; margin-top: 20px; }
.footer .socials a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.06); color: #fff; transition: background .2s; }
.footer .socials a:hover { background: var(--blue); }
.footer .socials svg { width: 18px; height: 18px; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,.7);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1; animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip, .wa-float::before { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4, .tool-list { grid-template-columns: repeat(2, 1fr); }
  .steps, .stats { grid-template-columns: repeat(2, 1fr); }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .footer .cols > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 122px 0 auto 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 16px 20px 24px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .25s;
  }
  .menu-open .nav { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 8px 0 0; }
  .menu-toggle { display: block; }
  .hero .container, .split, .cta { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .units-grid, .grid-3 { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project-media { min-height: 240px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta { padding: 44px 28px; }
  .cta .btn-row { justify-content: flex-start; }
  .search-box { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 68px 0; }
  .hero { padding: 56px 0 72px; }
  .grid-4, .tool-list, .steps { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .partners, .facts { grid-template-columns: 1fr; }
  .project-body { padding: 24px; }
  .footer .cols { grid-template-columns: 1fr; }
  .float-chip { display: none; }
  .stats--text { grid-template-columns: 1fr; }
  .btn { white-space: normal; }
  .topbar .hide-sm { display: none; }
}
