:root {
  color-scheme: dark;
  --px: 50%;
  --py: 50%;
  --camera-x: 0px;
  --camera-y: 0px;
  --camera-horizon-y: 0px;
  --camera-rx: 0deg;
  --camera-ry: 0deg;
  --scene-light: 0;
  --ambient-smoke-alpha: .06;
  --wordmark-bright: .9;
  --wordmark-glow-blur: 4px;
  --wordmark-glow-alpha: .08;
  --scene-sheen-y: 80%;
  --pressure: 0;
  --heat-opacity: .14;
  --heat-scale: .82;
  --heat-blur: 1px;
  --pointer-opacity: .08;
  --safe-vh: 100vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #020201;
}

body {
  position: fixed;
  inset: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Black", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.experience {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100vw;
  height: var(--safe-vh);
  overflow: hidden;
  isolation: isolate;
  cursor: crosshair;
  touch-action: none;
  background:
    radial-gradient(ellipse at 50% 106%, rgba(141, 30, 0, .29), transparent 40%),
    radial-gradient(ellipse at 50% 48%, rgba(75 15 0 / var(--ambient-smoke-alpha)), transparent 55%),
    linear-gradient(180deg, #010101 0%, #040302 63%, #0a0301 100%);
  outline: 0;
}

.experience::before {
  content: "";
  position: absolute;
  z-index: 7;
  inset: -14%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 25%, rgba(0, 0, 0, .16) 52%, rgba(0, 0, 0, .88) 91%),
    linear-gradient(180deg, rgba(0, 0, 0, .64), transparent 25%, transparent 70%, rgba(0, 0, 0, .27));
  mix-blend-mode: multiply;
}

.experience::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 13vmax rgba(0, 0, 0, .93),
    inset 0 0 3vmax rgba(0, 0, 0, .52);
}

.canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.canvas--back {
  z-index: 1;
}

.canvas--front {
  z-index: 5;
}

.horizon {
  position: absolute;
  z-index: 2;
  left: -5%;
  right: -5%;
  bottom: -11%;
  height: 31%;
  opacity: 0;
  pointer-events: none;
  filter: blur(8px) saturate(1.45);
  transform: translate3d(var(--camera-x), var(--camera-horizon-y), 0);
  transition: opacity 1.4s ease;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 68, 0, .44), transparent 57%),
    radial-gradient(ellipse at 45% 83%, rgba(255, 195, 62, .22), transparent 30%),
    radial-gradient(ellipse at 58% 86%, rgba(206, 28, 0, .27), transparent 37%);
  mix-blend-mode: screen;
}

.is-lit .horizon {
  opacity: .9;
}

.horizon i {
  position: absolute;
  bottom: 7%;
  width: 23%;
  height: 112%;
  border-radius: 50% 50% 42% 42%;
  transform-origin: 50% 100%;
  background:
    radial-gradient(ellipse at 50% 90%, rgba(255, 226, 119, .77), rgba(255, 76, 0, .25) 31%, transparent 70%);
  mix-blend-mode: screen;
  animation: ghost-flame 2.7s ease-in-out infinite alternate;
}

.horizon i:nth-child(1) { left: 7%; animation-delay: -.7s; transform: rotate(-9deg) scale(.8, 1.1); }
.horizon i:nth-child(2) { left: 26%; animation-delay: -1.9s; transform: rotate(5deg) scale(1.25, .9); }
.horizon i:nth-child(3) { left: 44%; animation-delay: -.2s; transform: rotate(-2deg) scale(.92, 1.35); }
.horizon i:nth-child(4) { left: 62%; animation-delay: -2.3s; transform: rotate(8deg) scale(1.12, 1); }
.horizon i:nth-child(5) { left: 79%; animation-delay: -1.2s; transform: rotate(-7deg) scale(.78, 1.17); }

