/* ==========================================================================
   Beinspor - hoja de estilos unica
   Mobile-first: base para 360px, capas con min-width 480 / 768 / 1024.
   Tailwind (CDN) y Alpine (CDN) se cargan segun el stack, pero ningun
   elemento visual depende de ellos: todo lo importante esta aqui.
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --text: #1c2227;
  --muted: #4b5661;
  --teal: #0b6a88;
  --teal-dark: #08546d;
  --teal-soft: #e8f3f7;
  --tint: #f1f7f9;
  --line: #d3dce1;
  --orange: #f08a24;
  --navy: #102a3a;
  --col: 736px;
  --pad: 16px;
  --r: 10px;
  --font: "Source Sans 3", "Source Sans Pro", "Segoe UI", "Liberation Sans", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img, video, svg { max-width: 100%; }
img, video { height: auto; }
a { color: var(--teal); }

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

.skip {
  position: absolute;
  left: var(--pad);
  top: -80px;
  z-index: 50;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--r) var(--r);
  text-decoration: none;
}
.skip:focus { top: 0; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  position: relative;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #1a1a1a;
}

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1100px;
  min-height: 68px;
  margin: 0 auto;
  padding: 10px var(--pad);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--navy);
  text-decoration: none;
}
.logo svg { width: 36px; height: 36px; flex: none; }
.logo__word {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.025em;
}

.masthead__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--muted);
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.nav-toggle:hover { background: var(--teal-soft); border-color: var(--teal); }
.nav-toggle svg { width: 22px; height: 22px; }

/* Menu movil: oculto por defecto, desplegable bajo la cabecera */
.nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid #1a1a1a;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .35);
}
.nav.is-open { display: block; }
.nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--pad);
  max-width: 1100px;
}
.nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-top: 1px solid var(--line);
  color: var(--teal);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s, padding-left .2s;
}
.nav li:first-child a { border-top: 0; }
.nav a:hover { color: var(--teal-dark); padding-left: 6px; }

.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--teal);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.back:hover { color: var(--teal-dark); text-decoration: underline; }

/* ---- Columna editorial ------------------------------------------------- */
.col {
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--pad));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.article-head { padding-top: 30px; }

.headline {
  margin: 0 0 .55em;
  font-size: clamp(1.5rem, 1.05rem + 1.6vw, 2rem);
  font-weight: 800;
  line-height: 1.17;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--ink);
}

.byline {
  margin: 0 0 1.25rem;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--muted);
}

.dek {
  margin: 0 0 1.75rem;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink);
}

