/* SVF · Social Ventures Foundation — site stylesheet */
/* Brand color extracted from the official certificate: #30ab8f */

:root {
  --brand: #30ab8f;
  --brand-dark: #0f4a3e;
  --brand-soft: #e7f5f1;
  --ink: #0f1b2a;
  --ink-2: #2d3a48;
  --muted: #5b6b7f;
  --line: #e6ebef;
  --bg: #ffffff;
  --bg-soft: #f5f8f7;
  --bg-dark: #0b1722;
  --warn: #d97706;
  --ok: #16a34a;
  --bad: #dc2626;
  --maxw: 1180px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15,27,42,.06), 0 2px 8px rgba(15,27,42,.04);
  --shadow-md: 0 10px 30px rgba(15,27,42,.08);
  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "Source Han Serif SC", "Noto Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink-2);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand); }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  line-height: 1.18;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-dark { background: var(--bg-dark); color: #e6edf3; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #fff; }
.bg-dark a { color: #aef0dc; }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
  line-height: 1.2;
}
.site-header .btn { padding: 10px 18px; font-size: .9rem; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 18px;
  flex-wrap: nowrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}
.site-header .brand-logo { height: 38px; }
.site-footer .brand-logo { height: 42px; }

.nav-primary {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: nowrap;
}
.nav-primary a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: .94rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-primary a.active,
.nav-primary a:hover { color: var(--brand-dark); }
.nav-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: #fff;
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .04em;
}
.lang-switch button.active {
  background: var(--brand);
  color: #fff;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  width: 40px; height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px; height: 2px; background: var(--ink); position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-primary {
    display: none;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; padding: 18px 24px;
    flex-direction: column; align-items: flex-start;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }
  .nav-primary.open { display: flex; }
}

/* Hero */
.hero {
  position: relative;
  padding: 100px 0 88px;
  background:
    radial-gradient(1200px 600px at 80% -20%, rgba(48,171,143,.14), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(48,171,143,.1), transparent 60%),
    #fbfdfc;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.6rem, 5.2vw, 4.4rem);
}
.hero .lead {
  max-width: 56ch;
  font-size: 1.2rem;
  color: var(--ink-2);
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.hero-stats .num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.hero-stats .lbl { color: var(--muted); font-size: .92rem; }

@media (max-width: 700px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Grid utilities */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d8e3df; }
.card .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: grid; place-items: center;
  font-weight: 700;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 0; }

.track-card {
  position: relative;
  padding: 30px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--bg-soft));
  border: 1px solid var(--line);
  overflow: hidden;
}
.track-card .num {
  position: absolute; top: 22px; right: 24px;
  font-size: 2.2rem; font-weight: 800; color: var(--brand);
  opacity: .25;
}
.track-card h3 { margin-bottom: 8px; }
.track-card ul { color: var(--muted); padding-left: 18px; }
.track-card ul li { margin: 6px 0; }

/* Section heading helper */
.section-head { max-width: 60ch; margin: 0 auto 48px; text-align: center; }
.section-head.left { text-align: left; margin: 0 0 36px; }

/* Timeline */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 30px;
}
.timeline::before {
  content: ""; position: absolute;
  left: 20px; right: 20px; top: 30px;
  height: 2px; background: var(--line);
}
.timeline-item { padding: 0 14px; position: relative; text-align: center; }
.timeline-item .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand);
  margin: 22px auto 14px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 6px #fff;
}
.timeline-item h4 { color: var(--ink); margin: 0 0 4px; font-size: 1.02rem; }
.timeline-item p { color: var(--muted); font-size: .9rem; margin: 0; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { left: 30px; right: auto; top: 30px; bottom: 0; width: 2px; height: auto; }
  .timeline-item { text-align: left; padding: 0 0 0 64px; min-height: 70px; }
  .timeline-item .dot { position: absolute; left: 22px; top: 22px; margin: 0; }
}

/* Footer */
.site-footer {
  background: #f5f7f9;
  color: var(--muted);
  padding: 80px 0 30px;
  border-top: 1px solid var(--line);
}
.site-footer h4 {
  color: var(--ink);
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 700;
}
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--brand-dark); }
.site-footer .tagline { color: var(--muted); margin-top: 18px; max-width: 36ch; font-size: .92rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 40px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; font-size: .94rem; color: var(--ink-2); }
.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: .85rem;
  color: var(--muted);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Partner row */
.partner-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 36px;
  align-items: center;
}
.partner-row .partner {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* CTA strip */
.cta-strip {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: 20px;
  padding: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-strip h2 { color: #fff; margin: 0 0 8px; font-size: 1.9rem; }
.cta-strip p { margin: 0; color: rgba(255,255,255,.86); max-width: 50ch; }

/* News list */
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .news-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .news-list { grid-template-columns: 1fr; } }
.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.news-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--brand-soft), #d4ece3);
  display: grid; place-items: center;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .02em;
}
.news-card .meta {
  font-size: .8rem; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 10px;
}
.news-card .body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.news-card .read { margin-top: auto; color: var(--brand-dark); font-weight: 600; font-size: .9rem; }

