/* =====================================================================
   C-Tecnova · Juan Carlos Juárez
   Misma familia visual que CiberBase: tinta azul, papel frío, verde de
   «control superado». Fuentes autoalojadas, sin JavaScript ni terceros.
   ===================================================================== */

@font-face {
  font-family: "Source Serif";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2-variations"), url("../fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Sans";
  src: url("../fonts/ibm-plex-sans-var.woff2") format("woff2-variations"), url("../fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 100 700; font-style: normal; font-display: swap;
}

:root {
  --ink: #10233d;
  --ink-2: #1b3557;
  --ink-3: #2c4a72;
  --paper: #f4f6f8;
  --surface: #ffffff;
  --text: #17222e;
  --muted: #56636f;
  --rule: #d6dde4;
  --green: #0f6b4f;
  --green-bright: #2fb57a;
  --green-soft: #e6f3ee;
  --focus: #2f6feb;
  --serif: "Source Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.6vw, 3.25rem);
  --step-5: clamp(2.3rem, 1.4rem + 3.6vw, 3.75rem);
  --wrap: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
  --r: 8px;
  --shadow: 0 1px 2px rgba(16, 35, 61, .06), 0 8px 24px -12px rgba(16, 35, 61, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 var(--step-0)/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-2); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.kicker { display: block; font: 600 .875rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--green); margin: 0 0 .9rem; }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.55; max-width: 60ch; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 1rem/1 var(--sans); padding: .95em 1.4em; border-radius: var(--r); border: 1.5px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; min-height: 48px; }
.btn:hover { background: var(--ink-2); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); }
.btn-light:hover { background: #e7ecf0; color: var(--ink); }
.btn-on-dark { background: var(--green-bright); border-color: var(--green-bright); color: #06281b; }
.btn-on-dark:hover { background: #48c78d; color: #06281b; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cabecera */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-weight: 650; font-size: 1.3125rem; letter-spacing: -.01em; }
.brand-sub { font-size: .75rem; color: var(--muted); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .9688rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: .35em; }
.nav .btn { color: #fff; min-height: 42px; padding: .7em 1.1em; }
.nav .btn:hover { text-decoration: none; }
@media (max-width: 860px) {
  .site-header .wrap { gap: 6px 16px; padding-top: 12px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; margin: 0; gap: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .nav .btn { display: none; }
}

/* Secciones */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-surface { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-dark { background: var(--ink); color: #dbe4ee; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: #fff; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; margin: 0; }
.section-dark .section-head p { color: #b9c6d4; }

/* Portada */
.hero { background: var(--surface); border-bottom: 1px solid var(--rule); padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: var(--step-5); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.hero .lede { margin-bottom: 1.75rem; }
.hero figure { margin: 0; }
.hero figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.hero figcaption { margin-top: 14px; font-size: .9375rem; color: var(--muted); }
.hero figcaption strong { display: block; font-family: var(--serif); font-size: 1.1875rem; color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: .9375rem; }
.facts b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero figure { max-width: 320px; } }

/* Ideas */
.ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.18); }
.ideas > div { padding: 26px 28px 8px 0; }
.ideas > div + div { border-left: 1px solid rgba(255,255,255,.18); padding-left: 28px; }
.ideas h3 { font-size: 1.25rem; }
.ideas p { color: #c5d1dd; margin: 0; }
@media (max-width: 860px) { .ideas { grid-template-columns: 1fr; } .ideas > div + div { border-left: 0; border-top: 1px solid rgba(255,255,255,.18); padding-left: 0; } }
.quote { font-family: var(--serif); font-size: var(--step-2); line-height: 1.35; color: #fff; max-width: 36ch; margin: 0 0 40px; font-weight: 450; }

/* Bloque CiberBase */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.product-card { background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(24px, 3vw, 36px); }
.product-brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 650; font-size: 1.625rem; color: var(--ink); margin-bottom: 14px; }
.product-brand svg { width: 40px; height: 40px; }
.product-card dl { margin: 0 0 22px; display: grid; grid-template-columns: auto 1fr; }
.product-card dt, .product-card dd { margin: 0; padding: 11px 0; border-top: 1px solid var(--rule); }
.product-card dt { color: var(--muted); font-size: .9375rem; padding-right: 18px; }
.product-card dd { color: var(--ink); font-weight: 600; text-align: right; }
.product-card .btn { width: 100%; }
ul.checks { list-style: none; padding: 0; margin: 0 0 1.5em; }
ul.checks li { position: relative; padding-left: 32px; margin-bottom: .6em; }
ul.checks li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 4px; background: var(--green-soft); border: 1.5px solid var(--green); }
ul.checks li::after { content: ""; position: absolute; left: 6px; top: .48em; width: 5px; height: 9px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg); }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }

/* Trayectoria */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 30px 30px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 3px; background: var(--ink); }
.timeline li.now::before { background: var(--green-bright); }
.timeline .when { display: block; font: 600 .875rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--green); margin-bottom: 4px; }
.timeline h3 { margin-bottom: .3em; }
.timeline p { margin: 0; color: var(--muted); max-width: 62ch; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .9063rem; font-weight: 500; }
.section-surface .tags li { background: var(--paper); }

/* Tarjetas de guías */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: var(--text); }
.section-surface .card { background: var(--paper); }
a.card:hover { border-color: var(--ink); box-shadow: var(--shadow); color: var(--text); }
.card-meta { font: 600 .8125rem var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--green); }
.card-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
a.card:hover .card-title { text-decoration: underline; text-underline-offset: .2em; }
.card-text { color: var(--muted); font-size: .9688rem; }

