/* ================================================================
   Manuscript About — tokens
   ================================================================ */
.about-ms {
  --ms-vellum: #F2E8D3;
  --ms-vellum-deep: #E8DAB8;
  --ms-indigo: #1B2A4A;
  --ms-indigo-ink: #0F1B33;
  --ms-gold: #B8862F;
  --ms-gold-bright: #DDB35C;
  --ms-madder: #17693b;
  --ms-ink: #3A3226;
  --ms-ink-soft: #6b5f4a;
  --ms-rule: rgba(27,42,74,0.22);
}

.about-ms {
  position: relative;
  background: var(--ms-vellum);
  color: var(--ms-ink);
  font-family: 'EB Garamond', serif;
  overflow: hidden;
  padding-top: 2rem;
}

/* vellum grain */
.about-ms::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgba(139,110,60,0.05) 0, transparent 2px),
    repeating-radial-gradient(circle at 70% 80%, rgba(139,110,60,0.04) 0, transparent 3px);
  background-size: 180px 180px, 240px 240px;
}

.about-ms h1, .about-ms h2, .about-ms h3 {
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: var(--ms-indigo);
  line-height: 1.14;
}
.about-ms .ms-accent { color: var(--ms-madder); font-style: italic; font-weight: 400; }
.about-ms .ms-rubric {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ms-madder);
  font-weight: 600;
}

/* ================================================================
   Folio shell
   ================================================================ */
.about-ms .ms-folio {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 56px 0 108px;
  z-index: 1;
}
.about-ms .ms-margin-rule {
  position: absolute;
  left: 64px; top: 0; bottom: 0;
  width: 1px;
  background: var(--ms-rule);
}
.about-ms .ms-margin-rule.outer { left: 76px; }
.about-ms .ms-gutter-marks {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 150px;
  gap: 120px;
}
.about-ms .ms-gutter-marks svg { opacity: 0.55; }

/* ================================================================
   Opening / Incipit
   ================================================================ */
.about-ms .ms-opening {
  padding: 12px 0 28px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: start;
}
.about-ms .ms-opening-text { padding-top: 6px; }
.about-ms .ms-opening-text .ms-rubric {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.about-ms .ms-drop-cap-wrap { display: flex; gap: 4px; margin-bottom: 8px; }
.about-ms .ms-drop-cap {
  font-family: 'Amiri', serif;
  font-weight: 700;
  font-size: 4rem;
  line-height: 0.78;
  color: var(--ms-madder);
  position: relative;
  flex-shrink: 0;
  padding-top: 4px;
}
.about-ms .ms-drop-cap::after {
  content: '';
  position: absolute;
  inset: -10px -12px;
  border: 1px solid var(--ms-gold);
  opacity: 0.5;
  z-index: -1;
}
.about-ms .ms-title-rest {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  padding-top: 8px;
  letter-spacing: -0.005em;
}
.about-ms .ms-lede {
  font-size: 1rem;
  font-style: italic;
  color: var(--ms-indigo);
  font-family: 'Amiri', serif;
  font-weight: 400;
  line-height: 1.45;
  max-width: 56ch;
  margin: 10px 0 10px;
}
.about-ms .ms-justified {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--ms-ink);
  text-align: justify;
  hyphens: auto;
  max-width: 58ch;
  margin-bottom: 8px;
}

/* marginalia */
.about-ms .ms-marginalia {
  margin-top: 38px;
  border-top: 1px solid var(--ms-rule);
  padding-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 30px;
}
.about-ms .ms-gloss {
  display: flex;
  gap: 11px;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--ms-indigo);
  line-height: 1.5;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.about-ms .ms-gloss.in-view { opacity: 1; transform: translateX(0); }
.about-ms .ms-gloss-mark { flex-shrink: 0; margin-top: 2px; }

/* shamsa column */
.about-ms .ms-shamsa-column {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.about-ms .ms-shamsa-stage {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-ms .ms-shamsa-ray {
  position: absolute;
  inset: 0;
  animation: msSpin140 140s linear infinite;
}
.about-ms .ms-shamsa-mid {
  position: absolute;
  inset: 0;
  animation: msSpin110rev 110s linear infinite;
}
@keyframes msSpin140 { to { transform: rotate(360deg); } }
@keyframes msSpin110rev { to { transform: rotate(-360deg); } }
.about-ms .ms-shamsa-pulse {
  animation: msCorePulse 5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes msCorePulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* stat roundels */
.about-ms .ms-stat-roundels {
  display: flex;
  gap: 0;
  margin-top: 8px;
  width: 100%;
  justify-content: space-between;
}
.about-ms .ms-roundel {
  text-align: center;
  flex: 1;
  position: relative;
  padding-top: 16px;
}
.about-ms .ms-roundel::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ms-gold);
}
.about-ms .ms-roundel .ms-num {
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: var(--ms-indigo);
  font-size: 1.5rem;
  display: block;
}
.about-ms .ms-roundel .ms-lbl {
  font-family: 'Cinzel', serif;
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ms-ink-soft);
  display: block;
  margin-top: 3px;
}

/* ================================================================
   Colophon divider
   ================================================================ */
