/* ==========================================================================
   Donasi — Berantas Buta Huruf Al-Qur'an — MQ Cahaya Rabbani
   Mobile-first, warm/trustworthy/spiritual, conversion-oriented.
   ========================================================================== */

:root {
  /* Palette: deep teal (trust, spiritual) + warm gold (CTA contrast) +
     cream (warmth) + a sparing coral for emotional emphasis moments. */
  --cream: #faf6ee;
  --cream-raised: #f2ead9;
  --paper: #fffdf8;
  --ink: #1c2e28;
  --ink-soft: #4c5f57;
  --muted: #7c8c84;
  --teal: #1f4d3f;
  --teal-deep: #143529;
  --teal-soft: #e6efe9;
  --gold: #c9932f;
  --gold-deep: #a87423;
  --gold-soft: #f5e8cd;
  --coral: #dd7c5c;
  --coral-soft: #fbe8e0;
  --line: #e6ddc8;
  --shadow-sm: 0 2px 10px -4px rgba(28, 46, 40, 0.14);
  --shadow-md: 0 12px 32px -12px rgba(28, 46, 40, 0.22);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 480px; /* mobile-first content column; widens gracefully */
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--teal-deep);
  margin: 0 0 14px;
  text-wrap: balance;
}

p {
  margin: 0 0 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

@media (min-width: 720px) {
  .wrap {
    max-width: 640px;
  }
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 246, 238, 0.88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--teal-deep);
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--teal), var(--teal-deep));
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo small {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 16px 26px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gold);
  color: var(--teal-deep);
  box-shadow: var(--shadow-md);
  width: 100%;
}

.btn-primary:hover {
  background: var(--gold-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  width: 100%;
}

.btn-ghost:hover {
  background: var(--teal-soft);
}

.btn-wa {
  background: #1f8a5b;
  color: #fff;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Section rhythm ---------- */
section {
  padding: 64px 0;
  position: relative;
}

.section-tight {
  padding: 48px 0;
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
}

.lede {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 40px;
  padding-bottom: 44px;
  text-align: center;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream) 60%, var(--teal-soft) 100%);
}

.hero h1 {
  font-size: clamp(28px, 7vw, 38px);
}

.hero h2 {
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 18px;
}

.hero .lede {
  font-size: 15.5px;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.hero-visual {
  margin-top: 34px;
}

/* ---------- Photo placeholders (swap for real MQ documentation) ---------- */
.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(155deg, var(--teal-soft) 0%, var(--gold-soft) 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
}

.photo-frame.tall {
  aspect-ratio: 3 / 4;
}

.photo-frame.square {
  aspect-ratio: 1 / 1;
}

.photo-frame .illust {
  width: 78%;
  height: 78%;
  position: relative;
  z-index: 1;
}

.gallery .photo-frame .illust {
  width: 56%;
  height: 56%;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 15%, rgba(255, 255, 255, 0.35), transparent 55%);
}

/* ---------- Contrast split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 26px 0 8px;
}

.split-caption {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-top: 10px;
}

.contrast .lede {
  white-space: pre-line;
}

.contrast-footnote {
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: var(--teal);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}

/* ---------- Empathy ---------- */
.empathy {
  background: var(--paper);
  text-align: center;
}

.empathy h2 {
  font-size: clamp(23px, 6vw, 28px);
}

.empathy h3 {
  font-size: clamp(19px, 5vw, 22px);
  font-weight: 500;
  color: var(--teal);
}

.empathy .lede {
  max-width: 42ch;
  margin-left: auto;
  margin-right: auto;
}

.empathy .btn {
  margin-top: 8px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Program ---------- */
.program-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 22px;
  box-shadow: var(--shadow-sm);
}

.program-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.program-org {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
}

.program-org strong {
  color: var(--ink);
}

/* ---------- Impact journey ---------- */
.journey {
  margin-top: 30px;
  position: relative;
}

.journey-step {
  display: flex;
  gap: 16px;
  padding-bottom: 26px;
  position: relative;
}

.journey-step:last-child {
  padding-bottom: 0;
}

.journey-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.journey-step:last-child::before {
  display: none;
}

.journey-dot {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  z-index: 1;
}

.journey-step.final .journey-dot {
  background: var(--gold);
  color: var(--teal-deep);
}

