/* =============================================================
   Ciencia Muscular — Hub principal (lacienciamuscular.com)
   Mismo sistema de diseño que elartedeentrenar.lacienciamuscular.com
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
@property --mx { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
@property --my { syntax: "<percentage>"; inherits: false; initial-value: 50%; }

:root {
  --bg:        #0D0D0D;
  --bg-2:      #161616;
  --bg-3:      #1D1D1C;
  --ink:       #F2F2F0;   /* off-white, never pure #fff on dark */
  --mute:      #ABABA6;
  --mute-2:    #7A7A75;
  --line:      rgba(242, 242, 240, 0.12);
  --line-soft: rgba(242, 242, 240, 0.07);

  --blue:      #1D9BF0;   /* primary accent — CTA / interactive */
  --green:     #22C55E;   /* correct / effective */
  --red:       #EF4444;   /* Volumen Basura / anti-pattern */

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1180px;
  --gutter: 1.5rem;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
ul { list-style: none; padding: 0; }
::selection { background: var(--blue); color: var(--bg); }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.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;
}
.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
}
.kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,155,240,0.18);
  flex-shrink: 0;
}
.kicker.is-red::before { background: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }
.kicker.is-green::before { background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }

.section { position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--mute); font-size: clamp(1rem, 1.4vw, 1.15rem); margin-top: 1.1rem; max-width: 42ch; }
.section-eyebrow { margin-bottom: 1rem; }

.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-mute { color: var(--mute); }

/* =============================================================
   4. Reveal / split-text defensive rules
   ============================================================= */
[data-reveal] {
  opacity: 0; transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

[data-reveal][data-split],
.reveal[data-split] {
  opacity: 1;
  transform: none;
}
.split-word {
  display: inline-block;
  will-change: transform, opacity;
}

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: 1rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s var(--ease-out);
}
.btn-primary {
  background: var(--blue);
  color: #06131C;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(29,155,240,.32), 0 6px 18px rgba(0,0,0,.3);
}
.btn-primary:active { transform: translateY(-1px); transition-duration: .12s; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.15rem 2.3rem; font-size: 1.05rem; }
.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

/* Animated underline links */
.link-underline { position: relative; padding-bottom: .2rem; }
.link-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hover-invert big headline */
.invert-hover {
  display: inline;
  transition: color .35s var(--ease-out), background .35s var(--ease-out);
  padding: 0 .12em;
  border-radius: .18em;
}
@media (hover: hover) and (pointer: fine) {
  .invert-hover:hover {
    background: var(--red);
    color: var(--bg);
  }
}

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  padding: 2rem;
}

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Splash --- */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: auto;
  transition: opacity .8s var(--ease-out), clip-path 1s var(--ease-soft);
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety {
  to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
}
.splash-mark {
  font-family: var(--font-mono);
  font-size: .95rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.splash-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--blue);
  animation: splashPulse 1.1s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.6); opacity: 1; }
}

