/* Two showcase sections layered onto the portfolio: a WebGL featured reel and the ECHO ring/drum archive. */
.reel-section {
  position: relative;
}

.reel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 3.4vw, 40px);
}

.reel-head .section-label {
  margin: 0 0 14px;
  color: var(--accent, #ff3b2f);
}

.reel-sub {
  margin: 0;
  max-width: 40ch;
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 10.5px;
  line-height: 1.85;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim, #71717a);
}

.reel-note {
  margin: 16px 0 0;
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #56565e;
}

.reel-wheel-count {
  display: block;
  margin-top: 14px;
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #8b8b95;
  font-variant-numeric: tabular-nums;
}

/* ---------- featured reel: pinned, scroll-driven ---------- */
.reel-pin-section {
  position: relative;
  height: 240vh;
  padding: 0;
}

.reel-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  padding-block: 48px;
}

.reel-stage {
  position: relative;
  height: clamp(300px, 50vh, 500px);
  border: 1px solid var(--line, #27272a);
  border-radius: 20px;
  background: radial-gradient(120% 90% at 50% 0%, #17171a 0%, #0b0b0d 58%, #08080a 100%);
  overflow: hidden;
  touch-action: pan-y;
}

.reel-stage > [data-carousel] {
  width: 100%;
  height: 100%;
}

.reel-stage .flex-carousel__caption {
  color: #f4f4f5;
}

.reel-stage .flex-carousel__title {
  font-family: var(--font-anton), Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(19px, 2.1vw, 27px);
  line-height: 1.05;
}

.reel-stage .flex-carousel__subtitle {
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8b8b95;
  opacity: 1;
  margin-top: 7px;
}

.reel-stage .flex-carousel__count {
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #9a9aa4;
  opacity: 1;
}

.reel-stage .flex-carousel__slash {
  color: #56565e;
}

.reel-rail {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(300px, 42%);
  height: 2px;
  border-radius: 999px;
  background: #ffffff1f;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
}

.reel-rail i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #ff3b2f, #ff8a3d);
  transition: transform 0.12s linear;
}

/* ---------- archive: ECHO WorksWheel (ring that becomes a drum) ---------- */
/* two classes so the component's own `h-full` cannot collapse the fixed height */
.reel-wheel-echo.reel-wheel-echo {
  position: relative;
  height: clamp(430px, 66vh, 660px);
  border: 1px solid var(--line, #27272a);
  border-radius: 20px;
  background:
    radial-gradient(80% 60% at 50% 50%, #141417 0%, #0a0a0c 72%);
  overflow: hidden;
}

/* ---------- gap under the featured reel ---------- */
/* progress rail moves to the top of the stage, off the caption (title, subtitle, 01 / 06) */
/* the pinned reel leaves an empty tail under its stage; the archive sits up into it.
   Scroll progress reads the featured section's own height, so the reel's timing is unchanged. */
.reel-rail {
  top: 14px;
  bottom: auto;
}

.reel-section#archive {
  padding-top: 40px;
  margin-top: 0;
}

/* shown only when WebGL is unavailable */
.reel-fallback {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  padding: 16px;
  height: 100%;
  overflow: auto;
  align-content: start;
}

.reel-fallback a {
  display: block;
  position: relative;
  border: 1px solid #ffffff1a;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
}

.reel-fallback img {
  display: block;
  width: 100%;
  height: auto;
}

.reel-fallback span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  font-family: var(--font-geist-mono), ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f4f4f5;
  background: linear-gradient(transparent, #000000c4);
}

@media (max-width: 900px) {
  .reel-pin-section {
    height: 200vh;
  }
  .reel-pin {
    padding-block: 32px;
  }
  .reel-wheel-echo.reel-wheel-echo {
    height: clamp(380px, 62vh, 520px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reel-rail i {
    transition: none;
  }
}

@media (max-width: 900px) {
  .reel-section#archive {
    margin-top: 0;
  }
}

@media print {
  .reel-section {
    display: none !important;
  }
}
