/* =========================================================
   MIKUAL · Sitio web · Diseño "Laboratorio editorial"
   Tokens tomados del Brandbook v1.0 (no cambiar sin aprobación)
   ========================================================= */
:root {
  /* Paleta del brandbook */
  --carbon: #1A1E1F;      /* estructura, logo, títulos */
  --graphite: #454A4C;    /* texto secundario */
  --technical: #747B7E;   /* anotaciones (solo texto >= 18px sobre Lab) */
  --grid: #D9DDDE;        /* retículas, divisores */
  --lab: #F6F7F5;         /* fondo */
  --white: #FFFFFF;
  --cyan: #12B1ED;        /* señal: CTA, nodo de decisión, dato clave. Nunca como texto sobre fondo claro */
  --cyan-hover: #0FA3DA;
  --cyan-soft: rgba(18, 177, 237, 0.12);

  /* Tipografías del brandbook */
  --font-sans: "B612", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-tech: "Orbitron", "B612", system-ui, sans-serif; /* solo etiquetas, números, métricas */

  /* Escala (sugerencia web aprobada en 05-diseno.md) */
  --fs-h1: clamp(2.25rem, 1.2rem + 3.6vw, 4rem);
  --fs-h2: clamp(1.75rem, 1.25rem + 1.8vw, 2.5rem);
  --fs-h3: 1.3rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;

  /* Espaciado (base 4px) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px; --space-24: 96px;
  --section: clamp(56px, 4rem + 4vw, 128px);
  --container: 1200px;

  --radius-sm: 6px;
  --radius: 12px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--carbon);
  background-color: var(--lab);
  /* Retícula técnica tenue (recurso "Retícula · Comprender") */
  background-image:
    linear-gradient(to right, rgba(26, 30, 31, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 30, 31, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: center top;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--carbon); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--cyan); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--carbon); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0 0 var(--space-4); line-height: 1.12; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p { margin: 0 0 var(--space-4); }
.lead { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem); color: var(--graphite); max-width: 62ch; }
.muted { color: var(--graphite); }
.small { font-size: var(--fs-small); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
@media (max-width: 480px) { .container { padding: 0 var(--space-4); } }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--carbon); color: var(--white); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Etiqueta técnica (Orbitron) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-tech); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite);
  margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--carbon); }
.num { font-family: var(--font-tech); font-weight: 600; letter-spacing: 0.06em; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 247, 245, 0.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grid);
}
.header-inner { display: flex; align-items: center; gap: var(--space-6); min-height: var(--header-h); }
.brand img { height: 26px; width: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: var(--space-6); margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-size: var(--fs-small); color: var(--graphite); padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--carbon); border-bottom-color: var(--grid); }
.main-nav a[aria-current="page"] { color: var(--carbon); border-bottom-color: var(--carbon); }
.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.lang-switch { display: inline-flex; border: 1px solid var(--grid); border-radius: var(--radius-sm); overflow: hidden; }
.lang-switch a, .lang-switch span { font-family: var(--font-tech); font-size: 11px; letter-spacing: 0.1em; padding: 6px 8px; text-decoration: none; color: var(--graphite); }
.lang-switch [aria-current="true"] { background: var(--carbon); color: var(--lab); }
.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--grid); border-radius: var(--radius-sm);
  width: 40px; height: 40px; cursor: pointer; color: var(--carbon);
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 960px) {
  .header-inner { gap: var(--space-3); }
  .nav-toggle { display: inline-grid; place-items: center; order: 3; }
  .main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--lab); border-bottom: 1px solid var(--grid); display: none; margin: 0; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: var(--space-2) var(--space-6) var(--space-4); }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--grid); font-size: 1rem; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .brand img { height: 20px; }
  .header-actions .btn { padding: 10px 12px; font-size: 0.875rem; }
  .btn .long { display: none; }
}
@media (min-width: 481px) { .btn .short { display: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-sans); font-weight: 700; font-size: 1rem; line-height: 1.2;
  padding: 14px 22px; border-radius: var(--radius-sm); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
/* Primario: fondo cian + texto carbón (contraste 6.8:1). Nunca texto blanco sobre cian. */
.btn-primary { background: var(--cyan); color: var(--carbon); }
.btn-primary:hover { background: var(--cyan-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--carbon); border-color: var(--carbon); }
.btn-secondary:hover { background: var(--carbon); color: var(--lab); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--carbon); padding-left: 0; padding-right: 0; text-decoration: underline; text-underline-offset: 4px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-arrow::after { content: "→"; font-family: var(--font-sans); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: center; }

/* ---------- Secciones ---------- */
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--grid); }
.section-head { max-width: 760px; margin-bottom: var(--space-12); }
.section--white { background: var(--white); }
.section--dark { background: var(--carbon); color: var(--lab); border-top: 0 !important; }
.section--dark .eyebrow { color: var(--grid); }
.section--dark .eyebrow::before { background: var(--cyan); }
.section--dark .muted, .section--dark .lead { color: var(--grid); }
.section--dark a { color: var(--lab); }
.section--dark .btn-primary { color: var(--carbon); }
.section--dark .btn-secondary { color: var(--lab); border-color: var(--lab); }
.section--dark .btn-secondary:hover { background: var(--lab); color: var(--carbon); }

