:root {
  --cream: #fbf6ed;
  --cream-deep: #f3ead9;
  --espresso: #2a2018;
  --espresso-soft: #4a3a2c;
  --amber: #f4a21a;
  --amber-ink: #6b4505;
  --go: #12a46a;
  --rule: rgba(42, 32, 24, 0.12);
  --measure: 62ch;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --font: 'Nunito', ui-rounded, 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--espresso);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  z-index: 50;
  border-radius: 0 0 0.5rem 0;
}

.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--espresso);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- barra superior ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.topbar[data-stuck='true'] {
  border-bottom-color: var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0.28rem color-mix(in srgb, var(--amber) 26%, transparent);
  flex: none;
}

.topbar nav {
  display: flex;
  gap: clamp(0.75rem, 2.5vw, 2rem);
  font-size: 0.95rem;
  font-weight: 600;
}

.topbar nav a {
  text-decoration: none;
  color: var(--espresso-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.topbar nav a:hover {
  color: var(--espresso);
  border-bottom-color: var(--amber);
}

@media (max-width: 640px) {
  .topbar nav a:nth-child(3),
  .topbar nav a:nth-child(4) {
    display: none;
  }
}

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

.hero {
  padding: clamp(3.5rem, 11vw, 9rem) var(--pad) clamp(3rem, 8vw, 6rem);
  max-width: 78rem;
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--go);
  flex: none;
}

.hero h1 {
  font-size: clamp(2.6rem, 8.5vw, 6.5rem);
  font-weight: 900;
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber-ink);
  position: relative;
}

.hero h1 em::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.09em;
  background: var(--amber);
  transform-origin: left;
  transform: scaleX(var(--underline, 0));
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.hero .lede {
  margin-top: 1.75rem;
  max-width: var(--measure);
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.4rem);
  color: var(--espresso-soft);
}

.hero-meta {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}

.hero-meta-value {
  display: block;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.hero-meta-label {
  display: block;
  color: var(--espresso-soft);
  font-size: 0.97rem;
  line-height: 1.5;
}

/* ---------- ruta: cómo funciona ---------- */

.route {
  background: var(--espresso);
  color: var(--cream);
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
}

.route .section-head h2,
.route .section-head p {
  color: var(--cream);
}

.section-head {
  max-width: 78rem;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 900;
}

.section-head p {
  margin-top: 0.85rem;
  color: var(--espresso-soft);
  font-size: 1.05rem;
}

.steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 62rem;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  left: 1.45rem;
  top: 0.9rem;
  bottom: 3rem;
  width: 2px;
  background: color-mix(in srgb, var(--amber) 55%, transparent);
  transform-origin: top;
  transform: scaleY(var(--route-draw, 0));
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 720px) {
  .steps::before {
    left: 2.05rem;
  }
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

@media (min-width: 720px) {
  .step {
    grid-template-columns: 4.25rem 1fr;
  }
}

.step:last-child {
  padding-bottom: 0;
}

.step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--espresso);
  border: 2px solid var(--amber);
  color: var(--amber);
  font-weight: 900;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .step-num {
    width: 4.1rem;
    height: 4.1rem;
    font-size: 1.15rem;
  }
}

.step h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.95rem);
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.step p {
  color: color-mix(in srgb, var(--cream) 78%, var(--espresso));
  max-width: var(--measure);
}

/* ---------- para quién ---------- */

.audience {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  max-width: 78rem;
  margin-inline: auto;
}

.band {
  padding: clamp(1.75rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--rule);
  display: grid;
  gap: 0.75rem clamp(1.5rem, 5vw, 4rem);
}

@media (min-width: 860px) {
  .band {
    grid-template-columns: 14rem 1fr;
    align-items: start;
  }
}

.band:last-child {
  border-bottom: 1px solid var(--rule);
}

.band-tag {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-ink);
  padding-top: 0.4rem;
}

.band h3 {
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  font-weight: 800;
  max-width: 20ch;
}

.band p:not(.band-tag) {
  color: var(--espresso-soft);
  max-width: var(--measure);
  margin-top: 0.85rem;
}

@media (min-width: 860px) {
  .band h3,
  .band p:not(.band-tag) {
    grid-column: 2;
  }
}

/* ---------- decisiones ---------- */

.decisions {
  background: var(--cream-deep);
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
}

.reasons {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 760px) {
  .reasons {
    grid-template-columns: 1fr 1fr;
  }
}

.reason {
  background: var(--cream-deep);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
}

.reason dt {
  font-weight: 900;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.reason dt::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--amber);
  flex: none;
}

.reason dd {
  margin: 0;
  color: var(--espresso-soft);
  max-width: var(--measure);
}

/* ---------- estado ---------- */

.status {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
}

.status-inner {
  max-width: 48rem;
  margin-inline: auto;
}

.status h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
}

.status-lede {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
}

.status-note {
  margin-top: 1.25rem;
  color: var(--espresso-soft);
}

