/* ==========================================================================
   CSI Parish (Malayalam) Abu Dhabi — concept
   Tokens → base → nav → journey/stage → chapters → finale → footer → responsive
   ========================================================================== */

:root {
  --cross: #C2485D;
  --cross-deep: #9C2F4A;
  --flame: #EC6A30;
  --pink: #F5BFD9;
  --motto: #B12482;
  --saffron: #FFB23F;
  --sky: #1F7EC2;
  --teal: #12A8B5;
  --lawn: #3F9B2C;
  --peach: #E6BFAE;
  --cream: #FFF4EC;
  --night: #2A0E1F;

  --bg: #FFF4EC;          /* animated by journey.js */
  --ink: #2A0E1F;         /* animated by journey.js */

  --f-display: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --f-ui: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --f-ml: "Baloo Chettan 2", "Noto Sans Malayalam", sans-serif;

  --nav-h: 72px;
  --radius: 18px;
  --arm: 10px;            /* the cross arm, as an interface unit */
  /* the church's pointed arch, as a mask for photo frames and cards */
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 130' preserveAspectRatio='none'%3E%3Cpath d='M0 130V52C0 30 24 14 50 0C76 14 100 30 100 52V130Z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[data-motion="reduced"] { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--night);
  font: 400 1.0625rem/1.6 var(--f-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; }
p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--night); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .9em 1.35em; border-radius: 999px; border: 2px solid transparent;
  font: 650 1rem/1 var(--f-ui); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}
.btn svg { width: 1.15em; height: 1.15em; transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cross); color: #fff; }
.btn-primary:hover { background: var(--cross-deep); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn-ghost:hover svg, .btn-primary svg:first-child:not(:last-child) { transform: none; }

.link {
  display: inline-flex; align-items: center; gap: .45em;
  font-weight: 650; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  padding-bottom: 2px; transition: background-size .3s;
}
.link svg { width: 1.05em; height: 1.05em; transition: transform .25s; }
.link:hover { background-size: 100% 2px; }
.link:hover svg { transform: translateX(3px); }
.links { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; margin-top: 1.75rem; }

/* ---------- navigation ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem; padding: 0 clamp(16px, 3vw, 40px);
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  transition: background-color .5s ease, color .5s ease;
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 44px; height: 44px; --seam: var(--bg); }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font: 700 1.08rem/1.1 var(--f-display); letter-spacing: -.01em; }
.brand-ml { font: 500 .8rem/1.3 var(--f-ml); opacity: .75; }
.nav-links { display: flex; gap: 1.4rem; font-weight: 600; font-size: .95rem; }
.nav-links a { text-decoration: none; position: relative; padding: .4rem 0; }
/* the underline is a cross arm that grows from the left */
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-login { opacity: .9; }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.btn-nav { background: var(--ink); color: var(--bg); padding: .7em 1.1em; font-size: .92rem; white-space: nowrap; transition: background-color .5s, color .5s; }
.btn-nav:hover { opacity: .9; }
.btn-nav:hover svg { transform: none; }
.btn-nav .short { display: none; }
.motion-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  width: 40px; height: 40px; justify-content: center; border-radius: 12px;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  background: none; color: inherit; cursor: pointer;
}
.motion-btn svg { width: 18px; height: 18px; }
.motion-btn[aria-pressed="true"] svg { opacity: .45; }
.motion-btn.wide { width: auto; padding: 0 .9rem; font: 600 .85rem var(--f-ui); }
.menu-btn { display: none; }

/* chapter rail: squares (hubs); the active one becomes a cross */
.rail {
  position: fixed; left: 22px; top: 50%; z-index: 40; transform: translateY(-50%);
  display: grid; gap: 14px; color: var(--ink);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.in-journey .rail { opacity: 1; pointer-events: auto; }
.rail a { position: relative; display: block; width: 16px; height: 16px; text-decoration: none; }
.rail a::before, .rail a::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: currentColor;
  width: 8px; height: 8px; transform: translate(-50%, -50%); opacity: .35;
  transition: width .3s, height .3s, opacity .3s, background-color .3s;
}
.rail a[aria-current]::before { width: 5px; height: 16px; opacity: 1; background: var(--cross); }
.rail a[aria-current]::after { width: 16px; height: 5px; opacity: 1; background: var(--cross); }
[data-theme="dark"] .rail a[aria-current]::before, [data-theme="dark"] .rail a[aria-current]::after { background: var(--saffron); }
.rail span {
  position: absolute; left: 26px; top: 50%; transform: translate(-6px, -50%); white-space: nowrap;
  font: 600 .8rem var(--f-ui); opacity: 0; transition: opacity .2s, transform .2s;
}
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

