/* Trosaldeka — hoja de estilo común
   Eje de luz: índigo profundo, arena y cobre */

:root {
  --bg: #151b2b;
  --bg-alt: #1c2436;
  --bg-contrast: #eee8dc;
  --ink: #e4e0d4;
  --ink-soft: #8a93a5;
  --ink-dark: #151b2b;
  --accent: #c98a4c;
  --accent-2: #7fa3b8;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --step: 80px;
}

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

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

.grid {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 28px;
}

.grid > * { min-width: 0; }

/* ---------- ritmo de secciones ---------- */

.band { padding: var(--step) 0; }
.band--alt { background: var(--bg-alt); }
.band--contrast {
  background: var(--bg-contrast);
  color: var(--ink-dark);
}
.band--tight { padding: calc(var(--step) * 0.6) 0; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.25;
  position: relative;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.4;
  margin: 2.2em 0 0.6em;
  color: var(--ink);
}

.band--contrast h3 { color: var(--ink-dark); }

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

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

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

.band--contrast .caption { color: #6b6455; }

.num {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: block;
  margin-bottom: 12px;
}

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

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

.band--contrast a { color: #9a5c22; }

strong { font-weight: 700; }

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

.site-head { padding: 28px 0 0; }

.site-head .grid { row-gap: 14px; align-items: baseline; }

.brand {
  grid-column: 1 / 5;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

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

.site-nav { grid-column: 5 / 13; }

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

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

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

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

.hero { padding: calc(var(--step) * 0.85) 0 var(--step); }
.hero .grid { row-gap: 34px; }

.hero__title { grid-column: 1 / 8; }

.hero__intro {
  grid-column: 9 / 13;
  align-self: start;
  color: var(--ink);
}

.hero__intro p { font-size: 15px; }

/* eje de luz: gráfico en CSS puro */

.axis {
  grid-column: 1 / 8;
  position: relative;
  height: 92px;
  margin-top: -8px;
}

.axis__line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--accent);
}

.axis__drop {
  position: absolute;
  top: 0;
  width: 1px;
  background: var(--accent-2);
}

.axis__drop::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -7px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.axis__drop--a { left: 6%; height: 40px; }
.axis__drop--b { left: 34%; height: 82px; }
.axis__drop--c { left: 72%; height: 58px; }

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

.figure-main { padding-bottom: var(--step); }
.figure-main .grid { row-gap: 16px; }

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

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

.figure-main .caption {
  grid-column: 1 / 4;
  grid-row: 1;
  align-self: end;
  padding-bottom: 2px;
}

/* ---------- secciones de texto: dos ejes ---------- */

.two-axis .grid { row-gap: 18px; }

.two-axis h2 {
  grid-column: 1 / 4;
  padding-left: 20px;
}

.two-axis h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.two-axis .body { grid-column: 4 / 11; }

/* ---------- listas ---------- */

.list {
  list-style: none;
  margin: 0.4em 0 1.4em;
  padding: 0;
}

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

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

.list--soft li::before { background: var(--accent-2); }

.list dt { font-weight: 700; }

.deflist { margin: 0.4em 0 1.4em; }
.deflist dt {
  font-family: var(--serif);
  font-size: 1rem;
  margin-top: 1.1em;
  color: var(--ink);
}
.band--contrast .deflist dt { color: var(--ink-dark); }
.deflist dd { margin: 0.2em 0 0; }

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

.detail .grid { row-gap: 28px; align-items: start; }

.detail__head { grid-column: 1 / 13; margin-bottom: 8px; }
.detail__head h2 { max-width: 24ch; padding-left: 20px; }
.detail__head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.detail figure {
  grid-column: 1 / 6;
  margin: 0;
}

.detail img {
  width: 100%;
  height: auto;
  display: block;
}

.detail figcaption { margin-top: 10px; }

.detail__body { grid-column: 7 / 13; }

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

.page-head { padding: calc(var(--step) * 0.7) 0 calc(var(--step) * 0.5); }
.page-head .grid { row-gap: 26px; }
.page-head h1 { grid-column: 1 / 9; font-size: clamp(1.9rem, 4vw, 2.9rem); }
.page-head .page-intro { grid-column: 9 / 13; align-self: end; }
.page-head .page-intro p { font-size: 15px; color: var(--ink-soft); }

/* composición de "El proyecto": columna estrecha + línea vertical continua */

.split { padding: calc(var(--step) * 0.4) 0 var(--step); }

.split .grid {
  position: relative;
  row-gap: 46px;
}

.split .grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 34%;
  width: 1px;
  background: rgba(138, 147, 165, 0.4);
}

.split h2 {
  grid-column: 1 / 4;
  padding-left: 20px;
  align-self: start;
}

.split h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.split .body { grid-column: 5 / 12; }

/* ---------- bloque de contacto ---------- */

.contact-line {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0.6em 0 0;
}

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

.site-foot {
  background: var(--bg-contrast);
  color: var(--ink-dark);
  padding: 56px 0 44px;
}

.site-foot .grid { row-gap: 0; }

.foot-top {
  grid-column: 1 / 13;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
}

.foot-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0;
}

.foot-mail { font-size: 15px; }
.foot-mail a { color: #9a5c22; }

.foot-rule {
  grid-column: 1 / 13;
  height: 1px;
  background: rgba(21, 27, 43, 0.25);
  margin: 22px 0;
}

.foot-links {
  grid-column: 1 / 13;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.foot-links a {
  font-size: 14px;
  color: var(--ink-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.foot-links a:hover { border-bottom-color: #9a5c22; }

.foot-note {
  grid-column: 1 / 9;
  font-size: 12px;
  line-height: 1.7;
  color: #6b6455;
  margin: 0;
}

/* ---------- tablet ---------- */

@media (max-width: 900px) {
  .grid { padding: 0 32px; column-gap: 22px; }

  .hero__title,
  .axis,
  .hero__intro { grid-column: 1 / 13; }

  .figure-main figure { grid-column: 3 / 13; }
  .figure-main .caption { grid-column: 1 / 13; grid-row: auto; }

  .two-axis h2,
  .two-axis .body,
  .split h2,
  .split .body { grid-column: 1 / 13; }

  .split .grid::before { display: none; }
  .split .grid { row-gap: 16px; }
  .split .body { margin-bottom: 24px; }

  .detail figure { grid-column: 1 / 8; }
  .detail__body { grid-column: 1 / 13; }

  .page-head h1,
  .page-head .page-intro { grid-column: 1 / 13; }
  .page-head .page-intro { align-self: start; }
}

/* ---------- móvil ---------- */

@media (max-width: 620px) {
  :root { --step: 48px; }

  body { font-size: 16px; line-height: 1.75; }

  .grid { padding: 0 20px; column-gap: 16px; }

  .site-head { padding-top: 22px; }
  .brand, .site-nav { grid-column: 1 / 13; }
  .site-nav ul { justify-content: flex-start; gap: 6px 20px; }

  .axis { height: 66px; }
  .axis__drop--b { height: 58px; }
  .axis__drop--c { height: 42px; }

  .figure-main figure { grid-column: 1 / 13; }
  .detail figure { grid-column: 1 / 13; }

  .foot-name { font-size: 1.25rem; }
  .foot-top { display: block; }
  .foot-mail { margin-top: 6px; }
  .foot-note { grid-column: 1 / 13; }
}
