:root {
  color-scheme: dark;
  --bg: #03050a;
  --panel: rgba(5, 10, 17, 0.84);
  --panel-strong: rgba(8, 15, 25, 0.94);
  --text: #f3f7ff;
  --muted: #8a98ad;
  --quiet: #526076;
  --line: rgba(142, 213, 255, 0.28);
  --line-strong: rgba(184, 231, 255, 0.72);
  --accent: #70d8ff;
  --accent-2: #ff725f;
  --white: #f7f9ff;
  --font-display: "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-square: "Avenir Next", "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

html.home-shell,
html.home-shell body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(6, 10, 18, 0.96), rgba(2, 4, 8, 1)),
    var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 0.015em;
  line-height: 1.6;
}

body.home-page {
  height: 100svh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 30px;
  left: 48px;
  right: 48px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

body:not(.home-page) .site-header {
  top: 0;
  left: 0;
  right: 0;
  min-height: 82px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(142, 213, 255, 0.16);
  background: rgba(3, 6, 11, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 24px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 0;
  box-shadow: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 36px);
}

.nav-links a:not(.store-button) {
  color: rgba(226, 235, 255, 0.72);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.nav-links a:not(.store-button):hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
}

.store-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(154, 220, 255, 0.56);
  border-radius: 0;
  color: var(--white);
  background: rgba(7, 13, 22, 0.76);
  box-shadow: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.store-button:hover,
.button:hover {
  border-color: rgba(226, 247, 255, 0.9);
  background: rgba(112, 216, 255, 0.12);
  transform: translateY(-1px);
}

.store-button:focus-visible,
.button:focus-visible,
.menu-toggle:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid rgba(226, 247, 255, 0.95);
  outline-offset: 4px;
}

