/* Community Swap · design system
   Forest green + gold brand, modernised: soft depth, generous type, calm motion. */
:root {
  --forest: #0E3A2D;
  --forest-2: #164A3A;
  --forest-3: #1F5C48;
  --forest-line: rgba(255,255,255,.10);
  --forest-deep: #082A20;
  --gold: #E9A23B;
  --gold-2: #F4B95A;
  --gold-ink: #0B2E24;
  --gold-tint: #FBF1DD;
  --gold-text: #7A4B06;
  --paper: #F6F7F4;
  --card: #FFFFFF;
  --ink: #12211C;
  --muted: #5A6B64;
  --line: #E6EAE7;
  --line-strong: #C9D3CD;
  --on-dark: #D7E4DD;
  --on-dark-muted: #9FBDAE;
  --zw-tint: #E6F2EA;
  --zw-ink: #1C6A48;
  --mu-tint: #E6EDF8;
  --mu-ink: #23508F;
  --danger: #A1301F;
  --danger-tint: #FBE9E5;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-xs: 0 1px 2px rgba(18,33,28,.05);
  --shadow-sm: 0 1px 2px rgba(18,33,28,.04), 0 6px 20px -8px rgba(18,33,28,.12);
  --shadow-md: 0 2px 4px rgba(18,33,28,.05), 0 16px 40px -16px rgba(18,33,28,.22);
  --shadow-gold: 0 10px 30px -10px rgba(233,162,59,.55);
  --display: "Plus Jakarta Sans", "Poppins", system-ui, sans-serif;
  --body: "Inter", "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55;
  background: var(--paper);
  background-image: radial-gradient(1200px 600px at 100% -10%, rgba(233,162,59,.08), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(14,58,45,.07), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--forest); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color .15s var(--ease); }
a:hover { color: var(--forest-3); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -.02em; font-weight: 700; }
h3 { font-size: 18px; letter-spacing: -.01em; }
p { margin: 0; }
strong { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--gold-text); }
.eyebrow.on-dark { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(233,162,59,.6); outline-offset: 2px; border-radius: 6px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); display: inline-flex; align-items: center; justify-content: center; color: var(--gold-ink); flex-shrink: 0; box-shadow: var(--shadow-gold); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 14px; border: 1.5px solid transparent; font: 600 15px var(--body); text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(180deg, var(--forest-2), var(--forest)); color: #fff; box-shadow: 0 8px 20px -10px rgba(14,58,45,.6); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px -10px rgba(14,58,45,.7); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: var(--shadow-gold); }
.btn-gold:hover { color: var(--gold-ink); box-shadow: 0 14px 34px -10px rgba(233,162,59,.7); }
.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--forest); }
.btn-outline:hover { border-color: var(--forest); background: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(18,33,28,.05); color: var(--ink); }
.btn-ghost-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-danger-text { background: transparent; color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }

