:root {
  --page: #000307;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.56);
  --dim: rgba(255, 255, 255, 0.34);
  --accent: #2f638f;
  --accent-bright: #4f8dc0;
  --line: rgba(255, 255, 255, 0.18);
  --stage-ratio: 1.429;
  --bar-y: 0%;
  --bar-x: 0%;
  --progress: 0%;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(50, 95, 141, 0.18), transparent 28rem),
    var(--page);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.explorer {
  width: min(100%, 1620px);
  margin: 0 auto;
  padding: clamp(44px, 5.2vw, 86px) 24px 90px;
}

.intro {
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(42vw, 430px);
  min-width: 210px;
  height: auto;
  margin: 0 auto 22px;
  object-fit: contain;
  object-position: center;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.15rem, 5vw, 4.1rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede {
  width: min(100%, 1380px);
  margin: 22px auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.8vw, 1.38rem);
  font-weight: 500;
  line-height: 1.45;
}

.format-nav {
  width: min(100%, 910px);
  margin: clamp(58px, 7vw, 96px) auto clamp(46px, 6.6vw, 92px);
}

.format-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: clamp(10px, 2.1vw, 26px);
  align-items: start;
}

.format-card {
  min-width: 0;
  height: 126px;
  padding: 12px 9px 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  display: grid;
  grid-template-rows: 30px 1fr auto;
  place-items: center;
  gap: 8px;
  text-align: center;
  transition:
    background 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;
}

.format-card:hover {
  color: rgba(255, 255, 255, 0.72);
  transform: translateY(-2px);
}

.format-card:focus-visible,
.icon-button:focus-visible,
.large-play:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.format-card[aria-selected="true"] {
  background: var(--accent);
  color: var(--ink);
}

.format-graphic,
.format-logo {
  display: grid;
  width: 72px;
  max-width: 100%;
  place-items: center;
  color: currentColor;
}

.format-graphic {
  height: 30px;
  opacity: 0.86;
}

.format-graphic svg {
  display: block;
  width: auto;
  max-width: 58px;
  height: auto;
  max-height: 30px;
  overflow: visible;
}

.format-graphic svg [stroke] {
  stroke: currentColor;
}

.format-logo {
  min-height: 30px;
}

.format-logo svg {
  display: block;
  width: auto;
  max-width: 70px;
  height: auto;
  max-height: 28px;
  overflow: visible;
}

.format-logo > div {
  display: grid;
  width: 68px;
  gap: 4px;
  justify-items: center;
}

.format-logo > div svg {
  width: 100%;
  max-width: 68px;
  max-height: none;
}

.format-logo > div svg + svg {
  width: 88%;
}

.format-logo svg path,
.format-logo svg polygon,
.format-logo svg rect,
.format-logo svg circle {
  fill: currentColor;
}

.format-logo svg [stroke] {
  stroke: currentColor;
}

.format-logo span {
  color: currentColor;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.format-symbol {
  position: relative;
  width: 54px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 2px;
  opacity: 0.86;
}

.format-symbol::before,
.format-symbol::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 8px);
}

.format-symbol::before {
  top: 4px;
}

.format-symbol::after {
  bottom: 4px;
}

.format-symbol.flat {
  height: 20px;
  margin-top: 3px;
}

.format-symbol.flat::before,
.format-symbol.flat::after,
.format-symbol.screen::before,
.format-symbol.screen::after {
  display: none;
}

.format-symbol.scope {
  width: 58px;
  height: 20px;
}

.format-symbol.plf {
  width: 46px;
  height: 18px;
  border-left-style: dotted;
  border-right-style: dotted;
}

.format-name {
  display: block;
  max-width: 100%;
  color: currentColor;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 0.96;
  text-transform: uppercase;
  word-break: normal;
}

.format-name small {
  display: block;
  margin-top: 2px;
  font-size: 0.74em;
  font-weight: 800;
}

