@font-face {
  font-family: "IM Fell English";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/IMFellEnglish-Regular.ttf") format("truetype");
  /* Its figures are old style, a 1 reading as a small capital I. */
  unicode-range: U+0-2F, U+3A-10FFFF;
}
@font-face {
  font-family: Literata;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/Literata-Variable.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --display: "IM Fell English", Literata, Georgia, serif;
  --text: Literata, Georgia, serif;
  --ground: #0f0c0a;
  --shade: 12 10 8;
  --ink: #efe6d3;
  --ink-soft: #d9cfba;
  --ink-dim: #a89e8a;
  --brass: #d9a457;
  --brass-deep: #b9853c;
  --line: rgb(217 164 87 / 32%);
  --line-soft: rgb(217 164 87 / 14%);
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1680px;
  --radius: 3px;
  --lift: 0 18px 44px rgb(0 0 0 / 60%);
  --halo: 0 1px 2px rgb(0 0 0 / 90%), 0 0 14px rgb(0 0 0 / 65%);
}

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

html {
  background: var(--ground);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-soft);
  font: 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

h2 {
  font-size: clamp(36px, 4.6vw, 64px);
}

a {
  color: var(--brass);
}

.calls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.call {
  display: inline-block;
  padding: 13px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(20 17 14 / 70%);
  color: var(--ink);
  font: 18px/1.2 var(--display);
  letter-spacing: 0.02em;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition:
    border-color 150ms,
    background 150ms;
}

.call:hover {
  border-color: var(--brass);
  background: rgb(217 164 87 / 14%);
}

.call-main {
  border-color: var(--brass);
  background: linear-gradient(var(--brass), var(--brass-deep));
  color: #1a120a;
}

.call-main:hover {
  background: linear-gradient(#e6b469, var(--brass));
}

.call-small {
  padding: 8px 16px;
  font-size: 16px;
}

/* The bar slides in once the hero has gone by. */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  background: rgb(var(--shade) / 82%);
  backdrop-filter: blur(10px);
  translate: 0 -100%;
  transition: translate 250ms ease;
}

.bar.shown {
  translate: 0 0;
}

.bar-home img {
  display: block;
  width: 200px;
  height: auto;
  image-rendering: pixelated;
}

/* Every reel stands behind its section at full bleed. */
.hero,
.beat,
.scale,
.close {
  position: relative;
  display: grid;
  overflow: hidden;
  isolation: isolate;
}

.hero > video,
.beat > video,
.scale > video,
.close > video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before,
.beat::before,
.scale::before,
.close::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero {
  align-items: end;
  min-height: 100svh;
}

.hero::before {
  background:
    linear-gradient(
      to top,
      var(--ground) 0%,
      rgb(var(--shade) / 70%) 28%,
      transparent 60%
    ),
    linear-gradient(to right, rgb(var(--shade) / 55%), transparent 55%);
}

.hero-body {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 9vh, 112px);
}

/* The wordmark is drawn a texel a pixel and laid at a whole scale of it. */
.wordmark {
  width: 560px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 14px rgb(0 0 0 / 70%));
}

.wordmark.small {
  width: 200px;
}

.tagline {
  max-width: 22em;
  margin: 18px 0 0;
  color: var(--ink);
  font: clamp(26px, 3.4vw, 44px) / 1.2 var(--display);
  text-shadow: var(--halo);
}

.tagline span {
  display: block;
  text-wrap: balance;
}

.lede {
  max-width: 34em;
  margin: 14px 0 30px;
  text-shadow: var(--halo);
}

.platforms {
  margin: 18px 0 0;
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 0.06em;
}

/* A beat: the reel at its own shape, the words over a shade at one foot corner. */
.beat {
  align-items: end;
  height: min(56.25vw, 100svh);
  min-height: 420px;
}

.beat::before {
  background:
    linear-gradient(
      var(--ground),
      transparent 8%,
      transparent 93%,
      var(--ground)
    ),
    linear-gradient(to top, rgb(var(--shade) / 70%), transparent 45%),
    linear-gradient(
      to right,
      rgb(var(--shade) / 80%),
      rgb(var(--shade) / 40%) 30%,
      transparent 55%
    );
}

.beat.flip::before {
  background:
    linear-gradient(
      var(--ground),
      transparent 8%,
      transparent 93%,
      var(--ground)
    ),
    linear-gradient(to top, rgb(var(--shade) / 70%), transparent 45%),
    linear-gradient(
      to left,
      rgb(var(--shade) / 80%),
      rgb(var(--shade) / 40%) 30%,
      transparent 55%
    );
}

.beat-text {
  max-width: 42rem;
  margin: 0 var(--gutter) clamp(36px, 7vw, 104px) clamp(16px, 7vw, 128px);
  text-shadow: var(--halo);
}

.beat.flip .beat-text {
  justify-self: end;
  margin-right: clamp(16px, 7vw, 128px);
  margin-left: var(--gutter);
}

.mark {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  color: var(--brass);
  font: 22px/1 var(--display);
  letter-spacing: 0.12em;
}

.mark::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--brass);
}

.beat-text p:last-child {
  max-width: 31rem;
  margin: 18px 0 0;
  font-size: clamp(17px, 1.3vw, 20px);
}

/* The city from afar, its figures over a shade at the middle. */
.scale {
  place-items: center;
  min-height: 100svh;
  text-align: center;
}

.scale::before {
  background:
    linear-gradient(
      var(--ground),
      transparent 14%,
      transparent 86%,
      var(--ground)
    ),
    radial-gradient(
      ellipse at center,
      rgb(var(--shade) / 78%) 0%,
      rgb(var(--shade) / 45%) 40%,
      transparent 72%
    );
}

