:root {
  --bg: #0b0b0f;
  --bg-2: #101017;
  --surface: #15151d;
  --surface-2: #1c1c26;
  --line: #2a2a36;
  --text: #f3efe6;
  --muted: #9b978d;
  --gold: #e8b84a;
  --gold-2: #f6d98b;
  --gold-deep: #a87a1c;
  --ok: #6fd39a;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(232, 184, 74, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, rgba(80, 90, 160, 0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-2); }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin-bottom: 0.9rem; }
.muted { color: var(--muted); }

main, .top, .foot { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* --------------------------------------------------------------- header */
.banner {
  background: #3a2a08; color: var(--gold-2); text-align: center;
  padding: 10px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--gold-deep);
}
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.brand img { border-radius: 7px; }
.lang select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b5b0a5' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 12px center / 10px 6px;
  color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 32px 8px 14px; font: 600 0.85rem var(--sans); cursor: pointer; max-width: 46vw;
}
.lang select:hover { border-color: var(--gold-deep); }
.lang select option { background: var(--surface); color: var(--text); }

/* ----------------------------------------------------------------- hero */
.hero {
  display: grid; gap: clamp(28px, 5vw, 64px); align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  padding: clamp(12px, 3vw, 40px) 0 clamp(40px, 6vw, 72px);
}
.portrait { margin: 0; position: relative; }
.frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 26px; overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(232, 184, 74, 0.35);
  box-shadow: 0 0 0 6px rgba(232, 184, 74, 0.05), 0 30px 80px -20px rgba(232, 184, 74, 0.25), 0 20px 50px rgba(0, 0, 0, 0.6);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame img.pulse { animation: pulse 1.2s ease; }
