/* Griranderde — hoja de estilo general */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #eef0f2;
  color: #151a20;
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #2c4a7c; text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
:focus-visible {
  outline: 3px solid #2c4a7c;
  outline-offset: 3px;
}

.tone-dark a { color: #eef0f2; }
.tone-dark a:focus-visible { outline-color: #eef0f2; }

/* ---------- rejilla de 12 columnas ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 26px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

.s0 { grid-column: 1 / span 6; }
.s1 { grid-column: 2 / span 6; }
.s2 { grid-column: 3 / span 6; }
.s3 { grid-column: 4 / span 6; }

/* ---------- capas y tonos ---------- */

.layer { width: 100%; }
.tone-a { background: #eef0f2; }
.tone-b { background: #dfe3e7; }
.tone-c { background: #d3d9de; }
.tone-dark { background: #1b2733; color: #eef0f2; }
.tone-dark .meta { color: #b6c0cb; }
.tone-dark .num { color: #d18b57; }

section { padding: 88px 0; }
.pad-s { padding: 52px 0; }

/* ---------- tipografía ---------- */

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0;
  max-width: 15ch;
}

h2 {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 22px;
}

h3 {
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 34px 0 10px;
}

p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }

.meta,
figcaption {
  font-size: 13px;
  line-height: 1.55;
  color: #636d78;
}

.num {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #a35a2a;
  margin-bottom: 14px;
}

.lead { font-size: 1.12rem; line-height: 1.65; }

/* ---------- listas ---------- */

ul.marks, ol.marks { margin: 24px 0 0; padding: 0; list-style: none; }
ul.marks li, ol.marks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
}
ul.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 2px;
  background: #2c4a7c;
}
ol.marks { counter-reset: paso; }
ol.marks li { padding-left: 34px; }
ol.marks li::before {
  counter-increment: paso;
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
  font-weight: 600;
  color: #a35a2a;
  line-height: 1.9;
}
.tone-dark ul.marks li::before { background: #7f9dc9; }

dl.faults { margin: 26px 0 0; }
dl.faults dt { font-weight: 600; margin-top: 18px; }
dl.faults dd { margin: 4px 0 0; color: #151a20; }

/* ---------- cabecera y navegación ---------- */

.topbar { padding: 16px 0 14px; }
.topbar .grid { align-items: baseline; }

.brand {
  grid-column: 1 / span 3;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #151a20;
}
.brand:hover { text-decoration: underline; }

.mainnav { grid-column: 5 / span 8; }
.mainnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}
.mainnav a {
  font-size: 14px;
  color: #151a20;
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.mainnav a:hover { border-bottom-color: #2c4a7c; }
.mainnav a[aria-current="page"] { border-bottom-color: #a35a2a; }

/* ---------- hero de tres capas ---------- */

.hero-mid { padding: 108px 0 46px; }
.hero-mid .grid { align-items: end; }
.hero-mid h1 { grid-column: 1 / span 9; }

.hero-low { padding: 46px 0 62px; }
.hero-low .intro { grid-column: 1 / span 6; }
.hero-low .topics { grid-column: 8 / span 5; }
.hero-low .topics h2 {
  font-size: 13px;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: #a35a2a;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.hero-low .topics ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.hero-low .topics li { padding: 7px 0; border-top: 1px solid rgba(99,109,120,0.35); }
.hero-low .topics li:last-child { border-bottom: 1px solid rgba(99,109,120,0.35); }

/* ---------- imagen principal ---------- */

.figure-main { padding: 0 0 72px; }
.figure-main figure { grid-column: 4 / span 9; margin: 0; }
.figure-main figcaption { margin-top: 12px; max-width: 62ch; }

/* ---------- sección oscura con imagen de detalle ---------- */

.split .art { grid-column: 2 / span 4; margin: 0; }
.split .art figcaption { margin-top: 12px; }
.split .body { grid-column: 7 / span 6; }
.split .body h2 { margin-top: 0; }

/* ---------- pie de página ---------- */

.site-footer { background: #1b2733; color: #eef0f2; padding: 72px 0 56px; }
.footer-name {
  grid-column: 1 / span 12;
  font-size: clamp(2.2rem, 8vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0 0 54px;
}
.fcol { grid-column: span 4; }
.fcol h2 {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #d18b57;
  margin: 0 0 14px;
  padding-top: 14px;
  border-top: 2px solid #a35a2a;
}
.fcol ul { list-style: none; margin: 0; padding: 0; }
.fcol li { margin-bottom: 8px; }
.fcol a { color: #eef0f2; }
.fcol p { font-size: 15px; color: #b6c0cb; }
.footer-note {
  grid-column: 1 / span 12;
  margin-top: 44px;
  font-size: 13px;
  color: #b6c0cb;
}

/* ---------- páginas interiores ---------- */

.page-head { padding: 96px 0 60px; }
.page-head h1 { grid-column: 1 / span 9; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; }
.page-head .meta { grid-column: 1 / span 6; margin-top: 26px; }

/* ---------- adaptación a pantallas medias y pequeñas ---------- */

@media (max-width: 1040px) {
  .grid { column-gap: 20px; padding: 0 28px; }
  .hero-low .intro { grid-column: 1 / span 7; }
  .hero-low .topics { grid-column: 8 / span 5; }
  .figure-main figure { grid-column: 3 / span 10; }
  .split .art { grid-column: 1 / span 5; }
  .split .body { grid-column: 6 / span 7; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding: 0 22px;
  }
  .s0, .s1, .s2, .s3,
  .brand, .mainnav,
  .hero-mid h1,
  .hero-low .intro, .hero-low .topics,
  .figure-main figure,
  .split .art, .split .body,
  .footer-name, .fcol, .footer-note,
  .page-head h1, .page-head .meta {
    grid-column: 1 / -1;
  }
  section { padding: 52px 0; }
  .topbar { padding: 14px 0 12px; }
  .mainnav { margin-top: 12px; }
  .mainnav ul { justify-content: flex-start; gap: 8px 20px; }
  .hero-mid { padding: 56px 0 32px; }
  .hero-low { padding: 32px 0 44px; }
  .hero-low .topics { margin-top: 34px; }
  .figure-main { padding-bottom: 44px; }
  .split .body { margin-top: 32px; }
  .site-footer { padding: 52px 0 44px; }
  .footer-name { margin-bottom: 34px; }
  .fcol { margin-bottom: 28px; }
  .page-head { padding: 52px 0 36px; }
  h1 { max-width: none; }
}
