/* Shared chrome for Homefound legal / support subpages */
:root {
  --white: #ffffff;
  --ink: #1f2430;
  --muted: #6b7280;
  --purple: #5A4FCF;
  --purple-deep: #4c3fb8;
  --purple-soft: #7b6cf0;
  --lavender: #f1eef9;
  --coral: #E53E3E;
  --shadow-sm: 0 4px 12px rgba(90, 79, 207, 0.08);
  --shadow-md: 0 14px 36px rgba(31, 36, 48, 0.12);
  --font-display: 'Fredoka', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
  background-color: #f6f4fb;
  background-image:
    radial-gradient(ellipse 70% 42% at 92% -8%, rgba(240, 113, 138, 0.11), transparent 70%),
    radial-gradient(ellipse 60% 36% at 6% 0%, rgba(90, 79, 207, 0.09), transparent 72%);
  background-repeat: no-repeat;
  line-height: 1.6;
}

a { color: var(--purple-deep); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 20px 12px;
  max-width: 720px;
  margin: 0 auto;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-link:hover { text-decoration: none; color: var(--purple-deep); }

.brand-link img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: flex-end;
  font-size: 0.85rem;
}

.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px max(48px, env(safe-area-inset-bottom));
}

.hero-block {
  text-align: center;
  padding: 28px 0 20px;
}

.hero-block .logo {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 10px;
}

.lede {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
  margin: 0 auto;
}

.updated {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(90, 79, 207, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  padding: 22px 22px 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card + .card { margin-top: 16px; }

.card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--purple-deep);
  margin: 6px 0 10px;
  letter-spacing: 0.02em;
}

.card p,
.card li {
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.card ul {
  margin: 0 0 14px 1.15rem;
}

.card li { margin-bottom: 8px; }

.card strong { color: var(--ink); font-weight: 700; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-soft), var(--purple));
  color: var(--white);
  box-shadow: 0 10px 24px rgba(90, 79, 207, 0.28);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--purple-deep);
  border-color: rgba(90, 79, 207, 0.18);
}

.faq-item {
  border-top: 1px solid rgba(90, 79, 207, 0.1);
  padding: 14px 0 4px;
}

.faq-item:first-child { border-top: none; padding-top: 4px; }

.faq-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.contact-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.contact-tile {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--lavender);
  border: 1px solid rgba(90, 79, 207, 0.12);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.contact-tile .label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 4px;
}

.contact-tile .value {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.contact-tile .hint {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  padding: 28px 20px max(36px, env(safe-area-inset-bottom));
}

.footer a {
  color: var(--purple-deep);
  font-weight: 700;
}

/* Donate page */
.status-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.status-banner.is-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.status-banner.is-cancel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.donate-card .tax-note {
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--lavender);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.amount-fieldset {
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}

.amount-fieldset legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.amount-chip {
  appearance: none;
  border: 1.5px solid rgba(90, 79, 207, 0.18);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.amount-chip:hover {
  border-color: rgba(90, 79, 207, 0.4);
  transform: translateY(-1px);
}

.amount-chip.is-selected {
  border-color: var(--purple);
  background: rgba(90, 79, 207, 0.08);
  color: var(--purple-deep);
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.field-label .optional {
  font-weight: 500;
  color: var(--muted);
}

.money-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(90, 79, 207, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  margin-bottom: 4px;
}

.money-input span {
  font-weight: 700;
  color: var(--muted);
}

.money-input input,
.company-fields input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.company-fields input {
  border: 1.5px solid rgba(90, 79, 207, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  margin-bottom: 12px;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--ink) 90%, var(--muted));
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  flex-shrink: 0;
}

.toggle-row strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.toggle-hint {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.company-fields {
  margin: -4px 0 8px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(241, 238, 249, 0.65);
  border: 1px solid rgba(90, 79, 207, 0.1);
}

.fee-row.is-locked {
  margin: 8px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  opacity: 0.92;
}

.fee-row.is-locked .fee-toggle {
  margin: 0;
  cursor: not-allowed;
  color: #6b7280;
}

.fee-row.is-locked .fee-toggle strong {
  color: #4b5563;
}

.fee-row.is-locked input[type="checkbox"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.fee-coming-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #6b7280;
  font-weight: 600;
}

.totals {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(90, 79, 207, 0.12);
  background: #fff;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: color-mix(in srgb, var(--ink) 85%, var(--muted));
}

.totals-row.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.totals-row.muted em {
  font-style: normal;
  font-weight: 600;
}

.totals-grand {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 79, 207, 0.12);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.expectations {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(90, 79, 207, 0.2);
  background: rgba(255, 255, 255, 0.7);
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.88rem;
  font-weight: 600;
}

.secure-note {
  margin: 10px 0 14px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

#donate-form .btn-primary {
  width: 100%;
  border: 0;
  cursor: pointer;
}

#donate-form .btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

@media (min-width: 640px) {
  .actions {
    flex-direction: row;
  }
  .actions .btn { width: auto; flex: 1; }
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .amount-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
