/* The giving page and the thank you page, in the Bridge Church brand.
   Design: docs/design-give-bridge-2026-11-27.md. Linked from both pages.
   Root absolute URLs, because / serves the give page by rewrite. No images
   or data URLs in here: the page policy allows images from this site only. */

/* Montserrat (SIL Open Font License), variable 100 to 900, latin subset,
   self hosted: the page policy blocks Google Fonts. */
@font-face {
  font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/fonts/montserrat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --black: #050505;        /* hero ground, Bridge footer black */
  --ink: #101010;          /* all text and borders on white, Bridge heading ink */
  --ink-soft: #595959;     /* small grey text, one step darker than Bridge #666 */
  --white: #FFFFFF;
  --mist: #F5F6F7;         /* frequency track, Bridge give page card grey */
  --line: #D9D9D9;         /* hairlines */
  --fire: #F68720;         /* Give button, check disc, glow. Same as the screens --fund */
  --fire-press: #E0720D;   /* Give button while pressed */
  --gold: #FFD23F;         /* end of the fire rule only */
  --err: #B3261E;
  --err-bg: #FCEBEA;
  --off: #E4E4E4;          /* disabled Give button */
  --off-ink: #6B6B6B;      /* disabled text, placeholder */
  --r: 14px;               /* amount buttons, input, frequency track */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* --bar-h is the fixed Give bar's height, measured by give.js (0 on desktop,
   where the bar is in the flow). Keyboard focus and scrolling keep a control
   clear of it; the fallback fits the bar with no error showing. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-bottom: calc(var(--bar-h, calc(110px + env(safe-area-inset-bottom))) + 16px);
}
body {
  background: var(--white); color: var(--ink);
  font-family: Montserrat, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 500; min-height: 100vh; min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* Hero: black, both logos are white artwork made for dark grounds. */
.hero {
  position: relative; overflow: hidden; background: var(--black); color: var(--white);
  padding: calc(16px + env(safe-area-inset-top)) 20px 22px;
}
.hero::before {            /* ember glow behind the flame, no image */
  content: ""; position: absolute; right: -90px; bottom: -130px; width: 340px; height: 340px;
  background: radial-gradient(closest-side, rgba(246,135,32,.42), rgba(246,135,32,.14) 55%, rgba(246,135,32,0));
  pointer-events: none;
}
.hero::after {             /* fire rule, echoes the white rule under Bridge photo tiles */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--fire), var(--gold));
}
.hero-in { position: relative; max-width: 480px; margin: 0 auto; }
.brand { display: block; width: 182px; height: 28px; }
.brand img { display: block; width: 182px; height: 28px; }
.hero-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 18px; }
.hero-text { flex: 1; min-width: 0; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.82); margin-bottom: 10px;
}
h1 {
  font-size: 36px; line-height: 1; font-weight: 700; letter-spacing: -.045em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.lede { margin-top: 12px; font-size: 15px; line-height: 1.4; font-weight: 500; color: rgba(255,255,255,.86); max-width: 300px; }
/* Campus pages only (/soco, /bilingual): small and quiet, under the lede. */
.campus { margin-top: 10px; font-size: 12px; font-weight: 500; letter-spacing: .02em; color: rgba(255,255,255,.66); }
.campus a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px;
            position: relative; display: inline-block; line-height: 16px; }
.campus a::after { content: ""; position: absolute; inset: -14px -4px; } /* 44px tap area */
.flame { flex: none; width: 46px; height: 82px; margin-bottom: 2px; }

/* Form */
/* Room under the form for the fixed bar, which grows while an error shows,
   so the end of the form can always scroll above it. */
main { max-width: 480px; margin: 0 auto; padding: 18px 20px calc(var(--bar-h, calc(110px + env(safe-area-inset-bottom))) + 40px); }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.presets button, .freq button {
  font: inherit; color: var(--ink); background: var(--white); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms, color 120ms, transform 120ms var(--ease);
}
.presets button {
  height: 60px; border: 2px solid var(--ink); border-radius: var(--r);
  font-size: 24px; font-weight: 700; letter-spacing: -.02em;
}
.presets button:active:not(:disabled) { transform: scale(.97); }
.presets button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.clabel { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.custom { display: block; position: relative; }
.custom span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-weight: 700; font-size: 24px; color: var(--ink); }
.custom input {
  width: 100%; height: 56px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--white);
  font: inherit; font-weight: 700; font-size: 24px; letter-spacing: -.02em; padding: 0 18px 0 40px; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.custom input::placeholder { color: var(--off-ink); font-weight: 500; font-size: 17px; letter-spacing: 0; opacity: 1; }
