/* ==========================================================================
   Proyección del Mito Personal — Julián de la Reta
   Paleta: azul violeta nocturno + verde viriditas
   ========================================================================== */

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, picture, canvas, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

/* === Variables === */
:root {
  --night:      #0E0B2E;
  --night-deep: #07051A;
  --layer:      #1A1545;
  --layer-2:    #221C5A;
  --violet:     #6B5DF0;
  --lilac:      #BFB0FF;
  --viriditas:  #5BBF9C;
  --viriditas-soft: #7FD2B5;
  --bone:       #F4EFE4;
  --twilight:   #5C5680;

  --serif: 'Newsreader', 'Times New Roman', serif;
  --sans:  'Inter Tight', -apple-system, system-ui, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, monospace;

  --container: 1100px;
  --gap: clamp(1.5rem, 3vw, 3rem);
  --section-y: clamp(5rem, 12vh, 9rem);
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* === Body === */
body {
  background: var(--night);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle ambient gradients fixed to the viewport */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(107, 93, 240, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(107, 93, 240, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 90%, rgba(91, 191, 156, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* === Typography helpers === */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--lilac);
  opacity: 0.85;
  margin-bottom: 1.6rem;
}

.section__title,
.hero__title,
.bio__name,
.cta__title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.05;
  color: var(--bone);
}

.section__title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  margin-bottom: 2rem;
}

.section__lede {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-style: italic;
  font-weight: 300;
  color: var(--lilac);
  max-width: 52ch;
  margin-bottom: 3rem;
  line-height: 1.5;
}

em { font-style: italic; color: var(--lilac); font-weight: 400; }
strong { color: var(--bone); font-weight: 500; }

a {
  color: var(--viriditas);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}
a:hover { color: var(--viriditas-soft); }

::selection {
  background: var(--violet);
  color: var(--bone);
}

/* === Section layout === */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-y) var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

.section--prose,
.section--conjunction { max-width: 880px; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem var(--gutter) 4rem;
  overflow: hidden;
}

.spiral--hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 300;
  margin-bottom: 1.8rem;
}
.hero__title em {
  font-style: italic;
  color: var(--lilac);
  font-weight: 300;
}

.hero__lede {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--bone);
  opacity: 0.85;
  max-width: 38ch;
  margin: 0 auto;
  font-style: italic;
  font-weight: 300;
  line-height: 1.55;
}

.scroll-cue {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--twilight);
  margin-top: 4rem;
  padding: 0.5rem 0;
}
.scroll-cue:hover { color: var(--lilac); }

/* ==========================================================================
   PROSE
   ========================================================================== */
.prose {
  max-width: 64ch;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--bone);
  opacity: 0.9;
  font-weight: 300;
}
.prose p + p { margin-top: 1.4em; }

.prose--coda {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(191, 176, 255, 0.12);
  opacity: 0.95;
}

/* ==========================================================================
   TRES MOVIMIENTOS
   ========================================================================== */
.movements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 1rem;
}

@media (max-width: 760px) {
  .movements { grid-template-columns: 1fr; }
}

.movement {
  position: relative;
  padding: 2.5rem 1.8rem;
  background: linear-gradient(180deg, rgba(34, 28, 90, 0.55), rgba(26, 21, 69, 0.18));
  border: 1px solid rgba(191, 176, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
  min-height: 360px;
  transition: border-color 0.4s, transform 0.4s;
}
.movement:hover {
  border-color: rgba(191, 176, 255, 0.24);
}

.spiral--movement {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 110px;
  height: 110px;
  opacity: 0.55;
  pointer-events: none;
}

.movement__num {
  position: relative;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--viriditas);
  margin-bottom: 0.6rem;
  z-index: 2;
}

.movement__title {
  position: relative;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  color: var(--bone);
  z-index: 2;
}

.movement__body {
  position: relative;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--bone);
  opacity: 0.85;
  z-index: 2;
  font-weight: 300;
}

/* ==========================================================================
   LINAJE
   ========================================================================== */
.voices {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--gap);
  margin-top: 2rem;
}
@media (max-width: 760px) {
  .voices { grid-template-columns: 1fr; }
}

.voice {
  padding: 2.2rem 0;
  border-top: 1px solid rgba(191, 176, 255, 0.12);
}
.voice:first-child,
.voice:nth-child(2) { border-top: 1px solid rgba(191, 176, 255, 0.2); }

