/* A focused viewing room for the client reels. */
html:has(.reel-player[open]) {
  overflow: hidden;
}
.reel-player {
  --viewer-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --viewer-height: min(74svh, 740px, calc(100svh - 128px));
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #f8f7f4;
  background: transparent;
}
.reel-player[open] {
  display: grid;
  place-items: center;
}
.reel-player::backdrop {
  background: #090b09e8;
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.reel-player.is-visible::backdrop {
  opacity: 1;
}
.reel-player-window {
  width: fit-content;
  max-width: 100%;
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.reel-player.is-visible .reel-player-window {
  opacity: 1;
  transform: none;
  transition: opacity 0.36s ease, transform 0.48s var(--viewer-ease);
}
.reel-player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.reel-player-brand {
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: -0.04em;
}
.reel-player-brand > span {
  margin-left: 8px;
  color: #a8aaa0;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.reel-player svg {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
.reel-player button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.reel-player button:focus-visible,
.reel-player a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.reel-player-close {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 13px 9px 17px;
  border: 1px solid #ffffff24;
  border-radius: 999px;
  background: #ffffff08;
  font-size: 12px !important;
  transition: border-color 0.2s, background 0.2s;
}
.reel-player-close:hover {
  border-color: #ffffff65;
  background: #ffffff10;
}
.reel-player-close svg {
  width: 16px;
  height: 16px;
}
.reel-player-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 340px);
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #ffffff18;
  border-radius: 22px;
  background: #191b17;
  box-shadow: 0 32px 100px #0008;
}
.reel-player-screen {
  position: relative;
  height: var(--viewer-height);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #090a08;
}
.reel-player-media {
  position: absolute;
  inset: 0;
  transition: opacity 0.25s ease, transform 0.35s var(--viewer-ease);
}
.reel-player-screen.is-switching .reel-player-media {
  opacity: 0;
  transform: translateY(6px) scale(0.99);
  transition-duration: 0.16s;
}
.reel-player video,
.reel-player-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.reel-player-poster {
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.has-frame .reel-player-poster {
  opacity: 0;
}
.reel-player-loading {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #111a;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  font-size: 11px;
  transition: opacity 0.2s;
}
.reel-player-loading i {
  width: 12px;
  height: 12px;
  border: 1.5px solid #ffffff45;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: reel-loading-spin 0.8s linear infinite;
  animation-play-state: paused;
}
.is-loading .reel-player-loading {
  opacity: 1;
}
.is-loading .reel-player-loading i {
  animation-play-state: running;
}
.reel-player-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 1px solid #ffffff6b;
  border-radius: 50%;
  background: #15171177;
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s, background 0.2s, visibility 0.2s;
}
.reel-player-big-play svg {
  width: 27px;
  height: 27px;
}
.reel-player-big-play:hover {
  background: #151711b3;
}
.is-playing .reel-player-big-play,
.is-loading .reel-player-big-play,
.has-error .reel-player-big-play {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.reel-player-controls {
  position: absolute;
  inset: auto 0 0;
  padding: 44px 18px 12px;
  background: linear-gradient(transparent, #000b 65%, #000c);
  opacity: 1;
  transition: opacity 0.2s ease;
}
.is-playing:not(.show-controls):not(:focus-within):not(:hover):not(.is-loading) .reel-player-controls {
  opacity: 0;
  pointer-events: none;
}
.reel-player-controls:focus-within {
  opacity: 1;
}
.reel-player-seek {
  --reel-played: 0%;
  display: block;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
.reel-player-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--gold) var(--reel-played), #ffffff55 var(--reel-played));
}
.reel-player-seek::-moz-range-track {
  height: 3px;
  border-radius: 4px;
  background: #ffffff55;
}
.reel-player-seek::-moz-range-progress {
  height: 3px;
  border-radius: 4px;
  background: var(--gold);
}
.reel-player-seek::-webkit-slider-thumb {
  width: 11px;
  height: 11px;
  margin-top: -4px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px #0006;
}
.reel-player-seek::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.reel-player-seek:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.reel-player-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
}
.reel-player-toolbar button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
}
.reel-player-toolbar button:hover {
  background: #ffffff20;
}
.reel-player-time {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-right: auto;
  padding-left: 5px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.reel-player-time-divider,
.reel-player-total {
  color: #ffffff9c;
}
.reel-player-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: var(--viewer-height);
  box-sizing: border-box;
  padding: clamp(24px, 3vw, 36px);
  overflow-y: auto;
}
.reel-player-eyebrow {
  margin: 0 0 25px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.7;
}
.reel-player-eyebrow > span {
  color: #8f9388;
  white-space: nowrap;
}
.reel-player h2 {
  margin: 0;
  color: #f8f7f4;
  font-family: Manrope, sans-serif;
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.08;
}
.reel-player-description {
  margin: 20px 0 0;
  color: #afb3a7;
  font-size: 14px;
  line-height: 1.7;
}
.reel-player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}
.reel-player-tags span {
  padding: 6px 10px;
  border: 1px solid #ffffff17;
  border-radius: 999px;
  color: #d3d6cc;
  font-size: 10px;
}
.reel-player-details {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 26px 0 0;
  padding-top: 22px;
  border-top: 1px solid #ffffff12;
}
.reel-player-details dt {
  margin-bottom: 6px;
  color: #90958a;
  font-size: 10px;
}
.reel-player-details dd {
  margin: 0;
  color: #e8ebdf;
  font-size: 12px;
}
.reel-player-projects {
  margin-top: auto;
}
.reel-player-nav-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 12px;
  color: #aeb3a3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.reel-player-nav-label svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
}
.reel-player-project-list {
  display: grid;
  gap: 8px;
}
.reel-player-project {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 78px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #ffffff04;
  text-align: left;
  transition: background 0.2s, border-color 0.2s;
}
.reel-player-project:hover {
  border-color: #ffffff20;
  background: #ffffff09;
}
.reel-player-project[aria-pressed="true"] {
  border-color: #e8b11a50;
  background: #e8b11a08;
}
.reel-player-project > img {
  flex-shrink: 0;
  width: 38px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
}
.reel-player-project-text {
  display: grid;
  gap: 6px;
}
.reel-player-project strong {
  font-size: 12px;
  font-weight: 600;
}
.reel-player-project-state {
  color: #929889;
  font-size: 10px;
}
[aria-pressed="true"] .reel-player-project-state {
  color: #e8c96e;
}
.reel-player-project-arrow {
  margin-left: auto;
  padding-right: 5px;
  color: #c2c8b6;
}
.reel-player-project-arrow svg {
  width: 14px;
  height: 14px;
}
.reel-player-project[aria-pressed="true"] .reel-player-project-arrow {
  opacity: 0;
}
.reel-player-keyboard-hint {
  color: #8e9486;
  font-size: 10px;
  text-align: center;
}
.reel-player-keyboard-hint kbd {
  margin-right: 5px;
  padding: 3px 5px;
  border: 1px solid #ffffff20;
  border-radius: 4px;
  font: inherit;
}
.reel-player-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: #10120fed;
  text-align: center;
}
.reel-player [hidden] {
  display: none;
}
.reel-player-error strong {
  font-size: 18px;
}
.reel-player-error p {
  margin: 0;
  color: #b9beaf;
  font-size: 13px;
}
.reel-player-retry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 16px;
  border: 1px solid #e8b11a66;
  border-radius: 999px;
  background: #e8b11a15;
}
.reel-player-error a {
  padding: 8px;
  color: #d6daca;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reel-player-screen:fullscreen {
  width: 100vw;
  height: 100dvh;
  aspect-ratio: auto;
}
@media (min-width: 761px) and (max-height: 850px) {
  .reel-player-info {
    gap: 20px;
    padding: 24px;
  }
  .reel-player-eyebrow {
    margin-bottom: 18px;
  }
  .reel-player h2 {
    font-size: 34px;
  }
  .reel-player-description {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.6;
  }
  .reel-player-tags {
    margin-top: 16px;
  }
  .reel-player-details {
    gap: 20px;
    margin-top: 18px;
    padding-top: 16px;
  }
  .reel-player-project {
    min-height: 62px;
  }
  .reel-player-project > img {
    width: 30px;
    height: 44px;
  }
  .reel-player-keyboard-hint {
    display: none;
  }
}
@keyframes reel-loading-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 760px) {
  .reel-player {
    padding: 16px;
  }
  .reel-player-window {
    width: min(100%, 430px);
  }
  .reel-player-topbar {
    margin-bottom: 10px;
  }
  .reel-player-brand {
    font-size: 21px;
  }
  .reel-player-brand > span {
    display: none;
  }
  .reel-player-close {
    min-height: 40px;
    font-size: 11px !important;
  }
  .reel-player-shell {
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .reel-player-screen {
    align-self: center;
    width: min(100%, calc((100svh - 194px) * 9 / 16));
    height: auto;
    border: 1px solid #ffffff20;
    border-radius: 16px;
  }
  .reel-player-info {
    gap: 10px;
    height: auto;
    padding: 12px 0 0;
    overflow: visible;
  }
  .reel-player h2 {
    font-size: 19px;
    letter-spacing: -0.03em;
  }
  .reel-player-eyebrow,
  .reel-player-description,
  .reel-player-tags,
  .reel-player-details,
  .reel-player-nav-label,
  .reel-player-keyboard-hint {
    display: none;
  }
  .reel-player-project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .reel-player-project {
    min-height: 54px;
    gap: 8px;
    padding: 6px;
    background: #ffffff06;
  }
  .reel-player-project > img {
    width: 27px;
    height: 40px;
    border-radius: 4px;
  }
  .reel-player-project strong {
    font-size: 10px;
  }
  .reel-player-project-state {
    font-size: 9px;
  }
  .reel-player-project-arrow {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reel-player *,
  .reel-player::backdrop {
    transition: none !important;
    animation: none !important;
  }
  .reel-player-window,
  .reel-player-screen.is-switching .reel-player-media {
    transform: none;
  }
}
