* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --night: #081320;
  --night2: #0d1c2a;
  --card1: #14293c;
  --card2: #0e2032;
  --sand: #e9dcc0;
  --cream: #f7f0df;
  --text: #e9e2cd;
  --muted: #b9ad8f;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.35);
  --gold-faint: rgba(212, 175, 55, 0.14);
  --red: #8e2434;
  --teal: #155e63;
  --font-head: "Aref Ruqaa", "Tajawal", serif;
  --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --card-w: 150px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 500px at 85% -5%, rgba(21, 94, 99, 0.25), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(212, 175, 55, 0.08), transparent 55%),
    var(--night);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

body.lock {
  overflow: hidden;
}

::selection {
  background: var(--gold);
  color: #1a1405;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--night2);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold), #6d5417);
  border-radius: 99px;
}

.container {
  width: min(1150px, 92%);
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

.section {
  padding: 92px 0;
  scroll-margin-top: 84px;
}

.pattern-bg {
  background-image:
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.045) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.045) 0 1px, transparent 1px 26px);
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 54px;
}

.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  color: var(--cream);
  margin: 8px 0 10px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.kicker::before,
.kicker::after {
  content: "";
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.kicker::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn-gold {
  background: linear-gradient(135deg, #f0d67a, var(--gold) 45%, #a37f1d);
  color: #221a04;
  border: none;
  box-shadow: 0 10px 26px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(212, 175, 55, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
}

.btn-ghost:hover {
  background: var(--gold-faint);
  transform: translateY(-3px);
}

.gold-text {
  background: linear-gradient(45deg, #8a6a1c, #d4af37, #f6e27a, #d4af37, #8a6a1c);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}

.sadu-strip {
  height: 14px;
  border-block: 1px solid rgba(212, 175, 55, 0.5);
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0 16px,
    #101c29 16px 20px,
    var(--sand) 20px 34px,
    #101c29 34px 38px,
    var(--gold) 38px 42px,
    #101c29 42px 46px
  );
  opacity: 0.9;
}

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 600;
  background: rgba(8, 19, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  color: var(--gold);
  font-size: 1.5rem;
  animation: markSpin 16s linear infinite;
  display: inline-block;
}

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  color: #d8cfb4;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
  transition: color 0.25s;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.main-nav a:hover {
  color: var(--gold);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1px solid var(--gold-soft);
  background: rgba(212, 175, 55, 0.08);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}

.mode-btn.active {
  background: linear-gradient(135deg, #f0d67a, var(--gold) 50%, #a37f1d);
  color: #221a04;
  border-color: transparent;
}

.mode-btn.small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

#intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
  padding: 24px;
  cursor: pointer;
  background:
    radial-gradient(900px 480px at 50% 28%, #14324c, transparent 70%),
    radial-gradient(700px 400px at 50% 110%, rgba(142, 36, 52, 0.35), transparent 60%),
    var(--night);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro.hide {
  opacity: 0;
  visibility: hidden;
}

.intro-frame {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 24px;
  pointer-events: none;
}

.intro-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(212, 175, 55, 0.25);
  border-radius: 18px;
}

.intro-mark {
  font-size: 2.6rem;
  color: var(--gold);
  animation: markSpin 14s linear infinite, floaty 5s ease-in-out infinite;
}

.intro-title {
  font-family: var(--font-head);
  font-size: clamp(3rem, 12vw, 6.5rem);
  line-height: 1.25;
  display: flex;
  gap: 0.35em;
  flex-wrap: wrap;
  justify-content: center;
  filter: drop-shadow(0 10px 30px rgba(212, 175, 55, 0.35));
}

.intro-title span {
  display: inline-block;
  background: linear-gradient(45deg, #8a6a1c, #d4af37, #f9edb8, #d4af37, #8a6a1c);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wordIn 0.95s cubic-bezier(0.2, 0.7, 0.3, 1) both, shimmer 5s linear infinite;
  animation-delay: calc(var(--i) * 0.38s), 1.4s;
}

.intro-tag {
  color: var(--muted);
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  max-width: 560px;
  animation: wordIn 1s 1.3s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

#enterBtn {
  margin-top: 10px;
  animation: wordIn 1s 1.9s cubic-bezier(0.2, 0.7, 0.3, 1) both, breathe 3s 3.2s ease-in-out infinite;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.05) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.05) 0 1px, transparent 1px 30px);
}

.hero-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-top: 90px;
  padding-bottom: 160px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 9vw, 5.6rem);
  line-height: 1.3;
  margin: 10px 0 18px;
}

.hero-lead {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.2rem);
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.orn {
  position: absolute;
  color: var(--gold);
  opacity: 0.35;
  z-index: 1;
  animation: floaty 6s ease-in-out infinite;
}

.o1 {
  top: 18%;
  inset-inline-start: 12%;
  font-size: 2.2rem;
}

.o2 {
  top: 30%;
  inset-inline-end: 10%;
  font-size: 3rem;
  animation-delay: 1.2s;
}

.o3 {
  bottom: 32%;
  inset-inline-start: 20%;
  font-size: 1.6rem;
  animation-delay: 2.2s;
}

.dunes {
  position: absolute;
  bottom: -2px;
  inset-inline: 0;
  width: 100%;
  height: clamp(90px, 18vw, 220px);
  z-index: 2;
}

.d1 {
  fill: rgba(212, 175, 55, 0.22);
  animation: duneDrift 12s ease-in-out infinite alternate;
}

.d2 {
  fill: rgba(233, 220, 192, 0.1);
  animation: duneDrift 15s ease-in-out infinite alternate-reverse;
}

.tree-tools {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}

.tree-canvas {
  transition: opacity 0.26s ease, transform 0.26s ease;
  padding-bottom: 20px;
}

.tree-canvas.switching {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
}

.tree-swipe-hint {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: -28px auto 22px;
}

.tree-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  padding-bottom: 10px;
}

