/* schwarzblende — one stylesheet for all pages */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0c0b0b;          /* the black everything fades to */
  --cap: #1a1817;          /* lens cap body */
  --cream: #ede4d6;        /* the logo's ink, the only colour */
  --cream-2: #b3aa9e;      /* secondary text, 8:1 on --ink */
  --rule: #6b6159;         /* hairlines: the lens cap's rim */

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --pad-x: clamp(1rem, 3.4vw, 3.25rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --fade-out: 900ms;       /* Schwarzblende: down to black */
  --fade-in: 1300ms;       /* Aufblende: up from black */

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--rule) var(--ink);
}

body {
  margin: 0;
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--cream); color: var(--ink); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
  border-radius: 2px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- bars */

.bar { padding-inline: calc(var(--pad-x) + env(safe-area-inset-left)) calc(var(--pad-x) + env(safe-area-inset-right)); }

.bar--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .9rem 2rem;
  padding-block: calc(clamp(1rem, 3.4vh, 2.25rem) + env(safe-area-inset-top)) clamp(1rem, 3.4vh, 2.25rem);
}

.brand {
  display: block;
  color: var(--cream);
  line-height: 0;
}

.wm {
  display: block;
  height: clamp(15px, .55rem + .95vw, 26px);
  width: auto;
  aspect-ratio: 804 / 100;
  overflow: visible;
}

.who {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .15em .9em;
  font-family: var(--display);
  font-size: clamp(.95rem, .8rem + .4vw, 1.25rem);
  line-height: 1.1;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 400;
}
.who__name { font-weight: 700; }
.who__role { font-weight: 300; }

/* --------------------------------------------------------- home layout */

.home body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(max(15rem, 46svh), 1fr) auto;
}

.frame { position: relative; min-height: 0; }

.reel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
}

.reel__shots {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
}

.shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--fade-out) cubic-bezier(.55, 0, 1, .45),
    visibility 0s var(--fade-out);
}
.shot.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--fade-in) cubic-bezier(0, .55, .45, 1), visibility 0s;
}

.shot picture,
.shot img {
  display: block;
  width: 100%;
  height: 100%;
}

.shot img {
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform-origin: var(--focus, 50% 50%);
}
/* a slow push-in while a shot holds; kept running while it fades out */
.shot.is-active img,
.shot.is-leaving img { animation: push-in 16s linear both; }

@keyframes push-in {
  from { transform: scale(1); }
  to   { transform: scale(1.035); }
}

/* contact: the primary action */

.bar--bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "contact controls"
    "meta    meta";
  align-items: center;
  gap: clamp(.6rem, 1.8vh, 1.1rem) 2rem;
  padding-block: clamp(1.25rem, 3.6vh, 2.5rem) calc(clamp(.6rem, 2vh, 1.4rem) + env(safe-area-inset-bottom));
}
.bar--bottom .contact { grid-area: contact; }
.bar--bottom .reel-controls { grid-area: controls; }
.bar--bottom .meta { grid-area: meta; }

.contact {
  font-style: normal;
  display: flex;
  flex-wrap: wrap;
  gap: .08em .7em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 1.05rem + 3.3vw, 4.4rem);
  line-height: .92;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.contact a {
  text-decoration: underline 2px;
  text-decoration-color: transparent;
  text-underline-offset: .12em;
  transition: text-decoration-color .35s var(--ease-out);
}
.contact a:hover { text-decoration-color: currentColor; }

.reel-controls {
  display: flex;
  align-items: center;
  margin-right: -.75rem; /* optically align the icon, not its tap area */
}
.reel-controls[hidden] { display: none; }

.ctl {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream);
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .25s;
}
.ctl:hover { background-color: rgb(237 228 214 / .09); }
.ctl:active { background-color: rgb(237 228 214 / .16); }

.ctl svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ctl .i-play { fill: currentColor; stroke: none; }
.ctl--toggle .i-play,
.ctl--toggle[data-state="paused"] .i-pause { display: none; }
.ctl--toggle[data-state="paused"] .i-play { display: block; }

.count {
  margin: 0 .3rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
}
.count__of { font-weight: 200; margin-inline: .35em .2em; color: var(--cream-2); }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(.9rem, .82rem + .2vw, 1.05rem);
  line-height: 1.2;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream-2);
}