/* Cards and pills */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
a.card { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card-dark { background: linear-gradient(145deg, var(--forest-2), var(--forest-deep)); color: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.card-dark::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(233,162,59,.35), transparent 70%); pointer-events: none; }
.tint-zw { background: var(--zw-tint); border-radius: var(--radius); padding: 18px 20px; }
.tint-mu { background: var(--mu-tint); border-radius: var(--radius); padding: 18px 20px; }
.tint-gold { background: var(--gold-tint); border-radius: var(--radius-sm); padding: 14px 18px; color: #5C3905; border: 1px solid rgba(233,162,59,.25); }
.label-zw { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--zw-ink); }
.label-mu { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--mu-ink); }
.amount { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.amount-zw { color: var(--zw-ink); }
.amount-mu { color: var(--mu-ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-gold { background: var(--gold-tint); color: var(--gold-text); }
.pill-zw { background: var(--zw-tint); color: var(--zw-ink); }
.pill-mu { background: var(--mu-tint); color: var(--mu-ink); }
.pill-grey { background: #EDF0EE; color: var(--muted); }
.pill-danger { background: var(--danger-tint); color: var(--danger); }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(145deg, var(--forest-3), var(--forest)); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--display); }

/* Messages */
.messages { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 12px; font-weight: 500; border: 1px solid transparent; animation: rise .35s var(--ease) both; }
.msg-success, .msg-info { background: var(--zw-tint); color: #1A4D37; border-color: rgba(28,106,72,.18); }
.msg-error { background: var(--danger-tint); color: var(--danger); border-color: rgba(161,48,31,.18); }
.msg-warning { background: var(--gold-tint); color: #5C3905; border-color: rgba(233,162,59,.3); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; color: var(--ink); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=tel], .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: #fff; font: 500 16px var(--body); color: var(--ink);
  box-shadow: var(--shadow-xs); transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 4px rgba(14,58,45,.12); }
.field input[type=file] { font: 500 15px var(--body); padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.field .help { font-size: 13px; color: var(--muted); }
.field .error, .errorlist { color: var(--danger); font-size: 14px; font-weight: 500; list-style: none; padding: 0; margin: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; font-weight: 500; transition: border-color .15s var(--ease), background .15s var(--ease); }
.check:hover { border-color: var(--forest); }
.check:has(input:checked) { border-color: var(--forest); background: var(--zw-tint); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--forest); flex-shrink: 0; }
.radio-cards { display: flex; flex-direction: column; gap: 8px; }
.radio-cards label { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; font-weight: 600; transition: border-color .15s var(--ease), background .15s var(--ease); }
.radio-cards label:hover { border-color: var(--forest); }
.radio-cards label:has(input:checked) { border-color: var(--forest); background: var(--zw-tint); }
.radio-cards input { accent-color: var(--forest); width: 20px; height: 20px; }
.radio-cards ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- Public site */
.site-header { position: relative; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 500px at 85% 0%, rgba(233,162,59,.22), transparent 60%),
              radial-gradient(700px 500px at 0% 100%, rgba(31,92,72,.9), transparent 60%),
              linear-gradient(160deg, var(--forest-2), var(--forest-deep) 70%); }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%); }
.site-nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.site-nav nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 15px; }
.site-nav nav a { color: var(--on-dark); font-weight: 500; text-decoration: none; padding: 8px 12px; border-radius: 10px; transition: background .15s var(--ease), color .15s var(--ease); }
.site-nav nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.site-nav nav a.btn { color: var(--forest); background: #fff; font-weight: 700; margin-left: 8px; }
.site-nav nav a.btn:hover { background: var(--gold-tint); }
.hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 96px; }
.hero-copy { flex: 1 1 380px; max-width: 600px; display: flex; flex-direction: column; gap: 26px; animation: rise .6s var(--ease) both; }
.hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.15rem; color: var(--on-dark); max-width: 34rem; line-height: 1.6; }
.hero .row { gap: 12px; }
.hero-diagram { flex: 1 1 380px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; animation: rise .7s .1s var(--ease) both; }
.side-box { flex: 1 1 140px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 4px; backdrop-filter: blur(10px); box-shadow: 0 20px 50px -30px rgba(0,0,0,.6); }
.side-box .t { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.side-box .s { font-size: 13px; color: var(--on-dark); }
.side-box .e { font-size: 11px; letter-spacing: .12em; white-space: nowrap; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 700; }
.safe-box { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--gold); font-size: 13px; font-weight: 700; }
.safe-box .ring { width: 96px; height: 96px; border-radius: 999px; background: linear-gradient(145deg, var(--gold-2), var(--gold)); display: flex; align-items: center; justify-content: center; color: var(--gold-ink); position: relative; box-shadow: var(--shadow-gold); }
.safe-box .ring::before, .safe-box .ring::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(233,162,59,.35); animation: pulse 2.8s var(--ease) infinite; }
.safe-box .ring::after { inset: -24px; border-color: rgba(233,162,59,.18); animation-delay: .6s; }
.section { padding-top: 80px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 28px; }
.section h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 44rem; }
.section > .eyebrow + h2 { margin-top: -14px; }
.section-dark { color: #fff; background: linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%); }
.section-dark .section { padding-bottom: 80px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; counter-reset: step; }
.steps li { border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; position: relative; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.steps li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.steps li strong { font-family: var(--display); font-size: 17px; letter-spacing: -.01em; }
.step-n { width: 36px; height: 36px; border-radius: 999px; background: var(--forest); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature { display: flex; gap: 16px; padding: 20px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); transition: background .2s var(--ease), transform .2s var(--ease); }
.feature:hover { background: rgba(255,255,255,.09); transform: translateY(-2px); }
.feature .ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(233,162,59,.14); color: var(--gold); display: flex; align-items: center; justify-content: center; }
.feature strong { font-family: var(--display); font-size: 16px; }
.feature p { color: var(--on-dark); font-size: 15px; }
.golden { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--gold-ink); border-radius: 20px; padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; box-shadow: var(--shadow-gold); }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; }
.site-footer .container { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px; color: var(--muted); }