@keyframes ghost-flame {
  0% { opacity: .11; translate: 0 5%; scale: 1 .84; }
  45% { opacity: .3; translate: 2% -4%; scale: .85 1.12; }
  100% { opacity: .16; translate: -3% -10%; scale: 1.08 .96; }
}

.wordmark {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(92vw, 1640px);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
  transform:
    translate3d(calc(-50% + var(--camera-x)), calc(-52% + var(--camera-y)), 0)
    perspective(1100px)
    rotateX(var(--camera-rx))
    rotateY(var(--camera-ry));
  filter:
    drop-shadow(0 1.4rem 1.8rem rgba(0, 0, 0, .97))
    brightness(var(--wordmark-bright));
  transform-style: preserve-3d;
  transition: filter 80ms linear;
}

.wordmark::before,
.wordmark::after {
  content: "";
  position: absolute;
  left: 1.1%;
  right: 0;
  height: 1px;
  pointer-events: none;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, transparent, #4b1604 8%, #fff0bb 51%, #a52a05 82%, transparent);
  box-shadow: 0 0 14px #ff4a00, 0 0 34px rgba(255, 75, 0, .5);
}

.wordmark::before { top: -5%; }
.wordmark::after { bottom: -6%; transform-origin: 100% 50%; }

.is-awake .wordmark::before {
  animation: line-strike 1.35s 1.05s cubic-bezier(.18, .9, .14, 1) both;
}

.is-awake .wordmark::after {
  animation: line-strike 1.6s 1.52s cubic-bezier(.18, .9, .14, 1) both reverse;
}

@keyframes line-strike {
  0% { opacity: 0; transform: scaleX(0); }
  16% { opacity: 1; }
  70% { opacity: .78; transform: scaleX(1); }
  100% { opacity: .18; transform: scaleX(1); }
}

.wordmark__line {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  white-space: nowrap;
  color: #130e0b;
  opacity: 0;
  transform: translateY(24px) scaleY(.92);
  transform-origin: center;
  -webkit-text-stroke: clamp(1px, .04em, 3px) rgba(188, 128, 88, .82);
  text-shadow:
    0 -1px 0 rgba(255, 224, 172, .38),
    0 2px 0 #2b160d,
    0 5px 0 #100906,
    0 9px 0 #040302,
    0 12px 16px rgba(0, 0, 0, .96),
    0 0 var(--wordmark-glow-blur) rgba(255 83 9 / var(--wordmark-glow-alpha));
}

.wordmark__line--department {
  justify-content: space-between;
  font-size: clamp(4rem, 10.25vw, 12.5rem);
  line-height: .73;
  letter-spacing: -.055em;
  font-stretch: condensed;
}

.wordmark__line--fire {
  justify-content: flex-end;
  margin-top: clamp(1.15rem, 3.3vw, 4rem);
  padding-right: .45%;
  font-size: clamp(3.2rem, 7.2vw, 8.7rem);
  line-height: .68;
  letter-spacing: .035em;
}

.is-awake .wordmark__line--department {
  animation: title-reveal 1.7s .72s cubic-bezier(.16, 1, .22, 1) both;
}

.is-awake .wordmark__line--fire {
  animation: title-reveal 1.5s 1.05s cubic-bezier(.16, 1, .22, 1) both;
}

@keyframes title-reveal {
  0% { opacity: 0; filter: blur(14px) brightness(3.3); transform: translateY(28px) scaleY(.72); }
  18% { opacity: .15; }
  42% { opacity: 1; filter: blur(1.2px) brightness(1.8); }
  72% { filter: blur(0) brightness(1.08); transform: translateY(0) scaleY(1.045); }
  100% { opacity: 1; filter: blur(0) brightness(1); transform: translateY(0) scaleY(1); }
}

