/* =========================================================================
   CreadoraVirtual — design tokens & layout
   Tokens mirror js/content.js → THEME. Fonts: Poppins (display), Lato (text),
   Playfair Display italic (accent words).
   ========================================================================= */
:root {
  --ink: #0e0b1a;
  --ink-2: #1c1726;
  --ink-3: #26203a;
  --violet: #8151fc;
  --violet-soft: #b79cff;
  --pink: #e8308a;
  --pink-glow: #ff5fb0;
  --cyan: #5bc8ff;
  --paper: #fafafa;
  --muted: #a9a3bd;
  --line: rgba(255, 255, 255, 0.1);

  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-accent: 'Playfair Display', Georgia, serif;

  --radius: 22px;
  --radius-sm: 12px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;

  --grad-brand: linear-gradient(120deg, var(--pink) 0%, var(--violet) 100%);
  --shadow-glow: 0 10px 40px rgba(129, 81, 252, 0.35), 0 2px 8px rgba(232, 48, 138, 0.25);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
em { font-family: var(--font-accent); font-style: italic; font-weight: 500; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); font-weight: 400; }
.lead { font-size: 1.15rem; color: #d9d5e6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-soft);
  margin: 0 0 1rem;
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.05em;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  background: var(--grad-brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.15;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn small { font-family: var(--font-text); font-weight: 400; font-size: 0.78em; opacity: 0.85; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn--lg { padding: 1.05em 2.1em; font-size: 1.08rem; }
.btn--sm { padding: 0.6em 1.15em; font-size: 0.9rem; box-shadow: none; }
.btn--ghost { background: transparent; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.25); font-weight: 600; }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.link-muted { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.link-muted:hover { color: var(--paper); }

/* ---- Header --------------------------------------------------------------- */
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--violet); color: #fff; padding: 0.6em 1em; border-radius: 8px; text-decoration: none; }
.skip-link:focus { left: 8px; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(14, 11, 26, 0.85), rgba(14, 11, 26, 0.45));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header__inner { width: min(1320px, 100% - var(--gutter) * 2); margin-inline: auto; height: var(--header-h); display: flex; align-items: center; gap: 2rem; }
.brand img { width: auto; height: 38px; }
.site-nav { display: flex; gap: 1.6rem; margin-inline: auto; }
.site-nav a { text-decoration: none; color: #d9d5e6; font-family: var(--font-display); font-weight: 500; font-size: 0.92rem; }
.site-nav a:hover { color: #fff; }
.site-header__actions { display: flex; align-items: center; gap: 1.2rem; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; align-items: center; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; transition: transform 0.25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.mobile-nav { display: grid; gap: 1rem; padding: 1.2rem var(--gutter) 2rem; background: var(--ink-2); font-family: var(--font-display); font-size: 1.1rem; }
.mobile-nav a { text-decoration: none; }
.mobile-nav[hidden] { display: none; }

@media (max-width: 880px) {
  .site-nav, .site-header__actions { display: none; }
  .nav-toggle { display: flex; }
  .brand img { height: 30px; }
}

/* ---- Pinned stage --------------------------------------------------------- */
.story {
  --travel: 6.5;
  position: relative;
  height: calc((1 + var(--travel)) * 100vh);
  height: calc((1 + var(--travel)) * 100svh);
}
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 70% 40%, rgba(129, 81, 252, 0.18), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(232, 48, 138, 0.14), transparent 70%),
    var(--ink);
}
.stage__bg {
  position: absolute; inset: 0;
  background: center 30% / cover no-repeat; /* image set by main.js via asset() */
  opacity: 0.55;
  filter: saturate(1.1);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.25), #000 55%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0.25), #000 55%);
}
.stage__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink) 0%, transparent 45%); }
.stage__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity 0.6s ease; }
.stage.is-ready .stage__poster.is-behind { opacity: 0; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.stage__labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stage__label {
  position: absolute; left: 0; top: 0; opacity: 0; visibility: hidden;
  padding: 0.45em 0.95em; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-display); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: rgba(14, 11, 26, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  will-change: transform, opacity;
}
.stage__label::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.6em; vertical-align: 1px; background: var(--grad-brand); box-shadow: 0 0 8px var(--pink-glow); }
body.is-static .stage__labels { display: none; }
@media (max-width: 720px), (max-aspect-ratio: 9/10) { .stage__label { font-size: 0.66rem; padding: 0.4em 0.8em; } }
.stage__copy { position: absolute; inset: 0; pointer-events: none; }
.chapter {
  position: absolute; top: 50%; transform: translateY(0);
  width: min(44%, 580px);
  margin-top: 0;
  translate: 0 -50%;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}
