/* --------------------------------------------------------------------------
   TOKENS & BASE
-------------------------------------------------------------------------- */
:root {
  --ff-head: "Libre Baskerville", serif;
  --ff-body: "Almarai", sans-serif;

  --bg: #f8fafc;
  --fg: #142033;
  --muted: rgba(20, 32, 51, 0.7);
  --card: #ffffff;
  --border: rgba(20, 32, 51, 0.12);
  --accent: #0f4eb5;
  --accent-soft: rgba(15, 78, 181, 0.12);
  --accent-strong: #062d76;
  --gradient-hero: linear-gradient(140deg, #041537 0%, #092a68 40%, #1154b5 100%);
  --shadow-lg: 0 28px 60px rgba(13, 38, 86, 0.28);
  --shadow-md: 0 18px 42px rgba(12, 32, 68, 0.18);
  --shadow-sm: 0 12px 28px rgba(12, 32, 68, 0.12);
}

[data-theme="dark"] {
  --bg: #0d1420;
  --fg: #ecf1ff;
  --muted: rgba(236, 241, 255, 0.72);
  --card: #121c2d;
  --border: rgba(236, 241, 255, 0.08);
  --accent: #5d97ff;
  --accent-soft: rgba(93, 151, 255, 0.16);
  --accent-strong: #316fe0;
  --gradient-hero: linear-gradient(140deg, #01060f 0%, #0b1f4b 35%, #1a3f86 100%);
  --shadow-lg: 0 28px 60px rgba(3, 9, 22, 0.65);
  --shadow-md: 0 18px 42px rgba(6, 18, 44, 0.45);
  --shadow-sm: 0 12px 28px rgba(6, 18, 44, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
}
h1, h2, h3 { font-family: var(--ff-head); margin: 0; color: var(--fg); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.story-shell {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.story-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #f6fbff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.story-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--accent);
  position: relative;
}

.story-link::after {
  content: "→";
  transition: transform 0.25s ease;
}

.story-link:hover::after {
  transform: translateX(4px);
}

.story-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 78, 181, 0.12);
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border 0.3s ease;
}

.story-cta--primary {
  background: linear-gradient(130deg, #1f6bff 0%, #0f4eb5 100%);
  color: #f6fbff;
  box-shadow: var(--shadow-md);
}

.story-cta--primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.story-cta--ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #f6fbff;
  background: transparent;
}

.story-cta--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
}

.story-cta--outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.story-cta--outline:hover {
  background: var(--accent);
  color: #f6fbff;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   HERO
-------------------------------------------------------------------------- */
.story-hero {
  position: relative;
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  isolation: isolate;
  overflow: hidden;
  background: var(--gradient-hero);
  color: #f6fbff;
}

.story-hero__backdrop {
  position: absolute;
  inset: 0;
  background: url('../css/images/blog/4.jpg') center/cover no-repeat;
  opacity: 0.28;
  z-index: -2;
}

.story-hero__pattern {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 55%),
              radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
  mix-blend-mode: screen;
  z-index: -1;
}

.story-hero .story-shell {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
}

.story-hero__content h1 {
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  line-height: 1.05;
  margin: 0.9rem 0 1.2rem;
}

.story-hero__content p {
  font-size: clamp(1.05rem, 1.45vw, 1.2rem);
  color: rgba(246, 251, 255, 0.86);
}

.story-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.8rem 0 2.2rem;
}

.story-hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.story-hero__stats div {
  padding: 1.1rem 1.3rem;
  border-radius: 18px;
  background: rgba(246, 251, 255, 0.12);
  backdrop-filter: blur(16px);
}

.story-hero__stats dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(246, 251, 255, 0.78);
  margin-bottom: 0.25rem;
}

.story-hero__stats dd {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.story-hero__panel {
  padding: clamp(2rem, 3vw, 3rem);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  color: #0b1f46;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .story-hero__panel {
  background: rgba(8, 18, 40, 0.7);
  color: rgba(236, 241, 255, 0.92);
}

.story-hero__panel h2 {
  color: inherit;
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
}

.story-hero__panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.8rem;
}

.story-hero__panel li {
  display: flex;
  gap: 0.45rem;
  line-height: 1.5;
}

.story-hero__panel li::before {
  content: "•";
  color: currentColor;
  opacity: 0.7;
}

.story-hero__note {
  font-style: italic;
  color: inherit;
  opacity: 0.8;
}

.story-hero__signature {
  margin-top: 1.1rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   INTRO SECTION
-------------------------------------------------------------------------- */
.story-intro {
  padding: clamp(4rem, 7vw, 6rem) 0;
}

.story-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2.2rem, 4vw, 4rem);
  align-items: center;
}

.story-intro__copy h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin: 0.75rem 0 1.4rem;
}

.story-intro__copy p + p {
  margin-top: 1.1rem;
}

.story-intro__links {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.story-intro__media {
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  background: var(--card);
}

.story-intro__media img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.story-intro__media figcaption {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   MILESTONES
-------------------------------------------------------------------------- */
.story-milestones {
  padding: clamp(4.5rem, 7.5vw, 6.5rem) 0;
  background: var(--card);
  box-shadow: 0 1px 0 var(--border);
}

.story-section-head {
  max-width: 720px;
  margin-bottom: clamp(2.8rem, 5vw, 3.6rem);
}

.story-section-head h2 {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  margin: 0.8rem 0 1.1rem;
}

.story-section-head p {
  color: var(--muted);
}

.story-timeline {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.75rem;
}

.story-timeline::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0.65rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(15, 78, 181, 0.1) 100%);
}

.story-milestone {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.6rem;
  align-items: start;
}

