/* Groboleki — hoja de estilos general */

:root {
  --bg: #14161a;
  --bg-alt: #1d2026;
  --bg-contrast: #e4e4e1;
  --ink: #d8dbdf;
  --ink-dim: #8a9098;
  --ink-dark: #14161a;
  --ink-dark-dim: #55595f;
  --amber: #e8a33d;
  --green: #4fb79a;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step: 84px;
  --gap: 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;
}

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

a {
  color: var(--amber);
  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(--amber);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  margin: 0;
}

h1 {
  font-size: clamp(36px, 5.6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(23px, 2.5vw, 30px);
  line-height: 1.25;
  margin-bottom: 18px;
}

h3 {
  font-size: 19px;
  line-height: 1.4;
  margin: 32px 0 10px;
}

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

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

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

.t1 { grid-column: 1 / 8; }
.t2 { grid-column: 2 / 9; }
.t3 { grid-column: 3 / 10; }
.t4 { grid-column: 4 / 11; }
.full { grid-column: 1 / -1; }

/* ---------- cruces de registro ---------- */

.mk {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.mk::before,
.mk::after {
  content: "";
  position: absolute;
  background: var(--green);
}
.mk::before { top: 50%; left: 0; width: 100%; height: 1px; }
.mk::after { left: 50%; top: 0; height: 100%; width: 1px; }
.mk.amber::before, .mk.amber::after { background: var(--amber); }
.mk.tl { top: -11px; left: -11px; }
.mk.tr { top: -11px; right: -11px; }
.mk.bl { bottom: -11px; left: -11px; }
.mk.br { bottom: -11px; right: -11px; }

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

.site-head {
  border-bottom: 1px solid #2a2e35;
  padding: 22px 0;
}
.site-head .wrap { align-items: baseline; row-gap: 12px; }

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

.site-nav { grid-column: 5 / 13; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
}
.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 15px;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--amber); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--amber); }

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

.hero { padding: calc(var(--step) - 12px) 0 var(--step); }
.hero .wrap { position: relative; row-gap: 40px; }

.hero-title { grid-column: 1 / 10; }
.hero-title .l2 { position: relative; display: inline-block; }
.hero-title .l2::after {
  content: "";
  position: absolute;
  left: -6px;
  right: 6%;
  top: 62%;
  height: 2px;
  background: var(--amber);
}

.hero-lead { grid-column: 1 / 6; }
.hero-lead p { color: var(--ink); }

.hero-topics { grid-column: 8 / 12; }
.hero-topics .caption { margin-bottom: 12px; }

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

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

.contrast {
  background: var(--bg-contrast);
  color: var(--ink-dark);
}
.contrast h2, .contrast h3 { color: var(--ink-dark); }
.contrast .caption { color: var(--ink-dark-dim); }
.contrast a { color: #a35d05; }
.contrast .mk::before, .contrast .mk::after { background: #9aa0a4; }

.num {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--green);
  display: block;
  margin-bottom: 10px;
}

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

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

.sep {
  grid-column: 1 / 8;
  position: relative;
  height: 10px;
  margin-bottom: 34px;
}
.sep::before,
.sep::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
}
.sep::before { top: 0; background: var(--amber); }
.sep::after { top: 6px; left: 24px; right: -24px; background: var(--green); }
.contrast .sep::after { background: #7a8a86; }

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

ul.sq, ol.steps { margin: 0 0 20px; padding: 0; list-style: none; }
ul.sq li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}
ul.sq li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 7px;
  height: 7px;
  background: var(--amber);
}
.contrast ul.sq li::before { background: #a35d05; }

ol.steps { counter-reset: st; }
ol.steps li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  counter-increment: st;
}
ol.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--green);
}

dl.terms { margin: 0 0 20px; }
dl.terms dt { font-family: var(--serif); font-size: 19px; margin-top: 22px; }
dl.terms dd { margin: 4px 0 0; }

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

