/* ===== GB Foundation - Main Stylesheet ===== */
:root {
  --ink: #1B2633;
  --ink-soft: #4A5867;
  --paper: #FFFFFF;
  --mist: #F1F5F4;
  --line: #D9E2DF;
  --green: #17694A;
  --green-dark: #0F4E36;
  --gold: #B07D1E;
  --gold-soft: #F6EBD3;
  --red: #C0352B;
  --c1: #1FA3A8; --c2: #2E6DB4; --c3: #EE7D22; --c4: #F2B51E;
  --c5: #3BA54A; --c6: #D7262E; --c7: #7B3F98;
  --radius: 10px;
  --head: 'Baloo 2', 'Hind', system-ui, sans-serif;
  --body: 'Hind', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.center { text-align: center; }

/* Signature: the 7-colour band from the logo */
.cause-band { display: flex; height: 6px; }
.cause-band span { flex: 1; }
.cause-band span:nth-child(1) { background: var(--c1); }
.cause-band span:nth-child(2) { background: var(--c2); }
.cause-band span:nth-child(3) { background: var(--c3); }
.cause-band span:nth-child(4) { background: var(--c4); }
.cause-band span:nth-child(5) { background: var(--c5); }
.cause-band span:nth-child(6) { background: var(--c6); }
.cause-band span:nth-child(7) { background: var(--c7); }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--head); font-size: 1.5rem; color: var(--gold); }
.brand-text small { font-size: .78rem; color: var(--ink-soft); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 6px; font-weight: 500; }
.main-nav a:hover { background: var(--mist); }
.main-nav a.is-active { color: var(--green); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); }
  .main-nav.is-open { display: flex; }
  .main-nav a.is-active { box-shadow: none; background: var(--mist); border-radius: 6px; }
  .main-nav .btn { margin-top: 8px; text-align: center; }
}