@keyframes pulse { 0% { filter: brightness(1.35); transform: scale(1.015); } 100% { filter: none; transform: none; } }
.preview-tag {
  position: absolute; top: 14px; left: 14px; background: #c0392b; color: #fff;
  font: 700 0.72rem var(--sans); letter-spacing: 0.08em; padding: 5px 10px; border-radius: 6px;
}
.clarity-chip {
  position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
  background: var(--bg-2); border: 1px solid var(--gold-deep); border-radius: 999px;
  padding: 8px 18px; font-size: 0.85rem; color: var(--muted);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.clarity-chip b { color: var(--gold-2); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(111, 211, 154, 0.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(111, 211, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 211, 154, 0); } }

h1 { font-size: clamp(2.3rem, 1.4rem + 4vw, 4.4rem); line-height: 1.02; }
h1 span { display: block; }
.gold {
  background: linear-gradient(100deg, var(--gold-deep), var(--gold) 30%, var(--gold-2) 55%, var(--gold) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { color: #cfcabf; font-size: 1.08rem; max-width: 34em; margin: 18px 0 26px; }

.meter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; }
.raised { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.big { font-family: var(--serif); font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); font-weight: 600; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.of { color: var(--muted); }
.bar { position: relative; height: 12px; border-radius: 999px; background: var(--surface-2); margin: 14px 0 28px; }
.bar-fill {
  height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-2));
  box-shadow: 0 0 18px rgba(232, 184, 74, 0.45);
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.ticks span {
  position: absolute; top: 18px; transform: translateX(-50%);
  font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.ticks span::before { content: ""; position: absolute; top: -10px; left: 50%; width: 1px; height: 6px; background: var(--line); }
.ticks span:last-child { transform: translateX(-100%); }
.ticks span:last-child::before { left: auto; right: 0; }
.meter-foot { margin: 0; font-size: 0.82rem; color: var(--muted); }
.meter-foot b { color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 22px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.stats dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 24px; font: 600 1rem var(--sans);
  text-decoration: none; cursor: pointer; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--gold-deep); }
.btn.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1405; border-color: transparent; box-shadow: 0 10px 30px -8px rgba(232, 184, 74, 0.6); }
.btn.ghost { background: transparent; }
.btn.small { padding: 9px 16px; font-size: 0.9rem; }
.btn:focus-visible, .lang select:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* ----------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 32px); margin-bottom: 22px; }
.donate { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center; border-color: rgba(232, 184, 74, 0.35); scroll-margin-top: 20px; }
.qr { background: #fff; border-radius: 16px; padding: 10px; width: 200px; }
.qr img { width: 100%; height: auto; }
.donate-body h2 { margin-bottom: 4px; }
.donate-body > p { margin: 0 0 14px; }
.addr-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.addr {
  font: 0.95rem var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; word-break: break-all; flex: 1 1 260px; min-width: 0; color: var(--gold-2);
}
.tag-alert {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; text-align: left;
  margin-top: 14px; padding: 14px 16px; border-radius: 14px;
  background: rgba(232, 184, 74, 0.10); border: 1px solid var(--gold);
}
.tag-icon {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: #1a1405; font-weight: 800;
}
.tag-alert b { display: block; color: var(--gold-2); font-size: 1.05rem; margin-bottom: 3px; }
.tag-body { color: #d9d4c8; font-size: 0.92rem; }
.notes { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.notes li::before { content: "— "; color: var(--gold-deep); }
.card-pay { margin-top: 22px; display: grid; gap: 10px; justify-items: start; }
.card-pay .or {
  margin: 0; width: 100%; display: flex; align-items: center; gap: 12px;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
}
.card-pay .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card-note { margin: 0; font-size: 0.85rem; }

.how h2 { margin-bottom: 0; }
.how-sub { margin: 6px 0 16px; }
.how-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.how-tab {
  background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 18px; font: 600 0.92rem var(--sans); cursor: pointer;
}
.how-tab:hover { border-color: var(--gold-deep); color: var(--text); }
.how-tab[aria-selected="true"] { background: var(--gold); color: #1a1405; border-color: transparent; }
.how-tab:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.how-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 8px; }
.how-steps li {
  counter-increment: s; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; color: #d9d4c8;
}
.how-steps li::before {
  content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(232, 184, 74, 0.12); color: var(--gold-2); font-weight: 700; font-size: 0.9rem;
}
.how-steps li span { padding-top: 4px; }
.how-steps b { color: var(--text); }
.how-tip { margin: 14px 0 0; font-size: 0.88rem; }

/* ------------------------------------------------------------ milestones */
.milestones, .wall { margin: 46px 0; }
.milestone-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.milestone-list li {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.m-amount { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--muted); }
.m-meta { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.milestone-list li.reached .m-amount, .milestone-list li.reached .m-meta { color: var(--ok); }
.milestone-list li.next { border-color: var(--gold-deep); background: linear-gradient(90deg, rgba(232, 184, 74, 0.10), var(--surface) 60%); }
.milestone-list li.next .m-amount, .milestone-list li.next .m-meta { color: var(--gold-2); }
.milestone-list li.next .m-meta { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

/* ------------------------------------------------------------------ wall */
.wall-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.wall-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.w-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.w-top b { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.w-top a { color: var(--muted); font: 0.82rem var(--mono); text-decoration: none; }
.w-top a:hover { color: var(--text); }
.w-time { margin-left: auto; font-family: var(--sans) !important; }
.w-memo { margin: 8px 0 0; color: #d9d4c8; font-style: italic; overflow-wrap: anywhere; }
.wall-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }


.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 48px; color: var(--muted); font-size: 0.85rem; }
.foot p { margin: 0 0 8px; max-width: 70em; }
.foot .geo-credit { font-size: 0.75rem; }
.foot .geo-credit a { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--surface-2); border: 1px solid var(--gold-deep); color: var(--text);
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: opacity .25s ease, transform .25s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .portrait { max-width: 420px; width: 100%; margin-inline: auto; }
  .pitch { text-align: left; }
}
@media (max-width: 640px) {
  .donate { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .donate-body { width: 100%; }
  .addr-row { justify-content: center; }
  .addr { font-size: 0.8rem; padding: 10px 12px; }
  .notes { text-align: left; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:last-child { grid-column: 1 / -1; }
  .milestone-list li { grid-template-columns: 64px minmax(0, 1fr); }
  .m-meta { grid-column: 2; }
  .cta-row .btn { flex: 1 1 auto; }
  .brand span { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
