/* Metado — hoja de estilos común
   Paleta grafito con luz ámbar, retícula de 12 columnas y marcas de registro */

:root {
  --bg: #171514;
  --bg-alt: #201c19;
  --bg-contrast: #ede9e3;
  --ink: #e6e1da;
  --ink-soft: #9a9088;
  --ink-dark: #171514;
  --amber: #f08a24;
  --teal: #2f7a6e;
  --rhythm: 84px;
  --gap: 24px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { 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(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 138, 36, 0.45);
}

a:hover { border-bottom-color: var(--amber); }

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

/* ---------- retícula ---------- */

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

.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.15rem, 5.4vw, 3.85rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); margin-bottom: 18px; }
h3 { font-size: clamp(1.12rem, 1.7vw, 1.32rem); line-height: 1.2; margin: 30px 0 10px; }

p { margin: 0 0 20px; }

.lead { font-size: 1.06rem; color: var(--ink); }

.caption,
figcaption {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  text-transform: none;
}

.snum {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--teal);
  margin-bottom: 10px;
}

/* ---------- marcas de registro ---------- */

.mark {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 4.5px, var(--teal) 4.5px, var(--teal) 5.5px, transparent 5.6px);
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  background: var(--ink-soft);
}

.mark::before { left: 0; right: 0; top: 50%; height: 1px; }
.mark::after { top: 0; bottom: 0; left: 50%; width: 1px; }

/* ---------- separadores ---------- */

.sep { margin-bottom: 26px; }
.sep span { display: block; height: 2px; }
.sep span:first-child { background: var(--amber); width: 100%; }
.sep span:last-child { background: var(--teal); width: calc(100% - 24px); margin-left: 24px; margin-top: 5px; }

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

.site-head {
  border-bottom: 1px solid #2a2522;
  padding: 22px 0;
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px 30px;
  justify-content: space-between;
}

.brand {
  font-family: var(--serif);
  font-size: 1.32rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-bottom: 0;
}

.brand span { color: var(--amber); }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}

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

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

.hero { padding: 74px 0 0; }

.hero-inner { position: relative; padding: 34px 0 40px; }

.hero-inner > .mark.tl { top: 0; left: -4px; }
.hero-inner > .mark.tr { top: 0; right: -4px; }
.hero-inner > .mark.bl { bottom: 0; left: -4px; }
.hero-inner > .mark.br { bottom: 0; right: -4px; }

.hero h1 { grid-column: 1 / 10; }

.hero h1 .l1,
.hero h1 .l2 { display: block; }

.hero h1 .l2 { position: relative; }

.hero h1 .l2::after {
  content: "";
  position: absolute;
  left: -2px;
  right: 8%;
  top: 71%;
  height: 2px;
  background: var(--amber);
  opacity: 0.9;
}

.hero-intro {
  grid-column: 1 / 6;
  margin-top: 46px;
}

.hero-topics {
  grid-column: 8 / 12;
  margin-top: 46px;
}

.hero-topics p { margin-bottom: 12px; }

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.topic-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
}

.topic-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--amber);
}

/* ---------- figura principal ---------- */

.mainfig { margin: var(--rhythm) 0 0; }

.mainfig .frame {
  grid-column: 3 / 11;
  position: relative;
}

.mainfig .frame .mark.tl { top: -10px; left: -10px; }
.mainfig .frame .mark.tr { top: -10px; right: -10px; }
.mainfig .frame .mark.bl { bottom: 30px; left: -10px; }
.mainfig .frame .mark.br { bottom: 30px; right: -10px; }

.mainfig img { width: 100%; }

.mainfig figcaption {
  margin-top: 12px;
  max-width: 44ch;
}

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

.tsec { padding: 42px 0; }
.tsec.alt { background: var(--bg-alt); }
.tsec.first { padding-top: var(--rhythm); }

.tsec .col { grid-column: 1 / 8; }
.tsec.off1 .col { grid-column: 1 / 8; }
.tsec.off2 .col { grid-column: 2 / 9; }
.tsec.off3 .col { grid-column: 3 / 10; }
.tsec.off4 .col { grid-column: 4 / 11; }

.tsec ul, .tsec ol { margin: 0 0 20px; padding-left: 0; }

ul.checks { list-style: none; }

ul.checks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}

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

ol.steps {
  list-style: none;
  counter-reset: st;
}

ol.steps li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 10px;
  counter-increment: st;
}

ol.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--amber);
}

/* ---------- sección contrastada ---------- */

