:root {
  color-scheme: dark;
  --bg: #09080d;
  --surface: #111017;
  --surface-soft: #17131f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f4fb;
  --muted: #9e96aa;
  --purple: #8b5cf6;
  --purple-light: #b793ff;
  --green: #65e6a9;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a,
button {
  font: inherit;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-one {
  top: -280px;
  right: -120px;
  background: #7547ef;
}

.ambient-two {
  bottom: 5%;
  left: -330px;
  background: #4a2b9d;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 31px;
  height: 31px;
  transform: rotate(-7deg);
}

.brand-mark span {
  position: absolute;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: linear-gradient(145deg, #aa7eff, #5b30bd);
  box-shadow: 0 5px 16px rgba(117, 71, 239, 0.25);
}

.brand-mark span:nth-child(1) {
  top: 0;
  left: 6px;
}

.brand-mark span:nth-child(2) {
  bottom: 0;
  left: 0;
}

.brand-mark span:nth-child(3) {
  right: 0;
  bottom: 1px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-label {
  margin-left: 1px;
  color: #746b81;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.header-link {
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #c7c0cf;
  font-size: 13px;
  font-weight: 600;
  transition: 160ms ease;
}

.header-link:hover {
  border-color: rgba(183, 147, 255, 0.4);
  color: #fff;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.12), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    #100e16;
  background-size: auto, 52px 52px, 52px 52px, auto;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 64px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--purple-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(101, 230, 169, 0.65);
}

h1 {
  max-width: 750px;
  margin: 23px 0 22px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-text {
  max-width: 570px;
  margin: 0;
  color: #aea6b8;
  font-size: 17px;
  line-height: 1.7;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  margin-top: 38px;
  padding: 16px 19px 16px 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, #8659ed, #7043cf);
  box-shadow: 0 12px 35px rgba(112, 67, 207, 0.2);
  font-size: 14px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-action span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(112, 67, 207, 0.31);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
}

.cube {
  position: relative;
  width: 170px;
  height: 190px;
  transform: rotate(-7deg);
  filter: drop-shadow(0 30px 50px rgba(71, 33, 144, 0.38));
}

.cube-top,
.cube-left,
.cube-right {
  position: absolute;
}

.cube-top {
  top: 15px;
  left: 18px;
  width: 135px;
  height: 93px;
  clip-path: polygon(50% 0, 100% 25%, 52% 100%, 0 72%);
  background: linear-gradient(150deg, #b18aff, #7950d3);
}

.cube-left {
  top: 82px;
  left: 17px;
  width: 75px;
  height: 100px;
  clip-path: polygon(0 0, 100% 28%, 100% 100%, 6% 70%);
  background: linear-gradient(160deg, #6640b8, #452879);
}

.cube-right {
  top: 80px;
  left: 91px;
  width: 68px;
  height: 102px;
  clip-path: polygon(100% 0, 100% 70%, 0 100%, 0 28%);
  background: linear-gradient(160deg, #4e2e8d, #291a4b);
}

.cube-shadow {
  position: absolute;
  width: 180px;
  height: 48px;
  margin-top: 230px;
  border-radius: 50%;
  background: rgba(105, 60, 191, 0.18);
  filter: blur(18px);
}

.pixel {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #9167e8;
  opacity: 0.5;
}

.p1 { top: 25%; right: 14%; }
.p2 { bottom: 24%; left: 13%; width: 4px; height: 4px; }
.p3 { top: 18%; left: 20%; width: 5px; height: 5px; }

.downloads-section,
.steps-section {
  padding: 110px 0 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading h2,
.server-section h2 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.section-heading > p {
  max-width: 380px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.download-card,
.loading-card {
  min-height: 278px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.055), transparent 48%), var(--surface);
}

.download-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 28px;
  transition: border-color 170ms ease, transform 170ms ease;
}

.download-card:hover {
  border-color: rgba(183, 147, 255, 0.25);
  transform: translateY(-2px);
}

.loading-card {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.file-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(164, 120, 255, 0.22);
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--purple-light);
}

.file-icon svg,
.download-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.file-copy {
  min-width: 0;
}

.file-meta {
  display: flex;
  gap: 9px;
  color: #7f7789;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-size::before {
  content: "•";
  margin-right: 9px;
}

.file-title {
  margin: 12px 0 8px;
  overflow-wrap: anywhere;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.file-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.download-button {
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid rgba(183, 147, 255, 0.2);
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  color: #d8c5ff;
  font-size: 13px;
  font-weight: 700;
  transition: 160ms ease;
}

.download-button:hover {
  border-color: rgba(183, 147, 255, 0.45);
  background: rgba(139, 92, 246, 0.18);
  color: #fff;
}

.download-button.is-missing {
  cursor: not-allowed;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #6e6876;
  pointer-events: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.steps li {
  display: flex;
  gap: 20px;
  min-height: 185px;
  padding: 34px 30px;
}

.steps li + li {
  border-left: 1px solid var(--line);
}

.step-number {
  color: var(--purple-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.steps h3 {
  margin: -5px 0 12px;
  font-size: 17px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.server-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 110px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(100deg, rgba(139, 92, 246, 0.1), transparent 60%),
    var(--surface);
}

.server-section p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.server-address {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 10px 10px 21px;
  border: 1px solid rgba(183, 147, 255, 0.25);
  border-radius: 13px;
  background: #0d0b12;
  color: #fff;
  cursor: pointer;
}

.server-address code {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.server-address span {
  padding: 10px 13px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.17);
  color: var(--purple-light);
  font-size: 11px;
  font-weight: 700;
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 160px;
  margin-top: 70px;
  border-top: 1px solid var(--line);
  color: #77717f;
  font-size: 12px;
}

.footer-brand .brand-mark {
  transform: scale(0.75) rotate(-7deg);
  transform-origin: left center;
  margin-right: -5px;
}

.footer-brand .brand-name {
  font-size: 16px;
}

footer > span:last-child {
  justify-self: end;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    position: absolute;
    right: -60px;
    bottom: -50px;
    width: 360px;
    height: 360px;
    opacity: 0.32;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    min-height: auto;
  }

  .steps li + li {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .server-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    height: 76px;
  }

  .brand-label,
  .header-link {
    display: none;
  }

  .hero {
    min-height: 560px;
    border-radius: 20px;
  }

  .hero-copy {
    align-self: flex-start;
    padding: 48px 26px;
  }

  h1 {
    font-size: 47px;
  }

  .hero-text {
    font-size: 15px;
  }

  .downloads-section,
  .steps-section {
    padding-top: 82px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .download-card {
    padding: 22px;
  }

  .server-section {
    margin-top: 82px;
    padding: 30px 22px;
  }

  .server-address {
    width: 100%;
    justify-content: space-between;
    padding-left: 14px;
  }

  .server-address code {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  footer {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  footer p {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
