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

:root {
  --paper: #f4eee1;
  --paper-2: #e8dfcc;
  --ink: #1a1814;
  --muted: #736c5b;
  --blue: #2b4a8c;
  --ochre: #8a6a1e;
  --dark: #141414;
  --seam: 4px;
  --unit: 24px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  margin: 0 0 var(--unit);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); line-height: 1.06; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.2; }
h3 { font-size: 1.08rem; line-height: 1.35; margin-bottom: 12px; }

p { margin: 0 0 var(--unit); max-width: 68ch; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

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

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--unit);
}

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

.site-head {
  background: var(--paper);
  border-bottom: var(--seam) solid var(--ink);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px var(--unit);
  padding-top: var(--unit);
  padding-bottom: var(--unit);
}

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

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

.site-nav { margin-left: auto; }

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

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

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

/* ---------- mosaico ---------- */

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

.mod { padding: 28px; }

.c3 { grid-column: span 3; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }
.c12 { grid-column: 1 / -1; }

.off2 { grid-column: 3 / 9; }
.pad-left { grid-column: 1 / 3; }
.pad-right { grid-column: 12 / 13; }

.fill-blue { background: var(--blue); }
.fill-ochre { background: var(--ochre); }
.fill-ink { background: var(--ink); }
.fill-paper { background: var(--paper); }
.fill-paper2 { background: var(--paper-2); }
.fill-dark { background: #1d1b17; }

.fill { min-height: 96px; }

/* ---------- bandas ---------- */

.band { padding: 96px 0; }
.band--tight { padding: 72px 0; }
.band--paper { background: var(--paper); }
.band--paper .mod { background: var(--paper-2); }
.band--alt { background: var(--paper-2); }
.band--alt .mod { background: var(--paper); }

.band--dark { background: var(--dark); color: var(--paper); }
.band--dark .mod { background: #1d1b17; }
.band--dark h2, .band--dark h3 { color: var(--paper); }
.band--dark p { color: #ddd4c2; }
.band--dark a { color: var(--paper); }
.band--dark :focus-visible { outline-color: var(--paper); }
.band--dark .caption { color: #a79e8b; }
.band--dark .num { color: #c9a44f; }

/* ---------- tiras de teselas ---------- */

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--seam);
  margin-bottom: var(--unit);
}

.tiles span {
  display: block;
  width: 24px;
  height: 24px;
}

.tiles .b { background: var(--blue); }
.tiles .o { background: var(--ochre); }
.tiles .p { background: var(--paper-2); }
.tiles .i { background: var(--ink); }
.band--alt .tiles .p { background: var(--paper); }
.band--dark .tiles .p { background: #2a2722; }

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

.hero { padding: 72px 0 0; }

.hero-title {
  grid-column: 1 / 9;
  grid-row: 1;
  background: var(--paper-2);
  padding: 40px 36px;
  display: flex;
  align-items: flex-end;
}

.hero-title h1 { margin: 0; max-width: 16ch; }

.hero-intro {
  grid-column: 9 / 13;
  grid-row: 1;
  background: var(--ink);
  color: var(--paper);
  padding: 32px 28px;
  font-size: 16px;
}

.hero-intro p { color: var(--paper); }
.hero-intro a { color: var(--paper); }
.hero-intro :focus-visible { outline-color: var(--paper); }

.hero-strip {
  grid-column: 1 / 13;
  grid-row: 2;
  display: flex;
  gap: var(--seam);
  height: 48px;
}

.hero-strip span { display: block; flex: 1; }

.hero-img { grid-column: 3 / 9; grid-row: 3; }
.hero-img img { display: block; width: 100%; height: auto; }

.hero-cap {
  grid-column: 9 / 12;
  grid-row: 3;
  background: var(--paper-2);
  padding: 24px;
  display: flex;
  align-items: flex-end;
}

.hero-left { grid-column: 1 / 3; grid-row: 3; background: var(--blue); }
.hero-right { grid-column: 12 / 13; grid-row: 3; background: var(--ochre); }

.caption {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 40ch;
}

/* ---------- texto ---------- */

.lead { font-size: 19px; }

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

.text-block ul, .text-block ol { margin: 0 0 var(--unit); padding-left: 20px; }
.text-block li { margin-bottom: 10px; max-width: 66ch; }
.text-block ul { list-style: none; padding-left: 0; }
.text-block ul li { padding-left: 22px; position: relative; }
.text-block ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 9px;
  height: 9px;
  background: var(--blue);
}
.band--dark .text-block ul li::before { background: var(--paper); }

.text-block ol li::marker { color: var(--ochre); }

dl { margin: 0; }
dt {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  margin-bottom: 6px;
  border-left: 4px solid var(--ochre);
  padding-left: 12px;
}
dd { margin: 0 0 20px; max-width: 66ch; }
dd:last-child { margin-bottom: 0; }

.index-list { list-style: none; margin: 0; padding: 0; }
.index-list li {
  border-top: 1px solid #cbc2ab;
  padding: 12px 0;
}
.index-list li:first-child { border-top: none; }
.index-list a { color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--blue); }
.index-list a:hover { color: var(--blue); }

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

.detail-img { grid-column: 2 / 6; }
.detail-img img { display: block; width: 100%; height: auto; }
.detail-text { grid-column: 7 / 13; }

/* ---------- contacto ---------- */

.contact-line {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

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

.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0 64px;
}

.site-foot .tiles .p { background: #2a2722; }
.site-foot .mosaic > div { background: #221f1a; padding: 24px; }
.site-foot h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  color: var(--paper);
}
.site-foot p { color: #cfc6b4; font-size: 15px; margin-bottom: 0; }
.site-foot a { color: var(--paper); }
.site-foot :focus-visible { outline-color: var(--paper); }
.site-foot ul { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.site-foot li { margin-bottom: 6px; }
.foot-note { font-size: 12px; color: #a79e8b; }

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

@media (max-width: 980px) {
  .hero-title { grid-column: 1 / 13; }
  .hero-intro { grid-column: 1 / 13; grid-row: auto; }
  .hero-strip { grid-row: auto; }
  .hero-img { grid-column: 1 / 10; grid-row: auto; }
  .hero-cap { grid-column: 10 / 13; grid-row: auto; }
  .hero-left, .hero-right { display: none; }
  .detail-img { grid-column: 1 / 7; }
  .detail-text { grid-column: 7 / 13; }
  .off2 { grid-column: 1 / 9; }
  .pad-left, .pad-right { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .band { padding: 48px 0; }
  .band--tight { padding: 48px 0; }
  .hero { padding-top: 40px; }
  .mosaic > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .mod { padding: 24px; }
  .hero-title { padding: 28px 24px; }
  .hero-title h1 { max-width: none; }
  .fill { min-height: 48px; }
  .fill-paper2, .fill-paper { display: none; }
  .hero-strip { height: 32px; }
  .site-nav { margin-left: 0; }
  .site-foot .mosaic > div { padding: 20px; }
}
