/* ─── our-story.css — overrides and unique layout for the Our Story page ─────
   doc.css is loaded before this file and provides:
     - nav logo always-visible overrides
     - doc-hero / doc-hero-wash / doc-hero-content
     - doc-h1
     - doc-section / doc-section--alt / doc-section--conclusion
   ────────────────────────────────────────────────────────────────────────── */

/* ─── Hero overrides — wider + centered ──────────────────────────────────── */
.doc-hero-content {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.story-hero-lead {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1.5;
  color: rgb(var(--ink-soft));
  max-width: 680px;
  margin: 0 auto;
}

/* ─── Shared accent span (purple bold) ───────────────────────────────────── */
.story-accent {
  color: rgb(var(--purple));
  font-weight: 700;
}
.story-h1-leslie {
  font-size: clamp(52px, 9vw, 100px);
  line-height: 1.0;
}

/* ─── Trademark / registered marks (superscript, no line-box impact) ──────── */
.tm {
  font-size: 0.62em;
  vertical-align: super;
  line-height: 0;
  letter-spacing: 0;
}

/* ─── Story section shared ────────────────────────────────────────────────── */
.story-section-content {
  max-width: 880px;
  margin: 0 auto;
}

.story-opener-text {
  margin: 0 0 clamp(28px, 3.4vw, 40px);
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.3px;
  color: rgb(var(--ink));
}
.story-opener-text--center {
  text-align: center;
  white-space: nowrap;
  font-size: clamp(26px, 3vw, 48px);
}

@media (max-width: 700px) {
  .story-opener-text--center {
    white-space: normal;
    font-size: clamp(22px, 5.5vw, 38px);
  }
}

/* ─── Two-column: timeline + aside ───────────────────────────────────────── */
.story-two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  margin-left:  calc(-1 * clamp(0px, 5vw, 110px));
  margin-right: calc(-1 * clamp(0px, 5vw, 110px));
}

.story-aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  margin-top: 35px;
}

.story-aside-text {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.7vw, 35px);
  line-height: 1.28;
  letter-spacing: -0.5px;
  color: rgb(var(--ink));
}

/* ─── Timeline ────────────────────────────────────────────────────────────── */
.story-timeline {
  display: flex;
  flex-direction: column;
}
.story-timeline-item {
  display: grid;
  grid-template-columns: clamp(96px, 15vw, 150px) 1fr;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(22px, 2.6vw, 30px) 0;
  border-top: 1px solid rgb(var(--purple) / 0.13);
}
.story-timeline-item--last {
  border-bottom: 1px solid rgb(var(--purple) / 0.13);
}
.story-timeline-label {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.05;
  letter-spacing: -0.4px;
  color: rgb(var(--purple));
}
.story-timeline-body {
  font-size: clamp(16px, 1.5vw, 17px);
  line-height: 1.65;
  color: rgb(var(--text-body));
}
.story-timeline-body p { margin: 0; }

/* ─── Hospital photos (full-bleed) ────────────────────────────────────────────
   The track is a shared .carousel-viewport (see shared/carousel.css + .js).
   Desktop (>=700px): all photos fit across, so it never overflows — a static row
   with no dots. Mobile (<700px): photos are sized one-per-view, the track scrolls,
   and carousel.js turns on the dot controls and swipe semantics. ─────────────── */
.story-hscroll {
  margin: clamp(28px, 3.5vw, 44px) 0 clamp(14px, 2vw, 22px);
}
.story-hscroll-track {
  gap: 4px;
  margin: 0 calc(-1 * clamp(20px, 5vw, 64px));   /* full-bleed within the padded section */
}
.story-hscroll-item {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.story-hscroll-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .story-hscroll-item:hover img { transform: scale(1.04); }
}

/* Mobile: one photo per view (with a peek of the next), swipeable */
@media (max-width: 699px) {
  .story-hscroll-track {
    gap: clamp(10px, 3vw, 16px);
    margin: 0 calc(-1 * clamp(20px, 5vw, 40px));
    padding: 18px clamp(20px, 5vw, 40px);   /* vertical room for the photo shadows */
  }
  .story-hscroll-item {
    flex: 0 0 auto;
    width: min(80vw, 320px);
    border-radius: var(--radius-photo);
    box-shadow: 0 16px 40px -24px rgb(var(--purple-shadow) / 0.5);
  }
}

.story-photo-strip-caption {
  margin: 12px 0 clamp(32px, 4vw, 48px);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgb(var(--text-body));
  text-align: center;
  font-style: italic;
}

/* ─── Founder Photo ───────────────────────────────────────────────────────── */
/* ─── "Life" photos — justified row → mobile carousel ─────────────────────────
   The track is a shared .carousel-viewport (overflow / snap / scrollbar from
   shared/carousel.css). Desktop: a justified row — every photo shares one height
   and its flex-grow tracks its aspect ratio (set inline as --ar), so the row
   fits the section width with no overflow and stays a plain static row. Mobile:
   natural widths at a usable height overflow the screen, so carousel.js turns on
   the swipe + dot controls. */
.story-life-row {
  align-items: stretch;
  gap: clamp(8px, 1.2vw, 14px);
  /* Break out of the container to full section width, like .story-hscroll. */
  margin: clamp(28px, 3.5vw, 44px) calc(-1 * clamp(20px, 5vw, 64px)) 0;
  padding: 0 clamp(12px, 2.5vw, 36px);
}
.story-life-row-item {
  flex: var(--ar, 1) 1 0;
  min-width: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px -22px rgb(var(--purple-shadow) / 0.45);
}
/* Per-photo aspect ratio (drives flex-grow on desktop, aspect-ratio on mobile).
   --ar = width / height. Kept as classes, not inline styles, per CSS standards. */
