.case-film {
  --case-video-accent: #d8b777;
  --case-video-accent-2: #6ccdc1;
  --case-video-bg: #071014;
  --case-video-panel: #0b171b;
  --case-video-line: rgba(216, 183, 119, .48);
  background: var(--case-video-bg);
  border: 1px solid var(--case-video-line);
  box-shadow: 0 28px 72px rgba(2, 9, 12, .42);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  display: grid;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.case-film::before,
.case-film::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

.case-film::before {
  border-left: 2px solid var(--case-video-accent-2);
  border-top: 2px solid var(--case-video-accent);
  height: 24px;
  left: 0;
  top: 0;
  width: 78px;
}

.case-film::after {
  border-bottom: 2px solid var(--case-video-accent);
  border-right: 2px solid var(--case-video-accent-2);
  bottom: 0;
  height: 24px;
  right: 0;
  width: 78px;
}

.case-film__viewport {
  aspect-ratio: 16 / 9;
  background: #030708;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.case-film__viewport video {
  background: #030708;
  cursor: pointer;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.case-film__play-overlay {
  align-items: center;
  background: color-mix(in srgb, var(--case-video-bg) 78%, transparent);
  border: 1px solid var(--case-video-line);
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .34);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: 800 .73rem/1 var(--brand-body, system-ui, sans-serif);
  gap: .75rem;
  left: 50%;
  letter-spacing: .08em;
  min-height: 3.25rem;
  padding: .75rem 1.15rem .75rem .8rem;
  position: absolute;
  text-transform: uppercase;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity .24s ease, transform .24s ease, border-color .24s ease;
  z-index: 3;
}

.case-film__play-overlay::before {
  align-items: center;
  background: var(--case-video-accent);
  border-radius: 50%;
  color: #071014;
  content: "\25B6";
  display: flex;
  font-size: .78rem;
  height: 2rem;
  justify-content: center;
  padding-left: .12rem;
  width: 2rem;
}

.case-film__play-overlay:hover,
.case-film__play-overlay:focus-visible {
  border-color: var(--case-video-accent);
  transform: translate(-50%, -50%) scale(1.025);
}

.case-film.is-playing .case-film__play-overlay {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%);
}

