/* PDF Token — People's Development Fund
   Shared layout, type and spacing tokens. */

:root {
  --navy:        #081527;
  --surface:     #10233D;
  --surface-2:   #162C49;
  --text:        #EEF2F8;
  --text-dim:    #B7C4D8;
  --gold:        #E0AD3F;
  --gold-light:  #FBE28A;
  --crimson:     #B8232F;
  --ok:          #8CE0A8;
  --warn:        #FFC978;
  --err:         #FF9AA2;

  --container:   1180px;
  --pad-x:       24px;
  --radius:      14px;
  --radius-sm:   10px;
  --gap:         22px;
  --section-y:   88px;

  --hairline:    rgba(224, 173, 63, 0.20);
  --hairline-2:  rgba(255, 255, 255, 0.08);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
          "Padauk", "Myanmar Text", "Noto Sans Myanmar", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas,
          "Liberation Mono", monospace;
}

@media (max-width: 720px) {
  :root { --pad-x: 20px; --section-y: 56px; }
}

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

/* The hidden attribute must win over any class that sets `display`. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

a { color: var(--gold-light); }
a:hover { color: var(--gold); }

:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---------- shared grid ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: var(--section-y); border-top: 1px solid var(--hairline-2); }
.section:first-of-type { border-top: 0; }

.section-head { max-width: 62ch; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }

h2 {
  font-size: clamp(1.55rem, 1.05rem + 1.8vw, 2.1rem);
  color: var(--gold-light);
  margin-bottom: 14px;
}

h3 { font-size: 1.06rem; color: var(--gold-light); margin-bottom: 10px; }

p { max-width: 68ch; color: var(--text-dim); }
p + p { margin-top: 14px; }

.lede { font-size: clamp(1.02rem, 0.96rem + 0.3vw, 1.16rem); color: var(--text-dim); }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--gold-light);
  color: var(--navy);
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 21, 39, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding-block: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--gold-light);
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; }
.brand span { font-size: 1rem; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.94rem;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.header-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 900px) {
  .site-nav { order: 3; margin-left: 0; width: 100%; border-top: 1px solid var(--hairline-2); padding-top: 6px; }
  .site-nav ul { justify-content: flex-start; }
  .header-actions { margin-left: auto; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease, background-color 0.15s ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--navy); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.07); color: var(--navy); }

.btn-secondary { background: transparent; border-color: var(--hairline); color: var(--gold-light); }
.btn-secondary:hover { background: rgba(224, 173, 63, 0.10); color: var(--gold-light); }

.btn-quiet {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--hairline-2);
  color: var(--text-dim);
  font-weight: 600;
  min-height: 44px;
  padding: 0 14px;
}
.btn-quiet:hover { color: var(--text); }

.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.86rem; }

#walletBtn[data-state="connected"] {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--hairline);
  color: var(--gold-light);
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 92px) var(--section-y); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.15rem, 1.2rem + 3.4vw, 3.55rem);
  margin: 12px 0 18px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede { max-width: 56ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-art { justify-self: center; }
.hero-art img { width: clamp(190px, 27vw, 330px); height: auto; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: clamp(150px, 40vw, 210px); }
}

/* ---------- facts strip ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gap);
  margin-top: clamp(36px, 5vw, 60px);
}

.fact {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.fact dt { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.fact dd { margin-top: 6px; font-size: 1.22rem; font-weight: 700; color: var(--gold-light); }
.fact .fact-note { display: block; margin-top: 6px; font-size: 0.86rem; font-weight: 400; color: var(--text-dim); }

/* ---------- generic cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
  margin-top: 30px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { font-size: 0.96rem; }

.steps { counter-reset: step; list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 18px 22px 18px 60px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.97rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 17px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(224, 173, 63, 0.16);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
}
.steps strong { color: var(--text); font-weight: 600; }

/* ---------- status / notice blocks ---------- */

.notice {
  border: 1px solid var(--hairline-2);
  border-left: 3px solid var(--gold);
  background: rgba(224, 173, 63, 0.06);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-top: 26px;
}
.notice p { max-width: 74ch; font-size: 0.95rem; }
.notice .notice-title { color: var(--gold-light); font-weight: 700; display: block; margin-bottom: 6px; }

.mt-16 { margin-top: 16px; }
.btn-block { width: 100%; margin-top: 18px; }
.contract-label { color: var(--text-dim); font-size: 0.92rem; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  font-size: 0.87rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  padding: 7px 15px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }

/* ---------- contract row ---------- */

