/* Grintetro — hoja de estilo común */

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

:root {
  --paper: #f4eee1;
  --paper-alt: #e8dfcc;
  --dark: #141414;
  --ink: #1a1814;
  --muted: #736c5b;
  --light: #f4eee1;
  --accent: #2b4a8c;
  --ochre: #8a6a1e;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gap: 24px;
  --rhythm: 88px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

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

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

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

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

/* ---------- Tipografía ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; }

h1 {
  font-size: clamp(2.2rem, 5.4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h1 .l { display: block; }
h1 .l + .l { text-indent: 0; }

h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  line-height: 1.25;
  margin-bottom: 22px;
}

h3 {
  font-size: 1.06rem;
  line-height: 1.4;
  margin: 34px 0 10px;
}

p { margin: 0 0 20px; max-width: 72ch; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 1.06rem;
  color: var(--ink);
  max-width: 46ch;
}

.cap {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* ---------- Cabecera ---------- */

.masthead {
  border-bottom: 1px solid rgba(26, 24, 20, 0.16);
  background: var(--paper);
}

.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 32px;
  padding-top: 20px;
  padding-bottom: 18px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { text-decoration: underline; text-underline-offset: 4px; }

.sitenav { margin-left: auto; }

.sitenav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 0;
  padding: 0;
}

.sitenav a {
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.sitenav a:hover { border-bottom-color: var(--accent); }
.sitenav a[aria-current="page"] { border-bottom-color: var(--ochre); }

/* ---------- Hero ---------- */

.hero { padding: 64px 0 76px; }

.hero .grid12 { row-gap: 46px; }

.hero-rail {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  border-right: 1px solid rgba(26, 24, 20, 0.18);
  padding-right: 18px;
}

.hero-rail ol { list-style: none; margin: 0; padding: 0; }

.hero-rail li { margin-bottom: 16px; }

.hero-rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
  text-decoration: none;
}

.hero-rail a::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--ochre);
}

.hero-rail a:hover { color: var(--accent); }
.hero-rail a:hover::before { background: var(--accent); }

.hero-rail .rail-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin: 22px 0 0;
  line-height: 1.5;
}

.hero-body { grid-column: 3 / 13; grid-row: 1; }

.hero-body .lede { margin-top: 30px; }

.hero-figure {
  grid-column: 7 / 13;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  width: 100%;
  max-width: 620px;
  margin: 0;
}

.framed {
  border: 2px solid var(--ink);
  padding: 0;
  line-height: 0;
}

.hero-figure figcaption {
  margin-top: 10px;
  text-align: right;
}

/* ---------- Perforaciones ---------- */

.perf {
  height: 10px;
  background-image: linear-gradient(to right, rgba(26, 24, 20, 0.4) 0 6px, transparent 6px 100%);
  background-size: 16px 6px;
  background-repeat: repeat-x;
  background-position: 0 2px;
}

.perf--light {
  background-image: linear-gradient(to right, rgba(244, 238, 225, 0.5) 0 6px, transparent 6px 100%);
}

/* ---------- Escenas ---------- */

.scene { padding: var(--rhythm) 0; }
.scene--alt { background: var(--paper-alt); }
.scene--dark { background: var(--dark); color: var(--light); }
.scene--dark h2, .scene--dark h3 { color: var(--light); }
.scene--dark a { color: var(--light); }
.scene--dark .cap { color: rgba(244, 238, 225, 0.72); }

.scene-mark { grid-column: 1 / 3; }

.scene-mark span {
  display: block;
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ochre);
  letter-spacing: 0.04em;
}

.scene-mark::after {
  content: "";
  display: block;
  height: 1px;
  background: rgba(138, 106, 30, 0.55);
  margin-top: 12px;
}

.scene--dark .scene-mark span { color: var(--light); }
.scene--dark .scene-mark::after { background: rgba(138, 106, 30, 0.9); }

.scene-body { grid-column: 3 / 10; }
.scene-wide { grid-column: 3 / 12; }

.scene .grid12 { row-gap: 30px; }

/* Listas */

.checklist, .plain-list {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
}

.checklist li, .plain-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
  break-inside: avoid;
}