.case-film__caption {
  align-items: baseline;
  background: linear-gradient(90deg, color-mix(in srgb, var(--case-video-panel) 95%, #000), var(--case-video-panel));
  border-top: 1px solid color-mix(in srgb, var(--case-video-line) 62%, transparent);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.2rem .9rem;
  position: static;
}

.case-film__caption strong {
  color: #fff;
  font: 500 clamp(1rem, 1.6vw, 1.28rem)/1.2 var(--brand-display, Georgia, serif);
}

.case-film__caption span {
  color: rgba(255, 255, 255, .63);
  font: 700 .62rem/1.4 var(--brand-body, system-ui, sans-serif);
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
}

.case-film__credits {
  align-items: center;
  background: color-mix(in srgb, var(--case-video-panel) 94%, #000);
  border-top: 1px solid color-mix(in srgb, var(--case-video-line) 40%, transparent);
  color: rgba(255, 255, 255, .56);
  display: flex;
  flex-wrap: wrap;
  font: 650 .57rem/1.5 var(--brand-body, system-ui, sans-serif);
  gap: .18rem .42rem;
  letter-spacing: .055em;
  margin: 0;
  padding: .55rem 1rem .6rem;
  text-transform: uppercase;
}

.case-film__credits span {
  color: var(--case-video-accent);
  font-weight: 850;
}

.case-film__credits span:not(:first-child) {
  margin-left: .5rem;
}

.case-film__controls {
  align-items: center;
  background: color-mix(in srgb, var(--case-video-bg) 82%, #101c20);
  border-top: 1px solid color-mix(in srgb, var(--case-video-line) 52%, transparent);
  display: grid;
  gap: .65rem;
  grid-template-columns: auto auto minmax(90px, 1fr) auto auto minmax(72px, 104px) auto auto;
  padding: .75rem 1rem .85rem;
}

.case-film__controls button {
  align-items: center;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .88);
  cursor: pointer;
  display: inline-flex;
  font: 800 .64rem/1 var(--brand-body, system-ui, sans-serif);
  gap: .4rem;
  justify-content: center;
  letter-spacing: .055em;
  min-height: 2.45rem;
  min-width: 2.55rem;
  padding: .55rem .7rem;
  text-transform: uppercase;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.case-film__controls button:hover,
.case-film__controls button:focus-visible {
  background: color-mix(in srgb, var(--case-video-accent) 16%, transparent);
  border-color: var(--case-video-accent);
  color: #fff;
}

.case-film__controls button[data-video-toggle] {
  background: var(--case-video-accent);
  border-color: var(--case-video-accent);
  color: #071014;
}

.case-film__controls button[hidden] {
  display: none;
}

.case-film__time {
  color: rgba(255, 255, 255, .62);
  font: 700 .65rem/1 var(--brand-body, ui-monospace, monospace);
  min-width: 2.6rem;
  text-align: center;
}

.case-film__range {
  accent-color: var(--case-video-accent);
  cursor: pointer;
  margin: 0;
  min-width: 0;
  width: 100%;
}

.case-film__range:focus-visible {
  outline: 2px solid var(--case-video-accent-2);
  outline-offset: 3px;
}

.case-film__control-icon {
  font-size: .9rem;
  line-height: 1;
}

.case-film--domora {
  --case-video-accent: #e8c999;
  --case-video-accent-2: #dc7658;
  --case-video-bg: #071814;
  --case-video-panel: #0d2a25;
  --case-video-line: rgba(232, 201, 153, .54);
}

.case-film--aurelia {
  --case-video-accent: #d8b777;
  --case-video-accent-2: #6ccdc1;
  --case-video-bg: #050b0d;
  --case-video-panel: #0a1b25;
  --case-video-line: rgba(216, 183, 119, .5);
}

.domora-film-frame.case-film {
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  overflow: hidden;
}

.domora-film-frame.case-film::before,
.domora-film-frame.case-film::after {
  inset: auto;
}

.domora-film-frame.case-film::before {
  left: 0;
  top: 0;
}

.domora-film-frame.case-film::after {
  bottom: 0;
  right: 0;
}

.domora-film-frame.case-film video {
  aspect-ratio: auto;
  height: 100%;
}

.domora-film-frame.case-film figcaption {
  background: linear-gradient(90deg, #0b211c, #102e27);
  bottom: auto;
  display: flex;
  inset: auto;
  padding: 1rem 1.2rem .9rem;
  position: static;
  z-index: auto;
}

.aurelia-film-section {
  align-items: center;
  background:
    radial-gradient(circle at 15% 25%, rgba(108, 205, 193, .12), transparent 28%),
    linear-gradient(135deg, #061117, #0b2431 58%, #08151d);
  color: #f6f0e6;
  display: grid;
  gap: clamp(2rem, 5vw, 5.5rem);
  grid-template-columns: minmax(230px, .68fr) minmax(0, 1.32fr);
}

.aurelia-film-section__copy h2 {
  color: #f6f0e6;
  font: 700 clamp(2.7rem, 4.8vw, 5.4rem)/.92 var(--brand-display, Georgia, serif);
  letter-spacing: -.045em;
  margin: 1rem 0 1.35rem;
  max-width: 9ch;
}

.aurelia-film-section__copy > p:not(.eyebrow) {
  color: rgba(246, 240, 230, .7);
  line-height: 1.7;
  max-width: 36ch;
}

.aurelia-film-section__meta {
  color: #d8b777;
  display: block;
  font: 800 .62rem/1.4 var(--brand-body, system-ui, sans-serif);
  letter-spacing: .12em;
  margin-top: 2rem;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .aurelia-film-section,
  .domora-film-section {
    grid-template-columns: 1fr;
  }

  .aurelia-film-section__copy h2,
  .domora-film-section__copy h2 {
    max-width: 12ch;
  }
}

@media (max-width: 720px) {
  .case-film__caption {
    align-items: flex-start;
    flex-direction: column;
    gap: .4rem;
  }

  .case-film__caption span {
    text-align: left;
  }

  .case-film__caption strong,
  .case-film__caption span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .case-film__controls {
    grid-template-areas:
      "play current duration pip fullscreen"
      "seek seek seek seek seek"
      "mute volume volume volume volume";
    grid-template-columns: auto auto auto auto auto;
    padding-inline: .72rem;
  }

  .case-film__controls [data-video-toggle] { grid-area: play; }
  .case-film__controls [data-video-current] { grid-area: current; }
  .case-film__controls [data-video-seek] { grid-area: seek; }
  .case-film__controls [data-video-duration] { grid-area: duration; }
  .case-film__controls [data-video-mute] { grid-area: mute; }
  .case-film__controls [data-video-volume] { grid-area: volume; }
  .case-film__controls [data-video-pip] { grid-area: pip; }
  .case-film__controls [data-video-fullscreen] { grid-area: fullscreen; }

  .case-film__button-label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
}

@media (max-width: 430px) {
  .case-film__controls {
    gap: .52rem;
    grid-template-areas:
      "play current duration"
      "seek seek seek"
      "mute volume volume"
      "pip fullscreen fullscreen";
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .case-film__controls button {
    min-height: 2.35rem;
    min-width: 2.35rem;
    padding: .5rem;
  }

  .case-film__time {
    min-width: 2.25rem;
  }

  .case-film__controls [data-video-pip],
  .case-film__controls [data-video-fullscreen] {
    width: 100%;
  }

  .case-film__play-overlay {
    min-height: 2.8rem;
    padding: .62rem .85rem .62rem .65rem;
  }

  .case-film__play-overlay::before {
    height: 1.75rem;
    width: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-film__play-overlay,
  .case-film__controls button {
    transition: none;
  }
}
