/*
  The Creative Garage — cinematic scroll "Reveal" experience.
  Replaces the static hero mock with a scroll-scrubbed canvas sequence:
  Blank Timeline -> First Cut -> Campaign Ignition -> Opening Night -> The Reveal.

  Progressive enhancement: the DEFAULT state below is the safe, static
  fallback (no scroll-jacking, chapters stacked in normal flow). JS adds
  `.is-active` to `[data-reveal-root]` only once frames are confirmed to
  load and the user has not requested reduced motion — that state gets the
  sticky canvas + scroll-scrubbed treatment.
*/

.reveal-experience {
  position: relative;
  width: 100%;
  background: var(--paper);
}

.reveal-sticky {
  position: static;
  display: block;
}

.reveal-canvas,
.reveal-vignette,
.reveal-drawer-toggle,
.reveal-progress {
  display: none;
}

.reveal-chapters {
  position: static;
  display: block;
}

.reveal-chapter {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 62vh;
  padding: clamp(56px, 10vw, 96px) clamp(22px, 6vw, 90px);
  opacity: 1;
}

.reveal-chapter[data-reveal-chapter="0"] {
  background: var(--black);
  color: var(--white);
}

.reveal-chapter[data-reveal-chapter="0"] .eyebrow {
  color: var(--amber-pale);
}

.reveal-chapter[data-reveal-chapter="0"] .eyebrow::before {
  background: var(--amber);
}

.reveal-chapter[data-reveal-chapter="3"] {
  background: var(--black);
  color: var(--white);
}

.reveal-chapter[data-reveal-chapter="3"] .eyebrow {
  color: var(--amber-pale);
}

.reveal-chapter-inner {
  max-width: 640px;
}

.reveal-chapter h1,
.reveal-chapter h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.reveal-chapter p {
  max-width: 56ch;
  margin: 0 0 22px;
  line-height: 1.7;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.reveal-chapter[data-reveal-chapter="0"] p,
.reveal-chapter[data-reveal-chapter="3"] p {
  color: rgba(255, 255, 255, 0.78);
}

.reveal-chapter-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: inherit;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: gap 300ms var(--ease-out);
}

.reveal-chapter-cta:hover {
  gap: 12px;
}

.reveal-chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.reveal-scroll-cue {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reveal-drawer {
  display: none;
}

/* -------------------------------------------------------------------- */
/* Active (enhanced) state — sticky canvas, scroll-scrubbed chapters    */
/* -------------------------------------------------------------------- */

.reveal-experience.is-active {
  height: 500vh;
}

.reveal-experience.is-active .reveal-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--black);
}

.reveal-experience.is-active .reveal-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.reveal-experience.is-active .reveal-vignette {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, transparent 42%, rgba(18, 16, 13, 0.32) 100%);
}

.reveal-experience.is-active .reveal-chapters {
  position: absolute;
  inset: 0;
}

.reveal-experience.is-active .reveal-chapter {
  position: absolute;
  inset: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 460ms var(--ease-out);
  background: transparent !important;
  color: var(--ink);
}

.reveal-experience.is-active .reveal-chapter.is-current {
  opacity: 1;
  pointer-events: auto;
}

.reveal-experience.is-active .reveal-chapter-inner {
  padding: 28px 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(20, 18, 14, 0.22);
}

.reveal-experience.is-active .reveal-chapter[data-reveal-chapter="0"] .reveal-chapter-inner,
.reveal-experience.is-active .reveal-chapter[data-reveal-chapter="3"] .reveal-chapter-inner {
  background: rgba(20, 18, 14, 0.72);
  color: var(--white);
}

.reveal-experience.is-active .reveal-chapter[data-reveal-chapter="0"] p,
.reveal-experience.is-active .reveal-chapter[data-reveal-chapter="3"] p {
  color: rgba(255, 255, 255, 0.8);
}

.reveal-experience.is-active .reveal-chapter p {
  color: var(--muted);
}

.reveal-experience.is-active .reveal-chapter[data-reveal-chapter="4"] .reveal-chapter-inner {
  margin: 0 auto;
  text-align: center;
}

.reveal-experience.is-active .reveal-chapter[data-reveal-chapter="4"] .reveal-chapter-actions {
  justify-content: center;
}

.reveal-experience.is-active .reveal-scroll-cue {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.6);
}

.reveal-experience.is-active .reveal-progress {
  display: block;
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
}

.reveal-progress span {
  width: 26px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 300ms var(--ease-out);
}

.reveal-progress span.is-current {
  background: var(--amber);
}

.reveal-drawer-toggle {
  position: absolute;
  right: 22px;
  top: 96px;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(20, 18, 14, 0.4);
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.reveal-experience.is-active .reveal-drawer-toggle {
  display: grid;
  place-items: center;
}

.reveal-drawer-toggle span {
  grid-row: 1;
  grid-column: 1;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  transition: transform 300ms var(--ease-snap), opacity 300ms var(--ease-out);
}

.reveal-drawer-toggle span:nth-child(1) {
  transform: translateY(-5px);
}

.reveal-drawer-toggle span:nth-child(3) {
  transform: translateY(5px);
}

.reveal-drawer-toggle.is-open span:nth-child(1) {
  transform: rotate(45deg);
}

.reveal-drawer-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.reveal-drawer-toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg);
}

.reveal-experience.is-active .reveal-drawer {
  display: grid;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 4;
  width: min(320px, 82vw);
  height: 100%;
  align-content: start;
  gap: 4px;
  padding: 92px 26px 40px;
  background: rgba(20, 18, 14, 0.92);
  backdrop-filter: blur(18px);
  transform: translateX(100%);
  transition: transform 420ms var(--ease-out);
}

.reveal-experience.is-active .reveal-drawer.is-open {
  transform: translateX(0);
}

.reveal-drawer-kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reveal-drawer a {
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  touch-action: manipulation;
}

.reveal-drawer a:hover,
.reveal-drawer a[aria-current="true"] {
  color: var(--white);
}

.reveal-drawer a[aria-current="true"] {
  color: var(--amber-pale);
}

@media (max-width: 760px) {
  .reveal-chapter h1,
  .reveal-chapter h2 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .reveal-experience.is-active .reveal-chapter-inner {
    padding: 20px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-experience.is-active {
    height: auto;
  }

  .reveal-experience.is-active .reveal-sticky {
    position: static;
    height: auto;
    overflow: visible;
  }

  .reveal-experience.is-active .reveal-canvas,
  .reveal-experience.is-active .reveal-vignette,
  .reveal-experience.is-active .reveal-drawer-toggle,
  .reveal-experience.is-active .reveal-drawer,
  .reveal-experience.is-active .reveal-progress {
    display: none;
  }

  .reveal-experience.is-active .reveal-chapters {
    position: static;
  }

  .reveal-experience.is-active .reveal-chapter {
    position: static;
    min-height: 62vh;
    opacity: 1;
    pointer-events: auto;
    background: var(--paper);
    color: var(--ink);
  }

  .reveal-experience.is-active .reveal-chapter[data-reveal-chapter="0"],
  .reveal-experience.is-active .reveal-chapter[data-reveal-chapter="3"] {
    background: var(--black);
    color: var(--white);
  }

  .reveal-experience.is-active .reveal-chapter-inner {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 0;
    color: inherit;
  }
}
