/* ==========================================================================
   تنبيهات سعودية — Interactive Shorthand Scrollytelling Report
   Inspired conceptually by Asharq Al-Awsat Shorthand multimedia features:
   Sticky 6-chapter nav, full-bleed pinned real photography, translucent warm
   editorial narrative cards, and interactive SVG strategic map.
   ========================================================================== */

:root {
  --sh-obsidian: #0B1210;
  --sh-emerald: #0B4D3E;
  --sh-emerald-bright: #167A63;
  --sh-gold: #D4AF5A;
  --sh-ivory: #F6F3EB;
  --sh-card-bg: rgba(247, 244, 236, 0.93);
  --sh-ink: #121815;
  --sh-body: #2C3530;
  --sh-muted: #5A655F;
  --sh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  direction: rtl;
  scroll-behavior: smooth;
  background: var(--sh-obsidian);
  color: var(--sh-ivory);
}

body {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  background: var(--sh-obsidian);
  color: var(--sh-ivory);
  line-height: 1.85;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* Sticky Shorthand Chapter Header */
.sh-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 60;
  background: rgba(11, 18, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sh-progress-track {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.sh-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to left, #1E9E7F, var(--sh-gold));
  transition: width 80ms linear;
}

.sh-header__inner {
  max-width: 1400px;
  margin-inline: auto;
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.sh-brand__badge {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: var(--sh-emerald);
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 90, 0.4);
}

.sh-brand__title {
  font-family: 'Amiri', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
}

.sh-brand__sub {
  font-size: 0.72rem;
  color: var(--sh-gold);
  display: block;
  line-height: 1;
}

.sh-chapters-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.sh-chapters-nav::-webkit-scrollbar { display: none; }

.sh-chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(246, 243, 235, 0.7);
  border-radius: 2px;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}

.sh-chapter-link:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.sh-chapter-link.is-active {
  background: var(--sh-emerald);
  color: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 90, 0.45);
}

.sh-chapter-link__num {
  font-size: 0.68rem;
  color: var(--sh-gold);
  font-variant-numeric: tabular-nums;
}

.sh-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  color: #FFFFFF;
  flex-shrink: 0;
  transition: background 180ms ease, border-color 180ms ease;
}

.sh-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--sh-gold);
}

/* ==========================================================================
   FULL-BLEED TITLE HERO (Theme-TitleSection)
   ========================================================================== */
.sh-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 7.5rem clamp(1.25rem, 4vw, 3.5rem) clamp(3rem, 7vh, 5rem);
  overflow: hidden;
}

.sh-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sh-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroSlowDrift 18s ease-out forwards;
}

@keyframes heroSlowDrift {
  from { transform: scale(1.08); }
  to { transform: scale(1.0); }
}

.sh-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(11, 18, 16, 0.96) 8%, rgba(11, 18, 16, 0.65) 45%, rgba(11, 77, 62, 0.28) 100%);
}

.sh-hero__content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.sh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sh-gold);
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(212, 175, 90, 0.4);
  background: rgba(11, 18, 16, 0.6);
  border-radius: 2px;
  margin-bottom: 1.25rem;
}

.sh-hero__title {
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.15;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.sh-hero__subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  line-height: 1.8;
  color: rgba(246, 243, 235, 0.9);
  max-width: 62ch;
  margin-bottom: 1.85rem;
}

.sh-hero__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  color: rgba(246, 243, 235, 0.78);
}

.sh-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  color: var(--sh-gold);
  font-size: 0.84rem;
  font-weight: 600;
}

.sh-scroll-cue svg {
  animation: bounceCue 2s infinite;
}

@keyframes bounceCue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.sh-photo-credit {
  position: absolute;
  bottom: 1.1rem;
  left: 1.25rem;
  z-index: 3;
  font-size: 0.72rem;
  color: rgba(246, 243, 235, 0.78);
  background: rgba(11, 18, 16, 0.72);
  padding: 0.25rem 0.65rem;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   SHORTHAND REVEAL SECTIONS (STICKY FULL-BLEED PHOTO + FLOATING NARRATIVE)
   ========================================================================== */
.sh-reveal-section {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sh-sticky-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  z-index: 1;
}

.sh-sticky-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.4s var(--sh-ease), filter 0.8s ease;
}

.sh-reveal-section.is-in-view .sh-sticky-stage img {
  transform: scale(1.0);
}

.sh-sticky-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 18, 16, 0.45) 0%,
    rgba(11, 18, 16, 0.28) 45%,
    rgba(11, 18, 16, 0.72) 100%
  );
}

/* Chapter Palette Tints echoing Asharq Al-Awsat's color transitions */
.sh-theme--emerald .sh-sticky-stage::after {
  background: linear-gradient(180deg, rgba(10, 56, 45, 0.55), rgba(11, 18, 16, 0.35), rgba(10, 42, 34, 0.78));
}
.sh-theme--amber .sh-sticky-stage::after {
  background: linear-gradient(180deg, rgba(54, 34, 12, 0.52), rgba(11, 18, 16, 0.28), rgba(26, 20, 12, 0.78));
}
.sh-theme--slate .sh-sticky-stage::after {
  background: linear-gradient(180deg, rgba(16, 28, 36, 0.58), rgba(11, 18, 16, 0.32), rgba(12, 20, 26, 0.8));
}

.sh-stage-badge {
  position: absolute;
  top: 5.2rem;
  right: clamp(1rem, 3vw, 2.5rem);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  background: rgba(11, 18, 16, 0.76);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 90, 0.35);
  border-radius: 2px;
  font-size: 0.78rem;
  color: #FFFFFF;
}