/* ---------- journey layout ---------- */

.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr);
}
.stage {
  grid-column: 2; grid-row: 1; align-self: start;
  position: sticky; top: 0; height: 100vh; height: 100svh;
  padding: calc(var(--nav-h) + 8px) clamp(12px, 3vw, 48px) 24px 0;
  pointer-events: none;
}
.stage svg { width: 100%; height: 100%; overflow: visible; }
.stage-fallback { width: min(80%, 520px); margin: 20vh auto 0; }
.chapters { grid-column: 1; grid-row: 1; padding-left: clamp(64px, 7.5vw, 128px); padding-right: clamp(16px, 2vw, 32px); }

/* ---------- stage: scene layers ---------- */

#stage .scene { opacity: min(1, calc(var(--v, 0) * 2.2)); }
#stage .scene.is-off { display: none; }
#stage .pop {
  --p: clamp(0, calc((var(--v, 0) - var(--d, 0) * .45) / .55), 1);
  opacity: var(--p);
  transform: translateY(calc((1 - var(--p)) * 22px));
}
[data-motion="reduced"] #stage .scene { transition: opacity .5s; }
[data-motion="reduced"] #stage .pop { transform: none; opacity: 1; }

/* Build-up pieces run on the slower arrival clock (--w) with their own delay (--d, 0..1).
   --e eases out with a slight settle, so each piece lands softly instead of stopping dead. */
#stage .rise, #stage .grow, #stage .unfurl, #stage .reach, #stage .settle {
  --p: clamp(0, calc((var(--w, 0) - var(--d, 0) * .6) / .4), 1);
  --q: calc(1 - var(--p));
  --e: calc(1 - var(--q) * var(--q) * var(--q) * 1.6 + var(--q) * var(--q) * .6);
}
/* rises from below (the parent clip hides what is still below the horizon) */
#stage .rise { transform: translateY(calc((1 - var(--e)) * var(--dy, 220) * 1px)); }
/* grows out of a fixed point (set transform-origin on the element) */
#stage .grow { transform-box: view-box; opacity: clamp(0, calc(var(--p) * 3), 1); transform: scale(var(--sx, var(--e)), var(--sy, var(--e))); }
/* a palm opening from upright to its resting angle (--r, degrees), pivoting on the root */
#stage .unfurl { transform-box: view-box; opacity: clamp(0, calc(var(--p) * 3), 1); transform: rotate(calc((1 - var(--e)) * var(--r, 0) * 1deg)) scale(calc(.35 + var(--e) * .65)); }
/* slides in sideways (--dx): the church's wings opening like a book */
#stage .reach { opacity: clamp(0, calc(var(--p) * 3), 1); transform: translateX(calc((1 - var(--e)) * var(--dx, 0) * 1px)); }
/* a photograph settles into its frame, as if we had just stepped up to it */
#stage .settle { transform-box: view-box; opacity: clamp(0, calc(var(--p) * 2.5), 1); transform: scale(calc(1 + (1 - var(--e)) * .28)); }
[data-motion="reduced"] #stage :is(.rise, .grow, .unfurl, .reach, .settle) { transform: none; opacity: 1; }

/* Dawn light: each glow comes up as the hour it belongs to opens (--fire is the lit fraction, --k the threshold). */
#stage .lit { opacity: clamp(0, calc((var(--fire, 0) - var(--k, 0)) * 5), 1); }
#stage .lit-all { opacity: calc(var(--fire, 0) * var(--o, 1)); }