/* ---- Prosa ------------------------------------------------------------- */
.prose p { margin: 0 0 1.1em; }
.prose h2 {
  margin: 2.1em 0 .6em;
  font-size: clamp(1.3rem, 1.15rem + .7vw, 1.6rem);
  font-weight: 800;
  line-height: 1.22;
  color: var(--ink);
  scroll-margin-top: 16px;
}
.prose h3 {
  margin: 1.6em 0 .5em;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.prose ul:not([class]) { margin: 0 0 1.25em; padding-left: 1.3rem; }
.prose ul:not([class]) > li { margin-bottom: .5em; padding-left: .2rem; }
.prose ul:not([class]) > li::marker { color: var(--teal); }
.prose strong { color: var(--ink); }
.prose a { text-underline-offset: 3px; }
.prose > h2:first-child { margin-top: 0; }

/* ---- Figuras: imagen y bucle ------------------------------------------ */
.figure { margin: 1.75rem 0 2rem; }
.figure__frame {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #dfe7eb;
}
.figure__frame--wide { aspect-ratio: 1200 / 630; }
.figure__frame img,
.figure__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure figcaption {
  margin-top: .6rem;
  font-size: .875rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ---- Banda de cifras (acento) ----------------------------------------- */
.figures {
  margin: 2.25rem 0;
  padding: 1.25rem var(--pad) .5rem;
  border-radius: var(--r);
  background: var(--teal-soft);
}
.figures__title {
  margin: 0 0 .25rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.figures__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}
.figures__item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: .85rem 0;
  border-top: 1px solid rgba(11, 106, 136, .22);
}
.figures__item:first-child { border-top: 0; }
.figures__num {
  flex: none;
  min-width: 5.25rem;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.figures__label {
  font-size: .975rem;
  line-height: 1.4;
  color: var(--text);
}

/* ---- Tabla del recorrido del dinero ----------------------------------- */
.table-block { margin: 2rem 0 2.25rem; }
.table-title {
  margin: 0 0 .7rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.cost {
  width: 100%;
  border-collapse: collapse;
  font-size: .975rem;
  line-height: 1.45;
}
/* Movil: filas apiladas con etiqueta */
.cost,
.cost tbody,
.cost tr,
.cost th,
.cost td { display: block; }
.cost thead {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.cost tr {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.cost tbody th {
  padding: 10px 14px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  text-align: left;
}
.cost td {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.cost td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 2px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Llamadas a la accion --------------------------------------------- */
.cta {
  display: grid;
  gap: 1rem;
  margin: 2.25rem 0;
  padding: 1.5rem 0;
  border-block: 1px solid var(--line);
}
.cta__lead {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  min-height: 3.25rem;
  padding: .8rem 1.5rem;
  border-radius: var(--r);
  background: var(--teal);
  color: #fff;
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -10px rgba(8, 84, 109, .65);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }

/* ---- Secciones con fondo tintado -------------------------------------- */
.tint {
  margin-top: 3rem;
  padding: 2.5rem 0 3rem;
  background: var(--tint);
}
.tint .prose > h2:first-child { margin-top: 0; }
.tint .figure:last-child { margin-bottom: 0; }
.tint + .prose { padding-top: 2.75rem; }
.article-head + .prose { padding-top: .5rem; }
.tint .steps li::after { background: #c3d5dc; }
.tint .cta { border-color: #c3d5dc; margin-bottom: 0; }

/* ---- Pasos numerados -------------------------------------------------- */
.steps {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  margin: 0;
  padding: 0 0 1.4rem 3.5rem;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 800;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 2.7rem;
  bottom: .3rem;
  width: 2px;
  background: var(--line);
}
.steps li:last-child { padding-bottom: .5rem; }
.steps li:last-child::after { display: none; }
.steps strong { display: block; margin-bottom: .1rem; color: var(--ink); }

/* ---- Pie editorial (footer.bottom) ------------------------------------ */
.bottom {
  margin-top: 4.5rem;
  padding: 0 var(--pad) 3rem;
  font-size: .8125rem;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}
.bottom > * {
  max-width: var(--col);
  margin-inline: auto;
}
.bottom__owner { margin-bottom: 1.25rem; }
.bottom__owner p { margin: 0; }
.bottom__owner strong { color: var(--ink); letter-spacing: .02em; }
.bottom__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 .2rem;
  margin-bottom: 1.1rem;
}
.bottom__legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .6rem;
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.bottom__legal a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }
.end-line {
  max-width: 40rem;
  margin: 0 auto;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---- Paginas legales y About ------------------------------------------ */
.page-title {
  margin: 0 0 .5em;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 1.875rem);
  font-weight: 800;
  line-height: 1.17;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--ink);
}
.updated {
  margin: 0 0 1.5rem;
  font-size: .875rem;
  color: var(--muted);
}
.legal-lead {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
}
.address-block {
  margin: 0 0 1.25em;
  font-style: normal;
  line-height: 1.6;
}

/* ===== >= 480px ========================================================= */
@media (min-width: 480px) {
  :root { --pad: 20px; }

  .btn { width: auto; min-width: 19rem; letter-spacing: .09em; }

  .figures__list { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .figures__item:nth-child(2) { border-top: 0; }
  .figures__num { min-width: 4.5rem; }
}

/* ===== >= 768px ========================================================= */
@media (min-width: 768px) {
  :root { --pad: 24px; }

  body { font-size: 1.125rem; }

  .masthead__bar { min-height: 94px; padding-block: 14px; }
  .logo svg { width: 48px; height: 48px; }
  .logo__word { font-size: 1.7rem; }
  .nav-toggle { display: none; }

  /* Menu escritorio: en linea dentro de la barra */
  .nav,
  .nav.is-open {
    display: block;
    position: static;
    flex: 1 1 auto;
    margin-left: clamp(32px, 6vw, 96px);
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav ul {
    display: flex;
    gap: clamp(20px, 3vw, 38px);
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .nav a {
    min-height: 44px;
    border-top: 0;
    font-size: 1rem;
  }
  .nav a:hover { padding-left: 0; text-decoration: underline; text-underline-offset: 6px; }

  .article-head { padding-top: 48px; }
  .byline { margin-bottom: 1.5rem; }
  .dek { margin-bottom: 2rem; }

  .prose h2 { margin-top: 2.3em; }

  .figure { margin: 2.25rem 0 2.5rem; }

  /* Tabla clasica */
  .cost { display: table; font-size: 1rem; }
  .cost thead {
    position: static;
    display: table-header-group;
    width: auto; height: auto;
    overflow: visible;
    clip: auto;
  }
  .cost tbody { display: table-row-group; }
  .cost tr { display: table-row; margin: 0; border: 0; background: transparent; }
  .cost th,
  .cost td { display: table-cell; vertical-align: middle; }
  .cost thead th {
    padding: 14px 16px;
    background: var(--teal);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: .9375rem;
    font-weight: 700;
    text-align: center;
  }
  .cost tbody th {
    width: 17%;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    text-align: center;
  }
  .cost td {
    padding: 14px 16px;
    border: 1px solid var(--line);
  }
  .cost td::before { display: none; }
  .cost tbody tr:nth-child(even) th,
  .cost tbody tr:nth-child(even) td { background: #f7fafb; }

  /* Banda de cifras: 4 columnas */
  .figures { padding: 1.6rem 1.75rem 1.5rem; }
  .figures__list { grid-template-columns: repeat(4, 1fr); column-gap: 0; }
  .figures__item {
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
    padding: .25rem 1.1rem;
    border-top: 0;
    border-left: 1px solid rgba(11, 106, 136, .28);
  }
  .figures__item:first-child { padding-left: 0; border-left: 0; }
  .figures__item:nth-child(2) { border-top: 0; }
  .figures__num { min-width: 0; font-size: 2.6rem; }

  /* Fila de boton */
  .cta {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 1.75rem 0;
  }
  .cta .btn { min-width: 0; }

  .tint { margin-top: 3.5rem; padding: 3.5rem 0 4rem; }
  .tint + .prose { padding-top: 3.5rem; }
  .steps li { padding-left: 4rem; padding-bottom: 1.6rem; }

  .bottom { margin-top: 6rem; padding-bottom: 4rem; }
}

/* ===== >= 1024px ======================================================== */
@media (min-width: 1024px) {
  .article-head { padding-top: 56px; }
  .headline { margin-bottom: .6em; }
  .figure { margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
