@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 {
  --paper: #f8f2e9;
  --paper-2: #f1e7da;
  --card: #fffdfa;
  --ink: #1f1726;
  --ink-soft: #4b3d57;
  --purple: #56228b;
  --purple-2: #7b45ad;
  --brown: #8b4513;
  --cream: #f8f2e9;
  --line: rgba(31, 23, 38, 0.14);
  --shadow: 0 16px 34px -22px rgba(31, 23, 38, 0.55);
  --head: 'Noto Naskh Arabic', 'Noto Sans Arabic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --body: 'Noto Sans Arabic', 'Noto Naskh Arabic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 10% 4%, rgba(86, 34, 139, 0.10), transparent 44%),
    radial-gradient(circle at 92% 16%, rgba(139, 69, 19, 0.12), transparent 46%),
    radial-gradient(circle at 46% 96%, rgba(86, 34, 139, 0.08), transparent 56%),
    radial-gradient(rgba(31, 23, 38, 0.05) 1px, transparent 1px);
  background-size: auto, auto, auto, 6px 6px;
}

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

a { color: var(--purple); }

.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;
}

/* ---------- 顶栏 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(31, 23, 38, 0.95);
  color: var(--cream);
  border-bottom: 1px solid rgba(248, 242, 233, 0.14);
  backdrop-filter: blur(12px);
}

.top-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.burger {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: 10px;
  border: 1px solid rgba(248, 242, 233, 0.28);
  border-radius: 16px 22px 16px 20px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.burger:hover { background: rgba(123, 69, 173, 0.35); border-color: var(--purple-2); }

.burger-bars { display: grid; gap: 4px; width: 20px; }
.burger-bars i { display: block; height: 2px; border-radius: 2px; background: var(--cream); }

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 12px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--head);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border-radius: 62% 38% 55% 45% / 48% 58% 42% 52%;
  background: linear-gradient(140deg, var(--purple-2), var(--brown));
}

.cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--purple-2);
  color: var(--cream);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.08em;
  transition: transform 0.22s ease, background 0.22s ease;
}
.cta:hover { background: var(--purple); transform: translateY(-1px); }

.anchors {
  overflow-x: auto;
  scrollbar-width: thin;
  border-top: 1px solid rgba(248, 242, 233, 0.12);
}
.anchors p {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 5px 14px;
  width: max-content;
  min-width: 100%;
  justify-content: center;
}
.anchors a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  white-space: nowrap;
  border-radius: 14px 20px 14px 18px;
  color: #e3d8ee;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s ease, background 0.2s ease;
}
.anchors a:hover { color: #fff; background: rgba(123, 69, 173, 0.32); }
.anchors a[aria-current="true"] { color: #fff; background: var(--purple); }

/* ---------- 全屏菜单 ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px 44px;
  overflow: auto;
  background: rgba(31, 23, 38, 0.97);
  color: var(--cream);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
body.is-drawer .drawer { opacity: 1; visibility: visible; transform: none; }
body.is-drawer { overflow: hidden; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(248, 242, 233, 0.16);
}
.drawer-brand {
  font-family: var(--head);
  font-size: 20px;
  letter-spacing: 0.16em;
}
.drawer-close {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(248, 242, 233, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font-size: 16px;
  cursor: pointer;
}
.drawer-close:hover { background: rgba(123, 69, 173, 0.4); }

.drawer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drawer-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 6px;
  color: var(--cream);
  text-decoration: none;
  font-size: 19px;
  border-bottom: 1px dashed rgba(248, 242, 233, 0.16);
}
.drawer-list em { font-style: normal; font-size: 13px; letter-spacing: 0.18em; color: var(--purple-2); }
.drawer-list a:hover { color: #fff; padding-left: 12px; transition: padding 0.2s ease; }

/* ---------- 主体骨架 ---------- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 70px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

/* ---------- 首屏 ---------- */
.hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  min-height: 100vh;
  padding: 56px 0 60px;
}
.hero-text { text-align: center; }

.hero h1 {
  margin: 0 auto 26px;
  max-width: 15em;
  font-family: var(--head);
  font-size: clamp(29px, 4.4vw, 52px);
  line-height: 1.28;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 30px;
  border-radius: 22px 30px 22px 26px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 0.12em;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, background 0.22s ease;
}
.hero-cta:hover { background: var(--purple); transform: translateY(-2px); }

.hero-media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 5;
  border-radius: 46% 54% 44% 56% / 52% 42% 58% 48%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--paper-2), #ece0d2);
  box-shadow: 0 30px 60px -40px rgba(31, 23, 38, 0.9);
}
.hero-media .hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.media-blob {
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: 56% 44% 58% 42% / 44% 56% 44% 56%;
  background: radial-gradient(circle at 30% 30%, rgba(139, 69, 19, 0.34), rgba(86, 34, 139, 0.28) 70%);
  filter: blur(14px);
  opacity: 0.75;
}
.badge {
  position: absolute;
  top: 16px;
  left: 4px;
  padding: 9px 17px;
  border-radius: 20px 26px 18px 24px;
  background: var(--purple);
  color: var(--cream);
  font-size: 15px;
  letter-spacing: 0.1em;
  box-shadow: 0 12px 26px -16px rgba(31, 23, 38, 0.9);
  transform: rotate(-3deg);
}

/* ---------- 正文 ---------- */
main > section { grid-column: 2; grid-row: 2; min-width: 0; }

main article[id] { scroll-margin-top: 132px; }

section > article {
  position: relative;
  margin-bottom: 26px;
  padding: 32px 28px 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}