/* A typed amount is the active choice: the border reads 3px. */
.custom input:not(:placeholder-shown) { box-shadow: 0 0 0 1px var(--ink); }
.freq {
  margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--mist); border: 1px solid var(--line); border-radius: var(--r); padding: 4px;
}
.freq button { height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 16px; font-weight: 600; color: var(--ink); }
.freq button[aria-pressed="true"] { background: var(--ink); color: var(--white); font-weight: 700; }
.presets button:disabled, .freq button:disabled { cursor: default; }
.presets button:disabled:not([aria-pressed="true"]), .freq button:disabled:not([aria-pressed="true"]) { opacity: .45; }
.custom input:read-only { opacity: .6; }

/* Keyboard focus. :focus first for iOS 15 and older, which lack
   :focus-visible; browsers that have it clear the ring on a tap. */
button:focus, a:focus, .custom input:focus { outline: 3px solid var(--ink); outline-offset: 3px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.hero a:focus, .hero a:focus-visible { outline-color: var(--white); }

.foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.foot strong { display: block; color: var(--ink); font-weight: 700; }

/* Give bar, fixed to the thumb zone on phones. The error sits in it, above
   the button, so neither the bar nor the keyboard can cover it. */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--white);
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
}
.bar > div { max-width: 440px; margin: 0 auto; }
.err { color: var(--err); background: var(--err-bg); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-weight: 600; font-size: 15px; line-height: 1.35; }
.err:empty { display: none; }
.go {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 60px; border: 0; border-radius: 999px; background: var(--fire); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 19px; letter-spacing: -.01em; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms, transform 120ms var(--ease);
}
.go:active:not(:disabled) { background: var(--fire-press); transform: scale(.985); }
.go:disabled { background: var(--off); color: var(--off-ink); cursor: default; }
/* Opening checkout: still orange, with a spinner, so it never looks like a failure. */
.go[aria-busy="true"] { background: var(--fire); color: var(--ink); }
.go[aria-busy="true"]::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid rgba(16,16,16,.25); border-top-color: var(--ink); animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.note { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Thank you page */
.check { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--fire); display: grid; place-items: center; animation: pop 600ms var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.thanks h1 { font-size: 48px; }
.thanks main { padding-top: 26px; padding-bottom: 40px; }
.thanks .said { display: flex; align-items: center; gap: 12px; font-size: 19px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.thanks .value { margin-top: 14px; font-size: 16px; line-height: 1.5; color: var(--ink-soft); }
.btn2 {
  display: flex; align-items: center; justify-content: center; margin-top: 26px; height: 56px;
  border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); background: var(--white);
  font-weight: 700; font-size: 17px; text-decoration: none;
}
.link { display: block; margin-top: 8px; padding: 14px 0; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); text-underline-offset: 4px; }

@media (max-width: 359px), (max-height: 600px) {
  .hero { padding-bottom: 20px; } .hero-row { margin-top: 18px; }
  h1 { font-size: 30px; } .lede { display: none; } .flame { width: 36px; height: 64px; }
  .presets button { height: 54px; }
  .thanks h1 { font-size: 34px; }
}

/* Desktop: black brand panel left, form right, Give button in the flow. */
@media (min-width: 900px) {
  body { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; grid-template-rows: 1fr auto 1fr; }
  .hero { grid-column: 1; grid-row: 1 / -1; min-height: 100vh; padding: 48px 56px 56px; display: flex; }
  .hero::before { right: -160px; bottom: -220px; width: 640px; height: 640px; }
  .hero::after { left: auto; top: 0; bottom: 0; right: 0; width: 4px; height: auto; background: linear-gradient(180deg, var(--gold), var(--fire)); }
  .hero-in { max-width: 520px; margin: 0; width: 100%; display: flex; flex-direction: column; }
  .brand, .brand img { width: 220px; height: 34px; }
  .hero-row { margin-top: auto; flex-direction: column-reverse; align-items: flex-start; gap: 28px; }
  .eyebrow { font-size: 14px; margin-bottom: 16px; }
  h1 { font-size: clamp(52px, 5vw, 76px); line-height: .94; letter-spacing: -.055em; }
  .lede { font-size: 19px; margin-top: 20px; max-width: 420px; }
  .flame { width: 72px; height: 128px; margin: 0; }
  html { scroll-padding-bottom: 0; }
  main { grid-column: 2; grid-row: 2; width: 100%; max-width: 520px; padding: 48px 40px 0; align-self: end; }
  .bar { grid-column: 2; grid-row: 3; position: static; border-top: 0; padding: 20px 40px 48px; align-self: start; }
  .bar > div { max-width: 440px; }
  .foot { display: none; }
  .thanks main { grid-row: 1 / -1; align-self: center; padding: 48px 40px; }
  .thanks h1 { font-size: clamp(64px, 6.4vw, 96px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
