/* ==========================================================================
   Give page (give.html). Night palette, the arch motif and one moving light.
   Movement lives in assets/js/give.js. Without it (or with reduced motion)
   every part below is a calm, stacked page.
   ========================================================================== */

/* ---------- Hero ---------- */

.gv-hero {
  position: relative;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(50% 60% at 50% 62%, rgba(105, 45, 133, 0.42), rgba(105, 45, 133, 0) 72%),
    var(--midnight);
}

/* Default (phones, reduced motion, no script): words, then the joined hands,
   then the generosity statement, one after another */
.gv-stage {
  position: relative;
  padding-block: calc(var(--header-h) + clamp(3rem, 8vh, 5rem)) clamp(4rem, 10vh, 7rem);
}

/* The doorway: two gold outlines with warm light inside, centered where the hands meet */
.gv-archwrap {
  --arch-h: min(84svh, 50rem);
  position: absolute;
  left: 50%;
  top: calc(var(--header-h) + 3rem);
  height: var(--arch-h);
  aspect-ratio: 400 / 560;
  translate: -50% 0;
  pointer-events: none;
}
.gv-arch {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.gv-arch path { stroke: var(--gold); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.gv-arch path + path { stroke-opacity: 0.38; }
.gv-doorway {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 0 0 / 35.7% 35.7% 0 0;
  background: linear-gradient(180deg, rgba(243, 217, 177, 0.16) 0%, rgba(230, 166, 79, 0.07) 45%, rgba(36, 10, 48, 0) 95%);
}
.gv-light {
  position: absolute;
  left: 50%;
  top: 30%;
  width: 170%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 214, 160, 0.26), rgba(230, 166, 79, 0.08) 45%, rgba(230, 166, 79, 0) 100%);
}

/* The hands: one transparent photograph (a man's hand from the left, a
   woman's from the right) shown as two halves split at the gap between the
   fingertips, 51% across, so each hand can travel on its own */
.gv-hands {
  --meet: 51.01%;
  position: relative;
  z-index: 1;
  width: 170vw;
  aspect-ratio: 3 / 1;
  margin-top: clamp(1rem, 4vw, 3rem);
  pointer-events: none;
  /* the sleeves fade out at the bottom and at the outer edges, so the hands
     belong to the page rather than sitting in a box */
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%), linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-composite: intersect;
}
.gv-hand { position: absolute; inset: 0; z-index: 1; }
.gv-hand img { display: block; width: 100%; height: 100%; object-fit: contain; filter: saturate(0.94) brightness(0.95); }
.gv-hand--l { clip-path: inset(0 calc(100% - var(--meet)) 0 0); }
.gv-hand--r { clip-path: inset(0 0 0 var(--meet)); }
/* the light gathers behind the fingertips, where the hands meet */
.gv-bloom {
  position: absolute;
  left: var(--meet);
  top: 48%;
  width: 26%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 232, 190, 0.42), rgba(230, 166, 79, 0.14) 45%, rgba(230, 166, 79, 0) 100%);
}
.gv-hands__note { display: none; }

/* Until the photograph exists: nothing for visitors; on this computer, a
   dashed stand-in for each hand and a note naming the file */
.gv-hands.is-awaiting .gv-hand img { visibility: hidden; }
.is-local .gv-hands.is-awaiting .gv-hand::after {
  content: "";
  position: absolute;
  top: 38%;
  width: 30%;
  height: 22%;
  border: 1px dashed rgba(230, 166, 79, 0.6);
  border-radius: 40% 60% 55% 45% / 50% 50% 50% 50%;
}
.is-local .gv-hands.is-awaiting .gv-hand--l::after { right: 50%; border-radius: 60% 18% 70% 50% / 50% 30% 70% 50%; }
.is-local .gv-hands.is-awaiting .gv-hand--r::after { left: 50%; border-radius: 18% 60% 50% 70% / 30% 50% 50% 70%; }
.is-local .gv-hands.is-awaiting .gv-hands__note {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 18%;
  margin: 0;
  font: 400 0.8rem/1.4 var(--sans);
  text-align: center;
  color: rgba(230, 166, 79, 0.85);
}

.gv-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.gv-intro, .gv-why { position: relative; z-index: 1; grid-column: 1; }
.gv-hands { grid-column: 1; z-index: 0; }

.gv-line { display: block; overflow: hidden; padding-block: 0.04em 0.12em; margin-block: -0.04em -0.12em; }
.gv-line > span { display: block; }

.gv-title {
  margin: 0;
  font: 400 clamp(3.4rem, 1rem + 7vw, 8.6rem)/0.92 var(--serif);
  letter-spacing: -0.04em;
  color: var(--ivory);
  text-shadow: 0 0.04em 0.5em rgba(36, 10, 48, 0.55);
}
.gv-lede {
  max-width: 36ch;
  margin: clamp(1.25rem, 3vh, 2rem) auto 0;
  font: 400 var(--step-1)/1.45 var(--sans);
  color: var(--ivory-soft);
}