.story-milestone__marker {
  position: relative;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-top: 0.35rem;
}

.story-milestone__marker::before {
  content: "";
  position: absolute;
  left: -0.75rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-soft);
}

.story-milestone__card {
  background: var(--card);
  border-radius: 20px;
  padding: 1.8rem 1.9rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-milestone__card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--accent-strong);
}

.story-milestone__card p {
  color: var(--muted);
}

.story-milestone__card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.story-timeline__progress {
  height: 4px;
  margin-top: 2.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 78, 181, 0.25) 0%, var(--accent) 100%);
  width: 0;
}

/* --------------------------------------------------------------------------
   CHAPTERS
-------------------------------------------------------------------------- */
.story-chapters {
  padding: clamp(4.5rem, 7vw, 6.2rem) 0;
}

.story-chapters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.8rem, 4vw, 3rem);
}

.story-chapter {
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.story-chapter img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.story-chapter__body {
  padding: 1.8rem;
  display: grid;
  gap: 0.9rem;
}

.story-chapter__body h3 {
  font-size: 1.25rem;
}

.story-chapter__body p {
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   IMPACT METRICS
-------------------------------------------------------------------------- */
.story-impact {
  padding: clamp(4.5rem, 7vw, 6.2rem) 0;
  background: var(--card);
  box-shadow: 0 1px 0 var(--border), 0 -1px 0 var(--border);
}

.story-impact__grid {
  display: grid;
  gap: clamp(2.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: start;
}

.story-impact__intro h2 {
  margin: 0.9rem 0 1.2rem;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.story-impact__intro p {
  color: var(--muted);
}

.story-metrics {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.story-metric {
  padding: 1.8rem 1.6rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.story-metric h3 {
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.story-metric__value {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0.75rem 0;
  color: var(--accent);
}

.story-metric__hint {
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   FOUNDER NOTE
-------------------------------------------------------------------------- */
.story-founder {
  padding: clamp(4.5rem, 7vw, 6.2rem) 0;
}

.story-founder__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.story-founder__media {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.story-founder__media img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.story-founder__note {
  background: var(--card);
  border-radius: 28px;
  border: 1px solid var(--border);
  padding: clamp(2rem, 3vw, 3rem);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1rem;
}

.story-founder__note h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  line-height: 1.2;
}

.story-founder__note p {
  color: var(--muted);
}

.story-founder__note footer {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-weight: 600;
}

.story-founder__note footer span:last-child {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   NETWORK
-------------------------------------------------------------------------- */
.story-network {
  padding: clamp(4.5rem, 7vw, 6.2rem) 0;
  background: var(--card);
  box-shadow: 0 -1px 0 var(--border);
}

.story-network__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2.4rem, 4vw, 3.6rem);
  align-items: center;
}

.story-network__copy h2 {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin: 0.8rem 0 1.1rem;
}

.story-network__copy p {
  color: var(--muted);
}

.story-network__list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.story-network__list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.story-network__list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.35rem;
}

.story-network__media {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: var(--card);
}

.story-network__media img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.story-network__media figcaption {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   CTA FINAL
-------------------------------------------------------------------------- */
.story-cta {
  padding: clamp(4.5rem, 7vw, 6.2rem) 0 clamp(5rem, 9vw, 7rem);
}

.story-cta__inner {
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(14, 46, 98, 0.92) 0%, rgba(15, 78, 181, 0.92) 100%);
  color: #f6fbff;
  padding: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  gap: clamp(2rem, 4vw, 2.8rem);
  box-shadow: var(--shadow-lg);
}

.story-cta__inner h2 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  margin: 0.8rem 0 1.1rem;
}

.story-cta__inner p {
  color: rgba(246, 251, 255, 0.82);
}

.story-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.story-cta__actions .story-cta--ghost {
  border-color: rgba(246, 251, 255, 0.45);
}

.story-cta__actions .story-cta--outline {
  color: #f6fbff;
  border-color: rgba(246, 251, 255, 0.45);
}

.story-cta__actions .story-cta--outline:hover {
  background: rgba(246, 251, 255, 0.16);
}

/* --------------------------------------------------------------------------
   ANIMATIONS & REVEAL UTILITIES
-------------------------------------------------------------------------- */
.story-reveal {
  opacity: 0;
  transform: translateY(30px);
}

.story-reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s ease, transform 0.75s ease;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
-------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .story-hero .story-shell,
  .story-impact__grid,
  .story-network__grid,
  .story-intro__grid {
    grid-template-columns: 1fr;
  }

  .story-hero__panel {
    order: -1;
  }

  .story-hero__panel,
  .story-hero__content {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    padding: 2.2rem;
  }

  [data-theme="dark"] .story-hero__panel,
  [data-theme="dark"] .story-hero__content {
    background: rgba(8, 18, 40, 0.72);
  }

  .story-hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .story-intro__media,
  .story-network__media,
  .story-founder__media {
    border-radius: 22px;
  }
}

@media (max-width: 720px) {
  .story-hero__cta,
  .story-cta__actions,
  .story-intro__links {
    flex-direction: column;
    align-items: stretch;
  }

  .story-hero__stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .story-milestone {
    grid-template-columns: 1fr;
  }

  .story-timeline::before {
    left: 0.75rem;
  }

  .story-milestone__marker {
    margin-left: 1.4rem;
  }

  .story-milestone__marker::before {
    left: -1.4rem;
  }
}

@media (max-width: 520px) {
  .story-hero__stats div {
    padding: 0.85rem 1rem;
  }

  .story-chapter__body {
    padding: 1.5rem;
  }

  .story-metric {
    padding: 1.5rem;
  }

  .story-timeline__progress {
    margin-top: 2rem;
  }
}