.char {
  --hot: 0;
  --lift: 0px;
  --turn: 0deg;
  --lean: -1.1deg;
  --scale-y: 1;
  --hot-z: 0px;
  --hot-position: 96%;
  --hot-bright: .72;
  --hot-saturate: .72;
  --hot-alpha: 0;
  --hot-blur-a: 6px;
  --hot-blur-b: 18px;
  --char-sheen: .17;
  --hot-reflect-x: 120%;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image:
    linear-gradient(
      102deg,
      #090706 0%,
      #39241a 15%,
      #b18464 29%,
      #2b1b13 40%,
      #ead0aa 50%,
      #483024 57%,
      #100b08 76%,
      #72513b 90%,
      #120c08 100%
    );
  background-size: 260% 100%;
  background-position: var(--hot-position) center;
  transform: translate3d(0, var(--lift), var(--hot-z)) rotateY(var(--turn)) skewX(var(--lean)) scaleY(var(--scale-y));
  transform-style: preserve-3d;
  transition: transform 85ms linear, filter 85ms linear;
  filter:
    brightness(var(--hot-bright))
    saturate(var(--hot-saturate));
}

.char:nth-child(3n + 1) { --lean: -2.15deg; --scale-y: 1.025; }
.char:nth-child(3n + 2) { --lean: .7deg; --scale-y: .975; }
.char:nth-child(5n) { --lean: 1.45deg; --scale-y: 1.035; }

.char::before {
  content: attr(data-char);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: transparent;
  -webkit-text-stroke: .025em rgba(255 75 4 / var(--hot-alpha));
  text-shadow:
    0 0 var(--hot-blur-a) rgba(255 70 0 / var(--hot-alpha)),
    0 0 var(--hot-blur-b) rgba(197 25 0 / var(--hot-alpha));
}

.char::after {
  content: attr(data-char);
  position: absolute;
  inset: 0;
  color: transparent;
  opacity: var(--char-sheen);
  -webkit-background-clip: text;
  background-clip: text;
  background-image:
    linear-gradient(174deg, transparent 18%, rgba(255,255,255,.8) 34%, rgba(255,167,56,.75) 38%, transparent 48%),
    linear-gradient(90deg, transparent 0 46%, rgba(255, 59, 0, .95) 49%, #fff2c4 50%, rgba(255, 67, 0, .82) 51%, transparent 54%);
  background-size: 100% 240%, 310% 100%;
  background-position: center var(--scene-sheen-y), var(--hot-reflect-x) center;
  mix-blend-mode: screen;
}

.char--space {
  width: .31em;
}

.heat {
  position: absolute;
  z-index: 4;
  left: var(--px);
  top: var(--py);
  width: clamp(130px, 18vw, 270px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: var(--heat-opacity);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(var(--heat-scale));
  backdrop-filter: blur(var(--heat-blur)) contrast(1.07) saturate(1.18);
  -webkit-backdrop-filter: blur(var(--heat-blur)) contrast(1.07) saturate(1.18);
  mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.7) 35%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.7) 35%, transparent 72%);
}

.pointer-light {
  position: absolute;
  z-index: 2;
  left: var(--px);
  top: var(--py);
  width: min(70vw, 760px);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: var(--pointer-opacity);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 218, 153, .36) 0, rgba(255, 88, 9, .13) 11%, rgba(110, 19, 0, .04) 31%, transparent 66%);
  mix-blend-mode: screen;
}

.grain {
  position: absolute;
  z-index: 6;
  inset: -8%;
  width: 116%;
  height: 116%;
  opacity: .105;
  pointer-events: none;
  image-rendering: pixelated;
  mix-blend-mode: soft-light;
  animation: grain-jump .22s steps(2, end) infinite;
}

