/* Film player (Figma "Frame 2147226132" 428:806): the About-page film with its own controls.
   Card 1200 wide, 16:9, 24 radius; controls sit on a navy scrim and follow the design-system button language. */

.film__inner {
  display: flex; flex-direction: column; align-items: center; gap: var(--head-gap);
  padding: var(--section-y) var(--gx) calc(var(--section-y) - 10px);   /* Figma: 110 above the title, 100 below the card */
}
.film__title { margin: 0; text-align: center; }
.film__title .t-h2--regular { font-weight: 400; }

/* ---- the player ---------------------------------------------------- */
.player {
  --pc: 48px;                                   /* control button size */
  position: relative; isolation: isolate; width: 100%; max-width: 1200px; aspect-ratio: 16 / 9;
  border-radius: var(--radius-card); overflow: hidden; background: var(--color-ink);
  border: 1px solid var(--color-line-strong); box-shadow: var(--shadow-card);
  color: #fff; font-family: var(--font-ui);
  -webkit-tap-highlight-color: transparent; outline: none;
}
.player:focus-visible { box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 5px var(--color-primary); }
.player__video { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; background: var(--color-ink); }
.player::after {                                /* scrim under the bar so the controls read on any frame */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 190px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 12, 46, 0) 0%, rgba(0, 12, 46, .72) 100%);
  transition: opacity .35s ease;
}

/* the big play button: the primary button, round */
.player__big {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid var(--color-primary-soft); border-radius: 50%;
  background: var(--color-primary); color: #fff; box-shadow: var(--shadow-primary);
  transition: transform .28s cubic-bezier(.19, 1, .22, 1), opacity .25s ease;
}
.player__big svg { width: 26px; height: 30px; margin-left: 4px; }
.player__big:hover { transform: translateY(-3px); }
.player__big:active { transform: translateY(0); }
.player.is-playing .player__big { opacity: 0; pointer-events: none; transform: scale(.9); }

/* buffering ring */
.player__spin {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 3px solid rgba(255, 255, 255, .28); border-top-color: #fff; border-radius: 50%;
  opacity: 0; pointer-events: none; animation: player-spin .8s linear infinite paused;
}
.player.is-waiting.is-playing .player__spin { opacity: 1; animation-play-state: running; }
@keyframes player-spin { to { transform: rotate(360deg); } }

/* ---- control bar --------------------------------------------------- */
.player__bar {
  position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 4;
  display: grid; grid-template-columns: auto auto minmax(80px, 1fr) auto auto auto auto auto; align-items: center; column-gap: 16px;
  transition: opacity .35s ease, transform .35s cubic-bezier(.19, 1, .22, 1);
}
.player.is-idle.is-playing .player__bar { opacity: 0; transform: translateY(8px); pointer-events: none; }
.player.is-idle.is-playing::after { opacity: 0; }
.player.is-idle.is-playing { cursor: none; }

.pbtn, .pspeed {
  display: grid; place-items: center; flex: none; padding: 0; cursor: pointer;
  width: var(--pc); height: var(--pc); border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s ease, transform .28s cubic-bezier(.19, 1, .22, 1);
}
.pbtn:hover, .pspeed:hover { background: rgba(255, 255, 255, .26); transform: translateY(-3px); }
.pbtn:active, .pspeed:active { transform: translateY(0); }
.pbtn:focus-visible, .pspeed:focus-visible, .player__seek input:focus-visible, .player__vol input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pbtn svg { width: 20px; height: 20px; }

/* play / pause swap */
.pbtn--toggle .i-pause { display: none; }
.player.is-playing .pbtn--toggle .i-play { display: none; }
.player.is-playing .pbtn--toggle .i-pause { display: block; }
/* volume icon states */
.pbtn--mute .i-vol-off, .pbtn--mute .i-vol-low { display: none; }
.player[data-vol="muted"] .pbtn--mute .i-vol-on, .player[data-vol="low"] .pbtn--mute .i-vol-on { display: none; }
.player[data-vol="muted"] .pbtn--mute .i-vol-off { display: block; }
.player[data-vol="low"] .pbtn--mute .i-vol-low { display: block; }
/* full-screen / minimise swap */
.pbtn--fs .i-min { display: none; }
.player.is-fullscreen .pbtn--fs .i-max { display: none; }
.player.is-fullscreen .pbtn--fs .i-min { display: block; }