/* The generosity statement: below the hands by default, in the words' place on desktop */
.gv-why { max-width: 56rem; margin-top: clamp(3rem, 8vw, 6rem); }
.gv-why__title {
  margin: 0 0 1.5rem;
  font: 400 clamp(2.5rem, 1rem + 3.6vw, 5rem)/1 var(--serif);
  text-shadow: 0 0.04em 0.5em rgba(36, 10, 48, 0.55);
  letter-spacing: -0.03em;
  color: var(--ivory);
}
.gv-why p { max-width: 40ch; margin: 0 auto; font: 400 var(--step-1)/1.5 var(--sans); color: var(--ivory-soft); }

.gv-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 2rem;
  font: 500 var(--step--1)/1 var(--sans);
  letter-spacing: 0.02em;
  color: var(--gold);
  text-decoration: none;
}
.gv-cue::before, .gv-cue::after { content: ""; width: 2rem; height: 1px; background: currentColor; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.gv-cue::before { transform-origin: right; }
.gv-cue::after { transform-origin: left; }
.gv-cue:hover::before, .gv-cue:hover::after, .gv-cue:focus-visible::before, .gv-cue:focus-visible::after { transform: scaleX(1.5); }

/* Layered (desktop with motion): one held stage. The words sit above, the
   hands travel across the lower half, the statement takes the words' place */
.gv-hero.gv-layered .gv-stage { height: 100vh; height: 100svh; padding: 0; }
.gv-hero.gv-layered .gv-grid { position: absolute; inset: 0; max-width: none; align-content: start; padding-top: calc(var(--header-h) + clamp(1.5rem, 7vh, 4.5rem)); }
.gv-hero.gv-layered .gv-intro,
.gv-hero.gv-layered .gv-why { grid-row: 1; margin-top: 0; }
.gv-hero.gv-layered .gv-archwrap { top: auto; bottom: 0; }
/* a soft darkening behind the words keeps them clear of the light and the hands */
.gv-hero.gv-layered .gv-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(70rem, 100%);
  height: 70%;
  translate: -50% 0;
  z-index: -1;
  background: radial-gradient(50% 55% at 50% 45%, rgba(36, 10, 48, 0.6), rgba(36, 10, 48, 0) 100%);
  pointer-events: none;
}
.gv-hero.gv-layered .gv-hands { grid-column: auto; position: absolute; left: 50%; bottom: -3svh; translate: -50% 0; margin: 0; width: min(100vw, 200svh); }

/* Before the entrance plays, hold what it will reveal */
.gv-pending :is(.gv-title .gv-line > span, .gv-lede, .gv-arch, .gv-doorway, .gv-light) { visibility: hidden; }

/* ---------- Scripture ---------- */

.gv-verse {
  position: relative;
  overflow: hidden;
  padding-block: clamp(7rem, 5rem + 9vw, 13rem);
  background: linear-gradient(180deg, var(--midnight) 0, var(--aubergine) var(--fade), var(--aubergine) calc(100% - var(--fade)), var(--midnight) 100%);
}
.gv-verse__light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70rem, 140vw);
  aspect-ratio: 1.6;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 214, 160, 0.16), rgba(105, 45, 133, 0.22) 55%, rgba(105, 45, 133, 0) 100%);
  pointer-events: none;
}
.gv-verse__figure {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 64rem;
  margin: 0 auto;
}
.gv-verse__rule { grid-row: 1 / span 2; width: 1px; background: linear-gradient(180deg, var(--gold), rgba(230, 166, 79, 0)); transform-origin: top; }
.gv-verse__quote { margin: 0; }
.gv-verse__quote p {
  margin: 0;
  font: italic 400 clamp(2rem, 1rem + 3.2vw, 4.4rem)/1.14 var(--serif);
  letter-spacing: -0.02em;
  color: var(--ivory);
  text-wrap: balance;
}
.gv-vl { display: block; }
.gv-vl:first-child { text-indent: -0.42em; }  /* hang the opening quotation mark */
.gv-verse__cite {
  margin-top: clamp(2rem, 4vw, 3rem);
  font: 400 var(--step-0)/1.4 var(--sans);
  color: var(--ivory-soft);
}
.gv-verse__cite::before { content: ""; display: inline-block; width: 2.5rem; height: 1px; margin-right: 1rem; vertical-align: middle; background: var(--gold); }
.gv-verse__cite cite { font-style: normal; font-weight: 500; color: var(--gold); }

/* ---------- Ways to give ---------- */

.gv-ways { position: relative; padding-block: clamp(5rem, 3rem + 7vw, 9rem) var(--section); background: var(--midnight); }
.gv-ways__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem var(--gutter); align-items: end; }
.gv-ways__head h2 { margin: 0; font: 400 var(--step-4)/1 var(--serif); letter-spacing: -0.03em; color: var(--ivory); }
.gv-ways__head p { max-width: 30ch; margin: 0 0 0.4em; font: 400 var(--step-1)/1.45 var(--sans); color: var(--ivory-soft); }

