/* =========================================================
   EL GRAN ABUELO ANCESTRAL · LiveRoots
   Paleta: bosque profundo + tierra + cian bioluminiscente
   ========================================================= */

:root {
  --bg:        #0a0f0c;
  --bg-2:      #0e1611;
  --bg-3:      #111d16;
  --forest:    #1c3a2a;
  --moss:      #6f9a5e;
  --moss-soft: #9bbf7e;
  --earth:     #b08968;
  --bark:      #6b5640;
  --cyan:      #38e1d6;   /* bioluminiscente: la tecnología */
  --cyan-deep: #11998e;
  --cream:     #f2efe4;
  --cream-dim: #c9c8ba;
  --muted:     #8a907f;
  --line:      rgba(155, 191, 126, .16);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", system-ui, sans-serif;
  --mono:  "JetBrains Mono", monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

/* ---------- typography helpers ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: .01em; }

.section { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }

.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.4rem;
}

h2 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); margin-bottom: 1.6rem; }
.section p { color: var(--cream-dim); font-size: clamp(1rem, 1.4vw, 1.14rem); max-width: 62ch; margin-bottom: 1.1rem; }
.section p strong { color: var(--cream); font-weight: 500; }
.section em { color: var(--moss-soft); font-style: italic; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  transition: background .5s var(--ease), padding .5s var(--ease), border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 15, 12, .82);
  backdrop-filter: blur(14px);
  padding-top: .7rem; padding-bottom: .7rem;
  border-bottom: 1px solid var(--line);
}
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-size: .82rem; letter-spacing: .04em; color: var(--cream-dim);
  position: relative; transition: color .3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px;
  background: var(--cyan); transition: width .35s var(--ease);
}
.nav__links a:hover { color: var(--cream); }
.nav__links a:hover::after { width: 100%; }

.nav__sound {
  display: flex; align-items: center; gap: .55rem;
  background: rgba(56, 225, 214, .08); border: 1px solid rgba(56, 225, 214, .35);
  color: var(--cyan); padding: .5rem .9rem; border-radius: 100px; cursor: pointer;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  transition: background .3s, transform .3s;
}
.nav__sound:hover { background: rgba(56, 225, 214, .16); transform: translateY(-1px); }
.nav__sound-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
.nav__sound-bars i { width: 2.5px; background: var(--cyan); height: 30%; border-radius: 2px; }
.nav__sound.is-playing .nav__sound-bars i { animation: bars .9s ease-in-out infinite; }
.nav__sound-bars i:nth-child(2) { animation-delay: .15s; }
.nav__sound-bars i:nth-child(3) { animation-delay: .3s; }
.nav__sound-bars i:nth-child(4) { animation-delay: .45s; }
@keyframes bars { 0%,100% { height: 25%; } 50% { height: 100%; } }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 6.5rem 0 4.5rem; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}
.hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(10,15,12,.25), transparent 55%),
    linear-gradient(180deg, rgba(10,15,12,.55) 0%, rgba(10,15,12,.25) 35%, rgba(10,15,12,.55) 70%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,15,12,.7) 0%, transparent 60%);
}
.hero__content {
  position: relative; z-index: 3; max-width: 720px;
  padding: 0 clamp(1.25rem, 6vw, 6rem);
}
.hero__eyebrow {
  font-family: var(--mono); font-size: clamp(.62rem, 1.4vw, .76rem);
  letter-spacing: .22em; text-transform: uppercase; color: var(--moss-soft); margin-bottom: 1.6rem;
}
.hero__title { font-size: clamp(3rem, 11vw, 7.5rem); font-weight: 500; line-height: .95; margin-bottom: 1.8rem; }
.hero__title span { display: block; }
.hero__title-accent {
  font-style: italic; font-weight: 400;
  background: linear-gradient(100deg, var(--moss-soft), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero__lead { font-size: clamp(1.02rem, 1.7vw, 1.28rem); color: var(--cream); max-width: 54ch; margin-bottom: 2.4rem; font-weight: 300; }
.hero__lead strong { color: var(--cyan); font-weight: 500; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero__age {
  position: absolute; right: clamp(1.25rem, 6vw, 5rem); bottom: clamp(5rem, 12vh, 8rem); z-index: 3;
  text-align: right; display: flex; flex-direction: column; align-items: flex-end;
}
.hero__age-num { font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1; color: var(--cream); font-weight: 500; }
.hero__age-label { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--moss-soft); margin-top: .4rem; }

.hero__scroll {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 1.8rem; z-index: 3;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--cream-dim);
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.hero__scroll span { width: 1px; height: 38px; background: linear-gradient(var(--cyan), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 100px; font-size: .9rem; letter-spacing: .02em;
  cursor: pointer; transition: transform .3s var(--ease), background .3s, box-shadow .3s, border-color .3s;
  border: 1px solid transparent;
}
.btn--primary { background: var(--cyan); color: #04120f; font-weight: 500; box-shadow: 0 6px 30px -8px rgba(56,225,214,.5); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 38px -8px rgba(56,225,214,.65); }
.btn--ghost { border-color: rgba(242,239,228,.3); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* =========================================================
   MANIFIESTO
   ========================================================= */
.manifiesto { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.manifiesto__quote {
  font-family: var(--serif); font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.32;
  color: var(--cream); font-weight: 400; max-width: 46ch; margin-bottom: 2rem; border: none;
}
.manifiesto__quote em { color: var(--moss-soft); }
.manifiesto__body { max-width: 46ch; margin-bottom: 4rem; }

.manifiesto__pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.pillar {
  padding: 2rem 1.8rem; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(160deg, rgba(28,58,42,.3), rgba(14,22,17,.2));
  transition: transform .45s var(--ease), border-color .45s, background .45s;
}
.pillar:hover { transform: translateY(-6px); border-color: rgba(56,225,214,.4); background: linear-gradient(160deg, rgba(28,58,42,.5), rgba(14,22,17,.3)); }
.pillar__icon { font-size: 1.8rem; color: var(--cyan); display: block; margin-bottom: 1rem; }
.pillar h3 { font-size: 1.5rem; margin-bottom: .7rem; color: var(--cream); }
.pillar p { font-size: .96rem; margin: 0; }

/* =========================================================
   EL ÁRBOL
   ========================================================= */
.arbol { background: var(--bg-2); }
.arbol__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.arbol__media { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
.arbol__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; transition: transform 1.2s var(--ease); }
.arbol__media:hover img { transform: scale(1.05); }
.arbol__media figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.4rem 1.2rem;
  background: linear-gradient(transparent, rgba(10,15,12,.9));
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--cream);
}
.arbol__media figcaption span { display: block; font-family: var(--mono); font-style: normal; font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-top: .4rem; }