.tree-scroll::-webkit-scrollbar {
  height: 6px;
}

.tree-scroll::-webkit-scrollbar-track {
  background: rgba(212, 175, 55, 0.08);
  border-radius: 99px;
}

.tree-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--gold), #6d5417);
  border-radius: 99px;
}

.level {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.rail-row {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.rail-line {
  position: absolute;
  top: 0;
  inset-inline-start: var(--rail-inset);
  inset-inline-end: var(--rail-inset);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), var(--gold), rgba(212, 175, 55, 0.15));
  transform-origin: center;
  animation: growX 0.55s ease both;
  animation-delay: 120ms;
}

.cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 0;
  padding-inline: clamp(6px, 1.2vw, 16px);
}

.connector-v {
  width: 2px;
  height: 34px;
  background: linear-gradient(180deg, var(--gold), rgba(212, 175, 55, 0.25));
  transform-origin: top;
  animation: growY 0.5s ease both;
  animation-delay: var(--d, 0ms);
}

.node-card {
  width: min(var(--card-w), 100%);
  background: linear-gradient(180deg, var(--card1), var(--card2));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 18px;
  padding: 12px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: riseIn 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: var(--d, 0ms);
}

.node-card:hover,
.node-card:focus-visible {
  transform: scale(1.04);
  border-color: var(--gold);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.5), 0 0 22px rgba(212, 175, 55, 0.25);
  outline: none;
}

.node-card.founder {
  --card-w: 176px;
  border-width: 2px;
  background: linear-gradient(180deg, #1c3a58, #0d1e30);
  border-color: rgba(240, 214, 122, 0.65);
}

.node-card.founder .photo-wrap {
  width: 106px;
  height: 106px;
  border-color: #f1d87f;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18), 0 0 28px rgba(212, 175, 55, 0.45);
}

.node-card.hint {
  animation: riseIn 0.65s both, breathe 2.8s 1.2s ease-in-out infinite;
}

.selected-ring {
  border-color: #ffd766;
  box-shadow: 0 0 0 3px rgba(255, 215, 102, 0.28), 0 14px 30px rgba(0, 0, 0, 0.45);
}

.photo-wrap {
  width: 86px;
  height: 86px;
  border-radius: 50% 50% 46% 46% / 54% 54% 40% 40%;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  flex-shrink: 0;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.03);
}

.p-name {
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--cream);
}

.p-role {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 1px;
}

.p-meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: #efe3bd;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 12px;
  border-radius: 99px;
  white-space: nowrap;
}

#toast {
  position: fixed;
  bottom: 26px;
  inset-inline: 0;
  margin-inline: auto;
  width: max-content;
  max-width: 88vw;
  background: rgba(13, 28, 42, 0.95);
  border: 1px solid var(--gold-soft);
  color: var(--cream);
  padding: 12px 26px;
  border-radius: 99px;
  font-size: 0.9rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 700;
  pointer-events: none;
  text-align: center;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

.history-section {
  background: var(--night2);
}

.history-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: start;
}

.history-prose p {
  margin-bottom: 18px;
  color: #cfc5a8;
}

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

.family-quote {
  margin-top: 28px;
  padding: 22px 26px;
  border-inline-start: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.07);
  border-radius: 14px;
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--cream);
}

.family-quote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
}

.timeline {
  list-style: none;
  position: relative;
}