.apple-icon {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  border: 1px solid rgba(154, 220, 255, 0.45);
  border-radius: 0;
  background: rgba(7, 13, 22, 0.74);
  box-shadow: none;
  color: var(--white);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.home-main {
  position: relative;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: calc(100svh - 56px);
  min-height: 560px;
  margin: 28px;
  overflow: hidden;
  background: #03060b;
  clip-path: polygon(
    0 34px,
    34px 0,
    calc(100% - 34px) 0,
    100% 34px,
    100% calc(100% - 34px),
    calc(100% - 34px) 100%,
    34px 100%,
    0 calc(100% - 34px)
  );
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #03060b;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(3, 6, 11, 0) 0 34%, rgba(3, 6, 11, 0.12) 52%, rgba(3, 6, 11, 0.72) 100%),
    linear-gradient(180deg, rgba(3, 6, 11, 0.16), rgba(3, 6, 11, 0.04) 42%, rgba(3, 6, 11, 0.66));
}

.stage-frame {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border: 1px solid rgba(138, 213, 255, 0.24);
  clip-path: inherit;
}

.stage-frame::before,
.stage-frame::after {
  position: absolute;
  content: "";
  height: 1px;
  background: rgba(184, 231, 255, 0.26);
}

.stage-frame::before {
  left: 34px;
  right: 34px;
  bottom: 62px;
}

.stage-frame::after {
  top: 86px;
  left: 34px;
  right: 34px;
  opacity: 0.55;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1220px, calc(100% - 240px));
  transform: translate(-50%, -43%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.05vw, 14px);
  font-weight: 900;
  letter-spacing: 0.26em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(40px, 4.35vw, 64px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero-content h1 span {
  display: block;
  white-space: nowrap;
}

.lede {
  max-width: 860px;
  margin: 26px auto 0;
  color: rgba(214, 224, 242, 0.72);
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.86vw, 13px);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.8;
  text-transform: uppercase;
}

.lede span {
  display: block;
}

.lede.small {
  color: rgba(214, 224, 242, 0.8);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.85;
  text-transform: uppercase;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.button.primary {
  min-height: 56px;
  padding-inline: 28px;
  border-color: rgba(184, 231, 255, 0.7);
  background: rgba(9, 17, 28, 0.84);
}

.availability {
  margin: 18px 0 0;
  color: rgba(155, 168, 190, 0.82);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-rail {
  position: absolute;
  left: clamp(34px, 4vw, 68px);
  top: 50%;
  z-index: 7;
  display: grid;
  gap: 17px;
  transform: translateY(-38%);
}

.hero-rail span {
  display: grid;
  grid-template-columns: 9px auto;
  align-items: center;
  gap: 12px;
  color: rgba(174, 188, 210, 0.34);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1;
  text-transform: uppercase;
  transition: color 260ms ease;
}

.hero-rail span::before {
  width: 7px;
  height: 7px;
  content: "";
  background: currentColor;
}

.hero-rail span.is-active {
  color: rgba(245, 249, 255, 0.94);
}

.stage-footer {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 0;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 62px;
  border-top: 1px solid rgba(142, 213, 255, 0.16);
}

.stage-footer span {
  display: flex;
  align-items: center;
  min-width: 0;
  color: rgba(210, 221, 241, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.stage-footer span:nth-child(2) {
  justify-content: center;
}

.stage-footer span:nth-child(3) {
  justify-content: flex-end;
}

.document {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 138px 0 72px;
}

.document h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-transform: uppercase;
}

.document section {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid rgba(142, 213, 255, 0.16);
}

.document h2 {
  margin: 0 0 10px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.document p,
.document li {
  color: rgba(214, 224, 242, 0.76);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.78;
  text-transform: none;
}

.document a {
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.document ul {
  margin: 14px 0 0;
  padding-left: 22px;
}

.support-card {
  padding: 26px;
  border: 1px solid rgba(142, 213, 255, 0.2);
  background: rgba(8, 15, 25, 0.64);
}

.updated {
  margin-top: 42px;
  color: var(--quiet);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .site-header {
    left: 34px;
    right: 34px;
  }

  .hero-content {
    width: min(760px, calc(100% - 150px));
  }

  .hero-rail {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header,
  body:not(.home-page) .site-header {
    top: 0;
    left: 0;
    right: 0;
    min-height: 70px;
    padding: 0 18px;
    background: rgba(3, 6, 11, 0.92);
    border-bottom: 1px solid rgba(142, 213, 255, 0.18);
  }

  .brand {
    font-size: 18px;
    gap: 10px;
  }

  .brand img {
    width: 28px;
    height: 28px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 18px 18px;
    border-bottom: 1px solid rgba(142, 213, 255, 0.18);
    background: rgba(3, 6, 11, 0.96);
  }

  .site-header.is-menu-open .nav-links {
    display: grid;
  }

  .nav-links a:not(.store-button) {
    padding: 13px 0;
  }

  .nav-links .store-button {
    margin-top: 10px;
    width: 100%;
  }

  .home-main {
    min-height: 100svh;
  }

  .hero-stage {
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    clip-path: none;
  }

  .stage-frame {
    display: none;
  }

  .hero-content {
    top: 50%;
    width: min(100% - 36px, 460px);
    transform: translate(-50%, -42%);
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }

  .hero-content h1 {
    font-size: clamp(27px, 7.2vw, 29px);
    letter-spacing: 0.004em;
    line-height: 0.98;
  }

  .hero-content h1 span {
    white-space: normal;
  }

  .lede {
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: 0.02em;
    line-height: 1.52;
  }

  .lede span {
    display: inline;
  }

  .actions {
    margin-top: 26px;
  }

  .button.primary {
    min-height: 52px;
    width: min(100%, 320px);
    padding-inline: 18px;
    font-size: 11px;
  }

  .availability {
    margin-top: 14px;
    font-size: 10px;
  }

  .stage-footer {
    left: 18px;
    right: 18px;
    min-height: 42px;
    grid-template-columns: 1fr;
    border-top-color: rgba(142, 213, 255, 0.12);
  }

  .stage-footer span {
    display: none;
  }

  .stage-footer span:first-child {
    display: flex;
    font-size: 10px;
  }

  .document {
    width: min(100% - 36px, 860px);
    padding-top: 112px;
  }

  .document h1 {
    font-size: clamp(32px, 10vw, 48px);
  }

  .lede.small {
    font-size: 12px;
    letter-spacing: 0.045em;
  }
}

@media (max-height: 720px) and (min-width: 721px) {
  .site-header {
    min-height: 58px;
  }

  .hero-content {
    transform: translate(-50%, -40%);
  }

  .hero-content h1 {
    font-size: clamp(38px, 4.8vw, 58px);
  }

  .lede {
    margin-top: 16px;
  }

  .actions {
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .hero-scene {
    background:
      linear-gradient(120deg, rgba(16, 54, 75, 0.58), rgba(3, 6, 11, 1) 60%),
      #03060b;
  }
}
