:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #faf8ff;
  background: #171221;
  color-scheme: dark;
  --glass-rim: #637da7a6;
  --glass-accent: #cda6ff;
  --glass-focus: #d9f8ff;
  --page-floor: #111120;
}

* { box-sizing: border-box; }
body, h1 { margin: 0; }

:root { scroll-snap-type: y mandatory; }

.hero, .feature-showcase, .site-footer {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.site-footer { scroll-snap-align: end; }

.hero {
  --header-space: clamp(4.3rem, 13svh, 6rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100vh;
  height: 100svh;
}

.frames, .frame img, .avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.frames {
  z-index: -2;
  container-type: size;
  filter: blur(.65px);
  transform: scale(1.005);
}

.frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 177.7778cqh);
  height: max(100%, 56.25cqw);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 950ms ease;
}

.tv-screen {
  display: none;
  position: absolute;
  background: #090e22 var(--program) center / cover no-repeat;
  pointer-events: none;
  clip-path: polygon(0 var(--top-left), 100% 0, 100% 100%, 0 100%);
  filter: saturate(1.12) contrast(1.04);
}

.frame[data-slide="1"] .tv-screen {
  display: block;
  inset: 26.11% 28.95% 62.12% 59.76%;
  --top-left: 4%;
  --program: url("assets/tv-city.webp");
}

.frame[data-slide="3"] .tv-screen {
  display: block;
  inset: 22.75% 27.25% 62.20% 58.30%;
  --top-left: 5%;
  --program: url("assets/tv-after-dark.webp");
}

.frame[data-slide="5"] .tv-screen {
  display: block;
  inset: 26.11% 28.95% 62.12% 59.76%;
  --top-left: 4%;
  --program: url("assets/tv-night.webp");
}

.avatars {
  position: absolute;
  z-index: 1;
  inset: var(--header-space) clamp(.75rem, 4vw, 4rem) clamp(.5rem, 4svh, 3rem) 30%;
  pointer-events: none;
}

.avatar {
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  transition: opacity 650ms ease;
}

.frame.on, .avatar.on { opacity: 1; }
.avatar:not([src]) { visibility: hidden; }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--page-floor), #11112098 10%, transparent 32%),
    linear-gradient(90deg, #100d22d9, #14102b86 25%, #14102b29 47%, transparent 65%);
}

.glass-panel {
  border: 1px solid var(--glass-rim);
  background:
    linear-gradient(180deg, #ced8ff17, transparent 44%, #07081840 81%, #9ea6ff12),
    #171731a6;
  backdrop-filter: blur(15px) saturate(1.25);
  box-shadow:
    inset 0 1px 0 #e4eaff35,
    inset 0 -1px 0 #b5bdff22,
    0 9px 28px #06061662;
}

.glass-button {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 2.8rem;
  padding: .35rem .45rem;
  border: 1px solid var(--glass-rim);
  border-radius: .77rem;
  background: linear-gradient(180deg, #474a67aa, #22233acd 43%, #141524eb 72%, #272742eb);
  color: #fff;
  box-shadow: inset 0 1px 0 #f2f3ff36, inset 0 -2px 2px #0b0b1d70, 0 3px 7px #08081865;
  font: 700 clamp(.73rem, 1vw, .9rem)/1.15 "Segoe UI", Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms, box-shadow 180ms, translate 140ms, filter 140ms;
}

.glass-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 48%;
  background: linear-gradient(#e5edff1d, #dde6ff04);
  pointer-events: none;
}

.glass-button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 28%, #d6e8ff70 49%, transparent 71%);
  transform: translateX(-100%);
}

.glass-button:hover, .glass-button:focus-visible, .business[open] > summary {
  border-color: var(--glass-accent);
  box-shadow: inset 0 1px 0 #f4eaff70, inset 0 0 0 2px #cda6ff38, 0 4px 13px #0a0715a6;
}

.glass-button:hover, .glass-button:focus-visible { translate: 0 -1px; }
.glass-button:hover::after, .glass-button:focus-visible::after { animation: glass-sweep 620ms linear both; }
.glass-button:active { translate: 0 1px; filter: brightness(.8); }

@keyframes glass-sweep {
  to { transform: translateX(100%); }
}

.glass-button.accent {
  border-color: #cda6ffe0;
  background: linear-gradient(180deg, #a080c7b5, #3d2a79 43%, #2b154e 72%, #482375);
}

a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--glass-focus);
  outline-offset: 3px;
}

