/* ==========================================================================
   CRITERIO HUMANO — criteriohumano.cl
   Identidad: azul profundo #1A2B4A · bronce #8B5A2B · beige #F0EDE7
   Tipografía: Fraunces (display serif) · IBM Plex Sans (cuerpo) · IBM Plex Mono (etiquetas)
   ========================================================================== */

:root {
  --azul: #1A2B4A;
  --azul-prof: #111F38;
  --bronce: #8B5A2B;
  --bronce-claro: #C9A876;
  --beige: #F4F1EB;
  --beige-claro: #FAF8F4;
  --tinta: #2A3240;
  --gris: #5C6470;
  --blanco: #FFFFFF;
  --max: 1080px;
  --vida: #F0876C;
  --vida-prof: #A03E20;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  font-size: 18.5px;
  line-height: 1.7;
  color: var(--tinta);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Tipografía de marca ---------- */
.serif { font-family: 'Fraunces', Georgia, serif; }
.mono  { font-family: 'IBM Plex Mono', monospace; }

h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; color: var(--azul); font-weight: 600; line-height: 1.15; }

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vida-prof);
  display: block;
  margin-bottom: 18px;
}
/* Sobre fondo azul oscuro, el eyebrow usa bronce claro para contraste legible */
.hero .eyebrow, .frase .eyebrow, .footer .eyebrow { color: var(--vida); }

/* Sello tipográfico: lo humano en serif itálica, lo algorítmico en mono */
.humano { font-family: 'Fraunces', Georgia, serif; font-style: italic; font-weight: 500; color: var(--vida); }
.algoritmico { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--azul);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px; font-weight: 600; color: var(--blanco);
  text-decoration: none; letter-spacing: 0.01em;
}
.logo .punto { color: var(--vida); }
.menu { display: flex; gap: 28px; align-items: center; list-style: none; }
.menu a {
  font-size: 16px; color: #C8D2E4; text-decoration: none;
  letter-spacing: 0.01em; transition: color .18s ease;
}
.menu a:hover, .menu a:focus-visible { color: var(--vida); }
.menu a.activo { color: var(--vida); font-weight: 500; }
.menu a.externo::after { content: " ↗"; font-size: 12px; color: var(--vida); }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--blanco); margin: 5px 0; transition: transform .2s; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--vida-prof); outline-offset: 3px; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(165deg, var(--azul) 0%, var(--azul-prof) 70%);
  color: var(--blanco);
  padding: 110px 0 100px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-texto { min-width: 0; }
.hero-imagen {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  opacity: 0.9;
}
.hero-imagen img {
  width: 100%;
  max-width: 540px;
  height: auto;
  display: block;
}
.hero h1 {
  color: var(--blanco);
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 560;
  max-width: 17ch;
  margin-bottom: 26px;
}
.hero .sub {
  font-size: clamp(17.5px, 1.7vw, 20.5px);
  color: #C8D2E4;
  max-width: 60ch;
  margin-bottom: 40px;
}
.hero .regla { width: 72px; height: 3px; background: var(--vida); margin-bottom: 34px; }

/* Animación sobria de entrada */
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-texto > * { animation: subir .7s ease both; }
.hero-texto > *:nth-child(1) { animation-delay: .0s; }
.hero-texto > *:nth-child(2) { animation-delay: .08s; }
.hero-texto > *:nth-child(3) { animation-delay: .16s; }
.hero-texto > *:nth-child(4) { animation-delay: .24s; }
.hero-texto > *:nth-child(5) { animation-delay: .32s; }
.hero-imagen { animation: subir .9s ease both .2s; }