.sh-stage-badge strong {
  color: var(--sh-gold);
}

/* Floating Editorial Narrative Column scrolling over the sticky photograph */
.sh-narrative-flow {
  position: relative;
  z-index: 5;
  margin-top: -78svh;
  padding-bottom: 24svh;
  padding-inline: clamp(1rem, 4vw, 3rem);
  max-width: 1320px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 28svh;
}

.sh-card {
  width: min(600px, 100%);
  background: var(--sh-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--sh-ink);
  padding: clamp(1.5rem, 3vw, 2.35rem);
  border-radius: 3px;
  border-top: 4px solid var(--sh-emerald);
  box-shadow: 0 28px 60px -18px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--sh-ease), transform 700ms var(--sh-ease);
}

.sh-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sh-card--align-end {
  margin-right: auto;
}

.sh-card--center {
  margin-inline: auto;
  width: min(720px, 100%);
}

.sh-card--dark {
  background: rgba(13, 24, 20, 0.9);
  color: var(--sh-ivory);
  border-top-color: var(--sh-gold);
  box-shadow: 0 28px 60px -18px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 175, 90, 0.25);
}

.sh-card__chapter {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sh-emerald);
  margin-bottom: 0.55rem;
}

.sh-card--dark .sh-card__chapter {
  color: var(--sh-gold);
}

.sh-card__title {
  font-family: 'Amiri', Georgia, serif;
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  line-height: 1.28;
  margin-bottom: 1rem;
  font-weight: 700;
}

.sh-card p {
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--sh-body);
  margin-bottom: 1rem;
}

.sh-card p:last-child {
  margin-bottom: 0;
}

.sh-card--dark p {
  color: rgba(246, 243, 235, 0.88);
}

.sh-quote {
  margin-block: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(11, 77, 62, 0.08);
  border-right: 3px solid var(--sh-emerald);
  font-family: 'Amiri', Georgia, serif;
  font-size: 1.28rem;
  line-height: 1.65;
  color: var(--sh-ink);
}

.sh-card--dark .sh-quote {
  background: rgba(212, 175, 90, 0.1);
  border-right-color: var(--sh-gold);
  color: #FFFFFF;
}

.sh-stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(18, 24, 21, 0.14);
}

.sh-stat-box {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(18, 24, 21, 0.1);
  padding: 0.85rem;
  border-radius: 2px;
}

.sh-stat-box__num {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--sh-emerald);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.sh-stat-box__label {
  font-size: 0.78rem;
  color: var(--sh-muted);
  margin-top: 0.25rem;
}

/* ==========================================================================
   INTERACTIVE STRATEGIC BRIEFING MAP INTERLUDE (BETWEEN CHAPTERS)
   ========================================================================== */
.sh-interlude {
  background: #0F1A16;
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid rgba(212, 175, 90, 0.22);
  border-bottom: 1px solid rgba(212, 175, 90, 0.22);
}

.sh-interlude__inner {
  max-width: 1200px;
  margin-inline: auto;
}

.sh-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}

.sh-map-canvas {
  background: #09110E;
  border: 1px solid rgba(212, 175, 90, 0.25);
  border-radius: 4px;
  padding: 1.25rem;
  position: relative;
}

.map-node {
  cursor: pointer;
  transition: transform 200ms ease;
}

.map-node circle.node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: mapPing 2.4s infinite;
}

@keyframes mapPing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}

.sh-map-detail {
  background: rgba(246, 243, 235, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 3px solid var(--sh-gold);
  padding: 1.75rem;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-selector-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.map-sel-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  color: rgba(246, 243, 235, 0.8);
  transition: all 160ms ease;
}

.map-sel-btn:hover {
  border-color: var(--sh-gold);
  color: #FFFFFF;
}

.map-sel-btn.is-active {
  background: var(--sh-emerald);
  border-color: var(--sh-gold);
  color: #FFFFFF;
}

/* Portrait Inset inside Chapter 5 */
.sh-diplomat-inset {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1.2rem;
  padding: 0.9rem;
  background: rgba(11, 77, 62, 0.07);
  border: 1px solid rgba(11, 77, 62, 0.2);
  border-radius: 3px;
}

.sh-diplomat-inset img {
  width: 112px;
  height: 140px;
  object-fit: cover;
  object-position: top;
  border-radius: 2px;
}

/* Report Outro & Credits */
.sh-outro {
  background: #09100E;
  padding: clamp(3.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 2px solid var(--sh-emerald);
  text-align: center;
}

.sh-outro__inner {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.sh-outro-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.sh-btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.45rem;
  background: var(--sh-gold);
  color: #0B1210;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 2px;
  transition: background 180ms ease;
}

.sh-btn-gold:hover { background: #E4C26E; }

.sh-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 2px;
  transition: background 180ms ease;
}

.sh-btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

@media (max-width: 960px) {
  .sh-chapters-nav { display: none; }
  .sh-map-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sh-narrative-flow { margin-top: -68svh; gap: 18svh; }
  .sh-stat-row { grid-template-columns: 1fr; }
  .sh-diplomat-inset { grid-template-columns: 1fr; }
  .sh-diplomat-inset img { width: 100%; height: 220px; }
  .sh-stage-badge { top: 4.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sh-hero__bg img, .sh-scroll-cue svg, .map-node circle.node-pulse { animation: none; }
  .sh-card { opacity: 1; transform: none; transition: none; }
}
