/* ============================================================
   XENRAL® — about / "How a record is born"
   scroll-driven 3D session: chapters float over a fixed canvas
   ============================================================ */

.about-page {
  background: var(--ink);
  transition: none; /* gsap scrubs body background-color */
}

/* fixed 3D canvas behind everything */
.daw {
  position: fixed; inset: 0; z-index: 0;
}
.daw canvas { width: 100%; height: 100%; }

/* nav extras for this page */
.nav__back {
  display: none;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
}
@media (max-width: 900px) {
  .about-page .nav__back { display: block; }
}

/* preloader status line */
.preloader__status {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  color: var(--tx-d-soft); text-transform: uppercase; min-height: 1.2em;
}

/* ============================ HUD ============================ */
.hud {
  position: fixed; top: 5.2rem; right: var(--gutter); z-index: 6;
  display: flex; flex-direction: column; gap: 0.34rem; align-items: flex-end;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  color: var(--tx-d-soft); text-transform: uppercase;
  pointer-events: none;
  transition: color 0.5s;
}
.hud__ch { color: var(--accent); transition: color 0.5s; }

/* ============================ RAIL ============================ */
.rail {
  position: fixed; left: 1.3rem; top: 50%; transform: translateY(-50%);
  z-index: 6; display: flex; flex-direction: column; gap: 13px;
  pointer-events: none;
}
@media (max-width: 1280px) {
  .chapter__body { width: min(560px, 88vw); }
}
.rail__tick {
  width: 16px; height: 2px; background: var(--line-d);
  transition: background-color 0.35s, width 0.35s;
}
.rail__tick.is-active { width: 30px; background: var(--accent); }
.rail__num {
  margin-top: 0.6rem;
  font-family: var(--font-mono); font-style: normal; font-size: 9.5px;
  letter-spacing: 0.16em; color: var(--tx-d-soft);
  transition: color 0.5s;
}

/* ============================ PLAY PILL ============================ */
.pill {
  position: fixed; right: clamp(1.2rem, 3vw, 2.6rem); bottom: clamp(1.2rem, 4vh, 2.4rem);
  z-index: 30;
  width: 104px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(18, 18, 22, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s;
}
.pill:hover { transform: scale(1.06); }
.pill:active { transform: scale(0.95); }
.pill__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px dashed var(--accent);
  animation: spin 22s linear infinite;
}
.pill.is-on .pill__ring { animation-duration: 6s; }
.pill.is-on { background: rgba(216, 255, 58, 0.12); }
.pill__label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em;
  color: var(--tx-d); text-align: center; line-height: 1.65;
}

/* ============================ CHAPTERS ============================ */
#story { position: relative; z-index: 2; }

.chapter {
  position: relative;
  min-height: 165vh;
  display: flex; align-items: center;
  padding: 0 var(--gutter);
}
.chapter__body { width: min(600px, 92vw); }
.chapter--right .chapter__body { margin-left: auto; }

.chapter__kicker {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--tx-d-soft);
  transition: color 0.5s;
}
.chapter__kicker em {
  font-style: normal; color: var(--accent);
  padding: 0.4em 0.8em; border: 1px solid currentColor; border-radius: 999px;
}

.chapter h2 {
  margin-top: 1.6rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  line-height: 0.95; letter-spacing: -0.02em;
  color: var(--tx-d);
  text-shadow: 0 2px 28px rgba(10, 10, 12, 0.55);
  transition: color 0.5s;
}
.chapter__text { text-shadow: 0 1px 18px rgba(10, 10, 12, 0.6); }
body.is-light .chapter--final h2,
body.is-light .chapter--final .chapter__text { text-shadow: none; }

.chapter__text {
  margin-top: 1.5rem; max-width: 46ch;
  font-size: clamp(1rem, 1.35vw, 1.16rem); line-height: 1.7;
  color: var(--tx-d-soft);
  transition: color 0.5s;
}
.chapter__text strong { color: var(--tx-d); font-weight: 600; transition: color 0.5s; }

