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

:root {
  --bg: #f5f4f0;
  --bg-alt: #e2ded4;
  --bg-deep: #14456b;
  --ink: #1c1e20;
  --ink-soft: #6a6d6e;
  --ink-inv: #f5f4f0;
  --accent: #c2522f;
  --accent-2: #1d6b8f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gap: 24px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  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; }
a:hover { text-decoration-thickness: 2px; }

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

/* ---------- rejilla ---------- */

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

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.6vw, 4.3rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.12; }
h3 { font-size: 1.18rem; line-height: 1.2; }

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

.lead { font-size: 1.12rem; }

.cap,
figcaption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

.num {
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 14px;
}

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

.site-header { padding-top: 30px; }

.head-row { align-items: baseline; row-gap: 12px; }

.brand {
  grid-column: 1 / 5;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand a { color: var(--ink); text-decoration: none; }

.mainnav { grid-column: 5 / 13; }

.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 26px;
}

.mainnav a {
  font-size: 13px;
  letter-spacing: 0.09em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

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

.rule-5 {
  grid-column: 1 / 6;
  height: 1px;
  background: var(--accent);
  margin-top: 18px;
}

/* ---------- portada ---------- */

.hero { padding-top: 56px; }

.hero-head { row-gap: 32px; }

.hero-title {
  grid-column: 1 / 8;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: var(--gap);
}

.hero-title .l1 { grid-column: 3 / 8; display: block; }
.hero-title .l2 { grid-column: 1 / 8; display: block; }

.hero-index {
  grid-column: 10 / 13;
  align-self: end;
}

.hero-index ul { list-style: none; margin: 0; padding: 0; }

.hero-index li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 9px 0;
  border-top: 1px solid rgba(28, 30, 32, 0.18);
}

.hero-index li:last-child { border-bottom: 1px solid rgba(28, 30, 32, 0.18); }

.hero-media { margin-top: 48px; align-items: end; row-gap: 20px; }

.hero-media .cap { grid-column: 1 / 4; }

.hero-fig {
  grid-column: 8 / 13;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--accent);
}

.hero-fig img { width: 100%; }

.hero-intro { margin-top: 48px; }
.hero-intro .col { grid-column: 1 / 7; }

/* ---------- secciones de texto ---------- */

.band { padding: 64px 0; }
.band--alt { background: var(--bg-alt); }

.stack > section + section { margin-top: 64px; }

.sec .col { grid-column: 1 / 7; }
.sec:nth-of-type(3n) .col { grid-column: 4 / 10; }

.sep {
  display: block;
  width: calc(2 / 6 * 100% + var(--gap) / 6);
  height: 1px;
  background: var(--accent);
  margin: 0 0 24px;
}

.sec h2 { margin-bottom: 20px; }
.sec h3 { margin: 32px 0 14px; }

ul.list, ol.list { margin: 0 0 20px; padding-left: 0; list-style: none; }

ul.list li,
ol.list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

ul.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 12px;
  height: 1px;
  background: var(--accent);
}

ol.list { counter-reset: paso; }

ol.list li::before {
  counter-increment: paso;
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
  color: var(--accent-2);
  line-height: 1.9;
}

/* ---------- sección de contraste ---------- */

.deep {
  background: var(--bg-deep);
  color: var(--ink-inv);
  padding: 72px 0;
  margin: 64px 0;
}

.deep h2 { color: var(--ink-inv); margin-bottom: 20px; }
.deep .num { color: #9fc6dd; }
.deep .cap, .deep figcaption { color: #b9c9d6; }
.deep a { color: #f0b39c; }
.deep .sep { background: #f0b39c; }

.deep-grid { row-gap: 32px; align-items: start; }

.deep-fig {
  grid-column: 1 / 6;
  margin: 0;
}

.deep-fig img { width: 100%; }
.deep-fig figcaption { margin-top: 12px; }

.deep-text { grid-column: 7 / 13; }

.deep ul.list li::before { background: #f0b39c; }

/* ---------- página interior ---------- */

.page-head { padding: 56px 0 0; }
.page-head h1 { grid-column: 1 / 9; }
.page-head .cap { grid-column: 1 / 7; margin-top: 20px; }

.narrow { padding: 56px 0 0; }
.narrow .col { grid-column: 1 / 7; }
.narrow section + section { margin-top: 56px; }

.narrow h2 {
  position: relative;
  padding-left: 40px;
  margin-bottom: 20px;
}

.narrow h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.narrow h3 { margin: 28px 0 12px; }

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

.site-footer { padding: 72px 0 56px; margin-top: 80px; }
.site-footer .rule-5 { margin: 0 0 28px; }
.foot-grid { row-gap: 28px; }

.foot-a { grid-column: 1 / 6; }
.foot-b { grid-column: 6 / 9; }
.foot-c { grid-column: 9 / 13; }

.foot-a .name {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; font-size: 15px; }
.site-footer .foot-b a { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(28, 30, 32, 0.25); }
.site-footer .foot-b a:hover { border-bottom-color: var(--accent); }
.site-footer .cap { margin-top: 12px; }

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

@media (max-width: 1000px) {
  .brand { grid-column: 1 / 13; }
  .mainnav { grid-column: 1 / 13; }
  .mainnav ul { justify-content: flex-start; }
  .rule-5 { grid-column: 1 / 8; }

  .hero-title, .hero-index, .hero-media .cap, .hero-fig,
  .hero-intro .col, .sec .col, .sec:nth-of-type(3n) .col,
  .deep-fig, .deep-text, .page-head h1, .page-head .cap,
  .narrow .col, .foot-a, .foot-b, .foot-c { grid-column: 1 / 13; }

  .hero-title { grid-template-columns: repeat(6, 1fr); }
  .hero-title .l1 { grid-column: 2 / 7; }
  .hero-title .l2 { grid-column: 1 / 7; }

  .hero-fig { max-width: 520px; margin-left: auto; }
  .deep-fig { max-width: 460px; }
  .sep { width: 96px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding-top: 36px; }
  .hero-media { margin-top: 32px; }
  .hero-intro { margin-top: 32px; }
  .band { padding: 40px 0; }
  .stack > section + section { margin-top: 40px; }
  .deep { padding: 48px 0; margin: 40px 0; }
  .narrow section + section { margin-top: 40px; }
  .hero-title .l1 { grid-column: 1 / 7; }
  .hero-fig, .deep-fig { max-width: none; }
  .site-footer { margin-top: 48px; padding: 48px 0 40px; }
  .mainnav ul { gap: 6px 18px; }
}
