@font-face {
  font-family: Anton;
  src: url("assets/Anton-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "DM Serif Text";
  src: url("assets/DMSerifText-Italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

:root {
  --unit: calc(100vw / 1923);
  --footer-height: max(16px, calc(36 * var(--unit)));
  color-scheme: dark;
  --background: #151515;
  --orange: #ff7f00;
  --contact-accent: #ff9126;
  background: var(--background);
  color: #fff;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.stage {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--footer-height));
  overflow: hidden;
}

.brand {
  position: absolute;
  top: calc(75 * var(--unit));
  left: calc(97 * var(--unit));
  width: calc(249 * var(--unit));
}

.announcement {
  position: absolute;
  z-index: 1;
  top: calc(296 * var(--unit));
  left: calc(97 * var(--unit));
}

h1 {
  margin: 0;
  font-weight: 400;
}

.headline-main,
.headline-accent {
  display: block;
}

.headline-main {
  position: relative;
  top: -.06em;
  font: 400 calc(99 * var(--unit)) / 1.02 Anton, Impact, sans-serif;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.headline-accent {
  position: relative;
  top: .025em;
  color: var(--orange);
  font: italic 400 calc(191 * var(--unit)) / .79 "DM Serif Text", Georgia, serif;
  letter-spacing: .025em;
}

.intro {
  margin: calc(73 * var(--unit)) 0 0 calc(1 * var(--unit));
  font-size: max(14px, calc(25 * var(--unit)));
  font-weight: 300;
  letter-spacing: .1em;
  line-height: 1.32;
}

.contacts {
  display: grid;
  grid-template-columns: 272fr 298fr;
  gap: calc(26 * var(--unit));
  width: max(355px, calc(598 * var(--unit)));
  margin-top: calc(77 * var(--unit));
  font-size: max(13px, calc(22 * var(--unit)));
  font-style: normal;
  letter-spacing: .1em;
  line-height: 1.27;
}

.contacts a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: max(44px, calc(83 * var(--unit)));
  padding: .3em;
  border: max(.6px, calc(1 * var(--unit))) solid var(--orange);
  color: inherit;
  text-decoration: none;
}

.contacts a:hover { background: #ff7f001a; }
.contacts a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.contacts span { color: var(--contact-accent); }

.contacts .email {
  grid-column: 1 / -1;
  min-height: max(44px, calc(61 * var(--unit)));
  letter-spacing: .15em;
  overflow-wrap: anywhere;
}

.illustration {
  position: absolute;
  inset: auto 0 0;
  height: calc(1044 * var(--unit));
  margin: 0;
  background: radial-gradient(ellipse calc(481 * var(--unit)) calc(377 * var(--unit)) at 71% 57.5%, #3d2112, transparent);
}

.illustration img {
  position: absolute;
  bottom: calc(-27 * var(--unit));
  left: calc(1025 * var(--unit));
  width: calc(678 * var(--unit));
}

figcaption {
  position: absolute;
  right: calc(99 * var(--unit));
  bottom: calc(69 * var(--unit));
  color: #959595;
  font: italic max(12px, calc(18 * var(--unit))) "DM Serif Text", Georgia, serif;
}

figcaption em { color: var(--orange); }

footer {
  background: var(--orange);
  overflow: hidden;
}

.footer-strip {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: var(--footer-height);
  margin: 0;
  font: max(10px, calc(20 * var(--unit))) / 1 Anton, Impact, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.footer-cycle {
  --word-gap: max(12px, calc(28 * var(--unit)));
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  min-width: 100vw;
  gap: var(--word-gap);
  padding-inline-end: var(--word-gap);
}

@keyframes footer-scroll {
  to { transform: translateX(-50%); }
}

@keyframes page-entrance {
  from {
    opacity: 0;
    translate: 0 var(--entrance-distance, 12px);
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .footer-strip { animation: footer-scroll 32s linear infinite; }

  .brand,
  .headline-main,
  .headline-accent,
  .intro,
  .contacts,
  .illustration img,
  figcaption {
    animation: page-entrance var(--entrance-duration, 560ms)
      cubic-bezier(.2, .65, .3, 1) var(--entrance-delay, 0ms) backwards;
  }

  .headline-main { --entrance-delay: 80ms; }
  .headline-accent { --entrance-delay: 160ms; }
  .intro { --entrance-delay: 240ms; }
  .contacts { --entrance-delay: 300ms; }
  .contacts:focus-within { animation: none; }

  .illustration img {
    --entrance-distance: 18px;
    --entrance-duration: 820ms;
    --entrance-delay: 100ms;
  }

  figcaption { --entrance-delay: 360ms; }
}

/* Fit the XD artboard inside the desktop viewport, including the marquee. */
@media (width > 1000px) {
  :root {
    --unit: min(100vw / 1923, 100svh / 1080, (100svh - 16px) / 1044);
  }

  .stage {
    width: calc(1923 * var(--unit));
    margin-inline: auto;
  }
}

@media (width > 1000px) and (max-height: 560px) {
  .intro {
    margin-top: calc(42 * var(--unit));
    font-size: max(12px, calc(25 * var(--unit)));
  }

  .contacts {
    margin-top: calc(42 * var(--unit));
    width: max(310px, calc(598 * var(--unit)));
    font-size: max(11px, calc(22 * var(--unit)));
  }

  .contacts a { min-height: max(34px, calc(83 * var(--unit))); }
  .contacts .email { min-height: max(26px, calc(61 * var(--unit))); }
}

@media (width > 1000px) and (max-height: 390px) {
  .intro,
  .contacts { margin-top: calc(24 * var(--unit)); }

  .contacts { --entrance-distance: 4px; }
}

@media (max-width: 1000px) {
  .stage {
    display: grid;
    justify-items: center;
    gap: clamp(32px, 7vw, 58px);
    padding: clamp(28px, 6vw, 54px) clamp(18px, 6vw, 48px) 0;
    min-height: auto;
  }

  .brand, .announcement, .illustration { position: relative; inset: auto; }
  .brand, .announcement { width: min(100%, 520px); }
  .brand img { width: clamp(120px, 23vw, 164px); }
  .announcement { container-type: inline-size; }
  .headline-main { font-size: 12cqi; }
  .headline-accent { font-size: 23.4cqi; }

  .intro {
    margin: 24px 0 0;
    font-size: clamp(14px, 2.5vw, 17px);
    line-height: 1.5;
  }

  .contacts {
    width: min(100%, 440px);
    margin-top: 24px;
    gap: 10px;
  }

  .contacts a {
    min-height: 54px;
    padding: 7px 4px;
    letter-spacing: .06em;
  }

  .contacts .email { letter-spacing: .08em; }

  .illustration {
    width: min(100%, 520px);
    height: auto;
    background: radial-gradient(ellipse at 53% 53%, #3d2112, transparent 67%);
    text-align: right;
  }

  .illustration img {
    position: static;
    width: min(100%, 370px);
    margin-inline: auto;
  }

  figcaption {
    position: static;
    padding-bottom: 14px;
    font-size: 14px;
  }
}