[data-motion="full"] #stage .drift { animation: drift 5s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-14px); opacity: .55; } to { transform: translateX(14px); opacity: 1; } }
[data-motion="full"] #stage .twinkle { animation: blink 3.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
/* photos drift very slowly while they rest; the finale's rays turn */
[data-motion="full"] #stage .kb { transform-box: view-box; animation: kb 18s ease-in-out infinite alternate; }
@keyframes kb { from { transform: scale(1); } to { transform: scale(1.07); } }
[data-motion="full"] #stage .spin { transform-box: view-box; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-motion="full"] #stage .glow-pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scale(.8); opacity: .5; } to { transform: scale(1.1); opacity: 1; } }
[data-motion="full"] #stage .ripple { transform-box: fill-box; transform-origin: center; animation: ripple 2.6s ease-out infinite; }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* motif */
#stage .m-arm, #stage .m-dot { shape-rendering: geometricPrecision; }

/* idle life: only when motion is on, and only where it carries meaning (lamps on the stairs, flames in the pews) */
html[data-motion="full"]:is([data-scene="roots"], [data-scene="worship"]) #stage :is(.m-petals, .m-overlap) path {
  transform-box: view-box; transform-origin: 0 0;
  animation: flicker 3.2s ease-in-out infinite alternate;
}
html[data-motion="full"] #stage :is(.m-petals, .m-overlap) g:nth-child(2n) path { animation-duration: 2.6s; animation-delay: -1s; }
html[data-motion="full"] #stage :is(.m-petals, .m-overlap) g:nth-child(3n) path { animation-duration: 3.8s; animation-delay: -2s; }
/* the lotus of fellowships breathes slowly */
html[data-motion="full"][data-scene="family"] #stage .m-petals path {
  transform-box: view-box; transform-origin: 0 0;
  animation: breathe 4.2s ease-in-out infinite alternate;
}
@keyframes flicker { from { transform: rotate(-2deg) scale(1); } to { transform: rotate(2deg) scale(1.03); } }
@keyframes breathe { from { transform: scale(.985); } to { transform: scale(1.02); } }

