/* ═══════════════════════════════════════════════════════════
   SAARA — Story Page Styles  v4 (Light Edition)
   /story/ — standalone long-form narrative
   Premium editorial design system
═══════════════════════════════════════════════════════════ */

/* ── Reading Progress Bar ── */
.sp-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--orange);
  z-index: 1001;
  transition: width .12s linear;
}

/* ── Story Hero / Masthead ── */
.sp-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.sp-hero::before {
  display: none;
}

/* Noise texture overlay */
.sp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: .4;
  pointer-events: none;
}

.sp-hero-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
}

/* Back crumb */
.sp-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding: .5rem .75rem;
  border: 1px solid rgba(0,132,122,.12);
  border-radius: 100px;
  background: rgba(0,132,122,.05);
  backdrop-filter: blur(8px);
  transition: color var(--trans), border-color var(--trans), background var(--trans);
}
.sp-back:hover {
  color: var(--warm-white);
  border-color: rgba(0,132,122,.25);
  background: rgba(0,132,122,.09);
}
.sp-back svg { flex-shrink: 0; }

/* Eyebrow label above headline */
.sp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.5rem;
}
.sp-eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
}

.sp-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 800;
  color: var(--warm-white);
  letter-spacing: -.05em;
  line-height: .97;
  margin: 0 0 1.75rem;
}
.sp-headline .accent-line {
  display: block;
  color: var(--orange);
}

.sp-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2rem;
}

/* Meta pills */
.sp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

/* ── Author Card (right side of hero) ── */
.sp-author-card {
  background: #FFFFFF;
  border: 1px solid var(--border-warm);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  text-align: center;
  backdrop-filter: blur(16px);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,132,122,.08);
}
.sp-author-card::before {
  display: none;
}
.sp-author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0,132,122,.45);
  border: 2px solid rgba(0,132,122,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 1;
}
/* Pulse ring on avatar */
.sp-author-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(0,132,122,.22);
  animation: avatarPulse 3s ease infinite;
}
@keyframes avatarPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.06); opacity: .4; }
}
.sp-author-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--warm-white);
  margin-bottom: .25rem;
  position: relative;
  z-index: 1;
}
.sp-author-role {
  font-size: .78rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: .02em;
  position: relative;
  z-index: 1;
}
.sp-author-stats {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0,132,122,.08);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  position: relative;
  z-index: 1;
}
.sp-author-stat {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.45;
}
.sp-author-stat strong {
  color: var(--cream);
  font-weight: 600;
}

/* ── Decorative chapter count badge ── */
.sp-chapter-count {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
  gap: .3rem;
  position: relative;
  z-index: 1;
}
.sp-ch-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(110,108,87,.18);
  transition: background .3s;
}
.sp-ch-dot.done { background: var(--orange); }

/* ── Hero scroll hint ── */
.sp-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--muted-2);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 3;
  animation: bounceDown 2.5s ease infinite;
}
.sp-scroll-hint svg { opacity: .4; }
@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Story Layout ── */
.sp-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
  align-items: start;
  position: relative;
}

/* Subtle separator line between sidebar and content */
.sp-layout::before {
  content: '';
  position: absolute;
  top: 5rem;
  bottom: 6rem;
  left: calc(220px + 2.5rem);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 15%, var(--border) 85%, transparent);
  pointer-events: none;
}