.format-ratio {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  color: currentColor;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.ratio-option {
  opacity: 0.66;
}

.ratio-single {
  opacity: 0.82;
}

.ratio-option.is-preview {
  font-weight: 900;
  opacity: 1;
}

.ratio-divider {
  opacity: 0.55;
}

.viewer {
  width: min(100%, 1172px);
  margin: 0 auto;
}

.stage-shell {
  width: 100%;
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1900 / 1329;
  overflow: hidden;
  background: #000;
}

.trailer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.trailer[hidden] {
  display: none;
}

.crop {
  position: absolute;
  z-index: 2;
  background: #000;
  pointer-events: none;
  transition:
    height 680ms cubic-bezier(0.19, 1, 0.22, 1),
    width 680ms cubic-bezier(0.19, 1, 0.22, 1);
}

.crop-top,
.crop-bottom {
  left: 0;
  width: 100%;
  height: var(--bar-y);
}

.crop-top {
  top: 0;
}

.crop-bottom {
  bottom: 0;
}

.crop-left,
.crop-right {
  top: 0;
  height: 100%;
  width: var(--bar-x);
}

.crop-left {
  left: 0;
}

.crop-right {
  right: 0;
}

.format-badge {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-y) + 18px);
  z-index: 3;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  opacity: 0;
  text-transform: uppercase;
  transition:
    bottom 680ms cubic-bezier(0.19, 1, 0.22, 1),
    opacity 220ms ease;
}

.stage:hover .format-badge,
.stage:focus-within .format-badge {
  opacity: 1;
}

.large-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  width: clamp(74px, 8vw, 112px);
  height: clamp(74px, 8vw, 112px);
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.large-play svg {
  width: 46%;
  height: 46%;
  margin-left: 4px;
  stroke-width: 3;
}

.large-play:hover {
  background: var(--accent-bright);
  transform: translate(-50%, -50%) scale(1.04);
}

.stage.is-playing .large-play {
  opacity: 0;
  pointer-events: none;
}

.controls {
  margin-top: 22px;
}

.timeline {
  display: block;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.timeline::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent-bright) 0,
    var(--accent-bright) var(--progress),
    rgba(255, 255, 255, 0.25) var(--progress),
    rgba(255, 255, 255, 0.25) 100%
  );
}

.timeline::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.timeline::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--accent-bright);
}

.timeline::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--accent-bright);
}

.timeline::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-bright);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 22px;
}

.icon-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.8;
}

.timecode {
  min-width: 4.5ch;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1;
}

.format-details {
  width: min(100%, 780px);
  margin: clamp(46px, 6vw, 72px) auto 0;
}

.details-logo {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 900;
  line-height: 0.92;
  text-transform: uppercase;
}

.details-logo span:not(.details-logo-mark) {
  display: block;
}

.details-logo-mark {
  display: block;
  width: min(230px, 70%);
}

.details-logo-mark svg {
  display: block;
  width: auto;
  max-width: 230px;
  height: auto;
  max-height: 54px;
  overflow: visible;
}

.details-logo-mark > div {
  display: grid;
  width: min(210px, 100%);
  gap: 8px;
}

.details-logo-mark > div svg {
  width: 100%;
  max-width: 210px;
  max-height: none;
}

.details-logo-mark > div svg + svg {
  width: 88%;
}

.details-logo-mark svg path,
.details-logo-mark svg polygon,
.details-logo-mark svg rect,
.details-logo-mark svg circle {
  fill: currentColor;
}

.details-logo-mark svg [stroke] {
  stroke: currentColor;
}

.details-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  font-weight: 500;
  line-height: 1.52;
}

.example-title {
  margin: 42px 0 18px;
  color: var(--ink);
  font-size: clamp(1.04rem, 1.6vw, 1.26rem);
  font-weight: 800;
  line-height: 1.2;
}

.example-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d0d0d;
}

@media (max-width: 980px) {
  .explorer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .format-nav {
    width: calc(100% + 36px);
    margin-left: -18px;
    margin-right: -18px;
    overflow: hidden;
  }

  .format-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 18px 10px;
    scroll-snap-type: x proximity;
  }

  .format-card {
    flex: 0 0 104px;
    scroll-snap-align: center;
  }
}

@media (max-width: 640px) {
  .explorer {
    padding-top: 34px;
  }

  .brand-logo {
    width: min(68vw, 270px);
    min-width: 0;
    margin-bottom: 16px;
  }

  .lede {
    margin-top: 16px;
  }

  .format-nav {
    margin-top: 42px;
    margin-bottom: 40px;
  }

  .viewer {
    width: 100%;
  }

  .controls {
    margin-top: 18px;
  }

  .control-group {
    gap: 16px;
  }

  .timecode {
    font-size: 1rem;
  }

  .format-details {
    margin-top: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