/* Hero interior (páginas secundarias) */
.hero.compacto { padding: 72px 0 64px; }
.hero.compacto h1 { font-size: clamp(30px, 4vw, 44px); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16.5px; font-weight: 500;
  padding: 15px 32px;
  border-radius: 3px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-bronce { background: var(--vida); color: var(--blanco); border: 1px solid var(--vida); }
.btn-bronce:hover { background: #C9715B; border-color: #C9715B; }
.btn-claro { background: transparent; color: var(--blanco); border: 1px solid rgba(255,255,255,0.45); }
.btn-claro:hover { border-color: var(--vida); color: var(--vida); }
.btn-azul { background: var(--azul); color: var(--blanco); border: 1px solid var(--azul); }
.btn-azul:hover { background: var(--azul-prof); }

/* ---------- Secciones ---------- */
.seccion { padding: 88px 0; }
.seccion.beige { background: var(--beige-claro); }
.seccion h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 22px; max-width: 24ch; }
.seccion .intro { font-size: 19px; color: var(--gris); max-width: 64ch; margin-bottom: 14px; }
.lead { font-size: 20px; max-width: 66ch; }
.texto p { max-width: 68ch; margin-bottom: 18px; }

/* ---------- Tarjetas de servicios ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 48px; }
.card {
  background: var(--blanco);
  border: 1px solid #E7E2D8;
  border-top: 3px solid var(--vida-prof);
  padding: 34px 28px 30px;
  display: flex; flex-direction: column;
}
.seccion.beige .card { background: var(--blanco); }
.card .num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .18em; color: var(--vida-prof);
  margin-bottom: 16px;
}
.card h3 { font-size: 22.5px; margin-bottom: 14px; }
.card p { font-size: 17px; color: var(--gris); flex-grow: 1; }
.card a { margin-top: 18px; font-size: 16px; color: var(--vida-prof); text-decoration: none; font-weight: 500; }
.card a:hover { text-decoration: underline; }

/* ---------- Frase destacada (diferencial) ---------- */
.frase {
  background: var(--azul);
  color: var(--blanco);
  padding: 86px 0;
}
.frase blockquote {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(21px, 2.8vw, 30px);
  font-weight: 480;
  line-height: 1.45;
  max-width: 26ch;
  margin: 0 auto;
  text-align: center;
}
.frase .acento { color: var(--vida); font-style: italic; }

/* ---------- Bloque persona ---------- */
.persona { display: grid; grid-template-columns: 200px 1fr; gap: 44px; align-items: center; }
.retrato {
  width: 200px; height: 240px;
  background: var(--azul);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.retrato img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.retrato .iniciales {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 52px; color: var(--vida); font-style: italic;
}
.persona p { max-width: 58ch; }
.persona .enlace { color: var(--vida-prof); font-weight: 500; text-decoration: none; font-size: 17px; }
.persona .enlace:hover { text-decoration: underline; }

/* ---------- Páginas de contenido (Servicios / Enfoque / Trayectoria) ---------- */
.bloque-servicio { padding: 64px 0; border-bottom: 1px solid #E7E2D8; }
.bloque-servicio:last-of-type { border-bottom: none; }
.bloque-servicio h2 { margin-bottom: 8px; }
.bloque-servicio .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--vida-prof); display: block; margin-bottom: 14px;
}
.alcances { margin: 26px 0 8px; padding: 0; list-style: none; }
.alcances li {
  padding: 18px 0;
  border-top: 2px solid var(--vida-prof);
}
.alcances li:last-child { border-bottom: 1px solid #E7E2D8; }
.alcances li strong {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--vida-prof);
  margin-bottom: 6px;
}
.alcances li span { color: var(--gris); font-size: 16.5px; display: block; margin-top: 2px; }
.nota-servicio { font-size: 16.5px; color: var(--gris); font-style: italic; max-width: 62ch; margin-top: 14px; }

/* Enfoque: secciones del ensayo */
.ensayo h2 { margin-top: 64px; }
.ensayo h2:first-of-type { margin-top: 0; }
.ensayo .divisor { width: 56px; height: 2px; background: var(--vida-prof); margin: 56px 0; }
.cierre-serif .acento { color: var(--vida-prof); font-style: normal; font-weight: 600; }
.cierre-serif {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 23px; font-style: italic; color: var(--azul);
  border-left: 3px solid var(--vida-prof);
  padding-left: 26px;
  max-width: 56ch;
  margin-top: 40px;
}

/* ---------- Contacto ---------- */
.contacto-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; margin-top: 12px; }
.dato { margin-bottom: 22px; }
.dato .etiqueta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--vida-prof); display: block; margin-bottom: 4px;
}
.dato a { color: var(--azul); text-decoration: none; font-weight: 500; }
.dato a:hover { color: var(--vida-prof); }

form .campo { margin-bottom: 20px; }
form label { display: block; font-size: 15.5px; font-weight: 500; color: var(--azul); margin-bottom: 6px; }
form input, form textarea {
  width: 100%;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 16.5px;
  padding: 12px 14px;
  border: 1px solid #D8D2C6;
  border-radius: 3px;
  background: var(--blanco);
  color: var(--tinta);
}
form input:focus, form textarea:focus { outline: 2px solid var(--vida-prof); outline-offset: 0; border-color: var(--vida-prof); }
form textarea { min-height: 140px; resize: vertical; }
.form-nota { font-size: 15px; color: var(--gris); margin-top: 10px; }

/* ---------- CTA final ---------- */
.cta-final { background: var(--beige); padding: 80px 0; text-align: center; }
.cta-final h2 { margin: 0 auto 16px; }
.cta-final p { color: var(--gris); max-width: 54ch; margin: 0 auto 32px; }

/* ---------- Footer ---------- */
.footer { background: var(--azul-prof); color: #A8B8D2; padding: 56px 0 40px; font-size: 16px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.footer .marca { font-family: 'Fraunces', Georgia, serif; font-size: 19px; color: var(--blanco); margin-bottom: 8px; }
.footer .marca .punto { color: var(--vida); }
.footer a { color: #C8D2E4; text-decoration: none; }
.footer a:hover { color: var(--vida); }
.footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer .legal { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 14px; color: #76879F; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .persona { grid-template-columns: 1fr; }
  .retrato { width: 160px; height: 192px; }
  .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .menu {
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--azul);
    flex-direction: column; gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: none;
  }
  .menu.abierto { display: flex; }
  .menu li { width: 100%; }
  .menu a { display: block; padding: 15px 24px; border-top: 1px solid rgba(255,255,255,0.08); }
  .menu-toggle { display: block; }
  .hero { padding: 76px 0 70px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-imagen { justify-content: center; }
  .hero-imagen img { max-width: 380px; opacity: 0.75; }
  .seccion { padding: 64px 0; }
}

.hero { position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }
.hero .motivo {
  position: absolute; right: -40px; top: 0; bottom: 0;
  width: 66%; height: 100%; z-index: 1;
  pointer-events: none;
}
@media (max-width: 860px) { .hero .motivo { opacity: .35; width: 100%; right: 0; } }

.marca-inline {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-style: normal;
  color: var(--azul);
  letter-spacing: 0.01em;
}
.frase .marca-inline { color: var(--blanco); }

@media (max-width: 560px) {
  .hero-imagen { display: none; }
}