.voice__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.005em;
}
.voice__concepts {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--twilight);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.voice__quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--lilac);
  line-height: 1.55;
  border-left: 2px solid var(--viriditas);
  padding: 0.2rem 0 0.2rem 1rem;
}

/* ==========================================================================
   CONJUNCIÓN
   ========================================================================== */
.effects {
  list-style: none;
  margin: 2rem 0 0;
  display: grid;
  gap: 1rem;
  max-width: 64ch;
}
.effects li {
  position: relative;
  padding-left: 1.8rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--bone);
  opacity: 0.9;
  font-weight: 300;
}
.effects li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 14px;
  height: 1px;
  background: var(--viriditas);
}

/* ==========================================================================
   BIO
   ========================================================================== */
.bio {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--gap);
  margin-top: 2rem;
  align-items: start;
}
@media (max-width: 760px) {
  .bio { grid-template-columns: 1fr; }
  .bio__portrait { max-width: 280px; margin: 0 auto; }
}

.bio__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  isolation: isolate;
}

.halo {
  position: absolute;
  inset: -28%;
  background:
    radial-gradient(circle at center, rgba(107, 93, 240, 0.55) 0%, rgba(107, 93, 240, 0.18) 40%, transparent 65%);
  filter: blur(18px);
  pointer-events: none;
  z-index: -1;
  animation: halo-pulse 7s ease-in-out infinite;
}
@keyframes halo-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}

.bio__portrait img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  filter: contrast(1.03) saturate(1.05);
}

.bio__name {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.7rem;
}
.bio__role {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--lilac);
  margin-bottom: 2rem;
}
.bio__text p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}
.bio__instagram {
  font-family: var(--mono) !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-top: 2rem !important;
}

/* ==========================================================================
   VIDEOS
   ========================================================================== */
.videos {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
  margin-top: 1rem;
}
@media (max-width: 760px) {
  .videos { grid-template-columns: 1fr; }
}

.video {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(191, 176, 255, 0.15);
  background: var(--layer);
}
.video--short {
  aspect-ratio: 9 / 16;
  max-height: 520px;
}
.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s, filter 0.5s;
}
.video:hover img {
  transform: scale(1.04);
  filter: brightness(1.08);
}
.video__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(14, 11, 46, 0.7);
  backdrop-filter: blur(8px);
  color: var(--bone);
  font-size: 18px;
  border: 1px solid rgba(191, 176, 255, 0.3);
  transition: background 0.3s, border-color 0.3s;
}
.video:hover .video__play {
  background: var(--violet);
  border-color: var(--violet);
}
.video__label {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--bone);
  background: rgba(14, 11, 46, 0.75);
  padding: 0.45rem 0.8rem;
  border-radius: 2px;
  backdrop-filter: blur(8px);
}

/* ==========================================================================
   LECTURAS / DESCARGAS
   ========================================================================== */
.readings {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-top: 1rem;
}
@media (max-width: 760px) {
  .readings { grid-template-columns: 1fr; }
}

.reading {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 1.4rem;
  align-items: start;
  padding: 1.8rem 1.6rem;
  background: linear-gradient(180deg, rgba(34, 28, 90, 0.55), rgba(26, 21, 69, 0.18));
  border: 1px solid rgba(191, 176, 255, 0.14);
  border-radius: 6px;
  color: var(--bone);
  transition: border-color 0.3s, transform 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}
.reading:hover {
  color: var(--bone);
  border-color: rgba(191, 176, 255, 0.32);
  background: linear-gradient(180deg, rgba(34, 28, 90, 0.72), rgba(26, 21, 69, 0.28));
  transform: translateY(-2px);
}

.reading__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(191, 176, 255, 0.2);
  border-radius: 4px;
  color: var(--lilac);
  background: rgba(14, 11, 46, 0.5);
}
.reading__icon svg {
  width: 30px;
  height: 30px;
}
.reading:hover .reading__icon {
  color: var(--viriditas);
  border-color: rgba(91, 191, 156, 0.4);
}