/* SVG typography */
#stage text { font-family: var(--f-ui); }
.chip-bg { fill: #FFFFFF; filter: drop-shadow(0 6px 14px rgba(42, 14, 31, .12)); }
.chip-bg.ink { fill: #2A0E1F; filter: drop-shadow(0 6px 14px rgba(42, 14, 31, .2)); }
.chip-t { font: 650 21px var(--f-ui); fill: #2A0E1F; }
.chip-t.sm { font-size: 19px; }
.chip-t.light { fill: #FFF3E6; }
.yr { font: 800 26px var(--f-display); fill: var(--cross); letter-spacing: -.01em; }
.yr.sm { font-size: 22px; }
.yr.light { fill: var(--saffron); }
.yr-s { font: 600 16px var(--f-ui); fill: #2A0E1F; opacity: .8; }
.yr-s.light { fill: #FFF3E6; opacity: 1; }
.leader { stroke: #2A0E1F; stroke-opacity: .35; stroke-width: 2; stroke-dasharray: 3 5; fill: none; }
.hb-k { font: 800 14px var(--f-ui); letter-spacing: 3px; fill: #FFD25A; }
.hb-n { font: 800 42px var(--f-display); fill: #FFFFFF; letter-spacing: -.02em; }
.hb-s { font: 600 16px var(--f-ui); fill: #FFF3E6; }
.petal-icons { color: #FFFFFF; }
.fl-a { font: 750 21px var(--f-display); fill: #2A0E1F; }
.fl-b { font: 500 16px var(--f-ui); fill: #2A0E1F; opacity: .72; }
.sea-t { font: italic 600 24px var(--f-ui); fill: #1B7C88; }
.map-a { font: 800 18px var(--f-ui); letter-spacing: 3px; fill: #0E2A2C; }
.map-s { font: 650 15px var(--f-ui); fill: #0E2A2C; }
.map-s.dim { font-weight: 500; opacity: .7; }
.shield-t { font: 800 17px var(--f-ui); fill: #FFFFFF; letter-spacing: .5px; }
.compass-n { font: 800 22px var(--f-ui); fill: #B12482; }
.map-paper { filter: drop-shadow(0 18px 36px rgba(14, 42, 44, .16)); }
.card-bg { fill: #fff; filter: drop-shadow(0 10px 18px rgba(14, 42, 44, .2)); }
.pc-t { font: italic 600 14px var(--f-ui); fill: #2A0E1F; }
.sheet { filter: drop-shadow(0 12px 24px rgba(120, 70, 0, .18)); }
.mast-t { font: 800 22px var(--f-display); letter-spacing: 4px; fill: #FFFFFF; }
.mast-ml { font: 700 24px var(--f-ml); fill: #B12482; }
.pm-t { font: 800 15px var(--f-ui); letter-spacing: 1.5px; fill: #B12482; opacity: .9; }
.pm-t.sm { font-size: 12px; letter-spacing: 3px; }

/* ---------- chapters ---------- */

.chapter {
  min-height: 130vh; display: flex; align-items: center;
  color: var(--night);
}
.chapter[data-theme="dark"] { color: #FFF3E6; }
.chapter-hero { min-height: 100vh; min-height: 100svh; position: relative; }
.chapter-inner { max-width: 35rem; padding: 16vh 0; opacity: var(--cv, 1); }
[data-motion="reduced"] .chapter-inner { transition: opacity .4s; }
.chapter-hero .chapter-inner { padding-top: calc(var(--nav-h) + 8vh); }

.eyebrow {
  display: flex; align-items: center; gap: .7rem; margin-bottom: 1.25rem;
  font: 700 .8rem/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase;
}
/* the hub square that becomes a cross when its chapter is active */
.eb-mark { position: relative; width: 16px; height: 16px; flex: none; }
.eb-mark::before, .eb-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 10px; height: 10px; background: var(--cross);
  transition: width .5s cubic-bezier(.6, 0, .2, 1), height .5s cubic-bezier(.6, 0, .2, 1);
}
.chapter[data-theme="dark"] .eb-mark::before, .chapter[data-theme="dark"] .eb-mark::after { background: var(--saffron); }
.is-active .eb-mark::before { width: 5px; height: 16px; }
.is-active .eb-mark::after { width: 16px; height: 5px; }

h1 {
  font-size: clamp(3rem, 6.4vw, 6.2rem); font-weight: 800; line-height: .92; letter-spacing: -.04em;
  font-variation-settings: "opsz" 96;
}
h2 {
  font-size: clamp(2.3rem, 4.3vw, 4rem); font-weight: 760; line-height: .98; letter-spacing: -.035em;
  font-variation-settings: "opsz" 96;
}
h1 em, h2 em { font-style: normal; color: var(--cross); }
#welcome h1 em {
  background: linear-gradient(100deg, var(--motto), var(--cross) 40%, var(--flame) 75%, var(--saffron));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
#home h2 em { color: var(--sky); }
#worship h2 em { color: #8A2F9E; }
#family h2 em { color: var(--motto); }
#visit h2 em { color: #12808B; }
#messenger h2 em { color: var(--cross-deep); }

.verse { margin-top: 1.1rem; font: 600 1.35rem/1.4 var(--f-ml); color: var(--motto); }
.verse span { font: 500 .95rem var(--f-ui); color: var(--night); opacity: .7; margin-left: .3rem; }
.lede { margin-top: 1.4rem; font-size: 1.15rem; line-height: 1.62; max-width: 33rem; }
.small { margin-top: 1.4rem; font-size: .92rem; opacity: .75; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.quick { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 2.5rem 0 0; }
.quick div { border-left: var(--arm) solid var(--cross); padding-left: .9rem; }
.quick div:nth-child(2) { border-color: var(--flame); }
.quick div:nth-child(3) { border-color: var(--teal); }
.quick dt { font: 700 .72rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.quick dd { margin: .2rem 0 0; font-weight: 650; }

.scroll-cue { position: absolute; left: 0; bottom: 5vh; width: 26px; height: 54px; }
.scroll-cue span { position: absolute; left: 50%; top: 0; width: 3px; height: 100%; background: currentColor; opacity: .25; transform: translateX(-50%); }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 0; width: 11px; height: 11px; background: var(--cross); transform: translateX(-50%); }
[data-motion="full"] .scroll-cue::after { animation: cue 1.8s cubic-bezier(.6, 0, .2, 1) infinite; }
@keyframes cue { 0% { top: 0; opacity: 0; } 30% { opacity: 1; } 100% { top: 43px; opacity: 0; } }

/* roots: the timeline is a staircase too — each step indents a little further */
.steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 6px; }
.steps li {
  display: grid; grid-template-columns: 7.2rem 1fr; gap: 1rem; align-items: baseline;
  margin-left: calc(var(--i, 0) * 1.1rem); padding: .75rem 1rem;
  background: rgba(255, 255, 255, .65); border-left: var(--arm) solid var(--c, var(--cross));
}
.steps li:nth-child(1) { --i: 0; --c: #F08A5D; }
.steps li:nth-child(2) { --i: 1; --c: #E2655A; }
.steps li:nth-child(3) { --i: 2; --c: #D24E5C; }
.steps li:nth-child(4) { --i: 3; --c: var(--cross); }
.steps li:nth-child(5) { --i: 4; --c: #A93A5E; }
.steps b { font: 800 1.15rem var(--f-display); color: var(--c); }
.steps span { font-size: .95rem; line-height: 1.5; }
.steps + .small { margin-top: 1.4rem; }
.small + .link { margin-top: 1.2rem; }

.facts { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .9rem; }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: .8rem; align-items: start; }
.facts svg { width: 24px; height: 24px; color: var(--sky); margin-top: .1rem; }

/* worship: the HTML schedule is the hymn board from the scene */
.hymns { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 8px; }
.hymns li {
  display: grid; grid-template-columns: 10.5rem 1fr; gap: .1rem 1rem; align-items: baseline;
  padding: .9rem 1.1rem; border-radius: 14px; background: rgba(255, 255, 255, .72);
  border-left: var(--arm) solid #8A2F9E;
}
.hymns li:nth-child(2) { border-color: var(--flame); }
.hymns li:nth-child(3) { border-color: var(--teal); }
.hymns .when { font: 800 1.15rem var(--f-display); color: #4A1F45; grid-row: span 2; white-space: nowrap; }
.hymns .what { font-weight: 650; }
.hymns .where { font-size: .88rem; opacity: .75; }

/* fellowships: every row is a petal of its own colour */
.fellowships { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 8px; }
.fellowships a {
  position: relative; display: grid; gap: .1rem; padding: .8rem 1rem .8rem 3.1rem;
  border-radius: 999px 18px 18px 999px; text-decoration: none;
  background: color-mix(in srgb, var(--c) 10%, #FFFFFF);
  transition: background-color .25s, transform .25s;
}
.fellowships a::before {
  content: ""; position: absolute; left: .9rem; top: 50%; width: 22px; height: 34px; transform: translateY(-50%) rotate(-12deg);
  background: var(--c);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-17 -103 34 105'%3E%3Cpath d='M0 0C-12-7-15-29-8-49C-3-62 4-72 2-84C1-90-2-95-7-101C9-93 17-78 15-59C13-39 9-14 0 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-17 -103 34 105'%3E%3Cpath d='M0 0C-12-7-15-29-8-49C-3-62 4-72 2-84C1-90-2-95-7-101C9-93 17-78 15-59C13-39 9-14 0 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s;
}
.fellowships a:hover { background: color-mix(in srgb, var(--c) 20%, #FFFFFF); transform: translateX(4px); }
.fellowships a:hover::before { transform: translateY(-50%) rotate(0deg) scale(1.1); }
.fellowships b { font-weight: 700; }
.fellowships span { font-size: .88rem; opacity: .75; }

/* visit */
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.place { background: #fff; border-radius: var(--radius); padding: 1.2rem 1.2rem 1.1rem; box-shadow: 0 10px 30px rgba(14, 94, 104, .12); border-top: var(--arm) solid var(--teal); }
.place:first-child { border-top-color: var(--cross); }
.place > svg:first-child { width: 28px; height: 28px; color: var(--cross); }
.place:nth-child(2) > svg:first-child { color: var(--teal); }
.place h3 { margin: .6rem 0 .3rem; font-size: 1.35rem; }
.place p { font-size: .93rem; line-height: 1.5; margin-bottom: .8rem; }
.place .link { font-size: .92rem; }

/* messenger: the vicar, in the arch */
.vicar { display: grid; grid-template-columns: 112px 1fr; gap: 1.25rem; align-items: center; margin-top: 2rem; padding: 1rem 1.25rem 1rem 1rem; background: #FFF7EA; border-radius: 22px; box-shadow: 0 12px 30px rgba(120, 70, 0, .14); }
.vicar figure { margin: 0; aspect-ratio: 100 / 130; -webkit-mask: var(--arch) center / 100% 100% no-repeat; mask: var(--arch) center / 100% 100% no-repeat; background: var(--peach); }
.vicar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.vicar-k { font: 700 .72rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--motto); }
.vicar h3 { font-size: 1.35rem; margin: .15rem 0 .5rem; }
.vicar ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; font-size: .95rem; }
.vicar li { display: flex; align-items: center; gap: .55rem; }
.vicar li svg { width: 18px; height: 18px; color: var(--cross); flex: none; }
.vicar a { text-decoration: none; }
.vicar a:hover { text-decoration: underline; }

/* ---------- finale: the last chapter of the journey ---------- */

.chapter-come .eb-mark::before { width: 5px; height: 16px; }
.chapter-come .eb-mark::after { width: 16px; height: 5px; }
.again { margin-top: 1.6rem; font-size: .95rem; }
.again svg { transform: rotate(-90deg); }
.again:hover svg { transform: rotate(-90deg) translateX(3px); }

/* ---------- footer ---------- */

.footer { background: var(--night); color: #FFF3E6; padding: 64px clamp(20px, 6vw, 96px) 32px; display: grid; grid-template-columns: 1.2fr 2fr; gap: 40px; position: relative; z-index: 1; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; font-size: .95rem; line-height: 1.6; }
.footer-mark { width: 64px; height: 64px; flex: none; --seam: var(--night); }
.footer nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer h4 { margin: 0 0 .7rem; font: 700 .75rem var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--pink); }
.footer nav a { display: block; text-decoration: none; opacity: .85; padding: .2rem 0; }
.footer nav a:hover { opacity: 1; text-decoration: underline; }
.footer-base { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 24px; font-size: .85rem; opacity: .85; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .nav-links { gap: 1rem; font-size: .9rem; }
  .nav-login { display: none; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-ml { display: none; }
  .btn-nav { padding: .6em .85em; font-size: .85rem; }
  .btn-nav .long { display: none; }
  .btn-nav .short { display: inline; }
  .nav .motion-btn { display: none; }
  .menu-btn {
    display: grid; align-content: center; gap: 5px; width: 42px; height: 42px; padding: 0 9px;
    background: none; border: 0; color: inherit; cursor: pointer; position: relative;
  }
  .menu-btn span { display: block; height: 3px; background: currentColor; transition: transform .3s, opacity .2s; }
  /* open: the three bars become an equal-armed cross, turned to read as "close" */
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; gap: 0; padding: 8px 20px 24px;
    background: var(--bg); color: var(--ink); font-size: 1.15rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    box-shadow: 0 20px 30px rgba(0, 0, 0, .12);
  }
  .nav-links a { padding: .85rem 0; border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent); }
  .nav-links a::after { display: none; }
  .nav-login { display: block; }
  .menu-open .nav-links { opacity: 1; transform: none; pointer-events: auto; }

  .rail { display: none; }

  .journey { grid-template-columns: minmax(0, 1fr); }
  .stage {
    grid-column: 1; grid-row: 1; z-index: 5;
    top: var(--nav-h); height: 44svh; padding: 4px 8px 10px;
    background: var(--bg); transition: background-color .5s ease;
  }
  .stage::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -28px; height: 28px;
    background: linear-gradient(var(--bg), transparent);
  }
  .chapters { grid-column: 1; grid-row: 2; padding: 0 20px; }
  .chapter { min-height: 92svh; align-items: flex-start; }
  .chapter-inner, .chapter-hero .chapter-inner { padding: 44px 0 18svh; }
  .chapter-hero { min-height: 70svh; }
  .scroll-cue { display: none; }
  #stage .lbl { display: none; }
  .lede { font-size: 1.05rem; }
  .steps li { grid-template-columns: 1fr; gap: .1rem; margin-left: calc(var(--i, 0) * .5rem); }
  .places { grid-template-columns: 1fr; }
  .hymns li { grid-template-columns: 1fr; }
  .hymns .when { grid-row: auto; }
  .footer { grid-template-columns: 1fr; }
  .footer nav { grid-template-columns: 1fr 1fr; }
  .footer-base { flex-direction: column; gap: 12px; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
