:root {
  color-scheme: light;
  --background: #f7f9fc;
  --surface: #ffffff;
  --elevated-surface: #ffffff;
  --card: #ffffff;
  --primary: #07111f;
  --secondary: #12345a;
  --accent: #d99a00;
  --text-primary: #07111f;
  --text-secondary: #31445f;
  --muted-text: #66758c;
  --border: #dce3ee;
  --divider: #e7ecf3;
  --input-background: #ffffff;
  --placeholder: #7a8799;
  --success: #16884a;
  --warning: #b77900;
  --error: #c83333;
  --icon: #31445f;
  --shadow: rgba(14, 26, 43, 0.12);
  --on-accent: #07111f;
  --radius: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #050b14;
  --surface: #0e1a2b;
  --elevated-surface: #111f33;
  --card: rgba(17, 31, 51, 0.92);
  --primary: #07111f;
  --secondary: #12345a;
  --accent: #f5b800;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --muted-text: rgba(255, 255, 255, 0.54);
  --border: rgba(255, 255, 255, 0.12);
  --divider: rgba(255, 255, 255, 0.14);
  --input-background: rgba(17, 31, 51, 0.88);
  --placeholder: rgba(255, 255, 255, 0.48);
  --success: #35d26f;
  --warning: #f5b800;
  --error: #ff6b6b;
  --icon: rgba(255, 255, 255, 0.78);
  --shadow: rgba(0, 0, 0, 0.28);
  --on-accent: #07111f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text-primary);
  background: var(--background);
  font-family: Tahoma, "Noto Sans Arabic", "Segoe UI", Arial, sans-serif;
  line-height: 1.75;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--divider);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  padding: 10px clamp(16px, 4vw, 44px);
  backdrop-filter: blur(16px);
}

.brand-link img {
  width: 82px;
  height: 78px;
  object-fit: contain;
}

.desktop-nav,
.header-actions,
.mobile-nav,
.hero-actions,
.pill-grid,
.steps,
.service-grid,
.contact-list,
.footer-links {
  display: flex;
}

.desktop-nav {
  justify-content: center;
  gap: clamp(10px, 1.6vw, 22px);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  text-decoration: none;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.header-actions {
  align-items: center;
  gap: 8px;
}

.icon-button,
.download-link,
.button {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 44px;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  place-items: center;
  color: var(--icon);
  background: var(--card);
  cursor: pointer;
}

.download-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-weight: 800;
  text-decoration: none;
}

.download-link,
.button.primary {
  border-color: var(--accent);
  color: var(--on-accent);
  background: var(--accent);
}

.button.secondary {
  color: var(--text-primary);
  background: var(--card);
}

.button.ghost {
  color: var(--text-primary);
  background: var(--surface);
}

.menu-toggle {
  display: none;
}

.mobile-nav {
  display: none;
}

.section-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 0;
}

.hero-section {
  position: relative;
  min-height: min(720px, calc(100vh - 74px));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
}

.hero-mark {
  position: absolute;
  inset-inline-start: min(4vw, 50px);
  bottom: 28px;
  width: min(48vw, 520px);
  opacity: 0.18;
  pointer-events: none;
}

.hero-content {
  position: relative;
  width: min(760px, 100%);
  padding-block: 72px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 800;
}

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.6rem, 8vw, 6.8rem);
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 900px;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.18;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
}

p {
  color: var(--text-secondary);
}

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

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.76fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.legal-block,
.join-form,
.service-card,
.faq-list details,
.download-panel,
.metadata-list,
.contact-empty,
.simple-page article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 18px 42px var(--shadow);
}

.legal-block,
.join-form,
.download-panel,
.simple-page article {
  padding: clamp(20px, 3vw, 32px);
}

.legal-name {
  color: var(--text-primary);
  font-weight: 800;
}

dl {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

dt {
  color: var(--muted-text);
  font-size: 0.86rem;
}

dd {
  margin: 0;
  color: var(--text-primary);
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
}

.qr-small {
  width: 132px;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 8px;
}

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

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

.service-card {
  padding: 18px;
}

.service-card summary {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.service-card summary::-webkit-details-marker {
  display: none;
}

.service-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font-weight: 900;
}

.service-card h3 {
  margin: 0;
  font-size: 1.06rem;
}

.service-card p {
  margin-bottom: 0;
}

.service-card ul {
  margin: 16px 0 0;
  padding-inline-start: 20px;
  color: var(--text-secondary);
}

.steps {
  list-style: none;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0;
  margin: 0;
}

.steps li {
  flex: 1 1 220px;
  min-height: 178px;
  border-top: 4px solid var(--accent);
  padding: 18px;
  background: var(--surface);
}

.steps span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 900;
}

.steps strong {
  display: block;
  font-size: 1.12rem;
}

.pill-grid {
  flex-wrap: wrap;
  gap: 10px;
}

.pill-grid span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text-primary);
  background: var(--surface);
}

.pill-grid.compact span {
  padding-block: 8px;
}

.join-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-primary);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  background: var(--input-background);
  padding: 12px 14px;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
}

textarea {
  resize: vertical;
}

.form-message {
  min-height: 26px;
  margin: 0;
  font-weight: 700;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: var(--error);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 16px 18px;
}

.faq-list summary {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 800;
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-list a,
.contact-list span,
.contact-empty {
  display: block;
  padding: 14px 16px;
}

.contact-list a,
.contact-list span {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(160px, 0.5fr));
  gap: 24px;
  border-top: 1px solid var(--divider);
  padding: 36px clamp(16px, 4vw, 44px);
  background: var(--surface);
}

.site-footer img {
  width: 92px;
}

.site-footer nav {
  display: grid;
  gap: 10px;
  align-content: start;
}

.copyright {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted-text);
}

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.55fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: calc(100vh - 92px);
}

.download-logo {
  width: 170px;
  margin-bottom: 20px;
}

.metadata-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.metadata-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 10px;
}

.metadata-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.download-qr {
  width: 190px;
  margin: 20px auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px;
}

.install-list {
  color: var(--text-secondary);
}

.simple-page {
  min-height: 70vh;
}

.simple-page article {
  max-width: 860px;
  margin: 0 auto;
}

.not-found {
  text-align: center;
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav,
  .download-link {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .mobile-nav {
    position: fixed;
    inset: 73px 0 auto;
    display: none;
    grid-template-columns: 1fr;
    gap: 4px;
    border-bottom: 1px solid var(--divider);
    background: var(--background);
    padding: 16px;
  }

  body.nav-open .mobile-nav {
    display: grid;
  }

  .split-section,
  .download-hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .brand-link img {
    width: 66px;
    height: 62px;
  }

  .section-shell {
    width: min(100% - 24px, 560px);
  }

  .hero-section {
    min-height: calc(100vh - 64px);
  }

  .hero-mark {
    width: 86vw;
    inset-inline-start: -12vw;
  }

  .hero-content {
    padding-block: 52px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

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

  .site-footer {
    grid-template-columns: 1fr;
  }

  .metadata-row {
    display: grid;
  }
}