/* People */
.people {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .people { grid-template-columns: 1fr; } }
.person {
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
}
.person .avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 1.6rem;
}
.person h4 { color: var(--ink); margin: 0 0 4px; font-size: 1.05rem; }
.person .role { color: var(--brand-dark); font-size: .85rem; font-weight: 600; margin-bottom: 8px; }
.person .org { color: var(--muted); font-size: .9rem; }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(48,171,143,.18);
}
.field .hint { font-size: .8rem; color: var(--muted); }
.field textarea { min-height: 130px; resize: vertical; }

/* Verify card */
.verify-result {
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  background: #fff;
  margin-top: 24px;
}
.verify-result.valid { border-color: var(--ok); background: #f1fbf6; }
.verify-result.invalid { border-color: var(--bad); background: #fef3f2; }
.verify-result.pending { border-color: var(--warn); background: #fffbeb; }
.verify-result .status {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(0,0,0,.06);
}
.verify-result.valid .status { background: var(--ok); color: #fff; }
.verify-result.invalid .status { background: var(--bad); color: #fff; }
.verify-result.pending .status { background: var(--warn); color: #fff; }

.verify-fields {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 24px;
  font-size: .96rem;
}
.verify-fields dt { color: var(--muted); font-weight: 500; }
.verify-fields dd { margin: 0; color: var(--ink); font-weight: 600; }

/* Certificate preview wrapper */
.cert-stage {
  margin-top: 24px;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 24px;
  overflow: auto;
}
.cert-stage svg { margin: 0 auto; max-width: 100%; height: auto; }

/* Page heading band (for inner pages) */
.page-band {
  padding: 84px 0 56px;
  background:
    radial-gradient(800px 400px at 100% 0%, rgba(48,171,143,.12), transparent 60%),
    #fbfdfc;
  border-bottom: 1px solid var(--line);
}
.page-band h1 { max-width: 22ch; }
.page-band p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: .78rem; padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
  letter-spacing: .04em;
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: #fff;
}
.faq details[open] { border-color: var(--brand); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::after {
  content: "+";
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq summary::-webkit-details-marker { display: none; }
.faq .answer { padding-top: 12px; color: var(--ink-2); }

/* Prize table */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .prize-grid { grid-template-columns: 1fr; } }
.prize-card {
  border-radius: 16px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.prize-card.gold {
  background: linear-gradient(180deg, #fff8e8 0%, #fff 100%);
  border-color: #f1d28a;
}
.prize-card.gold .rank { color: #b48400; }
.prize-card .rank {
  font-size: .85rem; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 700;
  color: var(--brand-dark);
}
.prize-card .amount {
  font-size: 2.6rem; font-weight: 800; color: var(--ink); margin: 8px 0;
  letter-spacing: -0.02em;
}
.prize-card .desc { color: var(--muted); font-size: .95rem; }

/* Definition list (about page) */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 720px) { .values { grid-template-columns: 1fr; } }
.value-item { padding: 26px; border-left: 3px solid var(--brand); background: var(--bg-soft); border-radius: 0 14px 14px 0; }
.value-item h3 { color: var(--brand-dark); }

/* Helper */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; gap: 12px; flex-wrap: wrap; }

/* Legal pages */
.legal h2 {
  font-size: 1.15rem;
  margin: 32px 0 10px;
  color: var(--ink);
}
.legal p { color: var(--ink-2); }

/* Apply page steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: step;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding: 28px 26px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px; left: 22px;
  width: 36px; height: 36px;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  box-shadow: 0 0 0 6px #f5f7f9;
}
.step h3 { margin-top: 6px; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }

.form-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
}
.form-section h3 {
  color: var(--brand-dark);
  font-size: .92rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.checkboxes { display: flex; flex-direction: column; gap: 10px; }
.checkboxes label {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .95rem; color: var(--ink-2); cursor: pointer;
}
.checkboxes input { margin-top: 4px; }

/* News detail */
.article-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: .9rem;
  margin-bottom: 22px;
}
.article-body p { font-size: 1.05rem; color: var(--ink-2); line-height: 1.75; margin-bottom: 1em; }
.article-thumb {
  height: 240px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-soft), #d4ece3);
  display: grid; place-items: center;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: .04em;
  margin-bottom: 36px;
}

/* Hide elements based on lang */
html[lang="zh"] [data-only="en"],
html[lang="en"] [data-only="zh"] { display: none !important; }

/* Bilingual font softening for Chinese */
html[lang="zh"] body { letter-spacing: 0; }
html[lang="zh"] h1, html[lang="zh"] h2 { letter-spacing: 0; }

/* Print certificate */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
}
