/* Solavia public site styles (built on brand tokens; no external fonts or CDN).
 * Depends on assets/tokens.css. Layout for the public site (not the product portal).
 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.65; }
a { color: var(--accent, #C2410C); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -56px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 10px; transition: top .16s ease; }
.skip-link:focus { top: 8px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,251,245,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(120%) blur(6px); }
.site-header .inner { max-width: 1200px; margin: 0 auto; padding: 10px clamp(12px,3vw,24px); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: .6px; font-size: 20px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.brand small { font-weight: 500; letter-spacing: 0; color: var(--ink-3); font-size: 12px; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.site-nav a:hover { background: var(--bg-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-btn { min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); border-radius: 10px; font: inherit; font-size: 14px; cursor: pointer; }
.lang-btn:hover { border-color: var(--accent, #C2410C); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--accent, #C2410C); background: var(--accent, #C2410C); color: #fff; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--line-strong); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn:hover { filter: brightness(1.05); }
@media (max-width: 640px) { .site-nav { order: 3; flex: 1 1 100%; margin-left: 0; } .site-nav a { min-height: 44px; } }

/* ---------- Layout and type ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(12px,3vw,24px); }
section.block { padding: clamp(28px,5vw,56px) 0; }
section.block.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h1 { font-size: clamp(28px,4vw,44px); line-height: 1.22; margin: 0 0 12px; letter-spacing: -.2px; }
h2 { font-size: clamp(22px,2.6vw,30px); line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lead { font-size: clamp(17px,1.6vw,20px); color: var(--ink-2); max-width: 900px; }
.eyebrow { color: var(--ink-3); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 8px; }
.muted { color: var(--ink-2); }
.caption { color: var(--ink-3); font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 980px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.card h3 { color: var(--ink); }
.card p:last-child { margin-bottom: 0; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }

/* ---------- Chips and status ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); max-width: 100%; }
.chip.sandbox { background: var(--sim-weak); border-color: #D9CCF2; color: var(--sim); }
.chip.design { background: var(--brand-weak); border-color: #FFD3C2; color: #9A3B12; }
.chip.partner { background: var(--warn-weak); border-color: #E7C98A; color: var(--warn); }
.chip.trust { background: var(--trust-weak); border-color: #A9D8C0; color: var(--trust); }
.status-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px,5vw,64px) 0 8px; }
.hero .statement { font-size: clamp(20px,2.6vw,28px); line-height: 1.45; color: var(--ink); border-left: 4px solid var(--brand); padding-left: 16px; margin: 16px 0; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Architecture and proof ---------- */
.layer { display: grid; grid-template-columns: 120px 1fr; gap: 14px; border-top: 1px solid var(--line); padding: 14px 0; }
.layer:last-child { border-bottom: 1px solid var(--line); }
.layer .name { font-weight: 700; }
.layer .who { color: var(--ink-3); font-size: 13px; }
.layer.us { background: var(--brand-weak); border-radius: 10px; padding: 14px; border-top: 0; }
@media (max-width: 640px) { .layer { grid-template-columns: 1fr; } }
.proof { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
@media (max-width: 980px) { .proof { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .proof { grid-template-columns: 1fr; } }
.proof .n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 8px; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--ink-2); background: var(--bg-2); white-space: nowrap; font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 680px) { .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .table-cards tbody tr { display: block; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; padding: 8px; } .table-cards tbody td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 8px; white-space: normal; } .table-cards tbody td::before { content: attr(data-label); color: var(--ink-2); font-weight: 600; font-size: 12px; } }

/* ---------- Notices and boundaries ---------- */
.notice { border: 1px solid #FFD3C2; background: var(--brand-weak); color: #7A2E0E; border-radius: 10px; padding: 12px 16px; font-size: 14px; }
.notice.sandbox { border-color: #D9CCF2; background: var(--sim-weak); color: #4A3587; }
.notice.trust { border-color: #A9D8C0; background: var(--trust-weak); color: #0B5D52; }
.notice.warn { border-color: #E7C98A; background: var(--warn-weak); color: var(--warn); }
.boundary-strip { background: var(--ink); color: #F3EDE3; font-size: 13px; }
.boundary-strip .wrap { padding-top: 8px; padding-bottom: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.boundary-strip a { color: #FFD9C7; }
.boundary-strip .sep { opacity: .5; }

/* ---------- Sandbox page ---------- */
.steps { counter-reset: step; display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
pre { margin: 8px 0; padding: 12px 14px; background: #0F1A24; color: #DCE6F0; border-radius: 10px; font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
code { font-family: var(--font-mono); font-size: .92em; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; background: var(--ink); color: #E8E2D6; }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 28px clamp(12px,3vw,24px) 20px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 20px; }
.site-footer a { color: #F7E7DA; }
.site-footer h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .8px; text-transform: uppercase; color: #C9BFAE; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.site-footer li { margin: 4px 0; }
.site-footer .base { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.18); padding-top: 12px; font-size: 12px; color: #BDB4A6; display: flex; flex-wrap: wrap; gap: 8px 16px; }
@media (max-width: 860px) { .site-footer .inner { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ---------- Misc ---------- */
.page-head { padding: clamp(24px,4vw,44px) 0 8px; }
.page-head .sub { color: var(--ink-2); max-width: 900px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.toc a { font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-2); background: var(--card); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; }
.kv div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kv b { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.breadcrumbs { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }
.error-404 { text-align: center; padding: 60px 0; }
.error-404 .code { font-size: clamp(56px,10vw,120px); font-weight: 700; color: var(--brand); line-height: 1; }