.player__time { font: 500 15px/1 var(--font-ui); letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* seek + volume: native range inputs, restyled; --p = played, --b = buffered (set by js/player.js) */
.player__seek, .player__vol { position: relative; display: flex; align-items: center; min-width: 0; height: var(--pc); }
.player__seek input, .player__vol input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 100%; margin: 0; padding: 0; background: transparent; cursor: pointer;
}
.player__seek input::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #fff 0 var(--p, 0%), rgba(255, 255, 255, .5) var(--p, 0%) var(--b, 0%), rgba(255, 255, 255, .28) var(--b, 0%) 100%);
}
.player__seek input::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #fff 0 var(--p, 0%), rgba(255, 255, 255, .5) var(--p, 0%) var(--b, 0%), rgba(255, 255, 255, .28) var(--b, 0%) 100%);
}
.player__vol { width: 84px; }
.player__vol input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff 0 var(--p, 100%), rgba(255, 255, 255, .28) var(--p, 100%) 100%); }
.player__vol input::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #fff 0 var(--p, 100%), rgba(255, 255, 255, .28) var(--p, 100%) 100%); }
.player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%;
  background: #fff; border: 3px solid var(--color-primary); box-sizing: border-box;
  transition: transform .2s ease;
}
.player input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--color-primary); box-sizing: border-box; }
.player input[type="range"]:hover::-webkit-slider-thumb, .player input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }

/* speed pill + menu */
.player__speed { position: relative; }
.pspeed { width: auto; min-width: 78px; padding: 0 14px 0 18px; grid-auto-flow: column; gap: 8px; border-radius: 999px; font: 600 16px/1 var(--font-ui); }
.pspeed svg { width: 12px; height: 12px; transition: transform .25s ease; }
.pspeed[aria-expanded="true"] svg { transform: rotate(180deg); }
.player__menu {
  position: absolute; right: 0; bottom: calc(100% + 14px); width: 220px; padding: 10px; z-index: 6;
  background: #fff; color: var(--color-ink); border: 1px solid var(--color-line-strong); border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
  opacity: 0; transform: translateY(6px); pointer-events: none; visibility: hidden;
  transition: opacity .2s ease, transform .25s cubic-bezier(.19, 1, .22, 1), visibility 0s linear .25s;
}
.player__menu.is-open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.player__menu-h { margin: 6px 10px 8px; font: 600 12px/1 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: #6b6e75; }
.player__menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px; padding: 0 12px;
  border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer;
  font: 500 16px/1 var(--font-ui); text-align: left;
}
.player__menu button:hover { background: var(--color-tint-blue); }
.player__menu button[aria-checked="true"] { background: var(--color-tint-blue); color: var(--color-primary); font-weight: 600; }
.player__menu button[aria-checked="true"]::after {
  content: ""; width: 14px; height: 8px; margin-right: 2px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) translateY(-2px);
}

/* full screen: the card fills the screen and the film is shown whole */
.player.is-fullscreen { max-width: none; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; background: #000; }
.player.is-fullscreen .player__video { object-fit: contain; }
.player:fullscreen { border-radius: 0; }
.player:-webkit-full-screen { border-radius: 0; }

/* ---- responsive ---------------------------------------------------- */
@media (max-width: 1023px) {
  .film__inner { padding-bottom: var(--section-y); }
}
@media (max-width: 767px) {
  .player { --pc: 42px; }
  .player__bar {
    left: 14px; right: 14px; bottom: 12px; column-gap: 10px; row-gap: 6px;
    grid-template-columns: auto auto 1fr auto auto auto auto;
    grid-template-areas: "seek seek seek seek seek seek seek" "toggle time . mute speed pip fs";
  }
  .pbtn--toggle { grid-area: toggle; } .player__time { grid-area: time; } .player__seek { grid-area: seek; }
  .pbtn--mute { grid-area: mute; } .player__speed { grid-area: speed; } .pbtn--pip { grid-area: pip; } .pbtn--fs { grid-area: fs; }
  .player__vol { display: none; }
  .player__big { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .player__big svg { width: 20px; height: 24px; }
  .pspeed { min-width: 64px; font-size: 15px; }
  .player__menu { width: 200px; bottom: calc(100% + 10px); }
  .player::after { height: 150px; }
}
@media (max-width: 479px) {
  .player { border-radius: 18px; }
  .pbtn--pip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .player__big, .player__bar, .pbtn, .pspeed, .player::after, .player__menu, .pspeed svg { transition: none; }
  .player__spin { animation: none; }
}
