/* Jinja SDA Church website.
   Brand: Seventh-day Adventist global identity (adventist.design) with the
   ALPS web palette. Denim is the primary colour; Nile, Vine and Spark are
   accents. Noto Sans for headings and text, Noto Serif for longer reading,
   Advent Sans (falls back to Noto Sans) for the church name.
   Layout: the seven-column Creation Grid; the 7th "Sabbath column" holds
   only background colour/texture and the church symbol. */

:root {
  --denim: #003b5c;
  --denim-dark: #002d46;
  --denim-darker: #001724;
  --denim-light: #51befb;
  --nile: #007681;
  --nile-dark: #1d5358;
  --vine: #4a7729;
  --spark: #d86018;
  --amethyst: #582c83;
  --ink: #222222;
  --gray-dark: #4a4a4a;
  --gray: #717171;
  --gray-light: #f5f5f5;
  --line: #e2e2e2;
  --white: #ffffff;

  --sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --name: "Advent Sans", "Noto Sans", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
}
img, svg, iframe { max-width: 100%; }
a { color: var(--nile); text-underline-offset: 2px; }
a:hover { color: var(--denim); }
h1, h2, h3 { font-family: var(--sans); line-height: 1.2; margin: 0 0 .6em; color: var(--denim); }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.small { font-size: .875rem; }
.plain { list-style: none; margin: 0; padding: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--white); padding: 8px 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(40px, 7vw, 72px) var(--gutter); }
.band { background: var(--gray-light); padding: clamp(40px, 7vw, 72px) 0; }

/* Placeholders written as [text] in content.json */
.tbc { color: var(--gray); background: #fff4ec; border-bottom: 1px dashed var(--spark); padding: 0 2px; }

/* ── Header and lockup ── */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--denim); }
.lockup-symbol { width: 54px; height: auto; flex: none; color: var(--denim); }
.lockup-text { display: flex; flex-direction: column; font-family: var(--name); line-height: 1.1; font-variant-ligatures: none; font-feature-settings: "liga" 0, "dlig" 0, "clig" 0; }
.lockup-sda { font-size: 1.12rem; font-weight: 700; }
.lockup-local { font-size: .98rem; font-weight: 600; color: var(--nile); }

.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--denim); border-bottom-color: var(--nile); }
/* Submenu (About Us → Our Church / Church Leaders) */
.site-nav .has-sub { position: relative; }
.sub-toggle { background: none; border: 0; padding: 6px 4px; margin-left: 2px; cursor: pointer; color: var(--ink); line-height: 0; }
.sub-toggle::after { content: ""; display: inline-block; vertical-align: 2px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.site-nav .has-sub.is-active > a { color: var(--denim); border-bottom-color: var(--nile); }
.site-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: -16px; min-width: 210px; z-index: 6;
  list-style: none; margin: 0; padding: 8px 0; background: var(--white);
  border: 1px solid var(--line); border-top: 3px solid var(--nile); box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.site-nav .sub-menu a { display: block; padding: 10px 16px; border-bottom: 0; white-space: nowrap; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu a[aria-current="page"] { background: var(--gray-light); color: var(--denim); }
.site-nav .has-sub.open > .sub-menu { display: block; }
.has-sub.open > .sub-toggle::after { transform: rotate(180deg); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.nav-toggle { display: none; font: 600 .95rem var(--sans); background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; color: var(--denim); }

/* ── Creation Grid ──
   The whole page below the header is the grid: six columns of content and
   a seventh "Sabbath column" that runs from the top of the page (beside the
   header, never under it) to the bottom. It holds
   only background colour and the church symbol, which stays in view. */
.creation-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 1fr);
}
.page-main { min-width: 0; display: flex; flex-direction: column; }
.page-main main { flex: 1 0 auto; }
.sabbath-col {
  background:
    radial-gradient(circle at 30% 0, rgba(81, 190, 251, .35), transparent 40%),
    linear-gradient(180deg, var(--nile) 0, var(--nile-dark) 900px, var(--denim) 2200px, var(--denim-darker) 100%);
}
.sabbath-sticky {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
  padding-top: clamp(48px, 8vw, 104px);
}
.sabbath-symbol { width: min(112px, 62%); height: auto; color: var(--white); }

.hero { background: var(--denim); color: var(--white); position: relative; overflow: hidden; }
/* Banner photo under a Denim overlay (same colour as before), so the title stays readable. */
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-img::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0, 45, 70, .92) 0%, rgba(0, 59, 92, .82) 50%, rgba(0, 59, 92, .6) 100%); }
.hero.has-img .hero-content { position: relative; z-index: 2; }
.hero-content {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 112px) var(--gutter);
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .lead { font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 40ch; opacity: .95; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block; font: 600 1rem var(--sans); text-decoration: none;
  padding: 12px 22px; border-radius: var(--radius); background: var(--denim); color: var(--white);
  border: 2px solid var(--denim);
}
.btn:hover { background: var(--denim-dark); color: var(--white); }
.btn-light { background: var(--white); color: var(--denim); border-color: var(--white); }
.btn-light:hover { background: var(--gray-light); color: var(--denim); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* ── Content blocks ── */
.big-serif { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.55; max-width: 46ch; color: var(--gray-dark); }
.intro .big-serif { border-left: 4px solid var(--nile); padding-left: 20px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--nile); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--gray-dark); }
.card.event { border-top-color: var(--spark); }
.event-date { font-size: .85rem; font-weight: 700; color: var(--spark); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }

