:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --white: #f7f7f5;
  --muted: rgba(247, 247, 245, .58);
  --line: rgba(255, 255, 255, .18);
  --blue: #5d8fff;
  --violet: #9678ff;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #050505;
}

button,
a { font: inherit; }

button { color: inherit; }

.video-intro {
  position: fixed;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  background: #050505;
  color: var(--white);
}

#introVideo {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050505;
  opacity: 0;
  transform: scale(1.012);
  transition: opacity 420ms ease, transform 900ms cubic-bezier(.16,1,.3,1), filter 420ms ease;
}

.is-playing #introVideo,
.is-paused #introVideo,
.is-handing-off #introVideo {
  opacity: 1;
  transform: scale(1);
}

.is-paused #introVideo { filter: brightness(.45) blur(3px); }
.is-handing-off #introVideo { opacity: 0; transform: scale(1.025); filter: blur(7px); }

.video-shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 0 90px rgba(0,0,0,.12);
}

.film-hud {
  position: absolute;
  z-index: 40;
  inset: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) auto max(24px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: var(--white);
  transition: opacity 220ms ease;
}

.film-brand,
.film-time,
.film-actions { display: flex; align-items: center; }

.film-brand {
  width: max-content;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.film-brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22);
}

.film-brand span,
.film-time,
.film-actions button {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.film-time { gap: 13px; }
.film-time span { color: var(--muted); }

.film-actions {
  justify-self: end;
  gap: 8px;
}

.film-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(8,8,8,.48);
  color: var(--white);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.film-actions button:hover { background: var(--white); color: #050505; transform: translateY(-1px); }

.is-loading .film-hud,
.is-ready .film-hud { color: #202124; }

.is-loading .film-time span,
.is-ready .film-time span { color: rgba(32,33,36,.5); }

.is-loading .film-actions button,
.is-ready .film-actions button {
  border-color: rgba(32,33,36,.14);
  background: rgba(255,255,255,.84);
  color: #202124;
}

.is-loading .film-actions button:hover,
.is-ready .film-actions button:hover { background: #202124; color: #fff; }

#soundButton { display: flex; align-items: center; gap: 8px; }

#soundButton i {
  width: 13px;
  height: 11px;
  background: linear-gradient(90deg, currentColor 2px, transparent 2px 4px, currentColor 4px 7px, transparent 7px 9px, currentColor 9px 13px);
  clip-path: polygon(0 45%,15% 45%,15% 70%,32% 70%,32% 20%,48% 20%,48% 85%,65% 85%,65% 5%,82% 5%,82% 60%,100% 60%,100% 45%,0 45%);
}

#soundButton[aria-pressed="true"] i { opacity: .35; }

.loader {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fbfbf9;
  transition: clip-path 700ms cubic-bezier(.76,0,.2,1), opacity 420ms ease;
  clip-path: inset(0);
}

.is-playing .loader,
.is-paused .loader,
.is-handing-off .loader {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  pointer-events: none;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  display: none;
}

.loader-orbit {
  display: none;
}

.loader-orbit::before,
.loader-orbit::after,
.loader-orbit i {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 50%;
}

.loader-orbit::before { inset: 14%; }
.loader-orbit::after { inset: 31%; }
.loader-orbit i:nth-child(1) { width: 11px; height: 11px; top: 8%; left: 62%; background: var(--blue); border: 0; }
.loader-orbit i:nth-child(2) { width: 7px; height: 7px; right: 17%; bottom: 20%; background: var(--violet); border: 0; }
.loader-orbit i:nth-child(3) { inset: 43%; }

@keyframes orbit { to { transform: rotate(360deg); } }

.loader-copy {
  position: relative;
  z-index: 2;
  width: min(86vw, 850px);
  text-align: center;
}

.loader-copy > span {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  color: #1769e0;
}

.loader h1 {
  margin: 18px 0 22px;
  font-size: clamp(54px, 8vw, 122px);
  font-weight: 600;
  line-height: .88;
  letter-spacing: -.075em;
  color: #202124;
}

.loader h1 em {
  color: #202124;
  font-style: normal;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.loader p { margin: 0 0 17px; color: #69707d; font-size: 14px; }

.loader-track {
  width: min(72vw, 620px);
  height: 4px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e8eb;
}

.loader-track i,
.film-progress i {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: #1769e0;
  will-change: transform;
}

.loader-numbers {
  width: min(72vw, 620px);
  margin: 8px auto 19px;
  display: flex;
  justify-content: space-between;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: #7a808b;
}

.loader-numbers b { color: #202124; }

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 246px;
  min-height: 62px;
  padding: 7px 25px 7px 8px;
  border: 0;
  border-radius: 999px;
  background: #202124;
  color: white;
  box-shadow: 0 16px 42px rgba(32,33,36,.16);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, opacity 180ms ease, filter 180ms ease;
}

.play-button:hover:not(:disabled) { transform: scale(1.035); }
.play-button:disabled { opacity: .5; cursor: wait; filter: saturate(.55); }
.play-button > i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.17); font-style: normal; padding-left: 3px; }
.play-button span { display: grid; gap: 2px; }
.play-button b { font-size: 13px; }
.play-button small { font-family: "Space Mono", ui-monospace, monospace; font-size: 8px; letter-spacing: .13em; color: rgba(255,255,255,.68); }

.loader-skip {
  display: block;
  width: max-content;
  margin: 16px auto 0;
  color: #676d77;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: .08em;
}

.pause-card {
  position: absolute;
  z-index: 25;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.is-paused .pause-card { visibility: visible; opacity: 1; }
.pause-card span { font-family: "Space Mono", ui-monospace, monospace; font-size: 9px; letter-spacing: .18em; color: #8aaeff; }
.pause-card strong { font-size: clamp(48px, 8vw, 100px); letter-spacing: -.07em; }
.pause-card button { margin-top: 8px; border: 0; border-radius: 999px; padding: 13px 25px; background: var(--white); color: #050505; font-weight: 700; cursor: pointer; }

.rotate-gate {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 15px;
  padding: 32px;
  text-align: center;
  background: radial-gradient(circle at 20% 80%, rgba(93,143,255,.22), transparent 36%), #070709;
}

.rotate-phone {
  position: relative;
  width: 66px;
  height: 112px;
  margin-bottom: 15px;
  border: 3px solid var(--white);
  border-radius: 15px;
  animation: rotatePhone 1.8s cubic-bezier(.72,0,.2,1) infinite;
}

.rotate-phone::before { content: ""; position: absolute; top: 7px; left: 50%; width: 18px; height: 3px; border-radius: 4px; background: var(--white); transform: translateX(-50%); }
.rotate-phone i { position: absolute; inset: 28px 12px; border-radius: 50%; border: 2px solid var(--blue); }
@keyframes rotatePhone { 0%,22% { transform: rotate(0); } 65%,100% { transform: rotate(90deg); } }
.rotate-gate > span { font-family: "Space Mono", ui-monospace, monospace; font-size: 9px; font-weight: 700; letter-spacing: .16em; color: #8aaeff; }
.rotate-gate h1 { max-width: 360px; margin: 0; font-size: clamp(40px, 11vw, 58px); line-height: .92; letter-spacing: -.06em; }
.rotate-gate p { max-width: 330px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.rotate-gate a { margin-top: 8px; color: #9ab8ff; font-family: "Space Mono", ui-monospace, monospace; font-size: 9px; }

.film-progress {
  position: absolute;
  z-index: 22;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(24px, env(safe-area-inset-left));
  height: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.18);
}

.handoff {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  background: #050505;
  transition: opacity 380ms ease, visibility 380ms ease;
}

.handoff span { font-family: "Space Mono", ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: .18em; color: var(--muted); }
.is-handing-off .handoff { visibility: visible; opacity: 1; }
.is-handing-off .film-hud,
.is-handing-off .film-progress { opacity: 0; }

.no-script { position: fixed; z-index: 9999; inset: 0; display: grid; place-content: center; background: #050505; color: var(--white); }
.no-script a { color: #9ab8ff; }

button:focus-visible,
a:focus-visible { outline: 3px solid #a78bfa; outline-offset: 4px; }

@media (orientation: portrait) and (max-width: 900px) {
  .rotate-gate { display: grid; }
  .video-intro > :not(.rotate-gate) { visibility: hidden; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .film-hud { inset: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) auto max(12px, env(safe-area-inset-left)); }
  .film-brand img { width: 24px; height: 24px; border-radius: 7px; }
  .film-brand span { font-size: 7px; }
  .film-time { display: none; }
  .film-hud { grid-template-columns: 1fr auto; }
  .film-actions button { min-height: 29px; padding: 0 9px; font-size: 7px; }
  .loader-copy { transform: scale(.72); width: min(118vw, 850px); }
  .loader h1 { margin-block: 12px 14px; }
  .loader p { margin-bottom: 11px; }
  .film-progress { right: 12px; left: 12px; bottom: max(8px, env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) and (orientation: landscape) {
  .film-brand span,
  #soundButton span { display: none; }
  .film-actions { gap: 4px; }
  .film-actions button { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
