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

:root {
  --bg: #f7f2e2;
  --bg-alt: #ede5cd;
  --dark: #17191a;
  --text: #1b1a16;
  --muted: #756f5c;
  --accent: #1f7d78;
  --accent-2: #a8721c;
  --accent-on-dark: #5fbdb6;
  --accent-2-on-dark: #c9903a;
  --text-on-dark: #f7f2e2;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --step: 84px;
}

* { 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: 18px;
  line-height: 1.9;
  overflow-x: hidden;
}

.wrap {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 0.7em;
}

h1 { font-size: clamp(1.9rem, 4.2vw, 2.95rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-bottom: 0.9em; }
h3 { font-size: 1.12rem; margin: 2.2em 0 0.6em; }

p { margin: 0 0 1.55em; }

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

.secnum {
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 0.9em;
}

.caption {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin: 14px 0 0;
}

.note { font-size: 15px; color: var(--muted); }

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

.reg {
  display: block;
  width: 26px;
  height: 26px;
  position: absolute;
  background: radial-gradient(circle at 50% 50%,
      rgba(0, 0, 0, 0) 5px, var(--accent) 5px, var(--accent) 6px, rgba(0, 0, 0, 0) 6.5px);
}

.reg::before,
.reg::after {
  content: '';
  position: absolute;
  background: var(--accent-2);
}

.reg::before { left: 50%; top: 0; width: 1px; height: 100%; }
.reg::after { top: 50%; left: 0; height: 1px; width: 100%; }

.reg.tl { top: -13px; left: -13px; }
.reg.tr { top: -13px; right: -13px; }
.reg.bl { bottom: -13px; left: -13px; }
.reg.br { bottom: -13px; right: -13px; }

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

.sep {
  position: relative;
  height: 6px;
  margin: 0 0 42px;
}

.sep::before,
.sep::after {
  content: '';
  position: absolute;
  height: 2px;
}

.sep::before { left: 0; right: 0; top: 0; background: var(--accent); }
.sep::after { left: 24px; right: 0; top: 4px; background: var(--accent-2); }

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

.site-header {
  padding: 26px 0 0;
}

.site-header .grid { align-items: baseline; row-gap: 10px; }

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

.brand:hover { text-decoration: underline; }

.mainnav { grid-column: 5 / 13; }

.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  justify-content: flex-end;
}

.mainnav a {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}

.mainnav a:hover { border-bottom-color: var(--accent); }
.mainnav a[aria-current='page'] { border-bottom-color: var(--accent-2); }

.header-rule {
  margin-top: 22px;
  border: 0;
  border-top: 1px solid rgba(117, 111, 92, 0.35);
}

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

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

.hero-inner { position: relative; }

.hero h1 { grid-column: 1 / 10; margin-bottom: 0.9em; }

.hero h1 .l1,
.hero h1 .l2 { display: block; }

.hero h1 .l2 { position: relative; display: inline-block; }

.hero h1 .l2::after {
  content: '';
  position: absolute;
  left: -6px;
  right: -18px;
  top: 58%;
  height: 2px;
  background: var(--accent);
}

.lead {
  grid-column: 1 / 6;
  font-size: 19px;
}

.topics {
  grid-column: 8 / 13;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.75;
}

.topics li { position: relative; padding-left: 20px; margin-bottom: 10px; }

.topics li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

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

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

.figure-main figure {
  grid-column: 3 / 11;
  position: relative;
  margin: 0;
}

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

.figure-main .caption { max-width: 62ch; }

/* ---------- secciones de texto ---------- */

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

.section--dark {
  background: var(--dark);
  color: var(--text-on-dark);
}

