@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: #fafaf8;
  --mid: #4a4a4a;
  --ink: #1a1a1a;
  --line: #c8c4ba;
  --wash: rgba(26, 26, 26, 0.06);
  --font: "Noto Naskh Arabic", "Noto Sans Arabic", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.76;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23p)' opacity='0.2'/%3E%3C/svg%3E");
}

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

/* 顶栏 */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 16px 20px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 5px 3px 6px 4px;
  transform: rotate(-3deg);
  filter: grayscale(1) contrast(1.1);
}

.masthead .drawer { margin-left: auto; }

.drawer { position: relative; }

.drawer summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 16px;
  border: 2px solid var(--ink);
  border-radius: 6px 4px 5px 3px;
  background: var(--paper);
  user-select: none;
}

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

.drawer summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.drawer[open] summary { background: var(--ink); color: var(--paper); }

.drawer-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 210px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 5px 7px 4px 6px;
  box-shadow: 6px 6px 0 var(--wash);
}

.drawer-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.drawer-link:hover { background: var(--wash); }

.cta-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 16px;
  border-radius: 4px 6px 3px 5px;
  border-bottom: 4px solid var(--mid);
  transform: rotate(0.8deg);
}

.cta-top:hover { background: var(--mid); }

/* 粘性锚点条 */
.anchors {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow-x: auto;
  background: rgba(250, 250, 248, 0.97);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.anchors ul {
  display: flex;
  gap: 4px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 6px 14px;
  list-style: none;
}

.anchor-link {
  display: block;
  white-space: nowrap;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  text-decoration: none;
  border-radius: 5px 4px 6px 3px;
}

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

/* 主体栅格：侧栏在左 */
main {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px 20px 44px;
}

.rail {
  position: sticky;
  top: 78px;
  align-self: start;
  padding: 14px 14px 18px;
  border: 2px solid var(--ink);
  border-radius: 5px 3px 6px 4px;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(-0.7deg);
}

.eyebrow {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.24em;
  color: var(--mid);
}

.rail-title {
  margin: 2px 0 8px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

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

.rail-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}

.rail-link:hover { color: var(--mid); padding-left: 4px; }

.sheet { min-width: 0; }

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: min(70vh, 560px);
  padding: 24px 4px 26px;
  overflow: hidden;
}

.hero-ghost {
  position: absolute;
  top: 1%;
  right: 0;
  font-size: clamp(52px, 13vw, 148px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.045em;
  color: var(--ink);
  opacity: 0.085;
  white-space: nowrap;
  pointer-events: none;
}

.hero-collage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-collage img {
  position: absolute;
  object-fit: cover;
  background: #e9e7e0;
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: 9px 9px 0 var(--wash);
  filter: grayscale(1) contrast(1.07);
}

.shot-a {
  width: 38%;
  max-width: 290px;
  height: 54%;
  left: 0;
  top: 9%;
  transform: rotate(-3deg);
}

.shot-b {
  width: 29%;
  max-width: 220px;
  height: 36%;
  left: 24%;
  bottom: 7%;
  transform: rotate(2.6deg);
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5.2vw, 3.1rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-shadow: 0 1px 0 rgba(250, 250, 248, 0.9);
}

/* 正文 */
.sheet section {
  padding: 34px 0 42px;
  border-top: 2px dashed rgba(26, 26, 26, 0.22);
  scroll-margin-top: 86px;
}

.sheet section:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.sheet h2 {
  position: relative;
  display: inline-block;
  margin: 0.1em 0 0.62em;
  font-size: clamp(1.35rem, 2.7vw, 1.85rem);
  line-height: 1.34;
}

.sheet h2::after {
  content: "";
  position: absolute;
  left: -1%;
  right: -1%;
  bottom: -0.3em;
  height: 3px;
  background: var(--ink);
  border-radius: 3px;
  transform: rotate(-0.6deg);
  opacity: 0.8;
}

.sheet h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.14rem;
  line-height: 1.45;
}

.sheet p { margin: 0 0 1.06em; }

.sheet a {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

.sheet a:hover { text-decoration-style: solid; background: var(--wash); }

.sheet ul, .sheet ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.sheet li { margin: 0.32em 0; }
.sheet li::marker { color: var(--mid); }

.sheet blockquote {
  margin: 1.3em 0;
  padding: 12px 18px;
  border-left: 4px solid var(--mid);
  background: rgba(26, 26, 26, 0.035);
  transform: rotate(-0.3deg);
}

.sheet figure { margin: 1.4em 0; }
.sheet figure img { border: 3px solid var(--ink); border-radius: 4px; }
.sheet figcaption { margin-top: 8px; font-size: 16px; color: var(--mid); }

/* 滚动揭示 */
div.reveal {
  opacity: 0;
  transform: translateY(14px);
}

div.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s steps(5, end), transform 0.4s ease-out;
}

/* 页脚 */
.folio {
  margin-top: 40px;
  padding: 36px 20px 22px;
  background: var(--ink);
  color: #f2f0ea;
  border-top: 6px solid var(--mid);
}

.folio-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 26px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

.folio-brand {
  font-style: normal;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.folio-brand a { text-decoration: none; }

.folio-col ul, .folio .tiny {
  margin: 0;
  padding: 0;
  list-style: none;
}

.folio-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 240, 234, 0.2);
}

.folio-link:hover { color: #ffffff; padding-left: 4px; }

.folio-cta a {
  display: block;
  padding: 18px 16px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  background: #f2f0ea;
  border-radius: 4px;
  border-bottom: 6px solid #918d83;
  transform: rotate(-1.1deg);
}

.folio-cta a:hover { background: #ffffff; }

.folio-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 18px;
  max-width: 1120px;
  margin: 30px auto 0;
  padding-top: 14px;
  border-top: 1px solid rgba(242, 240, 234, 0.28);
  font-size: 16px;
}

.folio-foot .copy { margin: 0; color: rgba(242, 240, 234, 0.75); }
.folio-foot .tiny { display: flex; gap: 16px; }

.tiny-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  text-decoration: none;
  color: rgba(242, 240, 234, 0.85);
}

.tiny-link:hover { color: #ffffff; }

/* 窄屏 */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 20px 16px 34px;
  }

  .rail {
    position: static;
    transform: none;
    padding: 12px;
  }

  .rail-title { margin-bottom: 6px; font-size: 20px; }

  .rail-list { display: flex; flex-wrap: wrap; gap: 6px; }

  .rail-list li { flex: 0 0 auto; }

  .rail-link {
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 14px 0 10px;
    overflow: visible;
  }

  .hero-ghost {
    position: static;
    order: 0;
    font-size: 40px;
    opacity: 0.14;
    margin-bottom: 4px;
  }

  .hero-copy { order: 1; max-width: 100%; text-align: left; }

  .hero-collage {
    position: static;
    order: 2;
    display: flex;
    gap: 10px;
    margin-top: 16px;
  }

  .hero-collage img {
    position: static;
    width: 50%;
    height: 148px;
    flex: 1 1 0;
    transform: rotate(-1.5deg);
  }

  .hero-collage img + img { transform: rotate(1.8deg); }

  .folio-grid { grid-template-columns: 1fr 1fr; }
  .folio-brand, .folio-cta { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .brand { font-size: 18px; }
  .folio-grid { grid-template-columns: 1fr; }
  .folio-foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  div.reveal { opacity: 1; transform: none; transition: none; }
  .rail, .cta-top, .folio-cta a, .hero-collage img { transform: none; }
}

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