/* Satate — hoja de estilos común */

:root {
  --bg: #f6f1e7;
  --bg-alt: #ece4d6;
  --bg-dark: #1a2340;
  --ink: #12182b;
  --muted: #6b6858;
  --on-dark: #f6f1e7;
  --accent: #e2a93b;
  --accent-2: #b4472f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step: 80px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; }

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

a:hover { text-decoration-color: var(--accent-2); }

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

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

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

.site-header {
  padding-top: 26px;
  padding-bottom: 26px;
}

.site-header .brand {
  grid-column: 1 / 5;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.02em;
  font-weight: 700;
  text-decoration: none;
  align-self: center;
}

.site-header .brand span {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 2px;
}

.site-nav {
  grid-column: 5 / 13;
  align-self: center;
}

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

.site-nav a {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

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

/* ---------- hero ---------- */

.hero { padding-top: 56px; padding-bottom: 0; }

.hero h1 {
  grid-column: 1 / 8;
  margin: 0;
  font-size: 58px;
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.hero-intro {
  grid-column: 9 / 13;
  margin: 8px 0 0;
  align-self: start;
}

.hero-intro p { margin: 0 0 16px; }

.hero-intro p:last-child { margin-bottom: 0; }

.hero-kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--accent-2);
  margin: 0 0 10px;
}

/* eje gráfico bajo el titular */

.axis {
  grid-column: 1 / 8;
  position: relative;
  height: 104px;
  margin-top: 34px;
}

.axis-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}

.axis-drop {
  position: absolute;
  top: 0;
  width: 1px;
  background: var(--accent);
}

.axis-drop::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -8px;
  width: 8px;
  height: 8px;
  background: var(--accent-2);
}

.axis-drop.d1 { left: 0; height: 62px; }
.axis-drop.d2 { left: 34%; height: 96px; }
.axis-drop.d3 { left: 71%; height: 40px; }

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

.main-figure {
  margin: 0;
  padding-top: 46px;
  padding-bottom: var(--step);
}

.main-figure img {
  grid-column: 4 / 13;
  grid-row: 1;
  width: 100%;
  height: auto;
  display: block;
}

.main-figure figcaption {
  grid-column: 1 / 4;
  grid-row: 1;
  align-self: end;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  padding-bottom: 4px;
  padding-right: 10px;
}

.main-figure figcaption b {
  display: block;
  color: var(--accent-2);
  font-weight: 400;
  margin-bottom: 4px;
}

/* ---------- bandas y secciones ---------- */

.band { background: var(--bg-alt); }
.band-dark { background: var(--bg-dark); color: var(--on-dark); }

.section {
  padding-top: var(--step);
  padding-bottom: var(--step);
}

.section h2 {
  grid-column: 1 / 4;
  margin: 0;
  padding-top: 2px;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section h2::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-bottom: 20px;
}

.section .col {
  grid-column: 4 / 11;
}

.section .col > :first-child { margin-top: 0; }
.section .col > :last-child { margin-bottom: 0; }

.section p { margin: 0 0 22px; }

.section h3 {
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  margin: 32px 0 10px;
}

.section ul,
.section ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.section li { margin-bottom: 10px; }

.section ul { list-style: none; padding-left: 0; }

.section ul > li {
  position: relative;
  padding-left: 26px;
}

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

.section ol { list-style: none; counter-reset: paso; padding-left: 0; }

.section ol > li {
  position: relative;
  padding-left: 34px;
  counter-increment: paso;
}

.section ol > li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--accent-2);
}

.note {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* sección contrastada con imagen de detalle */

.band-dark .section h2 { color: var(--on-dark); }
.band-dark .section h2::before { background: var(--accent); }
.band-dark a { color: var(--on-dark); }

.detail {
  padding-top: var(--step);
  padding-bottom: var(--step);
}

.detail h2 {
  grid-column: 1 / 13;
  margin: 0 0 40px;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 700;
}

.detail h2::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-bottom: 20px;
}

.detail figure {
  grid-column: 1 / 6;
  margin: 0;
}

.detail figure img {
  width: 100%;
  height: auto;
  display: block;
}

.detail figcaption {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  color: #b9b3a2;
  margin-top: 12px;
}

.detail .col {
  grid-column: 7 / 13;
}

.detail .col > :first-child { margin-top: 0; }
.detail .col > :last-child { margin-bottom: 0; }

.detail p { margin: 0 0 22px; }

.detail h3 {
  font-size: 20px;
  font-style: italic;
  font-weight: 400;
  margin: 30px 0 10px;
}

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

.detail li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

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

/* ---------- composición de páginas interiores ---------- */

.page-head {
  padding-top: 52px;
  padding-bottom: 40px;
}

