/* Neotonic — hoja de estilos única. Tokens arriba, componentes abajo. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* Paleta: azul tinta, niebla de laboratorio, rosa mexicano y cempasúchil */
  --ink: #0f1e3d;
  --mist: #eef2f7;
  --rosa: #c8105f;
  --sol: #ffb703;

  --bg: var(--mist);
  --fg: var(--ink);
  --muted: #3a4866;
  --surface: #ffffff;
  --line: #c7d1df;
  --accent: var(--rosa);
  --on-rosa: #ffffff;
  --band-bg: var(--ink);
  --band-fg: #eef2f7;
  --band-muted: #b9c5da;
  --btn-bg: var(--ink);
  --btn-fg: #ffffff;
  --btn-hover: var(--rosa);

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1.0625rem, 1.03rem + 0.15vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.4rem + 1.7vw, 2.75rem);
  --step-3: clamp(2.25rem, 1.5rem + 3.6vw, 4.5rem);
  --step-4: clamp(3rem, 1.4rem + 8vw, 7.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3.5rem, 2rem + 6vw, 7rem);

  --radius: 1.25rem;
  --wrap: 72rem;
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1328;
    --fg: #e7edf7;
    --muted: #a9b6cc;
    --surface: #101c3a;
    --line: #26365a;
    --accent: #ff6aa2;
    --on-rosa: #0a1328;
    --band-bg: #14244d;
    --band-fg: #eef2f7;
    --band-muted: #b9c5da;
    --btn-bg: #eef2f7;
    --btn-fg: #0f1e3d;
    --btn-hover: #ff6aa2;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: var(--space-2);
}

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ───────── Cabecera ───────── */

.site-header {
  padding-block: var(--space-2);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand__mark {
  width: 2rem;
  height: 2rem;
  flex: none;
}

.mark__bond {
  stroke: var(--fg);
}

.mark__a {
  fill: var(--fg);
}

.mark__b {
  fill: var(--accent);
}

.mark__c {
  fill: var(--sol);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin-inline: -0.75rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.75rem;
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
}

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

/* ───────── Hero ───────── */

.hero {
  position: relative;
  overflow-x: clip;
  padding-block: var(--space-4) var(--space-5);
}

.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.hero h1 .hero__descriptor {
  display: block;
  margin-top: 0.35em;
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero__lede {
  max-width: 40rem;
  margin-top: var(--space-3);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}

.hero__lede strong {
  color: var(--fg);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--btn-hover);
  color: var(--btn-fg);
}

.btn:active {
  transform: translateY(1px);
}

.link-strong {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* ───────── Cadena NEOTONIC ───────── */

.figure-chain {
  margin: var(--space-4) 0 0;
}

.chain {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chain__staff line {
  stroke: var(--line);
  stroke-width: 1.5;
}

.chain .bond {
  stroke: var(--fg);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
}

.chain .bead circle {
  stroke-width: 3;
}

.chain .bead text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
}

.bead--1 circle {
  fill: var(--fg);
  stroke: var(--fg);
}

.bead--1 text {
  fill: var(--bg);
}

.bead--2 circle {
  fill: var(--accent);
  stroke: var(--accent);
}

.bead--2 text {
  fill: var(--on-rosa);
}

.bead--3 circle {
  fill: var(--sol);
  stroke: var(--sol);
}

.bead--3 text {
  fill: #0f1e3d;
}

.bead--4 circle {
  fill: var(--surface);
  stroke: var(--fg);
}

.bead--4 text {
  fill: var(--fg);
}

.figure-chain figcaption {
  max-width: 44rem;
  margin-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--muted);
}

/* Una sola secuencia al cargar: la cadena se arma de izquierda a derecha. */
@media (prefers-reduced-motion: no-preference) {
  .chain .bond {
    stroke-dashoffset: 100;
    animation: bond-draw 0.45s ease-out forwards;
  }

  .chain .bead {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: bead-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
  }

  .chain .bead:nth-child(1) { animation-delay: 0.1s; }
  .chain .bead:nth-child(2) { animation-delay: 0.3s; }
  .chain .bead:nth-child(3) { animation-delay: 0.5s; }
  .chain .bead:nth-child(4) { animation-delay: 0.7s; }
  .chain .bead:nth-child(5) { animation-delay: 0.9s; }
  .chain .bead:nth-child(6) { animation-delay: 1.1s; }
  .chain .bead:nth-child(7) { animation-delay: 1.3s; }
  .chain .bead:nth-child(8) { animation-delay: 1.5s; }

  .chain .bond:nth-child(1) { animation-delay: 0.3s; }
  .chain .bond:nth-child(2) { animation-delay: 0.5s; }
  .chain .bond:nth-child(3) { animation-delay: 0.7s; }
  .chain .bond:nth-child(4) { animation-delay: 0.9s; }
  .chain .bond:nth-child(5) { animation-delay: 1.1s; }
  .chain .bond:nth-child(6) { animation-delay: 1.3s; }
  .chain .bond:nth-child(7) { animation-delay: 1.5s; }
}

@keyframes bond-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes bead-in {
  from {
    opacity: 0;
    transform: scale(0.3);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ───────── Secciones ───────── */

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

.section + .section:not(.section--band) {
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: var(--step-2);
  font-weight: 700;
}

.section h2 + p {
  margin-top: var(--space-2);
}

.section__grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 56rem) {
  .section__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-5);
    align-items: start;
  }
}