.contact {
  margin-top: clamp(2.25rem, 5vw, 3.5rem);
  border-top: 2px solid var(--espresso);
  padding-top: 1.25rem;
}

.contact-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--espresso-soft);
}

.contact-value {
  margin-top: 0.4rem;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
}

.contact-value a {
  text-decoration: none;
  border-bottom: 3px solid var(--amber);
  padding-bottom: 0.1em;
  transition: border-color 0.2s ease;
}

.contact-value a:hover {
  border-bottom-color: var(--espresso);
}

/* ---------- páginas legales ---------- */

.legal-page {
  padding: clamp(2rem, 5vw, 3rem) var(--pad) clamp(4rem, 9vw, 7rem);
  max-width: 78rem;
  margin-inline: auto;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--espresso-soft);
  text-decoration: none;
  margin-bottom: 2rem;
}

.legal-back:hover {
  color: var(--espresso);
}

.legal-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  max-width: 26ch;
}

.legal-meta {
  margin-top: 1rem;
  color: var(--espresso-soft);
  font-size: 0.95rem;
  max-width: var(--measure);
}

.legal-notice {
  margin-top: 2rem;
  background: var(--espresso);
  color: var(--cream);
  border-left: 6px solid var(--amber);
  padding: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  gap: 0.6rem;
  max-width: 62rem;
}

.legal-notice p {
  color: color-mix(in srgb, var(--cream) 82%, transparent);
}

.legal-notice strong {
  color: var(--cream);
}

.legal-layout {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 960px) {
  .legal-layout {
    grid-template-columns: 15rem minmax(0, var(--measure));
    align-items: start;
  }
}

.legal-toc-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: 0.85rem;
}

.legal-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  border-left: 2px solid var(--rule);
}

.legal-toc a {
  display: block;
  padding: 0.15rem 0 0.15rem 1rem;
  margin-left: -2px;
  text-decoration: none;
  color: var(--espresso-soft);
  font-size: 0.92rem;
  border-left: 2px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.legal-toc a:hover {
  color: var(--espresso);
  border-left-color: var(--amber);
}

@media (min-width: 960px) {
  .legal-toc {
    position: sticky;
    top: 5.5rem;
  }
}

.legal-body {
  max-width: var(--measure);
}

.legal-section {
  padding-top: clamp(2.25rem, 4vw, 3.25rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 5.5rem;
}

.legal-section:first-child {
  border-top: none;
  padding-top: 0;
}

.legal-section h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.legal-section h3 {
  font-size: 1.08rem;
  font-weight: 800;
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
}

.legal-section p {
  color: var(--espresso-soft);
}

.legal-section p + p {
  margin-top: 0.9rem;
}

.legal-section ul,
.legal-section ol {
  margin-top: 0.9rem;
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
  color: var(--espresso-soft);
}

.legal-section li + ul,
.legal-section li + ol {
  margin-top: 0.5rem;
}

.legal-section strong {
  color: var(--espresso);
}

.legal-table-wrap {
  margin-top: 1.1rem;
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rule);
  vertical-align: top;
  color: var(--espresso-soft);
}

.legal-table th {
  background: var(--cream-deep);
  font-weight: 800;
  color: var(--espresso);
}

.legal-placeholder-box {
  margin-top: 1.25rem;
  border: 2px dashed var(--espresso);
  background: var(--cream-deep);
  padding: clamp(1.1rem, 3vw, 1.5rem);
  display: grid;
  gap: 0.75rem;
}

.legal-placeholder-flag {
  display: inline-flex;
  align-self: start;
  background: var(--amber);
  color: var(--espresso);
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.legal-placeholder-box dl {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.legal-placeholder-box dt {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--espresso-soft);
}

.legal-placeholder-box dd {
  margin: 0.15rem 0 0;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--espresso);
  font-size: 1.02rem;
}

mark.legal-todo {
  background: var(--amber);
  color: var(--espresso);
  font-weight: 800;
  padding: 0.05em 0.4em;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.legal-cross-link {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
  color: var(--espresso-soft);
}

.legal-cross-link a {
  font-weight: 800;
  border-bottom: 2px solid var(--amber);
  text-decoration: none;
}

.legal-cross-link a:hover {
  border-bottom-color: var(--espresso);
}

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

.footer {
  background: var(--espresso);
  color: color-mix(in srgb, var(--cream) 72%, var(--espresso));
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad);
  display: grid;
  gap: 0.75rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--cream);
}

.footer-note,
.footer-legal {
  font-size: 0.95rem;
  max-width: var(--measure);
}

.footer-legal {
  color: color-mix(in srgb, var(--cream) 55%, var(--espresso));
}

/* ---------- entrada ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal[data-shown='true'] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .steps::before {
    transform: scaleY(1);
    transition: none;
  }

  .hero h1 em::after {
    transform: scaleX(1);
    transition: none;
  }
}