.chapter__mono {
  margin-top: 1.6rem;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em;
  color: var(--accent-dim);
  transition: color 0.5s;
}

/* hero chapter */
.chapter--hero { min-height: 140vh; }
.chapter--hero .chapter__body { width: min(900px, 94vw); }
.chapter__hero-title {
  margin-top: 1.8rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(3.4rem, 10.5vw, 9.5rem);
  line-height: 0.92; letter-spacing: -0.02em;
  color: var(--tx-d);
}
.chapter__hero-title .line { display: block; overflow: hidden; padding-bottom: 0.05em; margin-bottom: -0.05em; }
.chapter__hero-title .line > span { display: inline-block; }
.chapter__hero-title i { font-style: normal; }
.chapter__text--lead { max-width: 52ch; }
.chapter__cue {
  margin-top: 3.2rem;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  color: var(--tx-d-soft);
  animation: cue-bob 2.2s ease-in-out infinite;
}
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* final chapter */
.chapter--final { min-height: 185vh; align-items: center; }
.chapter--final .chapter__body { width: min(820px, 94vw); }
.chapter--final h2 { font-size: clamp(3rem, 9vw, 8.4rem); }

.chapter__ctas {
  display: flex; flex-wrap: wrap; gap: 1.1rem; align-items: center;
  margin-top: 2.6rem;
}
.cta {
  display: inline-flex; align-items: center; gap: 1.1rem;
  padding: 1.05rem 2rem;
  border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--ink);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem); letter-spacing: 0;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.cta i { font-style: normal; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.cta:hover i { transform: translateX(0.4rem); }
.cta--ghost {
  background: transparent; color: var(--tx-d); border-color: currentColor;
}
.chapter__bar {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.6rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em;
  color: var(--tx-d-soft);
  transition: color 0.5s;
}
.chapter__bar a:hover { color: var(--accent); }

/* ============================ LIGHT FLIP ============================ */
/* gsap scrubs body bg ink→bone near the master chapter and toggles .is-light */
body.is-light .chapter--final h2,
body.is-light .chapter--final .chapter__text strong { color: var(--tx-l); }
body.is-light .chapter--final .chapter__text { color: var(--tx-l-soft); }
body.is-light .chapter--final .chapter__kicker { color: var(--tx-l-soft); }
body.is-light .chapter--final .chapter__kicker em { color: #5f6e10; }
body.is-light .chapter--final .chapter__mono { color: #5f6e10; }
body.is-light .chapter--final .cta--ghost { color: var(--tx-l); }
body.is-light .chapter--final .chapter__bar { color: var(--tx-l-soft); }
body.is-light .chapter--final .chapter__bar a:hover { color: var(--tx-l); }
body.is-light .hud, body.is-light .rail__num { color: var(--tx-l-soft); }
body.is-light .hud__ch { color: #5f6e10; }
body.is-light .rail__tick { background: var(--line-l); }
body.is-light .rail__tick.is-active { background: #5f6e10; }
body.is-light .pill { background: rgba(240, 237, 228, 0.6); }
body.is-light .pill__label { color: var(--tx-l); }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 900px) {
  .hud, .rail { display: none; }
  .chapter { min-height: 150vh; }
  .chapter--right .chapter__body { margin-left: 0; }
  .pill { width: 88px; }

  /* keep copy readable over the 3D session */
  .chapter:not(.chapter--hero) .chapter__body {
    background: rgba(10, 10, 12, 0.5);
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
    border: 1px solid rgba(240, 237, 228, 0.07);
    border-radius: 18px;
    padding: 1.5rem 1.4rem;
  }
  body.is-light .chapter--final .chapter__body {
    background: rgba(240, 237, 228, 0.55);
    border-color: rgba(10, 10, 12, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pill__ring, .chapter__cue { animation: none !important; }
}
