/* JEIA · estilos globales. Sin dependencias. */
:root {
  --bg: 250 248 244;
  --surface: 255 255 255;
  --ink: 15 31 61;
  --muted: 88 98 118;
  --line: 224 219 209;
  --navy: 15 31 61;
  --accent: 143 98 32;
  --gold: 214 164 82;
  --on-accent: 255 255 255;
  --per: 214 232 255;
  --loc: 217 241 224;
  --org: 250 228 200;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
}
:root[data-theme='dark'] {
  --bg: 10 18 34;
  --surface: 18 30 54;
  --ink: 238 234 225;
  --muted: 162 172 190;
  --line: 40 56 86;
  --navy: 232 200 140;
  --accent: 214 164 82;
  --gold: 214 164 82;
  --on-accent: 10 18 34;
  --per: 38 66 112;
  --loc: 30 76 56;
  --org: 94 66 30;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: rgb(var(--bg)); color: rgb(var(--ink));
  font: 400 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-serif); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 600; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2rem); font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 60; background: rgb(var(--surface)); padding: .5rem .75rem; border-radius: 6px; }
.skip:focus { top: 1rem; }

.container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
.narrow { max-width: 48rem; }
.section { padding-block: 4rem; }
@media (min-width: 768px) { .section { padding-block: 5rem; } }
.band { background: rgb(var(--surface)); border-block: 1px solid rgb(var(--line)); }
.lead { color: rgb(var(--muted)); font-size: 1.125rem; max-width: 36rem; }
.muted { color: rgb(var(--muted)); }
.link { color: rgb(var(--accent)); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { text-decoration-thickness: 2px; }
.eyebrow { font-size: .9375rem; font-weight: 600; color: rgb(var(--accent)); }
.section h2, .page-head h1 { margin-top: .75rem; }
.section p.intro { margin-top: 1rem; color: rgb(var(--muted)); max-width: 48rem; }

/* Botones y tarjetas */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.25rem; border-radius: 8px; border: 1px solid transparent;
  font-size: .875rem; font-weight: 500; cursor: pointer; transition: filter .15s, border-color .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: rgb(var(--accent)); color: rgb(var(--on-accent)); }