/* ---------------------------------------------------------------- App shell */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { flex: 1 1 250px; max-width: 280px; background: linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 0 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a, .sidebar form button { min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--on-dark); text-decoration: none; font-weight: 500; display: flex; align-items: center; gap: 12px; font: 500 15px var(--body); position: relative; transition: background .15s var(--ease), color .15s var(--ease); }
.sidebar nav a svg, .sidebar form button svg { opacity: .75; flex-shrink: 0; }
.sidebar nav a:hover, .sidebar form button:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.sidebar nav a.active svg { opacity: 1; color: var(--gold); }
.sidebar nav a.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--gold); }
.sidebar .nav-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); font-weight: 700; padding: 16px 12px 6px; }
.sidebar form { margin-top: 4px; }
.sidebar form button { background: none; border: none; cursor: pointer; text-align: left; width: 100%; }
.sidebar .user-chip { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.sidebar .user-chip .avatar { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--gold-ink); width: 36px; height: 36px; font-size: 14px; }
.sidebar .user-chip strong { display: block; font-size: 14px; line-height: 1.2; }
.sidebar .user-chip span { font-size: 12px; color: var(--on-dark-muted); }
.sidebar .golden-mini { margin-top: auto; background: rgba(233,162,59,.1); border: 1px solid rgba(233,162,59,.25); border-radius: 16px; padding: 16px; font-size: 14px; color: var(--on-dark); line-height: 1.45; }
.sidebar .golden-mini strong { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.main { flex: 999 1 560px; min-width: 0; padding: 36px clamp(16px, 3.5vw, 48px) 64px; display: flex; flex-direction: column; gap: 24px; animation: rise .4s var(--ease) both; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.page-head h1 { font-size: 32px; }
.narrow { max-width: 560px; width: 100%; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--forest); }

/* Stat cards (board) */
.stat { position: relative; }
.stat .amount { margin-top: 2px; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat-label .ic { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); color: var(--forest); }
.stat-label.gold .ic { background: var(--gold-tint); color: var(--gold-text); }
.stat-label.mu .ic { background: var(--mu-tint); color: var(--mu-ink); }

/* Offers table */
.table-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; box-shadow: var(--shadow-sm); }
table.offers { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
table.offers th { text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #FAFBFA; }
table.offers td { padding: 16px 20px; border-bottom: 1px solid #EEF1EF; vertical-align: middle; font-variant-numeric: tabular-nums; }
table.offers tbody tr { transition: background .15s var(--ease); }
table.offers tbody tr:hover { background: #FAFBFA; }
table.offers tr:last-child td { border-bottom: none; }
.member-cell { display: flex; align-items: center; gap: 12px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; }
.timeline .rail { display: flex; flex-direction: column; align-items: center; width: 28px; }
.timeline .dot { width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.timeline .line { width: 2px; flex: 1; min-height: 16px; background: #DCE3DF; }
.timeline .body { flex: 1; padding-bottom: 16px; display: flex; flex-direction: column; }
.timeline .done .dot { background: var(--forest); color: #fff; }
.timeline .done .line { background: var(--forest); }
.timeline .now .dot { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 5px rgba(233,162,59,.22); }
.timeline .todo .dot { background: #fff; color: var(--muted); border: 2px solid var(--line-strong); }
.timeline .todo .title { color: var(--muted); font-weight: 500; }
.timeline .title { font-weight: 600; }
.timeline li:last-child .line { display: none; }

.kv { display: flex; flex-direction: column; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.kv div:last-child { border-bottom: none; padding-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.amount-stack { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
details.card summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::after { content: "+"; font-size: 20px; color: var(--muted); }
details.card[open] summary::after { content: "−"; }

/* ---------------------------------------------------------------- Auth pages */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-side { flex: 1 1 380px; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden;
  background: radial-gradient(700px 400px at 100% 0%, rgba(233,162,59,.2), transparent 60%), linear-gradient(160deg, var(--forest-2), var(--forest-deep)); }
.auth-side h1 { font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -.03em; }
.auth-side h1 span { color: var(--gold); }
.auth-side .points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-side .points li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-dark); font-size: 15px; }
.auth-side .points .ic { width: 28px; height: 28px; border-radius: 8px; background: rgba(233,162,59,.16); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-main { flex: 2 1 420px; padding: 56px clamp(16px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: 24px; animation: rise .5s var(--ease) both; }
.auth-main .narrow { margin: 0 auto; }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 760px) {
  .sidebar { position: static; height: auto; max-width: none; padding: 14px 16px; gap: 12px; flex-basis: 100%; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .sidebar nav a, .sidebar form button { min-height: 38px; padding: 0 10px; font-size: 14px; gap: 8px; }
  .sidebar nav a.active::before { display: none; }
  .sidebar form { margin: 0; width: auto; }
  .sidebar form button { width: auto; }
  .sidebar .golden-mini, .sidebar .nav-label, .sidebar .user-chip { display: none; }
  .main { padding-top: 24px; }
  .page-head h1 { font-size: 26px; }
  .auth-side { padding: 28px 16px; gap: 20px; }
  .auth-side .points { display: none; }
  .auth-main { padding-top: 32px; }
  .container { padding: 0 16px; }
  .hero { padding-top: 36px; padding-bottom: 56px; gap: 36px; }
  .section { padding-top: 56px; }
  .amount { font-size: 28px; }
}

/* ---------------------------------------------------------------- Visuals & motion */
/* Scroll reveals (only when JS is running, so content is never hidden without it) */
html.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
html.js [data-reveal].in { opacity: 1; transform: none; }
html.js [data-stagger] > * { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
html.js [data-stagger].in > * { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s, 0s; }
html.js [data-stagger].in > *:hover { transition-delay: 0s; }

/* Floating coins in the hero and auth panel */
.coins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.coin { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; font: 700 13px var(--display); color: var(--gold-ink);
  background: radial-gradient(circle at 30% 30%, #FBD58A, var(--gold) 60%, #C9842A); box-shadow: 0 10px 24px -8px rgba(0,0,0,.5), inset 0 0 0 3px rgba(255,255,255,.18); opacity: .9; animation: float 7s ease-in-out infinite; }
.coin.mu { background: radial-gradient(circle at 30% 30%, #9FC3F5, #4A7FD0 60%, #2B5AA6); color: #fff; }
.coin-1 { top: 11%; left: 50%; animation-delay: 0s; }
.coin-2 { top: 86%; left: 44%; width: 32px; height: 32px; font-size: 11px; animation-delay: -2.5s; animation-duration: 8s; }
.coin-3 { top: 16%; right: 3%; width: 36px; height: 36px; font-size: 12px; animation-delay: -4s; animation-duration: 9s; }
.coin-4 { top: 84%; right: 4%; animation-delay: -1.2s; animation-duration: 7.5s; }
.hero, .auth-side > * { position: relative; z-index: 1; }

/* Money-flow illustration */
.flow { flex: 1.3 1 480px; display: flex; align-items: center; gap: 2px; position: relative; padding: 28px 0; }
.flow::before { content: ""; position: absolute; inset: 10% 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(233,162,59,.18), transparent); filter: blur(10px); z-index: -1; }
.flow .side-box { flex: 1 1 170px; min-width: 0; padding: 20px 18px; animation: rise .7s var(--ease) both; }
.flow .side-box:last-child { animation-delay: .25s; }
.flow .safe-box { flex: 0 0 auto; animation: rise .7s .12s var(--ease) both; }
.flow-link { flex: 0 1 70px; min-width: 28px; height: 44px; overflow: visible; }
.flow-link .track { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 2; }
.flow-link .dash { fill: none; stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 9; stroke-linecap: round; animation: dash 1.1s linear infinite; opacity: .9; }
.flow-link .dot { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.flow-link.rev .dash { animation-direction: reverse; }
.side-box .icon-tile { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.side-box.mu .icon-tile { background: rgba(74,127,208,.22); color: #9FC3F5; }
.side-box.zw .icon-tile { background: rgba(28,106,72,.5); color: #8FE0B5; }
.side-box .chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 600; color: var(--on-dark); white-space: nowrap; align-self: flex-start; }
.side-box .chip i { width: 6px; height: 6px; border-radius: 50%; background: #8FE0B5; box-shadow: 0 0 0 0 rgba(143,224,181,.7); animation: blip 1.8s ease-out infinite; }

/* Icon tiles on landing cards */
.card-icon { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; transition: transform .25s var(--ease); }
.card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.card-icon.danger { background: var(--danger-tint); color: var(--danger); }
.card-icon.forest { background: var(--zw-tint); color: var(--zw-ink); }
.card-icon.gold { background: var(--gold-tint); color: var(--gold-text); }
.grid-cards .card { transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.grid-cards .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* Steps: number pop + connector arrows between cards */
.steps li { overflow: visible; }
.steps li .step-n { transition: transform .3s var(--ease); }
.steps li:hover .step-n { transform: scale(1.12) rotate(-8deg); }
@media (min-width: 1100px) {
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 34px; right: -16px; width: 18px; height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--gold)); }
  .steps li:not(:last-child)::before { content: ""; position: absolute; top: 30px; right: -17px; width: 8px; height: 8px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); transform: rotate(45deg); z-index: 1; }
}

/* Dark section glow orbs */
.section-dark { position: relative; overflow: hidden; }
.section-dark::before, .section-dark::after { content: ""; position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; opacity: .5; }
.section-dark::before { width: 520px; height: 520px; background: rgba(233,162,59,.22); top: -200px; right: -120px; animation: drift 18s ease-in-out infinite; }
.section-dark::after { width: 420px; height: 420px; background: rgba(31,92,72,.9); bottom: -200px; left: -100px; animation: drift 22s ease-in-out infinite reverse; }
.section-dark .section { position: relative; z-index: 1; }

/* Buttons: shine sweep on the gold CTA */
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%); transform: translateX(-130%); transition: transform .7s var(--ease); pointer-events: none; }
.btn-gold:hover::after { transform: translateX(130%); }

/* Timeline: pulsing current step, drawn-in rail */
.timeline .dot { position: relative; }
.timeline .now .dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(233,162,59,.55); animation: pulse 2s var(--ease) infinite; }
.timeline .done .line { background: linear-gradient(180deg, var(--forest), var(--forest-3)); }

/* Golden rule banner: slow sheen */
.golden { position: relative; overflow: hidden; }
.golden::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.28) 50%, transparent 60%); transform: translateX(-130%); animation: sheen 6s var(--ease) infinite; }

/* Auth side: lock illustration */
.auth-lock { display: flex; justify-content: center; }
.auth-lock .ring { width: 88px; height: 88px; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(6deg); } }
@keyframes dash { to { stroke-dashoffset: -14; } }
@keyframes blip { 0% { box-shadow: 0 0 0 0 rgba(143,224,181,.7); } 100% { box-shadow: 0 0 0 8px rgba(143,224,181,0); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-60px, 40px); } }
@keyframes sheen { 0%, 60% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

@media (max-width: 760px) {
  .flow { flex-direction: column; gap: 10px; padding: 12px 0; }
  .flow .side-box { width: 100%; flex-basis: auto; }
  .flow-link { transform: rotate(90deg); height: 44px; width: 60px; flex-basis: 60px; }
  .coin-1 { top: 58%; left: 6%; }
  .coin-2 { top: 72%; left: 80%; }
  .coin-3 { top: 34%; }
  .coin-4 { display: none; }
  .steps li:not(:last-child)::after, .steps li:not(:last-child)::before { display: none; }
}

@media (max-width: 1200px) { .site-header .coin-4 { display: none; } }