.contract {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 26px;
}
.contract code {
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--gold-light);
  overflow-wrap: anywhere;
}
.contract .contract-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- FAQ ---------- */

.faq { margin-top: 28px; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-left: auto;
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { color: var(--gold-light); }
.faq .faq-body { padding: 0 22px 20px; }
.faq .faq-body p { font-size: 0.96rem; }

/* ---------- wallet ---------- */

#wallet[hidden] { display: none; }

.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--gap);
  margin-top: 26px;
}

.addr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 22px;
}
.addr-row .addr {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--gold-light);
  overflow-wrap: anywhere;
}

.bal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline-2);
  color: var(--text-dim);
  font-size: 0.95rem;
}
.bal-row:last-child { border-bottom: 0; }
.bal-row .amt { font-weight: 700; color: var(--gold-light); font-family: var(--mono); font-size: 0.95rem; }

.qr-holder {
  display: grid;
  place-items: center;
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  width: fit-content;
  margin: 18px auto 0;
}

.field { margin-top: 16px; }
.field > label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 7px; }

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 173, 63, 0.22); }
.input[aria-invalid="true"] { border-color: var(--err); }

.field-row { display: flex; gap: 10px; align-items: stretch; }
.field-row .input { flex: 1; min-width: 0; }

.hint { font-size: 0.82rem; color: var(--text-dim); margin-top: 7px; }

.msg { margin-top: 14px; font-size: 0.9rem; min-height: 1.4em; }
.msg.error { color: var(--err); }
.msg.success { color: var(--ok); }
.msg.working { color: var(--warn); }
.msg a { overflow-wrap: anywhere; }

#qrScanner { margin-top: 14px; border-radius: var(--radius-sm); overflow: hidden; }
#qrScanner:empty { display: none; }

.review-panel {
  margin-top: 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: rgba(224, 173, 63, 0.07);
  padding: 16px 18px;
}
.review-panel dl { display: grid; gap: 9px; margin-bottom: 16px; }
.review-panel .rrow { display: flex; justify-content: space-between; gap: 14px; font-size: 0.88rem; }
.review-panel dt { color: var(--text-dim); flex: none; }
.review-panel dd { color: var(--text); text-align: right; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.83rem; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.banner {
  margin-top: 22px;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.92rem;
  border: 1px solid var(--hairline-2);
}
.banner[data-tone="warn"] { background: rgba(255, 201, 120, 0.10); border-color: rgba(255, 201, 120, 0.40); color: var(--warn); }
.banner[data-tone="error"] { background: rgba(184, 35, 47, 0.12); border-color: rgba(184, 35, 47, 0.45); color: var(--err); }
.banner[hidden] { display: none; }
.banner-inline { margin-top: 16px; padding: 12px 14px; font-size: 0.86rem; }
.banner .banner-actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }

.noscript-note {
  margin-top: 22px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 18, 0.72);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 400px;
}
.modal h2 { font-size: 1.2rem; margin-bottom: 8px; }
.modal p { font-size: 0.92rem; margin-bottom: 20px; }
.modal-options { display: grid; gap: 10px; }
.modal-options a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline-2);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.modal-options a:hover { border-color: var(--gold); color: var(--text); }
.modal-close { margin-top: 18px; width: 100%; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--hairline-2);
  padding-block: 44px 52px;
  text-align: center;
}
.site-footer .footer-brand { color: var(--text); font-weight: 600; }
.site-footer .footer-links {
  margin-top: 14px;
  display: flex;
  gap: 8px 22px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
}
.site-footer .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 0.94rem;
}
.channels {
  margin: 30px auto 0;
  max-width: 62ch;
  padding-top: 26px;
  border-top: 1px solid var(--hairline-2);
}
.channels-title {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.channel-list { list-style: none; display: flex; gap: 8px 20px; justify-content: center; flex-wrap: wrap; }
.channel-list:empty { display: none; }
.channel-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 0.94rem;
}
.channels-empty { font-size: 0.86rem; color: var(--text-dim); margin-inline: auto; }
.channels-empty strong { color: var(--warn); font-weight: 600; }

.site-footer .copyright { margin-top: 26px; font-size: 0.9rem; color: var(--text-dim); }
.site-footer .independence {
  margin: 16px auto 0;
  max-width: 68ch;
  font-size: 0.79rem;
  line-height: 1.65;
  color: var(--text-dim);
  opacity: 0.72;
}
.site-footer p { margin-inline: auto; }

/* anchor offset under the sticky header */
:target { scroll-margin-top: 90px; }
.section, .hero { scroll-margin-top: 78px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
