:root {
  color-scheme: dark;
  --background: #101217;
  --surface: #1c2029;
  --text: #f1f3f8;
  --muted: #aeb4c0;
  --primary: #a9bfff;
  --line: #333844;
  --size-body: 1rem;
  --size-section: 1.25rem;
  --size-title: clamp(3rem, 6vw, 6.25rem);
  font:
    400 var(--size-body)/1.55 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--background);
  color: var(--text);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
button {
  font: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 5px;
}
.wrap {
  width: min(1328px, calc(100% - 96px));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}
.wordmark,
.top-link,
.action {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
}
.mark {
  width: 26px;
  height: 26px;
  color: var(--primary);
}
.top-link {
  color: var(--muted);
}
.top-link:hover,
.site-footer a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.7fr);
  gap: clamp(28px, 5vw, 78px);
  min-height: calc(100svh - 240px);
  padding-block: clamp(50px, 10vh, 122px) clamp(50px, 8vh, 90px);
}

.intro {
  z-index: 1;
}
.intro h1,
.legal-page h1 {
  font-size: var(--size-title);
  letter-spacing: -0.055em;
  line-height: 0.9;
  margin: 0;
}
.intro p {
  max-width: 28ch;
  margin: 24px 0 26px;
  font-size: var(--size-section);
  color: var(--muted);
}
.action {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--primary);
  color: #101a32;
}
.action:hover {
  background: #c1d0ff;
}
.availability {
  margin-top: 12px;
  color: var(--muted);
}

.showcase {
  position: relative;
  min-width: 0;
  isolation: isolate;
}
.showcase::before,
.showcase::after {
  pointer-events: none;
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(74px);
}
.showcase::before {
  width: 65%;
  height: 62%;
  right: 0;
  top: 2%;
  background: #566eaf;
  opacity: 0.46;
}
.showcase::after {
  width: 60%;
  height: 43%;
  left: 12%;
  bottom: 12%;
  background: #504565;
  opacity: 0.5;
}
.window {
  border: 1px solid #434b5c;
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 24px 80px #0009;
  transform: perspective(1400px) rotateY(-4deg) rotateX(2deg);
  transition:
    transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 180ms ease;
}
.window:focus-within,
.window:hover {
  transform: perspective(1400px);
  border-color: var(--primary);
}
.window-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-height: 48px;
  gap: 8px;
  padding-inline: 12px;
  align-items: center;
  color: var(--muted);
  border-radius: 16px 16px 0 0;
  background: #242a34b8;
  backdrop-filter: blur(16px);
}
.window-title {
  grid-column: 2;
  font-weight: 600;
  text-align: center;
}
.window-controls:not([hidden]) {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.window-controls button {
  display: grid;
  place-items: center;
  width: 23px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.window-controls button:focus-visible {
  outline-offset: 1px;
}
.window-controls svg {
  width: 14px;
  height: 14px;
  padding: 1px;
  border: 1px solid #0002;
  border-radius: 50%;
  color: #000b;
}
.window-controls path,
.window-open path {
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.window-controls path {
  opacity: 0;
}
.window-controls:hover path,
.window-controls button:focus-visible path {
  opacity: 1;
}
.close-control svg {
  background: #ff746c;
}
.minimize-control svg {
  background: #f5bd56;
}
.expand-control svg {
  background: #6fc881;
}

.window-open {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 5px;
  padding: 4px;
  border-radius: 5px;
  color: var(--primary);
  text-decoration: none;
}
.window-open:hover {
  color: var(--text);
}
.window-open svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.window-content {
  position: relative;
  aspect-ratio: 8 / 5;
  border-top: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  background: var(--background);
}
.demo-frame {
  display: block;
  width: var(--frame-width, 100%);
  height: var(--frame-height, 100%);
  border: 0;
  transform: scale(var(--frame-scale, 1));
  transform-origin: top left;
  background: var(--background);
}
.window-bar:has(+ .window-content[hidden]) {
  border-radius: 16px;
}
.window-expanded {
  position: fixed;
  inset: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  transform: none;
}
.showcase:has(.window-expanded) {
  position: static;
  isolation: auto;
}
.showcase:has(.window-expanded)::before,
.showcase:has(.window-expanded)::after {
  display: none;
}
.window-expanded:is(:hover, :focus-within) {
  transform: none;
}
.window-expanded .window-content {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
}
body:has(.window-expanded) {
  overflow: hidden;
}
.window-closed:not([hidden]) {
  display: grid;
  place-items: center;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.restore-control {
  cursor: pointer;
}
@media (max-width: 740px) {
  .window-content {
    aspect-ratio: auto;
    height: min(640px, 72svh);
  }
}
@media (max-width: 500px) {
  .window-open-label {
    display: none;
  }
  .window-open {
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }
  .window-controls {
    gap: 1px !important;
  }
}

.site-footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer nav {
  display: flex;
  gap: 16px;
}
.site-footer p {
  max-width: 70ch;
  margin: 0;
}
.site-footer a {
  text-underline-offset: 4px;
}

.legal-page {
  padding-block: 54px 76px;
}
.legal-page h1 {
  font-size: clamp(2.75rem, 5vw, 5rem);
}
.legal-page section {
  max-width: 68ch;
  margin-top: 36px;
}
.legal-page h2 {
  margin: 24px 0 8px;
  font-size: var(--size-section);
}
.legal-page p {
  margin: 0 0 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .wrap {
    width: calc(100% - 48px);
  }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 42px;
  }
  .intro p {
    max-width: 36ch;
  }
  .window {
    transform: none;
  }
}
@media (max-width: 500px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .topbar {
    min-height: 64px;
  }
  .hero {
    padding-block: 44px;
    gap: 36px;
  }
  .site-footer {
    flex-direction: column;
  }
  .showcase::before,
  .showcase::after {
    filter: blur(38px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .window {
    transform: none;
    transition: none;
  }
}