.page-head h1 {
  grid-column: 1 / 9;
  margin: 0;
  font-size: 46px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.page-head .lead {
  grid-column: 9 / 13;
  align-self: end;
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.page-head .axis {
  grid-column: 1 / 9;
  height: 72px;
  margin-top: 28px;
}

.page-head .axis-drop.d1 { height: 44px; }
.page-head .axis-drop.d2 { height: 66px; }
.page-head .axis-drop.d3 { height: 30px; }

/* rejilla de dos ejes con línea continua (Sobre el proyecto y legales) */

.axis-grid {
  padding-top: 24px;
  padding-bottom: var(--step);
  row-gap: 44px;
}

.axis-grid .rail {
  grid-column: 4 / 5;
  grid-row: 1 / -1;
  justify-self: center;
  width: 1px;
  background: rgba(18, 24, 43, 0.22);
}

.axis-grid h2 {
  grid-column: 1 / 4;
  margin: 0;
  padding-top: 2px;
  padding-right: 20px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
}

.axis-grid .col { grid-column: 5 / 12; }

.axis-grid .col > :first-child { margin-top: 0; }
.axis-grid .col > :last-child { margin-bottom: 0; }

.axis-grid p { margin: 0 0 20px; }

.axis-grid h3 {
  font-size: 19px;
  font-style: italic;
  font-weight: 400;
  margin: 26px 0 8px;
}

.axis-grid ul { list-style: none; margin: 0 0 20px; padding: 0; }

.axis-grid li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

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

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

.site-footer {
  background: var(--bg-dark);
  color: var(--on-dark);
  padding-top: 56px;
  padding-bottom: 56px;
}

.footer-top {
  grid-column: 1 / 13;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  justify-content: space-between;
}

.footer-top .name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer-top a {
  color: var(--on-dark);
  font-size: 19px;
  text-decoration-color: var(--accent);
}

.footer-rule {
  grid-column: 1 / 13;
  height: 1px;
  background: rgba(246, 241, 231, 0.28);
  margin: 26px 0 22px;
}

.footer-links {
  grid-column: 1 / 13;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

.footer-links a {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--on-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(226, 169, 59, 0.7);
  padding-bottom: 2px;
}

.footer-links a:hover { border-bottom-color: var(--accent-2); }

.footer-note {
  grid-column: 1 / 9;
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
  color: #b9b3a2;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  background: var(--bg);
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 13px;
}

/* ---------- adaptación a pantallas medias ---------- */

@media (max-width: 1000px) {
  .hero h1 { font-size: 46px; }
  .section h2 { grid-column: 1 / 5; }
  .section .col { grid-column: 5 / 13; }
  .axis-grid h2 { grid-column: 1 / 5; }
  .axis-grid .rail { grid-column: 5 / 6; }
  .axis-grid .col { grid-column: 6 / 13; }
  .main-figure img { grid-column: 3 / 13; }
  .main-figure figcaption { grid-column: 1 / 3; }
  .detail figure { grid-column: 1 / 7; }
  .detail .col { grid-column: 7 / 13; }
}

/* ---------- adaptación a móvil ---------- */

@media (max-width: 760px) {
  :root { --step: 48px; }

  body { font-size: 17px; }

  .grid {
    padding-left: 20px;
    padding-right: 20px;
    column-gap: 0;
  }

  .site-header { padding-top: 20px; padding-bottom: 18px; }

  .site-header .brand,
  .site-nav,
  .hero h1,
  .hero-intro,
  .axis,
  .page-head h1,
  .page-head .lead,
  .page-head .axis,
  .main-figure img,
  .main-figure figcaption,
  .section h2,
  .section .col,
  .detail h2,
  .detail figure,
  .detail .col,
  .axis-grid h2,
  .axis-grid .col,
  .footer-top,
  .footer-rule,
  .footer-links,
  .footer-note {
    grid-column: 1 / 13;
  }

  .site-nav { margin-top: 14px; }
  .site-nav ul { justify-content: flex-start; gap: 8px 20px; }

  .hero { padding-top: 32px; }
  .hero h1 { font-size: 34px; }
  .hero-intro { margin-top: 26px; }
  .axis { height: 74px; margin-top: 26px; }
  .axis-drop.d2 { height: 66px; }
  .axis-drop.d3 { height: 34px; }

  .main-figure { padding-top: 32px; }
  .main-figure img { grid-row: 1; }
  .main-figure figcaption {
    grid-row: 2;
    padding-top: 12px;
    padding-bottom: 0;
    padding-right: 0;
  }

  .page-head h1 { font-size: 32px; }
  .page-head .lead { margin-top: 22px; }
  .page-head .axis { height: 60px; }

  .section h2 { margin-bottom: 22px; font-size: 24px; }
  .detail h2 { font-size: 24px; }
  .detail .col { margin-top: 30px; }

  .axis-grid { row-gap: 0; }
  .axis-grid .rail { display: none; }
  .axis-grid h2 { margin-bottom: 18px; font-size: 22px; }
  .axis-grid .col { margin-bottom: 36px; }

  .footer-top .name { font-size: 24px; }
  .footer-top a { font-size: 17px; }
}
