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

:root {
  --bg: #eceff1;
  --bg-alt: #dde3e7;
  --bg-dark: #1f2a33;
  --ink: #151c22;
  --ink-soft: #606d78;
  --ink-invert: #eceff1;
  --accent: #a2472c;
  --accent-2: #3f6b86;
  --rule: #c4cdd3;
  --rule-soft: #d6dde1;
  --step: 72px;
  --gap: 28px;
}

* { 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: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

.margin-col {
  grid-column: 1 / 4;
  position: relative;
}

.margin-col::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: var(--accent);
  opacity: .5;
}

.body-col { grid-column: 4 / 10; }
.wide-col { grid-column: 4 / 12; }
.full-col { grid-column: 1 / 13; }

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

h1, h2, h3 { font-weight: 700; margin: 0; }

h1 {
  font-size: clamp(2.5rem, 6vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 32px 0 10px;
}

p { margin: 0 0 20px; max-width: 74ch; }

.lead {
  font-size: 1.16rem;
  line-height: 1.62;
}

.caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

.marker {
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 10px;
}

.initial {
  font-size: clamp(3.4rem, 7vw, 5.2rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -0.05em;
  color: var(--accent);
  display: block;
}

.drop {
  position: absolute;
  right: calc(100% + var(--gap));
  top: -0.04em;
  font-size: 2.05em;
  line-height: .78;
  color: var(--accent);
  letter-spacing: -0.06em;
}

h1, .doc-initials h2 { position: relative; }

.doc-initials h2 {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 16px;
}

.doc-initials h2 .drop { font-size: 2.3em; top: -0.1em; }

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0 0 28px;
}

.rule-thin {
  border: 0;
  border-top: 1px solid var(--rule-soft);
  margin: 18px 0;
}

a {
  color: var(--accent);
  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(--accent);
  outline-offset: 3px;
}

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

.site-head {
  padding-top: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.site-head .brand-col { grid-column: 1 / 4; }
.site-head .nav-col { grid-column: 4 / 13; display: flex; align-items: flex-end; }

.brand {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand span { display: block; font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }

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

.site-nav li + li::before {
  content: "/";
  color: var(--accent-2);
  padding: 0 12px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.hero { padding-top: var(--step); padding-bottom: calc(var(--step) - 16px); }

.hero .margin-col { grid-column: 1 / 4; }

.hero-initial {
  font-size: clamp(4.4rem, 11vw, 8.2rem);
  font-weight: 700;
  line-height: .8;
  letter-spacing: -0.06em;
  color: var(--accent);
  text-align: right;
  padding-right: 20px;
  display: block;
}

.hero-text { grid-column: 4 / 12; }

.hero-guides {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  margin-top: 30px;
  max-width: 100%;
}

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

.hero-meta {
  grid-column: 4 / 12;
  margin-top: 18px;
}

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

.figure-main { padding-bottom: var(--step); align-items: start; }

.figure-main .fig-caption { grid-column: 1 / 4; padding-right: 20px; text-align: right; }

.figure-main figure { grid-column: 6 / 13; margin: 0; }

.figure-main img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--rule);
}

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

.band { padding-top: var(--step); padding-bottom: var(--step); }
.band-alt { background: var(--bg-alt); }

.band .head-col { grid-column: 1 / 4; }
.band .head-col .initial { text-align: right; padding-right: 20px; }
.band .head-col .marker { text-align: right; padding-right: 20px; }

.band h2 { margin-bottom: 18px; }

.band .body-col > .rule { margin-top: 0; }

ul.list, ol.list {
  grid-column: 4 / 12;
  margin: 0 0 22px;
  padding-left: 0;
  list-style: none;
}

.body-col ul.list,
.body-col ol.list { grid-column: auto; }

ul.list li, ol.list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  max-width: 80ch;
}

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

ol.list { counter-reset: step; }

ol.list li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
  color: var(--accent-2);
  letter-spacing: .06em;
}

.stack { grid-column: 4 / 12; }
.stack > *:last-child { margin-bottom: 0; }

/* ---------- sección oscura con imagen de detalle ---------- */