.fig-main {
  grid-column: 3 / 11;
  position: relative;
  margin: 0;
}
.fig-main img { width: 100%; }
.fig-main .caption { max-width: 60ch; }

/* ---------- sección de detalle ---------- */

.detail-fig {
  grid-column: 2 / 6;
  position: relative;
  margin: 0;
}
.detail-fig img { width: 100%; }
.detail-text { grid-column: 7 / 13; }

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

.page-head { padding: calc(var(--step) - 20px) 0 12px; }
.page-head .wrap { position: relative; }
.page-head h1 { grid-column: 1 / 10; font-size: clamp(30px, 4.2vw, 48px); }
.page-head .caption { grid-column: 1 / 10; }

.about-block { grid-column: 3 / 10; position: relative; }
.about-block .mk { left: -56px; top: 6px; }

.doc-block { grid-column: 2 / 10; }

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

.site-foot {
  background: #101216;
  padding: 56px 0 64px;
  border-top: 1px solid #2a2e35;
}
.site-foot .wrap { position: relative; row-gap: 28px; }
.foot-sep {
  grid-column: 1 / -1;
  position: relative;
  height: 10px;
  margin-bottom: 22px;
}
.foot-sep::before,
.foot-sep::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
}
.foot-sep::before { top: 0; background: var(--amber); }
.foot-sep::after { top: 6px; left: 24px; right: 0; background: var(--green); }

.foot-a { grid-column: 1 / 8; }
.foot-a .name {
  font-family: var(--serif);
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}
.foot-a p { color: var(--ink-dim); font-size: 15px; max-width: 46ch; }
.foot-b { grid-column: 8 / 13; }
.foot-b ul { list-style: none; margin: 0 0 16px; padding: 0; }
.foot-b li { margin-bottom: 6px; }
.foot-b a { color: var(--ink-dim); text-decoration: none; font-size: 15px; }
.foot-b a:hover { color: var(--amber); }
.foot-b .mail { color: var(--amber); text-decoration: underline; font-size: 15px; }

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

@media (max-width: 1000px) {
  .hero-title { grid-column: 1 / 12; }
  .hero-lead { grid-column: 1 / 7; }
  .hero-topics { grid-column: 7 / 13; }
  .fig-main { grid-column: 2 / 12; }
  .detail-fig { grid-column: 1 / 6; }
  .detail-text { grid-column: 6 / 13; }
  .t1, .t2, .t3, .t4 { grid-column: 1 / 10; }
  .sep { grid-column: 1 / 10; }
  .about-block, .doc-block, .page-head h1, .page-head .caption { grid-column: 1 / 11; }
  .about-block .mk { left: -34px; }
}

@media (max-width: 720px) {
  :root { --step: 50px; --gap: 16px; }
  body { font-size: 16px; line-height: 1.75; }
  .wrap {
    grid-template-columns: 1fr;
    padding: 0 20px;
    row-gap: 28px;
  }
  .brand, .site-nav,
  .hero-title, .hero-lead, .hero-topics,
  .fig-main, .detail-fig, .detail-text,
  .t1, .t2, .t3, .t4, .sep,
  .about-block, .doc-block,
  .page-head h1, .page-head .caption,
  .foot-a, .foot-b, .foot-sep { grid-column: 1 / -1; }
  .site-head .wrap { row-gap: 14px; }
  .site-nav ul { justify-content: flex-start; gap: 6px 18px; }
  .hero .wrap { row-gap: 30px; }
  .about-block .mk { position: relative; left: 0; top: 0; margin-bottom: 12px; }
  .sep { margin-bottom: 22px; }
  .site-foot { padding: 40px 0 48px; }
}

/* ajuste de las cruces en pantallas estrechas */
@media (max-width: 720px) {
  .mk.tl { top: -2px; left: -2px; }
  .mk.tr { top: -2px; right: -2px; }
  .mk.bl { bottom: -2px; left: -2px; }
  .mk.br { bottom: -2px; right: -2px; }
}
