/*
 * PALLISER.AERO — the brand's guide (Drive: «00 Guia de marca - Palliser Aero.pdf», v1.0, October 2026): monochrome,
 * the logo white on black, headlines in capitals in Archivo Black at 125 % width, running text in Inter, buttons as
 * white pills. Both fonts are served from this site (the CSP allows no other): Archivo from
 * @fontsource-variable/archivo, Inter the market's own file. Clear space round the logo: half the height of its letters.
 *
 * One sheet for every page (site/palliser/pages.mjs writes them): the header and the footer they share, the home with
 * the film, the text pages. Sizes in rem and in the tokens below, never in loose px. Motion plays on every device (the
 * owner's rule for the market, kept here): one entrance when a page opens, and what answers a pointer.
 */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url('/fonts/archivo-latin-standard.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --black: #000000;
  --white: #ffffff;
  --soft: rgb(255 255 255 / 0.84); /* running text */
  --dim: rgb(255 255 255 / 0.72); /* what stands behind it: 11:1 on black */
  --line: rgb(255 255 255 / 0.16); /* hairlines */
  --hair: 0.0625rem;
  --gutter: clamp(1rem, 3.6vw, 3rem);
  --head: clamp(4.5rem, 11vh, 6rem); /* the header's height */
  --display: 'Archivo', 'Inter', system-ui, sans-serif;
  --text: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes home-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

/* The brand's capitals: titles at 900, what is pressed at 800 */
.page__title,
.statement__line,
.btn,
.site-nav__link,
.site-head__toggle,
.row__label {
  font-family: var(--display);
  font-stretch: 125%;
  text-transform: uppercase;
}

.page__title,
.statement__line {
  font-weight: 900;
  font-variation-settings: 'wdth' 125, 'wght' 900;
}

.btn,
.site-nav__link,
.site-head__toggle,
.row__label {
  font-weight: 800;
  font-variation-settings: 'wdth' 125, 'wght' 800;
}

/* Read, not seen: the home's own name */
.hidden {
  position: absolute;
  width: var(--hair);
  height: var(--hair);
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The keyboard's first stop */
.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 40;
  padding: 0.8em 1.3em;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

a:focus-visible,
button:focus-visible {
  outline: 0.125rem solid var(--white);
  outline-offset: 0.1875rem;
  border-radius: 0.25rem;
}

/* ══ THE PAGE'S COLUMN ════════════════════════════════════════════════════════════════════════════════════════════
 * Everything stands on the same two edges (--wrap). On the home they are the FILM's: as wide as the film may be for
 * the header, the film and its controls to fit one screen, so the logo and the menu end exactly where the film does.
 */
.site {
  --wrap: min(100%, 76rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}

.site > * {
  width: var(--wrap);
}

.site > main {
  flex: 1 0 auto;
  padding-bottom: clamp(3rem, 10vh, 6rem);
}

body[data-page='home'] .site {
  --screen: 100vh;
  --around: calc(var(--head) + 3.25rem + 1.5rem); /* above and below the film: the header, the controls, a breath */
  --wrap: max(min(100%, (var(--screen) - var(--around)) * 16 / 9), min(100%, 30rem));
}

@supports (height: 100svh) {
  body[data-page='home'] .site {
    --screen: 100svh;
  }
}

/* ══ BUTTONS: a white pill, as the guide draws them ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 2.75rem;
  padding: 0 1.4em;
  border: var(--hair) solid rgb(255 255 255 / 0.85);
  border-radius: 999px;
  background: none;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-size: clamp(0.75rem, 1.3vw, 0.875rem);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.btn[hidden] {
  display: none;
}

.btn:hover,
.btn--solid {
  background: var(--white);
  color: var(--black);
}

.btn--solid:hover {
  background: none;
  color: var(--white);
}

.btn:active {
  transform: translateY(var(--hair)) scale(0.985);
}

.btn:focus-visible {
  border-radius: 999px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

/* ══ THE HEADER ═══════════════════════════════════════════════════════════════════════════════════════════════════ */
.site-head {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--head);
  animation: fade-in 0.9s var(--ease) backwards;
}

/* The logo: 120 px wide at the very least (the guide) */
.site-head__logo {
  position: relative;
  z-index: 2;
  flex: none;
  width: clamp(8.5rem, 15vw, 13rem);
  padding: 0.5rem 0; /* a finger's 44 px round a logo 31 px tall */
  line-height: 0;
}

.site-head__logo img,
.site-foot__logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.06em;
  font-size: clamp(0.75rem, 1.2vw, 0.8125rem);
  white-space: nowrap;
}

/* The page you are on is underlined; the others draw the line when pointed at */
.site-nav__link::after {
  content: '';
  position: absolute;
  inset: auto 0 0.55rem;
  height: 0.125rem;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s var(--ease);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current='page']::after {
  transform: scaleX(1);
}

.site-nav__link--lang {
  color: var(--dim);
  transition: color 0.2s ease;
}

.site-nav__link--lang:hover {
  color: var(--white);
}

.site-nav__long,
.site-head__toggle {
  display: none;
}

/* A phone: the links open over the page from «Menu» (site.js). Without the script they are in the footer. */
@media (max-width: 47.99rem) {
  .site-head__toggle:not([hidden]) {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 1.3em;
    border: var(--hair) solid rgb(255 255 255 / 0.85);
    border-radius: 999px;
    background: none;
    color: var(--white);
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
  }

  .site-head__toggle:active {
    transform: scale(0.97);
  }

  .site-head__toggle:focus-visible {
    border-radius: 999px;
  }

  html[data-menu='open'] .site-head__toggle {
    background: var(--white);
    color: var(--black);
  }

  .site-nav {
    display: none;
  }

  html[data-js] .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: grid;
    align-content: center;
    padding: calc(var(--head) + 1rem) max(var(--gutter), env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
    overflow-y: auto;
    background: var(--black);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.25s;
  }

  html[data-menu='open'] .site-nav {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  html[data-menu='open'] {
    overflow: hidden;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .site-nav__list > li {
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  }

  html[data-menu='open'] .site-nav__list > li {
    opacity: 1;
    transform: none;
  }

  html[data-menu='open'] .site-nav__list > li:nth-child(2) {
    transition-delay: 0.05s;
  }

  html[data-menu='open'] .site-nav__list > li:nth-child(3) {
    transition-delay: 0.1s;
  }

  html[data-menu='open'] .site-nav__list > li:nth-child(4) {
    transition-delay: 0.15s;
  }

  .site-nav__link {
    min-height: 3.75rem;
    letter-spacing: 0;
    font-size: clamp(1.75rem, 9vw, 2.75rem);
    font-weight: 900;
    font-variation-settings: 'wdth' 125, 'wght' 900;
  }

  .site-nav__link::after {
    bottom: 0.45rem;
    height: 0.1875rem;
  }

  .site-nav__link--lang {
    color: var(--white);
  }

  .site-nav__short {
    display: none;
  }

  .site-nav__long {
    display: inline;
  }

  .site-nav__list .btn {
    margin-top: 1.75rem;
  }
}

/* ══ THE FOOTER ═══════════════════════════════════════════════════════════════════════════════════════════════════ */
.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
  padding: clamp(2.5rem, 7vh, 4rem) 0 max(1.5rem, env(safe-area-inset-bottom));
  border-top: var(--hair) solid var(--line);
  color: var(--dim);
  font-size: 0.875rem;
  line-height: 1.4;
}

.site-foot__logo {
  display: block;
  width: 9rem;
  padding: 0.375rem 0;
  line-height: 0;
}

.site-foot__line {
  margin: 0.75rem 0 0;
}

.site-foot__nav {
  display: flex;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.site-foot__nav ul {
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-foot__nav a,
.site-foot__langs a,
.site-foot__langs span {
  display: inline-block;
  padding: 0.6rem 0; /* a line of text, not a box: a long name breaks like a sentence, its arrow with its last word */
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-foot__nav a:hover,
.site-foot__nav a[aria-current='page'],
.site-foot__langs a:hover,
.site-foot__langs span {
  color: var(--white);
}

.site-foot__base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 1rem;
  border-top: var(--hair) solid var(--line);
  font-size: 0.8125rem;
}

.site-foot__base p {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 2.25rem;
  margin: 0;
}

.site-foot__langs a {
  color: var(--dim);
}

@media (max-width: 47.99rem) {
  .site-foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-foot__nav {
    flex-direction: column;
    gap: 0;
  }

  .site-foot__nav a,
  .site-foot__langs a,
  .site-foot__langs span {
    padding: 0.8rem 0; /* a finger's 44 px */
  }
}

/* ══ A TEXT PAGE: its name large, then each section — its name on the left, its text on the right ═════════════════ */
.page__head {
  padding: clamp(2.5rem, 9vh, 6rem) 0 clamp(2.5rem, 8vh, 5rem);
  animation: home-in 0.9s 0.08s var(--ease) backwards;
}

.page__title {
  margin: 0;
  font-size: clamp(2.25rem, 8.6vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.page__lead {
  max-width: 46rem;
  margin: clamp(1.25rem, 3.5vh, 2.25rem) 0 0;
  color: var(--dim);
  font-size: clamp(1.0625rem, 1.7vw, 1.375rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.page__meta {
  margin: 1.5rem 0 0;
  color: var(--dim);
  font-size: 0.8125rem;
}

.page--lost .page__title {
  font-size: clamp(1.75rem, 6vw, 4rem);
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  padding: clamp(2rem, 6vh, 3.5rem) 0;
  border-top: var(--hair) solid var(--line);
}

.row__label {
  margin: 0.25em 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.row__body {
  max-width: 44rem;
}

@media (max-width: 47.99rem) {
  .row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.prose {
  color: var(--soft);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.prose p,
.prose ul,
.prose dl {
  margin: 0 0 1.1em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h3 {
  margin: 2.2em 0 0.5em;
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
}

.prose strong,
.prose dt {
  color: var(--white);
  font-weight: 650;
}

.prose a:not(.btn) {
  color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: var(--hair);
  text-decoration-color: rgb(255 255 255 / 0.5);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s ease;
}

.prose a:not(.btn):hover {
  text-decoration-color: var(--white);
}

.prose ul {
  padding-left: 1.15em;
}

.prose li {
  margin: 0 0 0.6em;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--dim);
}

.prose .actions {
  margin: 1.75rem 0 0;
}

/* A list of what matters: a short white line before each */
.prose .points {
  padding: 0;
  list-style: none;
}

.prose .points li {
  position: relative;
  margin-bottom: 0.9em;
  padding-left: 1.6em;
}

.prose .points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.8em;
  height: var(--hair);
  background: var(--white);
}

/* A name and what it is, line under line (who is responsible; what to write about) */
.facts > div,
.topics > div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.2rem 1.5rem;
  padding: 0.9em 0;
  border-top: var(--hair) solid var(--line);
}

.topics > div {
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
}

.facts > div:first-child,
.topics > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.facts dd,
.topics dd {
  margin: 0;
}

@media (max-width: 36rem) {
  .facts > div,
  .topics > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The contact page: the address is the page */
.mail {
  padding: clamp(2rem, 6vh, 3.5rem) 0 clamp(2.5rem, 8vh, 4.5rem);
  border-top: var(--hair) solid var(--line);
  animation: home-in 0.9s 0.18s var(--ease) backwards;
}

.mail__address {
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding-bottom: 0.08em;
  color: var(--white);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125, 'wght' 800;
  font-size: clamp(1.25rem, 5.1vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 0.06em no-repeat;
  transition: background-size 0.45s var(--ease);
}

/* A finger's 44 px round a line of text 24 px tall */
.mail__address::after {
  content: '';
  position: absolute;
  inset: -0.75rem 0;
}

.mail__address:hover,
.mail__address:focus-visible {
  background-size: 100% 0.06em;
}

/* ══ THE HOME PAGE ════════════════════════════════════════════════════════════════════════════════════════════════
 * The first screen is the header, the film as large as the screen leaves, and its controls. The film opens on black
 * and is the hangar's grey to its border, so on this black page it needs no frame. Its controls sit UNDER it, never
 * over it: the film shows an interface of its own, and nothing of the page's may be mistaken for it. Below the screen,
 * one line of what this is, and where to go.
 */
.statement {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 2rem clamp(2rem, 6vw, 5rem);
  margin-top: clamp(2.5rem, 9vh, 5.5rem);
  padding-top: clamp(2rem, 6vh, 3.5rem);
  border-top: var(--hair) solid var(--line);
}

.statement__line {
  margin: 0;
  font-size: clamp(1.75rem, 4.4vw, 4rem);
  line-height: 1;
  text-wrap: balance;
}

.statement__text {
  max-width: 34rem;
  margin: 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.6;
  text-wrap: pretty;
}

@media (max-width: 52rem) {
  .statement {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── The film and its controls (site/palliser/film.js sets data-state, data-wait, data-poster, data-full, --p, --b) ── */
.film {
  --p: 0; /* played, 0 to 1 */
  --b: 0; /* loaded, 0 to 1 */
  position: relative;
  animation: home-in 1.1s 0.1s var(--ease) backwards;
}

.film__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
}

.film__video,
.film__poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.film__video {
  object-fit: contain;
  background: var(--black);
}

/* The still: only when the film cannot start by itself (the browser refuses, or the visitor is saving data) */
.film__poster {
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.film[data-poster='1'] .film__poster {
  opacity: 1;
}

/* Waiting for the network: a white hairline running along the film's foot */
.film__wait {
  position: absolute;
  inset: auto 0 0;
  height: 0.125rem;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.film__wait::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 30%;
  background: var(--white);
  animation: film-wait 1.15s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.film[data-wait='1'] .film__wait {
  opacity: 1;
  transition-delay: 0.4s; /* a short pause is not worth a signal */
}

@keyframes film-wait {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(334%);
  }
}

.film__big {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(3.75rem, 9vw, 5.5rem);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.9);
  border-radius: 50%;
  background: rgb(0 0 0 / 0.4);
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.film__big[hidden],
.film__bar[hidden],
.film__menu[hidden] {
  display: none;
}

.film__big svg {
  width: 44%;
  height: 44%;
  fill: currentColor;
}

.film__big:hover,
.film__big:focus-visible {
  background: var(--white);
  color: var(--black);
}

.film__big:active {
  transform: scale(0.95);
}

/* The controls: the two round buttons' drawings end on the film's edges (the buttons themselves reach past them) */
.film__bar {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.75rem);
  height: 3.25rem;
  margin: 0 -0.625rem;
}

.film__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.12s ease;
}

.film__btn:hover {
  background: rgb(255 255 255 / 0.14);
}

.film__btn:active {
  transform: scale(0.9);
}

.film__i {
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.film[data-state='playing'] .film__i--pause,
.film[data-state='ended'] .film__i--again,
.film:not([data-state='playing'], [data-state='ended']) .film__i--play,
.film:not([data-full='1']) .film__i--full,
.film[data-full='1'] .film__i--small {
  display: block;
}

.film__seek {
  position: relative;
  flex: 1;
  min-width: 3rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  border-radius: 0.25rem;
}

.film__track {
  position: relative;
  width: 100%;
  height: 0.125rem;
  overflow: hidden;
  border-radius: 0.125rem;
  background: rgb(255 255 255 / 0.2);
  transition: height 0.15s ease;
}

.film__seek:hover .film__track,
.film__seek:focus-within .film__track {
  height: 0.25rem;
}

.film__loaded,
.film__played {
  position: absolute;
  inset: 0;
  transform-origin: left center;
}

.film__loaded {
  background: rgb(255 255 255 / 0.26);
  transform: scaleX(var(--b));
}

.film__played {
  background: var(--white);
  transform: scaleX(var(--p));
}

.film__knob {
  position: absolute;
  left: calc(var(--p) * 100%);
  top: 50%;
  width: 0.75rem;
  height: 0.75rem;
  margin: -0.375rem 0 0 -0.375rem;
  border-radius: 50%;
  background: var(--white);
  transform: scale(0);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.film__seek:hover .film__knob,
.film__seek:focus-within .film__knob {
  transform: scale(1);
}

.film__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.film__time {
  flex: none;
  min-width: 2.25rem;
  text-align: right;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: rgb(255 255 255 / 0.72);
}

/* The quality: what is playing now («AUTO · 4K»), and the list to fix one */
.film__quality {
  position: relative;
  flex: none;
}

.film__chip,
.film__opt {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: 'wdth' 125, 'wght' 800;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
}

.film__chip {
  position: relative;
  min-height: 2.125rem;
  padding: 0 1em;
  border: 1px solid rgb(255 255 255 / 0.4);
  border-radius: 999px;
  background: none;
  color: var(--white);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}

.film__chip::before {
  content: '';
  position: absolute;
  inset: -0.375rem 0; /* a finger's 44 px without a taller pill */
}

.film__chip:hover,
.film__chip[aria-expanded='true'] {
  border-color: var(--white);
  background: var(--white);
  color: var(--black);
}

.film__chip:active {
  transform: scale(0.96);
}

.film__menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.625rem);
  z-index: 3;
  display: grid;
  gap: 0.125rem;
  min-width: 9.5rem;
  padding: 0.375rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 0.875rem;
  background: rgb(10 10 10 / 0.96);
}

.film__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 2.5rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: rgb(255 255 255 / 0.76);
  text-align: left;
}

.film__opt:hover,
.film__opt:focus-visible {
  background: rgb(255 255 255 / 0.12);
  color: var(--white);
}

.film__opt[aria-checked='true'] {
  color: var(--white);
}

.film__opt[aria-checked='true']::after {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--white);
}

.film__btn:focus-visible,
.film__chip:focus-visible,
.film__big:focus-visible,
.film__opt:focus-visible,
.film__seek:has(:focus-visible) {
  outline: 0.125rem solid var(--white);
  outline-offset: 0.1875rem;
}

.film__btn:focus-visible,
.film__big:focus-visible {
  border-radius: 50%;
}

.film__chip:focus-visible {
  border-radius: 999px;
}

.film__opt:focus-visible {
  border-radius: 0.5rem;
}

/* ?film=debug: what the player is doing */
.film__debug {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  z-index: 2;
  margin: 0;
  padding: 0.4rem 0.6rem;
  background: rgb(0 0 0 / 0.62);
  color: var(--white);
  font: 0.75rem/1.45 ui-monospace, 'Cascadia Mono', Consolas, monospace;
  white-space: pre;
  pointer-events: none;
}

/* Full screen: the film alone, its controls over its foot, gone after a moment of stillness */
.film:fullscreen {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: var(--black);
  animation: none;
}

.film:fullscreen .film__stage {
  width: min(100vw, 100vh * 16 / 9);
}

.film:fullscreen .film__bar {
  position: absolute;
  inset: auto 0 0;
  height: auto;
  margin: 0;
  padding: 2rem max(0.75rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0));
  transition: opacity 0.3s ease;
}

.film:fullscreen[data-idle='1'] {
  cursor: none;
}

.film:fullscreen[data-idle='1'] .film__stage {
  cursor: none;
}

.film:fullscreen[data-idle='1'] .film__bar {
  opacity: 0;
  pointer-events: none;
}

/* A phone held upright: the film from edge to edge, the rest on the page's margin */
@media (max-width: 40rem) {
  .film:not(:fullscreen) {
    margin-inline: calc(var(--gutter) * -1);
  }

  .film:not(:fullscreen) .film__bar {
    margin: 0;
    padding: 0 calc(var(--gutter) - 0.625rem);
  }
}
