/* Tosoldo — hoja de estilos común
   Dirección visual: "trama tejida" — índigo profundo, arena y cobre */

:root {
  --bg: #151b2b;
  --bg-alt: #1c2436;
  --contrast: #eee8dc;
  --text: #e4e0d4;
  --muted: #8a93a5;
  --ink: #151b2b;
  --accent: #c98a4c;
  --accent-deep: #8a5424;
  --accent2: #7fa3b8;
  --accent2-deep: #3f5f72;
  --line: rgba(138, 147, 165, 0.34);
  --line-ink: rgba(21, 27, 43, 0.28);
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --gut: 72px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 138, 76, 0.5);
}

a:hover { border-bottom-color: var(--accent); }

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

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

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

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

h1 {
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 0;
}

h2 {
  font-size: clamp(1.42rem, 2.9vw, 1.95rem);
  line-height: 1.25;
  margin: 0 0 18px;
}

h3 {
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.35;
  margin: 30px 0 10px;
}

p { margin: 0 0 22px; }

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

.lead { font-size: 1.12rem; }

.meta,
.num,
.cap {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.num { color: var(--accent2); display: block; margin-bottom: 10px; }

.cap {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13px;
  line-height: 1.5;
}

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

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

.weave::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 1px;
  background: var(--accent2);
}

.rule { height: 1px; background: var(--line); }

.rule--strong { height: 2px; background: var(--accent); }

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

.site-head {
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--text);
  border: 0;
}

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

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

.site-nav a {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

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

/* ---------- rejilla de celdas ---------- */

.cells {
  display: grid;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 24px;
}

.cells--hero { grid-template-columns: 5fr 4fr 3fr; margin-top: 34px; }
.cells--6-6 { grid-template-columns: 1fr 1fr; }
.cells--4-8 { grid-template-columns: 4fr 8fr; }
.cells--3-9 { grid-template-columns: 3fr 9fr; }
.cells--4 { grid-template-columns: repeat(4, 1fr); }

.cell--pause { background: rgba(127, 163, 184, 0.05); }

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

.hero { padding: 58px 0 var(--gut); }

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

.hero-title h1 { max-width: 75%; }

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 0 0 20px;
}

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

.topics li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  font-size: 0.98rem;
  line-height: 1.45;
}

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

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

.band { padding: var(--gut) 0; }

.band--alt { background: var(--bg-alt); }

.band--light {
  background: var(--contrast);
  color: var(--ink);
}

.band--light h2,
.band--light h3 { color: var(--ink); }

.band--light .num { color: var(--accent2-deep); }

.band--light .cap { color: #4d5568; }

.band--light a { color: var(--accent-deep); border-bottom-color: rgba(138, 84, 36, 0.5); }

.band--light .cells { border-color: var(--line-ink); }

.band--light .cell { border-color: var(--line-ink); }

.band--light .rule { background: var(--line-ink); }

.section-head { margin-bottom: 30px; }

.prose { max-width: 66ch; }

.two-col {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 0;
}

.two-col .side { padding-right: 28px; }

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

.figure-grid { margin-top: 8px; }

.figure-grid .cell--img { padding: 0; }

.figure-grid .cell--img img { width: 100%; }

.fig-note { align-self: start; }

.detail-block {
  display: grid;
  grid-template-columns: 6fr 1fr 5fr;
  gap: 0;
  align-items: start;
}

.detail-block .txt { padding-right: 30px; }

.detail-block figure { margin: 0; }

.detail-block img {
  width: 100%;
  border: 1px solid var(--line-ink);
}

.detail-block figcaption { margin-top: 10px; }

/* ---------- listas de comprobación ---------- */

.checks { margin-top: 10px; }

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

.checks li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 0.99rem;
  line-height: 1.5;
}

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

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border: 1px solid var(--accent);
}

.band--light .checks li::before { border-color: var(--accent-deep); }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.25em;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent2);
}

/* ---------- páginas internas ---------- */

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

.page-head h1 { max-width: 80%; }

.page-head p { margin-top: 18px; max-width: 62ch; color: var(--muted); }

.about-grid {
  display: grid;
  grid-template-columns: 3fr 1px 8fr;
  gap: 0;
  padding: var(--gut) 0;
}

.about-grid .divider { background: var(--line); }

.about-grid .labels { padding-right: 30px; }

.about-grid .body { padding-left: 34px; max-width: 68ch; }

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

.labels li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.labels li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 8px;
  height: 8px;
  background: var(--accent2);
}

.legal { padding: 52px 0 var(--gut); max-width: 72ch; }

.legal h2 { margin-top: 46px; }

.legal h2:first-of-type { margin-top: 0; }

.legal ul { padding-left: 20px; }

.legal li { margin-bottom: 10px; }

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

.site-foot { border-top: 2px solid var(--accent); padding: 0 0 46px; }

.site-foot .weave-top { height: 1px; background: var(--accent2); margin-bottom: 42px; }

.foot-cells .cell { padding: 24px 22px; }

.foot-cells h2 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 0 0 14px;
}

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

.foot-cells li { margin-bottom: 8px; }

.foot-cells a,
.foot-cells p {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  line-height: 1.7;
}

.foot-cells p { color: var(--muted); margin: 0; }

.foot-name {
  font-family: var(--serif) !important;
  font-size: 1.25rem !important;
  letter-spacing: 0.04em !important;
  color: var(--text) !important;
  text-transform: none;
}

.foot-bottom {
  margin-top: 28px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

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

@media (max-width: 900px) {
  :root { --gut: 44px; }

  body { font-size: 17px; }

  .hero { padding: 40px 0 var(--gut); }

  .hero-title h1 { max-width: 100%; }

  .page-head h1 { max-width: 100%; }

  .cells--hero,
  .cells--6-6,
  .cells--4-8,
  .cells--3-9,
  .cells--4 { grid-template-columns: 1fr; }

  .cell--pause { display: none; }

  .two-col { grid-template-columns: 1fr; }

  .two-col .side { padding-right: 0; margin-bottom: 24px; }

  .detail-block { grid-template-columns: 1fr; }

  .detail-block .txt { padding-right: 0; margin-bottom: 28px; }

  .detail-block .spacer { display: none; }

  .about-grid { grid-template-columns: 1fr; padding: var(--gut) 0; }

  .about-grid .divider { height: 1px; margin: 26px 0; }

  .about-grid .labels { padding-right: 0; }

  .about-grid .body { padding-left: 0; }

  .cells--foot { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }

  .cell { padding: 20px 18px; }

  .site-nav ul { gap: 6px 16px; }
}