.arbol__facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.fact { padding: 1.2rem 1.3rem; border-left: 2px solid var(--cyan-deep); background: rgba(28,58,42,.22); border-radius: 0 10px 10px 0; }
.fact__num { font-family: var(--serif); font-size: 2rem; color: var(--cream); display: block; line-height: 1; }
.fact__num small { font-size: 1rem; color: var(--moss-soft); }
.fact__label { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .5rem; display: block; }

/* =========================================================
   TRAVESÍA / TIMELINE
   ========================================================= */
.travesia { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.travesia__intro { max-width: 60ch; margin-bottom: 3.5rem; }
.timeline { list-style: none; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--cyan-deep), transparent); }
.timeline__item { position: relative; padding: 0 0 2.8rem 2.6rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: 0; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--moss); box-shadow: 0 0 0 4px rgba(111,154,94,.12); }
.timeline__dot--magic { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(56,225,214,.18), 0 0 18px rgba(56,225,214,.5); }
.timeline__dot--tech { border-color: var(--earth); box-shadow: 0 0 0 4px rgba(176,137,104,.15); }
.timeline__item h3 { font-size: 1.5rem; color: var(--cream); margin-bottom: .5rem; }
.timeline__item p { font-size: 1rem; margin: 0; }

/* =========================================================
   SONIDO / DATOS
   ========================================================= */
.sonido { background: var(--bg); position: relative; overflow: hidden; }
.sonido__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: .55; pointer-events: none; }
.sonido .container { position: relative; z-index: 1; }
.sonido__intro { max-width: 60ch; margin-bottom: 2.8rem; }