.about-ms .ms-colophon {
  position: relative;
  text-align: left;
  padding: 4px 0 16px;
}
.about-ms .ms-colophon .ms-rubric { justify-content: flex-start; display: flex; margin-bottom: 8px; }
.about-ms .ms-colophon h2 { font-size: clamp(1.2rem, 2vw, 1.7rem); }
.about-ms .ms-flourish {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-ms .ms-flourish svg { animation: msSpin110rev 60s linear infinite; transform-origin: center; }

/* ================================================================
   Firman / Founder tribute
   ================================================================ */
.about-ms .ms-firman-section { padding: 0 0 28px; }
.about-ms .ms-firman {
  position: relative;
  background: linear-gradient(var(--ms-vellum-deep), var(--ms-vellum-deep));
  border: 1px solid var(--ms-rule);
  box-shadow: 0 50px 90px -40px rgba(15,27,51,0.4);
  display: grid;
  grid-template-columns: 340px 1fr;
  clip-path: polygon(
    0% 1%, 2% 0%, 5% 1.2%, 8% 0.3%, 12% 1%, 16% 0.2%, 20% 1%, 24% 0.4%, 28% 1%, 32% 0.3%,
    36% 1%, 40% 0.2%, 44% 1%, 48% 0.3%, 52% 1%, 56% 0.2%, 60% 1%, 64% 0.3%, 68% 1%, 72% 0.2%,
    76% 1%, 80% 0.3%, 84% 1%, 88% 0.2%, 92% 1%, 96% 0.3%, 100% 1%,
    100% 99%, 96% 100%, 92% 99%, 88% 100%, 84% 99%, 80% 100%, 76% 99%, 72% 100%, 68% 99%,
    64% 100%, 60% 99%, 56% 100%, 52% 99%, 48% 100%, 44% 99%, 40% 100%, 36% 99%, 32% 100%,
    28% 99%, 24% 100%, 20% 99%, 16% 100%, 12% 99%, 8% 100%, 4% 99%, 0% 100%
  );
}
.about-ms .ms-firman-seal-panel {
  position: relative;
  background: radial-gradient(circle at 30% 20%, rgba(221,179,92,0.14), transparent 55%), var(--ms-indigo);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  gap: 12px;
  overflow: hidden;
}
.about-ms .ms-firman-seal-panel .ms-lattice {
  position: absolute;
  inset: 0;
  opacity: 0.14;
}
.about-ms .ms-seal-ring { position: relative; width: 110px; height: 110px; }
.about-ms .ms-seal-ring .ms-ring-spin { animation: msSpin110rev 50s linear infinite; transform-origin: 90px 90px; }
.about-ms .ms-seal-ring .ms-ring-spin-rev { animation: msSpin140 65s linear infinite; transform-origin: 90px 90px; }
.about-ms .ms-seal-caption { text-align: center; }
.about-ms .ms-seal-caption .ms-name {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--ms-gold-bright);
  font-size: 1.15rem;
}
.about-ms .ms-seal-caption .ms-tag {
  font-family: 'Cinzel', serif;
  color: rgba(242,232,211,0.6);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 7px;
}
.about-ms .ms-seal-founded {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid rgba(221,179,92,0.35);
}
.about-ms .ms-seal-founded .ms-yr {
  font-family: 'Amiri', serif;
  font-weight: 700;
  color: var(--ms-gold-bright);
  font-size: 1.3rem;
}
.about-ms .ms-seal-founded .ms-yrlbl {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: rgba(242,232,211,0.55);
  text-transform: uppercase;
}

/* deed text */
.about-ms .ms-firman-text { padding: 20px 28px 20px 24px; }
.about-ms .ms-firman-text .ms-rubric { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.about-ms .ms-firman-text h3 { font-size: 1.2rem; margin-bottom: 10px; }
.about-ms .ms-firman-text p {
  font-size: 0.92rem;
  color: var(--ms-ink);
  line-height: 1.6;
  text-align: justify;
  margin-bottom: 8px;
}
.about-ms .ms-seal-stamp-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
}
.about-ms .ms-seal-stamp-divider .ms-l { flex: 1; height: 1px; background: var(--ms-rule); }
.about-ms .ms-provisions-label {
  font-family: 'Cinzel', serif;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  color: var(--ms-indigo);
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.about-ms .ms-provisions-list { display: flex; flex-direction: column; gap: 2px; }
.about-ms .ms-provision {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--ms-rule);
  font-size: 0.88rem;
  color: var(--ms-ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.about-ms .ms-provision:last-child { border-bottom: none; }
.about-ms .ms-provision.in-view { opacity: 1; transform: translateY(0); }
.about-ms .ms-provision .ms-idx {
  font-family: 'Amiri', serif;
  font-style: italic;
  color: var(--ms-madder);
  font-size: 0.95rem;
  flex-shrink: 0;
  width: 22px;
}

/* reveal */
.about-ms .ms-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.about-ms .ms-reveal.in-view { opacity: 1; transform: translateY(0); }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 980px) {
  .about-ms .ms-folio { padding: 0 24px; }
  .about-ms .ms-margin-rule, .about-ms .ms-margin-rule.outer, .about-ms .ms-gutter-marks { display: none; }
  .about-ms .ms-opening { grid-template-columns: 1fr; padding: 70px 0 60px; gap: 44px; }
  .about-ms .ms-shamsa-column { position: static; order: -1; }
  .about-ms .ms-shamsa-stage { width: 280px; height: 280px; margin: 0 auto; }
  .about-ms .ms-drop-cap { font-size: 4.6rem; }
  .about-ms .ms-marginalia { grid-template-columns: 1fr; }
  .about-ms .ms-firman { grid-template-columns: 1fr; }
  .about-ms .ms-firman-seal-panel { padding: 44px 24px; }
  .about-ms .ms-firman-text { padding: 40px 26px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .about-ms .ms-shamsa-ray, .about-ms .ms-shamsa-mid, .about-ms .ms-shamsa-pulse,
  .about-ms .ms-seal-ring .ms-ring-spin, .about-ms .ms-seal-ring .ms-ring-spin-rev,
  .about-ms .ms-flourish svg {
    animation: none !important;
  }
}