/* =============================================================
   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; }

/* Mandatory: an element with BOTH .reveal-related class and data-split
   must never be stuck invisible if JS fails or is stale (gotcha A.4.5). */
[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; }

/* 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; /* mandatory CSS safety net */
}
.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); }
.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: 100svh;
  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.6rem);
  line-height: .98;
  max-width: 17ch;
  margin-inline: auto;
}
.hero-title em {
  font-style: normal;
  color: var(--blue);
}
.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 {
  position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  display: flex; 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;
}
.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 --- */
.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: 22ch;
}
.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); }

/* --- What's inside --- */
.chapters { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.chapter-row { border-bottom: 1px solid var(--line); }
.chapter-trigger {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0;
  text-align: left;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--mute-2);
  width: 2.4ch;
}
.chapter-title {
  font-size: clamp(1.05rem, 1.9vw, 1.4rem);
  font-weight: 700;
  transition: color .3s var(--ease-out);
}
.chapter-row:hover .chapter-title { color: var(--blue); }
.chapter-icon {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: transform .4s var(--ease-soft), border-color .3s var(--ease-out);
}
.chapter-icon::before { content: "+"; font-size: 1rem; color: var(--mute); line-height: 1; }
.chapter-row.is-open .chapter-icon { transform: rotate(45deg); border-color: var(--blue); }
.chapter-row.is-open .chapter-icon::before { color: var(--blue); }
.chapter-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease-soft);
}
.chapter-panel > div { overflow: hidden; }
.chapter-row.is-open .chapter-panel { grid-template-rows: 1fr; }
.chapter-desc {
  padding: 0 0 1.7rem 3.65ch;
  color: var(--mute);
  max-width: 58ch;
  font-size: .98rem;
}

/* Formula teaser box */
.formula-box {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border: 1px solid rgba(29,155,240,.3);
  background: linear-gradient(160deg, rgba(29,155,240,.09), rgba(239,68,68,.05));
  border-radius: 20px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
}
.formula-tag {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.1rem;
  display: inline-block;
}
.formula-text {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
}
.formula-caption {
  margin-top: 1.1rem;
  color: var(--mute);
  font-size: .92rem;
  max-width: 56ch;
}

/* Stats / count-up */
.stats {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { border-top: 1px solid var(--line); padding-top: 1rem; }
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  color: var(--ink);
}
.stat-label {
  margin-top: .35rem;
  color: var(--mute);
  font-size: .85rem;
}

/* --- Testimonials --- */
.testimonials-grid {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid; gap: 1.5rem; grid-template-columns: 1fr;
}
@media (min-width: 720px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card { display: flex; flex-direction: column; gap: 1.1rem; }
.stars { display: flex; gap: .25rem; }
.stars svg { width: 16px; height: 16px; fill: var(--blue); }
.testimonial-quote {
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.5;
}
.testimonial-meta { margin-top: auto; display: flex; flex-direction: column; gap: .2rem; }
.testimonial-name { font-weight: 700; font-size: .92rem; }
.testimonial-result { font-family: var(--font-mono); font-size: .78rem; color: var(--mute-2); }
.testimonials-note {
  margin-top: 1.5rem;
  font-size: .85rem;
  color: var(--mute-2);
  max-width: 56ch;
}

/* --- Garantía --- */
.guarantee { background: var(--bg-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.guarantee-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) { .guarantee-grid { grid-template-columns: 1fr 1fr; } }
.guarantee-badge {
  width: 108px; height: 108px; border-radius: 50%;
  border: 1px solid rgba(34,197,94,.4);
  display: grid; place-items: center;
  margin-bottom: 1.6rem;
}
.guarantee-badge svg { width: 44px; height: 44px; stroke: var(--green); }
.guarantee h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.guarantee p { color: var(--mute); margin-top: 1.1rem; max-width: 46ch; font-size: 1.02rem; }
.guarantee-list { margin-top: 1.6rem; display: flex; flex-direction: column; gap: .8rem; }
.guarantee-list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; color: var(--mute); }
.guarantee-list svg { width: 18px; height: 18px; stroke: var(--green); flex-shrink: 0; margin-top: .18rem; }

/* --- Price / buy --- */
.pricing { text-align: center; }
.pricing-inner { max-width: 32rem; margin-inline: auto; }
.pricing-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(2.2rem, 5vw, 3.2rem);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
}
.price-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4rem);
  color: var(--ink);
  margin-top: .6rem;
}
.price-currency { font-size: .5em; color: var(--mute); vertical-align: super; margin-right: .2rem; }
.price-note { margin-top: .6rem; color: var(--mute-2); font-size: .82rem; font-family: var(--font-mono); }
.pricing-includes {
  margin-top: 1.8rem; text-align: left;
  display: flex; flex-direction: column; gap: .7rem;
}
.pricing-includes li { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--mute); }
.pricing-includes svg { width: 16px; height: 16px; stroke: var(--green); flex-shrink: 0; margin-top: .2rem; }
.pricing-card .btn { margin-top: 2rem; }
.pricing-guarantee-note { margin-top: 1rem; font-size: .82rem; color: var(--mute-2); }

.bridge-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: 46ch;
  margin-inline: auto;
}
.bridge-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-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. */
}