.site-header {
  position: absolute;
  z-index: 3;
  inset: clamp(.55rem, 1.4vw, 1.1rem) clamp(.65rem, 1.4vw, 1.1rem) auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.8rem, 2.4vw, 2.5rem);
  padding: .4rem clamp(.65rem, 1.5vw, 1.3rem);
  border-radius: 1.3rem;
}

.brand { flex: none; display: block; line-height: 0; }
.brand img {
  width: clamp(6.5rem, 12vw, 10rem);
  height: auto;
  max-height: 3.5rem;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 3px 12px #9c62f653);
}

.site-nav {
  display: grid;
  grid-template-columns: repeat(6, max-content);
  gap: .5rem;
}

.site-header .glass-button {
  min-height: 2.25rem;
  padding: .24rem .78rem;
  border-radius: .66rem;
  white-space: nowrap;
}

.menu-toggle { display: none; }
.business { position: relative; }
.business summary {
  grid-auto-flow: column;
  justify-content: center;
  gap: .3rem;
  list-style: none;
}
.business summary::-webkit-details-marker { display: none; }

.business-links {
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  width: max-content;
  display: grid;
  gap: .4rem;
  border-radius: .95rem;
  padding: .45rem;
  background-color: #171731ed;
}
.business-links a { padding-inline: .8rem; }

.hero-copy {
  position: absolute;
  z-index: 2;
  inset-inline-start: clamp(1rem, 4vw, 4rem);
  bottom: clamp(1.35rem, 5svh, 3.5rem);
  width: min(45%, 38rem);
  text-shadow: 0 2px 12px #090816e0;
}