.contrast {
  background: var(--bg-contrast);
  color: var(--ink-dark);
  padding: var(--rhythm) 0;
  margin-top: var(--rhythm);
}

.contrast h2, .contrast h3 { color: var(--ink-dark); }
.contrast .snum { color: var(--teal); }
.contrast figcaption { color: #5c554e; }
.contrast a { color: #a8560d; border-bottom-color: rgba(168, 86, 13, 0.5); }
.contrast .sep span:first-child { background: #c9711b; }

.contrast .detailfig { grid-column: 2 / 6; margin: 0; }
.contrast .detailfig figcaption { margin-top: 10px; }

.contrast .detailtext { grid-column: 7 / 13; }
.contrast .detailtext ul.checks li::before { background: var(--teal); }

/* ---------- índice de contenidos y contacto ---------- */

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

.index-list li {
  border-top: 1px solid #2a2522;
  padding: 14px 0;
}

.index-list li:last-child { border-bottom: 1px solid #2a2522; }

.index-list b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.05rem;
  display: block;
}

.index-list span {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
}

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

.page-head { padding: var(--rhythm) 0 0; }
.page-head .col { grid-column: 3 / 10; }
.page-head h1 { font-size: clamp(1.95rem, 4vw, 3rem); }
.page-head .snum { margin-bottom: 14px; }

.doc { padding: 46px 0 var(--rhythm); }

.doc .col {
  grid-column: 3 / 10;
  position: relative;
}

.doc .col + .col { margin-top: 44px; }

.doc .col > .mark {
  top: 6px;
  left: -58px;
}

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

.site-foot {
  background: var(--bg-contrast);
  color: var(--ink-dark);
  padding: 54px 0 46px;
  margin-top: var(--rhythm);
}

.site-foot .sep span:first-child { background: #c9711b; }

.site-foot .sep { grid-column: 1 / -1; margin-bottom: 34px; }

.foot-a { grid-column: 1 / 8; }
.foot-b { grid-column: 8 / 13; }

.foot-a .brandline {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.1;
  margin-bottom: 12px;
}

.foot-a p {
  font-size: 15px;
  color: #4e4841;
  max-width: 46ch;
  margin-bottom: 0;
}

.foot-b ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: 15px;
}

.foot-b li { margin-bottom: 7px; }

.foot-b a { color: #a8560d; border-bottom-color: rgba(168, 86, 13, 0.45); }

.foot-mail {
  font-size: 15px;
  color: #4e4841;
}

.foot-note {
  grid-column: 1 / -1;
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid #d6d0c7;
  font-size: 13px;
  color: #6b645c;
}

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

@media (max-width: 900px) {
  :root { --rhythm: 56px; --gap: 18px; }
  .hero h1 { grid-column: 1 / 12; }
  .hero-intro { grid-column: 1 / 8; }
  .hero-topics { grid-column: 8 / 13; margin-top: 34px; }
  .mainfig .frame { grid-column: 1 / 12; }
  .tsec .col,
  .tsec.off1 .col,
  .tsec.off2 .col,
  .tsec.off3 .col,
  .tsec.off4 .col { grid-column: 1 / 11; }
  .contrast .detailfig { grid-column: 1 / 6; }
  .contrast .detailtext { grid-column: 6 / 13; }
  .page-head .col, .doc .col { grid-column: 1 / 12; }
  .doc .col > .mark { left: -34px; }
  .foot-a { grid-column: 1 / 8; }
  .foot-b { grid-column: 8 / 13; }
}

@media (max-width: 640px) {
  :root { --rhythm: 50px; --gap: 0px; }
  body { font-size: 16px; line-height: 1.75; }
  .wrap { padding: 0 20px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
  .hero h1,
  .hero-intro,
  .hero-topics,
  .mainfig .frame,
  .tsec .col,
  .tsec.off1 .col,
  .tsec.off2 .col,
  .tsec.off3 .col,
  .tsec.off4 .col,
  .contrast .detailfig,
  .contrast .detailtext,
  .page-head .col,
  .doc .col,
  .foot-a,
  .foot-b,
  .site-foot .sep,
  .foot-note { grid-column: 1; }
  .hero-intro, .hero-topics { margin-top: 28px; }
  .hero h1 .l1, .hero h1 .l2 { display: inline; }
  .hero h1 .l2::after { display: none; }
  .contrast .detailtext { margin-top: 30px; }
  .doc .col > .mark { display: none; }
  .mainfig .frame .mark { display: none; }
  .foot-b { margin-top: 30px; }
  .tsec { padding: 30px 0; }
}
