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

:root {
  --bg: #eceff1;
  --bg-alt: #dde3e7;
  --dark: #1f2a33;
  --ink: #151c22;
  --muted: #606d78;
  --on-dark: #eceff1;
  --accent: #a2472c;
  --accent-2: #3f6b86;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rhythm: 76px;
}

* { box-sizing: border-box; }

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

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%; height: auto; display: block; }

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;
}

/* ---------- rejilla base: 12 columnas, la primera reservada ---------- */

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

.text-col { grid-column: 3 / 9; }
.wide-col { grid-column: 3 / 11; }
.full-col { grid-column: 1 / -1; }

/* ---------- cabecera ---------- */

.site-head {
  border-bottom: 1px solid rgba(63, 107, 134, 0.35);
  background: var(--bg);
}

.head-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 26px;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--accent); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

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

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

.hero { padding: var(--rhythm) 0 calc(var(--rhythm) - 16px); }

.hero .wrap { row-gap: 34px; align-items: start; }

.spine {
  grid-column: 1 / 2;
  align-self: stretch;
  min-height: 260px;
  width: 38px;
  border-left: 1px solid var(--accent-2);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--accent) 0,
    var(--accent) 3px,
    transparent 3px,
    transparent 21px
  );
  background-position: 9px 0;
  background-repeat: repeat-y;
  background-size: 22px 100%;
}

.hero-head { grid-column: 3 / 12; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 17ch;
}

.hero h1 .line { display: block; }

.rule-double {
  height: 5px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 30px 0 26px;
  max-width: 320px;
}

.hero-lead {
  grid-column: 3 / 9;
  font-size: 20px;
  color: var(--ink);
  margin: 0;
}

.hero-lead + .hero-lead { margin-top: 18px; }

.figure-main {
  grid-column: 7 / 13;
  margin: 8px 0 0;
}

.figure-main img { width: 100%; }

figcaption {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 10px;
  text-align: left;
}

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

.section { padding: var(--rhythm) 0; }
.section.alt { background: var(--bg-alt); }
.section.dark { background: var(--dark); color: var(--on-dark); }

.rubric {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 8px;
  margin-bottom: 34px;
  border-bottom: 1px solid rgba(63, 107, 134, 0.4);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
}

.rubric .num { min-width: 30px; }

.section.dark .rubric {
  border-bottom-color: rgba(236, 239, 241, 0.28);
  color: #9db6c6;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(25px, 3vw, 33px);
  line-height: 1.22;
  margin: 0 0 22px;
  max-width: 22ch;
}

h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.35;
  margin: 34px 0 12px;
}

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

.lead {
  font-size: 21px;
  line-height: 1.6;
}

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

.section.dark .note { color: #9db6c6; }
.section.dark a { color: #d79c86; }

/* listas */

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

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

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

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

ol.list li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 11px;
  counter-increment: paso;
}

ol.list li::before {
  content: counter(paso) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--accent-2);
}

.section.dark ul.list li::before { background: #c8734f; }

/* separador tipográfico */

.sep {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 11px;
  margin: 44px 0 0;
}

.sep span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
}

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

.section.dark .wrap { row-gap: 30px; align-items: start; }

.figure-detail {
  grid-column: 2 / 7;
  margin: 0;
}

.figure-detail img { width: 100%; }

.section.dark figcaption { color: #9db6c6; }

.dark-text { grid-column: 8 / 13; }

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

.page-head { padding: calc(var(--rhythm) - 10px) 0 30px; }

.page-head h1 {
  grid-column: 3 / 11;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.15;
  margin: 0;
  max-width: 20ch;
}

.page-head .kicker {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  margin: 0 0 18px;
}

.page-head .rule-double { grid-column: 3 / 11; margin-bottom: 0; }

.page-body { padding: 0 0 var(--rhythm); }

.page-body h2 {
  margin-top: 8px;
}

.dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 74px;
  line-height: 0.78;
  padding: 8px 12px 0 0;
  color: var(--accent);
}

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

.site-foot {
  background: var(--bg-alt);
  border-top: 1px solid rgba(63, 107, 134, 0.4);
  padding: 52px 26px 58px;
}

.foot-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.foot-name {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.06em;
  margin: 0 0 18px;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
}

.foot-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 2px 14px;
  border-left: 1px solid rgba(63, 107, 134, 0.45);
}

.foot-nav a:first-child { border-left: 0; }
.foot-nav a:hover { color: var(--accent); }

.foot-mail { margin: 20px 0 12px; font-size: 17px; }

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

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

@media (max-width: 1000px) {
  .hero-head { grid-column: 3 / 13; }
  .hero-lead { grid-column: 3 / 11; }
  .figure-main { grid-column: 5 / 13; }
  .figure-detail { grid-column: 1 / 6; }
  .dark-text { grid-column: 7 / 13; }
  .text-col { grid-column: 3 / 11; }
  .wide-col { grid-column: 3 / 13; }
  .page-head h1 { grid-column: 3 / 13; }
  .page-head .rule-double { grid-column: 3 / 13; }
}

@media (max-width: 760px) {
  :root { --rhythm: 46px; }

  body { font-size: 17px; }

  .wrap {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding: 0 20px;
  }

  .hero-head,
  .hero-lead,
  .figure-main,
  .figure-detail,
  .dark-text,
  .text-col,
  .wide-col,
  .page-head h1,
  .page-head .rule-double,
  .page-head .kicker,
  .rubric,
  .sep {
    grid-column: 1 / -1;
  }

  .spine {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 0;
    height: 26px;
    border-left: 0;
    border-top: 1px solid var(--accent-2);
    background-image: repeating-linear-gradient(
      to right,
      var(--accent) 0,
      var(--accent) 3px,
      transparent 3px,
      transparent 21px
    );
    background-position: 0 9px;
    background-repeat: repeat-x;
    background-size: 100% 22px;
  }

  .hero h1 { max-width: none; }
  .hero-lead { font-size: 18px; }
  .lead { font-size: 19px; }
  h2 { max-width: none; }

  .rule-double { margin: 24px 0 20px; }

  .site-nav { font-size: 12.5px; gap: 6px 16px; }

  .foot-nav { flex-direction: column; gap: 8px; }
  .foot-nav a { border-left: 0; padding: 0; }

  .dropcap::first-letter { font-size: 60px; padding-right: 10px; }
}
