/* Sosode — hoja de estilos común
   Sistema "trama tejida": rejilla de 12 columnas, celdas con borde visible,
   separadores dobles (trazo grueso + trazo fino). */

:root {
  --bg: #1d1815;
  --bg-alt: #251f1a;
  --bg-contrast: #f1ebdf;
  --text: #eae4d8;
  --text-soft: #9a8f82;
  --text-contrast: #1d1815;
  --accent: #c08a45;
  --accent-2: #728a63;
  --rule: rgba(234, 228, 216, 0.20);
  --rule-contrast: rgba(29, 24, 21, 0.22);
  --gap: 0px;
  --section-space: 72px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

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

/* ---------- Tipografía ---------- */

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

h1 {
  font-size: clamp(2.1rem, 6.2vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1.06rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.label,
figcaption,
.caption {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.num {
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  display: block;
  margin-bottom: 10px;
}

.lead { font-size: 1.08rem; }

/* ---------- Cabecera y navegación ---------- */

.site-head {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.head-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 28px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

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

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

.site-nav a {
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  display: inline-block;
}

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

/* ---------- Separador doble (trama) ---------- */

.weave {
  border: 0;
  margin: 0;
  height: 9px;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 100% 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) bottom left / 100% 1px no-repeat;
}

.weave--contrast {
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 100% 2px no-repeat,
    linear-gradient(var(--accent-2), var(--accent-2)) bottom left / 100% 1px no-repeat;
}

/* ---------- Hero ---------- */

.hero { padding: 56px 0 var(--section-space); }

.hero-rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}

.hero h1 {
  padding: 26px 0;
  max-width: 75%;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-top: 34px;
  border: 1px solid var(--rule);
}

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

.cell:last-child { border-right: 0; }

.cell--intro { grid-column: span 5; }
.cell--topics { grid-column: span 4; }
.cell--pause { grid-column: span 3; }

.cell--pause {
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 13px,
      rgba(114, 138, 99, 0.16) 13px 14px
    );
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.topic-list li {
  padding: 7px 0 7px 20px;
  position: relative;
  border-bottom: 1px solid var(--rule);
  color: var(--text-soft);
}

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

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

/* ---------- Secciones ---------- */

.section { padding: var(--section-space) 0; }

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

.section--contrast {
  background: var(--bg-contrast);
  color: var(--text-contrast);
}

.section--contrast h2,
.section--contrast h3 { color: var(--text-contrast); }

.section--contrast .label,
.section--contrast figcaption {
  color: #5d5347;
}

.section--contrast .num { color: #55684a; }

.section--contrast a { color: #8a5f22; }

.section--contrast .box { border-color: var(--rule-contrast); }

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

/* ---------- Rejillas de contenido ---------- */

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

.grid--bordered { border: 1px solid var(--rule); }

.grid--bordered > .box {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.box { padding: 26px 24px; }

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

.split-4-8,
.split-6-6,
.split-3-9 {
  display: grid;
  gap: 0 40px;
}

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

.stack > * + * { margin-top: 18px; }

.text-block h3 { margin-top: 26px; margin-bottom: 8px; }
.text-block h3:first-child { margin-top: 0; }

/* ---------- Imágenes ---------- */

.figure-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border: 1px solid var(--rule);
  align-items: stretch;
}

.figure-main {
  grid-column: span 6;
  margin: 0;
  border-right: 1px solid var(--rule);
}

.figure-main img { width: 100%; }

.figure-note {
  grid-column: span 6;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.figure-note p { font-size: 15px; color: var(--text-soft); }

.detail-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 40px;
  align-items: start;
}

.figure-detail {
  grid-column: 1 / span 5;
  margin: 0;
  border: 1px solid var(--rule-contrast);
  padding: 10px;
}

.figure-detail img { width: 100%; }

.figure-detail figcaption {
  margin-top: 10px;
  text-transform: none;
  letter-spacing: 0.01em;
}

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

/* ---------- Listas prácticas ---------- */

.checkgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
}

.section--contrast .checkgrid,
.section--contrast .checkgrid > li { border-color: var(--rule-contrast); }

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

.checkgrid > li {
  padding: 18px 22px 18px 44px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  font-size: 16px;
}

.checkgrid > li::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 26px;
  width: 9px;
  height: 9px;
  background: var(--accent);
}

.checkgrid > li:nth-child(2n) { border-right: 0; }

.plain-list {
  margin: 0 0 20px;
  padding-left: 20px;
}

.plain-list li { margin-bottom: 9px; }

.plain-list li::marker { color: var(--accent-2); }

/* Tabla de referencia (durezas) */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ref-table th,
.ref-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  vertical-align: top;
}

.section--contrast .ref-table th,
.section--contrast .ref-table td { border-color: var(--rule-contrast); }

.ref-table th { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Páginas interiores ---------- */

.page-head { padding: 54px 0 34px; }

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

.page-head .label { margin-bottom: 16px; display: block; }

.about-layout {
  display: grid;
  grid-template-columns: 3fr 8fr;
  gap: 0 44px;
  padding: var(--section-space) 0;
  align-items: start;
}

.about-side {
  border-right: 1px solid var(--rule);
  padding-right: 34px;
  align-self: stretch;
}

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

.about-side li {
  position: relative;
  padding: 0 0 14px 20px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
}

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

.about-main h2 { margin-top: 38px; margin-bottom: 12px; }
.about-main h2:first-child { margin-top: 0; }

.legal { padding: 52px 0 var(--section-space); max-width: 780px; }
.legal h2 { margin-top: 40px; margin-bottom: 12px; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { margin-top: 24px; margin-bottom: 8px; }

/* ---------- Pie ---------- */

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

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  border-top: 0;
  border-bottom: 0;
  margin: 0;
}

.foot-cell {
  padding: 26px 22px;
  border-right: 1px solid var(--rule);
  font-size: 14px;
  color: var(--text-soft);
}

.foot-cell:last-child { border-right: 0; }

.foot-cell strong {
  color: var(--text);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.foot-cell ul { list-style: none; margin: 0; padding: 0; }
.foot-cell li { margin-bottom: 6px; }

.foot-cell a { color: var(--accent); }

.foot-bottom {
  padding: 18px 0 30px;
  font-size: 13px;
  color: var(--text-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  :root { --section-space: 52px; }

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

  .cell--intro,
  .cell--topics,
  .cell--pause { grid-column: span 12; }

  .cell {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .cell:last-child { border-bottom: 0; }

  .cell--pause { min-height: 70px; }

  .figure-main,
  .figure-note {
    grid-column: span 12;
    border-right: 0;
  }

  .figure-main { border-bottom: 1px solid var(--rule); }

  .figure-detail,
  .detail-text { grid-column: 1 / -1; }

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

  .split-4-8,
  .split-6-6,
  .split-3-9 {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .c3, .c4, .c5, .c6, .c7, .c8, .c9 { grid-column: span 12; }

  .grid--bordered > .box { border-right: 0; }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-side {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-right: 0;
    padding-bottom: 22px;
  }

  .about-side ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 22px;
  }

  .about-side li { padding-bottom: 8px; }

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

  .foot-cell {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .foot-cell:last-child { border-bottom: 0; }

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

@media (max-width: 620px) {
  :root { --section-space: 44px; }

  body { font-size: 16px; }

  .wrap { padding: 0 18px; }

  .head-inner { padding-top: 14px; padding-bottom: 14px; }

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

  .site-nav a { font-size: 13px; }

  .checkgrid { grid-template-columns: 1fr; }

  .checkgrid > li {
    border-right: 0;
    padding: 15px 18px 15px 40px;
  }

  .checkgrid > li::before { left: 18px; top: 24px; }

  .ref-table,
  .ref-table tbody,
  .ref-table tr,
  .ref-table td,
  .ref-table th { display: block; width: 100%; }

  .ref-table thead { display: none; }

  .ref-table tr { margin-bottom: 14px; border: 1px solid var(--rule); }

  .ref-table td { border: 0; border-bottom: 1px solid var(--rule); padding: 10px 14px; }

  .ref-table td:last-child { border-bottom: 0; }

  .ref-table td::before {
    content: attr(data-th);
    display: block;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 3px;
  }

  .section--contrast .ref-table tr { border-color: var(--rule-contrast); }
  .section--contrast .ref-table td { border-bottom-color: var(--rule-contrast); }
  .section--contrast .ref-table td::before { color: #5d5347; }
}