section > article:nth-child(even) { border-radius: 4px 24px 4px 24px; }
section > article::before {
  content: '';
  position: absolute;
  top: 0; left: 18px;
  width: 54px; height: 5px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, var(--purple), var(--brown));
}

section h2 {
  margin: 0 0 16px;
  font-family: var(--head);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.36;
  font-weight: 600;
  color: var(--ink);
}
section h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple-2), var(--brown));
  opacity: 0.55;
}
section h3 {
  margin: 26px 0 10px;
  font-family: var(--head);
  font-size: 19px;
  font-weight: 600;
  color: var(--purple);
}
section p { margin: 0 0 1em; }
section p:last-child { margin-bottom: 0; }
section ul, section ol { margin: 0 0 1em; padding-left: 1.3em; }
section li { margin-bottom: 0.4em; }
section a { color: var(--purple); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
section a:hover { color: var(--brown); }
section blockquote {
  margin: 0 0 1em;
  padding: 14px 18px;
  border-left: 4px solid var(--purple-2);
  border-radius: 0 18px 18px 0;
  background: var(--paper-2);
  color: var(--ink-soft);
}
section strong { color: var(--ink); }
section img { border-radius: 18px 22px 18px 22px; margin: 0 0 1em; }

/* ---------- 侧栏 ---------- */
.rail { grid-column: 1; grid-row: 2; position: sticky; top: 132px; }

.rail-card {
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 4px 26px 4px 26px;
  background: linear-gradient(175deg, #fffdfa, var(--paper-2));
  box-shadow: var(--shadow);
}
.rail-card h2 {
  margin: 0 0 8px;
  font-family: var(--head);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.rail-card .subtitle {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.rail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rail-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 8px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.rail-list span { font-size: 12px; letter-spacing: 0.16em; color: var(--brown); }
.rail-list a:hover { background: rgba(86, 34, 139, 0.1); color: var(--purple); padding-left: 14px; }
.rail-list a[aria-current="true"] { background: rgba(86, 34, 139, 0.14); color: var(--purple); }

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1180px;
  margin: 0 auto 44px;
  padding: 44px 30px 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.15fr;
  gap: 30px;
  border-radius: 40px 40px 8px 8px;
  background: var(--ink);
  color: #e7dcef;
  box-shadow: var(--shadow);
}
.foot h2 {
  margin: 0 0 14px;
  font-family: var(--head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--cream);
}
.f-title { font-size: 22px !important; letter-spacing: 0.16em !important; }
.f-note { margin: 0; font-size: 16px; line-height: 1.75; color: #c6b7d4; }

.f-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.f-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 4px;
  color: #d9cae8;
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px dashed rgba(248, 242, 233, 0.14);
}
.f-links a:hover { color: #fff; }

.sub-form { display: grid; gap: 10px; }
.sub-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--cream);
  background: rgba(248, 242, 233, 0.08);
  border: 1px solid rgba(248, 242, 233, 0.26);
  border-radius: 14px 18px 14px 16px;
}
.sub-form input::placeholder { color: #b6a6c6; }
.sub-form input:focus { outline: 2px solid var(--purple-2); outline-offset: 1px; }
.sub-form button {
  min-height: 46px;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--purple-2);
  color: var(--cream);
  font-size: 16px;
  letter-spacing: 0.1em;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}
.sub-form button:hover { background: var(--purple); }

.f-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(248, 242, 233, 0.16);
  text-align: center;
}
.f-bottom .cr { margin: 0; font-size: 15px; color: #b6a6c6; letter-spacing: 0.08em; }
.totop {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(248, 242, 233, 0.28);
  color: var(--cream);
  text-decoration: none;
  font-size: 15px;
}
.totop:hover { background: rgba(123, 69, 173, 0.4); }

/* ---------- 动效 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.rail-list li { animation: rise 0.45s both; }
.rail-list li:nth-child(1) { animation-delay: 0.04s; }
.rail-list li:nth-child(2) { animation-delay: 0.09s; }
.rail-list li:nth-child(3) { animation-delay: 0.14s; }
.rail-list li:nth-child(4) { animation-delay: 0.19s; }
.rail-list li:nth-child(5) { animation-delay: 0.24s; }
.rail-list li:nth-child(6) { animation-delay: 0.29s; }
.rail-list li:nth-child(7) { animation-delay: 0.34s; }
section > article { animation: rise 0.6s both; }
section > article:nth-child(2) { animation-delay: 0.06s; }
section > article:nth-child(3) { animation-delay: 0.1s; }
section > article:nth-child(4) { animation-delay: 0.14s; }
section > article:nth-child(5) { animation-delay: 0.18s; }
section > article:nth-child(6) { animation-delay: 0.22s; }
section > article:nth-child(7) { animation-delay: 0.26s; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  main { display: block; padding: 0 18px 56px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding: 40px 0 44px;
  }
  .hero-media { max-width: 420px; margin: 0 auto; width: 100%; aspect-ratio: 5 / 4; }
  .rail { position: static; margin-top: 30px; }
  .foot { margin: 0 14px 34px; grid-template-columns: 1fr 1fr; gap: 26px; padding: 36px 22px 20px; }
  .f-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand { font-size: 17px; letter-spacing: 0.1em; }
  .cta { padding: 10px 16px; font-size: 15px; }
  .anchors p { justify-content: flex-start; padding: 5px 10px; }
  .anchors a { padding: 10px 12px; font-size: 15px; }
  section > article { padding: 26px 20px 22px; }
  .hero-media { aspect-ratio: 1 / 1; }
  .foot { grid-template-columns: 1fr; }
  .f-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

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