:root {
  color-scheme: dark;
  --bg: #07050d;
  --bg-soft: #110a1d;
  --surface: rgba(24, 14, 40, 0.78);
  --surface-strong: #1c102f;
  --text: #f5efff;
  --muted: #c3afd9;
  --line: rgba(218, 188, 255, 0.18);
  --primary: #a855f7;
  --primary-strong: #7c3aed;
  --primary-soft: #d8b4fe;
  --accent: #69e0ff;
  --shadow: rgba(0, 0, 0, 0.34);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf8ff;
  --bg-soft: #efe7ff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --text: #1a1027;
  --muted: #64536f;
  --line: rgba(94, 51, 140, 0.18);
  --primary: #8b3df0;
  --primary-strong: #6827c6;
  --primary-soft: #c58cff;
  --accent: #0f8daf;
  --shadow: rgba(91, 51, 130, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(168, 85, 247, 0.28), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(216, 180, 254, 0.18), transparent 26rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 52%, var(--bg) 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--text);
}

.theme-toggle {
  position: relative;
  width: 50px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  cursor: pointer;
}

.theme-toggle__icon {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-soft);
  box-shadow: 0 0 18px rgba(216, 180, 254, 0.65);
  transition: transform 180ms ease;
}

[data-theme="light"] .theme-toggle__icon {
  transform: translateX(20px);
}

.hero {
  display: flex;
  align-items: center;
  width: min(1160px, calc(100% - 32px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 54px 0 74px;
}

.hero-copy {
  max-width: 950px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(4.6rem, 14vw, 9.2rem);
  line-height: 0.85;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.hero-subtitle,
.download-band p,
.showcase-copy p,
.feature-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-subtitle {
  max-width: 850px;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.28);
}

.button-ghost,
.button-secondary {
  border-color: var(--line);
  background: var(--surface);
}

.loader-panel,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feature-grid article,
.loader-node,
.loader-core {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.download-band,
.community-strip,
.section,
.showcase {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto 24px;
}

.download-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.16), transparent),
    var(--surface);
}

.community-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.community-strip a {
  display: grid;
  place-items: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.community-strip a:hover {
  border-color: color-mix(in srgb, var(--primary) 64%, var(--line));
  background: color-mix(in srgb, var(--surface) 70%, var(--primary) 14%);
}

.section,
.showcase {
  padding: clamp(48px, 8vw, 86px) 0;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article {
  padding: 20px;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  margin-bottom: 22px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 900;
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
  gap: clamp(28px, 6vw, 68px);
  align-items: center;
}

.loader-panel {
  min-height: 320px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: clamp(18px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.14), transparent),
    var(--surface);
}

.loader-node,
.loader-core {
  display: grid;
  place-items: center;
  min-height: 82px;
  padding: 18px;
  color: var(--text);
  font-weight: 900;
  text-align: center;
}

.loader-core {
  grid-column: 1 / -1;
  min-height: 96px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  box-shadow: 0 16px 34px rgba(124, 58, 237, 0.24);
}

.site-footer {
  gap: 16px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.88rem;
  }

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

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .download-actions {
    margin-top: 0;
  }

  .feature-grid,
  .community-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-header,
  .hero,
  .download-band,
  .community-strip,
  .section,
  .showcase,
  .site-footer {
    width: min(100% - 22px, 1160px);
  }

  .brand small {
    display: none;
  }

  .hero-actions,
  .download-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
