/* KindPaws donation landing page. Mobile-first; built on tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
a { color: var(--link); }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface-raised); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-4), env(safe-area-inset-right, 0px)); }
@media (min-width: 600px) { .wrap { padding-left: max(var(--space-8), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-8), env(safe-area-inset-right, 0px)); } }

.eyebrow { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--canopy-ink); margin-bottom: var(--space-2); }

/* Buttons */
.btn { font-family: var(--font-sans); font-size: 17px; line-height: 24px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 56px; padding: 0 var(--space-6); border-radius: var(--radius-md); border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: filter 150ms ease-out, transform 150ms ease-out; -webkit-tap-highlight-color: transparent; }
.btn:hover { filter: brightness(0.93); }
.btn:active { transform: translateY(1px); }
.btn--donate { background: var(--sun); color: var(--on-sun); font-size: 19px; }
.btn--canopy { background: var(--canopy); color: var(--on-canopy); }
.btn--ghost { background: transparent; color: var(--canopy-ink); border-color: var(--line-strong); }
.btn--sm { min-height: 40px; font-size: 15px; padding: 0 var(--space-4); }
.btn--block { width: 100%; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo__arch { fill: var(--canopy); }
.logo__toe { fill: #ffffff; }
.logo__heart { fill: var(--sun); }
.logo__words { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--font-display); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.logo__sub { font-weight: 700; font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); margin-top: 3px; }

/* Hero: on phones the form comes straight after the headline */
.hero { padding-block: var(--space-4) var(--space-12); }
.hero__grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "form" "proof" "photo"; }
.hero__copy { display: contents; }
.hero-intro { grid-area: intro; display: flex; flex-direction: column; gap: var(--space-2); }
.hero-intro .eyebrow { margin: 0; }
.hero__title { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 35px; letter-spacing: -0.025em; margin: 0; }
.hero__sub { font-size: 17px; line-height: 25px; color: var(--ink-muted); }
.hero__photo { grid-area: photo; margin: 0; border-radius: var(--radius-arch) var(--radius-arch) 0 0; overflow: hidden; aspect-ratio: 8 / 9; max-height: 520px; background: var(--canopy-soft); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.give { grid-area: form; }
.proof { grid-area: proof; }

.proof { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.proof li { position: relative; padding-left: 30px; font-weight: 600; }
.proof li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--canopy-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230F5C46' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }

@media (min-width: 960px) {
  .hero { padding-block: var(--space-12) var(--space-24); }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 440px; column-gap: var(--space-16); grid-template-areas: "intro form" "photo form" "proof form"; align-items: start; }
  .hero__title { font-size: 60px; line-height: 60px; }
  .hero__sub { font-size: 20px; line-height: 30px; }
  .hero__photo { max-height: 460px; aspect-ratio: 16 / 11; }
  .give { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
}

/* Donation form */
.give { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); padding: 20px var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); scroll-margin-top: 76px; }
@media (min-width: 420px) { .give { padding: var(--space-6); } }
@media (min-width: 960px) { .give { gap: var(--space-4); } .hero__grid { gap: var(--space-6); } .hero-intro { gap: var(--space-3); } }
.give__title { font-family: var(--font-display); font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.freq { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-sunk); border-radius: var(--radius-md); }
.freq input, .amounts input { position: absolute; opacity: 0; pointer-events: none; }
.freq label { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; min-height: 46px; padding: 6px 8px; border-radius: 9px; font-weight: 700; font-size: 16px; line-height: 20px; color: var(--ink-muted); cursor: pointer; text-align: center; }
.freq input:checked + label { background: var(--surface-raised); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 42, 34, 0.18); }
.freq input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.freq__tag { font-size: 10px; line-height: 14px; letter-spacing: 0.06em; text-transform: uppercase; background: var(--sun-soft); color: var(--sun-ink); padding: 2px 6px; border-radius: var(--radius-arch); }

