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

:root {
  --linen: #f4f0e8;
  --linen-alt: #e7e1d5;
  --graphite: #20242a;
  --ink: #22201b;
  --ink-soft: #776f62;
  --blue: #2c4668;
  --ochre: #a06a2c;
  --rule: #cdc5b6;
  --rule-dark: #3b414a;
  --gap: 88px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.9;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 24px;
  letter-spacing: 0.01em;
}

h1 { font-size: 2.55rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.22rem; margin-bottom: 14px; }

p { margin: 0 0 28px; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover { text-decoration-thickness: 2px; }

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

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

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

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

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

.col-text { grid-column: 2 / span 7; }
.col-wide { grid-column: 2 / span 9; }
.scene-no { grid-column: 1 / span 1; }

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

.site-head {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 28px;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

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

.brand span {
  display: block;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--ochre);
  text-transform: uppercase;
}

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

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

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

/* ---------- perforaciones (motivo de película) ---------- */

.perf {
  height: 14px;
  margin: 0;
  border: 0;
  background-image: linear-gradient(to right, var(--rule) 0 8px, transparent 8px 20px);
  background-size: 20px 8px;
  background-position: 0 3px;
  background-repeat: repeat-x;
}

.perf--dark {
  background-image: linear-gradient(to right, var(--rule-dark) 0 8px, transparent 8px 20px);
}

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

.hero { padding: 64px 0 var(--gap); }

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

.filmstrip {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  border-right: 1px solid var(--rule);
  padding-right: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filmstrip li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

.filmstrip ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filmstrip li::before {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border: 1px solid var(--ochre);
}

.hero-text { grid-column: 3 / span 6; }

.hero-text h1 { margin-bottom: 26px; }

.hero-text .lead { color: var(--ink); max-width: 46ch; }

.kicker {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ochre);
  margin: 0 0 18px;
}

.hero-figure {
  grid-column: 7 / span 6;
  grid-row: 2;
  margin: 40px 0 0;
  justify-self: end;
  max-width: 620px;
}

.hero-figure img {
  border: 2px solid var(--ink);
  width: 100%;
}

figcaption {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-top: 10px;
  text-align: right;
}

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

.scene { padding: var(--gap) 0; }

.scene--alt { background: var(--linen-alt); }

.scene-no {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  color: var(--ochre);
  padding-top: 6px;
}

.scene-head { grid-column: 2 / span 9; }

.scene-head h2 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 34px;
}

.two-col {
  grid-column: 2 / span 9;
  columns: 2;
  column-gap: 48px;
}

.two-col ul { margin: 0; }

ul.checklist, ol.checklist {
  padding-left: 0;
  list-style: none;
}

ul.checklist li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 16px;
  break-inside: avoid;
}

ul.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 9px;
  height: 9px;
  background: var(--blue);
}

ol.steps {
  grid-column: 2 / span 7;
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  margin: 0;
}

ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin-bottom: 20px;
}

ol.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--ochre);
}

.sub { grid-column: 2 / span 7; }
.sub h3 { margin-top: 8px; }

.note {
  grid-column: 2 / span 7;
  border-left: 2px solid var(--ochre);
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.note p:last-child { margin-bottom: 0; }

/* ---------- sección contrastada ---------- */

.scene--dark {
  background: var(--graphite);
  color: var(--linen);
}

.scene--dark h2,
.scene--dark h3 { color: var(--linen); }

.scene--dark .scene-head h2 { border-bottom-color: var(--rule-dark); }

.scene--dark a { color: #b6c7de; }

.scene--dark figcaption { color: #a7a094; text-align: left; }

.scene--dark ul.checklist li::before { background: #b6c7de; }

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

.detail-figure img {
  width: 100%;
  border: 2px solid #3b414a;
}

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

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

.page-head { padding: 58px 0 10px; }
.page-head .kicker { margin-bottom: 12px; }
.page-body { padding: 26px 0 var(--gap); }

.numbered { display: block; }

.numbered > li {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

.numbered > li:first-child { border-top: 0; padding-top: 6px; }

.numbered {
  list-style: none;
  counter-reset: block;
  padding-left: 0;
  margin: 0;
}

.numbered > li::before {
  content: counter(block, decimal-leading-zero);
  counter-increment: block;
  grid-column: 1 / span 1;
  font-family: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  color: var(--ochre);
  padding-top: 6px;
}

.numbered > li > div { grid-column: 2 / span 7; }
.numbered > li h2 { font-size: 1.5rem; }
.numbered > li p:last-child { margin-bottom: 0; }

.legal-block { margin-bottom: 44px; }
.legal-block:last-child { margin-bottom: 0; }
.legal-block p:last-child { margin-bottom: 0; }

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

.site-foot {
  background: var(--graphite);
  color: var(--linen);
  padding: 0 0 56px;
}

.site-foot .perf { margin-bottom: 44px; }

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

.foot-about { grid-column: 1 / span 6; }
.foot-nav { grid-column: 8 / span 5; }

.foot-about .brand,
.foot-about p { color: var(--linen); }

.foot-about p {
  color: #a7a094;
  font-size: 0.95rem;
  max-width: 44ch;
  margin: 16px 0 0;
}

.site-foot a { color: #b6c7de; }

.foot-nav ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }

.foot-mail {
  font-size: 0.95rem;
  color: #a7a094;
  margin: 0;
}

.foot-legal {
  grid-column: 1 / span 12;
  border-top: 1px solid var(--rule-dark);
  padding-top: 22px;
  font-size: 0.86rem;
  color: #8b857b;
  margin: 12px 0 0;
}

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

@media (max-width: 900px) {
  :root { --gap: 60px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }

  .hero-grid { display: block; }
  .filmstrip {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0 0 22px;
    margin-bottom: 28px;
  }
  .filmstrip ol {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 22px;
  }
  .hero-figure { margin: 34px 0 0; max-width: 100%; }
  figcaption { text-align: left; }

  .col-text, .col-wide, .scene-head, .two-col,
  ol.steps, .sub, .note,
  .detail-figure, .detail-text { grid-column: 1 / -1; }

  .two-col { columns: 1; }

  .detail-figure { max-width: 420px; margin-bottom: 30px; }

  .numbered > li { display: block; }
  .numbered > li::before { display: block; margin-bottom: 8px; }

  .scene-no { grid-column: 1 / -1; padding-top: 0; margin-bottom: 6px; }

  .foot-about, .foot-nav { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  :root { --gap: 52px; }
  body { font-size: 17px; line-height: 1.85; }
  h1 { font-size: 1.82rem; }
  .wrap { padding: 0 20px; }
  .site-head .wrap { display: block; }
  .site-nav ul { margin-top: 14px; gap: 6px 18px; }
  .hero { padding-top: 40px; }
}