/* ── Left sidebar: sticky chapter nav ── */
.sp-sidebar {
  position: sticky;
  top: 90px;
}
.sp-ch-label {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
  padding-left: .6rem;
}
.sp-ch-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: .4rem .6rem;
  border-left: 2px solid transparent;
  line-height: 1.45;
  transition: color .25s, border-color .25s, background .25s;
  margin-bottom: .15rem;
  border-radius: 0 6px 6px 0;
}
.sp-ch-link:hover {
  color: var(--cream);
  background: rgba(0,132,122,.04);
}
.sp-ch-link.active {
  color: var(--warm-white);
  border-left-color: var(--orange);
  font-weight: 600;
  background: rgba(0,132,122,.07);
}
.sp-ch-num {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 800;
  color: var(--orange);
  opacity: .55;
  flex-shrink: 0;
  width: 16px;
  transition: opacity .25s;
}
.sp-ch-link.active .sp-ch-num { opacity: 1; }
.sp-sidebar-cta {
  margin-top: 2.5rem;
  padding: 1.25rem 1rem;
  border-radius: var(--radius);
  background: rgba(0,132,122,.05);
  border: 1px solid rgba(0,132,122,.14);
}
.sp-sidebar-cta a {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  line-height: 1.5;
  margin-bottom: .4rem;
  transition: color var(--trans);
}
.sp-sidebar-cta a:hover { color: var(--warm-white); }
.sp-sidebar-cta p {
  font-size: .7rem;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ── Article body ── */
.sp-article {
  max-width: 700px;
}

/* Chapter */
.sp-chapter {
  margin-bottom: 5.5rem;
  scroll-margin-top: 100px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.sp-chapter.visible {
  opacity: 1;
  transform: translateY(0);
}
.sp-chapter:last-child { margin-bottom: 0; }

/* Chapter marker row: roman numeral + rule */
.sp-ch-marker {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.sp-roman {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  flex-shrink: 0;
  opacity: .9;
}
.sp-ch-rule {
  flex: 1;
  height: 1px;
  background: var(--border-bright);
}
.sp-ch-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--warm-white);
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-bottom: 1.75rem;
}

/* Prose */
.sp-p {
  font-size: clamp(.96rem, 1.3vw, 1.06rem);
  color: var(--body-light);
  line-height: 1.85;
  margin-bottom: 1.35rem;
}
.sp-p--lead {
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--cream);
  font-weight: 500;
  line-height: 1.75;
}
.sp-p:last-child { margin-bottom: 0; }
.sp-p em { color: var(--cream); font-style: italic; }
.sp-p strong { color: var(--warm-white); font-weight: 700; }

/* Pull quotes */
.sp-quote {
  position: relative;
  border-left: 3px solid var(--orange);
  padding: 1.25rem 1.75rem;
  margin: 2.5rem 0;
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  font-style: italic;
  color: var(--cream);
  line-height: 1.7;
  background: rgba(110,108,87,.05);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-weight: 500;
}
.sp-quote::before {
  content: '\201C';
  position: absolute;
  top: -.25rem;
  left: 1.25rem;
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--orange);
  opacity: .2;
  line-height: 1;
  pointer-events: none;
}
.sp-quote cite {
  display: block;
  margin-top: .85rem;
  font-style: normal;
  font-size: .78rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: .02em;
}
.sp-quote--featured {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  padding: 1.75rem 2.25rem;
  background: rgba(110,108,87,.07);
  border-left-width: 4px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.sp-quote--featured::before {
  font-size: 5rem;
  opacity: .15;
}

/* Large centred pull quote (decorative) */
.sp-pullquote {
  text-align: center;
  padding: 2.5rem 1rem;
  margin: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sp-pullquote p {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--warm-white);
  line-height: 1.3;
  letter-spacing: -.03em;
  margin: 0;
}
.sp-pullquote p em {
  color: var(--orange);
  font-style: normal;
}

/* ── Inline stat cards ── */
.sp-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.5rem 0;
}
.sp-stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color .25s, transform .25s;
  box-shadow: 0 2px 12px rgba(0,132,122,.05);
}
.sp-stat-card:hover {
  border-color: var(--border-warm);
  transform: translateY(-2px);
}
.sp-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -.05em;
  line-height: 1;
  margin-bottom: .5rem;
}
.sp-stat-label {
  font-size: .76rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Team strip ── */
.sp-team-strip {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2.5rem 0;
  box-shadow: 0 2px 16px rgba(110,108,87,.06);
}
.sp-team-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}
.sp-team-card:last-child { border-bottom: none; }
.sp-team-card:hover { background: rgba(0,132,122,.03); }
.sp-team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .88rem;
  font-weight: 800;
  color: rgba(255,255,255,.95);
  flex-shrink: 0;
  font-family: var(--font-display);
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(0,132,122,.18), 0 2px 10px rgba(0,0,0,.18);
}

.sp-team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.sp-team-info strong {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: var(--warm-white);
  margin-bottom: .2rem;
}
.sp-team-info span {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.45;
}
/* Credential badge */
.sp-team-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(13,148,136,.20);
  border-radius: 100px;
  padding: .2rem .6rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Feature grid (what Saara is) ── */
