/* ============================================================
   DonasiKita — Design System
   Aksen tunggal: hijau emerald. Radius 12–16px. Spacing kelipatan 8.
   ============================================================ */
:root {
  --accent: #059669;
  --accent-strong: #047857;
  --accent-deep: #064e3b;
  --accent-soft: #d1fae5;
  --accent-ghost: #ecfdf5;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --ok: #059669;
  --ok-soft: #d1fae5;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --radius: 14px;
  --radius-sm: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 40px rgba(6, 78, 59, .12);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

a { color: var(--accent-strong); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-deep); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container.narrow { max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer;
  border-radius: 999px; border: none;
  padding: 12px 24px; font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff; box-shadow: 0 6px 18px rgba(5, 150, 105, .3);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(5, 150, 105, .42); transform: translateY(-1px); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent-strong); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-ghost); }
.btn-invert { background: #fff; color: var(--accent-deep); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.btn-invert:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: not-allowed; transform: none; }

.btn-loading { display: inline-flex; align-items: center; gap: 8px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 19px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(5,150,105,.35);
}
.brand:hover { color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: 15px; }
.nav-links > a { color: var(--ink-2); }
.nav-links > a:hover { color: var(--accent-strong); }
.nav-links > .btn { color: #fff; }
.nav-links > .btn:hover { color: #fff; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: transform .25s ease, opacity .25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; background:
  radial-gradient(60% 80% at 85% 10%, var(--accent-ghost) 0%, transparent 60%),
  radial-gradient(50% 70% at 5% 90%, #f0fdf4 0%, transparent 55%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.badge-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent-strong); position: relative; }
.hero-sub { margin-top: 18px; font-size: 17px; color: var(--ink-2); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-stats { display: flex; gap: 40px; margin-top: 40px; }
.hero-stats dt { font-size: 26px; font-weight: 800; color: var(--accent-deep); }
.hero-stats dd { font-size: 13.5px; color: var(--ink-3); }

.hero-visual { position: relative; }
.hero-card {
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 24px; position: relative; z-index: 1;
}
.hero-card-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(5,150,105,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(5,150,105,0); } 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); } }

.feed-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--surface-2); animation: feedIn .4s ease; }
.feed-item:first-child { border-top: none; }
.feed-item strong { display: block; font-size: 14.5px; color: var(--ink); }
.feed-item small { color: var(--ink-3); font-size: 12.5px; }
.feed-item b { color: var(--accent-strong); }
.feed-avatar {
  --h: 160;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 70% 45%), hsl(calc(var(--h) + 40) 70% 35%));
}
@keyframes feedIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero-float {
  position: absolute; z-index: 2;
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--accent-deep);
  box-shadow: var(--shadow-md);
}
.hero-float-1 { top: -18px; right: 8%; animation: floaty 5s ease-in-out infinite; }
.hero-float-2 { bottom: -16px; left: 6%; animation: floaty 6s ease-in-out infinite reverse; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface-2); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-strong); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 16.5px; }

/* ---------- Form Donasi ---------- */
.donate-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 32px;
}
.donate-step { border: none; margin-bottom: 36px; }
.donate-step legend { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; margin-bottom: 18px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-deep); color: #fff;
  display: grid; place-items: center; font-size: 13.5px; font-weight: 800;
}

