/* Sopagoste — hoja de estilos general */

:root {
  --bg: #1a1d15;
  --bg-alt: #22261c;
  --bg-contrast: #efeade;
  --text: #e8e4d6;
  --text-dim: #909486;
  --text-on-contrast: #1a1d15;
  --accent: #c07c3a;
  --accent-2: #8fa26a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --step: 80px;
  --gap: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  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; }

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

/* --- rejilla de 12 columnas --- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

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

/* --- tipografía --- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  text-transform: none;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.65rem);
  line-height: 1.09;
  letter-spacing: -0.012em;
}

h2 {
  font-size: clamp(1.45rem, 2.3vw, 1.8rem);
  line-height: 1.25;
}

h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 34px 0 10px;
}

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

.label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  line-height: 1.6;
  margin: 0;
}

.dim { color: var(--text-dim); }

.lead {
  font-size: 1.06rem;
  line-height: 1.68;
  color: var(--text);
}

/* --- cabecera y navegación --- */
.site-header {
  border-bottom: 0;
  padding: 26px 0 22px;
  background: var(--bg);
}

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

.brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

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

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

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

/* --- héroe --- */
.hero {
  padding: calc(var(--step) * 0.75) 0 var(--step);
}

.hero-title { grid-column: 1 / 8; }
.hero-side { grid-column: 9 / 13; align-self: start; }

.hero-side .label { margin-bottom: 12px; }

/* eje gráfico en CSS puro */
.axis {
  margin-top: 34px;
  width: 100%;
  max-width: 560px;
}

.axis-bar {
  height: 1px;
  background: var(--accent);
  width: 100%;
}

.axis-drops {
  display: flex;
  gap: 46px;
  padding-left: 8%;
}

.axis-drop {
  width: 1px;
  background: var(--accent);
  position: relative;
}

.axis-drop::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -7px;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.axis-drop.d1 { height: 58px; }
.axis-drop.d2 { height: 30px; }
.axis-drop.d3 { height: 82px; background: var(--accent-2); }
.axis-drop.d3::after { background: var(--accent-2); }

/* --- imagen principal --- */
.figure-main {
  margin: 0;
  padding-bottom: var(--step);
  background: var(--bg);
}

.figure-main .grid { align-items: end; }

.figure-main .caption {
  grid-column: 1 / 4;
  padding-bottom: 4px;
}

.figure-main .shot { grid-column: 4 / 13; }

.caption {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

/* --- secciones de texto --- */
.section {
  padding: var(--step) 0;
  position: relative;
}

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

.section-head { grid-column: 1 / 4; }
.section-body { grid-column: 5 / 12; }

.section-head .label { margin-bottom: 10px; }

/* marcador cuadrado de transición */
.section-head h2 { position: relative; }

.section-head h2::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.section--alt .section-head h2::before { background: var(--accent-2); }

/* listas prácticas */
ul.checks, ol.steps {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

ul.checks li, ol.steps li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 11px;
}

ul.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

ol.steps { counter-reset: st; }

ol.steps li {
  counter-increment: st;
  padding-left: 38px;
}

ol.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-2);
  line-height: 2.2;
}

.subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 4px;
  margin-top: 26px;
}

/* --- sección contrastada --- */
.section--contrast {
  background: var(--bg-contrast);
  color: var(--text-on-contrast);
}

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

.section--contrast .label { color: #6b7a4d; }
.section--contrast .caption { color: #5f6355; }
.section--contrast a { color: #96541c; }
.section--contrast .section-head h2::before { background: #96541c; }
.section--contrast ul.checks li::before { background: #96541c; }
.section--contrast ol.steps li::before { color: #6b7a4d; }
.section--contrast :focus-visible { outline-color: #96541c; }

.detail-layout {
  align-items: start;
  row-gap: 30px;
}

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

.detail-figure .caption { margin-top: 10px; }

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

/* --- composición de About --- */
.axis-page .section-head {
  grid-column: 1 / 4;
  border-right: 1px solid rgba(192, 124, 58, 0.42);
  padding-right: 24px;
  min-height: 100%;
}

.axis-page .section-body { grid-column: 5 / 12; }

/* --- páginas legales / texto largo --- */
.page-intro { padding: calc(var(--step) * 0.7) 0 0; }
.page-intro h1 { grid-column: 1 / 9; }
.page-intro .lead { grid-column: 1 / 9; margin-top: 26px; }

.contact-block {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(144, 148, 134, 0.3);
}

.contact-block p { margin-bottom: 0.35em; }

/* --- pie de página --- */
.site-footer {
  background: var(--bg-contrast);
  color: var(--text-on-contrast);
  padding: 54px 0 46px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1.2;
}

.footer-mail { font-size: 1rem; }

.site-footer a { color: #96541c; }

.footer-rule {
  height: 1px;
  background: rgba(26, 29, 21, 0.22);
  margin: 22px 0 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 0 0 18px;
  padding: 0;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-on-contrast);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 29, 21, 0.3);
}

.footer-links a:hover { border-bottom-color: #96541c; color: #96541c; }

.footer-note {
  font-size: 13.5px;
  line-height: 1.6;
  color: #5f6355;
  max-width: 62ch;
  margin: 0;
}

.site-footer :focus-visible { outline-color: #96541c; }

/* --- tablet --- */
@media (max-width: 900px) {
  :root { --step: 58px; --gap: 22px; }

  .hero-title { grid-column: 1 / 13; }
  .hero-side { grid-column: 1 / 13; margin-top: 30px; }

  .figure-main .shot { grid-column: 1 / 13; }
  .figure-main .caption { grid-column: 1 / 13; margin-top: 12px; padding-bottom: 0; order: 2; }

  .section-head, .section-body,
  .axis-page .section-head, .axis-page .section-body { grid-column: 1 / 13; }
  .section-body { margin-top: 22px; }

  .axis-page .section-head {
    border-right: 0;
    border-left: 1px solid rgba(192, 124, 58, 0.42);
    padding-right: 0;
    padding-left: 18px;
    min-height: 0;
  }

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

  .page-intro h1, .page-intro .lead { grid-column: 1 / 13; }
}

/* --- móvil --- */
@media (max-width: 620px) {
  :root { --step: 48px; }

  body { font-size: 16.5px; }
  .wrap { padding: 0 20px; }

  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav ul { gap: 4px 18px; }

  .section-head h2::before {
    left: 0;
    top: -18px;
  }
  .section-head h2 { padding-top: 0; }
  .section-head { padding-top: 4px; }

  .axis-drops { gap: 34px; padding-left: 4%; }
  .detail-figure { grid-column: 1 / 13; }
  .subgrid { grid-template-columns: minmax(0, 1fr); }

  .footer-top { display: block; }
  .footer-mail { display: block; margin-top: 8px; }
}
