@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: #f5e6c8;
  --paper-hi: #fbf4e0;
  --paper-lo: #ecdbae;
  --amber: #d4a574;
  --amber-d: #9c6c37;
  --ink: #262117;
  --ink-soft: rgba(38, 33, 23, .68);
  --line: rgba(38, 33, 23, .16);
  --dot: rgba(38, 33, 23, .14);
  --shadow: 0 10px 26px rgba(38, 33, 23, .16);
  --font: "Noto Sans Arabic", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --head: "Noto Naskh Arabic", "Songti SC", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  padding-bottom: 118px;
  overflow-x: hidden;
  background-image:
    linear-gradient(180deg, rgba(212, 165, 116, .18), transparent 22%),
    radial-gradient(circle at 88% 0, rgba(212, 165, 116, .35), transparent 42%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: .2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23g)'/%3E%3C/svg%3E");
}

img { max-width: 100%; }

a { color: inherit; }

.menu-switch {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sheet {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(2rem, 7vh, 5rem) 0 clamp(2rem, 5vh, 3.5rem);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 17px 17px;
}

.hero::after {
  content: "";
  position: absolute;
  top: -25%;
  right: -12%;
  width: 62%;
  height: 150%;
  pointer-events: none;
  opacity: .75;
  background:
    radial-gradient(circle at 70% 28%, rgba(212, 165, 116, .75), transparent 58%),
    radial-gradient(circle at 28% 78%, rgba(251, 244, 224, .9), transparent 62%);
  filter: blur(12px);
  animation: leak 15s ease-in-out infinite alternate;
}

@keyframes leak {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: .55; }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.1); opacity: .85; }
}

.collage {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: .7rem;
  align-items: start;
  z-index: 1;
}

.pol {
  margin: 0;
  padding: 8px 8px 26px;
  background: var(--paper-hi);
  border: 1px solid rgba(38, 33, 23, .12);
  border-radius: 2px;
  box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1), box-shadow .4s ease;
}

.pol--a { transform: rotate(-3.6deg); }
.pol--b { transform: rotate(4.2deg) translateY(1.9rem); }

.pol:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 18px 36px rgba(38, 33, 23, .26);
}

.pol img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(.3) contrast(1.06) saturate(.8);
}

.pol-fill {
  display: block;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, var(--amber), var(--paper-lo) 58%, var(--paper-hi));
}

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

.eyebrow {
  margin: 0 0 .6rem;
  font-size: .95rem;
  letter-spacing: .38em;
  color: var(--amber-d);
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.16;
  letter-spacing: .01em;
  animation: vhs 8s linear infinite;
}

@keyframes vhs {
  0%, 91%, 100% { transform: none; }
  93% { transform: translate(2px, -1px) skewX(-1.4deg); }
  95% { transform: translate(-1px, 1px) skewX(.9deg); }
  97% { transform: translate(1px, 0) skewX(0); }
}

