@font-face {
  font-family: "Gearz";
  src: url("../fonts/gearz-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Gearz";
  src: url("../fonts/gearz-semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Gearz";
  src: url("../fonts/gearz-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Didot";
  src: url("../fonts/didot-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #e9dbc4;
  --ink: #402824;
  --background: #241e1e;
  --text: #f5e9da;
  --muted: #d0bcb1;
  --line: #ffffff26;
  --serif: "Didot", Georgia, serif;
  --sans: "Gearz", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html { scrollbar-gutter: stable; }

body.viewer-active {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 720ms cubic-bezier(.22, 1, .36, 1) var(--reveal-delay, 0ms),
              transform 720ms cubic-bezier(.22, 1, .36, 1) var(--reveal-delay, 0ms);
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

.reveal:focus-within { opacity: 1; transform: none; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

body:has(.viewer[open]) {
  overflow: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
}

h1, h2, h3, p {
  margin: 0;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  clip-path: inset(0);
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background: var(--background);
  color: var(--paper);
  text-align: center;
}

.hero-video {
  position: fixed;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  opacity: var(--hero-video-opacity, 1);
  object-fit: cover;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgb(18 15 15 / 58%);
  pointer-events: none;
}

.hero-lockup {
  width: min(82vw, calc(min(20vw, 14svh, 8rem) * 3.1));
}

.hero-credits {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65em;
  width: 100%;
  margin-top: 14px;
  color: #f5e9da;
  font: 600 clamp(7px, 1.65vw, 9px)/1.5 var(--sans);
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero h1 {
  width: 3.1em;
  max-width: 100%;
  padding: .12em 0;
  font: 700 min(20vw, 14svh, 8rem)/.78 var(--serif);
  letter-spacing: 0;
  text-align: left;
  color: #f5e9da;
}

.hero-title-line {
  display: block;
  width: max-content;
  transform-origin: left center;
}

/* Give every row the same width, as in the calendar wordmark. */
.hero-title-line:nth-child(1) { transform: scaleX(1.0548); }
.hero-title-line:nth-child(2) { transform: scaleX(1.1393); }
.hero-title-line:nth-child(3) { transform: scaleX(1.0194); }
.hero-title-line:nth-child(4) { transform: scaleX(1.3020); }
.hero-title-line:nth-child(5) { transform: scaleX(1.3939); }

.hero-title-year {
  margin-top: .04em;
}

.hero-scroll {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  transform: translateX(-50%);
  color: var(--paper);
}

.hero-scroll span {
  position: relative;
  width: 1px;
  height: 28px;
  background: currentColor;
  animation: hero-scroll-drift 2.4s ease-in-out infinite;
}

.hero-scroll span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5px;
  width: 10px;
  height: 10px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

@keyframes hero-scroll-drift {
  0%, 100% { opacity: .5; transform: translateY(-4px); }
  50% { opacity: 1; transform: translateY(4px); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.not-found {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background: var(--paper);
  color: var(--ink);
  text-align: center;
}

.not-found-content {
  display: grid;
  justify-items: center;
  gap: 40px;
}

.not-found h1 {
  font: 700 clamp(8rem, 25vw, 20rem)/1.1 var(--serif);
  letter-spacing: 0;
}

.not-found-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px 12px 16px;
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.not-found-home:hover {
  background: var(--background);
}

.not-found-home:focus-visible {
  outline-color: var(--ink);
}

.not-found-home img {
  flex: none;
}

.content-width {
  width: min(100% - 40px, 900px);
  margin-inline: auto;
}

.testimonial {
  display: grid;
  justify-items: center;
  gap: clamp(20px, 3vw, 28px);
  padding-block: clamp(56px, 9vw, 112px) clamp(56px, 8vw, 96px);
  scroll-margin-top: 24px;
  text-align: left;
}

.partners h2 {
  font: 700 clamp(2.75rem, 6vw, 5rem)/1.25 var(--serif);
  letter-spacing: 0;
  text-wrap: balance;
}

.testimonial p {
  width: 100%;
  max-width: 65ch;
  color: var(--text);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.75;
  overflow-wrap: break-word;
}

.gallery {
  padding-bottom: clamp(64px, 10vw, 120px);
}

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

.video-card {
  min-width: 0;
  scroll-margin-block: 20px;
}

.video-preview {
  display: block;
}

.video-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 3px;
  background: var(--video-color);
}

.play-icon {
  display: grid;
  width: clamp(30px, 8vw, 46px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #19131591;
  color: #fff;
  transition: transform 160ms ease, background-color 160ms ease;
}

.play-icon::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-block: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.video-preview:is(:hover, :focus-visible) .play-icon {
  transform: scale(1.1);
  background: #191315cc;
}

.video-title {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--text);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.partners {
  padding-block: clamp(42px, 7vw, 76px);
  border-top: 1px solid var(--line);
  background: #1c1717;
}

.partners h2 {
  margin-bottom: 30px;
  font-size: clamp(2.75rem, 5vw, 4rem);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.partner-logo {
  width: 46px;
  aspect-ratio: 1;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #544340;
}

.partner-grid h3 {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
}

.partner-grid p {
  max-width: 25ch;
  color: var(--muted);
  font-size: 14px;
}

.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  border: 0;
  background: transparent;
  color: var(--text);
}

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

.viewer::backdrop {
  background: transparent;
}

.viewer-shade {
  position: absolute;
  inset: 0;
  background: #120f0f;
}

.viewer-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(100% - 40px, 560px);
  max-height: 100%;
  padding-block: 76px 24px;
}

.viewer-caption {
  flex: none;
  width: 100%;
  text-align: center;
}

.viewer-caption h2 {
  font: 700 clamp(2rem, 5vw, 2.75rem)/1.25 var(--serif);
  letter-spacing: 0;
}

.viewer-caption p {
  max-width: 48ch;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.viewer-video {
  position: relative;
  flex: none;
  overflow: hidden;
  width: min(100%, var(--viewer-video-width, 40vh));
  aspect-ratio: 9 / 16;
  background: var(--video-color);
  border-radius: 12px;
}

.viewer-poster {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.viewer-poster.is-hidden { opacity: 0; }

.viewer-close {
  position: absolute;
  z-index: 1;
  top: max(clamp(16px, 2.5vw, 28px), env(safe-area-inset-top));
  right: max(clamp(16px, 2.5vw, 28px), env(safe-area-inset-right));
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #191315cc;
  color: #fff;
  font: 28px/1 var(--sans);
  cursor: pointer;
}

.viewer-close svg {
  display: block;
  width: 24px;
  height: 24px;
}

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

@media (hover: hover) and (pointer: fine) {
  .video-preview:hover img { transform: scale(1.035); }
  .viewer-close { transition: background-color 180ms ease, transform 180ms ease; }
  .viewer-close:hover { background: #402824; transform: scale(1.06); }
}

@media (max-width: 460px) {
  .partner-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.video-placeholder { position: relative; overflow: hidden; }
.video-placeholder img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; transition: transform 500ms cubic-bezier(.22, 1, .36, 1), opacity 400ms ease; }
.video-placeholder img.poster-loading { opacity: 0; }
.play-icon { position: relative; }
.viewer-player { display: block; width: 100%; height: 100%; object-fit: contain; }
