/* ═══════════════════════════════════════════════════════════════════
   TrustDID concept-B design system — shared tokens + components.
   Pages include this first, then their own page-specific <style>.
   Reference pages: / (homepage) and /try/.
   ═══════════════════════════════════════════════════════════════════ */
:root {
    --bg: #05070f;
    --bg-2: #0b0f1e;
    --card: rgba(255,255,255,0.03);
    --line: rgba(255,255,255,0.08);
    --line-2: rgba(255,255,255,0.16);
    --text: #e8ecf8;
    --muted: #8b95b3;
    --dim: #5a6482;
    --cyan: #22d3ee;
    --green: #10b981;
    --amber: #f59e0b;
    --red: #ef4444;
    --violet: #a78bfa;
    --slate: rgba(255,255,255,0.16); /* legacy token kept for try.js renderWait */
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ── Ambient glows: add <div class="glow glow-1"></div> etc. ── */
.glow {
    position: fixed; border-radius: 50%; filter: blur(120px);
    pointer-events: none; z-index: 0; opacity: 0.5;
}
.glow-1 { width: 560px; height: 560px; background: rgba(34,211,238,0.11); top: -180px; left: -140px; }
.glow-2 { width: 480px; height: 480px; background: rgba(16,185,129,0.10); top: 35%; right: -180px; }
.glow-3 { width: 520px; height: 520px; background: rgba(167,139,250,0.08); bottom: -200px; left: 20%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.wrap--narrow { max-width: 860px; }
.wrap--reading { max-width: 720px; }

/* ── Gradient text utilities ── */
.grad-cg { background: linear-gradient(90deg, var(--cyan), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-gc { background: linear-gradient(90deg, var(--green), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-ar { background: linear-gradient(90deg, var(--amber), var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-vc { background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Type helpers ── */
.eyebrow {
    display: inline-block; font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
    border: 1px solid rgba(34,211,238,0.3); border-radius: 999px;
    padding: 8px 18px; margin-bottom: 30px;
}
.eyebrow--green { color: var(--green); border-color: rgba(16,185,129,0.35); }
.eyebrow--amber { color: var(--amber); border-color: rgba(245,158,11,0.4); }

/* ── Buttons ── */
.btn-primary {
    display: inline-block;
    font-family: var(--font-head); font-weight: 600; font-size: 1.02rem;
    color: #05070f; text-decoration: none;
    background: linear-gradient(135deg, var(--green), #059669);
    padding: 17px 34px; border-radius: 12px; border: none; cursor: pointer;
    box-shadow: 0 8px 40px rgba(16,185,129,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 50px rgba(16,185,129,0.5); }
.btn-ghost {
    display: inline-block;
    font-family: var(--font-head); font-weight: 600; font-size: 1.02rem;
    color: var(--text); text-decoration: none;
    border: 1px solid var(--line-2); padding: 17px 30px; border-radius: 12px;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { border-color: var(--cyan); background: rgba(34,211,238,0.06); }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Top bar (markup injected by topbar.js) ── */
/* The bar's wrapper must stack above the page-content .wrap (both are
   position:relative siblings), or dropdown panels paint underneath.
   Pinned at (0,2,0) below, with the bar's other geometry -- see there. */
/* Burger switches at 1020px, not 900: the French nav needs ~1000px of bar
   and would otherwise wrap to two rows in the 900-1000 band.

   The bar spans its own width, not the page's reading column: pages are free
   to narrow .wrap for prose (/try/ uses 860px) without squeezing the nav.
   .wrap.tb-wrap is (0,2,0) so a page-local .wrap rule cannot override it.

   Every property the bar depends on belongs in THIS rule, not in a bare
   .tb-wrap one. A page that styles .wrap in its own <style> block matches at
   the same (0,1,0) specificity and wins on source order, since the page's
   block comes after this file. max-width was pinned here; z-index and padding
   were not, so /try/'s `.wrap { z-index: 1; padding: 0 24px }` silently
   dropped the bar from 40 to 1 -- putting the Product dropdown *behind* the
   hero -- and shifted the bar's gutter by 4px. */
.wrap.tb-wrap { max-width: 1080px; z-index: 40; padding: 0 28px; }
.tb {
    position: relative; z-index: 5;
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; padding: 22px 0;
}
.tb-brand {
    font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
    letter-spacing: -0.02em; color: var(--text); text-decoration: none; white-space: nowrap;
}
.tb-brand span { color: var(--cyan); }
.tb-links { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.tb-link {
    font-size: 0.88rem; font-weight: 500; color: var(--muted);
    text-decoration: none; padding: 9px 13px; border-radius: 8px;
    background: none; border: none; cursor: pointer; font-family: var(--font-body);
}
.tb-link:hover, .tb-link.active { color: var(--text); }
.tb-link.active { background: rgba(255,255,255,0.05); }
.tb-try {
    color: var(--green); border: 1px solid rgba(16,185,129,0.35);
    background: rgba(16,185,129,0.07); margin-right: 4px;
}
.tb-try:hover { color: var(--green); background: rgba(16,185,129,0.14); }
.tb-cta {
    font-family: var(--font-head); font-size: 0.88rem; font-weight: 600;
    color: #05070f; text-decoration: none; white-space: nowrap;
    background: linear-gradient(135deg, var(--green), #059669);
    padding: 10px 18px; border-radius: 8px; margin-left: 6px;
}
.tb-lang {
    display: inline-flex; margin-left: 10px; align-self: center;
    border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden;
}
.tb-lang .lang-btn {
    font-family: var(--font-head); font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.06em; padding: 6px 10px; cursor: pointer;
    background: transparent; color: var(--muted); border: none;
    transition: color 0.2s ease, background 0.2s ease;
}
.tb-lang .lang-btn + .lang-btn { border-left: 1px solid var(--line-2); }
.tb-lang .lang-btn:hover { color: var(--cyan); background: rgba(34,211,238,0.08); }
.tb-lang .lang-btn.active { color: #05070f; background: var(--cyan); }

.tb-group { position: relative; }
.tb-group .chev { font-size: 0.7em; color: var(--dim); }
.tb-panel {
    display: none; position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 240px; background: var(--bg-2);
    border: 1px solid var(--line-2); border-radius: 14px;
    padding: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.55); z-index: 50;
}
.tb-group.open .tb-panel { display: block; }
.tb-panel a {
    display: block; text-decoration: none; padding: 9px 12px; border-radius: 9px;
}
.tb-panel a:hover { background: rgba(255,255,255,0.05); }
.tb-panel a.active { background: rgba(34,211,238,0.08); }
.tb-panel .ti { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.tb-panel .ts { font-size: 0.76rem; color: var(--dim); }
.tb-burger {
    display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px;
    color: var(--text); font-size: 1.1rem; padding: 6px 12px; cursor: pointer;
}
@media (max-width: 1020px) {
    .tb-burger { display: block; }
    .tb-links {
        display: none; position: absolute; top: calc(100% + 6px); right: 0; left: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px;
        padding: 12px; z-index: 50; box-shadow: 0 20px 60px rgba(0,0,0,0.55);
    }
    .tb-links.open { display: flex; }
    .tb-link { text-align: left; }
    .tb-panel { position: static; box-shadow: none; border: none; background: rgba(0,0,0,0.25);
        margin: 2px 0 6px; }
    .tb-cta { margin: 8px 0 0; text-align: center; }
    .tb-lang { margin: 10px auto 0; }
}

/* ── Footer (markup injected by topbar.js) ── */
.site-foot {
    border-top: 1px solid var(--line); padding: 30px 0 50px; margin-top: 20px;
    text-align: center; color: var(--dim); font-size: 0.82rem;
    position: relative; z-index: 1;
}
.site-foot a { color: var(--dim); }
.site-foot a:hover { color: var(--muted); }

/* ── Motion ── */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.rise   { animation: rise 0.9s ease both; }
.rise-1 { animation: rise 0.9s ease 0.1s both; }
.rise-2 { animation: rise 0.9s ease 0.2s both; }
.rise-3 { animation: rise 0.9s ease 0.3s both; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Product screenshots. A dark frame and a caption, so a real terminal or menu
   reads as evidence rather than decoration. Terminal shots fill the column;
   the context-menu crop is 342px wide and must not be upscaled. */
.shot { margin: 26px 0; }
.shot img {
    display: block; width: 100%; height: auto; background: #000;
    border: 1px solid var(--line-2); border-radius: 12px;
}
.shot figcaption { font-size: 0.84rem; color: var(--muted); margin-top: 10px; line-height: 1.55; }
.shot--menu img { width: auto; max-width: 100%; }
.shot--tight { margin: 14px 0 0; }
.shot--tight figcaption { font-size: 0.78rem; margin-top: 6px; }
