/* Home */

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--header) + clamp(28px, 5vw, 64px)); min-height: min(100svh, 1000px); display: flex; flex-direction: column; }
.hero-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 104px); align-items: center; }
.hero-title { font-size: clamp(2.6rem, 1.1rem + 4.6vw, 5.6rem); }
.hero-line { display: block; white-space: nowrap; }
.cycler { display: inline-block; white-space: pre; }
.cycler .ch { display: inline-block; transition: opacity .7s var(--ease), transform .9s var(--ease), font-weight 1.2s var(--ease), filter .7s var(--ease); transition-delay: calc(var(--d) * 22ms); }
.cycler .ch.is-pre { opacity: 0; transform: translateY(.38em); font-weight: 200; }
.cycler .ch.is-out { opacity: 0; transform: translateY(-.28em); font-weight: 560; transition-duration: .45s, .55s, .5s, .45s; transition-delay: calc(var(--d) * 14ms); }
.hero-lead { margin-top: clamp(22px, 2.6vw, 32px); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(32px, 4vw, 44px); }

.hero-visual { position: relative; display: block; align-self: stretch; min-height: 520px; margin-right: calc(var(--pad) * -1); color: inherit; text-decoration: none; }
/* no frame: the map simply thins out into the page */
.hero-map { position: absolute; inset: -6% 0 0 -8%; -webkit-mask: radial-gradient(ellipse 50% 50% at 50% 48%, #000 64%, transparent 100%); mask: radial-gradient(ellipse 50% 50% at 50% 48%, #000 64%, transparent 100%); }
.hero-map > svg { position: absolute; inset: 0; }
.hero-map .gpmap-label { opacity: 0; }
.hero-map .gpmap-place.is-active .gpmap-label { opacity: 1; }
.hero-map .gpmap-river-label { display: none; }
.hero-map .gpmap-place.is-active .gpmap-pin { fill: var(--lamp); stroke: var(--paper); }
.hero-map .gpmap-place.is-active .gpmap-halo { fill: var(--lamp); opacity: .3; }
.hero-foot { position: absolute; left: 4%; bottom: 6%; display: grid; gap: 10px; }
.hero-place { font: italic 380 clamp(1.5rem, 1.1rem + 1vw, 2rem)/1 var(--serif); letter-spacing: -.01em; color: var(--ink); transition: opacity .4s var(--ease); }
.hero-place.is-swap { opacity: 0; }
.hero-foot .prayer { font-size: .8125rem; }

.hero-meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(40px, 6vw, 72px); padding-block: 22px 26px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-3); }
.hero-meta b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Entrance: copy rises and settles into its weight; the map fades up behind it. */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { font-weight: 210; letter-spacing: .005em; } to { font-weight: 380; letter-spacing: -.022em; } }
.js .hero-line:nth-child(1) { animation: rise 1.1s var(--ease) .12s both, settle 2s var(--ease) .12s both; }
.js .hero-line:nth-child(2) { animation: rise 1.1s var(--ease) .22s both, settle 2s var(--ease) .22s both; }
.js .hero-lead { animation: rise 1.1s var(--ease) .34s both; }
.js .hero-actions { animation: rise 1.1s var(--ease) .44s both; }
.js .hero-visual { animation: appear 1.8s var(--ease) .2s both; }
.js .hero-meta { animation: rise 1s var(--ease) .7s both; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
/* opacity only: SVG markers are positioned with a transform attribute */
.js .hero-map .gpmap-place { animation: appear .9s var(--ease) both; animation-delay: calc(1s + var(--n) * 120ms); }
.js .hero-map .gpmap-river { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease-io) .5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- How it works ---------- */
.how-head { max-width: 860px; margin-bottom: clamp(56px, 8vw, 112px); }
.how-track { position: relative; }
.how-line { position: absolute; top: 7px; left: 7px; height: 1px; width: calc((100% - 2 * var(--gap)) / 3 * 2 + 2 * var(--gap)); background: var(--line-2); }
.how-line i { position: absolute; left: 0; right: 0; top: -.5px; height: 2px; background: var(--green); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
/* the line carries on: the next place isn't drawn yet */
.how-track::after { content: ""; position: absolute; top: 7px; right: 0; height: 1px; left: calc((100% - 2 * var(--gap)) / 3 * 2 + 2 * var(--gap) + 22px); background: repeating-linear-gradient(90deg, var(--line-2) 0 4px, transparent 4px 10px); -webkit-mask: linear-gradient(90deg, #000 30%, transparent); mask: linear-gradient(90deg, #000 30%, transparent); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.how-step { position: relative; padding-top: 52px; }
.how-node { position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background-color .5s var(--ease), box-shadow .6s var(--ease); }
.how-n { font: 600 .8125rem/1 var(--sans); letter-spacing: .06em; color: var(--green); font-variant-numeric: tabular-nums; }
.how-step h3 { margin: 16px 0 12px; font: 400 clamp(1.6rem, 1.3rem + .9vw, 2.1rem)/1.08 var(--serif); letter-spacing: -.015em; transition: font-weight 1.2s var(--ease); }
.how-step p { margin: 0; color: var(--ink-2); max-width: 31ch; }
.js .how-step > :not(.how-node) { opacity: .28; transform: translateY(8px); transition: opacity .8s var(--ease), transform .8s var(--ease), font-weight 1.2s var(--ease); }
.js .how-step h3 { font-weight: 300; }
.how-step.is-on > :not(.how-node) { opacity: 1; transform: none; }
.js .how-step.is-on h3 { font-weight: 420; }
.how-step.is-on .how-node { background: var(--green); box-shadow: inset 0 0 0 1.5px var(--green), 0 0 0 6px rgba(5, 105, 81, .12); }

@media (max-width: 860px) {
  .how-steps { grid-template-columns: 1fr; gap: 48px; }
  .how-step { padding: 0 0 0 44px; }
  .how-node { top: 4px; }
  .how-line { width: 1px; height: var(--len, 70%); }
  .how-line i { left: -.5px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
  .how-track::after { display: none; }
}

/* ---------- Places ---------- */
.places-home { padding-top: 0; }
.ph-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); }
.ph-title { max-width: 14ch; }
.ph-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.ph-map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.ph-map > svg { position: absolute; inset: 0; }
.ph-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ph-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; align-items: center; gap: 16px; padding: 18px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.ph-name { display: block; font: 400 1.5rem/1.1 var(--serif); letter-spacing: -.012em; transition: transform .5s var(--ease), color .4s var(--ease), font-weight .6s var(--ease); }
.ph-meta { display: block; margin-top: 4px; font-size: .8125rem; color: var(--ink-3); }
.ph-list svg { width: 18px; height: 18px; color: var(--green); opacity: 0; transform: translateX(-6px); transition: opacity .4s var(--ease), transform .5s var(--ease); }
.ph-list a:hover .ph-name, .ph-list a.is-active .ph-name { transform: translateX(6px); color: var(--green); font-weight: 460; }
.ph-list a:hover svg, .ph-list a.is-active svg { opacity: 1; transform: none; }

/* ---------- Verse ---------- */
.verse { position: relative; overflow: hidden; background: transparent; color: var(--paper); padding-block: clamp(112px, 15vw, 216px); text-align: center; }
.verse-inner { position: relative; }
.verse .eyebrow { justify-content: center; }
.verse-ar { margin: 0 auto clamp(20px, 3vw, 36px); font: 400 clamp(2.1rem, 1rem + 4.4vw, 4.7rem)/1.75 var(--arabic); max-width: 16em; text-wrap: balance; }
.verse-en { margin: 0 auto; max-width: 28ch; font: italic 360 clamp(1.4rem, 1.05rem + 1.3vw, 2.25rem)/1.32 var(--serif); letter-spacing: -.01em; color: rgba(245, 242, 235, .92); text-wrap: balance; }
.verse mark { background: none; color: var(--lamp); }
/* the page itself turns green around the verse (see .is-night) */
.is-night .space-cta, .is-night .verse + .give-home { border-color: transparent; }
/* Each language writes itself in its own direction. */
.js .verse-ar { clip-path: inset(-30% 0 -30% 100%); transition: clip-path 2.2s var(--ease-io); }
.js .verse-en { clip-path: inset(-30% 100% -30% 0); transition: clip-path 1.8s var(--ease-io) .9s; }
.js .verse .eyebrow { opacity: 0; transition: opacity 1s var(--ease) 2s; }
.verse.is-in .verse-ar, .verse.is-in .verse-en { clip-path: inset(-30% 0 -30% 0); }
.verse.is-in .eyebrow { opacity: 1; }
.js .verse .eyebrow { transition-delay: 0s; }

/* ---------- Give ---------- */
.gh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: clamp(40px, 8vw, 128px); align-items: center; }
.gh-copy .lead { margin-top: 24px; }
.give-card { display: grid; gap: 20px; padding: clamp(22px, 3vw, 34px); background: var(--card); border-radius: var(--r-lg); box-shadow: 0 1px 0 var(--line), 0 40px 80px -40px rgba(21, 32, 28, .22); }
.give-card .seg { width: 100%; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.giftaid-line { font-variant-numeric: tabular-nums; }

/* ---------- Space CTA ---------- */
.space-cta { padding-block: clamp(72px, 9vw, 128px); border-top: 1px solid var(--line); }
.sc-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4.5vw, 72px); align-items: center; }
.sc-copy .lead { margin-top: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; aspect-ratio: 5 / 4; margin-right: 0; }
  .ph-grid, .gh-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero-visual { aspect-ratio: 1 / 1; }
  .sc-inner { grid-template-columns: 1fr; }
    .ph-map { aspect-ratio: 1 / 1; }
}
