/* =====================================================================
   kaizenial.com · capa v3 «estilo Apple» (rama kai/apple)
   Va después de site.css. Fondos claros siempre, tipografía del sistema,
   botones en píldora, mucho aire y animaciones suaves.
   ===================================================================== */

:root,
:root[data-theme="dark"] {
  --ground: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --rule: #e8e8ed;
  --accent: #0b6e5f;
  --accent-ink: #ffffff;
  --accent-soft: #e6f4f1;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans);
  --radio: 22px;
  --sombra: 0 2px 6px rgba(0,0,0,.04), 0 18px 40px -18px rgba(0,0,0,.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #ffffff; --surface: #ffffff; --surface-2: #f5f5f7;
    --ink: #1d1d1f; --muted: #6e6e73; --faint: #86868b; --rule: #e8e8ed;
    --accent: #0b6e5f; --accent-ink: #ffffff; --accent-soft: #e6f4f1;
  }
}

body { font-family: var(--sans); font-size: 17px; line-height: 1.5; letter-spacing: -0.011em; background: var(--ground); color: var(--ink); }
.logo img { filter: none !important; }
a { color: var(--accent); }

/* Navegación de cristal */
.nav { background: rgba(255,255,255,.72); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px); border-bottom: 1px solid rgba(0,0,0,.06); transition: box-shadow .3s ease; }
.nav.con-sombra { box-shadow: 0 6px 20px -12px rgba(0,0,0,.18); }
.nav-inner { padding-top: 10px; padding-bottom: 10px; }
.nav-links { align-items: center; }
.nav-links a { font-size: 13.5px; color: var(--ink); opacity: .82; transition: opacity .2s ease; }
.nav-links a:hover { opacity: 1; }
.nav .btn-nav, .btn, .banda .enlaces a { border-radius: 980px; }
.nav .btn-nav { opacity: 1; padding: 7px 16px; font-size: 13.5px; }
.lang { border-radius: 980px; }