.service-list { list-style: none; margin: 0 0 1em; padding: 0; }
.service-list li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.svc-time { font-weight: 700; color: var(--denim); font-size: 1.05rem; }
.svc-name { font-weight: 600; }
.svc-day, .svc-note { font-size: .9rem; color: var(--gray); }

.map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; background: var(--gray-light); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.leader-role { font-size: .85rem; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }
.leader-name { font-weight: 600; }

/* Church leaders */
.section-pad { padding-top: clamp(40px, 7vw, 72px); padding-bottom: clamp(40px, 7vw, 72px); }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 28px 20px; }
.person { text-align: center; }
.person-photo { aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; margin: 0 0 14px; width: 100%;
  background: var(--gray-light); border: 1px solid var(--line); border-bottom: 4px solid var(--nile); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(var(--z, 1)); }
.person-placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--nile), var(--denim)); }
.person-symbol { width: 42%; height: auto; color: rgba(255, 255, 255, .85); }
.person-role { font-size: .82rem; font-weight: 700; color: var(--nile); text-transform: uppercase; letter-spacing: .04em; line-height: 1.3; }
.person-name { font-weight: 600; font-size: 1.05rem; margin-top: 4px; }

.contact { display: grid; grid-template-columns: 90px 1fr; gap: 10px 16px; margin: 0; }
.contact dt { font-weight: 700; color: var(--denim); }
.contact dd { margin: 0; }

/* ── Footer ── */
.site-footer { background: var(--denim-darker); color: #d7e3ea; margin-top: 0; }
.site-footer a { color: var(--denim-light); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
.footer-name { font-variant-ligatures: none; font-feature-settings: "liga" 0, "dlig" 0, "clig" 0; font-family: var(--name); font-weight: 700; font-size: 1.15rem; color: var(--white); margin-bottom: 10px; }
.footer-head { font-weight: 700; color: var(--white); margin-bottom: 10px; }
.site-footer .footer-grid p { margin: 0 0 4px; }
.site-footer .footer-grid p.small { margin-top: 10px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; padding-bottom: 24px; }
.site-footer .tbc { background: transparent; color: #9fb3bf; border-bottom-color: var(--spark); }

/* ── Small screens ── */
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav .has-sub { display: flex; flex-wrap: wrap; align-items: stretch; }
  .site-nav .has-sub > a { flex: 1; }
  .sub-toggle { padding: 0 14px; border-bottom: 1px solid var(--line); margin: 0; }
  .site-nav .sub-menu { flex-basis: 100%; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
  .site-nav .sub-menu a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .header-inner { position: relative; }
  .two-col, .footer-grid { grid-template-columns: 1fr; }
  /* Keep the Sabbath column on phones as a narrow band on the right. */
  .creation-grid { grid-template-columns: minmax(0, 1fr) 60px; }
  .sabbath-sticky { padding-top: 40px; }
  .sabbath-symbol { width: 42px; }
}
@media (max-width: 420px) {
  .lockup-symbol { width: 42px; height: auto; }
  .lockup-sda { font-size: .95rem; }
  .lockup-local { font-size: .85rem; }
  .service-list li { grid-template-columns: 88px 1fr; gap: 12px; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
}

/* ── Home page slider ───────────────────────────────────────────────
   All slides share one grid cell, so the slider takes the height of the
   tallest slide and nothing jumps when slides change. The photo sits
   under a Denim overlay so white text stays readable on any image. */
.slider { position: relative; display: grid; background: var(--denim); color: var(--white); overflow: hidden; }
.slide {
  grid-area: 1 / 1; position: relative; display: flex; align-items: center; min-height: clamp(460px, 62vh, 620px);
  opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease, visibility 0s; }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 45, 70, .94) 0%, rgba(0, 59, 92, .78) 42%, rgba(0, 59, 92, .28) 100%);
}
.slide-content { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) 104px; }
.slide h1, .slide h2 { color: var(--white); font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 18ch; }
.slide .lead { font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 42ch; opacity: .96; }
.eyebrow { display: inline-block; margin: 0 0 14px; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding-left: 12px; border-left: 3px solid var(--denim-light); color: var(--white); }