.amounts__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.amounts__grid label { display: flex; align-items: center; justify-content: center; min-height: 56px; border: 2px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; cursor: pointer; transition: border-color 120ms ease-out, background 120ms ease-out; -webkit-tap-highlight-color: transparent; }
.amounts__grid label:hover { border-color: var(--canopy-ink); }
.amounts input:checked + label { border-color: var(--canopy-ink); background: var(--canopy-soft); box-shadow: inset 0 0 0 1px var(--canopy-ink); }
.amounts input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }

.custom { display: flex; flex-direction: column; gap: 6px; }
.custom__label { font-weight: 600; font-size: 15px; line-height: 20px; }
.custom__field { display: flex; align-items: center; border: 2px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); padding: 0 14px; min-height: 56px; transition: border-color 120ms ease-out; }
.custom__field:focus-within { border-color: var(--canopy-ink); box-shadow: inset 0 0 0 1px var(--canopy-ink); }
.custom__field.is-active { border-color: var(--canopy-ink); background: var(--canopy-soft); }
.custom__field.is-invalid { border-color: var(--hibiscus-ink); background: var(--surface-raised); }
.custom__prefix { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink-muted); }
.custom__suffix { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.custom input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); padding: 12px 8px; font-variant-numeric: tabular-nums; }
.custom input::placeholder { font-family: var(--font-sans); font-weight: 500; font-size: 17px; color: var(--ink-muted); letter-spacing: 0; }
.custom__min { font-weight: 500; color: var(--ink-muted); }
.custom__error { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--hibiscus-ink); }

.impact { background: var(--sun-soft); color: var(--ink); border-radius: var(--radius-md); padding: 10px 14px; font-size: 15px; line-height: 21px; }
.impact strong { font-weight: 700; }

.upsell { align-self: center; background: none; border: 0; padding: 4px; font: 600 15px/20px var(--font-sans); color: var(--canopy-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; line-height: 18px; color: var(--ink-muted); text-align: center; }
.secure svg { width: 15px; height: 15px; fill: currentColor; flex: none; }
.give__fine { font-size: 12px; line-height: 17px; color: var(--ink-muted); text-align: center; }

/* Sections */
.section { padding-block: var(--space-16); }
.section--sunk { background: var(--surface-sunk); }
@media (min-width: 960px) { .section { padding-block: var(--space-24); } }
.section__title { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 36px; letter-spacing: -0.02em; margin: 0 0 var(--space-8); }
@media (min-width: 960px) { .section__title { font-size: 44px; line-height: 48px; } }

.pillars { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pillar { display: flex; flex-direction: column; gap: var(--space-3); }
.pillar h3 { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 30px; margin: 0; }
.pillar p { color: var(--ink-muted); }
.pillar .pillar__cost { color: var(--ink); margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.pillar__cost strong { font-family: var(--font-display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.pillar__shape { display: block; width: 56px; height: 64px; border-radius: var(--radius-arch) var(--radius-arch) 0 0; }
.pillar__shape--rescue { background: var(--hibiscus); }
.pillar__shape--heal { background: var(--sun); }
.pillar__shape--home { background: var(--canopy); }

.story { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 860px) { .story { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-16); } }
.story__photo { margin: 0; border-radius: var(--radius-arch) var(--radius-arch) 0 0; overflow: hidden; aspect-ratio: 8 / 9; max-height: 560px; }
.story__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.story__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.story__copy .section__title { margin: 0; }
.story__copy > p { font-size: 18px; line-height: 29px; max-width: 60ch; }
.quote { margin: 0; padding: var(--space-4) 0 var(--space-4) var(--space-6); border-left: 4px solid var(--sun); }
.quote p { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 29px; }
.quote footer { margin-top: var(--space-2); font-size: 14px; color: var(--ink-muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-arch); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--home { background: var(--canopy-soft); color: var(--canopy-ink); }

.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); } }
.promises li { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); color: var(--ink-muted); }
.promises strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-4) 0; font-weight: 700; font-size: 18px; line-height: 26px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-display); font-size: 28px; color: var(--canopy-ink); flex: none; transition: transform 150ms ease-out; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--space-4); color: var(--ink-muted); max-width: 65ch; }