.player {
  display: flex; align-items: center; gap: 1.3rem;
  padding: 1.1rem 1.4rem; border-radius: 100px; max-width: 560px; margin-bottom: 3.5rem;
  background: linear-gradient(120deg, rgba(28,58,42,.55), rgba(17,29,22,.4));
  border: 1px solid rgba(56,225,214,.28); backdrop-filter: blur(8px);
}
.player__btn {
  flex: none; width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--cyan); color: #04120f; display: grid; place-items: center;
  transition: transform .3s, box-shadow .3s; box-shadow: 0 4px 20px -4px rgba(56,225,214,.6);
}
.player__btn:hover { transform: scale(1.06); }
.player__btn svg { width: 22px; height: 22px; fill: currentColor; }
.player__icon-pause { display: none; }
.player.is-playing .player__icon-play { display: none; }
.player.is-playing .player__icon-pause { display: block; }
.player__body { flex: 1; min-width: 0; }
.player__meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .55rem; gap: 1rem; }
.player__name { font-size: .9rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__time { font-family: var(--mono); font-size: .72rem; color: var(--muted); flex: none; }
.player__bar { height: 5px; background: rgba(242,239,228,.12); border-radius: 100px; cursor: pointer; overflow: hidden; }
.player__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-deep), var(--cyan)); border-radius: 100px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 4rem; }
.stat { text-align: center; padding: 1.6rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(14,22,17,.4); }
.stat__num { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3.2rem); color: var(--cyan); display: block; line-height: 1; font-weight: 500; }
.stat__label { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: .7rem; display: block; }

.viz { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.viz__item { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-3); }
.viz__item--wide { grid-column: 1 / -1; }
.viz__item img { width: 100%; background: #000; }
.viz__item figcaption { padding: 1rem 1.3rem; font-size: .9rem; color: var(--cream-dim); }
.viz__item figcaption strong { color: var(--cyan); font-weight: 500; }

/* =========================================================
   GALERÍA
   ========================================================= */
.galeria { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.galeria__intro { max-width: 60ch; margin-bottom: 3rem; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery__item { aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; cursor: pointer; position: relative; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; filter: saturate(.92); }
.gallery__item:hover img { transform: scale(1.07); filter: saturate(1.1); }
.gallery__item::after { content: "⤢"; position: absolute; top: 12px; right: 14px; color: var(--cream); opacity: 0; transition: opacity .3s; font-size: 1.1rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.gallery__item:hover::after { opacity: 1; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,10,8,.96); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 90vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9); }
.lightbox__close { position: absolute; top: 1.5rem; right: 1.8rem; background: none; border: none; color: var(--cream); font-size: 1.6rem; cursor: pointer; opacity: .7; transition: opacity .3s; }
.lightbox__close:hover { opacity: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--cream); width: 52px; height: 52px; border-radius: 50%; font-size: 1.8rem; cursor: pointer; transition: background .3s; }
.lightbox__nav:hover { background: rgba(56,225,214,.2); }
.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }

/* =========================================================
   EQUIPO
   ========================================================= */
.equipo { background: var(--bg-2); }
.equipo__intro { max-width: 60ch; margin-bottom: 1rem; }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-top: 3rem; }
.team__card {
  padding: 2rem 1.6rem; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(28,58,42,.32), rgba(14,22,17,.2));
  transition: transform .45s var(--ease), border-color .45s;
}
.team__card:hover { transform: translateY(-6px); border-color: rgba(56,225,214,.4); }
.team__card h3 { font-size: 1.55rem; color: var(--cream); margin-bottom: .2rem; }
.team__role { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; }
.team__card p { font-size: .92rem; margin: 0; }

/* =========================================================
   CIERRE
   ========================================================= */
.cierre { background: linear-gradient(180deg, var(--bg-2), var(--bg)); text-align: center; }
.cierre__inner { max-width: 720px; }
.cierre .kicker { display: inline-block; }
.cierre p { margin-left: auto; margin-right: auto; }
.cierre__share { color: var(--cream); font-size: 1.15rem; margin-top: 1.5rem; font-family: var(--serif); font-style: italic; }
.cierre__actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding: 3.5rem 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer__inner { text-align: center; }
.footer__brand { font-family: var(--serif); font-size: 1.5rem; color: var(--cream); margin-bottom: .6rem; }
.footer__cols { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--moss-soft); margin-bottom: 1rem; }
.footer__cols a { border-bottom: 1px solid transparent; transition: color .3s, border-color .3s; }
.footer__cols a:hover { color: var(--cyan); border-color: var(--cyan); }
.footer__legal { font-size: .8rem; color: var(--muted); max-width: 60ch; margin: 0 auto; }
.footer__legal a { color: var(--cyan); }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 920px) {
  .nav__links { display: none; }
  .manifiesto__pillars { grid-template-columns: 1fr; }
  .arbol__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .viz { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .hero__age { display: none; }
}
@media (max-width: 560px) {
  .arbol__facts { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .team { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .nav__sound-label { display: none; }
  .player__name { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