/* Botones en píldora */
.btn { font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; padding: 12px 24px; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(11,110,95,.55); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { color: var(--accent); border-color: rgba(11,110,95,.35); background: #fff; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn .flecha { display: inline-block; transition: transform .25s ease; }
.btn:hover .flecha { transform: translateX(3px); }

/* ---------- Cabecera centrada ---------- */
.portada { text-align: center; padding: 96px 22px 0; max-width: 1120px; margin: 0 auto; }
.portada .eyebrow { font-family: var(--sans); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--accent); font-weight: 600; margin: 0 0 14px; }
.portada h1 { font-family: var(--sans); font-weight: 700; font-size: clamp(44px, 8vw, 96px); line-height: 1.02; letter-spacing: -0.045em; margin: 0 auto 18px; max-width: 13ch; }
.portada h1 .nombre { display: block; }
.portada h1 .lema { display: block; background: linear-gradient(92deg, #0b6e5f 0%, #1aa58f 45%, #2c7be5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.portada .entradilla { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; color: var(--muted); max-width: 34em; margin: 0 auto 30px; letter-spacing: -0.015em; }
.portada .entradilla strong { color: var(--ink); font-weight: 600; }
.portada .cta-row { justify-content: center; margin-bottom: 56px; }
.escena { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.escena .marco { border-radius: 28px; overflow: hidden; box-shadow: var(--sombra); transform-origin: 50% 0; will-change: transform; background: var(--surface-2); aspect-ratio: 16 / 8.2; }
.escena img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; display: block; }
.escena .sello { position: absolute; left: 48px; bottom: 26px; background: rgba(255,255,255,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 14px; padding: 10px 16px; font-size: 14px; line-height: 1.35; text-align: left; box-shadow: 0 8px 24px -14px rgba(0,0,0,.35); }
.escena .sello b { display: block; font-size: 15px; }
@media (max-width: 700px) {
  .portada { padding-top: 56px; }
  .escena .marco { aspect-ratio: 4 / 3; border-radius: 20px; }
  .escena .sello { left: 32px; right: 32px; bottom: 16px; }
}

/* ---------- Cifras reales ---------- */
.cifras-grandes { max-width: 1120px; margin: 72px auto 0; padding: 0 22px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.cifras-grandes div { text-align: center; padding: 8px; }
.cifras-grandes b { display: block; font-size: clamp(34px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; }
.cifras-grandes span { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; line-height: 1.35; }
@media (max-width: 760px) { .cifras-grandes { grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: 28px; } }

/* ---------- Secciones ---------- */
.sec { padding: 120px 0; }
.sec + .sec { border-top: 0; }
.sec.gris { background: var(--surface-2); }
.sec .eyebrow { font-family: var(--sans); font-size: 15px; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--accent); }
.sec h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1.05; max-width: 18ch; }
.sec .lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); line-height: 1.45; letter-spacing: -0.012em; }
.centrado { text-align: center; }
.centrado h2, .centrado .lead { margin-left: auto; margin-right: auto; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 18px; margin-top: 48px; }
.bento > * { grid-column: span 3; }
.bento > .ancha { grid-column: span 4; }
.bento > .estrecha { grid-column: span 2; }
@media (max-width: 860px) { .bento > *, .bento > .ancha, .bento > .estrecha { grid-column: 1 / -1; } }

.tarjeta { border: 0; border-radius: var(--radio); background: var(--surface); box-shadow: var(--sombra); padding: 32px 30px 28px; }
.sec.gris .tarjeta { background: #fff; }
.sec:not(.gris) .tarjeta { background: var(--surface-2); box-shadow: none; }
a.tarjeta { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
a.tarjeta:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 2px 8px rgba(0,0,0,.05), 0 30px 60px -24px rgba(0,0,0,.28); border-color: transparent; }
.tarjeta h3 { font-family: var(--sans); font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 10px; }
.tarjeta p { font-size: 16.5px; line-height: 1.5; color: var(--muted); }
.tarjeta .kicker { font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; }
.icono { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #e6f4f1, #dbeafe); margin-bottom: 18px; }
.icono svg { width: 24px; height: 24px; }

/* Charlas */
.talks { border-top: 0; }
.talks li { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.talks .cuando { font-family: var(--sans); font-weight: 600; color: var(--accent); font-size: 14px; }
.talks h3 { font-family: var(--sans); font-size: 18px; letter-spacing: -0.02em; }
.mosaico { height: 560px; gap: 16px; margin-top: 56px; }
.mosaico figure { border-radius: var(--radio); }
@media (max-width: 760px) { .mosaico { height: auto; } }

/* Preguntas */
.faq details { border-color: var(--rule); padding: 20px 0; }
.faq summary { font-family: var(--sans); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 26px; line-height: 1; color: var(--accent); transition: transform .3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font-size: 17px; }

/* Contacto claro */
.banda { background: var(--surface-2); color: var(--ink); border-radius: 32px; padding: 72px 64px; }
.banda h2 { color: var(--ink); font-size: clamp(40px, 6vw, 64px); letter-spacing: -0.045em; }
.banda .lead, .banda p { color: var(--muted); }
.banda a { color: var(--accent); }
.banda .enlaces a { color: var(--ink); border: 1px solid #d2d2d7; background: #fff; }
.banda .enlaces a:hover { background: #fff; border-color: var(--accent); color: var(--accent); }
.banda .form { box-shadow: var(--sombra); border-radius: var(--radio); padding: 28px; }
.form input, .form select, .form textarea { border-radius: 12px !important; }
.form button[type="submit"], #enviar { border-radius: 980px !important; }
@media (max-width: 640px) { .banda { padding: 40px 22px; border-radius: 24px; } }

footer { background: var(--surface-2); border-top: 0; }
footer .ancho, footer .wrap { font-size: 12.5px; color: var(--faint); }

/* Artículos y casos */
.articulo { font-size: 18px; line-height: 1.6; }
.articulo h1 { font-family: var(--sans); font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.04em; line-height: 1.06; }
.articulo h2 { font-family: var(--sans); font-size: 28px; letter-spacing: -0.03em; }
.cifras div { border: 0; background: var(--surface-2); border-radius: 18px; }

/* ---------- Animaciones ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .revela { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: var(--retraso, 0s); }
  .js .revela.visto { opacity: 1; transform: none; }
  [data-enter] { animation: entra 1s cubic-bezier(.2,.7,.2,1) both; }
  [data-enter="2"] { animation-delay: .1s; }
  [data-enter="3"] { animation-delay: .22s; }
  [data-enter="4"] { animation-delay: .34s; }
  .portada h1 .lema { background-size: 200% 100%; animation: entra 1s .1s cubic-bezier(.2,.7,.2,1) both, brillo 8s 1.2s ease-in-out infinite alternate; }
  @keyframes brillo { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
}

/* Ajustes tras la primera revisión visual */
.portada h1 { max-width: 18ch; }
.portada h1 .lema { font-size: .72em; letter-spacing: -0.035em; margin-top: .12em; }
.portada .eyebrow, .centrado .eyebrow { display: block; text-align: center; margin-left: auto; margin-right: auto; max-width: none; }

#contacto, #contact { border-top: 0; margin-top: 0; }
@media (max-width: 700px) { .escena .sello { font-size: 12px; padding: 7px 11px; left: 30px; right: auto; max-width: 70%; } .escena .sello b { font-size: 13px; } }

/* Trayectoria en la portada */
.trayectoria { list-style: none; padding: 0; margin: 10px auto 34px; max-width: 980px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; text-align: left; }
.trayectoria li { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; transition: transform .3s ease, box-shadow .3s ease; }
.trayectoria li:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.3); }
.trayectoria b { display: block; font-size: 15.5px; letter-spacing: -0.015em; }
.trayectoria span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.35; margin-top: 3px; }
@media (max-width: 820px) { .trayectoria { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .trayectoria { grid-template-columns: 1fr; } }


/* ================= Pulido visual (v3.1) ================= */
/* Cabecera más contenida */
.portada { padding-top: 88px; }
.portada h1 { font-size: clamp(40px, 5.4vw, 68px); letter-spacing: -0.04em; max-width: none; margin-bottom: 26px; }
.portada h1 .lema { font-size: .5em; letter-spacing: -0.025em; margin-top: .35em; font-weight: 650; }
.portada .eyebrow { margin-bottom: 18px; }

/* Trayectoria: tarjetas iguales y legibles */
.trayectoria { max-width: 1040px; gap: 14px; margin: 6px auto 36px; }
.trayectoria li { padding: 18px 20px; border-radius: 18px; display: flex; flex-direction: column; justify-content: flex-start; min-height: 104px; }
.trayectoria b { font-size: 17px; margin-bottom: 4px; }
.trayectoria span { font-size: 14.5px; line-height: 1.4; }

/* Foto de portada: un poco más baja */
.escena .marco { aspect-ratio: 16 / 7.4; }

/* Secciones: ritmo uniforme y títulos siempre centrados */
.sec { padding: 104px 0; }
.sec h2 { margin-bottom: 16px; }
.sec .lead { margin-bottom: 0; }
#casos .rejilla, #building .rejilla, .bento { margin-top: 44px; }

/* «Qué construye»: 2 x 2 iguales */
.bento > *, .bento > .ancha, .bento > .estrecha { grid-column: span 3; }
.bento .tarjeta { display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; align-items: start; padding: 28px; }
.bento .tarjeta .icono { grid-row: span 2; margin: 0; }
.bento .tarjeta h3 { margin-top: 2px; }
@media (max-width: 860px) { .bento > * { grid-column: 1 / -1; } }

/* Casos: tarjetas de igual altura */
#casos .rejilla { align-items: stretch; }
#casos .tarjeta { display: flex; flex-direction: column; }
#casos .tarjeta .ir { margin-top: auto; padding-top: 14px; }

/* Charlas en rejilla */
.charlas-grid { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.charlas-grid li { background: #fff; border-radius: 20px; padding: 24px 22px; box-shadow: var(--sombra); }
.charlas-grid .cuando { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 980px; padding: 3px 10px; margin-bottom: 12px; }
.charlas-grid h3 { font-family: var(--sans); font-size: 17.5px; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 8px; }
.charlas-grid p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.45; }
@media (max-width: 980px) { .charlas-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .charlas-grid { grid-template-columns: 1fr; } }
.fotos2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.fotos2 figure { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.fotos2 img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.fotos2 figure:hover img { transform: scale(1.03); }
@media (max-width: 640px) { .fotos2 { grid-template-columns: 1fr; } }

/* Preguntas y contacto más compactos */
.faq .ancho { max-width: 860px !important; }
.faq h2 { text-align: center; margin-left: auto; margin-right: auto; }
.faq .eyebrow { text-align: center; }
.banda { padding: 64px 56px; }

p.centrado { max-width: none; text-align: center; margin-left: auto; margin-right: auto; }

/* ================= Diseño v4 (revisión de registro, 17-11) ================= */
:root, :root[data-theme="dark"] { --muted: #4a4a4f; --faint: #5e5e63; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --muted: #4a4a4f; --faint: #5e5e63; } }
p, li, .lead { text-wrap: pretty; }
.nav-links a, .nav .btn-nav { font-size: 14px; }

/* Ancho: rejillas a 1120, textos a 720 centrados */
.ancho { max-width: 1120px; }
.centrado .lead, .sec .lead { max-width: 720px; }

/* Títulos: 36-40px, máx. 2 líneas */
.sec h2 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.03em; max-width: 24ch; text-wrap: balance; }

/* Cabecera */
.portada { padding-top: 48px; }
.portada h1 .lema { background: none; color: var(--accent); -webkit-text-fill-color: var(--accent); animation: entra 1s .1s cubic-bezier(.2,.7,.2,1) both; }
.trayectoria li { background: #fff; box-shadow: var(--sombra); border: 1px solid var(--rule); }
.trayectoria span { font-size: 15px; color: var(--muted); }

/* Ritmo: todas las secciones a 96px */
.sec { padding: 96px 0; }

/* Tarjetas iguales en todas las secciones */
.tarjeta, .sec:not(.gris) .tarjeta { background: #fff; box-shadow: var(--sombra); border: 1px solid var(--rule); }
.tarjeta p, #casos .tarjeta p { font-size: 16px; max-width: none; }
#casos .tarjeta { display: flex; flex-direction: column; }
#casos .tarjeta .ir { margin-top: auto; align-self: flex-start; }

/* Charlas 2 x 2 */
.charlas-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.charlas-grid li { border: 1px solid var(--rule); padding: 26px 28px; }
.charlas-grid p { font-size: 15.5px; color: var(--muted); }
@media (max-width: 640px) { .charlas-grid { grid-template-columns: 1fr; } }
.fotos2 { margin-top: 32px; gap: 18px; }
.fotos2 figure { aspect-ratio: auto; background: none; border-radius: 0; overflow: visible; }
.fotos2 picture { display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.fotos2 img { object-position: 60% 50%; }
.fotos2 figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; text-align: center; }
#charlas .centrado:last-child, #talks .centrado:last-child { margin: 40px 0 0 !important; }

/* FAQ centrada, respuestas a todo el ancho */
.faq .ancho { max-width: 760px !important; }
.faq .eyebrow, .faq h2 { text-align: center; margin-left: auto; margin-right: auto; max-width: none; }
.faq details p { max-width: none; font-size: 16.5px; color: var(--muted); }
.faq { padding-bottom: 64px; }

/* Contacto: columnas centradas en vertical */
.banda .dos { align-items: center; }
#contacto, #contact { padding-bottom: 96px; }
.banda { margin-bottom: 0; }
.form label { font-size: 13px; }

/* Pie centrado y legible */
footer .ancho, footer .wrap { font-size: 13px; color: var(--muted); text-align: center; }
footer a { color: var(--ink); }
footer .foot-links { justify-content: center; }

@media (max-width: 700px) {
  .sec { padding: 72px 0; }
  .portada { padding-top: 36px; }
  .banda .dos { gap: 28px; }
}
.sec h2 { max-width: 26ch; }
.portada h1 .lema { line-height: 1.15; }
#contacto, #contact { padding-bottom: 72px; }
@media (max-width: 860px) {
  .bento > *, .bento > .ancha, .bento > .estrecha { grid-column: 1 / -1; }
  .bento .tarjeta { grid-template-columns: 1fr; padding: 24px; }
  .bento .tarjeta .icono { grid-row: auto; margin-bottom: 14px; }
}