.final { background: var(--canopy); color: var(--on-canopy); padding-block: var(--space-16); text-align: center; }
.final__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.final__title { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 38px; letter-spacing: -0.02em; margin: 0; }
@media (min-width: 960px) { .final__title { font-size: 48px; line-height: 52px; } }
.final .btn { min-width: 240px; margin-top: var(--space-2); }

.site-footer { padding-block: var(--space-8) calc(var(--space-8) + 88px); font-size: 14px; line-height: 22px; color: var(--ink-muted); }
@media (min-width: 960px) { .site-footer { padding-bottom: var(--space-8); } }
.site-footer__inner { display: flex; flex-direction: column; gap: var(--space-2); }

/* Sticky mobile CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--space-3) max(var(--space-4), env(safe-area-inset-right, 0px)) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)) max(var(--space-4), env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--surface-raised) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); transform: translateY(0); transition: transform 200ms ease-out; }
.sticky-cta.is-hidden { transform: translateY(110%); }
@media (min-width: 960px) { .sticky-cta { display: none; } }

/* Checkout placeholder */
.checkout { border: 0; border-radius: var(--radius-lg); padding: var(--space-6); width: min(420px, calc(100vw - 32px)); background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-panel); }
.checkout::backdrop { background: rgba(10, 19, 15, 0.55); }
.checkout h2 { font-family: var(--font-display); font-size: 24px; line-height: 30px; margin: 0 0 var(--space-3); }
.checkout p { margin-bottom: var(--space-4); }
.checkout { position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; }
.checkout h2 { padding-right: var(--space-8); }
.checkout__close { position: absolute; top: var(--space-3); right: var(--space-3); width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: var(--radius-arch); background: transparent; color: var(--ink-muted); cursor: pointer; }
.checkout__close:hover { background: var(--surface-sunk); color: var(--ink); }
.checkout__summary { font-size: 17px; line-height: 26px; }
.checkout__buttons { min-height: 48px; margin-bottom: var(--space-3); color-scheme: light; } /* keeps PayPal's iframes transparent in dark mode */
.checkout__buttons:empty:not(.is-loading) { display: none; }
.checkout__or { display: flex; align-items: center; gap: var(--space-3); font-size: 14px; line-height: 20px; color: var(--ink-muted); margin: var(--space-2) 0 var(--space-3) !important; }
.checkout__or::before, .checkout__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card-form { margin-bottom: var(--space-3); color-scheme: light; } /* transparent PayPal field iframes in dark mode */
.card-form__field { min-height: 52px; margin: 0 -4px; } /* PayPal's field iframes carry ~4px side padding */
.card-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-2); }
.card-form .btn { margin-top: var(--space-3); }
.card-form .btn:disabled { opacity: 0.7; cursor: progress; }
.checkout.is-busy .checkout__close { visibility: hidden; }
.checkout__buttons.is-loading { min-height: 112px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--surface-sunk) 0%, var(--surface) 50%, var(--surface-sunk) 100%) 0 0 / 200% 100%; animation: kp-shimmer 1.2s linear infinite; }
@keyframes kp-shimmer { to { background-position: -200% 0; } }
.checkout__status { font-size: 15px; line-height: 22px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); background: var(--surface-sunk); }
.checkout__status.is-error { background: var(--hibiscus-soft); color: var(--hibiscus-ink); }
.checkout .checkout__fine { display: flex; gap: var(--space-2); align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--ink-muted); margin-bottom: 0; }
.checkout__fine svg { flex: none; margin-top: 2px; }
#checkout-thanks .btn { margin-top: var(--space-4); }
#thanks-title:focus { outline: none; }
