/* Moldona — hoja de estilos general */

:root {
  --bg: #f0eef4;
  --bg-alt: #e2dfea;
  --bg-dark: #241f2e;
  --ink: #1d1a24;
  --ink-soft: #6a6577;
  --ink-inv: #f0eef4;
  --accent: #5a4c8c;
  --ochre: #a3762a;
  --mono: ui-monospace, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gap: 28px;
}

* { 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.75;
  overflow-x: hidden;
}

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

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.dark :focus-visible { outline-color: var(--ochre); }

/* ---------- 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);
}

.c5 { grid-column: 1 / span 5; }
.c6 { grid-column: 1 / span 6; }
.c7 { grid-column: 1 / span 7; }
.c9 { grid-column: 1 / span 9; }
.c7r { grid-column: 6 / span 7; }
.c5r { grid-column: 8 / span 5; }
.c9r { grid-column: 4 / span 9; }
.c6m { grid-column: 3 / span 6; }

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

h1, h2, h3, .meta, .kicker, nav a, .num {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  font-size: clamp(34px, 6.2vw, 68px);
  line-height: 1.06;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(19px, 2.3vw, 25px);
  line-height: 1.3;
  margin: 0 0 22px;
  font-weight: 700;
}

h3 {
  font-size: 15px;
  line-height: 1.45;
  margin: 34px 0 10px;
  font-weight: 700;
  color: var(--accent);
}

.kicker {
  font-size: 12px;
  color: var(--ochre);
  margin: 0 0 18px;
  letter-spacing: 0.22em;
}

.meta {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.16em;
}

p { margin: 0 0 20px; }
p.lead { font-size: 19px; line-height: 1.7; }

.soft { color: var(--ink-soft); }

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

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

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

.brand {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

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

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

.site-head nav a {
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: 0.16em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

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

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

.hero { padding: 104px 0 80px; }

.hero-head {
  position: relative;
  padding-left: 34px;
}

.hero-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--accent);
}

.hero h1 span {
  display: block;
}

.hero h1 span:nth-child(2) { margin-left: 8.33%; }
.hero h1 span:nth-child(3) { margin-left: 16.66%; color: var(--accent); }

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

.topics {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.topics li { display: flex; align-items: center; }
.topics li::after {
  content: "/";
  color: var(--ochre);
  margin: 0 12px;
}
.topics li:last-child::after { content: ""; margin: 0; }

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

.main-figure {
  margin: 72px 0 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: start;
}

.main-figure .cap {
  grid-column: 1 / span 2;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  justify-self: end;
  margin-top: 6px;
}

.main-figure .shot {
  grid-column: 5 / span 8;
  margin-right: -6%;
}

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

section { padding: 120px 0; }
section.tight { padding: 56px 0; }
section.alt { background: var(--bg-alt); }

.rule {
  height: 3px;
  background: var(--accent);
  width: 33.33%;
  margin: 0 0 46px;
}
.rule.center { margin-left: auto; margin-right: auto; }
.rule.right { margin-left: auto; }

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

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

ol.steps {
  list-style: none;
  counter-reset: s;
  margin: 30px 0 0;
  padding: 0;
}

ol.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 62px;
  margin-bottom: 24px;
}

ol.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: -2px;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

ul.marks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

ul.marks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
}

ul.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 12px;
  height: 3px;
  background: var(--ochre);
}

dl.terms { margin: 26px 0 0; }
dl.terms dt {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-top: 22px;
}
dl.terms dd { margin: 6px 0 0; }

/* ---------- sección oscura ---------- */

.dark {
  background: var(--bg-dark);
  color: var(--ink-inv);
}
.dark h2, .dark h3 { color: var(--ink-inv); }
.dark h3 { color: var(--ochre); }
.dark .kicker { color: var(--ochre); }
.dark .soft { color: #b6b0c4; }
.dark a { color: #cbb7ff; }
.dark .rule { background: var(--ochre); }
.dark ul.marks li::before { background: var(--ochre); }
.dark ol.steps li::before { color: var(--ochre); }

.dark-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  row-gap: 48px;
  align-items: start;
}

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

.dark-layout figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b6b0c4;
  margin-top: 14px;
  line-height: 1.6;
}

.dark-layout .txt { grid-column: 7 / span 6; }

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

.page-head { padding: 88px 0 40px; }
.page-head h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  max-width: 16ch;
}
.page-body { padding: 0 0 110px; }
.page-body .intro { font-size: 22px; line-height: 1.6; margin-bottom: 40px; }

.side-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  margin-top: 64px;
}
.side-head h2 {
  grid-column: 1 / span 3;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ochre);
  margin: 4px 0 0;
}
.side-head .txt { grid-column: 4 / span 6; }
.side-head .txt > *:last-child { margin-bottom: 0; }

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

.site-foot {
  border-top: 3px solid var(--accent);
  padding: 54px 0 64px;
  background: var(--bg-alt);
}

.foot-name {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(28px, 7vw, 60px);
  font-weight: 700;
  margin: 0 0 38px;
  line-height: 1;
}

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

.foot-nav { grid-column: 1 / span 5; }
.foot-contact { grid-column: 7 / span 6; }

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

.foot-nav a {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.foot-nav a:hover { border-bottom-color: var(--accent); }

.foot-contact p { margin: 0 0 12px; font-size: 15px; }
.foot-mail {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
}

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

@media (max-width: 980px) {
  .c5, .c6, .c7, .c9, .c7r, .c5r, .c9r, .c6m { grid-column: 1 / span 12; }
  .main-figure .shot { grid-column: 1 / span 12; margin-right: 0; }
  .main-figure .cap {
    grid-column: 1 / span 12;
    writing-mode: horizontal-tb;
    transform: none;
    justify-self: start;
    margin-top: 14px;
  }
  .dark-layout figure { grid-column: 1 / span 7; }
  .dark-layout .txt { grid-column: 1 / span 12; }
  .side-head { display: block; }
  .side-head h2 { margin-bottom: 14px; }
  .foot-nav, .foot-contact { grid-column: 1 / span 12; }
  .rule { width: 50%; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 48px; }
  section { padding: 64px 0; }
  section.tight { padding: 40px 0; }
  .block + .block { margin-top: 48px; }
  .hero h1 span:nth-child(2) { margin-left: 5%; }
  .hero h1 span:nth-child(3) { margin-left: 10%; }
  .main-figure { margin-top: 44px; }
  .dark-layout figure { grid-column: 1 / span 12; }
  .page-head { padding: 56px 0 28px; }
  .page-body .intro { font-size: 19px; }
  ol.steps li { padding-left: 44px; }
  ol.steps li::before { font-size: 19px; }
  .site-head nav ul { gap: 6px 16px; }
  .rule { width: 66%; }
}
