:root {
  --paper: #f5f0e8;
  --shadow: #0a0807;
  --greeting-start: #e1aa78;
  --greeting-end: #7c5b40;
  --voice-level: 0;
  --headline-size: 84px;
  --intro-bottom: 167px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: #000;
}

body {
  overflow: hidden;
  font-family: "Montserrat", Arial, sans-serif;
}

button {
  font: inherit;
}

.experience {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  color: var(--paper);
  background: #000;
}

.wardrobe {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: calc(100% + 27px);
  height: calc(100% + 31px);
  max-width: none;
  object-fit: cover;
  object-position: center top;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.veil {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 480px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.56) 56%,
    rgba(0, 0, 0, 0.9) 100%
  );
  pointer-events: none;
}

.header {
  position: absolute;
  z-index: 4;
  top: 64px;
  left: 64px;
}

.logo {
  display: block;
  width: 205px;
  height: 39px;
  object-fit: fill;
}

.intro {
  position: absolute;
  z-index: 3;
  bottom: var(--intro-bottom);
  left: 50%;
  width: min(1102px, calc(100vw - 48px));
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.intro h1 {
  margin: 0;
  font-family: "Bodoni 72", "Bodoni 72 Book", Didot, "Cormorant Garamond", "Times New Roman", serif;
  font-size: var(--headline-size);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0;
}

.greeting,
.tailor {
  display: block;
}

.greeting {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  font-style: italic;
  color: transparent;
  background: linear-gradient(90deg, var(--greeting-start) 0%, var(--greeting-end) 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.tailor {
  margin-top: 12px;
  color: var(--paper);
  font-style: normal;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
}

.halo {
  --halo-size: min(801px, 54vw);
  position: absolute;
  z-index: 2;
  top: calc(100% - (var(--halo-size) / 2));
  left: calc(50% - (var(--halo-size) / 2));
  width: var(--halo-size);
  aspect-ratio: 1;
  mix-blend-mode: screen;
  opacity: calc(0.96 + (var(--voice-level) * 0.12));
  transform: scale(calc(1 + (var(--voice-level) * 0.11)));
  transform-origin: 50% 50%;
  pointer-events: none;
  transition: opacity 260ms ease, transform 90ms linear;
}

.halo img,
.voice-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.halo-wash {
  width: 100%;
  opacity: calc(0.4 + (var(--voice-level) * 0.38));
  filter: saturate(calc(1 + (var(--voice-level) * 0.65))) brightness(calc(1 + (var(--voice-level) * 0.3)));
}

.halo-core {
  width: 49.313%;
  opacity: calc(0.9 + (var(--voice-level) * 0.28));
  filter: saturate(calc(1 + (var(--voice-level) * 0.9))) brightness(calc(1 + (var(--voice-level) * 0.38)));
}

.voice-ring {
  width: 48%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 233, 188, calc(0.03 + (var(--voice-level) * 0.26)));
  box-shadow:
    0 0 calc(16px + (var(--voice-level) * 42px)) rgba(234, 171, 93, calc(0.05 + (var(--voice-level) * 0.18))),
    inset 0 0 calc(18px + (var(--voice-level) * 40px)) rgba(191, 151, 255, calc(0.04 + (var(--voice-level) * 0.2)));
  opacity: 0;
}

.experience.is-listening .voice-ring {
  opacity: calc(0.15 + (var(--voice-level) * 0.7));
  animation: voice-ring 1800ms ease-out infinite;
}

.experience.is-listening .voice-ring-b {
  animation-delay: 420ms;
}

.experience.is-listening .voice-ring-c {
  animation-delay: 860ms;
}

.experience.is-listening .halo {
  animation: halo-breathe 2200ms ease-in-out infinite;
}

.experience.is-speaking .halo {
  transition-duration: 40ms;
}

.talk-button {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 21px;
  left: 0;
  width: max-content;
  min-width: 150px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  color: rgba(10, 8, 7, 0.62);
  background: transparent;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
}

.talk-button:hover,
.talk-button:focus-visible,
.experience.is-listening .talk-button {
  color: rgba(10, 8, 7, 0.84);
}

.talk-button:focus-visible {
  outline: 1px solid rgba(245, 240, 232, 0.78);
  outline-offset: 9px;
}

.talk-button:disabled {
  cursor: wait;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes halo-breathe {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(calc(1.06 + (var(--voice-level) * 0.3)));
  }
}

@keyframes voice-ring {
  0% {
    transform: translate(-50%, -50%) scale(calc(0.78 + (var(--voice-level) * 0.16)));
  }

  100% {
    transform: translate(-50%, -50%) scale(calc(1.6 + (var(--voice-level) * 0.52)));
    opacity: 0;
  }
}

@media (max-height: 820px) {
  :root {
    --headline-size: 68px;
    --intro-bottom: 126px;
  }
}

@media (max-width: 980px) {
  :root {
    --headline-size: 64px;
    --intro-bottom: 138px;
  }

  .header {
    top: 40px;
    left: 40px;
  }

  .logo {
    width: 180px;
    height: 34px;
  }

  .halo {
    --halo-size: min(720px, 86vw);
  }
}

@media (max-width: 620px) {
  :root {
    --headline-size: 46px;
    --intro-bottom: 116px;
  }

  .experience {
    min-height: 600px;
  }

  .wardrobe {
    width: 140%;
    object-position: center top;
  }

  .header {
    top: 28px;
    left: 28px;
  }

  .logo {
    width: 150px;
    height: 29px;
  }

  .veil {
    height: 390px;
  }

  .tailor {
    margin-top: 8px;
  }

  .talk-button {
    bottom: 18px;
    font-size: 13px;
  }
}