/* Sobre superficies siempre marino (navbar, hero, cierre): dorado fijo con texto marino, 8:1 */
.btn-gold { background: rgb(var(--gold)); color: #0F1F3D; }
.btn-primary:hover:not(:disabled), .btn-gold:hover:not(:disabled) { filter: brightness(1.1); }
.btn-ghost { background: rgb(var(--surface)); border-color: rgb(var(--line)); }
.btn-ghost:hover:not(:disabled) { border-color: rgb(var(--accent)); }
.card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: #0F1F3D; border-bottom: 1px solid rgb(255 255 255 / .1); color: #FAF8F4; }
.header-row { height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .625rem; }
.logo-mark { display: block; flex: none; }
.logo-text { font: 600 1.25rem var(--font-serif); letter-spacing: -0.02em; }
.site-header .logo-text { color: #FAF8F4; }
.main-nav { display: none; gap: 1.75rem; }
.main-nav a, .mobile-nav a { font-size: .875rem; color: rgb(250 248 244 / .7); }
.main-nav a:hover, .main-nav a[aria-current] { color: #fff; }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px;
  background: transparent; border: 1px solid rgb(255 255 255 / .2); color: rgb(250 248 244 / .8); cursor: pointer;
}
.icon-btn:hover { color: #fff; }
.header-cta { display: none; }
.theme-sun { display: none; }
:root[data-theme='dark'] .theme-sun { display: block; }
:root[data-theme='dark'] .theme-moon { display: none; }
.mobile-nav { display: none; flex-direction: column; gap: .25rem; padding-bottom: 1rem; }
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: .625rem .5rem; border-radius: 8px; color: rgb(250 248 244 / .8); }
.mobile-nav a:hover { background: rgb(255 255 255 / .1); }
.mobile-nav .btn { margin-top: .5rem; color: #fff; }
@media (min-width: 640px) { .header-cta { display: inline-flex; } }
@media (min-width: 768px) { .main-nav { display: flex; } .menu-btn, .mobile-nav { display: none !important; } }

main { flex: 1; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #0F1F3D; color: #FAF8F4; }
/* Texto de sentencia difuminado con barras de tachado: el problema que resuelve el producto. */
.hero-bg {
  position: absolute; inset: -2rem; z-index: -2; columns: 3 18rem; column-gap: 3rem;
  font: 1.05rem/1.9 var(--font-serif); color: rgb(250 248 244 / .3);
  filter: blur(5px); pointer-events: none; user-select: none;
}
.hero-bg .bar { display: inline-block; height: .85em; vertical-align: -.05em; background: rgb(214 164 82 / .5); }
.w2 { width: 4em; } .w3 { width: 6em; } .w4 { width: 8em; }
/* Velo lateral: asegura el contraste del título sobre el texto de fondo. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(15 31 61 / .95) 0%, rgb(15 31 61 / .72) 55%, rgb(15 31 61 / .5) 100%);
}
.hero-grid { display: grid; gap: 3rem; align-items: center; padding-block: 3.5rem; }
@media (min-width: 768px) { .hero-grid { padding-block: 5.5rem; } }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.wordmark { font-size: clamp(5rem, 17vw, 12rem); font-weight: 600; line-height: .85; letter-spacing: -.045em; color: #FAF8F4; }
.tagline { margin-top: 1.25rem; font: 400 clamp(1.25rem, 2.6vw, 1.75rem)/1.3 var(--font-serif); color: rgb(250 248 244 / .92); }
.tagline b { font-weight: 600; color: rgb(var(--gold)); }
.hero .lead { margin-top: 1.5rem; color: rgb(250 248 244 / .78); font-size: 1.0625rem; }
.hero .card { color: rgb(var(--ink)); }
.hero .btn-ghost { background: transparent; border-color: rgb(250 248 244 / .4); color: #FAF8F4; }
.hero .btn-ghost:hover:not(:disabled) { border-color: rgb(var(--gold)); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.compare { padding: 1.25rem; box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
@media (min-width: 640px) { .compare { padding: 1.5rem; } }
.compare-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: .5rem; }
.compare-title { font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--muted)); }
.seg { display: inline-flex; padding: 2px; border: 1px solid rgb(var(--line)); border-radius: 8px; font-size: .75rem; }
.seg button { border: 0; background: transparent; color: rgb(var(--muted)); padding: .375rem .75rem; border-radius: 6px; font-weight: 500; cursor: pointer; }
.seg button[aria-selected='true'] { background: rgb(var(--navy)); color: rgb(var(--bg)); }
.compare-text { font: 1.125rem/1.7 var(--font-serif); }
mark { color: rgb(var(--ink)); border-radius: 4px; padding: .1rem .25rem; white-space: nowrap; transition: background-color .2s; }
.doc-text mark { white-space: normal; }
.k-per { background: rgb(var(--per)); }
.k-loc { background: rgb(var(--loc)); }
.k-org { background: rgb(var(--org)); }
.k-alias { background: rgb(var(--accent) / .2); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; font-size: .75rem; color: rgb(var(--muted)); }
.legend span { display: inline-flex; align-items: center; gap: .375rem; }
.legend i { width: .75rem; height: .75rem; border-radius: 3px; border: 1px solid rgb(var(--line)); }

/* Grillas de contenido */
.grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid.g3-md { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid.g3 { grid-template-columns: repeat(3, 1fr); } .grid.g4 { grid-template-columns: repeat(4, 1fr); } }
.step { border-top: 1px solid rgb(var(--ink) / .4); padding-top: 1rem; }
.step-num { font: 1.875rem var(--font-serif); color: rgb(var(--accent)); }
.step h3 { margin-top: .75rem; }
.step p, .feature p, .use p { margin-top: .5rem; font-size: .875rem; color: rgb(var(--muted)); }
.use { border-top: 1px solid rgb(var(--line)); padding-top: 1rem; }
.module { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1.75rem; }
.module { --ico: rgb(var(--ink)); --ico-ac: rgb(var(--accent)); }
.module.soon { --ico: rgb(var(--muted)); --ico-ac: rgb(var(--muted)); }
.module-icon { width: 4.5rem; height: 4.5rem; margin-bottom: .25rem; }
.i-line { fill: none; stroke: var(--ico); stroke-width: 2.5; }
.i-sheet { fill: rgb(var(--surface)); stroke: var(--ico); stroke-width: 2.5; }
.i-acc { fill: none; stroke: var(--ico-ac); stroke-width: 3.5; }
.i-accfill { fill: var(--ico-ac); }
.module p { font-size: .9375rem; color: rgb(var(--muted)); }
.tag { font-size: .75rem; font-weight: 600; padding: .125rem .5rem; border: 1px solid rgb(var(--line)); border-radius: 4px; color: rgb(var(--muted)); }

/* Características: una pieza principal y una lista, porque no todas pesan igual. */
.features { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
@media (min-width: 900px) { .features { grid-template-columns: 5fr 7fr; gap: 4rem; align-items: start; } }
.flagship { background: #0F1F3D; color: #FAF8F4; padding: 2rem; border-radius: 4px; }
@media (min-width: 900px) { .flagship { padding: 2.5rem; position: sticky; top: 6rem; } }
.flagship h3 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; }
.flagship p { margin-top: 1rem; color: rgb(250 248 244 / .78); }
.spec > div { padding-block: 1.125rem; border-top: 1px solid rgb(var(--line)); }
.spec > div:last-child { border-bottom: 1px solid rgb(var(--line)); }
.spec dt { font: 600 1.125rem var(--font-serif); }
.spec dd { margin: .375rem 0 0; font-size: .875rem; color: rgb(var(--muted)); }

/* FAQ */
.faq { margin-top: 2rem; border-block: 1px solid rgb(var(--line)); }
.faq details { padding-block: 1rem; }
.faq details + details { border-top: 1px solid rgb(var(--line)); }
.faq summary { display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: rgb(var(--accent)); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .75rem; font-size: .875rem; color: rgb(var(--muted)); }

.cta-final { background: #0F1F3D; color: #FAF8F4; padding-block: 4rem; }
.cta-final .container { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.cta-final p { margin-top: .5rem; color: rgb(250 248 244 / .7); }
@media (min-width: 768px) { .cta-final .container { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Páginas internas */
.page-head p { margin-top: 1rem; color: rgb(var(--muted)); max-width: 42rem; }
.team-group { margin-top: 3rem; }
.team-group h2 { font-size: 1.25rem; }
.team-list { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 640px) { .team-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .team-list { grid-template-columns: repeat(3, 1fr); } }
.member { overflow: hidden; display: flex; flex-direction: column; }
.member img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; background: rgb(var(--line)); }
.member-info { padding: 1rem 1.25rem; }
.member-info p:first-child { font-weight: 600; }
.member-info p + p { font-size: .875rem; color: rgb(var(--muted)); }

.form { margin-top: 2rem; padding: 1.5rem; display: grid; gap: 1.25rem; }
.form label { font-size: .875rem; font-weight: 500; display: block; }
.field { display: block; width: 100%; margin-top: .375rem; padding: .625rem .75rem; font-size: .875rem; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 8px; }
.form .btn { justify-self: start; }

/* Demo */
.demo { padding-block: 3rem; }
.note { margin-top: .75rem; padding: .75rem 1rem; font-size: .875rem; color: rgb(var(--muted)); background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 8px; }
.steps { display: flex; gap: .5rem; margin-top: 2rem; font-size: .875rem; }
.steps li { flex: 1; padding-top: .5rem; border-top: 2px solid rgb(var(--line)); color: rgb(var(--muted)); }
.steps li.done { border-color: rgb(var(--accent)); color: rgb(var(--ink)); }
.dropzone { margin-top: 2rem; padding: 2.5rem 1rem; text-align: center; border-style: dashed; display: grid; gap: .75rem; justify-items: center; }
.dropzone.over { border-color: rgb(var(--accent)); }
.dropzone .name { font-weight: 500; }
.dropzone .meta { font-size: .875rem; color: rgb(var(--muted)); }
.error { margin-top: .75rem; font-size: .875rem; color: #dc2626; }
:root[data-theme='dark'] .error { color: #f87171; }
#detect-btn { margin-top: 1.5rem; }
.review { margin-top: 2rem; display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .review { grid-template-columns: 1fr 380px; align-items: start; } }
.doc { padding: 1.25rem; }
.doc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; }
.doc-head h2 { font: 600 1rem var(--font-sans); letter-spacing: 0; }
.doc-head label { display: flex; gap: .5rem; align-items: center; font-size: .875rem; color: rgb(var(--muted)); }
.doc-text { white-space: pre-wrap; font: 1rem/1.7 var(--font-serif); }
.aside { display: grid; gap: .75rem; }
.aside > h2 { font: 600 1rem var(--font-sans); letter-spacing: 0; }
.cluster { padding: 1rem; display: grid; gap: .5rem; }
.cluster.off { opacity: .5; }
.cluster-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.cluster-name { font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { padding: .125rem .5rem; border-radius: 4px; font-size: .75rem; flex: none; }
.cluster small, .cluster label { font-size: .75rem; color: rgb(var(--muted)); }
.cluster .field { margin-top: .25rem; padding: .375rem .5rem; background: rgb(var(--bg)); }
.link-btn { justify-self: start; background: none; border: 0; padding: 0; font-size: .75rem; color: rgb(var(--accent)); text-decoration: underline; cursor: pointer; }
.output { padding: 1rem; display: grid; gap: .75rem; }
.output label { font-size: .875rem; font-weight: 500; }
.output .row { display: flex; gap: .5rem; }
.output .row .btn-primary { flex: 1; }
.done-card { margin-top: 2rem; padding: 2.5rem 1rem; text-align: center; }
.done-card p { margin-top: .5rem; color: rgb(var(--muted)); }
.done-card .btn { margin-top: 1.5rem; }
.center { text-align: center; padding-block: 6rem; }

/* Footer */
.site-footer { border-top: 1px solid rgb(var(--line)); background: rgb(var(--surface)); }
.footer-grid { display: grid; gap: 2rem; padding-block: 2.5rem; font-size: .875rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-grid p.muted { margin-top: .75rem; max-width: 20rem; }
.footer-grid strong { font-weight: 500; }
.footer-grid ul { margin-top: .75rem; display: grid; gap: .5rem; color: rgb(var(--muted)); }
.footer-grid ul a:hover { color: rgb(var(--ink)); }
.status { display: inline-flex; align-items: center; gap: .5rem; margin-top: .75rem; font-size: .75rem; color: rgb(var(--muted)); }
.status i { width: .5rem; height: .5rem; border-radius: 50%; background: #f59e0b; }
.status.ok i { background: #10b981; }
.status.down i { background: #ef4444; }
.copy { border-top: 1px solid rgb(var(--line)); padding-block: 1rem; text-align: center; font-size: .75rem; color: rgb(var(--muted)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
