/* CommunitySetu website. Brand colours mirror docs/design-system.md (the app's palette and type).
   No inline styles or scripts: _headers sets a strict Content-Security-Policy. */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/Poppins-Regular.ttf) format("truetype"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/Poppins-Medium.ttf) format("truetype"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/Poppins-SemiBold.ttf) format("truetype"); }

:root {
  --primary: #2563D9; --primary-ink: #1D4FB0; --primary-soft: #E8EFFD; --on-primary: #FFFFFF;
  --secondary: #2A9D8F; --secondary-soft: #E1F3F0; --secondary-ink: #1F6F66;
  --success: #1E6B43; --success-soft: #E6F4EC; --warning: #8A5A0B; --warning-soft: #FDF3E1;
  --purple: #6A3FCB; --purple-soft: #EFEAFD; --rose: #B4235A; --rose-soft: #FDEBF2;
  --background: #FBFBFD; --surface: #FFFFFF; --surface-2: #F4F5F8; --outline: #E6E8EE;
  --text: #0F172A; --text-2: #556070; --text-3: #8A93A3;
  /* Dark brand surfaces (header, hero, CTA) stay dark in both themes. */
  --ink: #0A1020; --ink-2: #111A2E; --ink-line: rgb(255 255 255 / .08);
  --on-ink: #F3F6FB; --on-ink-2: #A9B4C8;
  --grad: linear-gradient(100deg, #8FB4FF 0%, #6FD3C5 100%);
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 12px 32px -8px rgb(15 23 42 / .10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #7EA6F7; --primary-ink: #A9C4FA; --primary-soft: #18233A; --on-primary: #0A1020;
    --secondary: #5CC2B5; --secondary-soft: #142B29; --secondary-ink: #7FD1C6;
    --success: #7FD1A3; --success-soft: #142B20; --warning: #F2C46D; --warning-soft: #2E2513;
    --purple: #C4A8FF; --purple-soft: #241D38; --rose: #F49BBE; --rose-soft: #331A25;
    --background: #0B0F17; --surface: #121823; --surface-2: #171E2B; --outline: #232B3A;
    --text: #E9EDF3; --text-2: #A1ABBB; --text-3: #6F7A8C;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--background); color: var(--text);
  font: 400 16px/1.6 Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-ink); }
:focus-visible { outline: 2px solid #8FB4FF; outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; color: var(--on-ink);
  background: rgb(10 16 32 / .96); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--ink-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.brand span { color: #6FD3C5; }
.brand .wm { color: inherit; }
.brand .wm span { color: #6FD3C5; }
.brand:hover { color: #fff; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { color: var(--on-ink-2); text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.nav-links a:not(.btn):hover { color: #fff; background: rgb(255 255 255 / .06); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }
@media (max-width: 400px) { .brand { font-size: 15px; gap: 8px; } .brand img { width: 28px; height: 28px; } .nav .btn-sm { padding: 7px 10px; font-size: 13px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px;
  border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 14px; border-radius: 10px; }
.btn-primary { background: #2563D9; color: #fff; box-shadow: 0 8px 24px -8px rgb(37 99 217 / .7), inset 0 1px 0 rgb(255 255 255 / .15); }
.btn-primary:hover { background: #2F6EE6; color: #fff; }
.btn-ghost { color: var(--on-ink); border-color: rgb(255 255 255 / .16); background: rgb(255 255 255 / .03); }
.btn-ghost:hover { background: rgb(255 255 255 / .08); color: #fff; }
.btn-light { background: #fff; color: #0A1020; }
.btn-light:hover { background: #EEF3FF; color: #0A1020; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-ink); background: var(--ink);
  background-image:
    radial-gradient(700px 420px at 12% -10%, rgb(37 99 217 / .45), transparent 60%),
    radial-gradient(520px 380px at 95% 20%, rgb(42 157 143 / .28), transparent 60%),
    radial-gradient(600px 300px at 60% 120%, rgb(106 63 203 / .22), transparent 60%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--ink-line) 1px, transparent 1px), linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 72px 0 96px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; padding: 48px 0 72px; gap: 40px; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--on-ink-2); background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1); margin-bottom: 22px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #6FD3C5; box-shadow: 0 0 0 4px rgb(111 211 197 / .18); }
.hero h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.06; letter-spacing: -0.035em; margin: 0 0 20px; font-weight: 600; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(16px, 2vw, 18px); color: var(--on-ink-2); margin: 0 0 32px; max-width: 560px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--on-ink-2); }
.checks li { display: flex; align-items: center; gap: 8px; }
.checks svg { width: 16px; height: 16px; color: #6FD3C5; flex: none; }

/* Phone mock-up (pure HTML/CSS; always light, like the app) */
.device { position: relative; justify-self: center; }
.device::before {
  content: ""; position: absolute; inset: 10% -12% -6% -12%; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(37 99 217 / .5), transparent); filter: blur(30px); z-index: 0;
}
.phone {
  position: relative; z-index: 1; width: 300px; border-radius: 44px; padding: 10px; background: #1B2233;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 40px 80px -20px rgb(0 0 0 / .6); transform: rotate(-2deg);
}
.screen { border-radius: 34px; background: #F4F6FA; color: #0F172A; padding: 14px 14px 18px; overflow: hidden; font-size: 12px; line-height: 1.45; }
.notch { width: 96px; height: 24px; border-radius: 14px; background: #1B2233; margin: 0 auto 12px; }
.app-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.app-top small { display: block; color: #6B7586; font-size: 11px; }
.app-top b { font-size: 15px; font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #2563D9, #2A9D8F); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; }
.m-card { background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 2px rgb(15 23 42 / .06); }
.m-bill { background: linear-gradient(135deg, #2563D9, #1D4FB0); color: #fff; }
.m-bill small { color: rgb(255 255 255 / .75); font-size: 11px; }
.m-amount { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 10px; }
.m-btn { display: block; text-align: center; background: #fff; color: #1D4FB0; border-radius: 10px; padding: 7px; font-weight: 600; }
.m-row { display: flex; align-items: center; gap: 10px; }
.m-row + .m-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid #EEF0F4; }
.m-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.m-ic svg { width: 16px; height: 16px; }
.m-row div { flex: 1; min-width: 0; }
.m-row b { display: block; font-weight: 500; font-size: 12px; }
.m-row small { color: #6B7586; font-size: 11px; }
.tag { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag-ok { background: #E6F4EC; color: #1E6B43; }
.tag-wip { background: #FDF3E1; color: #8A5A0B; }
.m-label { font-size: 11px; font-weight: 600; color: #6B7586; text-transform: uppercase; letter-spacing: .06em; margin: 4px 2px 8px; }

/* ---------- Stats strip ---------- */
.stats { position: relative; z-index: 2; margin-top: -40px; }
.stats ul {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stats li { padding: 22px 24px; }
.stats li + li { border-left: 1px solid var(--outline); }
.stats b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.stats span { color: var(--text-2); font-size: 14px; }
@media (max-width: 760px) {
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n+3) { border-top: 1px solid var(--outline); }
}

/* ---------- Sections ---------- */
section.block { padding: 96px 0 0; }
.head { max-width: 640px; margin-bottom: 40px; }
.head.center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--primary); margin: 0 0 12px; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 14px; font-weight: 600; letter-spacing: -0.03em; }
.lead { color: var(--text-2); margin: 0; font-size: 17px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--primary) 30%, var(--outline)); }
.card h3 { font-size: 18px; margin: 18px 0 8px; font-weight: 600; letter-spacing: -0.01em; }
.card p, .card li { color: var(--text-2); font-size: 15px; margin: 0; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card li { position: relative; padding-left: 22px; }
.card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 3px; background: var(--outline); }
.card li + li { margin-top: 8px; }
.role { display: flex; align-items: center; gap: 12px; }
.role h3 { margin: 0; }
.role small { display: block; color: var(--text-3); font-size: 13px; }
.card .role + ul { margin-top: 18px; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.icon svg { width: 22px; height: 22px; }
.t-blue { background: var(--primary-soft); color: var(--primary); }
.t-teal { background: var(--secondary-soft); color: var(--secondary-ink); }
.t-green { background: var(--success-soft); color: var(--success); }
.t-amber { background: var(--warning-soft); color: var(--warning); }
.t-purple { background: var(--purple-soft); color: var(--purple); }
.t-rose { background: var(--rose-soft); color: var(--rose); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); padding: 0; list-style: none; margin: 0; position: relative; }
.steps::before { content: ""; position: absolute; top: 20px; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, var(--outline) 10%, var(--outline) 90%, transparent); }
.steps li { position: relative; text-align: center; padding: 0 8px; }
.steps li::before {
  counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 18px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--outline); color: var(--primary); font-weight: 600; box-shadow: var(--shadow); position: relative;
}
.steps strong { display: block; margin-bottom: 6px; font-weight: 600; }
.steps span { color: var(--text-2); font-size: 15px; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .steps::before { display: none; }
}
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* CTA */
.cta {
  position: relative; overflow: hidden; border-radius: 24px; padding: clamp(32px, 5vw, 56px); color: var(--on-ink); background: var(--ink);
  background-image: radial-gradient(500px 260px at 0% 0%, rgb(37 99 217 / .5), transparent 60%), radial-gradient(420px 260px at 100% 100%, rgb(42 157 143 / .35), transparent 60%);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.cta h2 { margin-bottom: 10px; }
.cta p { margin: 0; color: var(--on-ink-2); max-width: 560px; }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer { margin-top: 96px; border-top: 1px solid var(--outline); padding: 24px 0 32px; color: var(--text-3); font-size: 13px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { width: 22px; height: 22px; }
.foot-links { display: flex; gap: 6px; }
.foot-links a {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--text-3);
  border: 1px solid var(--outline); background: var(--surface); transition: color .15s ease, border-color .15s ease;
}
.foot-links a svg { width: 15px; height: 15px; }
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 40%, var(--outline)); }

/* ---------- Legal pages: small, quiet type ---------- */
.legal { width: min(720px, 100% - 32px); margin: 0 auto; padding: 40px 0 0; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); text-decoration: none; margin-bottom: 24px; }
.back svg { width: 14px; height: 14px; }
.back:hover { color: var(--primary); }
.legal h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); margin: 0 0 4px; line-height: 1.3; }
.legal .meta { font-size: 12px; color: var(--text-3); margin: 0 0 24px; }
.legal .summary { border-left: 2px solid var(--outline); padding: 2px 0 2px 14px; margin: 0 0 28px; }
.legal .summary p { margin: 0; }
.legal h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--text); margin: 32px 0 6px; line-height: 1.4; }
.legal h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 18px 0 4px; }
.legal p { margin: 0 0 10px; }
.legal ul { padding-left: 18px; margin: 0 0 10px; }
.legal li + li { margin-top: 4px; }
.legal strong { font-weight: 500; color: var(--text); }
.legal a { color: var(--text-2); }
.legal a:hover { color: var(--primary); }
.table-wrap { overflow-x: auto; margin: 6px 0 10px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 13px; }
.legal th, .legal td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--outline); vertical-align: top; }
.legal th { font-weight: 500; color: var(--text); }

/* 404 */
.notfound { min-height: calc(100vh - 64px); display: grid; place-items: center; text-align: center; padding: 48px 0; }
.notfound h1 { font-size: clamp(32px, 6vw, 48px); letter-spacing: -0.03em; margin: 12px 0 8px; font-weight: 600; }
.notfound p { color: var(--on-ink-2); margin: 0 0 24px; }
.notfound .code { font-size: 13px; font-weight: 600; color: #6FD3C5; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .card { transition: none; } .btn:hover, .card:hover { transform: none; } }
