/* ==========================================================================
   DEPUBAC — Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }

.section { padding: var(--sp-20) 0; }
.section--tight { padding: var(--sp-12) 0; }
.section--large { padding: var(--sp-24) 0; }
.section--cream { background-color: var(--color-cream); }

.section--ink {
  background-color: var(--color-ink);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 {
  color: var(--color-white);
}
.section--ink p { color: rgba(255, 255, 255, 0.85); }
.section--ink .eyebrow { color: var(--color-bio); }

/* Sección con imagen de fondo + overlay oscuro */
.section--bg-image {
  position: relative;
  color: var(--color-white);
  overflow: hidden;
  background: var(--color-ink);
}
.section--bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,45,92,0.88), rgba(14,45,92,0.94));
  z-index: 1;
}
.section--bg-image > .bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.section--bg-image > .bg-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.section--bg-image > .container { position: relative; z-index: 2; }
.section--bg-image h1, .section--bg-image h2, .section--bg-image h3, .section--bg-image h4 {
  color: var(--color-white);
}
.section--bg-image p { color: rgba(255, 255, 255, 0.9); }

/* Hero */
.hero {
  padding: calc(var(--nav-height) + var(--sp-20)) 0 var(--sp-24);
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-cream) 100%);
  position: relative;
  overflow: hidden;
}
.hero__content { max-width: 820px; }
.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-6);
  font-weight: var(--fw-medium);
}
.hero__title .accent {
  color: var(--color-blue);
  font-weight: var(--fw-medium);
}
.hero__lead {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.35;
  color: var(--color-slate-700);
  margin-bottom: var(--sp-10);
  max-width: 700px;
  font-weight: var(--fw-regular);
}
.hero__cta-group {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Hero claro con imagen visible + overlay que aclara solo la zona del texto */
.hero--light {
  padding: calc(var(--nav-height) + var(--sp-16)) 0 var(--sp-20);
  color: var(--color-ink);
  position: relative;
  overflow: hidden;
  background: var(--color-cream);
}
.hero--light .hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero--light .hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.72;
}
.hero--light::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg,
    rgba(255,255,255,0.92) 0%,
    rgba(255,255,255,0.78) 35%,
    rgba(255,255,255,0.35) 70%,
    rgba(255,255,255,0.1) 100%);
  z-index: 1;
}
.hero--light > .container { position: relative; z-index: 2; }
.hero--light .hero__title { color: var(--color-ink); }
.hero--light .hero__title .accent {
  color: var(--color-bio);
  background: #fff;
  padding: 0 0.18em;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero--light .hero__lead { color: var(--color-slate-700); }
.hero--light .eyebrow { color: var(--color-blue); }

/* Imagen debajo del hero, solo visible en móvil */
.hero-mobile-image { display: none; }
.hero-mobile-image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 640px) {
  /* En móvil: el hero queda limpio con fondo cream, sin imagen ni overlay */
  .hero--light .hero__bg { display: none; }
  .hero--light::after { display: none; }
  .hero--light { background: var(--color-cream); }

  /* Y aparece la imagen a ancho completo debajo, con su color original */
  .hero-mobile-image { display: block; }

  /* En móvil no hace falta el fondo blanco tras la palabra "biología" */
  .hero--light .hero__title .accent {
    background: transparent;
    padding: 0;
    border-radius: 0;
  }
}

/* Hero con imagen de fondo */
.hero--visual {
  padding: calc(var(--nav-height) + var(--sp-16)) 0 var(--sp-20);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  background: var(--color-ink);
}
.hero--visual .hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero--visual .hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero--visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(14,45,92,0.95) 0%, rgba(14,45,92,0.82) 45%, rgba(14,45,92,0.45) 100%);
  z-index: 1;
}
.hero--visual > .container { position: relative; z-index: 2; }
.hero--visual .hero__title { color: var(--color-white); }
.hero--visual .hero__title .accent { color: var(--color-bio); }
.hero--visual .hero__lead { color: rgba(255,255,255,0.9); }
.hero--visual .eyebrow { color: var(--color-bio); }

/* Grid */
.grid { display: grid; gap: var(--sp-8); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2x2 { grid-template-columns: repeat(2, 1fr); }
.grid--pillars { grid-template-columns: repeat(3, 1fr); gap: var(--sp-12); }

/* Split */
.split {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--sp-16);
  align-items: start;
}
.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }
.split__aside .eyebrow { margin-bottom: var(--sp-6); }
.split__aside .section-title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  line-height: 1.1;
  color: var(--color-ink);
  font-weight: var(--fw-medium);
  letter-spacing: -0.025em;
}

/* Split con imagen */
.split--with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}

/* Section header */
.section-header {
  max-width: 780px;
  margin-bottom: var(--sp-12);
}
.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-header__title {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  line-height: 1.1;
  margin-bottom: var(--sp-4);
  color: var(--color-ink);
  font-weight: var(--fw-medium);
  letter-spacing: -0.025em;
}
.section-header__lead {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.35;
  color: var(--color-slate-600);
  font-weight: var(--fw-regular);
}

.prose { max-width: 780px; }
.prose p { font-size: var(--fs-md); line-height: 1.75; }
.prose p + p { margin-top: var(--sp-5); }
.prose h3 { margin-top: var(--sp-12); margin-bottom: var(--sp-4); font-size: var(--fs-2xl); }
.prose h4 { margin-top: var(--sp-8); margin-bottom: var(--sp-3); }

/* Page header */
.page-header {
  padding: calc(var(--nav-height) + var(--sp-16)) 0 var(--sp-12);
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-cream) 100%);
}
.page-header__title {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  line-height: 1.1;
  margin-bottom: var(--sp-5);
  max-width: 900px;
  color: var(--color-ink);
  font-weight: var(--fw-medium);
  letter-spacing: -0.03em;
}
.page-header__lead {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.4;
  color: var(--color-slate-600);
  max-width: 780px;
  font-weight: var(--fw-regular);
}

/* Page header claro con imagen aclarada de fondo */
.page-header--light {
  padding: calc(var(--nav-height) + var(--sp-20)) 0 var(--sp-16);
  background: var(--color-cream);
  position: relative;
  overflow: hidden;
}
.page-header--light .bg-image {
  position: absolute; inset: 0; z-index: 0;
}
.page-header--light .bg-image img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.28;
}
.page-header--light::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg,
    rgba(255,255,255,0.95) 0%,
    rgba(248,249,251,0.88) 45%,
    rgba(248,249,251,0.55) 100%);
  z-index: 1;
}
.page-header--light > .container { position: relative; z-index: 2; }
.page-header--light .eyebrow { color: var(--color-blue); }
.page-header--light .page-header__title { color: var(--color-ink); }
.page-header--light .page-header__lead { color: var(--color-slate-700); }

/* Page header con imagen de fondo */
.page-header--visual {
  padding: calc(var(--nav-height) + var(--sp-20)) 0 var(--sp-16);
  background: var(--color-ink);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}
.page-header--visual .bg-image {
  position: absolute; inset: 0; z-index: 0;
}
.page-header--visual .bg-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.page-header--visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(14,45,92,0.94) 0%, rgba(14,45,92,0.82) 45%, rgba(14,45,92,0.5) 100%);
  z-index: 1;
}
.page-header--visual > .container { position: relative; z-index: 2; }
.page-header--visual .page-header__title { color: var(--color-white); }
.page-header--visual .page-header__lead { color: rgba(255,255,255,0.9); }
.page-header--visual .eyebrow { color: var(--color-bio); }