.sp-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0;
}
.sp-feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  transition: border-color .25s, background .25s, transform .25s;
}
.sp-feature-item:hover {
  border-color: var(--border-warm);
  background: var(--navy-2);
  transform: translateY(-2px);
}
.sp-feature-icon {
  width: 38px;
  height: 38px;
  background: var(--orange-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sp-feature-item strong {
  display: block;
  font-size: .9rem;
  font-weight: 700;
  color: var(--warm-white);
  margin-bottom: .4rem;
}
.sp-feature-item p {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Pilot proof cards (in The Call chapter) ── */
.sp-pilot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin: 2rem 0;
}
.sp-pilot-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #FFFFFF;
  box-shadow: 0 2px 12px rgba(110,108,87,.05);
}
.sp-pilot-card .pilot-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: .5rem;
}
.sp-pilot-card .pilot-stat {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: .35rem;
}
.sp-pilot-card .pilot-desc {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Final CTA block ── */
.sp-final-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2.5rem 0 1.25rem;
}
.sp-signup-note {
  font-size: .82rem;
  color: var(--muted-2);
  line-height: 1.65;
  margin-top: .5rem;
}
.sp-signup-note a {
  color: var(--teal);
  text-decoration: none;
}
.sp-signup-note a:hover { text-decoration: underline; }

/* Chapter divider */
.sp-chapter-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4.5rem 0;
  opacity: .45;
}

/* ── End-of-story share / nav bar ── */
.sp-end-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}
.sp-end-bar-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.sp-end-share {
  display: flex;
  gap: .65rem;
}
.sp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--trans), border-color var(--trans), background var(--trans);
}
.sp-share-btn:hover {
  color: var(--warm-white);
  border-color: var(--border-warm);
  background: var(--glass-bg-2);
}

/* ── "You've read X of 7 chapters" micro-progress ── */
.sp-reading-status {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  z-index: 50;
  opacity: 0;
  transition: opacity .5s;
}
.sp-reading-status.visible { opacity: 1; }
.sp-rs-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(110,108,87,.18);
  transition: background .35s, transform .35s;
  cursor: pointer;
  position: relative;
}
.sp-rs-dot::after {
  content: attr(data-chapter);
  position: absolute;
  right: calc(100% + .6rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  background: var(--navy-2);
  padding: .2rem .5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.sp-rs-dot:hover::after { opacity: 1; }
.sp-rs-dot.seen { background: rgba(110,108,87,.4); }
.sp-rs-dot.active {
  background: var(--orange);
  transform: scale(1.3);
}

/* ── Sticky CTA bar (mobile) ── */
.sp-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--border-warm);
  padding: .9rem 1.25rem;
  z-index: 200;
  backdrop-filter: blur(16px);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 24px rgba(110,108,87,.08);
}
.sp-sticky-bar p {
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}
.sp-sticky-bar strong { color: var(--warm-white); }

/* ── Floating "back to top" ── */
.sp-top-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s, transform .3s, background .2s;
  z-index: 150;
  box-shadow: 0 4px 16px var(--orange-glow);
}
.sp-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}
.sp-top-btn:hover { background: var(--orange-mid); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sp-hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .sp-author-card {
    max-width: 400px;
  }
  .sp-layout {
    grid-template-columns: 180px 1fr;
    gap: 3rem;
  }
  .sp-layout::before {
    left: calc(180px + 1.5rem);
  }
  .sp-reading-status { display: none; }
}

@media (max-width: 768px) {
  .sp-hero { min-height: auto; padding-bottom: 3rem; }
  .sp-author-card { display: none; }
  .sp-layout {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 4rem;
    gap: 0;
  }
  .sp-layout::before { display: none; }
  .sp-sidebar { display: none; }
  .sp-stat-row { grid-template-columns: 1fr 1fr; }
  .sp-feature-grid { grid-template-columns: 1fr; }
  .sp-pilot-grid  { grid-template-columns: 1fr; }
  .sp-sticky-bar  { display: flex; }
  .sp-article     { padding-bottom: 5rem; }
  .sp-top-btn     { bottom: 5rem; }
  .sp-scroll-hint { display: none; }
}

@media (max-width: 480px) {
  .sp-stat-row { grid-template-columns: 1fr; }
  .sp-headline  { font-size: 2.75rem; }
  .sp-quote--featured { padding: 1.25rem 1.5rem; }
}
