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

:root {
  --bg: #f0eef4;
  --bg-alt: #e2dfea;
  --bg-dark: #241f2e;
  --ink: #1d1a24;
  --ink-soft: #6a6577;
  --ink-inv: #f0eef4;
  --accent: #5a4c8c;
  --ochre: #a3762a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --step: 80px;
  --gutter: 24px;
}

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

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

h1 { font-size: 54px; letter-spacing: -0.01em; }
h2 { font-size: 31px; margin-bottom: 20px; }
h3 { font-size: 22px; line-height: 1.2; margin: 32px 0 10px; }

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

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

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

.grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  align-items: start;
}

.col-text { grid-column: 3 / 10; }
.col-wide { grid-column: 3 / 12; }

/* ---------- columna de servicio (escala) ---------- */

.rail {
  grid-column: 1 / 3;
  padding-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.rail-num {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ochre);
  letter-spacing: 0.06em;
}

.rail-label {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
}

.rail-ticks {
  display: block;
  width: 14px;
  height: 96px;
  margin-top: 14px;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--accent) 0, var(--accent) 1px,
    transparent 1px, transparent 12px
  );
  opacity: 0.55;
}

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

.site-header {
  border-bottom: 1px solid rgba(29, 26, 36, 0.14);
  padding: 22px 0 20px;
}

.site-header .grid { align-items: baseline; }

.brand {
  grid-column: 1 / 4;
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand span {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0;
}

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

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 22px;
  font-size: 15px;
}

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

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

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

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

.hero .rail-ticks { height: 190px; }

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

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

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

.hero-meta {
  grid-column: 3 / 10;
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

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

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

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

.band--dark h2, .band--dark h3 { color: var(--ink-inv); }
.band--dark .rail { color: #a9a2bb; }
.band--dark .rail-ticks {
  background-image: repeating-linear-gradient(
    to bottom,
    #8d82b8 0, #8d82b8 1px, transparent 1px, transparent 12px);
  opacity: 0.8;
}
.band--dark a { color: #c3b6ef; }

/* separadores: trazos verticales cortos repetidos */
.strokes {
  display: block;
  height: 24px;
  margin: 34px 0;
  background-image: repeating-linear-gradient(
    to right,
    var(--ochre) 0, var(--ochre) 1px,
    transparent 1px, transparent 16px
  );
  opacity: 0.65;
}

.band--dark .strokes {
  background-image: repeating-linear-gradient(
    to right,
    #b6923f 0, #b6923f 1px, transparent 1px, transparent 16px);
}

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

.list-two {
  grid-column: 3 / 12;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 44px;
}

.list-two li {
  break-inside: avoid;
  margin: 0 0 14px;
  padding-left: 20px;
  position: relative;
  line-height: 1.65;
}

.list-two li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.list-plain {
  margin: 0 0 20px;
  padding-left: 20px;
}

.list-plain li { margin-bottom: 10px; }
.list-plain li::marker { color: var(--ochre); }

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

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

.figure-main img {
  grid-column: 4 / 13;
  width: 100%;
  height: auto;
  display: block;
}

.figure-main figcaption {
  grid-column: 1 / 4;
  padding-right: 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  border-top: 1px solid var(--ochre);
  padding-top: 10px;
}

/* ---------- imagen de detalle (sección contrastada) ---------- */

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

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

.detail-figure figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #a9a2bb;
}

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

/* ---------- About ---------- */

.about-rail {
  grid-column: 1 / 3;
  position: sticky;
  top: 28px;
  font-size: 13px;
  color: var(--ink-soft);
}

.about-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.about-rail li { margin-bottom: 12px; line-height: 1.4; }
.about-rail a { color: var(--ink-soft); text-decoration: none; }
.about-rail a:hover { color: var(--accent); }
.about-rail .n { color: var(--ochre); margin-right: 8px; }

.prose { grid-column: 3 / 10; }
.prose .strokes { margin: 30px 0; }

/* ---------- pie de página (patchbay) ---------- */

.site-footer {
  border-top: 1px solid rgba(29, 26, 36, 0.18);
  padding: 34px 0 44px;
  margin-top: var(--step);
}

.footer-bay {
  grid-column: 1 / 13;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--serif);
  font-size: 19px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 15px;
}

.footer-links a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.footer-links a:hover { border-bottom-color: var(--accent); }

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

.footer-note {
  grid-column: 1 / 13;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(29, 26, 36, 0.14);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root { --step: 56px; }
  h1 { font-size: 40px; }
  h2 { font-size: 27px; }
  .grid { grid-template-columns: repeat(6, 1fr); padding: 0 22px; }
  .brand { grid-column: 1 / 7; margin-bottom: 12px; }
  .site-nav { grid-column: 1 / 7; }
  .site-nav ul { justify-content: flex-start; }
  .rail, .about-rail { grid-column: 1 / 7; }
  .col-text, .col-wide, .hero-title, .hero-lead, .hero-meta,
  .list-two, .prose, .detail-text { grid-column: 1 / 7; }
  .figure-main img { grid-column: 1 / 7; }
  .figure-main figcaption { grid-column: 1 / 7; margin-top: 12px; }
  .detail-figure { grid-column: 1 / 5; margin-bottom: 30px; }
  .about-rail { position: static; }
}

@media (max-width: 620px) {
  :root { --step: 48px; --gutter: 16px; }
  body { font-size: 16px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  .grid { padding: 0 18px; }
  .hero { padding: var(--step) 0; }
  .hero-title h1 { max-width: none; }

  /* la columna de servicio se pliega en una marca en línea sobre el título */
  .rail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-top: 0;
  }
  .rail-num { display: inline; }
  .rail-label { display: inline; margin: 0; }
  .rail-ticks, .hero .rail-ticks {
    width: 60px;
    height: 10px;
    margin: 0;
    background-image: repeating-linear-gradient(
      to right,
      var(--accent) 0, var(--accent) 1px,
      transparent 1px, transparent 10px);
  }
  .band--dark .rail-ticks {
    background-image: repeating-linear-gradient(
      to right,
      #8d82b8 0, #8d82b8 1px, transparent 1px, transparent 10px);
  }
  .list-two { columns: 1; }
  .detail-figure { grid-column: 1 / 7; }
  .footer-bay { flex-direction: column; align-items: flex-start; gap: 14px; }
}
