@import url('https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@300;400;500;700&display=swap');

:root {
  --ink: #1c1726;
  --ink-deep: #110c1b;
  --violet: #6514ff;
  --magenta: #bf00ff;
  --paper: #f7f4ff;
  --muted: #c3b4e4;
  --line: rgba(247, 244, 255, 0.16);
  --bar: 68px;
  --pad: clamp(16px, 4vw, 44px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink-deep);
  color: var(--paper);
  font-family: 'Noto Sans Arabic', 'Noto Naskh Arabic', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(135deg, rgba(101, 20, 255, 0.16) 0 2px, transparent 2px 78px),
    repeating-linear-gradient(45deg, rgba(191, 0, 255, 0.12) 0 2px, transparent 2px 118px);
  animation: drift 26s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-118px, -118px, 0); }
}

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

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  min-height: var(--bar);
  padding: 10px var(--pad);
  background: rgba(17, 12, 27, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--violet);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  border: 2px solid var(--paper);
  text-decoration: none;
  transition: transform 0.24s ease;
}

.mark:hover { transform: rotate(-6deg); }

.mark-img { width: 100%; height: 100%; object-fit: contain; }

.mark-glyph { width: 15px; height: 15px; background: var(--paper); transform: rotate(45deg); }

.topbar-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--violet);
  border: 2px solid var(--violet);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

.cta:hover { background: var(--magenta); border-color: var(--magenta); transform: translateY(-2px); }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  border: 2px solid var(--paper);
  color: var(--paper);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.24s ease, color 0.24s ease;
}

.burger:hover { background: var(--paper); color: var(--ink); }

.strip {
  position: sticky;
  top: var(--bar);
  z-index: 40;
  overflow-x: auto;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.strip ul { display: flex; margin: 0; padding: 0; list-style: none; min-width: max-content; }

.strip a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.24s ease, background 0.24s ease;
}

.strip a:hover { color: var(--paper); background: rgba(101, 20, 255, 0.4); }

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: 1420px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--pad) 72px;
}

.rail {
  align-self: start;
  position: sticky;
  top: calc(var(--bar) + 64px);
  padding-left: 18px;
  border-left: 4px solid var(--magenta);
}

.rail-list { margin: 0 0 24px; padding: 0; list-style: none; }

.rail-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--paper);
  font-size: 17px;
  text-decoration: none;
  transition: color 0.22s ease, transform 0.22s ease;
}

.rail-list li a:hover { color: var(--magenta); transform: translateX(6px); }

.rail-list .num {
  min-width: 22px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.rail-cta {
  display: block;
  padding: 14px;
  background: linear-gradient(120deg, var(--violet), var(--magenta));
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.rail-cta:hover { filter: brightness(1.15); }

main { min-width: 0; }

section { counter-reset: sec; }

section > article {
  position: relative;
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--bar) + 76px);
}

section > article > * { position: relative; z-index: 1; }

section > article:not(.hero) { counter-increment: sec; }

section > article:not(.hero)::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  top: 14px;
  right: 0;
  z-index: 0;
  font-size: clamp(52px, 9vw, 116px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: rgba(191, 0, 255, 0.16);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  min-height: 70vh;
  overflow: hidden;
  border-top: 0;
  border-bottom: 3px solid var(--violet);
  padding-top: clamp(28px, 5vw, 48px);
  padding-bottom: clamp(36px, 6vw, 64px);
}

.ghost {
  position: absolute;
  left: -0.04em;
  top: 4%;
  z-index: 0;
  font-size: clamp(56px, 13vw, 180px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 2px rgba(191, 0, 255, 0.36);
  pointer-events: none;
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.hero h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 10px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--violet), var(--magenta));
}

.hero-art { position: relative; z-index: 1; align-self: stretch; min-height: 300px; }

.tile {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 3px solid var(--paper);
  background: linear-gradient(135deg, var(--violet), var(--magenta));
}

.t1 { inset: 0 20% 24% 0; }

.t2 { inset: 22% 0 0 24%; border-color: var(--violet); background: linear-gradient(135deg, var(--magenta), var(--ink)); }

.tile-img { width: 100%; height: 100%; object-fit: cover; }

section h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

section h3 { margin: 32px 0 10px; font-size: 21px; line-height: 1.35; color: #e5daff; }

section p { margin: 0 0 18px; max-width: 66ch; }

section ul,
section ol { margin: 0 0 20px; padding-left: 22px; max-width: 66ch; }

section li { margin: 0 0 10px; }

section a { color: #cbb6ff; text-decoration: underline; text-underline-offset: 3px; }

section a:hover { color: var(--magenta); }

section blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--magenta);
  background: rgba(101, 20, 255, 0.14);
}

section blockquote p:last-child { margin-bottom: 0; }

section table {
  display: block;
  width: 100%;
  margin: 0 0 22px;
  border-collapse: collapse;
  overflow-x: auto;
  font-size: 16px;
}

section th,
section td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }

section th { background: rgba(101, 20, 255, 0.22); }

section img { margin: 18px 0; border: 2px solid var(--line); }

section hr { margin: 32px 0; border: 0; border-top: 1px dashed var(--line); }

.subtitle {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--violet);
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.6;
  max-width: 60ch;
}

.intro h2 { color: #fff; }

.foot {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  padding: 48px var(--pad) 20px;
  background: var(--ink);
  border-top: 4px solid var(--magenta);
}

.foot-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: clamp(24px, 4vw, 48px);
  max-width: 1420px;
  margin: 0 auto;
}

.foot-addr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-style: normal;
}

.foot-name { font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }

.foot-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
}

.foot-top:hover { color: var(--paper); }

.foot-links { margin: 0; padding: 0; list-style: none; }

.foot-links li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.foot-links li a:hover { color: var(--paper); padding-left: 6px; }

.foot-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--violet);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.foot-cta:hover { background: var(--magenta); }

.foot-base {
  max-width: 1420px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 959px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding-top: 20px; }

  .rail {
    position: fixed;
    inset: 0;
    z-index: 50;
    align-self: auto;
    padding: calc(var(--bar) + 64px) var(--pad) 32px;
    background: var(--ink-deep);
    border-left: 0;
    border-right: 3px solid var(--magenta);
    overflow-y: auto;
    transform: translateX(-102%);
    transition: transform 0.28s ease;
  }

  body.menu-open .rail { transform: translateX(0); }
  body.menu-open { overflow: hidden; }

  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-art { min-height: 230px; margin-top: 12px; }

  .topbar-name { font-size: 15px; }

  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-addr { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .topbar-name { display: none; }
  .foot-cols { grid-template-columns: 1fr; }
  .foot-addr { grid-column: auto; }
}

@media (min-width: 960px) {
  body.menu-open .rail { display: none; }
  body.menu-open .shell { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
