/* FoundationWork.org — public site. Tokens from design.md v1.0 */
:root {
  --fw-white: #FFFFFF;
  --fw-ink: #102B56;
  --fw-blue: #0D6EFD;
  --fw-blue-hover: #0958CE;
  --fw-blue-soft: #E6F2FF;
  --fw-gold: #D4AF37;
  --fw-gold-soft: #FFF7DF;
  --fw-canvas: #F7F9FC;
  --fw-border: #E2E8F0;
  --fw-muted: #64748B;
  --fw-text: #1E293B;
  --fw-success: #15803D;
  --fw-success-soft: #EAF7EF;
  --fw-warning: #A16207;
  --fw-warning-soft: #FFF7E6;
  --fw-danger: #B42318;
  --fw-radius-sm: 8px;
  --fw-radius-md: 12px;
  --fw-radius-lg: 16px;
  --fw-shadow-card: 0 3px 14px rgba(16, 43, 86, .05);
  --fw-shadow-lift: 0 18px 48px rgba(16, 43, 86, .12);
  --fw-font: 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 24px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fw-white);
  color: var(--fw-text);
  font-family: var(--fw-font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--fw-blue-hover); }
h1, h2, h3 { color: var(--fw-ink); line-height: 1.3; margin: 0; font-weight: 700; }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.num { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--fw-ink); color: #fff; padding: 8px 14px; border-radius: var(--fw-radius-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid rgba(13, 110, 253, .45); outline-offset: 2px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 18px;
  border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--fw-blue); color: #fff; }
