/* Angel — motion + the few components the Tithe sheets never had. Loaded last on every page. */

/* ---------- motion ---------- */
[data-reveal] { opacity: 0; transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
[data-reveal="up"], [data-reveal="fade"] { transform: translateY(20px); }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-24px); } [data-reveal="right"] { transform: translateX(24px); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }
html.lenis, html.lenis body { height: auto; } .lenis.lenis-smooth { scroll-behavior: auto !important; }

/* floating hero icons drift gently */
.fm-hero .float-icon img { animation: ag-bob 7s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(27,42,74,.16)); }
.fm-hero .fi-2 img { animation-delay: -2.3s; } .fm-hero .fi-3 img { animation-delay: -4.1s; } .fm-hero .fi-4 img { animation-delay: -1.2s; }
/* keep the stickers clear of the headline on 1280–1500px screens */
.fm-hero .fi-1 { left: max(16px, calc(50% - 500px)); top: 150px; } .fm-hero .fi-1 img { width: 190px; height: 190px; }
.fm-hero .fi-2 { left: max(8px, calc(50% - 560px)); top: 520px; } .fm-hero .fi-2 img { width: 230px; height: 230px; }
.fm-hero .fi-3 { right: max(8px, calc(50% - 540px)); top: 690px; } .fm-hero .fi-3 img { width: 180px; height: 180px; }
.fm-hero .fi-4 { right: max(16px, calc(50% - 500px)); top: 190px; } .fm-hero .fi-4 img { width: 250px; height: 250px; }
@keyframes ag-bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-12px) rotate(1.5deg); } }

