/* Core Business Insights — estilos del sitio */
:root {
  --navy: #12263f;
  --navy-2: #1d3a5c;
  --teal: #0e8f82;
  --teal-ink: #0a7268;
  --amber: #e8a33d;
  --amber-ink: #8a5a08;
  --paper: #f4f6f8;
  --white: #ffffff;
  --ink: #1b2430;
  --muted: #52606f;
  --line: #d5dce3;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 72rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.12; margin: 0 0 .6em; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--ink); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Cabecera */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--navy); }
.brand svg { width: 2.4rem; height: 2.4rem; }
.brand span { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: .75rem; color: var(--muted); }
.menu { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--ink); text-decoration: none; font-size: .98rem; padding: .4rem 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--teal); color: var(--navy); }
.menu-toggle { display: none; background: none; border: 1px solid var(--navy); color: var(--navy); padding: .55rem .9rem; font: inherit; font-size: .95rem; border-radius: 6px; cursor: pointer; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.4rem; font: 600 1rem var(--sans); border-radius: 8px; text-decoration: none; border: 2px solid var(--navy); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; min-height: 3rem; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-wa { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.btn-wa:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Portada */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 14ch; }
.hero .creds { margin-top: 1.6rem; font-size: .95rem; color: var(--muted); max-width: 46ch; }
.diagram-card { background: var(--white); border: 2px solid var(--navy); border-radius: 12px; padding: 1rem 1rem 1.1rem; box-shadow: 8px 8px 0 var(--navy); }
.diagram-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap; }
.seg { display: inline-flex; border: 2px solid var(--navy); border-radius: 8px; overflow: hidden; }
.seg button { font: 600 .92rem var(--sans); padding: .5rem 1rem; background: #fff; color: var(--navy); border: 0; cursor: pointer; min-height: 2.5rem; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.diagram-note { font-size: .92rem; color: var(--muted); margin: .4rem 0 0; min-height: 2.8em; }
#flow { width: 100%; height: auto; }
#flow .edge { fill: none; stroke-linecap: round; }
#flow .node rect { fill: #fff; stroke: var(--navy); stroke-width: 2; }
#flow .node text { font-family: var(--sans); fill: var(--navy); }
#flow .node .t1 { font-weight: 700; font-size: 15px; }
#flow .node .t2 { font-size: 12px; fill: var(--muted); }

/* Secciones */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.alt { background: var(--white); border-block: 1px solid var(--line); }
.section.dark { background: var(--navy); color: #e8eef5; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark a { color: #9fe3da; }
.section-head { max-width: 46rem; margin-bottom: 2.4rem; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 2.5rem; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 3rem; }
.pain { border-left: 4px solid var(--amber); padding-left: 1.1rem; }
.pain h3 { margin-bottom: .35rem; }
.pain p { margin: 0; color: var(--muted); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { counter-increment: s; position: relative; padding-top: 3.4rem; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 0; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font: 700 1.2rem var(--serif); }
.steps li::after { content: ""; position: absolute; top: 1.3rem; left: 3.2rem; right: -1rem; height: 2px; background: var(--teal); opacity: .5; }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: #cfd9e4; }

.rows { border-top: 2px solid var(--navy); }
.row { display: grid; grid-template-columns: 1.1fr 1.6fr 9.5rem; gap: 1rem 2rem; align-items: baseline; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.row h3 { margin: 0; font-size: 1.35rem; }
.row h3 a { color: var(--navy); text-decoration: none; }
.row h3 a:hover { color: var(--teal-ink); text-decoration: underline; }
.row p { margin: 0; color: var(--muted); }
.row .price { font-weight: 700; color: var(--navy); white-space: nowrap; text-align: right; }
.row .price small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.timeline li { border-top: 4px solid var(--teal); padding-top: .8rem; }
.timeline strong { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--navy); }
.timeline span { display: block; font-size: .9rem; color: var(--teal-ink); font-weight: 600; margin-bottom: .3rem; }
.timeline p { margin: 0; font-size: .98rem; color: var(--muted); }

.cert { display: flex; gap: .8rem; align-items: baseline; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.cert b { font-family: var(--serif); font-size: 1.3rem; color: var(--navy); min-width: 4.2rem; }
.cert span { color: var(--muted); font-size: .98rem; }

.case { border: 2px solid var(--navy); border-radius: 12px; padding: 1.6rem; background: #fff; }
.case h3 { margin-bottom: .2rem; }
.tag { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--teal-ink); border: 1px solid var(--teal-ink); border-radius: 999px; padding: .1rem .7rem; margin-bottom: .8rem; }
.case ul { padding-left: 1.2rem; margin: .6rem 0 0; }

details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
details:first-of-type { border-top: 2px solid var(--navy); }
summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 700 1.4rem var(--serif); color: var(--teal-ink); }
details[open] summary::after { content: "–"; }
details p { margin: .8rem 0 0; color: var(--muted); }

/* Páginas internas */
.page-head { padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 20ch; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.2em; font-size: 1.8rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; max-width: 62ch; }
.prose li { margin-bottom: .45em; }
.side { position: sticky; top: 6rem; background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 1.4rem; }
.side h3 { font-size: 1.15rem; }
.side dl { margin: 0 0 1rem; }
.side dt { font-weight: 700; color: var(--navy); font-size: .92rem; margin-top: .8rem; }
.side dd { margin: 0; color: var(--muted); }
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; align-items: start; }
table.t { border-collapse: collapse; width: 100%; max-width: 44rem; font-size: .98rem; }
table.t th, table.t td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--navy); border-bottom: 2px solid var(--navy); }

