:root {
  color-scheme: dark;
  --bg: #080d12;
  --band: #10171d;
  --panel: #121c24;
  --panel-2: #17242c;
  --line: rgba(225, 239, 246, 0.14);
  --text: #eef5f7;
  --muted: #aab8c3;
  --cyan: #63d6f6;
  --green: #7ee2a8;
  --gold: #f1c96a;
  --rose: #f07b8e;
  --ink: #071016;
  --shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Aptos", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .hero-content,
html[dir="rtl"] .split {
  direction: rtl;
}

html[dir="rtl"] .hero-logo-wrap {
  justify-self: end;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 74px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 18, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-text {
  display: inline-block;
  font-size: 19px;
  letter-spacing: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

nav a {
  text-decoration: none;
}

nav a:hover,
.row-link:hover {
  color: var(--cyan);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.language-switch select {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  outline: none;
}

.language-switch option {
  background: #ffffff;
  color: #071016;
}

.internal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.internal-link:hover {
  border-color: rgba(99, 214, 246, 0.55);
  color: var(--cyan);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 74px));
  display: grid;
  align-items: end;
  padding: clamp(96px, 14vh, 156px) clamp(20px, 6vw, 92px) 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) brightness(0.7);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 13, 18, 0.97) 0%, rgba(8, 13, 18, 0.84) 42%, rgba(8, 13, 18, 0.52) 100%),
    linear-gradient(180deg, rgba(8, 13, 18, 0.2) 0%, rgba(8, 13, 18, 0.95) 100%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: clamp(72px, 9vw, 170px);
  width: min(1540px, 100%);
}

.hero-copy {
  width: min(820px, 100%);
}

.hero-logo-wrap {
  justify-self: start;
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 100%;
  pointer-events: none;
  user-select: none;
}

.hero-logo-art {
  width: clamp(300px, 34vw, 560px);
  max-width: 100%;
  opacity: 0.72;
  mix-blend-mode: screen;
  filter: saturate(1.2) contrast(1.08) drop-shadow(0 24px 70px rgba(99, 214, 246, 0.24));
}

.hero-logo-credit {
  color: rgba(240, 248, 250, 0.92);
  font-size: clamp(24px, 2.15vw, 34px);
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.58);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: break-word;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(58px, 10vw, 124px);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 23px;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.36;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.support-modal {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.support-modal:target {
  display: flex;
}

.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.support-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101922;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.support-dialog h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.support-dialog label {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.support-dialog input,
.support-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 12px;
  font: inherit;
}

.support-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}

.support-status {
  margin-top: 12px;
  color: var(--green);
  font-weight: 800;
}

.honeypot {
  display: none;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.status-band span {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 0 clamp(14px, 2vw, 26px);
  background: var(--band);
  color: var(--muted);
  font-size: 13px;
}

.section {
  padding: 82px clamp(20px, 6vw, 92px);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 920px;
  margin-bottom: 28px;
}

.section p,
.use-card p,
.reason-grid p,
.feature-grid p,
.steps p,
.edition p,
.row-link span {
  color: var(--muted);
  line-height: 1.5;
}

.use-grid,
.reason-grid,
.feature-grid,
.steps {
  display: grid;
  gap: 14px;
}

.use-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.reason-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.use-card,
.reason-grid > div,
.feature-grid > article,
.steps > article,
.edition,
.row-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 42px var(--shadow);
}

.use-card,
.reason-grid > div,
.feature-grid > article,
.steps > article,
.edition {
  padding: 22px;
}

.use-card span,
.steps span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(99, 214, 246, 0.15);
  color: var(--cyan);
  font-weight: 950;
}

.why {
  background: #0b1218;
}

.reason-grid strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 19px;
}

.workflow {
  background: linear-gradient(180deg, #080d12, #10151b);
}

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

.edition {
  position: relative;
  min-height: 100%;
}

.edition.highlight {
  border-color: rgba(99, 214, 246, 0.58);
  background: linear-gradient(180deg, rgba(23, 36, 44, 0.98), rgba(15, 32, 32, 0.98));
  box-shadow: 0 24px 70px rgba(99, 214, 246, 0.16);
}

.edition-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.edition strong {
  display: block;
  margin: 16px 0;
  color: var(--gold);
}

.edition ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.edition li + li {
  margin-top: 8px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(340px, 0.9fr);
  gap: clamp(42px, 7vw, 96px);
  align-items: start;
}

.split > * {
  min-width: 0;
}

#downloads h2 {
  max-width: 640px;
  font-size: clamp(34px, 4.4vw, 56px);
  overflow-wrap: anywhere;
  hyphens: auto;
}

#downloads p {
  max-width: 660px;
}

.server-links {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-self: center;
}

.row-link {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 18px;
  text-decoration: none;
  overflow: hidden;
}

.row-link strong,
.row-link span {
  overflow-wrap: anywhere;
}

.row-link.primary-row {
  border-color: rgba(126, 226, 168, 0.48);
  background: #14251f;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(20px, 6vw, 92px);
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: minmax(0, 0.94fr) minmax(260px, 0.5fr);
    gap: clamp(44px, 7vw, 90px);
  }

  .hero-logo-art {
    width: clamp(240px, 31vw, 390px);
  }

  .feature-grid,
  .edition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .use-grid,
  .reason-grid,
  .steps,
  .status-band,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .hero-logo-art {
    width: 100%;
  }

  .hero-logo-wrap {
    position: absolute;
    z-index: 1;
    top: -44px;
    right: 0;
    width: min(44vw, 260px);
    opacity: 0.36;
  }

  .hero-logo-credit {
    font-size: clamp(14px, 3vw, 20px);
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    grid-template-columns: auto 1fr;
  }

  nav {
    grid-column: 1 / -1;
    width: 100%;
    overflow-x: auto;
  }

  .internal-link {
    justify-self: end;
  }

  .header-actions {
    justify-self: end;
  }

  .hero {
    min-height: 78vh;
    padding-top: 78px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(8, 13, 18, 0.48) 0%, rgba(8, 13, 18, 0.96) 74%);
  }

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

  footer {
    flex-direction: column;
  }
}