/* ---------- hero: split card inside the browser mockup ---------- */
.split-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid #dce6f5; border-radius: 18px; padding: 20px 22px 16px; box-shadow: 0 18px 40px rgba(111,168,245,.18); text-align: left; }
.split-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.split-head b { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 18px; color: #1b2a4a; }
.split-head span { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #7a879d; }
.split-bar { height: 10px; border-radius: 999px; background: #eef3fa; overflow: hidden; margin-bottom: 10px; }
.split-bar i { display: block; height: 100%; width: var(--pct); background: linear-gradient(90deg, #f2cf6e, #e6b94f); border-radius: 999px; transition: width .2s; }
.split-range { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: #dce6f5; outline: none; margin: 0 0 12px; }
.split-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #2f6fd0; box-shadow: 0 2px 8px rgba(27,42,74,.18); cursor: grab; }
.split-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #2f6fd0; cursor: grab; }
.split-rows > div { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: baseline; padding: 8px 0; border-top: 1px solid #eef3fa; font-size: 13.5px; color: #44546e; }
.split-rows > div:first-child { border-top: none; }
.split-rows em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #7a879d; }
.split-rows b { font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 13px; color: #1b2a4a; }
.split-rows .hi b { color: #b8862a; } .split-rows .hi span { color: #1b2a4a; font-weight: 600; }
.split-foot { margin: 12px 0 0; font-size: 11.5px; color: #7a879d; }
.fm-logos-text { display: flex; gap: 26px; align-items: center; }
.fm-logos-text b { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 19px; color: #44546e; }

/* ---------- charity cards (reuse the recent-launch grid) ---------- */
.rc-initials { font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 500; color: #2f6fd0; }
.rc-body b { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 15px; color: #1b2a4a; }
.rc-body span { font-size: 12.5px; color: #44546e; }
.rc-body em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #7a879d; margin-top: 6px; }
.rc-body em.ok { color: #158347; }
/* 4 x 2 on desktop (Home shows the first 8), then the Explore button. */
.fm-charities .rc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fm-charities .rc-note { text-align: center; font-size: 13px; color: rgba(68,84,110,0.7); margin-top: 14px; }
@media (max-width: 1000px) { .fm-charities .rc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .fm-charities .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .fm-charities .rc-grid { grid-template-columns: 1fr; } }

/* ---------- /charities: symmetric cards, every row a fixed height ---------- */
.ent-grid { align-items: stretch; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.ent-card { height: 100%; gap: 12px; padding: 20px; min-width: 0; }
.ent-card:hover { border-color: #b9cdea; box-shadow: 0 12px 36px rgba(111,168,245,.2); }
.ent-head { height: 64px; }
.ent-logo { width: 56px; height: 56px; border-radius: 16px; box-shadow: inset 0 0 0 1px #dce6f5; }
.ent-initials { background: linear-gradient(135deg, #f7faff, #eaf2fe); color: #2f6fd0; font-family: 'Fraunces', Georgia, serif; }
.ent-name-wrap { flex: 1; min-width: 0; }
.ent-name { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 16.5px; color: #1b2a4a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ent-cause { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ent-desc { flex: none; -webkit-line-clamp: 3; height: calc(13px * 1.6 * 3); }
.ent-meta { display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; height: 24px; }
.ent-chip { display: inline-block; flex: none; box-sizing: border-box; height: 24px; line-height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid #e3ebf6; background: #f7faff; color: #44546e; font-size: 11.5px; text-decoration: none; white-space: nowrap; }
.ent-chip.ent-site { color: #2f6fd0; flex: 0 1 auto; min-width: 48px; overflow: hidden; text-overflow: ellipsis; }
.ent-chip.ent-site:hover { background: #eaf2fe; border-color: #b9cdea; }
.ent-wallet { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid #eef3fa; min-height: 40px; }
.ent-wallet .pill { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ent-wallet .pill.donated { color: #1f5fbd; border-color: #cfe0f8; background: #eaf2fe; }
.ent-wallet .pill a { color: inherit; text-decoration: none; }
.ent-wallet .pill a:hover { text-decoration: underline; }
.ent-proof { flex: none; font-size: 12px; color: #7a879d; text-decoration: none; }
.ent-proof:hover { color: #2f6fd0; }
.ent-launch { width: 100%; padding: 10px 14px; font-size: 13px; }

/* ---------- section backdrop ---------- */
.fm-how { position: relative; background: url('/img/fm/section-clouds.webp') center / cover no-repeat; }
.fm-how::before { content: ''; position: absolute; inset: 0; background: rgba(255,253,248,.6); pointer-events: none; }
.fm-how > * { position: relative; }

/* ---------- footer: cream fades into night sky, the golden clouds sit on top ---------- */
.fm-footer { background: linear-gradient(to bottom, #fffdf8 0, #fffdf8 400px, #6f85a8 560px, #1b2a4a 690px, #0f1a30 100%) !important; }
/* The cloud image is pinned to the bottom, so its top edge lands at a different height per viewport.
 * Fade that edge out so the sky dissolves into the cream instead of cutting across it. */
.fm-foot-bg {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.35) 18%, #000 42%);
  mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.35) 18%, #000 42%);
}
.fm-foot-cta p { color: rgba(68,84,110,.7); }
@media (max-width: 900px) { .fm-footer { background: linear-gradient(to bottom, #fffdf8 0, #fffdf8 380px, #0f1a30 520px) !important; } }

/* ---------- launch wizard ---------- */
.coin-preview { display: flex; gap: 16px; align-items: center; padding: 16px 18px; border: 1px solid #dce6f5; border-radius: 16px; background: linear-gradient(135deg, #f7faff, #eef4fd); margin-bottom: 4px; }
.coin-preview-img { width: 72px; height: 72px; border-radius: 50%; flex: none; background: #fff; border: 2px dashed #b9cdea; display: grid; place-items: center; overflow: hidden; cursor: pointer; color: #2f6fd0; font-size: 28px; font-weight: 300; transition: border-color .15s; }
.coin-preview-img:hover { border-color: #2f6fd0; }
.coin-preview-img img { width: 100%; height: 100%; object-fit: cover; }
.coin-preview-text { display: grid; gap: 2px; min-width: 0; }
.coin-preview-text b { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 19px; color: #1b2a4a; }
.coin-preview-text span { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #7a879d; }
.coin-preview-text em { font-style: normal; font-size: 12px; color: #b8862a; margin-top: 4px; }
.launch-split { max-width: none; margin-top: 8px; box-shadow: none; }
.launch-split .split-head span { color: #b8862a; }
.charity-picker .pick { transition: transform .15s, border-color .15s, box-shadow .15s; }
.charity-picker .pick:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27,42,74,.08); }
.charity-picker .pick.selected { box-shadow: 0 0 0 3px rgba(47,111,208,.15); }
.stepper li { cursor: default; } .stepper li.done { cursor: pointer; }
.stepper li.current em { font-weight: 600; }
.step-title { font-family: 'Fraunces', Georgia, serif; font-weight: 500; }
.form .step { animation: ag-step .35s cubic-bezier(.2,.7,.2,1); }
@keyframes ag-step { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.form input[type="text"]:focus, .form textarea:focus { border-color: #2f6fd0; box-shadow: 0 0 0 3px rgba(47,111,208,.12); outline: none; }

/* inner pages: hero left, quiet */
.hero, .hero p, .hero .eyebrow { text-align: left; margin-left: 0; margin-right: 0; }
.hero p { max-width: 640px; }

/* generated wordmark inside the "How does … work?" heading */
.fm-how-title h2 img { width: 168px; height: 66px; margin: 0 6px; }
@media (max-width: 640px) { .fm-how-title h2 img { width: 128px; height: 50px; } }

/* coin images: cream placeholder while a gateway answers */
.coin-img.placeholder { background: linear-gradient(135deg, #f7faff, #eaf2fe); }
.coin-hero-img.placeholder { min-height: 120px; }

/* home: recently launched, 4×2 under the numbers */
.rc-eyebrow { margin-top: 56px; margin-bottom: 20px; }
.rc-coin-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-coin-img.placeholder { background: linear-gradient(135deg, #f7faff, #eaf2fe); }
.rc-card { border-color: #dce6f5; }
.rc-card:hover { border-color: #b9cdea; box-shadow: 0 16px 40px rgba(111,168,245,.22); }
.rc-name { font-family: 'Fraunces', Georgia, serif; color: #1b2a4a; }
.rc-when { font-family: 'JetBrains Mono', monospace; color: #b8862a; }
.rc-for { color: #44546e; } .rc-for b { color: #2f6fd0; }

/* home: charity logos sit on white, contained, not cropped */
.rc-logo { background: #fff; padding: 22px; box-sizing: border-box; }
.rc-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- page transitions: cream curtain, no jump ---------- */
.page-fade { animation: ag-page .45s ease-out both; }
@keyframes ag-page { from { opacity: 0; } to { opacity: 1; } }
.page-curtain { position: fixed; inset: 0; z-index: 9999; background: #fffdf8; pointer-events: none; opacity: 0; transition: opacity .38s cubic-bezier(.2,.7,.2,1); }
.page-curtain.closing { opacity: 1; pointer-events: auto; transition-duration: .18s; }
.page-curtain.open { opacity: 0; }
/* Same mark as the nav logo, centred on the curtain while it covers the page. */
.page-curtain-mark {
  position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; object-fit: contain;
  transform: translate(-50%, -50%) scale(.8); transition: transform .38s cubic-bezier(.2,.7,.2,1);
}
.page-curtain.closing .page-curtain-mark { transform: translate(-50%, -50%) scale(1); }
@media (prefers-reduced-motion: reduce) { .page-fade { animation: none; } .page-curtain { transition: none; } .page-curtain-mark { transition: none; } }
