/* Workout · Sitio web — tokens y base compartida. Reglas en DESIGN.md. */
:root {
  /* Color */
  --negro: #101113;
  --negro-2: #17191b;
  --carbon: #1d1f22;
  --carbon-2: #2a2d31;
  --verde: #8DC63F;
  --verde-hover: #9bd24f;
  --verde-oscuro: #3d6b10;
  --verde-velo: rgba(141, 198, 63, .12);
  --crema: #F2F1EA;
  --blanco: #ffffff;
  --gris: #8e908b;
  --gris-claro: #b7b9b2;
  --tinta-suave: #4a4c48;
  --linea: rgba(242, 241, 234, .12);
  --linea-fuerte: rgba(242, 241, 234, .24);
  --linea-clara: #dcdbd2;
  --whatsapp: #25D366;
  --whatsapp-tinta: #07130a;
  --alerta: #f0b37e;
  --alerta-velo: rgba(240, 179, 126, .12);
  --error: #ff7a7a;
  --velo-negro: rgba(16, 17, 19, .88);
  --velo-foto-fuerte: rgba(16, 17, 19, .93);
  --velo-foto-medio: rgba(16, 17, 19, .35);
  --velo-foto-suave: rgba(16, 17, 19, .25);
  --sombra: 0 1px 2px rgba(16, 17, 19, .2), 0 8px 24px rgba(0, 0, 0, .18);
  --sombra-dialogo: 0 12px 32px rgba(0, 0, 0, .4);

  /* Tipografía */
  --f-display: "Archivo Black", "Space Grotesk", sans-serif;
  --f-texto: "Space Grotesk", system-ui, sans-serif;
  --t-13: .8125rem;
  --t-14: .875rem;
  --t-16: 1rem;
  --t-19: 1.1875rem;
  --t-23: 1.4375rem;
  --t-28: 1.75rem;
  --t-32: 2rem;
  --t-entrada: clamp(1.1875rem, 2.2vw, 1.4375rem);  /* 19 → 23 */
  --d-sm: clamp(1.5rem, 4.5vw, 3.25rem);
  --d-md: clamp(1.75rem, 5.5vw, 4rem);
  --d-lg: clamp(2.25rem, 7.5vw, 5.5rem);
  --d-xl: clamp(3rem, 10vw, 6rem);

  /* Espacio (4 px) */
  --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 24px;
  --e-6: 32px; --e-7: 48px; --e-8: 64px; --e-9: 96px;
  --gutter: max(16px, 6vw);

  /* Forma */
  --r-control: 6px;
  --r-card: 14px;
  --r-pill: 999px;
  --alto-control: 48px;
  --foco: var(--verde);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--negro);
  color: var(--crema);
  font-family: var(--f-texto);
  font-size: var(--t-16);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--verde); color: var(--negro); }
[hidden] { display: none !important; }

/* Foco: verde sobre oscuro, verde oscuro sobre claro (.claro) */
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; }
.claro { --foco: var(--verde-oscuro); }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .98;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.verde { color: var(--verde); }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Íconos Lucide */
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ico-20 { width: 20px; height: 20px; }
.ico-24 { width: 24px; height: 24px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e-2);
  min-height: var(--alto-control); padding: 0 var(--e-5);
  border: 1px solid transparent; border-radius: var(--r-control);
  font-size: var(--t-16); font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.btn:active { transform: scale(.98); }
.btn-principal { background: var(--verde); color: var(--negro); }
.btn-principal:hover { background: var(--verde-hover); }
.btn-secundario { background: transparent; color: var(--crema); border-color: var(--linea-fuerte); }
.btn-secundario:hover { border-color: var(--verde); }
.btn-whatsapp { background: var(--whatsapp); color: var(--whatsapp-tinta); }
.btn-whatsapp:hover { filter: brightness(1.06); }
.btn-oscuro { background: var(--negro); color: var(--crema); }
.btn-oscuro:hover { background: var(--carbon); }
.btn-bloque { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Enlace con flecha */
.enlace {
  display: inline-flex; align-items: center; gap: var(--e-2);
  min-height: 44px; color: var(--crema); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--verde); text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.enlace:hover { color: var(--verde); }

/* Navegación compartida */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center; gap: var(--e-4);
  padding: var(--e-2) var(--gutter);
  transition: background-color .3s ease;
}
.nav.solid { background: var(--velo-negro); backdrop-filter: blur(8px); }
.nav .logo { display: block; min-height: 44px; }
.nav .logo img { height: 44px; width: 44px; }
.nav-links { display: flex; gap: var(--e-1); }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--e-3);
  color: var(--crema); text-decoration: none; font-size: var(--t-14); font-weight: 500; white-space: nowrap;
  border-radius: var(--r-control);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--verde); }

.pie {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--e-4);
  padding: var(--e-5) var(--gutter); border-top: 1px solid var(--linea);
  font-size: var(--t-14); color: var(--gris); background: var(--negro);
}
.pie img { height: 36px; width: 36px; }
.pie a { color: var(--gris); }
.pie a:hover { color: var(--verde); }

@media (max-width: 480px) {
  .nav-links .solo-ancho { display: none; }
}
@media (max-width: 700px) {
  .nav .logo img { height: 40px; width: 40px; }
  .nav-links a { padding: 0 var(--e-2); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
