/* Plagirdo — hoja de estilo común
   Composición en capas horizontales, retícula de 12 columnas
   y avance escalonado de las secciones. */

:root {
  --bg: #f4f0e8;
  --bg-alt: #e7e1d5;
  --bg-deep: #ded6c6;
  --bg-dark: #20242a;
  --ink: #22201b;
  --ink-soft: #776f62;
  --ink-light: #f4f0e8;
  --blue: #2c4668;
  --ochre: #a06a2c;
  --gap: 24px;
  --pad-y: 88px;
  --pad-x: 52px;
  --shelf: 1216px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(32px, 5vw, 60px); }
h2 { font-size: clamp(25px, 3.1vw, 35px); }
h3 {
  font-size: clamp(19px, 1.7vw, 22px);
  margin-top: 52px;
  margin-bottom: 14px;
}

p { margin: 0 0 1.55em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

a:focus-visible,
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

/* ---------- capas y retícula ---------- */

.layer {
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg);
}

.layer--alt { background: var(--bg-alt); }
.layer--deep { background: var(--bg-deep); }

.layer--dark {
  background: var(--bg-dark);
  color: var(--ink-light);
}

.layer--dark h2,
.layer--dark h3 { color: var(--ink-light); }
.layer--dark a { color: #b9cbe4; }
.layer--dark a:focus-visible { outline-color: var(--ochre); }
.layer--dark .caption,
.layer--dark .lead-note { color: #b6ada0; }

.grid {
  max-width: var(--shelf);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
}

/* avance escalonado: 0, 1, 2, 3 columnas */
.step-0 { --start: 1; }
.step-1 { --start: 2; }
.step-2 { --start: 3; }
.step-3 { --start: 4; }

.column {
  grid-column: var(--start, 1) / span 6;
}

.column--wide {
  grid-column: var(--start, 1) / span 8;
}

/* ---------- cabecera en capas ---------- */

.masthead { background: var(--bg-alt); }

.masthead__bar {
  padding: 26px var(--pad-x);
  background: var(--bg-alt);
}

.bar-inner {
  max-width: var(--shelf);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px 40px;
}

.wordmark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--blue); }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 16px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 70, 104, 0.35);
  padding-bottom: 2px;
}

.nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--ochre); }

.masthead__title {
  background: var(--bg);
  padding: 104px var(--pad-x) 60px;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
}

.masthead__title .grid { width: 100%; }

.masthead__title h1 { grid-column: 1 / span 9; }

.masthead__intro {
  background: var(--bg-deep);
  padding: var(--pad-y) var(--pad-x);
}

.lead {
  font-size: clamp(19px, 1.6vw, 21px);
  line-height: 1.8;
}

.lead-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-top: 26px;
}

.topics {
  grid-column: 9 / span 4;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.65;
  align-self: end;
}

.topics li {
  padding: 9px 0;
  border-top: 1px solid rgba(119, 111, 98, 0.4);
}
.topics li:first-child { border-top: 2px solid var(--ochre); }

/* páginas interiores: cabecera de dos capas */

.masthead__title--inner {
  padding: 84px var(--pad-x) 56px;
  min-height: 0;
}

/* ---------- secciones ---------- */

.section-index {
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ochre);
  display: block;
  margin-bottom: 10px;
}

.section-body > h2 { margin-bottom: 28px; }

.plain-list,
.checklist {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  font-size: 17px;
  line-height: 1.75;
}

.plain-list li,
.checklist li {
  padding: 12px 0 12px 30px;
  border-top: 1px solid rgba(119, 111, 98, 0.35);
  position: relative;
}

.plain-list li::before,
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 23px;
  width: 14px;
  height: 2px;
  background: var(--blue);
}

.checklist li::before { background: var(--ochre); }

.layer--dark .plain-list li,
.layer--dark .checklist li { border-top-color: rgba(244, 240, 232, 0.22); }
.layer--dark .plain-list li::before { background: #8ba6c8; }

.list-heading {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ochre);
  margin-top: 46px;
  margin-bottom: 0;
}

/* ---------- imágenes ---------- */

.figure-main {
  grid-column: 4 / span 9;
  margin: 0;
}

.figure-main img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.caption {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 46ch;
}

.figure-detail {
  grid-column: 9 / span 4;
  margin: 0;
  align-self: start;
}

.figure-detail img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- contacto ---------- */

.contact-line {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 2.4vw, 28px);
  margin-top: 26px;
}

/* ---------- pie ---------- */

.site-footer {
  background: var(--bg-dark);
  color: var(--ink-light);
  padding: 76px var(--pad-x) 64px;
  margin-top: 0;
}

.footer-name {
  max-width: var(--shelf);
  margin: 0 auto 60px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 13vw, 168px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-light);
}

.footer-grid {
  max-width: var(--shelf);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px var(--gap);
}

.footer-col > span.rule {
  display: block;
  width: 44px;
  height: 2px;
  background: var(--ochre);
  margin-bottom: 18px;
}

.footer-col h2 {
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: #b6ada0;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.85;
}

.footer-col a { color: var(--ink-light); text-decoration: none; border-bottom: 1px solid rgba(160, 106, 44, 0.65); }
.footer-col a:hover { border-bottom-color: var(--ink-light); }
.footer-col a:focus-visible { outline-color: var(--ochre); }

.footer-col p {
  font-size: 15px;
  line-height: 1.75;
  color: #c6bdb0;
  margin: 0;
}

/* ---------- adaptación ---------- */

@media (max-width: 1080px) {
  :root { --pad-y: 72px; --pad-x: 40px; }
  .column { grid-column: var(--start, 1) / span 8; }
  .column--wide { grid-column: var(--start, 1) / span 10; }
  .figure-main { grid-column: 3 / span 10; }
  .topics { grid-column: var(--start, 1) / span 8; margin-top: 44px; }
  .masthead__title h1 { grid-column: 1 / span 11; }
  .figure-detail { grid-column: 7 / span 6; margin-top: 44px; }
}

@media (max-width: 820px) {
  :root { --pad-y: 60px; --pad-x: 28px; --gap: 16px; }
  body { font-size: 17px; line-height: 1.8; }
  .grid { grid-template-columns: 1fr; }
  .column,
  .column--wide,
  .figure-main,
  .figure-detail,
  .topics,
  .masthead__title h1 { grid-column: 1 / -1; }
  .figure-detail { margin-top: 36px; }
  .masthead__title {
    padding: 64px var(--pad-x) 44px;
    min-height: 0;
  }
  .masthead__title--inner { padding: 52px var(--pad-x) 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-name { margin-bottom: 44px; }
  h3 { margin-top: 40px; }
}

@media (max-width: 520px) {
  :root { --pad-y: 48px; --pad-x: 20px; }
  .bar-inner { gap: 14px 22px; }
  .nav ul { gap: 6px 20px; font-size: 15px; }
  .site-footer { padding: 56px var(--pad-x) 48px; }
  .plain-list li,
  .checklist li { padding-left: 24px; }
}