/* Buttons */
.btn { display: inline-block; font: 600 1rem var(--body); padding: 12px 22px; border-radius: 8px; border: 2px solid var(--green); color: var(--green); background: transparent; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn:hover { background: var(--mist); color: var(--green-dark); }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #8F6516; border-color: #8F6516; color: #fff; }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: #FBEAE8; color: var(--red); }
.btn-small { padding: 7px 14px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero-lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero-logo { justify-self: center; width: min(420px, 100%); }
.hero-logo img { display: block; width: 100%; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-logo { order: -1; width: 240px; } }

/* Sections */
.section { padding: 64px 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.page-head { padding: 48px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.page-head p { color: var(--ink-soft); font-size: 1.1rem; max-width: 40em; margin: 0; }

/* Causes - each cause is a coloured strip like a hand in the logo */
.causes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.cause { padding: 22px 20px 22px 26px; border-bottom: 1px solid var(--line); position: relative; }
.cause::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 6px; border-radius: 0 6px 6px 0; background: var(--cause, var(--green)); }
.cause h3 { margin-bottom: 4px; }
.cause p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* Level ladder - a real sequence, so it is numbered */
.ladder { list-style: none; margin: 0; padding: 0; counter-reset: lvl; }
.ladder li { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.ladder .lv { font-family: var(--head); font-weight: 800; font-size: 1.6rem; color: var(--gold); text-align: center; background: var(--gold-soft); border-radius: 8px; padding: 4px 0; }
.ladder .lv small { display: block; font-size: .7rem; font-weight: 600; color: var(--ink-soft); margin-top: -6px; }
.ladder .title { font-weight: 600; font-size: 1.05rem; }
.ladder .amt { font-family: var(--head); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.ladder li.done .lv { background: var(--green); color: #fff; }
.ladder li.done .lv small { color: #DDF0E7; }
.ladder li.current { background: var(--gold-soft); border-radius: 8px; padding-inline: 10px; }

/* Steps (join process) */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; counter-reset: step; }
.step { counter-increment: step; }
.step::before { content: counter(step); display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; font: 700 1.2rem var(--head); margin-bottom: 10px; }
.step p { color: var(--ink-soft); margin: 0; }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.person { border-top: 4px solid var(--c, var(--green)); padding: 18px 4px 0; }
.person .initials { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); font: 700 1.4rem var(--head); color: var(--ink); margin-bottom: 12px; }
.person h3 { margin-bottom: 2px; font-size: 1.15rem; }
.person p { margin: 0; color: var(--ink-soft); }
.person.lead { grid-column: 1 / -1; display: flex; gap: 18px; align-items: center; border-top-color: var(--gold); }
.person.lead .initials { width: 84px; height: 84px; font-size: 1.8rem; background: var(--gold-soft); color: var(--gold); margin: 0; }
.person.lead h3 { font-size: 1.5rem; }

/* Policy text */
.policy h2 { font-size: 1.35rem; margin-top: 1.8em; padding-top: 1em; border-top: 1px solid var(--line); }
.policy h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.policy ul { padding-left: 1.2em; }
.policy li { margin-bottom: .35em; }
.callout { background: var(--gold-soft); border-left: 5px solid var(--gold); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.callout p:last-child { margin: 0; }

/* Forms */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-section { border: 0; padding: 0; margin: 0 0 28px; }
.form-section legend { font: 700 1.2rem var(--head); padding: 0; margin-bottom: 14px; color: var(--green); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.grid-2 .field, .grid-3 .field { margin-bottom: 0; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .95rem; }
label .req { color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  font: inherit; font-size: 1rem; padding: 11px 13px; border: 1.5px solid #C5D0CC; border-radius: 8px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(23,105,74,.18); }
input[type=file] { font: inherit; font-size: .95rem; }
textarea { min-height: 110px; resize: vertical; }
.hint { font-size: .85rem; color: var(--ink-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--green); }
.pass-wrap { position: relative; }
.pass-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--green); font: 600 .85rem var(--body); cursor: pointer; padding: 6px; }
.preview-img { width: 110px; height: 130px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.pay-box { display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; background: var(--mist); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.pay-box img { width: 170px; height: 170px; object-fit: contain; background: #fff; border-radius: 8px; }
.pay-amount { font: 800 2.2rem var(--head); color: var(--green); line-height: 1; }
@media (max-width: 560px) { .pay-box { grid-template-columns: 1fr; } }

/* Alerts & badges */
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: #E3F4EA; color: #145A3C; }
.alert-error { background: #FBE6E4; color: #9A2A22; }
.alert-info { background: #E6EFF8; color: #1F4E7E; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .82rem; font-weight: 600; }
.badge-pending { background: #FFF2D6; color: #8A5B00; }
.badge-active, .badge-approved, .badge-paid, .badge-verified { background: #E3F4EA; color: #145A3C; }
.badge-rejected, .badge-blocked { background: #FBE6E4; color: #9A2A22; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--mist); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.empty { padding: 36px; text-align: center; color: var(--ink-soft); }

/* Detail list */
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--ink-soft); }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 8px; } }

/* Member area layout */
.panel-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 32px 0 64px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 96px; align-self: start; }
.side-nav a { padding: 10px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.side-nav a:hover { background: var(--mist); }
.side-nav a.is-active { background: var(--green); color: #fff; }
.side-nav .who { padding: 0 14px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.side-nav .who strong { display: block; font-family: var(--head); font-size: 1.15rem; }
@media (max-width: 820px) {
  .panel-layout { grid-template-columns: 1fr; gap: 20px; }
  .side-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .side-nav .who { width: 100%; }
}
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; background: #fff; }
.box h2 { font-size: 1.3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.stat b { display: block; font: 800 1.8rem var(--head); line-height: 1.1; }
.stat span { color: var(--ink-soft); font-size: .92rem; }
.stat.warn b { color: var(--gold); }
.status-strip { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); margin-bottom: 22px; }
.status-strip.pending { background: #FFF2D6; }
.status-strip.active { background: #E3F4EA; }
.status-strip.rejected { background: #FBE6E4; }
.status-strip img { width: 64px; height: 76px; object-fit: cover; border-radius: 6px; }

/* Footer */
.site-footer { background: var(--ink); color: #C9D3DC; padding: 48px 0 0; margin-top: 0; }
.site-footer a { color: #E7EDF2; text-decoration: none; display: block; margin-bottom: 6px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px; }
.footer-name { font: 700 1.25rem var(--head); color: #fff; }
.footer-head { font-weight: 600; color: #fff; margin-bottom: 10px !important; }
.site-footer .muted { color: #93A3B1; }
.footer-bottom { border-top: 1px solid #2E3B49; margin-top: 36px; padding: 16px 0; font-size: .88rem; color: #93A3B1; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Auth pages */
.auth { max-width: 460px; margin: 48px auto 72px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Fixes */
.main-nav a.btn-solid, .main-nav a.btn-solid:hover { color: #fff; box-shadow: none; border-radius: 8px; }
.ladder li.current .lv { background: var(--gold); color: #fff; }
.ladder li.current .lv small { color: #FBF3E2; }

/* ===== Level cards (poster style) ===== */
.lvcards { display: grid; gap: 22px; }
.lvcard { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-left: 8px solid #E8501E; border-radius: 12px; padding: 22px 24px; overflow: hidden; }
.lv-banner { display: inline-block; margin: 0; background: linear-gradient(#EE6A2C, #D9400F); color: #fff;
  font: 800 1.9rem/1 var(--head); padding: 10px 22px 8px; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 0 0 2px #C7380D; letter-spacing: .01em; }
.lv-bracket { font: 700 1.25rem/1.2 var(--head); color: #E8641E; margin: 10px 0 6px; }
.lv-scene { display: flex; align-items: flex-end; gap: 6px; min-height: 110px; }
.lv-you { display: flex; flex-direction: column; align-items: center; flex: none; }
.lv-you span { font: 800 .85rem var(--head); color: var(--ink); text-transform: uppercase; }
.lv-you svg { width: 42px; height: 84px; }
.lv-arrow { width: 60px; height: 30px; flex: none; align-self: center; }
.lv-items { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.lv-items.many { grid-template-columns: repeat(6, 26px); }
.lv-items svg { width: 100%; height: auto; display: block; }
.lv-box { background: linear-gradient(135deg, #EE6A2C, #D9400F); color: #fff; border-radius: 12px; padding: 18px 20px; border: 3px solid #fff; box-shadow: 0 0 0 2px #C7380D; }
.lv-box p { margin: 0 0 6px; font-size: 1.02rem; font-weight: 600; }
.lv-box b { display: inline-block; min-width: 100px; font-weight: 700; opacity: .9; }
.lv-box b::after { content: " :"; }
.lv-box .lv-reward { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.6); font-size: 1.1rem; }
.lv-box .btn { margin-top: 12px; background: #fff; color: #C7380D; border-color: #fff; }
.lv-box .btn:hover { background: #FFF1E8; color: #A02E0A; }
.lv-ribbon { position: absolute; top: 12px; right: 12px; font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: var(--mist); color: var(--ink-soft); }
.lvcard.done { border-left-color: var(--green); }
.lvcard.done .lv-ribbon { background: #E3F4EA; color: #145A3C; }
.lvcard.current { box-shadow: 0 0 0 3px var(--gold-soft); }
.lvcard.current .lv-ribbon { background: var(--gold); color: #fff; }
.lvcard.locked { opacity: .55; }
.lvcard.locked .lv-banner, .lvcard.locked .lv-box { filter: grayscale(.6); }
@media (max-width: 760px) {
  .lvcard { grid-template-columns: 1fr; padding: 18px; }
  .lv-banner { font-size: 1.5rem; }
  .lv-ribbon { position: static; display: inline-block; margin-bottom: 8px; }
}
/* Level card size tweaks */
.lvcard.done, .lvcard.current, .lvcard.locked { padding-top: 46px; }
.lv-ribbon { top: 14px; right: 24px; }
.lv-you svg { width: 54px; height: 108px; }
.lv-arrow { width: 72px; height: 36px; }
.lv-items { grid-template-columns: repeat(3, 44px); gap: 8px; }
.lv-items.many { grid-template-columns: repeat(6, 32px); gap: 6px; }
.lv-scene { min-height: 130px; gap: 8px; }
.lv-box b { min-width: 115px; }
@media (max-width: 760px) {
  .lvcard.done, .lvcard.current, .lvcard.locked { padding-top: 18px; }
  .lv-items.many { grid-template-columns: repeat(6, 26px); }
}
.lv-box p { display: grid; grid-template-columns: 115px 1fr; gap: 8px; }
.lv-box b { min-width: 0; }
@media (max-width: 400px) { .lv-box p { grid-template-columns: 95px 1fr; font-size: .95rem; } }