.btn-primary:hover { background: var(--fw-blue-hover); }
.btn-secondary { background: #fff; color: var(--fw-blue-hover); border-color: #B9D3FB; }
.btn-secondary:hover { border-color: var(--fw-blue); background: var(--fw-blue-soft); }

/* Chips & badges */
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.chip-warning { background: var(--fw-warning-soft); color: var(--fw-warning); border: 1px solid #F3DDB0; }
.chip-neutral { background: var(--fw-canvas); color: var(--fw-ink); border: 1px solid var(--fw-border); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-info { background: var(--fw-blue-soft); color: #0B52BF; }
.badge-warning { background: var(--fw-warning-soft); color: var(--fw-warning); }
.badge-success { background: var(--fw-success-soft); color: var(--fw-success); }

.card { background: #fff; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); box-shadow: var(--fw-shadow-card); }

/* Pre-launch notice */
.prelaunch { background: var(--fw-canvas); border-bottom: 1px solid var(--fw-border); font-size: 14px; color: var(--fw-ink); }
.prelaunch-inner { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--fw-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fw-ink); }
.brand img { width: 56px; height: auto; }
.brand-word { font-size: 21px; font-weight: 700; letter-spacing: -.01em; color: var(--fw-ink); }
.brand-org { color: var(--fw-muted); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { color: var(--fw-ink); text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.site-nav a:not(.btn):hover { background: var(--fw-blue-soft); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; align-items: center; gap: 6px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--fw-border); border-radius: 10px; background: #fff; color: var(--fw-ink); font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Shared section */
.section { padding: 88px 0; }
.section-tint { background: var(--fw-canvas); border-top: 1px solid var(--fw-border); border-bottom: 1px solid var(--fw-border); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { margin-top: 6px; }
.section-lead { margin-top: 14px; color: var(--fw-muted); font-size: 17px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--fw-blue-hover); letter-spacing: .02em; }
.note { margin-top: 20px; font-size: 14px; color: var(--fw-muted); padding-left: 12px; border-left: 3px solid var(--fw-border); }

/* Hero */
.hero { padding: 72px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin-top: 10px; letter-spacing: -.01em; }
.accent-underline { background-image: linear-gradient(var(--fw-gold), var(--fw-gold)); background-repeat: no-repeat; background-size: 96px 4px; background-position: 0 100%; padding-bottom: 12px; display: inline-block; }
.lead { margin-top: 22px; font-size: 18px; color: #475569; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; color: var(--fw-ink); font-size: 15px; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points svg { width: 18px; height: 18px; fill: none; stroke: var(--fw-success); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Product preview */
.preview { margin: 0; background: #fff; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-lg); box-shadow: var(--fw-shadow-lift); overflow: hidden; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--fw-canvas); border-bottom: 1px solid var(--fw-border); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #D5DDE8; }
.preview-tag { font-size: 12px; font-weight: 600; color: var(--fw-warning); background: var(--fw-warning-soft); padding: 1px 8px; border-radius: 999px; }
.preview-body { padding: 20px; display: grid; gap: 18px; }
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.preview-title { font-weight: 700; color: var(--fw-ink); font-size: 18px; line-height: 1.3; }
.preview-sub { font-size: 13px; color: var(--fw-muted); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); padding: 10px 12px; display: grid; gap: 2px; }
.kpi-label { font-size: 12.5px; color: var(--fw-muted); line-height: 1.4; }
.kpi-value { font-size: 22px; font-weight: 700; color: var(--fw-ink); line-height: 1.25; }
.preview-label { font-size: 13px; font-weight: 600; color: var(--fw-ink); margin-bottom: 8px; }
.fund-bars { display: grid; gap: 10px; }
.fund-bars li { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 13.5px; }
.fund-name { color: var(--fw-text); line-height: 1.35; }
.fund-name em { display: block; font-style: normal; font-size: 12px; color: var(--fw-muted); }
.bar { height: 8px; background: var(--fw-canvas); border-radius: 999px; overflow: hidden; border: 1px solid var(--fw-border); }
.bar b { display: block; height: 100%; background: linear-gradient(90deg, #1269B8, var(--fw-blue)); border-radius: 999px; }
/* Bar widths live here, not in style="" attributes, so the strict CSP (no 'unsafe-inline') holds */
.bar .w-52 { width: 52%; }
.bar .w-31 { width: 31%; }
.bar .w-17 { width: 17%; }
.fund-bars .num { font-weight: 600; color: var(--fw-ink); text-align: right; min-width: 64px; }
.activity { display: grid; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); overflow: hidden; }
.activity li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 12px; font-size: 13.5px; }
.activity li + li { border-top: 1px solid var(--fw-border); }
.activity .num { font-weight: 600; color: var(--fw-ink); text-align: right; }
.activity .badge { font-size: 12px; }

/* Flow strip */
.flow { padding: 8px 0 72px; }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.flow-steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); background: #fff; }
.flow-steps li:not(:last-child)::after { content: ""; position: absolute; right: -13px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--fw-gold); border-right: 2px solid var(--fw-gold); transform: translateY(-50%) rotate(45deg); }
.step-no { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--fw-blue-soft); color: var(--fw-ink); font-weight: 700; }
.flow-steps strong { color: var(--fw-ink); font-size: 17px; }
.flow-steps p { font-size: 14px; color: var(--fw-muted); line-height: 1.55; margin-top: 2px; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { padding: 24px; display: grid; gap: 10px; align-content: start; }
.feature p { color: #475569; font-size: 15.5px; }
.feature-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--fw-blue-soft); color: var(--fw-blue-hover); margin-bottom: 4px; }
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

/* Transparency */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; }
.split-center { align-items: center; }
.check-list { margin-top: 26px; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 30px; color: #475569; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--fw-success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%2315803D' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.check-list strong { color: var(--fw-ink); display: block; }
.levels { padding: 24px; }
.levels-title { font-weight: 700; color: var(--fw-ink); font-size: 18px; margin-bottom: 18px; }
.level-list { display: grid; gap: 4px; counter-reset: lvl; }
.level-list li { position: relative; padding: 12px 0 12px 22px; border-left: 2px solid var(--fw-border); margin-left: 6px; }
.level-list li::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--fw-blue); }
.level-list p { margin-top: 6px; font-size: 14.5px; color: var(--fw-muted); }
.levels-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--fw-border); font-size: 13.5px; color: var(--fw-muted); }