.chapter.is-visible { pointer-events: auto; }
.chapter--left { left: 6%; }
.chapter--right { right: 6%; }
.chapter__title { font-size: clamp(2rem, 4.2vw, 3.9rem); font-weight: 800; margin-bottom: 0.45em; text-wrap: balance; }
h1.chapter__title { font-size: clamp(2rem, 3.9vw, 3.6rem); }
.chapter__text { font-size: clamp(1rem, 1.25vw, 1.2rem); color: #e2ddf0; max-width: 46ch; }
[data-chapter="hero"] .chapter__text { font-size: clamp(1.15rem, 1.6vw, 1.5rem); max-width: 40ch; }
.chapter__list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.55rem; }
.chapter__list li { padding-left: 1.5rem; position: relative; color: #e2ddf0; }
.chapter__list li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 50%; background: var(--grad-brand); box-shadow: 0 0 12px var(--pink-glow); }
.chapter__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; margin-top: 0.4rem; }

.stage__dots { position: absolute; right: 22px; top: 50%; translate: 0 -50%; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stage__dots li { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); transition: background 0.3s, transform 0.3s; }
.stage__dots li.is-on { background: var(--pink-glow); transform: scale(1.35); box-shadow: 0 0 10px var(--pink-glow); }

.stage__skip {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0;
  font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; padding: 0.5em 1em; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(14, 11, 26, 0.5); backdrop-filter: blur(6px);
}
.stage__skip:hover { color: #fff; border-color: rgba(255,255,255,0.4); }
.stage__hint { position: absolute; right: 6%; bottom: 26px; margin: 0; font-size: 0.85rem; color: var(--muted); transition: opacity 0.4s; }
.stage__hint.is-hidden { opacity: 0; }

@media (max-width: 720px), (max-aspect-ratio: 9/10) {
  .chapter, .chapter--left, .chapter--right {
    left: var(--gutter); right: var(--gutter); top: auto; bottom: 9%;
    width: auto; translate: 0 0; max-width: none;
  }
  .chapter__title, h1.chapter__title { font-size: clamp(1.85rem, 7.6vw, 2.5rem); }
  .chapter__text { font-size: 1.08rem; line-height: 1.5; }
  [data-chapter="hero"] .chapter__text { font-size: 1.2rem; }
  .chapter__list { gap: 0.4rem; font-size: 1.02rem; margin-bottom: 0.9rem; }
  .chapter .eyebrow { font-size: 0.74rem; margin-bottom: 0.7rem; }
  .chapter .btn--ghost { display: none; }
  .chapter .btn--lg { padding: 0.85em 1.6em; font-size: 0.98rem; }
  /* The hero card is hidden on phones, so the opening copy sits high. */
  .chapter[data-chapter="hero"] { bottom: auto; top: calc(var(--header-h) + 8vh); }
  .stage__dots { display: none; } /* would overlap full-width copy on phones */
  .stage__hint { display: none; }
  .stage__skip { bottom: 12px; }
  .stage__bg { -webkit-mask-image: none; mask-image: none; opacity: 0.4; }
}

/* ---- Static fallback (reduced motion / no WebGL / ?static) -------------- */
body.is-static .story { height: auto; }
body.is-static .stage { position: relative; height: auto; overflow: visible; padding: calc(var(--header-h) + 2rem) 0 3rem; }
body.is-static .stage__canvas, body.is-static .stage__dots, body.is-static .stage__skip, body.is-static .stage__hint { display: none; }
body.is-static .stage__poster { position: relative; inset: auto; width: min(var(--container), 100% - var(--gutter) * 2); height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 auto 2rem; border-radius: var(--radius); opacity: 1; }
body.is-static .stage__copy { position: relative; inset: auto; pointer-events: auto; display: grid; gap: 3rem; width: min(var(--container), 100% - var(--gutter) * 2); margin-inline: auto; }
body.is-static .chapter { position: relative; top: auto; bottom: auto; left: auto; right: auto; translate: 0 0; transform: none !important; opacity: 1 !important; width: auto; max-width: 720px; pointer-events: auto; }
.poster-download { position: fixed; left: 12px; bottom: 12px; z-index: 60; background: var(--cyan); color: #000; padding: 0.5em 0.9em; border-radius: 8px; font-family: var(--font-display); font-size: 0.85rem; text-decoration: none; }

/* ---- Sections --------------------------------------------------------------- */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }
.section__head { max-width: 760px; margin-bottom: 2.6rem; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.section__head--row p { max-width: 36ch; margin: 0; }
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: 1fr; } }