.prose > * + * {
  margin-top: var(--space-2);
}

.prose h2 {
  margin-top: var(--space-4);
}

.prose h3 {
  margin-top: var(--space-3);
  font-size: var(--step-1);
  font-weight: 700;
}

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

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

/* Ficha de datos (dl) */

.facts {
  display: grid;
  margin: 0;
  border-top: 2px solid var(--fg);
}

.facts div {
  display: grid;
  gap: 0.15rem var(--space-3);
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .facts div {
    grid-template-columns: 11rem 1fr;
    align-items: baseline;
  }
}

.facts dt {
  font-size: var(--step--1);
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Escala de tamaños */

.scale {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--fg);
}

.scale li {
  display: grid;
  gap: 0.6rem var(--space-3);
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 40rem) {
  .scale li {
    grid-template-columns: 12rem 1fr;
    align-items: center;
  }
}

.scale__beads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.scale__beads i {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--fg);
}

.scale__beads i:nth-child(3n + 2) {
  background: var(--accent);
}

.scale__beads i:nth-child(3n) {
  background: var(--sol);
}

.scale__beads--many i {
  width: 0.7rem;
  height: 0.7rem;
}

.scale strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.02em;
}

.scale span {
  color: var(--muted);
}

/* Principios */

.principles {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .principles > div {
    padding-inline: var(--space-3);
    border-left: 1px solid var(--line);
  }

  .principles > div:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

.principles h3 {
  font-size: var(--step-1);
  font-weight: 700;
}

.principles p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.statement {
  max-width: 24ch;
  font-size: var(--step-3);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.statement + p {
  max-width: var(--measure);
  margin-top: var(--space-3);
  font-size: var(--step-1);
  color: var(--muted);
}

/* Banda de liderazgo */

.section--band {
  background: var(--band-bg);
  color: var(--band-fg);
}

.section--band h2 {
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--band-muted);
}

.leader__name {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-wrap: balance;
}

.leader__role {
  margin-top: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.leader__text {
  max-width: 44rem;
  margin-top: var(--space-3);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--band-muted);
}

.leader__text strong {
  color: var(--band-fg);
  font-weight: 600;
}

.section--band .btn {
  margin-top: var(--space-4);
  background: var(--band-fg);
  color: var(--ink);
}

.section--band .btn:hover {
  background: var(--sol);
  color: var(--ink);
}

/* Preguntas frecuentes */

.faq {
  border-top: 2px solid var(--fg);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 56px;
  padding-block: 1rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 1.4rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
  background: var(--accent);
  color: var(--on-rosa);
}

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

.faq__answer {
  max-width: var(--measure);
  padding-bottom: var(--space-3);
  color: var(--muted);
}

.faq__answer a {
  color: var(--fg);
}

/* Migas de pan */

.breadcrumb {
  padding-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--line);
}

.breadcrumb a {
  display: inline-block;
  padding-block: 0.6rem;
}

/* Páginas interiores */

.page-head {
  padding-block: var(--space-4) var(--space-3);
}

.page-head h1 {
  max-width: 18ch;
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.page-head .lede {
  max-width: 44rem;
  margin-top: var(--space-3);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}

.page-head .lede strong {
  color: var(--fg);
  font-weight: 600;
}

.monogram {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: var(--space-3);
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.table-wrap {
  overflow-x: auto;
  margin-top: var(--space-2);
}

table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: var(--step--1);
}

caption {
  padding-bottom: 0.75rem;
  text-align: left;
  color: var(--muted);
}

th,
td {
  padding: 0.85rem 1rem 0.85rem 0;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

thead th {
  border-bottom: 2px solid var(--fg);
  font-family: var(--font-display);
  font-size: var(--step-0);
}

.note {
  max-width: var(--measure);
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid var(--sol);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--step--1);
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

/* ───────── Pie ───────── */

.site-footer {
  padding-block: var(--space-4) var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 48rem) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h2 {
  margin-bottom: 0.5rem;
  font-size: var(--step-0);
  font-weight: 700;
  color: var(--fg);
}

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

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer__legal {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

.site-footer__legal p + p {
  margin-top: 0.5rem;
}

@media print {
  .site-header,
  .site-footer,
  .hero__actions,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
