:root {
  --font-display: "Gespenst", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-editorial: "Baskervville", Georgia, serif;

  --color-cream: #f1ece2;
  --color-paper: #f8f5ee;
  --color-blue: #79a8ba;
  --color-blue-light: #a9c9d3;
  --color-orange: #c6531c;
  --color-orange-deep: #8f3005;
  --color-orange-bright: #e26b2d;
  --color-ink: #171714;
  --color-muted: #6f6b63;

  --page-gutter: clamp(1rem, 3vw, 3rem);
  --section-space: clamp(5.5rem, 10vw, 10rem);
  --header-top-offset: 0.75rem;
  --header-row-height: 4.5rem;
  --header-box-height: 4.5rem;
  --content-width: 92rem;

  --font-small: clamp(0.72rem, 0.68rem + 0.2vw, 0.84rem);
  --font-body: clamp(1rem, 0.92rem + 0.35vw, 1.22rem);
  --font-medium: clamp(1.35rem, 1.05rem + 1.3vw, 2.3rem);
  --font-large: clamp(2.75rem, 1.4rem + 6vw, 7rem);
  --font-extreme: clamp(4.6rem, 2rem + 12vw, 13rem);
}

html {
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  background: var(--color-cream);
  color: var(--color-ink);
  scroll-behavior: smooth;
}

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

body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--font-body);
  font-variant-numeric: lining-nums tabular-nums;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
h4,
figure,
blockquote {
  margin: 0;
}

p {
  line-height: 1.5;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--color-orange);
  color: #000;
}

:focus-visible {
  outline: 3px solid var(--color-paper);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--color-ink);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  transform: translateY(-180%);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

#content {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding-top: calc(var(--header-box-height) + (var(--header-top-offset) * 2));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-top: calc(var(--header-box-height) + (var(--header-top-offset) * 3));
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition: opacity 300ms ease;
  scroll-behavior: smooth;
}

#content::-webkit-scrollbar {
  display: none;
}

.home #content {
  padding-top: 0;
}

.js body.is-loading #content {
  opacity: 0;
}

body.is-ready #content {
  opacity: 1;
}

section,
article {
  scroll-margin-top: 0;
}

.section-inner {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--font-small);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  width: 1.65rem;
  height: 2px;
  background: currentColor;
  content: "";
}

.button-link {
  display: inline-flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid currentColor;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0px;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button-link .button-link__arrow {
  font-size: 1.15em;
  transition: transform 180ms ease;
}

.text-link {
  border-bottom: 1px solid currentColor;
}

@media (hover: hover) and (pointer: fine) {
  html,
  html * {
    cursor: none !important;
  }

  /* Native video controls live in a browser shadow tree and need an explicit override. */
  html video,
  html video::-webkit-media-controls,
  html video::-webkit-media-controls-enclosure,
  html video::-webkit-media-controls-panel,
  html video::-webkit-media-controls-play-button,
  html video::-webkit-media-controls-timeline,
  html video::-webkit-media-controls-current-time-display,
  html video::-webkit-media-controls-time-remaining-display,
  html video::-webkit-media-controls-mute-button,
  html video::-webkit-media-controls-volume-slider,
  html video::-webkit-media-controls-fullscreen-button {
    cursor: none !important;
  }

  .custom-cursor {
    position: fixed;
    top: var(--cursor-y, -100px);
    left: var(--cursor-x, -100px);
    z-index: 1000;
    width: 1.45rem;
    height: 1.45rem;
    border: 3px solid var(--color-blue);
    border-radius: 50%;
    background: var(--color-orange);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 150ms ease, height 150ms ease, border-radius 150ms ease, opacity 150ms ease, background-color 150ms ease, border-color 150ms ease;
  }

  .custom-cursor.is-visible {
    opacity: 1;
  }

  .custom-cursor.is-video-playing-idle {
    opacity: 0 !important;
  }

  .custom-cursor.is-text {
    width: 0.5rem;
    height: 1.65rem;
    border-radius: 0.1rem;
  }
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Legal and utility pages */

.legal-page #content {
  background: var(--color-paper);
}

.legal {
  width: min(100%, 56rem);
  margin-inline: auto;
  padding: var(--section-space) var(--page-gutter);
}

.legal .eyebrow {
  margin-bottom: 2rem;
  color: var(--color-orange-deep);
}

.legal h1 {
  max-width: 9ch;
  margin-bottom: clamp(3rem, 7vw, 6rem);
  font-size: var(--font-large);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.legal h2 {
  margin-bottom: 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal section {
  display: grid;
  padding-block: 1.8rem;
  grid-template-columns: minmax(10rem, 0.8fr) 2fr;
  gap: 2rem;
  border-top: 1px solid rgba(23, 23, 20, 0.35);
}

.legal section > h2 {
  grid-column: 1;
  grid-row: 1;
}

.legal section > :not(h2) {
  grid-column: 2;
}

.legal section p,
.legal section li {
  font-size: 1rem;
  line-height: 1.65;
}

.legal section ul {
  padding-left: 1.2rem;
}

.legal-notice {
  margin-bottom: 3rem;
  padding: 1.2rem;
  border: 2px solid var(--color-orange);
  background: rgba(198, 83, 28, 0.08);
  font-size: 0.95rem;
  line-height: 1.55;
}

.utility-page {
  display: grid;
  min-height: calc(100vh - var(--header-box-height));
  min-height: calc(100dvh - var(--header-box-height));
  overflow: auto;
  place-items: center;
  padding: var(--page-gutter);
  background: var(--color-blue);
}

.utility-card {
  width: min(100%, 48rem);
  border: 1px solid var(--color-ink);
  background: var(--color-cream);
  padding: clamp(2rem, 6vw, 5rem);
}

.utility-card h1 {
  color: var(--color-orange);
  font-size: var(--font-extreme);
  font-weight: 900;
  line-height: 0.7;
  letter-spacing: -0.06em;
}

.utility-card p {
  max-width: 34rem;
  margin-block: 3rem;
}

@media (hover: hover) {
  .button-link:hover {
    transform: scale(0.92);
    background: var(--color-orange);
    border-color: var(--color-ink);
    color: var(--color-ink);
  }

  .button-link:hover > span {
    color: var(--color-ink);
  }

  .button-link:hover .button-link__arrow {
    transform: none;
  }

  .text-link:hover {
    color: var(--color-orange-deep);
  }
}

@media (max-width: 800px) {
  :root {
    --header-top-offset: 0.55rem;
    --header-row-height: 4rem;
    --header-box-height: 4rem;
  }

  .legal section {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .legal section > h2,
  .legal section > :not(h2) {
    grid-column: 1;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
