@font-face {
  font-family: "Manrope UI";
  src: url("./manrope-ui.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./geist-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  background-color: var(--chrome-color);
  --chrome-color: #292831;
  --edge: clamp(16px, 3vw, 42px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  height: 100vh;
  height: 100dvh;
}

.background {
  position: fixed;
  inset: 0;
  min-height: 100lvh;
  pointer-events: none;
  background: var(--chrome-color) url("./prismatic-still.webp") center / cover no-repeat;
}

.background canvas {
  display: block;
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.background.is-rendering canvas { visibility: visible; }

/* Match the browser tint at the visible edge while the artwork spans the largest viewport. */
@media (pointer: coarse), (max-width: 540px), (max-width: 950px) and (max-height: 500px) {
  .background::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 100vh;
    height: 100dvh;
    background:
      linear-gradient(to bottom, var(--chrome-color), transparent) top / 100% clamp(16px, 5dvh, 42px) no-repeat,
      linear-gradient(to top, var(--chrome-color), transparent) bottom / 100% clamp(24px, 7dvh, 64px) no-repeat,
      linear-gradient(to right, var(--chrome-color), transparent) left / var(--safe-left) 100% no-repeat,
      linear-gradient(to left, var(--chrome-color), transparent) right / var(--safe-right) 100% no-repeat;
  }
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.desktop-menu button,
footer {
  font-family: "Manrope UI", Manrope, Arial, sans-serif;
  color: #fff;
  font-size: 12.1px;
  font-weight: 600;
  letter-spacing: .15em;
  line-height: 1;
}

.desktop-actions {
  position: absolute;
  z-index: 2;
  top: var(--edge);
  right: var(--edge);
  pointer-events: auto;
  --glass-face: radial-gradient(ellipse at 24% 5%, #eee0ff58, transparent 58%),
    linear-gradient(140deg, #bba3df3a, #22193662 46%, #242f3b56 65%, #93ffda3b);
}

.desktop-menu-toggle,
.desktop-menu button {
  border: 1px solid #e3ddff76;
  color: #fff;
  background: var(--glass-face);
  -webkit-backdrop-filter: blur(16px) saturate(1.35) brightness(.75);
  backdrop-filter: blur(16px) saturate(1.35) brightness(.75);
  box-shadow: inset 0 1px #ffffff65, inset 0 -1px #99f0e956, 0 4px 14px #13112238;
}

.desktop-menu-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  transition: box-shadow 240ms ease;
}

.desktop-menu-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  transition: transform 420ms cubic-bezier(.24, 1.45, .42, 1);
}

.desktop-menu-icon::before,
.desktop-menu-icon::after {
  content: "";
  grid-area: 1 / 1;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.desktop-menu-icon::after { transform: rotate(90deg); }
.desktop-menu-toggle[aria-expanded="true"] .desktop-menu-icon { transform: rotate(45deg); }

.desktop-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  justify-items: end;
  gap: 7px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 260ms;
}

.desktop-menu-toggle[aria-expanded="true"] + .desktop-menu {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.desktop-menu button {
  font-weight: 540;
  min-width: 105px;
  min-height: 44px;
  padding: 0 14px;
  text-transform: uppercase;
  border-radius: 999px;
  opacity: 0;
  transform-origin: right top;
  transform: translate(10px, -19px) scale(.76);
  transition: transform 260ms cubic-bezier(.4, 0, .4, 1), opacity 180ms ease, box-shadow 240ms ease;
}

.desktop-menu-toggle[aria-expanded="true"] + .desktop-menu button {
  opacity: 1;
  transform: none;
  transition: transform 460ms cubic-bezier(.2, 1.48, .38, 1), opacity 220ms ease, box-shadow 240ms ease;
}

.desktop-menu-toggle[aria-expanded="true"] + .desktop-menu button + button {
  transition-delay: 50ms, 50ms, 0s;
}

.desktop-menu-toggle:hover,
.desktop-menu button:hover {
  box-shadow: inset 0 1px #fffd, inset 0 -1px #abffe4a6, 0 0 15px #b1a0f460;
}

@media (prefers-reduced-motion: reduce) {
  .desktop-menu-toggle, .desktop-menu-icon, .desktop-menu, .desktop-menu button {
    transition: none !important;
  }
}

footer {
  position: absolute;
  font-weight: 500;
  letter-spacing: .025em;
  bottom: var(--edge);
  left: var(--edge);
  line-height: 1.25;
  white-space: nowrap;
}

footer strong { font-weight: 700; }

dialog {
  color: inherit;
  padding: 0;
  inset: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  width: min(440px, calc(100% - var(--safe-left) - var(--safe-right) - 32px));
  max-width: none;
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px);
  overflow: auto;
  border: 1px solid #ffffff59;
  background: linear-gradient(120deg, #57397c6e, #11212b9e 49%, #51312d82), #0c0c10a6;
  box-shadow: inset 0 1px #ffffff26, 0 20px 80px #0008;
  backdrop-filter: blur(28px) saturate(150%);
}

dialog[open] { animation: ticket-in 200ms ease-out; }
dialog::backdrop { background: #0005; }

.ticket-content {
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(12px, 4dvh, 20px);
  padding: 56px 14px clamp(16px, 5dvh, 32px);
}

.close {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 22px;
}

.email {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: clamp(15px, 4.5vw, 23px);
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}
.email:hover { text-decoration: underline; text-underline-offset: 4px; }

.copy {
  position: relative;
  overflow: hidden;
  min-width: 94px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #ffffff67;
  background: #ffffff13;
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.copy.copied::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, #fff8 50%, transparent 80%);
  animation: reflection 520ms ease-out both;
  pointer-events: none;
}

.copy-status:empty { display: none; }
.copy-status { font-size: 12px; text-align: center; }
:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
.close:focus { outline-offset: -5px; }

@keyframes ticket-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reflection {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}
@media (prefers-reduced-motion: reduce) {
  dialog[open], .copy.copied::after { animation: none; }
}

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

.intro {
  position: fixed;
  z-index: 1;
  inset: 0 0 auto;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: #09080e59;
  -webkit-backdrop-filter: blur(17px) brightness(.76);
  backdrop-filter: blur(17px) brightness(.76);
  transition: opacity 480ms ease, visibility 480ms;
}

.intro.is-dismissed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-content {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(620px, calc(100% - 28px));
}

.tech-text {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: clamp(120px, 20dvh, 150px);
  font-family: Manrope, Arial, sans-serif;
  font-size: 105px;
  color: #fff8ef;
  touch-action: none;
  user-select: none;
}

.tech-text h1 {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.05em;
  white-space: nowrap;
}

.intro-letter-stage {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.tech-text.is-drawn h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}

.site-controls {
  position: fixed;
  inset: var(--safe-top) var(--safe-right) auto var(--safe-left);
  height: calc(100vh - var(--safe-top) - var(--safe-bottom));
  height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  pointer-events: none;
}

.site-controls[inert] { visibility: hidden; }

.enter {
  --dodge-x: 0px;
  --dodge-tilt: 0deg;
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --light-x: 28%;
  --light-y: 22%;
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: grid;
  place-items: center;
  inline-size: 76px;
  block-size: 76px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #f3f4ff82;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at var(--light-x) var(--light-y), #f5edff55, transparent 66%),
    linear-gradient(145deg, #d4c8ff31, #29213d45 46%, #171d2b55 68%, #b0f9ed39);
  box-shadow: inset 0 1px 0 #fff7, inset 0 -1px 0 #15132266, 0 8px 20px #09051060;
  color: #fffaf4;
  font-family: "Geist Mono", monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1;
  text-shadow: 0 1px 3px #110b2480;
  transform: perspective(260px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  translate: var(--dodge-x) 0;
  rotate: var(--dodge-tilt);
  transition: box-shadow 220ms ease, transform 180ms ease,
    translate 330ms cubic-bezier(.23, 1.35, .38, 1), rotate 330ms cubic-bezier(.23, 1.35, .38, 1);
}

.enter::before,
.enter::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  content: "";
}

/* Angled facets around the clear face. */
.enter::before {
  inset: 0;
  background:
    conic-gradient(from 45deg, #a9f4e72a 0 25%, #b2a6ee27 25% 50%, #aeadff58 50% 75%, #fbf6ff62 75%);
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0,
    6px 6px, 6px calc(100% - 6px), calc(100% - 6px) calc(100% - 6px),
    calc(100% - 6px) 6px, 6px 6px);
}

.enter::after {
  inset: 6px;
  border: 1px solid #fff4;
  border-radius: 4px;
  background: linear-gradient(150deg, #fff2, transparent 48%, #befff01a);
}

.enter:is(:hover, :focus-visible, [aria-disabled="true"]) {
  box-shadow: inset 0 1px 0 #fffd, inset 0 -1px 0 #15132266, 0 4px 24px #aea0e659;
}

.enter:is(:active, [aria-disabled="true"]) {
  transform: perspective(260px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(.92);
}

@media (prefers-reduced-motion: reduce) {
  .intro, .enter { transition: none; }
  .enter, .enter:is(:active, [aria-disabled="true"]) { transform: none; }
}

@media (max-width: 540px), (max-height: 440px) {
  .intro-content { width: min(620px, calc(100% - 32px)); }

  .tech-text {
    height: clamp(90px, 18dvh, 130px);
    font-size: clamp(44px, min(17vw, 24dvh), 90px);
  }

  .enter {
    inline-size: 64px;
    block-size: 64px;
    font-size: 14px;
  }
}

@media (max-height: 440px) {
  .intro-content { row-gap: 12px; }
}