.story-life-row-item--wide      { --ar: 1.6; }   /* ~8:5 landscape */
.story-life-row-item--landscape { --ar: 1.333; } /* 4:3 */
.story-life-row-item--portrait  { --ar: 0.75; }  /* 3:4 */
.story-life-row-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .story-life-row-item:hover img { transform: scale(1.04); }
}
@media (max-width: 699px) {
  .story-life-row {
    height: clamp(200px, 56vw, 280px);
    padding: 0 clamp(20px, 5vw, 40px);
  }
  .story-life-row-item {
    flex: 0 0 auto;
    height: 100%;
    width: auto;
    aspect-ratio: var(--ar, 1);   /* width follows aspect without waiting on the image to load */
  }
}
.story-life-row-caption {
  margin: 12px 0 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgb(var(--text-body));
  text-align: center;
}

/* ─── Stats ───────────────────────────────────────────────────────────────── */
.story-numbers-intro {
  margin: 0 0 clamp(36px, 4.5vw, 52px);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.7vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.4px;
  color: rgb(var(--ink));
  text-align: center;
}
.story-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 4vw, 48px) clamp(20px, 4vw, 44px);
}
.story-stat {
  text-align: center;
}
.story-stat-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 0.86;
  letter-spacing: -2.5px;
  color: rgb(var(--purple));
}
.story-stat-label {
  margin-top: 17px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgb(var(--text-body));
}
.story-stats-source {
  margin: clamp(28px, 3vw, 38px) 0 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgb(var(--text-body));
  text-align: center;
}

/* ─── Caregiver + name reveal section ────────────────────────────────────── */
.story-caregiver-wrap {
  max-width: 1100px;
  margin: 0 auto;
}
.story-caregiver-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(21px, 4vw, 48px);
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: rgb(var(--ink));
  text-align: center;
  margin: 0 0 clamp(36px, 4.5vw, 56px);
}
.story-caregiver-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.story-caregiver-text p {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(17px, 1.9vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.3px;
  color: rgb(var(--ink-soft));
}
.story-caregiver-text p + p {
  margin-top: clamp(20px, 2.4vw, 30px);
}
.story-name-reveal {
  padding-left: clamp(0px, 3vw, 40px);
  border-left: 1px solid rgb(var(--purple) / 0.18);
}
.story-name-reveal-intro {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.8px;
  color: rgb(var(--ink));
  margin: 0 0 clamp(22px, 2.8vw, 30px);
}
.story-name-reveal-words {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.2vw, 22px);
  padding-left: clamp(12px, 1.6vw, 22px);
}
.story-name-word {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -1.5px;
  display: block;
}
.story-name-word--purple { color: rgb(var(--purple)); }
.story-name-word--dark   { color: rgb(var(--ink)); }
.story-name-def {
  margin: 6px 0 0 clamp(14px, 1.8vw, 26px);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.35;
  color: rgb(var(--ink-soft));
}
.story-name-close {
  margin: clamp(24px, 3vw, 34px) 0 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.8px;
  color: rgb(var(--ink));
}

/* ─── Pledge content (dark bg from doc-section--conclusion) ──────────────── */
.story-pledge-content {
  max-width: 880px;
  margin: 0 auto;
}
.story-pledge-eyebrow {
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgb(var(--purple-mid));
  margin: 0 0 clamp(24px, 3vw, 32px);
}
.story-pledge-headline {
  display: flex;
  align-items: baseline;
  gap: clamp(18px, 2.4vw, 34px);
  flex-wrap: wrap;
}
.story-pledge-pct {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(72px, 11vw, 140px);
  line-height: 0.82;
  letter-spacing: -4px;
  color: rgb(var(--amber-bright));
}
.story-pledge-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(22px, 2.9vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.4px;
  color: rgb(var(--text-on-dark));
  max-width: 620px;
  padding-left: clamp(10px, 2vw, 24px);
}
.story-pledge-link {
  margin-top: clamp(26px, 3vw, 34px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 22px;
  color: rgb(var(--amber-bright));
  text-decoration: none;
  border-bottom: 1.5px dotted rgb(var(--amber-bright));
  padding-bottom: 3px;
}
.story-pledge-link:focus-visible {
  outline-color: rgb(var(--amber-bright));
}
.story-pledge-dedication {
  margin: clamp(34px, 4.2vw, 52px) 0 0;
  padding-top: clamp(24px, 3vw, 32px);
  border-top: 1px solid rgb(var(--text-on-dark) / 0.15);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.32;
  letter-spacing: -0.3px;
  color: rgb(var(--text-on-dark));
  text-align: center;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .story-two-col {
    grid-template-columns: 1fr;
    margin-left: 0;
    margin-right: 0;
  }
  .story-aside {
    position: static;
    margin-top: 0;
  }
  .story-aside-text {
    text-align: center;
  }
  .story-caregiver-grid {
    grid-template-columns: 1fr;
  }
  .story-name-reveal {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgb(var(--purple) / 0.18);
    padding-top: clamp(28px, 4vw, 40px);
  }
}

@media (max-width: 500px) {
  .story-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .story-timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