/* Páginas interiores */
.page-head { background: var(--surface); border-bottom: 1px solid var(--rule); padding: clamp(32px, 5vw, 64px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { max-width: 22ch; text-wrap: balance; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }
.prose { max-width: 68ch; font-size: 1.0938rem; line-height: 1.7; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose strong { color: var(--ink); font-weight: 600; }
.note { background: #edf3fa; border-left: 4px solid var(--ink-3); padding: 18px 22px; border-radius: var(--r); margin: 1.6em 0; }
.note p:last-child { margin: 0; }
.with-aside { display: grid; grid-template-columns: minmax(0, 68ch) minmax(260px, 330px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.aside-card { position: sticky; top: 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 26px; }
.aside-card .btn { width: 100%; margin-top: 8px; }
.aside-title { font-family: var(--serif); font-size: 1.375rem; font-weight: 600; color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
@media (max-width: 960px) { .with-aside { grid-template-columns: 1fr; } .aside-card { position: static; } }
.portrait { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.portrait img { border-radius: 12px; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 700px) { .portrait { grid-template-columns: 1fr; } .portrait img { max-width: 220px; } }

/* Preguntas */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { max-width: 70ch; padding-bottom: 18px; margin: 0; }

/* Contacto y cierre */
.contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.contact-mail { font-family: var(--serif); font-size: var(--step-3); font-weight: 600; color: #fff; word-break: break-word; }
.contact p { color: #b9c6d4; font-size: var(--step-1); }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.notice { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--green-bright); border-radius: var(--r); padding: 22px 26px; }
.notice h2 { font-size: var(--step-2); }
.notice p:last-child { margin: 0; }

/* Pie */
.site-footer { background: #0b1a2e; color: #a9b8c8; padding: 48px 0 32px; font-size: .9375rem; }
.site-footer a { color: #dbe4ee; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand-sub { color: #93a5b8; }
.site-footer h2 { font: 600 .8125rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-legal { padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8438rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Legales */
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 1rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.legal th { width: 34%; color: var(--muted); font-weight: 500; }

/* Utilidades (sin estilos en línea: la CSP los bloquea) */
.kicker-dark { color: #55c993; }
.contact-place { margin-top: 10px; }
.mt-l { margin-top: 2.4em; }
.mt-s { margin-top: 8px; }
.narrow { max-width: 68ch; }
.section-head .kicker { font-size: .875rem; color: var(--green); margin-bottom: .9rem; }
.contact .kicker { font-size: .875rem; color: #55c993; }
.section-dark .btn-on-dark, .section-dark .btn-on-dark:hover { color: #06281b; }
h2.kicker { font-family: var(--sans); }
