/* Documentary photography and quiet editorial motion. */
:root {
  --motion-duration: 780ms;
  --nav-ink: #243f3e;
  --story-ink: #284b49;
}
.nav { color: var(--nav-ink); }
.story-nav { color: var(--story-ink); }
.hero { min-height: 700px; }
.hero-photo { left: 46%; width: 54%; height: calc(100% - 78px); object-position: 70% center; }
.hero-shade { display: none; }
.hero-copy { width: 49%; padding-top: 76px; padding-bottom: 150px; padding-right: 2%; }
.hero h1 { font-size: clamp(36px, 3.45vw, 57px); font-weight: 400; letter-spacing: .065em; line-height: 1.36; }
.hero-line { display: block; }
.hero-copy>p:not(.eyebrow) { font-size: 16px; max-width: 380px; line-height: 1.9; color: #e8eeeb; }
.hero .actions { gap: 18px 26px; }
.hero .button { font-size: 13px; }
.hero-bottom { border-color: #d9a44188; padding-top: 20px; bottom: 25px; font-size: 9px; letter-spacing: .1em; }
.hero-bottom>span { display: flex; flex-wrap: wrap; gap: 5px; }
.hero-bottom>span a { display: inline; text-decoration: underline; text-underline-offset: 3px; }
.hero:hover .hero-photo { transform: none; }
.story-nav a { position: relative; min-height: 44px; }
.story-nav a::after { content: ''; position: absolute; bottom: 13px; left: 0; right: 0; height: 1px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.story-nav a:hover::after, .story-nav a:focus-visible::after { transform: scaleX(1); }
.story-nav a:hover { text-decoration: none; }
.section-heading>p { font-size: 15px; }
.media-context { font-size: 12px; color: var(--muted); margin: 24px 0 0; max-width: 790px; }
.documentary-photo { margin: 0; min-width: 0; }
.photo-window { overflow: hidden; background: var(--sage); }
.photo-window img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.documentary-photo figcaption { display: flex; justify-content: space-between; gap: 10px 24px; font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 14px; }
.documentary-photo figcaption a { white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.learning-story { background: var(--paper); }
.learning-gallery { display: grid; grid-template-columns: 1.55fr 1fr; gap: 36px; align-items: start; }
.gallery-main .photo-window { aspect-ratio: 1.24; }
.gallery-main img { object-position: 42% center; }
.gallery-detail .photo-window { aspect-ratio: 1.57; }
.gallery-side { padding-top: 65px; }
.gallery-note { padding: 30px 0 0; }
.small-rule { display: block; width: 40px; height: 2px; background: var(--gold); margin-bottom: 20px; }
.gallery-note p { font-size: clamp(20px, 2vw, 28px); line-height: 1.6; font-weight: 400; margin-bottom: 14px; }
.learning-steps { display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; padding: 0; margin: 48px 0 0; border-top: 1px solid #b8c4bb; position: relative; }
.learning-steps::before { content: ''; position: absolute; top: -1px; left: 0; height: 2px; width: 100%; background: var(--teal); transform-origin: left; }
.learning-steps li { padding: 30px 22px 0 0; display: flex; gap: 18px; }
.step-number { font-size: 12px; color: var(--accent); padding-top: 3px; }
.learning-steps h3 { font-size: 15px; letter-spacing: .03em; }
.learning-steps p { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.lab-figure>.photo-window { height: 100%; position: absolute; inset: 0; }
.lab-figure img { object-position: 38% center; }
.lab-figure figcaption { font-size: 11px; line-height: 1.8; padding: 42px 26px 20px; }
.lab-figure figcaption a { text-decoration: underline; text-underline-offset: 3px; margin-left: 8px; white-space: nowrap; }
.field-film { display: grid; grid-template-columns: .8fr 1.4fr; gap: 7%; align-items: center; background: var(--teal); color: var(--on-dark); }
.film-copy .eyebrow { color: #e9c580; font-size: 10px; letter-spacing: .14em; }
.film-copy h2 { margin-bottom: 26px; }
.film-copy>p:not(.eyebrow) { color: #e3e9e4; font-size: 15px; }
.film-copy .film-context { font-size: 12px!important; color: #bfcfc7!important; border-left: 2px solid var(--gold); padding-left: 16px; margin-block: 26px; }
.film-copy .text-link { color: var(--on-dark); border-color: #cbd5cf99; }
.film-player { position: relative; aspect-ratio: 16/9; background: #082f2d; }
.film-cover { display: block; position: relative; height: 100%; overflow: hidden; }
.film-cover>img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.film-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 35%, #061d1b90); pointer-events: none; }
.film-play { position: absolute; bottom: 25px; left: 25px; display: flex; align-items: center; gap: 17px; color: white; font-size: 16px; z-index: 1; }
.play-symbol { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #fff; border-radius: 50%; background: #f7f6f2; color: var(--accent); font-size: 18px; padding-left: 3px; transition: transform .3s, background .3s; }
.film-play small { display: block; font-size: 11px; letter-spacing: .1em; margin-top: 3px; }
.film-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: 16px; font-size: 11px; line-height: 1.8; color: #cfdbd4; }
.film-caption a { text-decoration: underline; text-underline-offset: 3px; }
.film-caption button { font-size: 11px; padding: 0; color: inherit; }
.film-player iframe { display: block; width: 100%; height: 100%; position: absolute; inset: 0; border: 0; }
.film-summary { font-size: 12px; line-height: 1.8; color: #cfdbd4; margin: 14px 0 0; }
.film-summary strong { font-weight: 500; }
.programme-scene { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 8%; padding-bottom: 65px; }
.scene-photo .photo-window { aspect-ratio: 1.9; }
.scene-copy>p:not(.eyebrow) { font-size: clamp(25px, 2.7vw, 39px); line-height: 1.5; }
.partner-scene { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 8%; padding-top: 0; }
.partner-scene .photo-window { aspect-ratio: 1.35; }
.partner-scene h2 { margin-bottom: 22px; }
.partner-scene>div>p:not(.eyebrow) { font-size: 15px; color: var(--muted); max-width: 440px; }
.partner-scene .button { margin-top: 12px; }
.media-credits article { padding-block: 15px 30px; border-bottom: 1px solid var(--line); scroll-margin-top: 30px; }
.media-credits article h2 { text-transform: none; letter-spacing: 0; }
.footer-bottom [data-motion-toggle] { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom [data-motion-toggle][aria-pressed=true]::after { content: ' ✓'; }

/* Content is visible by default, including when JavaScript is disabled. */
@media (prefers-reduced-motion: no-preference) {
  .hero-line { animation: editorial-enter .9s var(--ease) both; }
  .hero-line:nth-child(2) { animation-delay: 120ms; }
  .hero-copy>.eyebrow { animation: editorial-enter .7s var(--ease) both; }
  .hero-copy>p:not(.eyebrow) { animation: editorial-enter .9s 200ms var(--ease) both; }
  .hero-copy>.actions { animation: editorial-enter .9s 320ms var(--ease) both; }
  .hero-photo { animation: photo-settle 1.5s var(--ease) both; }
  .hero-bottom { animation: editorial-enter .9s 400ms var(--ease) both; }
  .reveal-ready { animation: editorial-enter var(--motion-duration) var(--stagger, 0ms) var(--ease) both; }
  .learning-steps.reveal-ready::before { animation: rule-draw 1.2s .15s var(--ease) both; }
  .learning-steps.reveal-ready li { animation: editorial-enter .75s var(--ease) both; }
  .learning-steps.reveal-ready li:nth-child(2) { animation-delay: 120ms; }
  .learning-steps.reveal-ready li:nth-child(3) { animation-delay: 240ms; }
  .step-art.reveal-ready span { animation: step-rise 1s var(--ease) both; transform-origin: bottom; }
  .step-art.reveal-ready span:nth-child(2) { animation-delay: 100ms; }
  .step-art.reveal-ready span:nth-child(3) { animation-delay: 200ms; }
  details[open]>.photo-window, .module[open]>div { animation: editorial-enter .35s var(--ease) both; }
  dialog[open] { animation: editorial-enter .25s var(--ease) both; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .documentary-photo:hover img, .film-cover:hover>img { transform: scale(1.035); }
  .film-cover:hover .play-symbol { transform: scale(1.08); background: #f1d39b; }
  .access-card { transition: box-shadow .35s, transform .35s; }
  .access-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px #172c2a0c; }
}
@keyframes editorial-enter { from { opacity: .15; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes photo-settle { from { opacity: .45; clip-path: inset(0 0 0 4%); } to { opacity: 1; clip-path: inset(0); } }
@keyframes rule-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes step-rise { from { transform: scaleY(.88); opacity: .3; } to { transform: scaleY(1); opacity: 1; } }
html[data-reduced-motion=true] { scroll-behavior: auto; }
html[data-reduced-motion=true] *, html[data-reduced-motion=true] *::before, html[data-reduced-motion=true] *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
html[data-reduced-motion=true] .lab-figure:hover img, html[data-reduced-motion=true] .documentary-photo:hover img, html[data-reduced-motion=true] .film-cover:hover>img, html[data-reduced-motion=true] .access-card:hover, html[data-reduced-motion=true] .film-cover:hover .play-symbol { transform: none; }

@media (min-width: 1700px) {
  .hero-copy { padding-left: max(5%, calc((100vw - 1440px)/2)); width: 49%; }
}
@media (max-width: 1100px) {
  .hero { min-height: 650px; }
  .hero h1 { font-size: 3.35vw; }
  .hero-copy>p:not(.eyebrow) { font-size: 14px; }
  .hero-copy .actions { align-items: flex-start; flex-direction: column; gap: 14px; }
  .learning-gallery { gap: 24px; grid-template-columns: 1.3fr 1fr; }
  .gallery-main .photo-window { aspect-ratio: 1.05; }
  .gallery-side { padding-top: 40px; }
  .gallery-note { padding-top: 20px; }
  .documentary-photo figcaption { flex-wrap: wrap; gap: 3px 15px; }
  .field-film { grid-template-columns: 1fr 1.2fr; gap: 5%; }
  .film-copy h2 { font-size: 25px; }
  .film-copy>p:not(.eyebrow) { font-size: 14px; }
  .programme-scene, .partner-scene { gap: 5%; }
}
@media (max-width: 700px) {
  .hero { display: block; min-height: 0; padding-bottom: 0; }
  .hero-photo { position: relative; left: auto; inset: auto; width: 100%; height: auto; aspect-ratio: 1.35; object-position: 70% 50%; }
  .hero-copy { width: 100%; padding: 32px 5% 30px; }
  .hero h1 { font-size: clamp(28px, 7.5vw, 47px); line-height: 1.35; white-space: normal; letter-spacing: .05em; }
  .hero-copy>p:not(.eyebrow) { max-width: 480px; font-size: 14px; }
  .hero-copy .actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 15px 23px; }
  .hero .eyebrow { font-size: 9px; }
  .hero-bottom { position: static; margin: 0 5%; padding-block: 18px; display: flex; gap: 12px; font-size: 8px; }
  .hero-bottom>span { width: 100%; }
  .hero-bottom>a { min-height: 28px; align-items: center; }
  .story-nav { justify-content: flex-start; gap: 0 22px; padding-block: 8px; }
  .story-nav a { padding: 12px 0; font-size: 11px; }
  .story-nav a::after { bottom: 6px; }
  .section-heading>p { font-size: 14px; }
  .learning-gallery { grid-template-columns: 1fr; gap: 30px; }
  .gallery-main .photo-window { aspect-ratio: 1.35; }
  .gallery-side { padding-top: 0; display: grid; grid-template-columns: 1fr; }
  .gallery-detail .photo-window { aspect-ratio: 1.7; }
  .gallery-note { padding-top: 26px; }
  .gallery-note p { font-size: 22px; }
  .media-context { font-size: 11px; }
  .learning-steps { grid-template-columns: 1fr; gap: 0; margin-top: 30px; }
  .learning-steps li { padding: 22px 0; border-bottom: 1px solid #c5d0c8; }
  .learning-steps li:last-child { padding-bottom: 0; border-bottom: 0; }
  .learning-steps h3 { font-size: 14px; }
  .learning-steps p { margin-top: 6px; }
  .lab-figure { aspect-ratio: 1.25; }
  .lab-figure img { object-position: 35% center; }
  .lab-figure figcaption { padding-inline: 5%; font-size: 10px; }
  .field-film { grid-template-columns: 1fr; gap: 32px; }
  .film-copy h2 { font-size: 26px; }
  .film-copy .film-context { max-width: 420px; }
  .film-play { bottom: 18px; left: 18px; font-size: 14px; gap: 12px; }
  .play-symbol { width: 45px; height: 45px; font-size: 15px; }
  .film-caption { font-size: 10px; }
  .film-summary { font-size: 11px; }
  .programme-scene, .partner-scene { grid-template-columns: 1fr; gap: 28px; padding-bottom: 45px; }
  .scene-copy>p:not(.eyebrow) { font-size: 28px; }
  .programme-scene .photo-window { aspect-ratio: 1.5; }
  .partner-scene .photo-window { aspect-ratio: 1.45; }
  .footer-bottom>div { gap: 14px 20px; }
}
@media print {
  .film-cover { color: black; }
  .film-player { max-width: 500px; }
  .film-player iframe, .film-play, .film-caption button { display: none; }
  .hero, .field-film { background: white; color: black; }
  .hero-copy>p:not(.eyebrow), .film-copy>p:not(.eyebrow), .film-summary, .film-caption { color: black; }
  .reveal-ready { animation: none; }
}

/* Clear landmarks for the decisions that matter. */
.story-nav .story-priority { font-weight: 600; color: var(--accent); }
.story-nav .story-priority::before { content: ''; display: inline-block; width: 5px; height: 5px; background: var(--gold); margin-right: 8px; vertical-align: 2px; }
.families-section { background: var(--teal); color: var(--on-dark); border-top: 3px solid var(--gold); }
.families-section .eyebrow { color: #e9c580; }
.families-section .section-heading>p { color: #d7e3dc; }
.family-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.family-card { display: flex; flex-direction: column; background: var(--ivory); color: var(--ink); padding: 26px 24px; min-width: 0; border-top: 3px solid #a8c3b5; transition: transform .35s var(--ease), background .35s; }
.family-card:nth-child(2) { border-top-color: #d9a441; }
.family-card:nth-child(3) { border-top-color: #809caf; }
.family-card:nth-child(4) { border-top-color: #809c84; }
.family-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 34px; }
.family-card svg { width: 42px; height: 42px; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.family-card .family-count { display: inline-block; border: 1px solid #9bb7ab; color: var(--accent); padding: 3px 8px; font-size: 10px; }
.family-index { font-size: 9px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 13px; }
.family-card h3 { font-size: 19px; letter-spacing: .035em; line-height: 1.45; min-height: 55px; }
.family-card>p { margin: 17px 0 27px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.family-action { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 11px; font-weight: 500; border-top: 1px solid var(--line); padding-top: 17px; margin-top: auto; color: var(--accent); }
.family-card:focus-visible { outline-offset: 4px; }
.directory-actions { display: flex; gap: 25px; align-items: center; flex-wrap: wrap; margin-top: -22px; padding-bottom: 55px; }
.catalogue-section { background: var(--paper); }
.filters { background: var(--ivory); border: 1px solid #bdcac2; padding: 25px; border-top: 3px solid var(--teal); }
#result-count { display: inline-block; padding: 6px 13px; background: var(--teal); color: white; font-weight: 500; margin: 25px 0; }
.course-grid { gap: 24px; }
.course { border: 1px solid #bbc9c0; border-top: 3px solid #8faa9c; background: var(--card); padding: 30px; display: flex; flex-direction: column; transition: border-color .3s, box-shadow .3s; }
.course[data-family=B] { border-top-color: var(--gold); }
.course[data-family=C] { border-top-color: #809caf; }
.course[data-family=D] { border-top-color: var(--teal); }
.course-meta { align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.course-family { display: flex; align-items: center; gap: 9px; }
.course-family b { background: var(--sage); color: var(--accent); font-weight: 500; padding: 4px 8px; min-width: 35px; text-align: center; }
.course h3 { font-size: 20px; letter-spacing: .025em; line-height: 1.5; }
.course h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.course>p { font-size: 14px; margin-top: 16px; }
.course-bottom { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); }
.course-bottom .fee strong { font-size: 23px; font-weight: 500; }
.course-bottom .button { font-size: 11px; gap: 18px; flex-shrink: 0; }
.course>.small-link { margin-top: 15px; }
.support-section { background: var(--warm); border-top: 3px solid var(--gold); }
.support-section .units { gap: 20px; }
.support-section .unit-card { background: var(--ivory); padding: 30px!important; border: 1px solid #c9c4b6; border-top: 3px solid var(--gold); }
.support-section .unit-card h3 { font-size: clamp(32px, 3.6vw, 49px); color: var(--accent); }
.support-section .unit-card .text-link { font-weight: 500; }
.support-actions { display: flex; justify-content: space-between; align-items: center; gap: 30px; border-top: 1px solid #c5c0b1; border-bottom: 1px solid #c5c0b1; padding: 30px 0; margin: 30px 0 22px; }
.support-actions h3 { font-size: 17px; }
.support-actions p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.support-actions .actions { margin: 0; flex-shrink: 0; }
.giving-guide { background: var(--warm); padding-block: 42px; border-top: 3px solid var(--gold); margin-bottom: 55px; }
.giving-guide-head { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.giving-guide-head .eyebrow { margin-bottom: 12px; }
.giving-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; padding: 0; gap: 32px; margin: 30px 0 22px; }
.giving-steps li { display: flex; gap: 17px; border-top: 1px solid #bcb9ad; padding-top: 24px; }
.giving-steps li>span { font-size: 12px; color: var(--accent); }
.giving-steps h3 { font-size: 15px; letter-spacing: .025em; }
.giving-steps p { font-size: 13px; margin: 10px 0 0; color: var(--muted); }
.giving-guide>.small { margin: 0; color: var(--muted); }
.donation-layout legend { font-size: 24px; line-height: 1.5; margin-bottom: 22px; }
.donation-option { background: var(--card); border-color: #aebeb3; border-top-width: 3px; }
.donation-option strong { font-size: 15px; }
.donation-option b { font-size: 20px; color: var(--accent); }
.donation-option:has(input:checked) { outline: 1px solid var(--teal); background: var(--sage); }
.programme-aside { border-top: 4px solid var(--gold); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
 .family-card:hover { transform: translateY(-5px); background: var(--card); }
 .course:hover { border-color: var(--accent); box-shadow: 0 9px 24px #102d270b; }
}
html[data-reduced-motion=true] .family-card:hover { transform: none; }
@media (max-width: 1100px) {
 .family-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .family-card h3 { min-height: 0; }
 .family-card-top { margin-bottom: 20px; }
 .support-actions { align-items: flex-start; flex-direction: column; }
 .course-bottom { align-items: flex-start; flex-direction: column; }
 .giving-steps { gap: 20px; }
}
@media (max-width: 700px) {
 .family-grid { grid-template-columns: 1fr; gap: 15px; }
 .family-card { padding: 25px; }
 .family-card-top { margin-bottom: 14px; }
 .family-card svg { width: 36px; height: 36px; }
 .family-card h3 { font-size: 22px; }
 .family-card>p { font-size: 14px; margin: 12px 0 20px; }
 .family-action { font-size: 12px; }
 .directory-actions { margin-top: -12px; padding-bottom: 35px; gap: 15px 25px; }
 .filters { padding: 20px; gap: 18px 14px; }
 .filters select { padding: 10px; }
 .course { padding: 24px; }
 .course h3 { font-size: 19px; }
 .course-bottom { flex-direction: row; align-items: center; gap: 12px; }
 .course-bottom .fee strong { font-size: 20px; }
 .course-bottom .button { padding: 12px; gap: 10px; font-size: 10px; }
 .support-section .unit-card { padding: 26px!important; }
 .support-actions h3 { font-size: 16px; }
 .support-actions .actions { align-items: flex-start; flex-direction: column; }
 .giving-guide { padding-block: 32px; margin-bottom: 30px; }
 .giving-guide-head { align-items: flex-start; flex-direction: column; }
 .giving-steps { grid-template-columns: 1fr; gap: 20px; }
 .giving-steps li { padding-top: 20px; }
 .donation-layout legend { font-size: 21px; }
}
@media (max-width: 480px) {
 .partner-grid { grid-template-columns: minmax(0,1fr); }
 .partner-card { min-width: 0; }
}

/* Dark theme: theme.js sets data-theme from the saved choice or the device setting. */
[data-theme=dark] {
  color-scheme: dark;
  --ivory: #0f1716;
  --paper: #141f1e;
  --card: #17221f;
  --warm: #1c1e18;
  --sage: #1b2d2a;
  --tint: #1b2d2a;
  --ink: #e6ece9;
  --muted: #a3b4ae;
  --line: #2c3d3a;
  --accent: #8fd0c4;
  --nav-ink: #dbe5e1;
  --story-ink: #cfe0da;
}
[data-theme=dark] .brand img { filter: brightness(0) invert(.94); }
[data-theme=dark] .menu-button,
[data-theme=dark] .header-cta { border-color: var(--line); }
[data-theme=dark] .text-link { border-bottom-color: #8fd0c455; }
[data-theme=dark] .route-tabs { border-bottom-color: var(--line); }
[data-theme=dark] .nav .nav-donate:hover { background: #0f3b37; }
[data-theme=dark] input::placeholder { color: #8a9b95; }
[data-theme=dark] .language-switcher > .language-panel { box-shadow: 0 16px 40px #00000066; }