/* ---------- Hero ---------- */
.hero { padding: clamp(24px, 1rem + 2vw, 56px) 0 clamp(48px, 2rem + 4vw, 96px); } /* ajuste 2026-11-11: menos aire arriba del hero */
.hero h1 { max-width: 15ch; }
.hero .lead { margin-bottom: var(--space-8); }
.hero-meta { margin-top: var(--space-6); font-size: var(--fs-small); color: var(--graphite); }

/* ---------- Proceso (barra del logo: ruido → resultado) ---------- */
.process { list-style: none; margin: clamp(48px, 6vw, 88px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.process::before { content: ""; position: absolute; left: 10%; right: 10%; top: 56px; height: 1px; background: var(--carbon); opacity: .35; }
.process li { position: relative; text-align: center; padding: 0 var(--space-2); }
.process .station { width: 112px; height: 112px; margin: 0 auto var(--space-4); display: grid; place-items: center; background: var(--lab); position: relative; z-index: 1; }
.process svg { width: 88px; height: 88px; }
.process .p-label { font-family: var(--font-tech); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.process .p-desc { font-size: var(--fs-small); color: var(--graphite); margin-top: var(--space-1); }
.process .node { position: absolute; top: 52px; right: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--carbon); z-index: 2; }
.process li:last-child .node { display: none; }
.process .node--decision { background: var(--cyan); width: 13px; height: 13px; top: 50px; right: -7px; box-shadow: 0 0 0 6px var(--cyan-soft); }
@media (max-width: 760px) {
  .process { grid-template-columns: 1fr; gap: 0; }
  .process::before { left: 43px; right: auto; top: 20px; bottom: 20px; width: 1px; height: auto; }
  .process li { display: grid; grid-template-columns: 88px 1fr; gap: var(--space-4); text-align: left; align-items: center; padding: var(--space-2) 0; }
  .process .station { width: 88px; height: 88px; margin: 0; }
  .process svg { width: 64px; height: 64px; }
  .process .node { display: none; }
}
/* Animación de entrada: el cian aparece al final (decisión) */
@media (prefers-reduced-motion: no-preference) {
  .js .process li { opacity: 0; transform: translateY(8px); animation: stepIn .5s ease forwards; }
  .js .process li:nth-child(1) { animation-delay: .1s; }
  .js .process li:nth-child(2) { animation-delay: .6s; }
  .js .process li:nth-child(3) { animation-delay: 1.1s; }
  .js .process li:nth-child(4) { animation-delay: 1.6s; }
  .js .process li:nth-child(5) { animation-delay: 2.1s; }
  .js .process .cy { opacity: 0; animation: cyIn .3s ease 2.6s forwards; }
}
@keyframes stepIn { to { opacity: 1; transform: none; } }
@keyframes cyIn { to { opacity: 1; } }

/* ---------- Grillas y tarjetas ---------- */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius); padding: var(--space-8); }
.card h3 { margin-bottom: var(--space-3); }
.card p:last-child { margin-bottom: 0; }
.card-link { display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s ease; }
.card-link:hover { border-color: var(--carbon); }
.card-link .more { margin-top: auto; padding-top: var(--space-4); font-weight: 700; }
.card-link .more::after { content: " →"; }
.card .icon { width: 48px; height: 48px; margin-bottom: var(--space-6); }
.quote { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); line-height: 1.3; font-weight: 700; margin-bottom: var(--space-4); }
.quote::before { content: "“"; } .quote::after { content: "”"; }