.slider-controls { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 2; display: none; align-items: center; gap: 10px;
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.slider.js-ready .slider-controls { display: flex; }
.slider-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .6); background: rgba(0, 23, 36, .35);
  color: var(--white); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.slider-btn:hover { background: rgba(255, 255, 255, .18); }
.slider-btn::before { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; }
.slider-prev::before { transform: translateX(2px) rotate(135deg); }
.slider-next::before { transform: translateX(-2px) rotate(-45deg); }
.slider-pause { margin-left: auto; }
.slider-pause::before { width: 10px; height: 12px; border-width: 0 3px; transform: none; }
.slider.paused .slider-pause::before { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent currentColor; transform: translateX(2px); }
.slider-dots { display: flex; gap: 8px; }
.slider-dot { box-sizing: content-box; width: 28px; height: 4px; padding: 10px 0; border: 0; background: rgba(255, 255, 255, .45) content-box; cursor: pointer; }
.slider-dot[aria-current="true"] { background-color: var(--white); width: 44px; }
.slider-btn:focus-visible, .slider-dot:focus-visible { outline: 3px solid var(--denim-light); outline-offset: 2px; }

/* Giving: orange (ALPS Spark, darkened for readable white text) */
.btn-give { background: #b84f10; border-color: #b84f10; color: var(--white); }
.btn-give:hover { background: #9a420d; border-color: #9a420d; color: var(--white); }
.site-nav .nav-give a { background: #b84f10; color: var(--white); padding: 6px 16px; border-radius: var(--radius); border-bottom: 0; }
.site-nav .nav-give a:hover, .site-nav .nav-give a[aria-current="page"] { background: #9a420d; color: var(--white); }

.narrow > * { max-width: 760px; }
.give-band { background: var(--denim); color: var(--white); }
.give-band h2 { color: var(--white); }
.give-band .lead { font-family: var(--serif); font-size: 1.15rem; max-width: 46ch; }
.fund { display: flex; flex-wrap: wrap; gap: 20px 56px; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.fund-label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--denim-light); }
.fund-num { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
.give-band .tbc { color: inherit; background: rgba(255, 255, 255, .12); border-bottom-color: rgba(255, 255, 255, .5); }
.give-card p { margin: 0 0 6px; }
.note { margin-top: 24px; color: var(--gray-dark); max-width: 70ch; }

/* Receipt check */
.verify-form { max-width: 620px; }
.verify-form label { display: block; font-weight: 700; color: var(--denim); margin-bottom: 8px; }
.verify-row { display: flex; gap: 10px; flex-wrap: wrap; }
.verify-row input { flex: 1 1 260px; font: 600 1.05rem var(--sans); letter-spacing: .03em; text-transform: uppercase; padding: 12px 14px;
  border: 1px solid #9a9a9a; border-radius: var(--radius); color: var(--ink); }
.verify-row input:focus { outline: 3px solid var(--denim-light); outline-offset: 1px; border-color: var(--denim); }
.verify-row input[aria-invalid="true"] { border-color: #b3261e; }
.form-error { color: #b3261e; font-weight: 600; margin: 10px 0 0; }

@media (max-width: 860px) {
  .site-nav .nav-give a { display: inline-block; margin-top: 12px; padding: 10px 18px; }
  .slide::after { background: linear-gradient(180deg, rgba(0, 45, 70, .7) 0%, rgba(0, 45, 70, .9) 100%); }
  .slide-content { padding-bottom: 96px; }
  .slider-controls { bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.is-active { transition: none; }
}

/* Footer social icons: small, in the bottom strip */
.footer-base { align-items: center; }
.social { display: flex; gap: 8px; }
.site-footer .social-link { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3); color: var(--white); }
.site-footer a.social-link:hover { background: var(--white); color: var(--denim); border-color: var(--white); }
.site-footer .social-link.is-soon { opacity: .4; cursor: default; }
.social-link:focus-visible { outline: 3px solid var(--denim-light); outline-offset: 2px; }

/* Building fund figures */
.fund-usd { font-size: .95rem; color: #c9d8e2; margin-top: 2px; }
.fund-progress { flex: 1 1 100%; }
.fund-bar { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.fund-bar span { display: block; height: 100%; background: #e07a3a; border-radius: 5px; }
.fund-pct { font-size: .9rem; margin-top: 8px; color: #c9d8e2; }

/* Resources (downloads) */
.group-note { color: var(--gray-dark); margin-top: -6px; }
.downloads { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.downloads li { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--nile);
  border-radius: var(--radius); padding: 14px 16px; }
.dl-type { flex: none; width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: var(--white); background: var(--denim); }
.dl-pdf { background: #b3261e; }
.dl-docx, .dl-doc { background: #2b579a; }
.dl-pptx, .dl-ppt { background: #b7472a; }
.dl-xlsx, .dl-xls { background: #217346; }
.dl-mp3, .dl-m4a { background: var(--amethyst); }
.dl-text { flex: 1; min-width: 0; }
.dl-title { font-weight: 700; color: var(--denim); }
.dl-note { color: var(--gray-dark); font-size: .95rem; margin-top: 2px; }
.dl-meta { color: var(--gray); font-size: .85rem; margin-top: 4px; }
@media (max-width: 560px) {
  .downloads li { flex-wrap: wrap; }
  .downloads li .btn { width: 100%; }
}
.landmark { display: block; font-size: .92em; opacity: .85; }
/* Ministry cards and pages */
a.card-link { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.card-link:hover, a.card-link:focus-visible { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-2px); }
.card-more { display: inline-block; margin-top: 8px; color: var(--nile); font-weight: 700; }
.ministry-intro.has-leaders { display: grid; gap: 32px; }
@media (min-width: 860px) { .ministry-intro.has-leaders { grid-template-columns: minmax(220px, 2fr) 3fr; align-items: start; } }
.people-small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ministry-leaders .people-small { grid-template-columns: repeat(auto-fill, minmax(170px, 220px)); }
.downloads li.is-soon { border-left-color: var(--line); background: var(--white); }
.downloads li.is-soon .dl-type { background: #e3e7ea; color: var(--gray-dark); }
.soon-tag { flex: none; font-size: .8rem; font-weight: 700; color: var(--gray-dark); background: #eef1f3; border-radius: 999px; padding: 6px 12px; }
.map-link { margin: 10px 0 0; font-weight: 600; }

/* Leader cards: fade up as they scroll into view (one after another), and a
   gentle zoom of the photo on hover. Only transform/opacity change, so the
   cards never move out of line. Off for people who prefer less motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .people .person { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: calc(var(--i, 0) * 90ms); }
  .js .people .person.is-in { opacity: 1; transform: none; }
  .person-photo img { transition: transform .5s ease; }
  .person:hover .person-photo img, .person:focus-within .person-photo img, .person.is-tapped .person-photo img { transform: scale(calc(var(--z, 1) * 1.06)); }
  .person-photo { transition: box-shadow .3s ease; }
  .person:hover .person-photo { box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
}

/* Slider buttons stay perfect circles on narrow phones (some Android browsers
   squeezed them into ovals); the bars get shorter instead. */
.slider-btn { flex: 0 0 40px; min-width: 40px; max-width: 40px; aspect-ratio: 1 / 1; box-sizing: border-box; -webkit-appearance: none; appearance: none; }
.slider-dots { flex: 0 1 auto; min-width: 0; }
.slider-dot { flex: 0 1 28px; min-width: 14px; }
@media (max-width: 420px) {
  .slider-controls { gap: 8px; }
  .slider-dot { width: 18px; }
  .slider-dot[aria-current="true"] { width: 30px; }
}

/* Our Story timeline: a line with a dot per part of the story. On computers the cards
   alternate left/right of a centre line; on phones the line runs down the left.
   With JavaScript the line fills as you scroll and each dot/card animates in. */
.timeline { list-style: none; margin: 0 auto; padding: 8px 0; position: relative; max-width: 1040px; }
.timeline::before, .tl-line { content: ""; position: absolute; left: 17px; top: 0; bottom: 0; width: 4px; border-radius: 4px; }
.timeline::before { background: rgba(0, 59, 92, .14); }
.tl-line { bottom: auto; height: var(--tl, 100%); background: linear-gradient(var(--nile, #007681), var(--denim)); }
.tl-item { position: relative; padding: 0 0 0 52px; margin: 0 0 34px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot { position: absolute; left: 7px; top: 22px; width: 24px; height: 24px; border-radius: 50%; background: var(--nile, #007681);
  border: 4px solid #fff; box-shadow: 0 0 0 3px var(--nile, #007681), 0 4px 10px rgba(0, 0, 0, .18); }
.tl-card { background: #fff; border-radius: 12px; padding: 22px 22px 8px; box-shadow: 0 6px 22px rgba(0, 45, 70, .09); position: relative; }
.tl-card h2 { margin: 10px 0 10px; font-size: clamp(1.25rem, 3.2vw, 1.6rem); }
.tl-card p { font-family: var(--serif, Georgia, serif); font-size: 1.05rem; line-height: 1.7; margin: 0 0 14px; }
.tl-label { display: inline-block; background: var(--denim); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .06em;
  padding: 3px 14px; border-radius: 99px; text-transform: uppercase; }
@media (min-width: 900px) {
  .timeline::before, .tl-line { left: 50%; margin-left: -2px; }
  .tl-item { width: 50%; padding: 0 52px 0 0; margin-bottom: 18px; }
  .tl-item:nth-of-type(even) { margin-left: 50%; padding: 0 0 0 52px; }
  .tl-item + .tl-item { margin-top: -140px; }
  .tl-dot { left: auto; right: -12px; }
  .tl-item:nth-of-type(even) .tl-dot { right: auto; left: -12px; }
  .tl-card::after { content: ""; position: absolute; top: 26px; right: -9px; border: 9px solid transparent; border-right: 0; border-left-color: #fff; }
  .tl-item:nth-of-type(even) .tl-card::after { right: auto; left: -9px; border: 9px solid transparent; border-left: 0; border-right-color: #fff; }
}
@media (prefers-reduced-motion: no-preference) {
  .tl-js .tl-line { transition: height .15s linear; }
  .tl-js .tl-dot { transform: scale(.35); background: #fff; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1), background-color .45s ease; }
  .tl-js .tl-card { opacity: 0; transform: translateX(-28px); transition: opacity .7s ease, transform .7s ease; }
  .tl-js .tl-item.is-in .tl-dot { transform: scale(1); background: var(--nile, #007681); }
  .tl-js .tl-item.is-in .tl-card { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  .tl-js .tl-item:nth-of-type(odd) .tl-card { transform: translateX(28px); }
  .tl-js .tl-item.is-in .tl-card { transform: none; }
}
@media (max-width: 599px) {
  .timeline::before, .tl-line { left: 8px; width: 3px; }
  .tl-item { padding-left: 30px; margin-bottom: 24px; }
  .tl-dot { left: 0; top: 18px; width: 19px; height: 19px; border-width: 3px; }
  .tl-card { padding: 16px 16px 4px; border-radius: 10px; }
  .tl-card p { font-size: 1rem; line-height: 1.65; }
}

/* Gentle motion across the site (only transform/opacity, so layout never shifts).
   Off for visitors who prefer less motion. */
@keyframes rvUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rvKen { from { transform: scale(1.08); } to { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .slide.is-active .slide-img { animation: rvKen 9s ease-out both; }
  .slide.is-active .slide-content > * { animation: rvUp .8s ease both; }
  .slide.is-active .slide-content > :nth-child(2) { animation-delay: .15s; }
  .slide.is-active .slide-content > :nth-child(3) { animation-delay: .3s; }
  .slide.is-active .slide-content > :nth-child(n+4) { animation-delay: .45s; }
  .hero-img { animation: rvKen 10s ease-out both; }
  .hero-content > * { animation: rvUp .8s ease both; }
  .hero-content > :nth-child(2) { animation-delay: .15s; }
  .hero-content > :nth-child(n+3) { animation-delay: .3s; }
  .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; transition-delay: calc(var(--rv, 0) * 90ms); }
  .rv.rv-in { opacity: 1; transform: none; }
  .fund-progress.rv .fund-bar span { transform: scaleX(0); transform-origin: left; transition: transform 1.6s cubic-bezier(.2, .8, .2, 1) .3s; }
  .fund-progress.rv.rv-in .fund-bar span { transform: none; }
  .card { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 45, 70, .12); }
}