/* --- Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  padding-block: 1.1rem;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(13,13,13,.82);
  border-bottom-color: var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  .nav.is-scrolled { backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  display: flex; align-items: center; gap: .5rem;
}
.nav-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.brand-icon { height: 1.9em; width: auto; display: block; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links a { font-size: .92rem; color: var(--mute); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: none; }
.nav-toggle {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 16px; height: 1.5px; background: var(--ink);
  position: relative; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }
.nav-mobile {
  position: fixed; inset: 0; z-index: 190;
  background: var(--bg);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[aria-hidden="false"] { clip-path: inset(0); }
.nav-mobile-links { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.nav-mobile-links a { font-size: 1.6rem; font-weight: 700; }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex; align-items: center;
  padding-top: 6rem;
  isolation: isolate;
  overflow: clip;
}
.hero-gradient {
  position: absolute; inset: -10%; z-index: -1;
  background:
    radial-gradient(circle 620px at var(--mx, 50%) var(--my, 50%), rgba(29,155,240,.42) 0%, transparent 55%),
    radial-gradient(circle 760px at calc(var(--mx, 50%) + 14%) calc(var(--my, 50%) - 12%), rgba(34,197,94,.30) 0%, transparent 58%),
    radial-gradient(circle 680px at calc(var(--mx, 50%) - 16%) calc(var(--my, 50%) + 16%), rgba(239,68,68,.26) 0%, transparent 58%),
    var(--bg);
  filter: blur(60px) saturate(140%);
}
.hero-gradient::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(242,242,240,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242,242,240,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; margin-inline: auto; }
.hero-kicker { justify-content: center; margin-bottom: 1.6rem; }
.hero-title {
  font-size: clamp(2.6rem, 8.4vw, 6.2rem);
  line-height: .98;
  max-width: 18ch;
  margin-inline: auto;
}
.hero-title em {
  font-style: normal;
  color: var(--red);
}
.hero-sub {
  margin: 1.8rem auto 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--mute);
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 2.6rem;
}
.hero-note {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .05em;
  color: var(--mute-2);
}
.hero-scrollcue {
  /* Oculto por defecto (móvil): en pantallas angostas colisiona con el texto del hero
     que queda justo encima (el hero-note). En desktop hay espacio de sobra y sí aporta. */
  display: none;
  position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  flex-direction: column; align-items: center; gap: .5rem;
  color: var(--mute-2);
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
}
@media (min-width: 720px) {
  .hero-scrollcue { display: flex; }
}
.hero-scrollcue .line {
  width: 1px; height: 34px; background: linear-gradient(var(--mute-2), transparent);
  animation: scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* --- Manifiesto / Volumen Basura (versión breve, marca) --- */
.manifesto { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.manifesto-statement {
  font-size: clamp(1.6rem, 3.6vw, 2.9rem);
  line-height: 1.18;
  max-width: 24ch;
}
.manifesto-body { max-width: 60ch; margin-top: 2rem; color: var(--mute); font-size: 1.08rem; }
.manifesto-body p + p { margin-top: 1.1rem; }
.manifesto-body strong { color: var(--ink); font-weight: 700; }

.compare {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-card {
  border-radius: 18px; padding: 1.8rem;
  border: 1px solid var(--line-soft);
  background: var(--bg);
}
.compare-card.is-bad { border-color: rgba(239,68,68,.32); }
.compare-card.is-good { border-color: rgba(34,197,94,.32); }
.compare-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .05em;
  margin-bottom: .9rem;
}
.compare-card.is-bad .compare-label { color: var(--red); }
.compare-card.is-good .compare-label { color: var(--green); }
.compare-card p { color: var(--mute); font-size: .98rem; }
.compare-card.is-bad .mark { color: var(--red); }
.compare-card.is-good .mark { color: var(--green); }

/* --- Productos (componente nuevo del hub) --- */
.products-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) { .products-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }

.product-card {
  position: relative;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 2.6rem);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  transition: transform .5s var(--ease-soft), border-color .4s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .product-card:hover { transform: translateY(-4px); border-color: var(--line); }
  .product-card.is-featured:hover { border-color: rgba(29,155,240,.4); }
}
.product-card.is-featured { border-color: rgba(29,155,240,.28); }

.product-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.3rem;
}
.product-status {
  flex-shrink: 0;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--mute-2);
  white-space: nowrap;
}
.product-status.is-live { color: var(--green); border-color: rgba(34,197,94,.35); }
.product-status.is-soon { color: var(--mute-2); border-color: var(--line); }

.product-tag { margin-bottom: 0; }
.product-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); max-width: 22ch; }
.product-subtitle {
  margin-top: .35rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--blue);
}
.product-desc { margin-top: .9rem; color: var(--mute); font-size: .98rem; max-width: 40ch; }

/* Slot de imagen por producto — placeholder honesto, sin foto inventada (ver comentario en el HTML) */
.product-media {
  margin-top: 1.1rem;
  width: 100%; max-width: 168px;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.product-media-label {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mute-2); text-align: center;
}