@keyframes grain-jump {
  0% { transform: translate3d(-2%, -3%, 0) scale(1.06); }
  33% { transform: translate3d(2%, 1%, 0) scale(1.04); }
  66% { transform: translate3d(-1%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(3%, -1%, 0) scale(1.05); }
}

.aperture {
  position: absolute;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  background: #000;
  opacity: 1;
  animation: aperture-open 2.7s .08s cubic-bezier(.43, 0, .16, 1) forwards;
}

@keyframes aperture-open {
  0%, 9% { opacity: 1; }
  24% { opacity: .97; }
  44% { opacity: .77; }
  71% { opacity: .2; }
  100% { opacity: 0; }
}

.flash {
  position: absolute;
  z-index: 9;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--impact-x, 50%) var(--impact-y, 50%), #fff 0, #fff2b7 2.5%, rgba(255, 95, 11, .91) 7%, rgba(166, 22, 0, .26) 20%, transparent 50%);
  mix-blend-mode: screen;
}

.flash.is-flashing {
  animation: flash-impact .46s cubic-bezier(.12, .65, .14, 1) forwards;
}

@keyframes flash-impact {
  0% { opacity: 0; filter: brightness(1); transform: scale(.75); }
  8% { opacity: 1; filter: brightness(2.5); transform: scale(.96); }
  28% { opacity: .7; filter: brightness(1.35); transform: scale(1.04); }
  100% { opacity: 0; filter: brightness(1); transform: scale(1.15); }
}

.experience.is-exiting .wordmark {
  animation: exit-wordmark .48s cubic-bezier(.2, .8, .15, 1) forwards;
}

.experience.is-exiting::before {
  animation: exit-vignette .46s ease-in forwards;
}

@keyframes exit-wordmark {
  0% { filter: brightness(1); transform: translate3d(calc(-50% + var(--camera-x)), calc(-52% + var(--camera-y)), 0) scale(1); }
  24% { filter: brightness(4) saturate(1.7); transform: translate3d(calc(-50% + var(--camera-x)), calc(-52% + var(--camera-y)), 0) scale(1.018); }
  100% { filter: brightness(8) saturate(0); transform: translate3d(calc(-50% + var(--camera-x)), calc(-52% + var(--camera-y)), 0) scale(1.09); opacity: 0; }
}

@keyframes exit-vignette {
  to { background-color: rgba(0, 0, 0, .78); }
}

.experience:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(255, 177, 96, .66), inset 0 0 36px rgba(255, 74, 0, .12);
}

@media (max-width: 760px) {
  .wordmark {
    width: 91vw;
    transform: translate3d(calc(-50% + var(--camera-x)), calc(-54% + var(--camera-y)), 0);
  }

  .wordmark__line--department {
    font-size: 14.25vw;
    letter-spacing: -.068em;
    line-height: .78;
  }

  .wordmark__line--fire {
    margin-top: 7.2vw;
    padding-right: 1%;
    font-size: 15.7vw;
    line-height: .7;
    letter-spacing: .005em;
  }

  .horizon {
    bottom: -5%;
    height: 27%;
    filter: blur(5px) saturate(1.35);
  }

  .pointer-light {
    width: 110vw;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .wordmark {
    width: 78vw;
    transform: translate3d(calc(-50% + var(--camera-x)), calc(-50% + var(--camera-y)), 0);
  }

  .wordmark__line--department { font-size: 8.1vw; }
  .wordmark__line--fire { margin-top: 2.8vw; font-size: 6vw; }
  .horizon { height: 35%; bottom: -15%; }
}

@media (prefers-reduced-motion: reduce) {
  .horizon i,
  .grain,
  .aperture {
    animation-duration: 1ms;
    animation-iteration-count: 1;
  }

  .aperture { opacity: 0; }

  .wordmark,
  .char,
  .heat,
  .pointer-light {
    transition-duration: 180ms;
  }

  .is-awake .wordmark__line--department,
  .is-awake .wordmark__line--fire {
    animation-duration: .8s;
    animation-delay: .05s;
  }

  .is-awake .wordmark::before,
  .is-awake .wordmark::after {
    animation-duration: .8s;
    animation-delay: .15s;
  }
}