.checklist li::before, .plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.scene--dark .checklist li::before { background: var(--light); }

.two-col { columns: 2; column-gap: 46px; }

.term { font-family: var(--serif); font-size: 1.02rem; }

/* Escena en contraste con imagen de detalle */

.detail-figure {
  grid-column: 3 / 7;
  margin: 0;
  max-width: 420px;
}

.detail-figure figcaption { margin-top: 10px; }

.detail-text { grid-column: 8 / 13; }

.scene--dark .framed { border-color: rgba(244, 238, 225, 0.75); }

/* ---------- Bloques numerados (About) ---------- */

.block { padding: 38px 0; border-top: 1px solid rgba(26, 24, 20, 0.18); }
.block:first-of-type { border-top: none; padding-top: 8px; }
.block-num { grid-column: 1 / 3; }

.block-num span {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ochre);
}

.block-body { grid-column: 3 / 10; }

/* ---------- Páginas de texto ---------- */

.page-head { padding: 62px 0 30px; }
.page-head .grid12 { row-gap: 26px; }
.page-head h1 { grid-column: 3 / 12; font-size: clamp(1.9rem, 3.8vw, 3rem); }
.page-head .kicker { grid-column: 1 / 3; }

.kicker {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ochre);
  margin: 0;
}

.page-body { padding: 20px 0 var(--rhythm); }

.contact-line {
  margin-top: 26px;
  font-family: var(--serif);
  font-size: 1.1rem;
}

.contact-line span { display: block; }

/* ---------- Pie ---------- */

.site-footer { background: var(--dark); color: var(--light); margin-top: 0; }
.site-footer .perf { margin-bottom: 46px; }
.site-footer .wrap { padding-bottom: 54px; }

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px var(--gap);
}

.footer-name { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 12px; }
.site-footer p { color: rgba(244, 238, 225, 0.82); font-size: 15px; max-width: 46ch; }
.site-footer a { color: var(--light); }

.footer-nav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(244, 238, 225, 0.4); }
.footer-nav a:hover { border-bottom-color: var(--light); }

.footer-mail { font-family: var(--serif); font-size: 1.05rem; }

/* ---------- Adaptación ---------- */

@media (max-width: 1000px) {
  .hero-body { grid-column: 3 / 13; }
  .hero-figure { grid-column: 4 / 13; }
  .scene-body { grid-column: 3 / 12; }
  .detail-figure { grid-column: 3 / 8; }
  .detail-text { grid-column: 3 / 12; }
  .block-body { grid-column: 3 / 12; }
}

@media (max-width: 720px) {
  :root { --rhythm: 52px; --gap: 16px; }

  body { font-size: 16px; line-height: 1.75; }

  .wrap { padding: 0 20px; }

  .grid12 { grid-template-columns: repeat(6, 1fr); }

  .masthead .wrap { padding-top: 16px; padding-bottom: 14px; }
  .sitenav { margin-left: 0; width: 100%; }
  .sitenav ul { gap: 6px 18px; }

  .hero { padding: 34px 0 46px; }
  .hero .grid12 { row-gap: 28px; }

  .hero-rail {
    grid-column: 1 / 7;
    grid-row: auto;
    border-right: none;
    border-bottom: 1px solid rgba(26, 24, 20, 0.18);
    padding-right: 0;
    padding-bottom: 16px;
  }

  .hero-rail ol { display: flex; flex-wrap: wrap; gap: 8px 20px; }
  .hero-rail li { margin-bottom: 0; }
  .hero-rail .rail-note { margin-top: 14px; }

  .hero-body, .hero-figure,
  .scene-mark, .scene-body, .scene-wide,
  .detail-figure, .detail-text,
  .block-num, .block-body,
  .page-head h1, .page-head .kicker {
    grid-column: 1 / 7;
    grid-row: auto;
  }

  .hero-figure { justify-self: stretch; max-width: 100%; }
  .hero-figure figcaption { text-align: left; }

  .scene-mark::after { margin-top: 8px; }

  .detail-figure { max-width: 100%; }

  .two-col { columns: 1; }

  .footer-cols { grid-template-columns: 1fr; }
}