.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.amount-chip {
  font: inherit; font-weight: 700; font-size: 15px;
  padding: 13px 8px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; transition: all .18s ease; color: var(--ink-2);
}
.amount-chip:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-ghost); }
.amount-chip.is-active { border-color: var(--accent); background: var(--accent-ghost); color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-soft); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
.optional { color: var(--ink-3); font-weight: 500; font-size: 12.5px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .18s ease, box-shadow .18s ease;
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.invalid, .field textarea.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.input-affix { display: flex; align-items: stretch; }
.input-affix span {
  display: grid; place-items: center; padding: 0 16px;
  background: var(--surface-2); border: 1.5px solid var(--line); border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-weight: 700; color: var(--ink-3);
}
.input-affix input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.program-list { display: grid; gap: 10px; }
.program-item input { position: absolute; opacity: 0; }
.program-body {
  display: block; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; cursor: pointer; transition: all .18s ease; background: var(--surface);
}
.program-body strong { display: block; font-size: 15px; }
.program-body small { color: var(--ink-3); font-size: 13.5px; }
.program-item input:checked + .program-body { border-color: var(--accent); background: var(--accent-ghost); box-shadow: 0 0 0 3px var(--accent-soft); }
.program-item input:focus-visible + .program-body { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.check-anon { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check-anon input { width: 18px; height: 18px; accent-color: var(--accent); }

.donate-summary {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.summary-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 14.5px; color: var(--ink-2); }
.summary-row strong { font-weight: 700; color: var(--ink); }
.summary-total { border-top: 1.5px dashed var(--line); margin-top: 8px; padding-top: 12px; font-size: 15.5px; }
.summary-total strong { color: var(--accent-strong); font-size: 19px; }
.donate-summary .btn { margin-top: 16px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- Status panel ---------- */
.status-panel {
  margin-top: 24px; background: var(--surface);
  border: 1.5px solid var(--accent-soft); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.status-head { display: flex; justify-content: space-between; align-items: center; }
.status-head h3 { font-size: 18px; }
.status-desc { margin: 8px 0 16px; color: var(--ink-2); font-size: 14.5px; }
.status-desc code { background: var(--accent-ghost); color: var(--accent-deep); padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.status-input-row { display: flex; gap: 10px; }
.status-input-row input {
  flex: 1; font: inherit; font-size: 15px; padding: 12px 14px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  text-transform: uppercase; letter-spacing: .04em;
}
.status-input-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.status-result { margin-top: 18px; padding: 16px; border-radius: var(--radius-sm); animation: feedIn .3s ease; }
.status-result.pending { background: var(--warn-soft); color: #92400e; }
.status-result.completed { background: var(--ok-soft); color: var(--accent-deep); }
.status-result.canceled, .status-result.notfound, .status-result.error { background: var(--danger-soft); color: #991b1b; }
.status-result strong { display: block; font-size: 15px; margin-bottom: 4px; }
.status-result small { font-size: 13.5px; display: block; line-height: 1.5; }

/* ---------- Steps ---------- */
.steps-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; transition: transform .22s ease, box-shadow .22s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-big { font-size: 40px; font-weight: 800; color: var(--accent-soft); -webkit-text-stroke: 1px var(--accent); letter-spacing: -.02em; }
.step-card h3 { margin: 14px 0 8px; font-size: 18px; }
.step-card p { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Transparansi ---------- */
.alloc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; max-width: 760px; margin: 0 auto; }
.alloc-item { }
.alloc-bar { height: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.alloc-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 999px; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.alloc-item.in-view .alloc-bar span { width: var(--w); }
.alloc-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 14.5px; }
.alloc-meta span { color: var(--ink-3); font-weight: 700; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 860px; margin: 44px auto 0; }
.trust-item { text-align: center; padding: 20px; background: var(--surface-2); border-radius: var(--radius); border: 1px solid var(--line); }
.trust-item strong { display: block; font-size: 22px; color: var(--accent-strong); }
.trust-item span { font-size: 13.5px; color: var(--ink-2); }

/* ---------- Testimoni ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 18px; transition: transform .22s ease, box-shadow .22s ease; }
.quote-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.quote-card blockquote { font-size: 15px; color: var(--ink-2); flex: 1; }
.quote-card figcaption { display: flex; align-items: center; gap: 12px; }
.quote-card figcaption strong { display: block; font-size: 14.5px; }
.quote-card figcaption small { color: var(--ink-3); font-size: 12.5px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s ease; }
.faq-item[open] { border-color: var(--accent); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 18px 22px; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; color: var(--accent-strong); transition: transform .25s ease; font-weight: 500; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 22px 20px; color: var(--ink-2); font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent-strong) 60%, var(--accent) 100%);
  color: #fff; text-align: center; border-radius: 0;
}
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.cta-band p { margin: 16px 0 28px; color: rgba(255,255,255,.85); font-size: 17px; }
.cta-band .btn { box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* ---------- Footer ---------- */
.footer { background: #0b1220; color: #cbd5e1; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { margin-top: 14px; font-size: 14px; color: #94a3b8; max-width: 32ch; }
.footer .brand { color: #fff; }
.footer-col h4 { color: #fff; font-size: 14.5px; margin-bottom: 16px; }
.footer-col a, .footer-col p { display: block; color: #94a3b8; font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { color: #6ee7b7; }
.footer-note { font-size: 12.5px !important; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid #1e293b; font-size: 13px; color: #64748b; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
  z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }

/* ---------- Skeleton & Error ---------- */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-sm); }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

.empty-state { text-align: center; padding: 28px; color: var(--ink-3); font-size: 14.5px; }
.retry-btn { margin-top: 10px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--accent-strong); background: var(--accent-ghost); border: 1.5px solid var(--accent-soft); border-radius: 999px; padding: 8px 18px; cursor: pointer; transition: background .18s ease; }
.retry-btn:hover { background: var(--accent-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 480px; margin-inline: auto; }
  .steps-grid, .quote-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .trust-strip { grid-template-columns: 1fr; max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; z-index: 49;
    background: var(--surface); flex-direction: column; align-items: stretch;
    padding: 20px 24px 28px; gap: 4px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateY(-140%); transition: transform .3s ease;
  }
  .nav-links.open { transform: none; }
  .nav-links > a { padding: 12px 4px; border-radius: 10px; }
  .nav-links > a:hover { background: var(--accent-ghost); }
  .nav-links > .btn { margin-top: 10px; justify-content: center; }
  .nav-toggle { display: block; }

  .hero { padding-top: 48px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .section { padding: 64px 0; }
  .donate-card { padding: 22px; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .alloc-grid { grid-template-columns: 1fr; }
  .status-input-row { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
