/* /story page extensions — editorial long-form rules
   Loaded AFTER style.css so it cascades over homepage defaults. */

/* Reading progress bar */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 80;
  background: var(--ef-gradient);
  transform: scaleX(0); transform-origin: left;
  transition: transform .1s linear;
}

/* Story hero — centered editorial */
.story-hero {
  min-height: 100vh;
  display: flex; align-items: flex-end;
  color: var(--ef-white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.story-hero .hero-media img { object-position: 50% 35%; }
.story-hero .hero-overlay {
  background: radial-gradient(ellipse at 50% 40%, rgba(17,56,95,0.2) 0%, rgba(11,30,51,0.86) 80%);
}
.story-hero-inner {
  padding: 0 0 120px;
  max-width: 760px;
}
.story-hero h1 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-style: normal;
  font-size: clamp(44px, 6.5vw, 80px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: var(--s-5) 0 var(--s-5);
}
.story-hero-sub {
  font-size: 20px;
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin: 0 0 var(--s-7);
}
.scroll-cue {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.8);
  animation: float 2.4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}

/* Chapter layout — 3 cols desktop */
.chapter {
  padding: 112px 0;
  background: var(--ef-paper);
}
.chapter-grid {
  display: grid;
  grid-template-columns: 1fr 8fr 3fr;
  gap: var(--s-7);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.chapter-marker {
  position: sticky;
  top: 120px;
  align-self: start;
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ef-teal-aa);
  padding-left: 12px;
  border-left: 2px solid var(--ef-teal-aa);
  line-height: 1.6;
}
.chapter-marker .ch-num { display: block; }
.chapter-marker .ch-kicker { display: block; color: rgba(11,30,51,0.65); margin-top: 4px; }
.chapter-body {
  max-width: 62ch;
}
.chapter-body h2 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ef-navy-deep);
  margin: 0 0 var(--s-5);
}
.dek {
  font-size: 20px;
  color: rgba(11,30,51,0.72);
  line-height: 1.5;
  margin: 0 0 var(--s-7);
  max-width: 52ch;
}
.chapter-body p {
  font-size: 18px;
  line-height: 1.75;
  margin: 0 0 1.4em;
  color: var(--ef-ink);
}
.chapter-body .pull {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  color: var(--ef-navy-deep);
  border-left: 3px solid var(--ef-teal-aa);
  padding-left: 32px;
  margin: var(--s-7) 0 var(--s-7) -12px;
  max-width: 56ch;
}
.chapter-body figure {
  margin: var(--s-7) 0;
  max-width: 720px;
}
.chapter-body figure img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 40px -20px rgba(17,56,95,0.3);
}
.chapter-body figcaption {
  font-size: 13px;
  color: rgba(11,30,51,0.65);
  font-style: italic;
  margin-top: var(--s-3);
}

/* Sidebar (desktop only) */
.chapter-sidebar {
  align-self: start;
  position: sticky;
  top: 120px;
}
.side-card {
  background: var(--ef-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--s-5);
}
.side-card h4 {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ef-teal-aa);
  margin: 0 0 var(--s-3);
}
.side-card p {
  font-size: 14px;
  color: rgba(11,30,51,0.75);
  margin: 0 0 var(--s-4);
}
.side-card input {
  width: 100%;
  height: 44px; padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: var(--s-3);
}
.side-card button {
  width: 100%;
  height: 44px;
  background: var(--ef-teal-aa);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  border-radius: 3px;
  transition: background .18s ease;
}
.side-card button:hover { background: var(--ef-cyan); }

/* Chapter 3 — navy pivot */
.chapter-pivot {
  background: var(--ef-navy-deep);
  color: var(--ef-white);
  padding: 112px 0;
  position: relative;
}
.chapter-pivot::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: var(--ef-gradient);
}
.chapter-pivot .chapter-body { margin: 0 auto; max-width: 760px; }
.chapter-pivot .chapter-body h2 {
  color: var(--ef-white);
  font-size: clamp(34px, 4.2vw, 48px);
  text-align: center;
  margin-bottom: var(--s-7);
}
.chapter-pivot .chapter-body p { color: rgba(255,255,255,0.88); }
.chapter-pivot .pull {
  color: var(--ef-white);
  border-left-color: var(--ef-cyan-aa);
  text-align: center;
  border: 0;
  padding: 0;
  margin: 0 auto var(--s-7);
  max-width: 60ch;
}
.chapter-pivot .eyebrow { text-align: center; color: var(--ef-cyan-aa); }
.chapter-pivot figure { margin-left: auto; margin-right: auto; }

/* § 2.5 Video section */
.story-video-section {
  background: var(--ef-paper);
  padding: var(--s-9) 0;
  text-align: center;
}
.story-video-section h3 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 40px);
  color: var(--ef-navy-deep);
  margin-bottom: var(--s-6);
}
.story-video-frame {
  max-width: 1080px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px -40px rgba(17,56,95,0.4);
  cursor: pointer;
}
.story-video-frame img { width: 100%; height: 100%; object-fit: cover; }

/* § 2.6 Press */
.press-section { padding: var(--s-9) 0; background: var(--ef-paper); border-top: 1px solid var(--color-border); }
.press-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-6);
}
.press-card {
  background: var(--ef-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--s-5);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.press-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(17,56,95,0.2);
}
.press-logo {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: 22px;
  color: var(--ef-navy-deep);
  margin-bottom: var(--s-3);
}
.press-card p {
  font-size: 14px;
  color: rgba(11,30,51,0.75);
  flex: 1;
  margin: 0 0 var(--s-4);
}
.press-card.empty {
  background: transparent;
  border: 1px dashed var(--color-border);
  color: rgba(11,30,51,0.4);
  justify-content: center;
  align-items: center;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* § 2.7 Story CTA */
.story-cta {
  background: var(--ef-navy-deep);
  color: var(--ef-white);
  padding: var(--s-9) 0;
  text-align: center;
  position: relative;
}
.story-cta h2 {
  font-family: var(--font-editorial);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  max-width: 18ch;
  margin: 0 auto var(--s-5);
  color: var(--ef-white);
}
.story-cta .sub {
  font-size: 18px;
  color: rgba(255,255,255,0.82);
  max-width: 54ch;
  margin: 0 auto var(--s-7);
}
.story-cta .meta {
  font-size: 14px;
  color: var(--ef-cyan-aa);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: var(--s-5);
}
.story-cta::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: var(--ef-gradient);
}

/* Related reading reuses homepage .journal-* */
.related-reading { padding: var(--s-9) 0; background: var(--ef-paper); }

/* Responsive */
@media (max-width: 900px) {
  .chapter, .chapter-pivot { padding: 72px 0; }
  .chapter-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .chapter-marker { position: static; border-left: 0; padding-left: 0; border-bottom: 2px solid var(--ef-teal-aa); padding-bottom: 6px; display: inline-block; }
  .chapter-sidebar { position: static; margin-top: var(--s-6); }
  .press-grid { grid-template-columns: 1fr 1fr; }
  .story-hero-inner { padding: 0 0 80px; }
  .chapter-body .pull { margin-left: 0; padding-left: 20px; }
}
@media (max-width: 560px) {
  .press-grid { grid-template-columns: 1fr; }
}