.hero-copy h1 img {
  display: block;
  width: 70%;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  filter: drop-shadow(0 5px 18px #4f239184);
}

.tagline {
  margin: .65rem 0 .4rem;
  font-size: clamp(1.05rem, 2.25vw, 2.05rem);
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.12;
  text-wrap: balance;
}

.description {
  margin: 0 0 1rem;
  color: #ebe8ff;
  font-size: clamp(.81rem, 1.25vw, 1.03rem);
  line-height: 1.45;
}

.hero-actions {
  display: grid;
  text-shadow: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: .95rem;
  padding: .3rem;
  gap: .3rem;
  backdrop-filter: none;
}

@media (max-width: 900px) {
  .hero { --header-space: 5rem; }
  .site-header { gap: .6rem; }
  .menu-toggle { display: grid; padding-inline: 1rem; }
  .site-nav {
    position: absolute;
    inset: calc(100% + .45rem) 0 auto auto;
    display: none;
    grid-template-columns: 1fr;
    width: min(17rem, 85vw);
    max-height: calc(100svh - 5rem);
    overflow: auto;
    padding: .6rem;
    border: 1px solid var(--glass-rim);
    border-radius: 1rem;
    background: #171731f0;
    box-shadow: 0 9px 28px #06061680;
  }
  .menu-toggle[aria-expanded="true"] + .site-nav { display: grid; }
  .business-links { position: static; width: auto; margin-top: .5rem; }
}

@media (max-width: 650px), (max-width: 980px) and (orientation: portrait) {
  .avatars {
    inset: var(--header-space) 0 .35rem;
  }
  .hero::after {
    background: linear-gradient(to top,
      var(--page-floor), #111120e8 13%, #111120a8 29%, #11112033 47%, transparent 63%);
  }
  .hero-copy {
    inset-inline: 0;
    width: min(88%, 34rem);
    margin-inline: auto;
    bottom: clamp(2.3rem, 6svh, 3.25rem);
    text-align: center;
    text-shadow: 0 2px 8px #090816, 0 3px 24px #090816e0;
  }
  .hero-copy::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -.8rem -1.6rem .15rem;
    background: radial-gradient(ellipse at 50% 62%, #090814d9 0%, #0908149c 53%, transparent 79%);
    pointer-events: none;
  }
  .description { margin-bottom: .75rem; }
}

@media (max-height: 450px) {
  .hero { --header-space: 4.4rem; }
  .site-header { padding-block: .22rem; }
  .site-header .glass-button { min-height: 2rem; }
  .brand img { max-height: 2.9rem; }
  .hero-copy { bottom: .65rem; }
  .hero-copy h1 img { max-height: 12svh; }
  .tagline { margin-block: .25rem; }
  .description { margin-bottom: .4rem; font-size: .72rem; line-height: 1.25; }
  .hero-actions .glass-button { min-height: 2rem; font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
  .frame, .avatar, .glass-button { transition: none; }
  .glass-button:hover, .glass-button:focus-visible { translate: none; }
  .glass-button:hover::after, .glass-button:focus-visible::after { animation: none; }
}

.feature-stack {
  background: linear-gradient(to bottom,
    var(--page-floor), #1c1730 24%, #18142a 69%, var(--page-floor));
}
.feature-showcase {
  --frame-inset: clamp(.4rem, 1.7dvh, 1.2rem);
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--frame-inset) clamp(.8rem, 5vw, 4.5rem);
}

.feature-player {
  position: relative;
  isolation: isolate;
  width: min(100%, calc((100dvh - 2 * var(--frame-inset)) * 16 / 9));
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border-radius: clamp(.8rem, 2vw, 1.35rem);
}

.feature-media {
  position: relative;
  grid-area: 1 / 1;
  min-height: 0;
  background: #10101c;
}

.feature-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.feature-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, #0b091ce0, transparent 48%),
    radial-gradient(ellipse at 100% 100%, #0b091ce8, transparent 63%);
}

.feature-copy {
  position: relative;
  grid-area: 1 / 1;
  justify-self: end;
  align-self: end;
  z-index: 1;
  width: min(49rem, calc(100% - clamp(4.4rem, 10vw, 11rem)));
  margin: 0 clamp(.85rem, 3vw, 2.65rem) clamp(.8rem, 3vw, 2.5rem) 0;
  text-align: right;
  text-shadow: 0 2px 12px #0a0818;
}

.feature-copy h2 {
  margin: 0;
  font-size: clamp(1.3rem, 3.45vw, 3.3rem);
  letter-spacing: -.048em;
  line-height: 1.06;
}

.feature-copy p {
  margin: clamp(.25rem, .8vw, .65rem) 0 0;
  color: #eee9ff;
  font-size: clamp(.72rem, 1.5vw, 1.14rem);
}

.feature-toggle {
  position: absolute;
  z-index: 1;
  left: clamp(.7rem, 2vw, 1.25rem);
  bottom: clamp(.7rem, 2vw, 1.25rem);
  width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
}
.feature-toggle[hidden] { display: none; }

.feature-toggle::before {
  position: static;
  z-index: auto;
  width: 0;
  height: 0;
  border: .35rem solid transparent;
  border-right: 0;
  border-left: .55rem solid currentColor;
  background: none;
}
.feature-toggle[data-playing]::before {
  width: .52rem;
  height: .7rem;
  border: 0;
  border-inline: .15rem solid currentColor;
}

.feature-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: min(100%, 32rem);
  margin: .75rem 0 0 auto;
  border-radius: .95rem;
  padding: .3rem;
  gap: .3rem;
  text-shadow: none;
}
.glass-button[hidden] { display: none; }
.glass-button:disabled { opacity: .55; cursor: default; }

@media (orientation: portrait) {
  .feature-player {
    width: 100%;
    aspect-ratio: auto;
    grid-template-rows: auto auto;
  }
  .feature-media { aspect-ratio: 16 / 9; }
  .feature-media::after { background: linear-gradient(0deg, #17152c, transparent 20%); }
  .feature-copy {
    grid-area: 2 / 1;
    width: 100%;
    margin: 0;
    padding: .9rem;
    background: linear-gradient(#17152c, #121225);
  }
  .feature-copy p { font-size: .87rem; line-height: 1.4; }
  .feature-actions { width: 100%; }
  .feature-actions .glass-button { white-space: normal; }
}

.site-footer {
  padding: 1.45rem clamp(.9rem, 5vw, 4.5rem);
  background: linear-gradient(var(--page-floor), #0e0e1c);
}

.footer-inner {
  width: min(100%, 76rem);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.footer-info p { margin: 0 0 .5rem; font-size: .9rem; }
.footer-links, .footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; }
.footer-links a { color: #cec9ea; font-size: .82rem; text-underline-offset: .2em; }
.footer-links a:hover { color: var(--glass-focus); }
.footer-social { gap: .5rem; }
.footer-social .glass-button {
  width: 2.65rem;
  height: 2.65rem;
  min-height: 0;
  padding: 0;
  border-radius: .68rem;
}
.footer-social svg { display: block; width: 1.12rem; height: 1.12rem; fill: currentColor; }

.page-dialog {
  color: inherit;
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  padding: 1.3rem;
  border-radius: 1.15rem;
  background-color: #19182bee;
}
.page-dialog::backdrop { background: #080713b0; }
.page-dialog h2 { margin: 0 2.4rem .65rem 0; }
.page-dialog p { color: #eee9ff; line-height: 1.45; }
.page-dialog .dialog-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2rem;
  min-height: 2rem;
  font-size: 1.3rem;
}
.page-dialog .feature-actions { margin-inline: 0; }
.photo-picker { display: block; margin-bottom: .4rem; }
#photo-file { width: 100%; color: inherit; }
#photo-file::file-selector-button {
  border: 1px solid var(--glass-rim);
  border-radius: .5rem;
  padding: .45rem .65rem;
  color: inherit;
  background: #282640;
  cursor: pointer;
}
#share-photo-status:empty { display: none; }

.gallery-dialog { width: min(46rem, calc(100% - 2rem)); }
.gallery-add { padding-inline: .9rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.gallery-grid:empty, #gallery-status:empty { display: none; }
.gallery-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--glass-rim);
  border-radius: .8rem;
  background: #141329;
}
.gallery-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #0d0c1b;
}
.gallery-grid figcaption {
  padding: .5rem;
  color: #eee9ff;
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.download-dialog { width: min(49rem, calc(100% - 2rem)); }
.download-wordmark { display: block; width: min(13rem, 64%); height: auto; margin-bottom: .5rem; }
.release-summary { color: #d9c4ff; font-weight: 700; }
.download-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.download-details > div {
  padding: .85rem;
  border: 1px solid var(--glass-rim);
  border-radius: .78rem;
  background: #10102780;
}
.download-details h3 { margin: 0 0 .55rem; font-size: 1rem; }
.download-details :is(ol, ul) { margin: 0; padding-inline-start: 1.2rem; color: #eee9ff; line-height: 1.45; }
.download-details li + li { margin-top: .45rem; }
.download-dialog .feature-actions { width: 100%; }
.download-dialog .feature-actions form > button { width: 100%; }
.release-status:empty { display: none; }
@media (max-width: 620px) {
  .download-details { grid-template-columns: 1fr; }
}

.download-details[hidden], .download-details > [hidden] { display: none; }