/* Síntomas / listas técnicas */
.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li { padding: var(--space-4) 0 var(--space-4) 32px; border-top: 1px solid var(--grid); position: relative; }
.tick-list li:last-child { border-bottom: 1px solid var(--grid); }
.tick-list li::before { content: ""; position: absolute; left: 4px; top: 26px; width: 10px; height: 10px; border: 1.5px solid var(--carbon); border-radius: 50%; }
.section--dark .tick-list li { border-color: rgba(217, 221, 222, .2); }
.section--dark .tick-list li::before { border-color: var(--grid); }
.x-list li::before { border-radius: 0; border: 0; width: 12px; height: 2px; background: var(--carbon); top: 30px; }

/* ---------- Método ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--carbon); }
.step { padding: var(--space-8) var(--space-6) 0 0; position: relative; }
.step + .step { padding-left: var(--space-6); border-left: 1px solid var(--grid); }
.step .num { font-size: 2.5rem; display: block; margin-bottom: var(--space-4); }
.step .gets { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--grid); font-size: var(--fs-small); }
.step .gets strong { font-family: var(--font-tech); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: var(--space-1); }
.step--decision .num::after { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); margin-left: 10px; vertical-align: middle; box-shadow: 0 0 0 5px var(--cyan-soft); }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: var(--space-6) 0; border-left: 0; border-bottom: 1px solid var(--grid); }
}

/* ---------- Diagnóstico ---------- */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.specs { list-style: none; padding: 0; margin: 0 0 var(--space-8); border-top: 1px solid var(--grid); }
.specs li { display: grid; grid-template-columns: 140px 1fr; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--grid); }
.specs dt, .specs .k { font-family: var(--font-tech); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); padding-top: 4px; }
@media (max-width: 480px) { .specs li { grid-template-columns: 1fr; gap: var(--space-1); } }
.figure { background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius); padding: var(--space-6); }
.figure figcaption { font-size: var(--fs-small); color: var(--graphite); margin-top: var(--space-3); }
.figure svg { width: 100%; height: auto; }
.illustrative { font-family: var(--font-tech); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); border: 1px solid var(--grid); border-radius: 4px; padding: 3px 6px; display: inline-block; margin-bottom: var(--space-3); }

.flow { list-style: none; counter-reset: flow; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.flow li { background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius); padding: var(--space-6); }
.flow .num { display: block; font-size: 1.25rem; margin-bottom: var(--space-2); }
@media (max-width: 760px) { .flow { grid-template-columns: 1fr; } }

/* ---------- Dato pendiente ---------- */
.pendiente {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  border: 1px dashed var(--technical); border-radius: 4px; padding: 2px 8px;
  font-size: var(--fs-small); color: var(--graphite); background: rgba(255,255,255,.6);
}
.pendiente::before { content: "DATO PENDIENTE"; font-family: var(--font-tech); font-size: 9px; letter-spacing: .14em; font-weight: 600; color: var(--carbon); }
.section--dark .pendiente { color: var(--grid); background: transparent; border-color: var(--grid); }
.section--dark .pendiente::before { color: var(--lab); }
.price-tag { font-family: var(--font-tech); font-size: 1.5rem; font-weight: 600; }