.section--pains { background: linear-gradient(to bottom, var(--ink), var(--ink-2)); }
.card-pain {
  position: relative; padding: 2rem 1.8rem 1.8rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.card-pain::before { content: ''; position: absolute; inset: 0 auto auto 0; width: 100%; height: 3px; background: var(--grad-brand); }
.card-pain__n { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--violet-soft); display: block; margin-bottom: 1rem; }
.card-pain p { color: #cfc9e0; margin: 0; }

.section--method { background: var(--ink-2); }
.method { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.method__media img { width: min(100%, 520px); margin-inline: auto; filter: drop-shadow(0 30px 60px rgba(129, 81, 252, 0.35)); }
@media (max-width: 900px) { .method { grid-template-columns: 1fr; } }

.section--gallery { background: var(--ink-2); padding-top: clamp(5rem, 10vw, 9rem); }
/* Pegada a "El método" cuando esa sección está visible; con aire cuando no. */
.section--method + .section--gallery { padding-top: 0; }
.strip {
  display: flex; gap: 1.2rem; overflow-x: auto; padding: 0.5rem var(--gutter) 1.5rem;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.strip:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.strip__item { flex: 0 0 min(78vw, 820px); scroll-snap-align: start; margin: 0; }
@media (max-width: 720px) { .strip__item { flex-basis: 92vw; } }
.strip__item img { background: #fff; border-radius: var(--radius); width: 100%; aspect-ratio: 1650 / 863; object-fit: cover; border: 1px solid rgba(255,255,255,0.08); }
.strip__item figcaption { margin-top: 0.7rem; color: var(--muted); font-size: 0.95rem; }

.section--modules { background: linear-gradient(to bottom, var(--ink-2), var(--ink)); }
.modules { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.modules__list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.2rem; }
.modules__list li { padding: 1.4rem 1.5rem; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.modules__list h3 { margin-bottom: 0.4rem; font-size: 1.15rem; }
.modules__list p { margin: 0; color: #cfc9e0; font-size: 0.98rem; }
.emoji { margin-right: 0.35rem; }
.modules__media { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.modules__media img { width: min(100%, 360px); margin-inline: auto; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 900px) { .modules { grid-template-columns: 1fr; } .modules__media { position: static; } }

.section--register { background: radial-gradient(70% 60% at 50% 0%, rgba(129, 81, 252, 0.28), transparent 70%), var(--ink); }
.register { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.register__form { display: grid; gap: 0.9rem; padding: 2rem; border-radius: var(--radius); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.register__form label { display: grid; gap: 0.3rem; }
.register__form input:not([type="checkbox"]) {
  width: 100%; padding: 0.95em 1.1em; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(14, 11, 26, 0.7); color: #fff; font: inherit;
}
.register__form input:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 1px; }
.register__form small { color: var(--muted); font-size: 0.8rem; }
.register__form .check { grid-template-columns: auto 1fr; align-items: start; gap: 0.7rem; font-size: 0.88rem; color: #cfc9e0; }
.register__form .check input { margin-top: 0.3em; accent-color: var(--violet); }
.register__form--embed { padding: 1rem; }
.register__form--embed iframe { display: block; width: 100%; min-height: 420px; background: transparent; }
.register__fallback { margin: 0.6rem 0 0; text-align: center; font-size: 0.82rem; }
.register__fallback a { color: var(--muted); }
.register__form[hidden] { display: none; }
.form-demo { margin: 0; padding: 0.7em 0.9em; border-radius: var(--radius-sm); background: rgba(255, 196, 0, 0.12); border: 1px solid rgba(255, 196, 0, 0.35); color: #ffd866; font-size: 0.85rem; }
.form-status { margin: 0; min-height: 1.4em; font-size: 0.92rem; }
.form-status.is-ok { color: #8ff0b4; }
.form-status.is-error { color: #ff8da1; }
.form-status.is-demo { color: #ffd866; }
@media (max-width: 900px) { .register { grid-template-columns: 1fr; } }

.site-footer { border-top: 1px solid var(--line); padding: 2rem 0; background: var(--ink); }
.site-footer__inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; color: var(--muted); font-size: 0.9rem; }
.site-footer__inner img { height: 30px; width: auto; }
.site-footer__inner p { margin: 0; margin-inline: auto; }

.noscript { padding: 6rem var(--gutter); max-width: 720px; margin-inline: auto; }

/* ---- GoHighLevel wrapper (index-ghl.html) ------------------------------- */
.cv-root { background: var(--ink); color: var(--paper); font-family: var(--font-text); font-size: 17px; line-height: 1.6; }
/* index-ghl.html hides the root inline until this file is applied (no FOUC) */
.cv-root.cv-hide-until-css { visibility: visible; }
