/* Microcosim Ltd: shared site styles. Brand: navy #13294B, bordeaux #641B2E, Sora. */
:root {
  --navy: #13294B; --navy-2: #1E3A66; --bordeaux: #641B2E; --rose: #B04A63;
  --steel: #5B7FA8; --sand: #C9A66B; --sage: #5E8C7A;
  --bg: #F6F7F9; --surface: #FFFFFF; --ink: #13294B; --text: #26334A; --muted: #5E6B80;
  --line: #DDE2EA; --tint: #EEF2F7; --accent: var(--bordeaux); --accent-ink: #FFFFFF;
  --hero-from: #13294B; --hero-to: #0C1B33;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1526; --surface: #12203A; --ink: #E8EDF5; --text: #CBD4E2; --muted: #93A1B7;
    --line: #253655; --tint: #172947; --accent: #C96A82; --accent-ink: #0B1526;
    --hero-from: #0F2140; --hero-to: #081120; --steel: #7FA2CB; --rose: #D27A90;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1526; --surface: #12203A; --ink: #E8EDF5; --text: #CBD4E2; --muted: #93A1B7;
  --line: #253655; --tint: #172947; --accent: #C96A82; --accent-ink: #0B1526;
  --hero-from: #0F2140; --hero-to: #081120; --steel: #7FA2CB; --rose: #D27A90;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: hidden; }
h1, h2, h3, .display { font-family: "Sora", system-ui, sans-serif; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.2vw, 50px); line-height: 1.06; font-weight: 700; margin: 0 0 18px; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; font-weight: 700; margin: 0 0 14px; text-wrap: balance; }
h3 { font-size: 19px; line-height: 1.3; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 14px; }
a { color: var(--accent); }
img, svg { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.kicker { font: 600 12px/1 "Sora", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }

/* Header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
             backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 80px; }
.brand { display: flex; align-items: center; }
.brand img { height: 44px; width: auto; display: block; }
@media (max-width: 560px) { .brand img { height: 36px; } }
.brand .rev { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .pos { display: none; } :root:not([data-theme="light"]) .brand .rev { display: block; } }
:root[data-theme="dark"] .brand .pos { display: none; } :root[data-theme="dark"] .brand .rev { display: block; }
nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 15px; }
nav a:hover { background: var(--tint); }
nav a[aria-current="page"] { color: var(--ink); background: var(--tint); }
@media (max-width: 560px) {
  .site-head .wrap { height: auto; padding-block: 10px; flex-wrap: wrap; }
  nav { width: 100%; } nav ul { justify-content: space-between; } nav a { padding: 6px 7px; font-size: 13.5px; white-space: nowrap; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600;
       text-decoration: none; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn:hover { filter: brightness(1.08); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Hero (always dark) */
.hero { background: radial-gradient(ellipse at 85% 110%, rgba(100,27,46,.55), transparent 55%),
                    linear-gradient(160deg, var(--hero-from), var(--hero-to)); color: #DCE4F0; overflow: hidden; }
.hero h1, .hero h2 { color: #FFFFFF; }
.hero .kicker { color: #E79AAD; }
.hero .lede { color: #B8C5D8; }
.hero .btn { background: #FFFFFF; color: var(--navy); }
.hero .btn.ghost { background: transparent; color: #FFFFFF; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-block: 72px 80px; }
.hero.slim .hero-grid { grid-template-columns: 1fr; padding-block: 56px 60px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; padding-block: 48px 56px; gap: 28px; } }

/* Sections */
section.band { padding-block: 72px; }
section.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
@media (max-width: 600px) { section.band { padding-block: 52px; } }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.g5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .g5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .g5 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.alt .card { background: var(--bg); }
.card p:last-child { margin-bottom: 0; }
.card .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px;
            background: var(--tint); color: var(--accent); font: 700 15px "Sora", sans-serif; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } .split.rev > :first-child { order: 0; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 12px; height: 12px; border-radius: 3px;
                    transform: rotate(45deg); background: var(--accent); opacity: .85; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--ink); font-size: 14px; font-weight: 500; }
.cta { text-align: center; }
.cta .lede { margin-inline: auto; }
.cta .actions { justify-content: center; }

/* Animated panels */
.viz { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.hero .viz { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.viz-title { font: 600 13px/1.3 "Sora", sans-serif; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 8px; }
.hero .viz-title { color: #9FB0C8; }
.viz-note { font-size: 14px; color: var(--muted); margin: 10px 0 0; min-height: 2.6em; }
.hero .viz-note { color: #B8C5D8; }

/* 1. Factor mesh */
.mesh svg { width: 100%; height: auto; display: block; overflow: visible; }
.mesh .link { stroke: #8FA6C6; stroke-linecap: round; }
.mesh .link.hot { stroke: #E79AAD; }
.mesh .pulse { fill: #FFFFFF; transition: opacity .3s; }
.mesh .node circle { fill: #1B3358; stroke: #8FA6C6; stroke-width: 1.5; transition: fill .4s, stroke .4s, r .4s; }
.mesh .node text { fill: #AFC0D8; font: 600 12.5px "Sora", sans-serif; transition: fill .4s; paint-order: stroke; stroke: #11233F; stroke-width: 3px; stroke-linejoin: round; }
.mesh .node.on circle { fill: #641B2E; stroke: #F2B8C6; r: 11px; }
.mesh .node.on text { fill: #FFFFFF; font-size: 14px; }
.mesh .factor { color: #FFFFFF; font: 700 18px "Sora", sans-serif; margin-top: 4px; }

/* Bar charts (elasticity, claims, value) */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; border-bottom: 1px solid var(--line); }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bars .bar { width: 100%; border-radius: 6px 6px 2px 2px; transition: height .9s cubic-bezier(.4,.1,.2,1), background .4s; }
.bars .v { font: 600 12px "Sora", sans-serif; color: var(--ink); white-space: nowrap; }
.bars-labels { display: flex; gap: 10px; margin-top: 6px; }
.bars-labels span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); min-width: 0; }
.row-label { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.price-row { display: flex; gap: 10px; }
.price-row .p { flex: 1; text-align: center; padding: 6px 0; border-radius: 8px; background: var(--tint); font: 600 13px "Sora", sans-serif; color: var(--ink); transition: background .4s, color .4s; min-width: 0; }
.price-row .p.cut { background: var(--accent); color: var(--accent-ink); }

.claims { position: relative; height: 150px; display: flex; align-items: flex-end; gap: 3px; overflow: hidden; border-bottom: 1px solid var(--line); }
.claims .c { flex: 0 0 calc((100% - 3px * 31) / 32); background: var(--steel); border-radius: 3px 3px 0 0; transition: height .35s ease; }
.claims .c.large { background: var(--accent); }
.claims .thr { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--muted); }
.claims .thr span { position: absolute; right: 0; top: -20px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 0 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.gauge { position: relative; height: 22px; border-radius: 999px; overflow: hidden; display: flex; }
.gauge .z1 { background: color-mix(in srgb, var(--accent) 70%, transparent); flex: 0 0 33.3%; }
.gauge .z2 { background: color-mix(in srgb, var(--sand) 60%, transparent); flex: 0 0 16.7%; }
.gauge .z3 { background: color-mix(in srgb, var(--sage) 55%, transparent); flex: 1; }
.gauge-wrap { position: relative; padding-top: 26px; }
.gauge-wrap .mk { position: absolute; top: 0; transform: translateX(-50%); transition: left 1s cubic-bezier(.4,.1,.2,1);
                  font: 700 13px "Sora", sans-serif; color: var(--ink); white-space: nowrap; }
.gauge-wrap .mk::after { content: ""; display: block; width: 2px; height: 30px; background: var(--ink); margin: 2px auto 0; }
.gauge-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.split-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; margin-top: 6px; }
.split-bar div { transition: flex-basis .9s cubic-bezier(.4,.1,.2,1); display: grid; place-items: center; font: 600 11px "Sora", sans-serif; color: #fff; white-space: nowrap; overflow: hidden; }
.flag { display: inline-block; margin-top: 12px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600;
        background: var(--accent); color: var(--accent-ink); opacity: 0; transform: translateY(4px); transition: opacity .4s, transform .4s; }
.flag.show { opacity: 1; transform: none; }

/* Founder */
.founder { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 44px; align-items: start; margin-top: 8px; }
.founder-side { display: grid; gap: 22px; }
.photo { display: block; width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; object-fit: cover;
         border-radius: 20px; background: var(--tint); }
.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14px; color: var(--muted); }
.creds li { padding-left: 12px; border-left: 3px solid var(--accent); line-height: 1.4; }
.creds b { display: block; color: var(--ink); font-weight: 600; }
.bio { max-width: 68ch; }
.bio h2 { margin-top: 0; }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; gap: 28px; } .founder-side { grid-template-columns: 160px 1fr; align-items: start; } }
@media (max-width: 460px) { .founder-side { grid-template-columns: 1fr; } }
.placeholder { color: var(--muted); font-style: italic; }
.word { font: 300 clamp(30px, 5vw, 48px)/1.1 "Sora", sans-serif; color: var(--ink); margin: 0 0 8px; }
.word b { font-weight: 700; color: var(--accent); }

/* Footer */
footer.site-foot { padding-block: 40px calc(36px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 700px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 { font: 600 13px "Sora", sans-serif; color: var(--ink); margin: 0 0 10px; letter-spacing: .04em; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--muted); }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
