/* Torota — hoja de estilo común
   Paleta de archivo en papel: sepia, tinta parda y verde de anotación */

:root {
  --paper: #f5f0df;
  --paper-alt: #e9e1c9;
  --ink-dark: #2f2a1e;
  --text: #241f16;
  --text-soft: #736b55;
  --accent: #8a6a1f;
  --accent-2: #4a6b52;
  --rule: #c9bfa0;
  --cell-bg: var(--paper);
  --gap-section: 72px;
  --font: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
}

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

p { margin: 0 0 18px; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 { margin: 0; font-weight: 700; }

h1 {
  font-size: clamp(2.35rem, 6.6vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.42rem, 3vw, 2.05rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 26px 0 10px;
  letter-spacing: -0.005em;
}

/* ---------- estructura de celdas tejidas ---------- */

.cells {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.cell {
  background: var(--cell-bg);
  padding: 24px 22px;
  min-width: 0;
}

.c3  { grid-column: span 3; }
.c4  { grid-column: span 4; }
.c5  { grid-column: span 5; }
.c6  { grid-column: span 6; }
.c7  { grid-column: span 7; }
.c8  { grid-column: span 8; }
.c9  { grid-column: span 9; }
.c12 { grid-column: span 12; }

.cell--blank { background: var(--cell-bg); }

.caption {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
  max-width: 46ch;
}

.label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--accent-2);
  margin: 0 0 6px;
}

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

.site-head {
  padding-top: 22px;
  border-bottom: 2px solid var(--accent);
  position: relative;
  margin-bottom: 9px;
}

.site-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  border-top: 1px solid var(--accent-2);
}

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

.wordmark {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-soft);
}

.nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

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

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

/* ---------- ritmo de secciones ---------- */

.weave {
  height: 9px;
  border-top: 2px solid var(--accent);
  position: relative;
}

.weave::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  border-top: 1px solid var(--accent-2);
}

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

.band--dark {
  background: var(--ink-dark);
  color: var(--paper);
  --cell-bg: var(--ink-dark);
  --rule: #6b5f45;
  --text-soft: #b9ae91;
}

.band--dark h2,
.band--dark h3 { color: var(--paper); }
.band--dark a { color: #d8bd77; }
.band--dark .s-num { color: #9db99f; }
.band--dark li::before { background: #d8bd77; }
.band--dark :focus-visible { outline-color: #d8bd77; }

.s-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 26px;
}

.s-num {
  font-size: 13px;
  color: var(--accent-2);
  flex: none;
  padding-top: 4px;
}

/* ---------- portada ---------- */

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

.hero-title {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 30px 0 34px;
  margin-bottom: 34px;
}

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

.hero-cells { grid-template-columns: 5fr 4fr 3fr; }

.hero-cells .cell { grid-column: auto; }

.hero-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.55;
}

.hero-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 9px;
}

.hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

/* ---------- imágenes ---------- */

.fig { margin: 0; }

.fig img {
  display: block;
  width: 100%;
  height: auto;
}

.fig-cell { padding: 14px; }

.media-cells { align-items: stretch; }

.caption-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

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

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

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

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

.list li:last-child { margin-bottom: 0; }

.check-cells { margin-top: 26px; }

.steps {
  margin: 0;
  padding-left: 22px;
}

.steps li { margin-bottom: 10px; }
.steps li::marker { color: var(--accent-2); }

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

.page-head {
  padding: 46px 0 30px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 9px;
}

.page-head h1 { max-width: 18ch; }
.page-head p { margin-top: 22px; color: var(--text-soft); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(150px, 3fr) 9fr;
  gap: 0;
}

.about-marks {
  list-style: none;
  margin: 0;
  padding: 0 30px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-soft);
}

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

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

.about-body {
  border-left: 1px solid var(--rule);
  padding-left: 34px;
}

.about-body h2 { margin-top: 34px; }
.about-body h2:first-child { margin-top: 0; }
.about-body h2 + p { margin-top: 14px; }

.prose h2 { margin-top: 38px; }
.prose h2:first-child { margin-top: 0; }
.prose h2 + p { margin-top: 14px; }
.prose .list { margin: 0 0 18px; }

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

.site-foot { padding: var(--gap-section) 0 40px; }

.foot-cells { grid-template-columns: repeat(4, 1fr); }
.foot-cells .cell { grid-column: auto; font-size: 14px; line-height: 1.6; }

.foot-cells p { margin-bottom: 8px; max-width: none; }
.foot-cells p:last-child { margin-bottom: 0; }

.foot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-nav li { margin-bottom: 6px; }

.foot-nav a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule); }
.foot-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.foot-note { color: var(--text-soft); }

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

@media (max-width: 900px) {
  .cells { grid-template-columns: repeat(6, 1fr); }
  .c3, .c4, .c5, .c6 { grid-column: span 3; }
  .c7, .c8, .c9, .c12 { grid-column: span 6; }
  .hero-cells { grid-template-columns: 1fr 1fr; }
  .foot-cells { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  :root { --gap-section: 44px; }
  body { font-size: 16.5px; }
  .cells { grid-template-columns: 1fr; }
  .c3, .c4, .c5, .c6, .c7, .c8, .c9, .c12 { grid-column: span 1; }
  .hero-cells,
  .foot-cells { grid-template-columns: 1fr; }
  .cell--blank { display: none; }
  .cell { padding: 20px 18px; }
  .hero { padding-top: 32px; }
  .hero-title { padding: 22px 0 24px; margin-bottom: 26px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-marks { padding: 0 0 26px; }
  .about-body {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding-left: 0;
    padding-top: 26px;
  }
  .s-head { gap: 12px; margin-bottom: 20px; }
}