/* ---------- Equipo ---------- */
.person { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-6); align-items: start; }
.avatar { width: 120px; height: 120px; border-radius: var(--radius); border: 1px dashed var(--technical); display: grid; place-items: center; text-align: center; background: var(--lab); font-family: var(--font-tech); font-size: 2rem; font-weight: 600; color: var(--graphite); position: relative; }
.avatar small { position: absolute; bottom: 6px; left: 0; right: 0; font-size: 8px; letter-spacing: .12em; font-weight: 600; }
.person .role { font-family: var(--font-tech); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); margin-bottom: var(--space-2); display: block; }
@media (max-width: 480px) { .person { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--grid); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--grid); }
.faq summary { cursor: pointer; list-style: none; padding: var(--space-6) 40px var(--space-6) 0; font-weight: 700; position: relative; font-size: 1.1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-family: var(--font-tech); font-size: 1.25rem; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 var(--space-6); color: var(--graphite); max-width: 70ch; }

/* ---------- Página interna ---------- */
.page-hero { padding: clamp(24px, 1rem + 2vw, 56px) 0 clamp(40px, 2rem + 3vw, 72px); border-bottom: 1px solid var(--grid); } /* ajuste 2026-11-11: menos aire arriba */
.page-hero h1 { max-width: 20ch; }
.breadcrumb { font-family: var(--font-tech); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); margin-bottom: var(--space-6); }
.breadcrumb a { color: var(--graphite); }
.not-for { background: var(--white); border: 1px solid var(--carbon); border-radius: var(--radius); padding: var(--space-8); }
.ladder { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.ladder li { background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius); padding: var(--space-6); position: relative; }
.ladder li:first-child { border-color: var(--carbon); }
.ladder .num { font-size: 11px; color: var(--graphite); letter-spacing: .14em; display: block; margin-bottom: var(--space-3); }
.ladder .meta { font-size: var(--fs-small); color: var(--graphite); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--grid); }
@media (max-width: 960px) { .ladder { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ladder { grid-template-columns: 1fr; } }

/* ---------- Agenda (Google Calendar) ---------- */
.agenda-box { min-height: 320px; border: 1px dashed var(--technical); border-radius: var(--radius); display: grid; place-items: center; text-align: center; padding: var(--space-8); background: var(--lab); }

/* ---------- Cierre / CTA ---------- */
.cta-final h2 { max-width: 18ch; }
.motto { font-family: var(--font-tech); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: clamp(.85rem, .7rem + .6vw, 1.1rem); }

/* ---------- Pie ---------- */
.site-footer { background: var(--white); border-top: 1px solid var(--grid); padding: var(--space-16) 0 var(--space-8); font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-8); }
.footer-grid h4 { font-family: var(--font-tech); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 var(--space-4); color: var(--graphite); font-weight: 600; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: var(--space-2); }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-brand img { height: 24px; width: auto; margin-bottom: var(--space-4); }
.footer-bottom { margin-top: var(--space-12); padding-top: var(--space-6); border-top: 1px solid var(--grid); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); color: var(--graphite); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Banner de idioma ---------- */
.lang-banner { background: var(--white); border-bottom: 1px solid var(--grid); font-size: var(--fs-small); }
.lang-banner .container { display: flex; align-items: center; justify-content: center; gap: var(--space-4); padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.lang-banner button { background: none; border: 0; font: inherit; cursor: pointer; color: var(--graphite); text-decoration: underline; }
.lang-banner[hidden] { display: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Página «Agenda una llamada»: menos aire alrededor del calendario ---------- */
.page-hero--compact { padding-bottom: clamp(24px, 1rem + 1.5vw, 40px); }
.section--tight { padding-top: clamp(24px, 1rem + 1.5vw, 40px); }
/* Texto legal (Aviso de privacidad) */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin: var(--space-12) 0 var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--grid); }
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { font-size: 1.1rem; margin: var(--space-8) 0 var(--space-3); }
.legal p, .legal li { color: var(--graphite); }
.legal ul, .legal ol { padding-left: 1.4em; margin: 0 0 var(--space-4); }
.legal li { margin-bottom: var(--space-2); }
.legal a { overflow-wrap: anywhere; }
/* Altura del calendario de reservas (Google Calendar). Ajusta aquí si se corta o sobra espacio. */
.agenda-frame { display: block; width: 100%; height: 950px; border: 0; }
@media (max-width: 640px) { .agenda-frame { height: 1000px; } }
