@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: #1f1f1f;
  --ink-soft: #4a4a4a;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: #e2e2e2;
  --r: 18px;
  --sans: 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --serif: 'Noto Naskh Arabic', 'Songti SC', 'STSong', 'SimSun', Georgia, serif;
  --e1: 0 1px 2px rgba(31, 31, 31, .10);
  --e2: 0 2px 0 rgba(31, 31, 31, .05), 0 12px 22px -14px rgba(31, 31, 31, .45);
  --e3: 0 3px 0 rgba(31, 31, 31, .06), 0 22px 40px -22px rgba(31, 31, 31, .55);
  --e4: 0 5px 0 rgba(31, 31, 31, .09), 0 38px 70px -32px rgba(31, 31, 31, .62);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--mist);
  color: var(--ink);
  font: 400 17px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: .01em;
}

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

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

menu { margin: 0; padding: 0; list-style: none; }

/* ---------- 顶部两层 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  box-shadow: var(--e2);
}

.brandrow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
}

.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--e1);
}

.finder {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 1 320px;
  min-width: 200px;
}

.finder input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 8px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--mist);
  border: 0;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(31, 31, 31, .09);
}

.finder input::placeholder { color: #8a8a8a; }

.finder input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.finder button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 20px;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--e2);
  transition: transform .18s ease, box-shadow .18s ease;
}

.finder button:hover { transform: translateY(-2px); box-shadow: var(--e3); }

.menuline {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 14px;
}

.drawer summary {
  display: none;
  list-style: none;
}

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

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  background: var(--mist);
  border-radius: 999px;
  box-shadow: var(--e1);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pills a:hover,
.pills a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: var(--e3);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: calc(100svh - 132px);
  overflow: hidden;
  background: #141414;
  color: var(--paper);
}

.hero-media {
  position: absolute;
  top: -12%;
  left: 0;
  right: 0;
  height: 128%;
  z-index: 0;
}

.hero-media--flat {
  background: radial-gradient(120% 90% at 20% 10%, #3a3a3a 0%, #141414 62%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20, 20, 20, .18) 0%, rgba(20, 20, 20, .52) 52%, rgba(20, 20, 20, .88) 100%);
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 90px 20px 96px;
  text-align: left;
}

.hero-copy h1 {
  max-width: 16em;
  margin: 0 0 18px;
  font-size: clamp(2rem, 6vw, 3.9rem);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .28);
}

.hero-sub {
  max-width: 34em;
  margin: 0 0 26px;
  font-size: 17px;
  line-height: 1.7;
  color: #ececec;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 12px 26px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: var(--e4);
  transition: transform .18s ease, box-shadow .18s ease;
}

.hero-cta:hover { transform: translateY(-3px); }

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 84px;
  z-index: 2;
  background: var(--mist);
  clip-path: polygon(0 62%, 100% 12%, 100% 100%, 0 100%);
}

/* ---------- 主体 ---------- */
.wrap {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 26px;
  max-width: 1180px;
  margin: -68px auto 0;
  padding: 0 20px 60px;
}

.rail {
  position: sticky;
  top: 156px;
  align-self: start;
  padding: 20px 18px 16px;
  background: var(--paper);
  border-radius: var(--r);
  box-shadow: var(--e3);
}

.rail h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: .04em;
}

.rail hr {
  width: 44px;
  height: 3px;
  margin: 10px 0 14px;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
}

.rail-list a {
  display: block;
  padding: 11px 12px;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  border-radius: 12px;
  transition: background .16s ease, transform .16s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: var(--mist);
  transform: translateX(3px);
}

.sheet {
  min-width: 0;
}

.prose {
  padding: clamp(20px, 4vw, 46px);
  background: var(--paper);
  border-radius: var(--r);
  box-shadow: var(--e3);
  font-size: 17px;
  line-height: 1.85;
}

.prose article { scroll-margin-top: 158px; }

.prose article + article {
  margin-top: 46px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
}

.prose h3 {
  margin: 32px 0 12px;
  font-size: 1.2rem;
}

.prose h4 { margin: 26px 0 10px; font-size: 1.05rem; }

.prose hr {
  width: 64px;
  height: 4px;
  margin: 4px 0 22px;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  opacity: .9;
}

.prose p { margin: 0 0 18px; }

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover { opacity: .68; }

.prose img {
  display: block;
  margin: 24px 0;
  border-radius: 14px;
  box-shadow: var(--e2);
}

.prose ul,
.prose ol { margin: 0 0 20px; padding-left: 1.3em; }

.prose li { margin: 0 0 8px; }

.prose blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--mist);
  border-radius: 14px;
  box-shadow: var(--e1);
}

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

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

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

.prose code {
  padding: 1px 6px;
  background: var(--mist);
  border-radius: 6px;
  font-size: .95em;
}

.prose .hit {
  animation: hit .9s ease;
}

@keyframes hit {
  0% { box-shadow: 0 0 0 0 rgba(31, 31, 31, .28); }
  100% { box-shadow: 0 0 0 14px rgba(31, 31, 31, 0); }
}

/* ---------- 回顶 ---------- */
.totop {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 56px;
  padding: 10px;
  font: inherit;
  font-size: 15px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--e4);
}

.totop[hidden] { display: none; }

/* ---------- 页脚 ---------- */
.foot {
  padding: 34px 20px 40px;
  background: var(--paper);
  box-shadow: 0 -6px 24px -18px rgba(31, 31, 31, .8);
  text-align: center;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px 18px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto 8px;
  font-size: 16px;
}

.foot-cols span:first-child { text-align: left; }
.foot-cols span:last-child { text-align: right; color: var(--ink-soft); }

.foot small {
  display: block;
  font-size: 14px;
  letter-spacing: .1em;
  color: #9a9a9a;
}

/* ---------- 中等屏 ---------- */
@media (max-width: 960px) {
  .wrap { grid-template-columns: minmax(0, 1fr); margin-top: -48px; }
  .rail { position: static; top: auto; }
  .rail hr { margin-bottom: 10px; }
  .rail-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .rail-list a { padding: 10px 14px; background: var(--mist); }
  .hero-copy { padding: 70px 20px 74px; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .brandrow { padding: 12px 16px 4px; }
  .brand { font-size: 19px; }
  .finder { flex: 1 1 100%; }
  .menuline { padding: 0 16px 12px; }
  .drawer {
    background: var(--mist);
    border-radius: 999px;
    box-shadow: var(--e1);
  }
  .drawer summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 10px 20px;
    font-size: 16px;
    list-style: none;
    cursor: pointer;
  }
  .drawer summary::after {
    content: '';
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(45deg);
  }
  .drawer[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .drawer .pills { padding: 4px 12px 14px; }
  .drawer:not([open]) .pills { padding-bottom: 0; }
  .pills a { flex: 1 1 auto; justify-content: center; background: var(--paper); }

  .hero { min-height: calc(100svh - 152px); }
  .hero-copy { padding: 56px 16px 62px; }
  .hero-copy h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
  .hero-band { height: 54px; }
  .wrap { padding: 0 16px 44px; margin-top: -34px; gap: 20px; }
  .prose { padding: 20px 18px 26px; font-size: 16px; line-height: 1.8; }
  .prose article + article { margin-top: 34px; padding-top: 28px; }
  .foot-cols { grid-template-columns: 1fr; }
  .foot-cols span:first-child,
  .foot-cols span:last-child { text-align: center; }
  .totop { right: 14px; bottom: 16px; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .hero-media img { transform: none !important; }
}

@media (max-width: 420px) {
  .pills a { padding: 10px 12px; font-size: 15px; }
  .finder button { padding: 8px 16px; }
}

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