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

:root {
  --bg: #1a1722;
  --bg-alt: #221e2c;
  --bg-light: #eeeaf2;
  --text: #e7e3ec;
  --muted: #948ea3;
  --text-on-light: #1a1722;
  --muted-on-light: #4c4558;
  --mint: #5fb79a;
  --mint-deep: #2f6b57;
  --gold: #c0a44e;
  --gold-deep: #74601f;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gap: 28px;
  --pad-lg: 120px;
  --pad-sm: 56px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

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

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

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

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

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

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

.c-a { grid-column: 1 / 6; }    /* 5 columnas, izquierda */
.c-b { grid-column: 4 / 11; }   /* 7 columnas, desplazadas */
.c-c { grid-column: 6 / 13; }   /* 7 columnas, derecha */
.c-d { grid-column: 1 / 10; }   /* 9 columnas, izquierda */
.c-e { grid-column: 4 / 13; }   /* 9 columnas, derecha */
.c-f { grid-column: 2 / 8; }    /* 6 columnas */
.c-g { grid-column: 3 / 12; }
.c-h { grid-column: 1 / 7; }   /* 6 columnas, izquierda */
.c-i { grid-column: 1 / 8; }   /* 7 columnas, izquierda */

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

.pad-lg { padding-top: var(--pad-lg); padding-bottom: var(--pad-lg); }
.pad-sm { padding-top: var(--pad-sm); padding-bottom: var(--pad-sm); }

.tone-alt { background: var(--bg-alt); }

.tone-light {
  background: var(--bg-light);
  color: var(--text-on-light);
}
.tone-light a { color: var(--mint-deep); }
.tone-light .kicker { color: var(--gold-deep); }
.tone-light .caption { color: var(--muted-on-light); }
.tone-light .steps li::before { color: var(--mint-deep); }
.tone-light .rule { background: var(--mint-deep); }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: normal;
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 6.4vw, 5rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  margin-bottom: 22px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 34px 0 12px;
}

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

.lead { font-size: 1.29rem; line-height: 1.65; }

.kicker {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--gold);
  margin: 0 0 18px;
}

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

.muted { color: var(--muted); }

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

.rule {
  height: 3px;
  background: var(--mint);
  border: 0;
  margin: 0;
  grid-column: 1 / 5;
}
.rule.mid { grid-column: 5 / 9; }
.rule.end { grid-column: 9 / 13; }

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

.site-head {
  border-bottom: 1px solid #322c3f;
  padding: 20px 0;
}

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

.brand {
  font-family: var(--serif);
  font-size: 1.32rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand:hover { color: var(--mint); }

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

.site-nav a {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--mint); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--gold); }

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

.hero { padding-top: 96px; padding-bottom: 88px; }

.hero-inner {
  border-left: 3px solid var(--mint);
  padding-left: 32px;
}

.hero h1 span {
  display: block;
}
.hero h1 span:nth-child(2) { margin-left: 8%; }
.hero h1 span:nth-child(3) { margin-left: 16%; }

.hero-intro { margin-top: 46px; }

.topics {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 26px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.topics li { margin: 0; }
.topics li + li::before {
  content: "/";
  color: var(--gold);
  padding: 0 10px;
}

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

.figure-main {
  margin: 0;
  grid-column: 5 / 13;
  display: flex;
  gap: 18px;
  align-items: stretch;
}

.figure-main .vcap {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-height: 100%;
  flex: 0 0 auto;
}

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

/* ---------- bloques de texto ---------- */

.block + .block { margin-top: 52px; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 26px 0 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 62px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--mint);
}

.plain {
  margin: 24px 0 0;
  padding-left: 22px;
}
.plain li { margin-bottom: 12px; }
.plain li::marker { color: var(--mint); }

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

.detail-grid { row-gap: 40px; }

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

.detail-text { grid-column: 7 / 13; }

/* ---------- páginas interiores ---------- */

.page-head { padding-top: 80px; padding-bottom: 40px; }

.about-lead {
  font-size: 1.38rem;
  line-height: 1.6;
}

.legal h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  margin-top: 52px;
}
.legal h2:first-of-type { margin-top: 0; }

.sub-head {
  grid-column: 1 / 4;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0;
}
.sub-body { grid-column: 4 / 11; }
.sub + .sub { margin-top: 46px; }

.contact-line { font-size: 1.06rem; }

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

.site-foot { padding-bottom: 70px; }

.foot-rule {
  height: 3px;
  background: var(--mint);
  border: 0;
  margin: 0 0 34px;
}

.foot-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
  margin: 0 0 40px;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gap);
  row-gap: 32px;
}

.foot-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-cols li { margin-bottom: 10px; }
.foot-cols a { color: var(--text); text-decoration: none; border-bottom: 1px solid #3c3549; padding-bottom: 2px; }
.foot-cols a:hover { border-bottom-color: var(--mint); color: var(--mint); }

.foot-note { font-size: 14px; color: var(--muted); }
.foot-mail { font-size: 1.05rem; margin-bottom: 14px; }

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

@media (max-width: 900px) {
  :root { --pad-lg: 64px; --pad-sm: 40px; --gap: 20px; }

  .grid { grid-template-columns: 1fr; }

  .c-a, .c-b, .c-c, .c-d, .c-e, .c-f, .c-g, .c-h, .c-i,
  .figure-main, .figure-detail, .detail-text,
  .sub-head, .sub-body { grid-column: 1; }

  .rule, .rule.mid, .rule.end { grid-column: 1; width: 62%; }
  .rule.mid { margin-left: auto; margin-right: auto; }
  .rule.end { margin-left: auto; }

  .hero { padding-top: 56px; padding-bottom: 52px; }
  .hero-inner { padding-left: 20px; }
  .hero h1 span:nth-child(2) { margin-left: 6%; }
  .hero h1 span:nth-child(3) { margin-left: 12%; }
  .hero-intro { margin-top: 32px; }

  .figure-main { flex-direction: column; gap: 0; }
  .figure-main .vcap {
    writing-mode: horizontal-tb;
    transform: none;
    margin-top: 12px;
  }

  .figure-detail { margin-bottom: 8px; }

  .sub-head { margin-bottom: 12px; }

  .foot-cols { grid-template-columns: 1fr; }

  .steps li { padding-left: 48px; }
  .steps li::before { font-size: 1.4rem; }

  .page-head { padding-top: 48px; padding-bottom: 28px; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .lead { font-size: 1.15rem; }
  .about-lead { font-size: 1.2rem; }
}
