/* The story of one life (B325): a page to scroll – the hero, the owner's words, the chapters along a line of years with
   the photos and what happened meanwhile, the family, the places. Chapters rise into view (story.js) unless the reader
   prefers less motion. */

.story-progress { position: fixed; top: 0; left: 0; z-index: 20; height: 4px; width: 0; background: var(--leaf); }
.story-hero { background: var(--navy); color: var(--on-navy); padding: 56px 0 72px; }
.story-hero .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.story-hero .print { margin: 0; flex: 0 0 300px; padding: 14px 14px 18px; background: #fffdf8; border-radius: 6px; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35); transform: rotate(-1.5deg); }
.story-hero .print img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.story-hero .who { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.story-hero .eyebrow { color: var(--leaf); }
.story-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; font-weight: 600; }
.story-hero .tagline { margin: 0; font-family: var(--serif); font-size: 1.6rem; font-style: italic; line-height: 1.4; color: var(--on-navy-muted); }
.story-hero .cue { margin: 12px 0 0; font-weight: 700; color: var(--leaf); }

.story { padding-top: 56px; }
.story-words { max-width: 44rem; margin: 0 auto 64px; }
.story-words p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.75; }
.story-words p:first-of-type::first-letter { float: left; margin: 6px 10px 0 0; font-size: 4.2rem; line-height: 0.8; color: var(--brass); }

.chapters { margin: 0 auto; padding: 0; list-style: none; max-width: 60rem; position: relative; }
.chapters::before { content: ''; position: absolute; left: 150px; top: 8px; bottom: 8px; width: 2px; background: var(--chip); }
.chapter { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0 56px; padding: 0 0 48px; }
.chapter::before { content: ''; position: absolute; left: 143px; top: 14px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 4px solid #0e6872; box-sizing: border-box; }
.chapter .when { text-align: right; }
.chapter .year { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1.1; color: var(--heading); }
.chapter .age { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--brass); }
.chapter h2 { margin: 6px 0 4px; font-family: var(--serif); font-size: 1.7rem; color: var(--heading); }
.chapter .date, .chapter .where { margin: 0; color: var(--muted); }
.chapter .extra { margin: 8px 0 0; font-size: 1.1rem; }
.chapter .source { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.chapter-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 14px; margin-top: 18px; }
.chapter-photos figure { margin: 0; padding: 10px 10px 12px; background: #fffdf8; border-radius: 6px; box-shadow: 0 10px 24px rgba(11, 45, 77, 0.14); }
.chapter-photos figure:nth-child(odd) { transform: rotate(-1deg); }
.chapter-photos figure:nth-child(even) { transform: rotate(1deg); }
.chapter-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.chapter-photos figcaption { margin-top: 8px; font-size: 0.85rem; color: #3d4955; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.meanwhile { grid-column: 2; margin-top: 28px; padding: 14px 18px; border-radius: 14px; background: var(--brass-soft); display: flex; flex-direction: column; gap: 2px; max-width: 34rem; }
.meanwhile strong { font-family: var(--serif); font-size: 1.15rem; color: var(--heading); }
.meanwhile span:last-child { font-size: 0.9rem; color: var(--brass); }

.story-family, .story-places { margin-top: 56px; }
.family-rows { display: flex; flex-wrap: wrap; gap: 32px; }
.family-rows h3 { margin: 0 0 12px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.faces { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 18px; }
.faces a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 140px; text-align: center; text-decoration: none; color: var(--ink); }
.faces img, .faces .mono { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; font-size: 1.8rem; border: 4px solid var(--card); box-shadow: 0 6px 16px rgba(11, 45, 77, 0.15); }
.places-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 32px; align-items: start; }
.story-places .map { height: 360px; border-radius: 18px; border: 1px solid var(--rule); }
.story-end { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 64px 0 0; }

[data-reveal] { transition: opacity 0.6s ease, transform 0.6s ease; }
.js-reveal [data-reveal]:not(.shown) { opacity: 0; transform: translateY(24px); }
@media (prefers-reduced-motion: reduce) { [data-reveal] { transition: none; } .js-reveal [data-reveal]:not(.shown) { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .story-hero { padding: 24px 0 40px; text-align: center; }
  .story-hero .print { flex-basis: 200px; margin: 0 auto; }
  .chapters::before { left: 8px; }
  .chapter { grid-template-columns: minmax(0, 1fr); padding-left: 32px; }
  .chapter::before { left: 1px; }
  .chapter .when { text-align: left; }
  .meanwhile { grid-column: 1; }
}

/* What has been written about the person (B398): the public articles as cards. */
.story-articles ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.story-articles a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; color: inherit; text-decoration: none; }
.story-articles img, .story-articles .none { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.story-articles .none { background: linear-gradient(135deg, var(--brass-soft), var(--chip)); }
.story-articles .text { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.story-articles .eyebrow { margin: 0; }
.story-articles strong { font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; color: var(--heading); }
.story-articles a:hover strong { text-decoration: underline; }
.story-articles .lede { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.story-articles .meta { font-size: 0.85rem; color: var(--muted); }