.timeline-item {
  position: relative;
  padding: 0 52px 36px 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: -8px;
  inset-inline-start: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(212, 175, 55, 0.12));
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 6px;
  inset-inline-start: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.18);
}

.timeline-item .year {
  font-family: var(--font-head);
  color: var(--gold);
  font-size: 1.25rem;
}

.timeline-item h3 {
  color: var(--cream);
  font-size: 1.05rem;
  margin: 2px 0 6px;
}

.timeline-item p {
  color: var(--muted);
  font-size: 0.92rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-card {
  background: linear-gradient(180deg, rgba(20, 41, 60, 0.9), rgba(14, 32, 50, 0.9));
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  padding: 34px 22px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50% 50% 46% 46% / 54% 54% 40% 40%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-size: 1.7rem;
  margin-bottom: 16px;
  background: rgba(212, 175, 55, 0.08);
}

.value-card h3 {
  font-family: var(--font-head);
  color: var(--cream);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.value-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.poetry-section {
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(212, 175, 55, 0.09), transparent 65%),
    var(--night);
}

.poetry-section .section-head p {
  color: var(--muted);
  font-size: 0.95rem;
}

.poetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.poem-card {
  aspect-ratio: 1;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  color: inherit;
  background: linear-gradient(180deg, rgba(20, 41, 60, 0.9), rgba(14, 32, 50, 0.9));
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 20px;
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.poem-card:hover,
.poem-card:focus-visible,
.poem-card.reveal.in:hover,
.poem-card.reveal.in:focus-visible {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 0 22px rgba(212, 175, 55, 0.22);
  outline: none;
}

.poem-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50% 50% 46% 46% / 54% 54% 40% 40%;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-size: 1.7rem;
  margin-bottom: 8px;
  background: rgba(212, 175, 55, 0.08);
}

.poem-card-title {
  font-family: var(--font-head);
  color: var(--cream);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.45;
}

.poem-card-poet {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 500;
}

.poem-card-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: #efe3bd;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 12px;
  border-radius: 99px;
  margin-top: 4px;
}

.poem-card-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
}