.meta a {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding-block: .55rem;
  text-decoration: none;
  transition: color .25s;
}
.meta a:hover,
.meta a[aria-current="page"] { color: var(--cream); }
.meta__legal { margin-left: auto; }
.meta__title { font-weight: 300; color: var(--cream); }

.meta svg {
  width: .85em;
  height: .85em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate .3s var(--ease-out);
}
.meta a:hover svg { translate: .12em -.12em; }

/* -------------------------------------------------------------- intro */
/* The page opens capped. JS (site.js) takes the cap off: the wordmark
   travels to the top bar and the frame irises open from the cap's circle. */

.intro { display: none; }

html.capped .intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--ink);
}

.intro__cap {
  position: relative;
  width: min(66vmin, 34rem);
  aspect-ratio: 1;
}

.intro__disc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.intro__wm {
  position: absolute;
  left: 13.52%;
  top: 45.46%;           /* centred: 50% minus half of (72.96% / 8.04) */
  width: 72.96%;
  height: auto;
  aspect-ratio: 804 / 100;
  color: var(--cream);
  transform-origin: 0 0;
  overflow: visible;
}

/* While capped, the opaque overlay hides the page underneath. site.js fades
   the bars' text in once the cap comes off, so it needs no hiding rule here. */
html.capped .reel { clip-path: circle(0 at 50% 50%); }

/* ---------------------------------------------------------- documents */

.page body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.doc {
  padding: clamp(2.5rem, 9vh, 6.5rem) calc(var(--pad-x) + env(safe-area-inset-right)) clamp(3.5rem, 12vh, 8rem) calc(var(--pad-x) + env(safe-area-inset-left));
}

.doc__inner { max-width: 46rem; }

.doc h1 {
  margin: 0 0 clamp(1.75rem, 5vh, 3.25rem);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.75rem, 1.6rem + 3.6vw, 5.25rem);
  line-height: .92;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-wrap: balance;
}

.doc h2 {
  margin: 2.75em 0 .8em;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.05rem + .45vw, 1.5rem);
  line-height: 1.15;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-wrap: balance;
}
.doc h1 + h2 { margin-top: 0; }

.doc h3 {
  margin: 1.8em 0 .5em;
  font-family: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--cream);
}

.doc p,
.doc li,
.doc address {
  max-width: 68ch;
  font-family: var(--text);
  font-style: normal;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--cream-2);
  text-wrap: pretty;
}
.doc p,
.doc address { margin: 0 0 1em; }
.doc ul { margin: 0 0 1em; padding-left: 1.2em; }
.doc li { margin-bottom: .35em; }
.doc li::marker { color: var(--rule); }

.doc strong { color: var(--cream); font-weight: 600; }

.doc a {
  color: var(--cream);
  text-decoration: underline 1px;
  text-decoration-color: rgb(237 228 214 / .4);
  text-underline-offset: .22em;
  transition: text-decoration-color .25s;
  overflow-wrap: anywhere;
}
.doc a:hover { text-decoration-color: currentColor; }

.doc .lead {
  font-size: clamp(1.15rem, 1.05rem + .3vw, 1.3rem);
  color: var(--cream);
}

.doc .updated { margin-top: 3em; font-size: .9375rem; }

/* marks content that still has to be filled in before launch */
.todo {
  background: var(--cream);
  color: var(--ink);
  padding: .05em .3em;
}

.bar--foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2.5rem;
  padding-block: 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
}
.bar--foot .contact { font-size: clamp(1.35rem, 1rem + 1.1vw, 2rem); }

/* -------------------------------------------------------- responsive */

@media (max-width: 47.99rem) {
  .bar--top { align-items: flex-start; flex-direction: column; }
  .who { justify-content: flex-start; flex-direction: column; letter-spacing: .18em; }

  .contact { flex-direction: column; }

  .bar--bottom {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "contact" "controls" "meta";
    gap: .5rem;
  }
  .bar--bottom .reel-controls { margin: 0 0 0 -.75rem; justify-self: start; }
  .meta { gap: 0 1.4rem; }
  .meta__video { flex-basis: 100%; }
  .meta__legal { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .shot.is-active img,
  .shot.is-leaving img { animation: none; }
  :root { --fade-out: 400ms; --fade-in: 500ms; }
}