.journey-text {
  padding-top: 4px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.journey-text span {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.impact-quote {
  margin-top: 30px;
  padding: 22px;
  background: var(--teal-soft);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--teal-deep);
  white-space: pre-line;
}

/* ---------- Trust cards ---------- */
.trust {
  background: var(--teal-deep);
  color: var(--cream);
}

.trust h2 {
  color: var(--paper);
  text-align: center;
  font-size: clamp(22px, 6vw, 27px);
}

.trust-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 560px) {
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.trust-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.trust-check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.trust-card h4 {
  margin: 0 0 5px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--paper);
}

.trust-card p {
  margin: 0;
  font-size: 13px;
  color: rgba(250, 246, 238, 0.72);
  line-height: 1.55;
}

/* ---------- Social proof ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
}

.gallery .photo-frame {
  border-radius: var(--radius-sm);
  box-shadow: none;
  aspect-ratio: 1 / 1;
}

.gallery .photo-frame:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.testimonial {
  margin-top: 14px;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

.testimonial-name {
  margin-top: 10px;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Donation ---------- */
.donasi {
  background: linear-gradient(180deg, var(--cream-raised) 0%, var(--cream) 100%);
}

.amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
}

.amount-btn {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  text-align: center;
}

.amount-btn:active {
  transform: scale(0.97);
}

.amount-btn.active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.amount-btn.other {
  grid-column: span 2;
}

.amount-other-input {
  display: none;
  margin-bottom: 16px;
}

.amount-other-input.show {
  display: block;
}

.amount-other-input label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.amount-other-input .prefix-input {
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.amount-other-input .prefix-input span {
  padding: 14px 4px 14px 16px;
  font-weight: 700;
  color: var(--muted);
}

.amount-other-input input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 16px 14px 4px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.donasi-micro {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 12px;
}

/* Payment info panel — bank transfer + QRIS (revealed after CTA) */
.payment-panel {
  display: none;
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.payment-panel.show {
  display: block;
}

.payment-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.payment-summary span:first-child {
  font-size: 13px;
  color: var(--muted);
}

.payment-summary strong {
  font-size: 20px;
  color: var(--teal-deep);
  font-family: "Fraunces", serif;
}

.bank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--teal-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}

.bank-row div span {
  display: block;
}

.bank-row .bank-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bank-row .bank-value {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--teal-deep);
  font-variant-numeric: tabular-nums;
}

.copy-btn {
  flex-shrink: 0;
  background: var(--paper);
  border: 1.5px solid var(--teal);
  color: var(--teal);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.copy-btn.copied {
  background: var(--teal);
  color: var(--paper);
}

.qris-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  margin-bottom: 16px;
  text-align: center;
}

.qris-box .qris-icon {
  width: 46px;
  height: 46px;
  color: var(--muted);
}

.qris-box p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.payment-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Final CTA ---------- */
.final-cta {
  background: var(--teal-deep);
  color: var(--paper);
  text-align: center;
}

.final-cta .photo-frame {
  margin-bottom: 26px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(201, 147, 47, 0.22));
}

.final-cta h2 {
  color: var(--paper);
  font-size: clamp(24px, 6.5vw, 30px);
}

.final-cta h3 {
  color: var(--gold-soft);
  font-weight: 500;
  font-size: clamp(16px, 4.5vw, 19px);
}

.final-cta .lede {
  color: rgba(250, 246, 238, 0.78);
  max-width: 40ch;
  margin: 0 auto 26px;
}

.final-cta .btn-primary {
  max-width: 320px;
  margin: 0 auto;
}

/* ---------- Footer ---------- */
footer {
  padding: 34px 0 100px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

footer .foot-logo {
  font-family: "Fraunces", serif;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 6px;
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(120%);
  transition: transform 0.3s ease;
  /* flex + justify-content, not margin:auto — .btn is inline-flex, and auto
     margins only center block-level boxes, so on wide viewports the button
     was sticking to the left instead of centering. */
  display: flex;
  justify-content: center;
}

.sticky-cta.show {
  transform: translateY(0);
}

.sticky-cta .btn {
  max-width: 480px;
  width: 100%;
}

/* Hide sticky bar once native donation section is on screen, so it never
   floats over the payment panel the user is trying to read. */
.sticky-cta.hide-on-donasi {
  transform: translateY(120%);
}

@media (min-width: 720px) {
  h1 {
    font-size: 42px;
  }
}
