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

:root {
  --bg: #f4f0e8;
  --bg-alt: #e7e1d5;
  --dark: #20242a;
  --ink: #22201b;
  --muted: #776f62;
  --blue: #2c4668;
  --ochre: #a06a2c;
  --step: 84px;
  --gap: 24px;
}

* { 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.72;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-transform: none;
  color: var(--ink);
}

h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0;
}

h2 {
  font-size: clamp(24px, 2.6vw, 33px);
  line-height: 1.26;
  margin: 0 0 18px;
}

h3 {
  font-style: italic;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.4;
  margin: 34px 0 12px;
}

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

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

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

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

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

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

.col7-a { grid-column: 1 / span 7; }
.col7-b { grid-column: 2 / span 7; }
.col7-c { grid-column: 3 / span 7; }
.col7-d { grid-column: 4 / span 7; }
.col9   { grid-column: 1 / span 9; }
.col5   { grid-column: 1 / span 5; }
.col4r  { grid-column: 9 / span 4; }
.col8c  { grid-column: 3 / span 8; }

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

.mark {
  position: absolute;
  width: 26px;
  height: 26px;
  color: var(--blue);
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 6px, currentColor 6px 7px, transparent 7.5px);
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.mark::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.mark::after { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }

.mark--tl { top: -13px; left: -13px; }
.mark--tr { top: -13px; right: -13px; }
.mark--bl { bottom: -13px; left: -13px; }
.mark--br { bottom: -13px; right: -13px; }
.mark--ochre { color: var(--ochre); }
.mark--light { color: var(--bg-alt); }

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

.rule {
  position: relative;
  height: 10px;
  margin: 0 0 30px;
}

.rule::before,
.rule::after {
  content: "";
  position: absolute;
  height: 2px;
  top: 0;
}

.rule::before { left: 0; width: 100%; background: var(--blue); }
.rule::after { top: 6px; left: 24px; width: calc(100% - 24px); background: var(--ochre); }

.rule--light::before { background: var(--bg-alt); }
.rule--light::after { background: var(--ochre); }

/* ---------- etiquetas de servicio ---------- */

.label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 0 0 14px;
  display: block;
}

.label--muted { color: var(--muted); }
.lead { font-size: 19px; line-height: 1.66; }
.muted { color: var(--muted); }

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

.site-head {
  border-bottom: 1px solid rgba(34, 32, 27, 0.16);
  padding: 22px 0;
}

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

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

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

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

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

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

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

.hero { padding: calc(var(--step) - 14px) 0 var(--step); }

.hero-frame { position: relative; }

.hero h1 { margin-bottom: 40px; }

.hero h1 .line { display: block; position: relative; }

.hero h1 .line--2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8%;
  bottom: 0.26em;
  height: 2px;
  background: var(--blue);
}

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

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

.topics li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 11px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.topics li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--ochre);
}

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

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

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

.band--dark h2,
.band--dark h3 { color: var(--bg); }
.band--dark .label { color: var(--ochre); }
.band--dark a { color: #b8c6dd; }
.band--dark a:focus-visible { outline-color: var(--bg-alt); }

.sec + .sec { margin-top: var(--step); }

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

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

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 2px;
  background: var(--blue);
}

.list--check li::before {
  height: 8px;
  background: transparent;
  border: 2px solid var(--blue);
}

.band--dark .list li::before { background: var(--ochre); }

.num {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--ochre);
  display: block;
  margin-bottom: 10px;
}

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

.figure-main { padding: 8px 0 var(--step); }

.frame { position: relative; }

.frame img { width: 100%; }

.caption {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
}

.band--dark .caption { color: #a49b8c; }

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

.detail-grid { row-gap: 40px; align-items: start; }
.detail-fig { grid-column: 1 / span 4; margin: 0; position: relative; }
.detail-text { grid-column: 6 / span 6; }

/* ---------- about ---------- */

.about-body { position: relative; }
.about-marks { grid-column: 1 / span 1; position: relative; }
.about-col { grid-column: 3 / span 7; }

.about-marks .mark { left: 4px; }
.about-marks .mark:nth-child(1) { top: 6px; }
.about-marks .mark:nth-child(2) { top: 210px; }
.about-marks .mark:nth-child(3) { top: 414px; }
.about-marks .mark:nth-child(4) { top: 618px; }

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

.site-foot {
  background: var(--dark);
  color: var(--bg);
  padding: 56px 0 48px;
  margin-top: var(--step);
}

.foot-grid { row-gap: 34px; padding-top: 30px; }
.foot-a { grid-column: 1 / span 7; }
.foot-b { grid-column: 9 / span 4; }

.site-foot .brand-foot {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  display: block;
  margin-bottom: 12px;
}

.site-foot p { font-size: 15px; color: #a49b8c; max-width: 52ch; }
.site-foot a { color: #b8c6dd; }
.site-foot a:focus-visible { outline-color: var(--bg-alt); }

.foot-nav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.foot-nav li { margin-bottom: 8px; }
.foot-nav a { font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(184, 198, 221, 0.4); }
.foot-nav a:hover { border-bottom-color: #b8c6dd; }

.foot-mail { font-size: 15px; }

.foot-base {
  margin-top: 40px;
  font-size: 13px;
  color: #8d8579;
}

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

.page-head { padding: calc(var(--step) - 20px) 0 34px; }
.page-head h1 { margin-bottom: 22px; }
.page-head .lead { color: var(--muted); }
.doc { padding-bottom: 10px; }
.doc h2 { margin-top: 0; }
.doc .sec + .sec { margin-top: 58px; }

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

@media (max-width: 900px) {
  :root { --step: 62px; --gap: 20px; }
  .col7-a, .col7-b, .col7-c, .col7-d,
  .col9, .col5, .col4r, .col8c,
  .detail-fig, .detail-text,
  .about-col, .foot-a, .foot-b { grid-column: 1 / -1; }
  .about-marks { display: none; }
  .detail-fig { max-width: 420px; }
}

@media (max-width: 620px) {
  :root { --step: 50px; }
  body { font-size: 16px; line-height: 1.7; }
  .wrap { padding: 0 20px; }
  .head-row { flex-direction: column; align-items: flex-start; }
  .site-nav ul { gap: 8px 16px; }
  .hero h1 .line--2::after { right: 0; }
  .lead { font-size: 17px; }
  .caption { max-width: none; }
  .mark { width: 20px; height: 20px; }
  .mark--tl { top: -10px; left: -10px; }
  .mark--tr { top: -10px; right: -10px; }
  .mark--bl { bottom: -10px; left: -10px; }
  .mark--br { bottom: -10px; right: -10px; }
}