.lead {
  margin: 1rem 0 0 auto;
  max-width: 32ch;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 正文框架 ---------- */
.frame {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 2rem clamp(1.2rem, 3vw, 2.6rem);
  align-items: start;
  padding: 2.4rem 0 3rem;
  border-top: 2px solid var(--ink);
}

.rail {
  position: sticky;
  top: 1.4rem;
  align-self: start;
  padding: 1.1rem 1rem 1.3rem;
  background: rgba(251, 244, 224, .82);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.rail h2 {
  margin: 0 0 .25rem;
  font-family: var(--head);
  font-size: 1.15rem;
  line-height: 1.4;
}

.rail .subtitle {
  margin: 0 0 .9rem;
  font-size: .9rem;
  color: var(--ink-soft);
  letter-spacing: .06em;
}

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

.rail-list li {
  opacity: 0;
  animation: rise .55s ease forwards;
}

.rail-list li:nth-child(1) { animation-delay: .04s; }
.rail-list li:nth-child(2) { animation-delay: .09s; }
.rail-list li:nth-child(3) { animation-delay: .14s; }
.rail-list li:nth-child(4) { animation-delay: .19s; }
.rail-list li:nth-child(5) { animation-delay: .24s; }
.rail-list li:nth-child(6) { animation-delay: .29s; }
.rail-list li:nth-child(7) { animation-delay: .34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.rail-list a {
  display: flex;
  gap: .5rem;
  align-items: baseline;
  min-height: 40px;
  padding: .4rem .1rem;
  text-decoration: none;
  font-size: .97rem;
  border-bottom: 1px dashed var(--line);
  transition: color .2s ease, padding-left .2s ease;
}

.rail-list li:last-child a { border-bottom: 0; }

.rail-list a:hover {
  color: var(--amber-d);
  padding-left: .3rem;
}

.idx {
  font-family: var(--head);
  font-size: .78rem;
  color: var(--amber-d);
  letter-spacing: .06em;
}

/* ---------- 正文排版 ---------- */
.prose {
  max-width: 68ch;
  font-size: 1.0625rem;
  line-height: 1.9;
}

.prose section {
  scroll-margin-top: 1.4rem;
  padding-bottom: 2rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px dashed var(--line);
}

.prose section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.prose h2 {
  margin: 0 0 .5rem;
  font-family: var(--head);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  letter-spacing: .01em;
}

.prose h2::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: 3px;
  margin-bottom: .7rem;
  background: var(--amber);
}

.prose .subtitle,
.prose .subhead,
.prose .lead,
.prose .desc {
  margin: 0 0 1.2rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.prose h3 {
  margin: 1.8rem 0 .5rem;
  font-family: var(--head);
  font-size: 1.2rem;
  line-height: 1.45;
}

.prose p { margin: 0 0 1.1rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.4rem;
}

.prose li { margin-bottom: .5rem; }

.prose a {
  color: var(--amber-d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--ink); }

.prose strong { color: var(--ink); }

.prose blockquote {
  margin: 1.5rem 0;
  padding: .9rem 1.2rem;
  border-left: 3px solid var(--amber);
  border-radius: 0 4px 4px 0;
  background: rgba(212, 165, 116, .2);
}

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

.prose figure { margin: 1.5rem 0; }

.prose img {
  height: auto;
  border-radius: 4px;
  filter: sepia(.24) contrast(1.04) saturate(.85);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 1rem;
}

.prose th,
.prose td {
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th { background: rgba(212, 165, 116, .26); }

.prose hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 2rem 0;
}

/* ---------- 全屏菜单 ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 2rem;
  padding: 3rem clamp(1.2rem, 6vw, 4rem) 9rem;
  background: var(--ink);
  color: var(--paper);
  background-image: radial-gradient(rgba(245, 230, 200, .14) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2%);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
}

#menu-switch:checked ~ .veil {
  opacity: 1;
  visibility: visible;
  transform: none;
}

body:has(#menu-switch:checked) { overflow: hidden; }

.veil-nav dl {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: .15rem .9rem;
  margin: 0;
}

.veil-nav dt {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.veil-nav dd { margin: 0; }

.veil-nav a {
  display: block;
  min-height: 46px;
  padding: .7rem 0;
  font-family: var(--head);
  font-size: 1.2rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 230, 200, .16);
  transition: color .2s ease, transform .2s ease;
}

.veil-nav a:hover {
  color: var(--amber);
  transform: translateX(4px);
}

.veil-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 230, 200, .22);
}

.veil-foot address {
  font-style: normal;
  letter-spacing: .18em;
  color: var(--amber);
}

.veil-mini {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.veil-mini a {
  display: flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  font-size: .95rem;
  color: rgba(245, 230, 200, .8);
}

.veil-mini a:hover { color: var(--amber); }

.veil-foot .copy {
  margin: 0;
  font-size: .9rem;
  color: rgba(245, 230, 200, .6);
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  grid-template-areas:
    "l mark r btn"
    "meta meta meta meta";
  align-items: center;
  gap: 0 .9rem;
  padding: .35rem clamp(.6rem, 3vw, 1.6rem) calc(.35rem + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid var(--amber);
  box-shadow: 0 -10px 26px rgba(38, 33, 23, .28);
}

.dock-nav--l { grid-area: l; }
.dock-nav--r { grid-area: r; }

.dock-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 .1rem;
  margin: 0;
}

.dock-nav--l dl { justify-content: flex-end; }
.dock-nav--r dl { justify-content: flex-start; }

.dock-nav dt {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: .3rem;
}

.dock-nav dd { margin: 0; }

.dock-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .4rem .5rem;
  font-size: .95rem;
  text-decoration: none;
  color: rgba(245, 230, 200, .9);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.dock-nav a:hover {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.dock-mark {
  grid-area: mark;
  justify-self: center;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .2rem .8rem;
  font-family: var(--head);
  font-size: 1.05rem;
  letter-spacing: .2em;
  text-decoration: none;
  color: var(--paper);
  border: 1px solid rgba(245, 230, 200, .35);
  border-radius: 4px;
}

.dock-mark:hover { border-color: var(--amber); color: var(--amber); }

.menu-btn {
  grid-area: btn;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 64px;
  padding: .4rem .8rem;
  font-size: .95rem;
  letter-spacing: .12em;
  color: var(--ink);
  background: var(--amber);
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: background .2s ease, transform .2s ease;
}

.menu-btn:hover { background: var(--paper); transform: translateY(-1px); }
.menu-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

.mb-close { display: none; }

#menu-switch:checked ~ .dock .mb-open { display: none; }
#menu-switch:checked ~ .dock .mb-close { display: inline; }

.dock-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: .1rem;
  border-top: 1px solid rgba(245, 230, 200, .16);
  font-size: .88rem;
  color: rgba(245, 230, 200, .68);
}

.dock-meta address {
  font-style: normal;
  letter-spacing: .16em;
  color: var(--amber);
}

.dock-mini {
  display: flex;
  gap: .2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dock-mini a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: .2rem .45rem;
  text-decoration: none;
  color: rgba(245, 230, 200, .78);
}

.dock-mini a:hover { color: var(--amber); }

.dock-meta .copy {
  margin: 0 0 0 auto;
  font-size: .85rem;
  color: rgba(245, 230, 200, .55);
}

/* ---------- 移动端 ---------- */
@media (max-width: 859px) {
  body { padding-bottom: 86px; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 1.6rem;
    gap: 1.6rem;
  }

  .hero-copy { order: -1; }

  .lead { margin-right: 0; }

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

  .pol--b { transform: rotate(3.6deg) translateY(1.2rem); }

  .frame {
    grid-template-columns: 1fr;
    padding-top: 1.8rem;
  }

  .rail {
    order: 2;
    position: static;
  }

  .dock {
    grid-template-columns: 1fr auto;
    grid-template-areas: "mark btn";
  }

  .dock-nav,
  .dock-meta { display: none; }

  .dock-mark { justify-self: start; }

  .veil { padding-top: 2rem; }
}

@media (min-width: 860px) and (max-width: 1040px) {
  .dock-nav a { padding: .4rem .35rem; font-size: .9rem; }
  .dock { gap: 0 .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero::after,
  .hero-copy h1,
  .rail-list li {
    animation: none;
    opacity: 1;
  }

  .pol,
  .menu-btn,
  .veil,
  .rail-list a,
  .dock-nav a { transition: none; }
}

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