/* Formularios y cuestionario */
form .field { margin-bottom: 1.1rem; }
label, legend { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--navy); }
input[type=text], input[type=email], input[type=tel], select, textarea { width: 100%; padding: .75rem .85rem; font: inherit; border: 2px solid var(--navy); border-radius: 8px; background: #fff; color: var(--ink); min-height: 3rem; }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.3rem; height: 1.3rem; margin-top: .25rem; accent-color: var(--teal-ink); flex: none; }
.hint { font-size: .9rem; color: var(--muted); margin-top: .35rem; }
.msg { padding: 1rem 1.2rem; border-left: 4px solid var(--teal); background: #e7f4f2; border-radius: 4px; margin-top: 1rem; }
.msg.warn { border-left-color: var(--amber); background: #fbf1de; }
.quiz fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 1.1rem 0; margin: 0; min-width: 0; }
.quiz legend { font-weight: 600; padding: 0; max-width: 56ch; }
.quiz .opts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.quiz .opts label { margin: 0; font-weight: 500; border: 2px solid var(--line); border-radius: 8px; padding: .5rem .85rem; cursor: pointer; background: #fff; }
.quiz .opts input { position: absolute; opacity: 0; }
.quiz .opts label:has(input:checked) { border-color: var(--navy); background: var(--navy); color: #fff; }
.quiz .opts label:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 2px; }
.result { margin-top: 1.5rem; background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 1.4rem; }
.result .score { font: 700 3rem var(--serif); color: var(--navy); line-height: 1; }

/* Pie */
.site-footer { background: var(--navy); color: #d3dde8; padding-block: 3rem 2rem; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1.05rem; font-family: var(--sans); font-weight: 700; margin-bottom: .6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.legal { border-top: 1px solid #36506f; margin-top: 2rem; padding-top: 1rem; font-size: .88rem; color: #a9b8c8; }
.wa-fixed { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; background: var(--teal-ink); color: #fff; border-radius: 999px; padding: .8rem 1.2rem; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(18,38,63,.35); }
.wa-fixed:hover { background: var(--navy); color: #fff; }

@media (max-width: 62rem) {
  .hero-grid, .with-side { grid-template-columns: 1fr; }
  .side { position: static; }
  .cols-3, .steps, .timeline { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
}
@media (max-width: 46rem) {
  .menu-toggle { display: inline-flex; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: .5rem var(--gutter) 1rem; }
  .menu.open { display: flex; }
  .menu a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .cols-3, .cols-2, .steps, .timeline, .foot-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .row .price { text-align: left; }
  .diagram-card { box-shadow: 5px 5px 0 var(--navy); }
  .wa-fixed { padding: .7rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