.gv-options {
  position: relative;
  display: grid;
  /* as many equal columns as there are working options */
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}
/* The hairlines are elements so they can draw in */
.gv-options::before,
.gv-options::after { content: ""; position: absolute; background: var(--hairline-gold); }
.gv-options::before { left: 0; right: 0; top: 0; height: 1px; transform-origin: left; transform: scaleX(var(--draw, 1)); }
.gv-options::after { display: none; }
/* a fine gold divider before each choice after the first, drawn with the top rule */
.gv-option + .gv-option::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--hairline-gold); transform-origin: top; transform: scaleY(var(--draw, 1)); }

.gv-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(2.75rem, 5vw, 4.5rem) clamp(1.25rem, 3vw, 3.25rem) clamp(2.5rem, 4vw, 3.5rem) 0;
  isolation: isolate;
}
.gv-option + .gv-option { padding-left: clamp(1.25rem, 3vw, 3.25rem); }
.gv-option:last-child { padding-right: 0; }
/* A low warm light gathers under the choice you're considering */
.gv-option::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 70%;
  z-index: -1;
  background: radial-gradient(60% 80% at 30% 0%, rgba(230, 166, 79, 0.1), rgba(230, 166, 79, 0) 70%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.gv-option__icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--hairline-gold);
  border-radius: 50%;
  color: var(--gold);
  transition: border-color 0.5s ease, background-color 0.5s ease;
}
.gv-option__icon svg { width: 1.6rem; height: 1.6rem; }
.gv-option__icon .gv-fill { fill: currentColor; fill-opacity: 0.22; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.gv-option h3 { margin: 0; font: 400 clamp(2.4rem, 1.4rem + 2vw, 3.6rem)/1 var(--serif); letter-spacing: -0.03em; color: var(--ivory); }
.gv-option p { margin: 1rem 0 0; font: 400 var(--step-0)/1.5 var(--sans); color: var(--ivory-soft); }
.gv-option__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem 1.25rem; margin-top: auto; padding-top: 2.5rem; }
.gv-option__btn { --btn-bg: var(--gold); --btn-fg: var(--midnight); }
/* Monthly sits beside Give once as the quieter, outlined choice */
.gv-option__btn--second:not([aria-disabled="true"]) { --btn-bg: transparent; --btn-fg: var(--ivory); border-color: var(--gold); }
.gv-option__btn--second:not([aria-disabled="true"])::before { background: var(--gold); }
.gv-option__btn--second:not([aria-disabled="true"]):hover, .gv-option__btn--second:not([aria-disabled="true"]):focus-visible { color: var(--midnight); }
.gv-option__btn::before { background: var(--ivory); }

@media (hover: hover) and (pointer: fine) {
  .gv-option:hover::before { opacity: 1; }
  .gv-option:hover .gv-option__icon { border-color: var(--gold); background-color: rgba(230, 166, 79, 0.08); }
}

/* Not switched on yet: a quiet outline, clearly not a working button */
[data-palette="night"] .gv-option__btn[aria-disabled="true"] {
  --btn-bg: transparent;
  --btn-fg: var(--ivory-soft);
  border: 1px solid rgba(255, 247, 235, 0.22);
  background: transparent;
  color: var(--ivory-soft);
  opacity: 1;
  cursor: not-allowed;
}
.gv-option__btn[aria-disabled="true"]::before { display: none; }
.gv-option__status { order: -1; flex-basis: 100%; display: inline-flex; align-items: center; gap: 0.6rem; font: 500 var(--step--1)/1 var(--sans); letter-spacing: 0.02em; color: var(--gold); }
.gv-option__status:empty { display: none; }
.gv-option__btn[aria-disabled="true"] + .gv-option__status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; border: 1px solid currentColor; }

.gv-note {
  max-width: 62ch;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font: 400 var(--step-0)/1.6 var(--sans);
  color: var(--ivory-soft);
}
.gv-note strong { font-weight: 500; color: var(--ivory); }
.gv-note a { color: var(--gold); text-underline-offset: 0.2em; }

/* Desktop without motion: the joined hands span the screen, sleeves to the edges */
@media (min-width: 961px) { .gv-hands { width: 100vw; } }

/* ---------- Phones and tablets ---------- */

@media (max-width: 960px) {
  .gv-archwrap { --arch-h: min(64svh, 30rem); }

  .gv-verse__figure { column-gap: 1.25rem; }
  .gv-vl:first-child { text-indent: 0; }
  .gv-verse__quote p { font-size: clamp(1.75rem, 7vw, 2.6rem); line-height: 1.2; }

  .gv-ways__head { grid-template-columns: minmax(0, 1fr); }
  .gv-options { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
  .gv-option + .gv-option::after { display: none; }
  .gv-option, .gv-option + .gv-option { padding: 2.75rem 0; }
  .gv-option + .gv-option { border-top: 1px solid var(--hairline-gold); }
}

/* Options without a verified link stay out of view entirely */
.gv-options[hidden], .gv-option[hidden], .gv-option__btn[hidden], .gv-ways [data-giving-when][hidden] { display: none; }
.gv-ways__head p[data-giving-when="none"] { max-width: 34ch; }
