/* Eric Rhea header reel. Self-contained; no dependencies. */
.reel {
  --reel-ink: #07090d;
  --reel-paper: #f3f0e8;
  --reel-amber: #ffb547;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--reel-ink);
  overflow: hidden;
  isolation: isolate;
  color: var(--reel-paper);
  font: 500 14px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@supports not (aspect-ratio: 16 / 9) {
  .reel { height: 0; padding-top: 56.25%; }
}
.reel__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: var(--reel-ink);
}

/* loader */
.reel__loader {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(ellipse at center, rgba(7,9,13,.25), rgba(7,9,13,.7));
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
  letter-spacing: .18em; text-transform: uppercase; font-size: 12px;
}
.reel--loading .reel__loader,
.reel--stalled .reel__loader { opacity: 1; }
.reel__ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid rgba(243,240,232,.2);
  border-top-color: var(--reel-amber);
  animation: reel-spin .9s linear infinite;
}
.reel__ring i { display: none; }
@keyframes reel-spin { to { transform: rotate(360deg); } }

/* controls */
.reel__ui {
  position: absolute; right: clamp(12px, 3vw, 32px); bottom: clamp(12px, 3vw, 28px);
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  z-index: 2;
}
.reel__btn {
  appearance: none; cursor: pointer;
  border: 1px solid rgba(243,240,232,.35);
  background: rgba(7,9,13,.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--reel-paper);
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 11px 14px; border-radius: 999px;
  min-height: 40px;
  transition: background .2s, border-color .2s, color .2s;
}
.reel__btn svg { display: inline-block; vertical-align: -2px; }
.reel__btn--fs { padding-inline: 12px; }
.reel--fs { width: 100vw; height: 100vh; aspect-ratio: auto; padding: 0; border: 0; background: #000; box-shadow: none; }
.reel:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; padding: 0; border: 0; background: #000; }
.reel:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; padding: 0; border: 0; background: #000; }
.reel--fs .reel__video { object-fit: contain; background: #000; }
.reel:fullscreen .reel__video { object-fit: contain; }
.reel:-webkit-full-screen .reel__video { object-fit: contain; }
.reel:focus { outline: none; }
.reel__ui, .reel__progress { transition: opacity .35s ease; }
.reel--fs:not(.reel--active) .reel__ui,
.reel--fs:not(.reel--active) .reel__progress { opacity: 0; }
.reel--fs:not(.reel--active) { cursor: none; }
.reel__btn:hover { border-color: var(--reel-amber); }
.reel__btn:focus-visible { outline: 2px solid var(--reel-amber); outline-offset: 2px; }
.reel__btn--sound { background: var(--reel-amber); color: var(--reel-ink); border-color: var(--reel-amber); }
.reel__btn--mute { display: none; }
.reel--sound .reel__btn--sound { display: none; }
.reel--sound .reel__btn--mute { display: inline-block; }
.reel--ended .reel__btn--sound { display: inline-block; }
.reel--idle .reel__loader { opacity: 0; }

.reel__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(243,240,232,.12); z-index: 2;
}
.reel__progress i {
  display: block; height: 100%; background: var(--reel-amber);
  transform-origin: 0 50%; transform: scaleX(0);
}
.reel--error .reel__loader { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .reel__ring { animation: none; }
}
@media (max-width: 520px) {
  .reel__ui { right: 8px; bottom: 10px; gap: 6px; }
  .reel__btn { padding: 7px 10px; font-size: 10px; letter-spacing: .1em; min-height: 30px; }
  .reel__long { display: none; }
}