.scale-body {
  max-width: 54rem;
  padding: var(--gutter);
  text-shadow: var(--halo);
}

.scale h2,
.close h2 {
  font-size: clamp(42px, 6vw, 88px);
}

.scale-body > p {
  max-width: 32em;
  margin: 18px auto 0;
  font-size: clamp(17px, 1.4vw, 21px);
  text-wrap: balance;
}

.figures {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px clamp(32px, 7vw, 112px);
  margin: 48px 0 0;
}

.figures dt {
  color: var(--brass);
  font: clamp(44px, 5vw, 76px) / 1 var(--display);
}

.figures dd {
  margin: 10px 0 0;
}

/* Run the town: on a wide screen the list beside the picked feature's picture at its size. */
.town,
.gallery {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) var(--gutter) 0;
}

.town > h2,
.gallery > h2 {
  margin-bottom: clamp(28px, 4vw, 48px);
}

.panel-head {
  padding-left: 20px;
  border-left: 2px solid var(--line-soft);
  transition: border-color 150ms;
}

.panel-head h3 button {
  display: block;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--ink-dim);
  font: 23px/1.2 var(--display);
  text-align: start;
  cursor: pointer;
  transition: color 150ms;
}

.panel-head h3 button:hover,
.panel.open h3 button {
  color: var(--ink);
}

.panel-head h3 button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.panel.open .panel-head {
  border-color: var(--brass);
}

.panel-head p {
  margin: 0 0 14px;
  font-size: 16px;
}

.panel-shot img,
.shots img {
  width: 100%;
  height: auto;
  background: var(--ground);
}

.panel-shot img {
  border: 1px solid var(--line-soft);
  box-shadow: var(--lift);
}

@media (min-width: 1100px) {
  .panels {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1280px);
    grid-template-rows: repeat(12, auto) 1fr;
    justify-content: center;
    column-gap: 48px;
  }

  .panel {
    display: contents;
  }

  .panel-head {
    grid-column: 1;
  }

  .panel:not(.open) .panel-head p,
  .panel:not(.open) .panel-shot {
    display: none;
  }

  .panel-shot {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
  }
}

@media (max-width: 1099px) {
  .panel {
    margin-bottom: 44px;
  }

  .panel-head {
    margin-bottom: 14px;
    border-color: var(--brass);
  }

  .panel-head h3 button {
    color: var(--ink);
    cursor: default;
  }
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.shots a:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.shots a {
  overflow: hidden;
}

.shots img {
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: scale 300ms ease;
}

.shots a:hover img {
  scale: 1.03;
}

/* The close: the town's day turning behind the calls. */
.close {
  place-items: center;
  min-height: 100svh;
  margin-top: clamp(80px, 11vw, 160px);
  text-align: center;
}

.close::before {
  background: linear-gradient(
    var(--ground),
    rgb(var(--shade) / 55%) 22%,
    rgb(var(--shade) / 55%) 78%,
    var(--ground)
  );
}

.close-body {
  max-width: 720px;
  padding: var(--gutter);
  text-shadow: var(--halo);
}

.close-body > p {
  margin: 16px auto 36px;
  font-size: clamp(17px, 1.4vw, 21px);
  text-wrap: balance;
}

.close .calls {
  justify-content: center;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 36px var(--gutter) 48px;
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.foot p {
  margin: 0;
}

.foot-links {
  display: flex;
  gap: 24px;
}

.foot-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--brass);
}

.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
}

.viewer[open] {
  display: grid;
  place-items: center;
}

.viewer::backdrop {
  background: rgb(10 8 6 / 92%);
}

.viewer img {
  max-width: 96vw;
  max-height: 92vh;
  border: 1px solid var(--line);
  background: var(--ground);
}

.step {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(20 17 14 / 70%);
  color: var(--ink);
  cursor: pointer;
  translate: 0 -50%;
  backdrop-filter: blur(6px);
  transition:
    border-color 150ms,
    background 150ms;
}

.step:hover {
  border-color: var(--brass);
  background: rgb(217 164 87 / 14%);
}

.step:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.step svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.back {
  left: var(--gutter);
}

.next {
  right: var(--gutter);
}

/* On a phone a beat's reel stands taller, its middle closer, with the words under it. */
@media (max-width: 760px) {
  .wordmark {
    width: 280px;
  }

  .bar-home img {
    width: 32px;
  }

  .bar .call:not(.call-main) {
    display: none;
  }

  .hero::before {
    background: linear-gradient(
      to top,
      var(--ground) 0%,
      rgb(var(--shade) / 80%) 45%,
      rgb(var(--shade) / 20%) 80%
    );
  }

  .beat {
    display: block;
    height: auto;
    min-height: 0;
  }

  .beat > video {
    position: static;
    height: auto;
    aspect-ratio: 4 / 5;
  }

  .beat::before {
    display: none;
  }

  .beat-text,
  .beat.flip .beat-text {
    max-width: none;
    margin: 22px var(--gutter) 56px;
  }

  .shots {
    grid-template-columns: minmax(0, 1fr);
  }

  .shots a:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .foot {
    flex-direction: column;
    text-align: center;
  }

  .viewer[open] {
    grid-template-columns: auto auto;
    place-content: center;
    gap: 16px;
  }

  .viewer img {
    grid-column: 1 / -1;
  }

  .step {
    position: static;
    translate: none;
  }

  .back {
    justify-self: end;
  }

  .next {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bar,
  .shots img {
    transition: none;
  }
}