.band-dark {
  background: var(--bg-dark);
  color: var(--ink-invert);
}

.band-dark h2 { color: var(--ink-invert); }
.band-dark .marker { color: #93b1c4; }
.band-dark .initial { color: #c67a5c; }
.band-dark .caption { color: #a9b7c0; }
.band-dark .rule { border-top-color: #37454f; }
.band-dark a { color: #e0a58c; }
.band-dark ul.list li::before { background: #c67a5c; }
.band-dark .margin-col::after { background: #c67a5c; opacity: .55; }

.band-dark figure { grid-column: 4 / 8; margin: 0; }

.band-dark figure img {
  width: 100%;
  height: auto;
  display: block;
}

.band-dark .dark-text { grid-column: 8 / 13; }
.band-dark figure figcaption { margin-top: 12px; }

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

.site-foot {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
  padding-top: 44px;
  padding-bottom: 52px;
  margin-top: 0;
}

.foot-line { grid-column: 1 / 13; border-top: 1px solid var(--accent); opacity: .5; margin-bottom: 34px; }

.foot-brand {
  grid-column: 1 / 4;
  position: relative;
  padding-left: 18px;
}

.foot-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: var(--accent);
  opacity: .6;
}

.foot-brand strong { font-size: 1.1rem; letter-spacing: -0.02em; display: block; }

.foot-nav { grid-column: 4 / 10; }

.foot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}

.foot-nav li + li::before {
  content: "·";
  color: var(--accent);
  padding: 0 11px;
}

.foot-nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot-nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.foot-mail { grid-column: 10 / 13; }
.foot-mail p { margin: 0; }

/* ---------- páginas de texto ---------- */

.page-head { padding-top: var(--step); padding-bottom: 34px; }
.page-head .margin-col { grid-column: 1 / 4; }
.page-head .body-col h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }

.doc { padding-bottom: var(--step); }
.doc .margin-col { grid-column: 1 / 4; }
.doc .body-col > section { margin-bottom: 46px; }
.doc .body-col > section:last-child { margin-bottom: 0; }

.doc h2 {
  font-size: 1.32rem;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.doc-open {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.doc-open .initial { font-size: 2.6rem; line-height: 1; }

.contact-box {
  border-top: 1px solid var(--accent);
  padding-top: 16px;
  margin-top: 8px;
}

.contact-box p { margin-bottom: 6px; }

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

@media (max-width: 900px) {
  :root { --step: 44px; --gap: 20px; }

  body { font-size: 16.5px; }

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

  .margin-col::after { display: none; }

  .site-head .brand-col,
  .site-head .nav-col { grid-column: 1 / 7; }
  .site-head .nav-col { margin-top: 14px; }

  .hero .margin-col,
  .hero-text,
  .hero-meta,
  .band .head-col,
  .body-col,
  .wide-col,
  .stack,
  ul.list,
  ol.list,
  .doc .margin-col,
  .page-head .margin-col,
  .band-dark figure,
  .band-dark .dark-text,
  .figure-main figure,
  .figure-main .fig-caption,
  .foot-brand,
  .foot-nav,
  .foot-mail { grid-column: 1 / 7; }

  .hero-initial,
  .band .head-col .initial,
  .band .head-col .marker,
  .figure-main .fig-caption { text-align: left; padding-right: 0; }

  .hero-initial { font-size: 3.6rem; margin-bottom: 6px; }

  .drop,
  .doc-initials h2 .drop {
    position: static;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    color: inherit;
  }

  .figure-main figure { margin-bottom: 14px; order: 1; }
  .figure-main .fig-caption { margin-top: 0; order: 2; }

  .band .head-col { margin-bottom: 12px; }
  .band-dark figure { margin-bottom: 22px; }

  .foot-nav { margin-top: 20px; }
  .foot-mail { margin-top: 14px; }

  p { max-width: none; }
}

@media (max-width: 520px) {
  .sheet { padding: 0 18px; }
  h1 { font-size: 2.15rem; }
  .site-nav li + li::before { padding: 0 8px; }
}