.product-price {
  margin-top: 1.6rem;
  display: flex; align-items: baseline; gap: .55rem; flex-wrap: wrap;
}
.product-price .price-was {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 1.05rem; color: var(--mute-2);
  text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px;
}
.product-price .price-value {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.4rem);
  color: var(--ink);
}
.product-price .price-currency { font-size: .48em; color: var(--mute); }
.product-price-note { margin-top: .3rem; font-size: .78rem; color: var(--mute-2); font-family: var(--font-mono); }
.discount-badge {
  display: inline-block; margin-top: .5rem;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--green); border: 1px solid rgba(34,197,94,.35); border-radius: 999px;
  padding: .25rem .6rem;
}

.product-includes {
  margin-top: 1.6rem; flex-grow: 1;
  display: flex; flex-direction: column; gap: .65rem;
}
.product-includes li { display: flex; gap: .65rem; align-items: flex-start; font-size: .92rem; color: var(--mute); }
.product-includes svg { width: 15px; height: 15px; stroke: var(--green); flex-shrink: 0; margin-top: .22rem; }

.product-card .btn { margin-top: 2rem; }
.product-note { margin-top: .9rem; font-size: .76rem; color: var(--mute-2); text-align: center; }

/* --- Página legal (Términos y Condiciones) --- */
.legal-header { max-width: 62ch; }
.legal-updated { margin-top: .9rem; color: var(--mute-2); font-family: var(--font-mono); font-size: .8rem; }
.legal { max-width: 68ch; margin-top: 3rem; }
.legal h2 { font-size: 1.28rem; color: var(--ink); scroll-margin-top: 90px; }
.legal h2:not(:first-child) { margin-top: 2.6rem; }
.legal p { margin-top: 1rem; color: var(--mute); font-size: .98rem; line-height: 1.7; }
.legal ul { margin-top: 1rem; padding-left: 1.3rem; color: var(--mute); font-size: .98rem; line-height: 1.65; }
.legal li { margin-top: .5rem; }
.legal li::marker { color: var(--blue); }
.legal strong { color: var(--ink); font-weight: 700; }
.legal a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-toc { margin-top: 2rem; padding: 1.2rem 1.4rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.legal-toc p { margin-top: 0; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--mute-2); }
.legal-toc ol { margin-top: .8rem; padding-left: 1.2rem; display: grid; gap: .45rem; font-size: .92rem; }
.legal-toc a { color: var(--mute); text-decoration: none; }
.legal-toc a:hover { color: var(--blue); }

.path-note {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-soft);
  font-size: .92rem;
  color: var(--mute-2);
  max-width: 52ch;
  margin-inline: auto;
  text-align: center;
}
.path-note strong { color: var(--mute); font-weight: 600; }

/* --- Footer --- */
.footer { border-top: 1px solid var(--line-soft); padding-block: 3rem; }
.footer-row {
  display: flex; flex-direction: column; gap: 1.5rem;
  align-items: flex-start; justify-content: space-between;
}
@media (min-width: 720px) { .footer-row { flex-direction: row; align-items: center; } }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-weight: 700; font-size: .95rem; }
.footer-brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.footer-tagline { color: var(--mute-2); font-size: .85rem; margin-top: .4rem; }
.footer-social { display: flex; gap: .7rem; margin-top: 1.1rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--mute);
  transition: border-color .3s var(--ease-out), color .3s var(--ease-out), transform .3s var(--ease-soft);
}
.footer-social svg { width: 17px; height: 17px; }
.footer-social a:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: .85rem; color: var(--mute); }
.footer-links a:hover { color: var(--ink); }
.footer-copy { color: var(--mute-2); font-size: .78rem; margin-top: 2rem; }

/* =============================================================
   7. Effects (keyframes shared)
   ============================================================= */
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================================
   8. Responsive breakpoints (fixed steps only)
   ============================================================= */
@media (min-width: 540px) { .container { padding-inline: 2rem; } }
@media (min-width: 720px) { }
@media (min-width: 960px) { }
@media (min-width: 1280px) { .container { padding-inline: 2.5rem; } }
@media (min-width: 1600px) { }

/* =============================================================
   9. Reduced-motion — only genuinely intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-scrollcue .line { animation: none; }
  .splash-dot { animation: none; }
  /* Do NOT disable: reveals, hover-invert, gradient drift, accordion, count-up. */
}