.section--dark h2,
.section--dark h3 { color: var(--text-on-dark); }
.section--dark .secnum { color: var(--accent-2-on-dark); }
.section--dark .caption { color: #bdb5a0; }
.section--dark a { color: var(--accent-on-dark); }
.section--dark .sep::before { background: var(--accent-on-dark); }
.section--dark .sep::after { background: var(--accent-2-on-dark); }
.section--dark .marks li::before { background: var(--accent-on-dark); }
.section--dark a:focus-visible { outline-color: var(--accent-on-dark); }

.section--dark .reg {
  background: radial-gradient(circle at 50% 50%,
      rgba(0, 0, 0, 0) 5px, var(--accent-on-dark) 5px, var(--accent-on-dark) 6px, rgba(0, 0, 0, 0) 6.5px);
}

.section--dark .reg::before,
.section--dark .reg::after { background: var(--accent-2-on-dark); }

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

.marks {
  list-style: none;
  margin: 0 0 1.6em;
  padding: 0;
}

.marks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  line-height: 1.75;
}

.marks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.steps {
  margin: 0 0 1.6em;
  padding-left: 1.3em;
}

.steps li { margin-bottom: 12px; line-height: 1.75; }
.steps li::marker { color: var(--accent-2); }

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

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

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

/* ---------- página About ---------- */

.page-head { padding: var(--step) 0 calc(var(--step) - 30px); }
.page-head h1 { grid-column: 1 / 10; }
.page-head .lead { grid-column: 1 / 8; margin-bottom: 0; }

.doc { padding: 0 0 var(--step); }

.doc .block {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  margin-bottom: 54px;
}

.doc .block:last-child { margin-bottom: 0; }

.doc .mark-cell {
  grid-column: 2 / 3;
  position: relative;
  min-height: 30px;
}

.doc .mark-cell .reg { top: 10px; left: 0; }

.doc .block > .body { grid-column: 3 / 10; }

.doc .block > .body > :last-child { margin-bottom: 0; }

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

.site-footer {
  background: var(--dark);
  color: var(--text-on-dark);
  padding: 54px 0 60px;
}

.site-footer .sep::before { background: var(--accent-on-dark); }
.site-footer .sep::after { background: var(--accent-2-on-dark); }

.site-footer .grid { row-gap: 34px; }

.foot-a { grid-column: 1 / 8; }
.foot-b { grid-column: 8 / 13; }

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

.foot-a p { font-size: 16px; color: #cfc7b2; margin: 0; max-width: 46ch; }

.foot-b h2 {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2-on-dark);
  margin: 0 0 1.1em;
}

.foot-b ul {
  list-style: none;
  margin: 0 0 1.4em;
  padding: 0;
  font-size: 16px;
  line-height: 1.9;
}

.site-footer a { color: var(--accent-on-dark); }
.site-footer a:focus-visible { outline-color: var(--accent-on-dark); }
.foot-b .mail { font-size: 16px; margin: 0; }

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

@media (max-width: 1000px) {
  .hero h1 { grid-column: 1 / 12; }
  .lead { grid-column: 1 / 7; }
  .topics { grid-column: 8 / 13; }
  .figure-main figure { grid-column: 2 / 12; }
  .t1, .t2, .t3, .t4 { grid-column: 1 / 11; }
  .doc .block > .body { grid-column: 3 / 12; }
  .figure-detail { grid-column: 1 / 6; }
  .detail-text { grid-column: 7 / 13; }
  .page-head h1 { grid-column: 1 / 12; }
  .page-head .lead { grid-column: 1 / 10; }
}

@media (max-width: 760px) {
  :root { --step: 50px; }

  body { font-size: 17px; line-height: 1.85; }

  .wrap { width: min(1180px, 100% - 36px); }

  .site-header .grid,
  .mainnav ul { justify-content: flex-start; }

  .brand { grid-column: 1 / 13; }
  .mainnav { grid-column: 1 / 13; }
  .mainnav ul { justify-content: flex-start; gap: 4px 18px; }

  .hero h1,
  .lead,
  .topics,
  .figure-main figure,
  .figure-detail,
  .detail-text,
  .t1, .t2, .t3, .t4,
  .page-head h1,
  .page-head .lead,
  .foot-a,
  .foot-b,
  .doc .block > .body { grid-column: 1 / 13; }

  .doc .mark-cell { display: none; }

  .topics { margin-top: 26px; }

  .detail-text { margin-top: 34px; }

  .reg.tl, .reg.bl { left: -8px; }
  .reg.tr, .reg.br { right: -8px; }

  .hero h1 .l2::after { right: 0; }
}