.poem-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.poem-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.poem-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 24, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.poem-modal-panel {
  position: relative;
  z-index: 1;
  width: min(820px, 96%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  background: linear-gradient(180deg, #1c3a58, #0d1e30);
  border: 1.5px solid rgba(240, 214, 122, 0.55);
  border-radius: 24px;
  padding: 42px 36px 48px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(212, 175, 55, 0.18);
  text-align: center;
  outline: none;
}

.poem-modal-close {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--cream);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.poem-modal-close:hover,
.poem-modal-close:focus-visible {
  background: var(--gold);
  color: #1a1405;
  transform: scale(1.08);
  outline: none;
}

.poem-modal-kicker {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.poem-modal-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 8px;
}

.poem-modal-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.poem-meta-dot {
  color: var(--gold);
}

.poem-verses {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.poem-bayt {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px 22px;
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 3.1vw, 1.85rem);
  line-height: 2.15;
  color: var(--cream);
}

.hemistich {
  flex: 1 1 0;
  text-align: center;
}

.bayt-sep {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 0.85em;
  opacity: 0.9;
}

body.poem-open {
  overflow: hidden;
}

.stats-section {
  background: var(--night2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat {
  padding: 30px 12px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: radial-gradient(300px 140px at 50% 0%, rgba(212, 175, 55, 0.1), transparent 70%);
}

.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  background: linear-gradient(45deg, #8a6a1c, #d4af37, #f6e27a, #d4af37, #8a6a1c);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
  line-height: 1.3;
}

.stat-label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-footer {
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  background: #060e18;
  padding: 54px 0 34px;
}

.footer-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 1.7rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #cfc5a8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s;
}

.footer-nav a:hover {
  color: var(--gold);
}

.footer-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-copy {
  color: #8d8468;
  font-size: 0.8rem;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  padding-top: 18px;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s ease var(--d, 0ms), transform 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) var(--d, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.noscript-note {
  padding: 30px;
  text-align: center;
  background: var(--red);
  color: #fff;
}

body.mobile-mode .container {
  width: min(540px, 94%);
}

body.mobile-mode .main-nav {
  display: none;
}

body.mobile-mode .hero-inner {
  padding-top: 110px;
  padding-bottom: 130px;
}

body.mobile-mode .hero-cta .btn {
  padding: 10px 22px;
  font-size: 0.9rem;
}

body.mobile-mode .section {
  padding: 64px 0;
}

body.mobile-mode :root {
  --card-w: 108px;
}

body.mobile-mode {
  --card-w: 108px;
}

body.mobile-mode .node-card {
  padding: 8px 6px 10px;
  gap: 5px;
}

body.mobile-mode .photo-wrap {
  width: 64px;
  height: 64px;
}

body.mobile-mode .node-card.founder {
  --card-w: 128px;
}

body.mobile-mode .node-card.founder .photo-wrap {
  width: 80px;
  height: 80px;
}

body.mobile-mode .p-name {
  font-size: 0.72rem;
}

body.mobile-mode .p-meta {
  font-size: 0.64rem;
  padding: 2px 9px;
}

body.mobile-mode .connector-v {
  height: 26px;
}

body.mobile-mode .tree-swipe-hint {
  display: block;
}

body.mobile-mode .tree-scroll {
  padding-inline: 4px;
}

body.mobile-mode .rail-row {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  width: max-content;
  min-width: 100%;
}

body.mobile-mode .rail-line {
  display: block;
}

body.mobile-mode .cell {
  flex: 0 0 auto;
  align-items: center;
  min-width: calc(var(--card-w) + 16px);
}

body.mobile-mode .history-grid {
  grid-template-columns: 1fr;
  gap: 40px;
}

body.mobile-mode .values-grid,
body.mobile-mode .poetry-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

body.mobile-mode .stats-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

body.mobile-mode .mode-text {
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .history-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .values-grid,
  .poetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .poem-modal-panel {
    padding: 36px 20px 40px;
  }
}

@media (max-width: 720px) {
  .main-nav {
    display: none;
  }

  .mode-btn .mode-text {
    display: none;
  }

  .mode-btn {
    padding: 9px 14px;
  }

  .node-card {
    --card-w: 118px;
  }

  .tree-swipe-hint {
    display: block;
  }

  .tree-scroll {
    padding-inline: 4px;
  }

  .rail-row {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: max-content;
    min-width: 100%;
  }

  .cell {
    flex: 0 0 auto;
    min-width: calc(var(--card-w) + 16px);
  }
}

@media (max-width: 640px) {
  .poem-bayt {
    flex-direction: column;
    gap: 2px;
  }

  .bayt-sep {
    font-size: 0.7em;
    line-height: 1;
  }

  .hemistich {
    flex: 0 0 auto;
    width: 100%;
  }
}

@media (max-width: 460px) {
  body.mobile-mode .values-grid,
  body.mobile-mode .poetry-grid,
  .poetry-grid {
    grid-template-columns: 1fr;
  }

  .poem-card {
    aspect-ratio: 5 / 4;
  }
}

@media (max-width: 1100px) {
  .main-nav {
    gap: 14px;
  }

  .main-nav a {
    font-size: 0.88rem;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.93);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes growY {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes growX {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  to {
    background-position: 220% center;
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
  }
  50% {
    box-shadow: 0 0 36px rgba(212, 175, 55, 0.55);
  }
}

@keyframes wordIn {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.78);
    filter: blur(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes markSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes duneDrift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-30px);
  }
}

/* Promo Popup for TikTok / Portfolio */
.promo-popup {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px) scale(0.94);
  z-index: 10001;
  width: min(520px, 92vw);
  background: linear-gradient(135deg, rgba(20, 41, 60, 0.97), rgba(8, 19, 32, 0.98));
  border: 2px solid var(--gold);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.75), 0 0 35px rgba(212, 175, 55, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 22px 26px 18px;
  text-align: center;
  color: var(--cream);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.promo-popup.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.promo-popup.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-35px) scale(0.9);
}

.promo-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.promo-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a1405;
  background: linear-gradient(90deg, #f9edb8, #d4af37, #f9edb8);
  padding: 3px 16px;
  border-radius: 99px;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.45);
  letter-spacing: 0.5px;
}

.promo-title {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 4.2vw, 1.7rem);
  color: var(--cream);
  margin-top: 5px;
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(212, 175, 55, 0.35);
}

.promo-text {
  font-size: clamp(1rem, 3.2vw, 1.15rem);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 2px;
}

.promo-sub {
  font-size: 0.82rem;
  color: var(--muted);
  font-family: 'Segoe UI', Tahoma, sans-serif;
  direction: ltr;
  opacity: 0.9;
}

.promo-close {
  position: absolute;
  top: -10px;
  inset-inline-end: -12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--cream);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.promo-close:hover {
  background: var(--gold);
  color: #1a1405;
  transform: scale(1.1);
}

.promo-progress {
  width: 100%;
  height: 4px;
  background: rgba(212, 175, 55, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.promo-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #f9edb8);
  transform-origin: right;
  animation: promoCountdown 5s linear forwards;
}

@keyframes promoCountdown {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