.reading__body {
  min-width: 0;
}
.reading__kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--viriditas);
  margin-bottom: 0.6rem;
}
.reading__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.005em;
  line-height: 1.2;
  color: var(--bone);
  margin-bottom: 0.7rem;
}
.reading__desc {
  font-family: var(--serif);
  font-size: 0.97rem;
  line-height: 1.55;
  font-weight: 300;
  color: var(--bone);
  opacity: 0.85;
  margin-bottom: 1rem;
}
.reading__meta {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--twilight);
}

.reading__cta {
  align-self: end;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--lilac);
  white-space: nowrap;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.reading:hover .reading__cta {
  color: var(--viriditas);
  border-bottom-color: var(--viriditas);
}

@media (max-width: 520px) {
  .reading {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
  }
  .reading__icon { width: 48px; height: 48px; }
  .reading__icon svg { width: 24px; height: 24px; }
  .reading__cta {
    grid-column: 1 / -1;
    align-self: start;
    margin-top: 0.5rem;
  }
}

/* ==========================================================================
   CTA
   ========================================================================== */
.section--cta {
  text-align: center;
  padding: clamp(6rem, 14vh, 11rem) var(--gutter);
}
.cta__title {
  font-size: clamp(2.5rem, 6.5vw, 4.8rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.015em;
}
.cta__title em {
  font-style: italic;
  color: var(--lilac);
}
.cta__lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--lilac);
  max-width: 44ch;
  margin: 0 auto 3rem;
  font-weight: 300;
}
.cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding: 1.05rem 2.2rem;
  border-radius: 2px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--violet);
  color: var(--bone);
  box-shadow: 0 0 0 0 rgba(107, 93, 240, 0.45);
}
.btn--primary:hover {
  background: var(--lilac);
  color: var(--night);
  box-shadow: 0 0 32px 0 rgba(191, 176, 255, 0.35);
}
.btn--secondary {
  border: 1px solid var(--viriditas);
  color: var(--viriditas);
  padding: calc(1.05rem - 1px) calc(2.2rem - 1px);
}
.btn--secondary:hover {
  background: rgba(91, 191, 156, 0.1);
  color: var(--viriditas-soft);
  border-color: var(--viriditas-soft);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(191, 176, 255, 0.1);
  padding: 3rem var(--gutter);
  text-align: center;
  background: rgba(7, 5, 26, 0.4);
}
.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.footer__links a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--lilac);
}
.footer__links a:hover { color: var(--viriditas); }

.footer__copy {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--twilight);
  line-height: 1.8;
}

/* ==========================================================================
   WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-floating {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--viriditas);
  color: var(--night);
  display: grid;
  place-items: center;
  z-index: 100;
  box-shadow:
    0 6px 24px rgba(91, 191, 156, 0.32),
    0 0 0 0 rgba(91, 191, 156, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  animation: wa-pulse 2.6s ease-in-out infinite;
}
.whatsapp-floating:hover {
  transform: scale(1.08);
  background: var(--viriditas-soft);
  color: var(--night);
  box-shadow: 0 8px 32px rgba(91, 191, 156, 0.5);
}
.whatsapp-floating svg {
  width: 30px;
  height: 30px;
}

.whatsapp-floating__tooltip {
  position: absolute;
  right: calc(100% + 0.7rem);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--night);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0.55rem 0.9rem;
  border-radius: 3px;
  border: 1px solid rgba(191, 176, 255, 0.2);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.whatsapp-floating:hover .whatsapp-floating__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@keyframes wa-pulse {
  0%, 100% {
    box-shadow: 0 6px 24px rgba(91, 191, 156, 0.32), 0 0 0 0 rgba(91, 191, 156, 0.45);
  }
  50% {
    box-shadow: 0 6px 24px rgba(91, 191, 156, 0.32), 0 0 0 16px rgba(91, 191, 156, 0);
  }
}

@media (max-width: 520px) {
  .whatsapp-floating {
    width: 52px;
    height: 52px;
    bottom: 1rem;
    right: 1rem;
  }
  .whatsapp-floating svg {
    width: 26px;
    height: 26px;
  }
  .whatsapp-floating__tooltip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-floating { animation: none; }
}

/* ==========================================================================
   ANIMATION INITIAL STATES (avoid FOUC before GSAP)
   ========================================================================== */
.js-anim-init {
  opacity: 0;
  transform: translateY(24px);
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .halo { animation: none; }
  .js-anim-init { opacity: 1; transform: none; }
}