/* Controls */
.controls-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.control { padding: 22px; border-top: 3px solid var(--fw-ink); }
.control p { margin-top: 8px; font-size: 15px; color: #475569; }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.phase { padding: 24px; display: grid; gap: 10px; align-content: start; }
.phase .chip { justify-self: start; }
.phase p { color: #475569; font-size: 15.5px; }
.phase-current { border-color: #F3DDB0; box-shadow: 0 0 0 3px var(--fw-gold-soft), var(--fw-shadow-card); }

/* Pricing */
.price-card { padding: 28px; display: grid; gap: 16px; }
.price-plan { font-weight: 600; color: var(--fw-muted); }
.price { display: flex; align-items: baseline; gap: 10px; color: var(--fw-ink); line-height: 1; }
.price .num { font-size: 56px; font-weight: 700; }
.price-unit { font-size: 17px; color: var(--fw-muted); font-weight: 500; }
.price-list { display: grid; gap: 8px; padding: 4px 0; }
.price-list li { position: relative; padding-left: 26px; }
.price-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%230958CE' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.price-foot { font-size: 13.5px; color: var(--fw-muted); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--fw-border); border-radius: var(--fw-radius-md); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; color: var(--fw-ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--fw-muted); border-bottom: 2px solid var(--fw-muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 18px; color: #475569; }

/* Contact */
.contact-card { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 40px; background: linear-gradient(180deg, #fff, var(--fw-blue-soft)); }
.contact-copy { max-width: 600px; }
.contact-copy h2 { margin-top: 6px; }
.contact-copy p:last-child { margin-top: 12px; color: #475569; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--fw-border); padding: 40px 0 28px; background: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand p { margin-top: 10px; color: var(--fw-muted); font-size: 14.5px; max-width: 360px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-start; }
.footer-nav a { color: var(--fw-ink); text-decoration: none; font-weight: 500; }
.footer-nav a:hover { text-decoration: underline; }
.footer-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--fw-border); font-size: 13.5px; color: var(--fw-muted); }
.powered { white-space: nowrap; }
.powered a { color: var(--fw-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--fw-border); }
.powered a:hover { color: var(--fw-blue-hover); border-bottom-color: currentColor; }

/* Responsive */
@media (max-width: 1080px) {
  .site-nav a:not(.btn) { padding: 8px 9px; }
  .controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px var(--gutter) 18px; background: #fff; border-bottom: 1px solid var(--fw-border); box-shadow: 0 12px 24px rgba(16, 43, 86, .08); }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 10px; }
  .nav-cta { margin: 8px 0 0; }
  .hero { padding: 48px 0 48px; }
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-steps li:not(:last-child)::after { display: none; }
  .feature-grid, .roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 64px 0; }
  .contact-card { flex-direction: column; align-items: flex-start; padding: 28px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .brand img { width: 46px; }
  .brand-word { font-size: 18px; }
  .nav-toggle span { display: none; }
  .prelaunch-inner { align-items: flex-start; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.55; }
  .lead { font-size: 17px; }
  .cta-row .btn { width: 100%; }
  .flow-steps, .feature-grid, .roadmap, .controls-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-body { padding: 16px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 8px; }
  .kpi-value { font-size: 17px; }
  .fund-bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .fund-bars .bar { grid-column: 1 / -1; grid-row: 2; }
  .activity li { grid-template-columns: minmax(0, 1fr) auto; }
  .activity .badge { grid-column: 1 / -1; justify-self: start; }
  .contact-actions, .contact-actions .btn { width: 100%; }
  .section-head { margin-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .prelaunch, .nav-toggle, .contact-actions { display: none !important; }
  .section, .hero { padding: 24px 0; }
  .card, .preview { box-shadow: none; }
}
