/* =========================================================================
   DeusCoreAI — site stylesheet
   1 tokens · 2 base · 3 layout · 4 components · 5 header/footer
   6 home · 7 product pages · 8 mock UI · 9 illustrations · 10 motion
   ========================================================================= */

/* 1 ─ Tokens ------------------------------------------------------------- */
:root {
    --paper: #F7F7F4;
    --surface: #FFFFFF;
    --surface-2: #F1F1EC;
    --ink: #0E1321;
    --ink-2: #2B3141;
    --muted: #596070;
    --faint: #7D8492;
    --line: #E4E4DD;
    --line-strong: #CDCDC4;

    --brand: #6495ED;          /* DeusCore cornflower */
    --brand-strong: #2F5BD3;
    --brand-soft: #EAF0FD;
    --eng: #FF4F00;            /* engineering practice */
    --eng-strong: #C23C00;
    --eng-soft: #FFEFE6;

    --night: #0B0F1A;
    --night-2: #121829;
    --night-3: #1A2236;
    --night-line: #242D44;
    --night-text: #E8EAF0;
    --night-muted: #9AA3B5;

    --p: var(--brand);
    --p-strong: var(--brand-strong);
    --p-soft: var(--brand-soft);

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --shadow: 0 1px 2px rgba(14, 19, 33, .05), 0 12px 32px -14px rgba(14, 19, 33, .18);
    --shadow-lg: 0 2px 6px rgba(14, 19, 33, .05), 0 32px 64px -28px rgba(14, 19, 33, .3);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --header-h: 68px;
    --section-y: clamp(72px, 9vw, 128px);
}

/* Product and practice themes: every page and card picks one. */
[data-theme="ent"] { --p: #6495ED; --p-strong: #2F5BD3; --p-soft: #EAF0FD; }
[data-theme="eng"] { --p: #FF4F00; --p-strong: #C23C00; --p-soft: #FFEFE6; }
[data-theme="kg"]  { --p: #10B981; --p-strong: #047857; --p-soft: #E6F7F0; }
[data-theme="bc"]  { --p: #E5487A; --p-strong: #BE185D; --p-soft: #FDEBF1; }
[data-theme="jm"]  { --p: #7C5CFF; --p-strong: #5B3FD9; --p-soft: #EFEBFF; }

/* 2 ─ Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--p-strong); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--p) 25%, transparent); }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: fixed; left: 16px; top: -60px; z-index: 200;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
    text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* Type scale */
.h1 { font-size: clamp(2.6rem, 5.2vw + .6rem, 5.25rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; }
.h2 { font-size: clamp(2rem, 2.4vw + 1.1rem, 3.25rem); font-weight: 700; letter-spacing: -.037em; line-height: 1.08; }
.h3 { font-size: clamp(1.5rem, 1vw + 1.1rem, 2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.h4 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.3; }
.lede { font-size: clamp(1.0625rem, .35vw + 1rem, 1.25rem); line-height: 1.65; color: var(--muted); max-width: 62ch; }
.body { color: var(--muted); }
.mono { font-family: var(--mono); }
.accent { color: var(--p-strong); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: .75rem; font-weight: 500;
    letter-spacing: .12em; text-transform: uppercase; color: var(--p-strong);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.section--night .eyebrow, .band .eyebrow { color: color-mix(in srgb, var(--p) 70%, #fff); }

/* 3 ─ Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 640px) { .container { padding-inline: 16px; } }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }
.section--line { border-top: 1px solid var(--line); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
.section--night { background: var(--night); color: var(--night-text); }
.section--night .h2, .section--night .h3, .section--night .h4 { color: #fff; }
.section--night .lede, .section--night .body { color: var(--night-muted); }

.section-head { display: grid; gap: 18px; max-width: 780px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head--split { max-width: none; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 20px 64px; }
.section-head--split .lede { justify-self: end; }
@media (max-width: 860px) {
    .section-head--split { grid-template-columns: 1fr; }
    .section-head--split .lede { justify-self: start; }
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px)  { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* 4 ─ Components --------------------------------------------------------- */
.btn {
    --bg: var(--ink); --fg: #fff; --bd: transparent;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 48px; padding: 0 22px; border-radius: 999px;
    background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
    font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap;
    cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(14, 19, 33, .45); }
.btn:active { transform: translateY(0); }
.btn--accent { --bg: var(--p-strong); }
.btn--accent:hover { box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--p-strong) 70%, transparent); }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line-strong); }
.btn--ghost:hover { --bg: var(--surface); box-shadow: none; --bd: var(--ink); }
.btn--light { --bg: #fff; --fg: var(--ink); }
.btn--ghost-light { --bg: transparent; --fg: #fff; --bd: rgba(255, 255, 255, .28); }
.btn--ghost-light:hover { --bd: #fff; box-shadow: none; }
.btn--sm { height: 40px; padding: 0 16px; font-size: .875rem; }
.btn .arrow, .link-arrow .arrow { width: 16px; height: 16px; flex: none; transition: transform .2s var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow, a:hover > .link-arrow .arrow { transform: translateX(3px); }

.link-arrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: .9375rem; color: var(--p-strong); text-decoration: none;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.status {
    display: inline-flex; align-items: center; gap: 8px; flex: none;
    font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
    padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.status--early::before { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }

.tag {
    display: inline-flex; align-items: center; font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted);
}

/* Blueprint frame: registration marks sit just outside each corner. */
.frame { position: relative; }
.frame::after {
    --c: var(--line-strong);
    content: ""; position: absolute; inset: -9px; pointer-events: none;
    background:
        linear-gradient(var(--c) 0 0) 0 0 / 14px 1px, linear-gradient(var(--c) 0 0) 0 0 / 1px 14px,
        linear-gradient(var(--c) 0 0) 100% 0 / 14px 1px, linear-gradient(var(--c) 0 0) 100% 0 / 1px 14px,
        linear-gradient(var(--c) 0 0) 0 100% / 14px 1px, linear-gradient(var(--c) 0 0) 0 100% / 1px 14px,
        linear-gradient(var(--c) 0 0) 100% 100% / 14px 1px, linear-gradient(var(--c) 0 0) 100% 100% / 1px 14px;
    background-repeat: no-repeat;
}
.section--night .frame::after, .band .frame::after { --c: var(--night-line); }

/* Product marks: an ink tile with the product's glyph. */
.pmark { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.pmark--sm { width: 32px; height: 32px; border-radius: 8px; }
.pmark--lg { width: 56px; height: 56px; border-radius: 14px; }

/* Tick lists */
.ticks { display: grid; gap: 12px; margin-top: 24px; }
.ticks li { position: relative; padding-left: 32px; font-size: .9375rem; color: var(--ink-2); line-height: 1.55; }
.ticks li::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--p-soft);
}
.ticks li::after {
    content: ""; position: absolute; left: 7.5px; top: 6.5px; width: 5px; height: 9px;
    border: solid var(--p-strong); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ticks strong { color: var(--ink); font-weight: 600; }
.section--night .ticks li, .band .ticks li { color: var(--night-text); }
.section--night .ticks li::before, .band .ticks li::before { background: color-mix(in srgb, var(--p) 18%, transparent); }
.section--night .ticks li::after, .band .ticks li::after { border-color: var(--p); }
.section--night .ticks strong, .band .ticks strong { color: #fff; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .2s; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
    padding: 20px 24px; font-weight: 600; font-size: 1rem; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; flex: none; width: 12px; height: 12px;
    background: linear-gradient(var(--p-strong) 0 0) center / 12px 2px no-repeat, linear-gradient(var(--p-strong) 0 0) center / 2px 12px no-repeat;
    transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 22px; color: var(--muted); line-height: 1.75; max-width: 70ch; }

/* Forms */
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.input {
    width: 100%; height: 48px; padding: 0 14px; border-radius: 10px;
    background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 128px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
select.input {
    appearance: none; padding-right: 40px; cursor: pointer;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23596070' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center no-repeat;
}
.input::placeholder { color: #9AA0AB; }
.input:focus { outline: none; border-color: var(--p-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 18%, transparent); }
.form .btn { justify-self: start; margin-top: 6px; }
.form-note { font-size: .8125rem; color: var(--faint); }
.hp { position: absolute; left: -9999px; }

/* Contact block */
.contact {
    display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px);
    background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(28px, 5vw, 64px);
}
.contact .ticks { margin-top: 28px; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* 5 ─ Header and footer -------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
/* The blur lives on a pseudo-element, not .site-header itself: backdrop-filter on an
   ancestor becomes the containing block for its position:fixed descendants (the mobile
   menu below), which would size that overlay against the ~68px header instead of the viewport. */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: color-mix(in srgb, var(--paper) 84%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
}
.nav { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark .orbit { transform-origin: 16px 16px; animation: spin 24s linear infinite; }
.brand-name { font-weight: 800; font-size: 1.1875rem; letter-spacing: -.03em; color: var(--ink); }
.brand-name span { color: var(--brand-strong); }

.nav-menu { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nav-list { display: flex; align-items: center; gap: 2px; margin-right: auto; }
.nav-item { position: relative; }
.nav-trigger, .nav-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px;
    background: none; border: 0; cursor: pointer; text-decoration: none;
    font-size: .9375rem; font-weight: 500; color: var(--ink-2); transition: color .2s, background-color .2s;
}
.nav-trigger:hover, .nav-link:hover, .nav-item.is-open > .nav-trigger { color: var(--ink); background: rgba(14, 19, 33, .045); }
.nav-trigger .chev { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.nav-item.is-open > .nav-trigger .chev { transform: rotate(180deg); }

.nav-panel {
    position: absolute; top: calc(100% + 12px); left: 50%; min-width: 320px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
    transition: opacity .18s, transform .18s var(--ease), visibility 0s .18s;
}
.nav-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-item.is-open > .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s, transform .18s var(--ease); }
.no-js .nav-item:focus-within > .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-panel--wide { width: min(760px, calc(100vw - 48px)); }
.panel-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.panel-label { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 10px 12px 6px; }
.panel-link {
    display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none;
    transition: background-color .15s;
}
.panel-link:hover, .panel-link[aria-current="page"] { background: var(--surface-2); }
.panel-link strong { display: block; font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.panel-link small { display: block; font-size: .8125rem; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.panel-icon {
    width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center;
    background: var(--p-soft); color: var(--p-strong);
}
.panel-icon svg { width: 18px; height: 18px; }
.panel-foot {
    display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 14px 12px 8px;
    border-top: 1px solid var(--line); text-decoration: none; font-size: .875rem; font-weight: 600; color: var(--ink);
}
.panel-foot span { color: var(--muted); font-weight: 400; }
.nav-cta { flex: none; }

.nav-toggle {
    display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); cursor: pointer; position: relative;
}
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), top .25s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.menu-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 960px) {
    .nav-toggle { display: block; }
    .nav-menu {
        position: fixed; inset: var(--header-h) 0 0 0; z-index: 99; flex: none;
        flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 20px;
        background: var(--paper); padding: 16px 16px 32px; overflow-y: auto; overscroll-behavior: contain;
        opacity: 0; visibility: hidden; transform: translateY(-8px);
        transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
    }
    .menu-open .nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s var(--ease); }
    .menu-open body { overflow: hidden; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-list > li { border-bottom: 1px solid var(--line); }
    .nav-trigger, .nav-link { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 1.0625rem; font-weight: 600; color: var(--ink); border-radius: 0; }
    .nav-trigger:hover, .nav-link:hover, .nav-item.is-open > .nav-trigger { background: none; }
    .nav-panel, .nav-panel--wide {
        position: static; width: auto; min-width: 0; transform: none; box-shadow: none; border: 0; padding: 0 0 12px;
        background: transparent; display: none; opacity: 1; visibility: visible; transition: none;
    }
    .nav-item.is-open > .nav-panel { display: block; transform: none; }
    .panel-cols { grid-template-columns: 1fr; }
    .panel-label { padding-left: 4px; }
    .panel-link { padding: 10px 4px; }
    .nav-cta { width: 100%; height: 52px; }
}

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 88px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 56px; }
.footer-brand p { margin-top: 16px; color: var(--muted); font-size: .9375rem; max-width: 34ch; line-height: 1.65; }
.footer-col h2 { font-family: var(--mono); font-size: .6875rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; transition: color .15s; }
.footer-col a:hover { color: var(--brand-strong); }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px;
    border-top: 1px solid var(--line); font-size: .8125rem; color: var(--faint);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* 6 ─ Home --------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; text-align: center; padding: clamp(72px, 10vw, 136px) 0 clamp(56px, 7vw, 88px); }
.hero-canvas {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 78%);
}
.hero .eyebrow { justify-content: center; }
.hero .eyebrow::after { content: ""; width: 18px; height: 1px; background: currentColor; }
.hero .h1 { margin-top: 26px; font-size: clamp(3rem, 6.4vw + .6rem, 6.25rem); }
.hero .lede { margin: 28px auto 0; text-align: center; }
.hero .cta-row { justify-content: center; margin-top: 36px; }

/* "engineered" gets a drafting dimension line that draws itself in. */
.dim { position: relative; display: inline-block; color: var(--brand-strong); }
.dim::after, .dim::before { content: ""; position: absolute; bottom: -.04em; height: .16em; }
.dim::after {
    left: 0; right: .28em; border-inline: 2px solid var(--brand); transform-origin: left;
    background: linear-gradient(var(--brand) 0 0) center / 100% 2px no-repeat;
    transform: scaleX(0); animation: drawX 1.1s .5s var(--ease) forwards;
}
.no-js .dim::after { transform: none; animation: none; }

.built-on { margin-top: clamp(56px, 7vw, 88px); }
.built-on p { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 20px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 12px; padding-inline: 32px; color: var(--ink-2); font-weight: 600; font-size: .9375rem; }
.marquee-item img { height: 26px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.marquee-item:hover img { filter: none; opacity: 1; }

/* Practices */
.practices { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .practices { grid-template-columns: 1fr; } }
.practice {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    display: flex; flex-direction: column; transition: border-color .3s, box-shadow .3s;
}
.practice:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.practice::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--p); }
.practice-art { padding: 28px 28px 0; background: linear-gradient(180deg, var(--p-soft), transparent); }
.practice-body { padding: 28px clamp(24px, 3vw, 36px) 36px; display: flex; flex-direction: column; flex: 1; }
.practice-index { font-family: var(--mono); font-size: .75rem; color: var(--p-strong); letter-spacing: .1em; }
.practice .h3 { margin-top: 10px; }
.practice .body { margin-top: 12px; font-size: 1rem; line-height: 1.65; }
.practice .ticks { margin-top: 22px; margin-bottom: 28px; }
.practice .link-arrow { margin-top: auto; }

/* Product cards */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 1024px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .products { grid-template-columns: 1fr; } }
.product-card {
    position: relative; display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--p) 40%, var(--line)); }
.product-card[hidden] { display: none; }
.product-card__art {
    aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
    background:
        radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--p) 26%, transparent) 1px, transparent 1.5px) 0 0 / 16px 16px,
        linear-gradient(160deg, var(--p-soft), color-mix(in srgb, var(--p-soft) 30%, #fff));
    border-bottom: 1px solid color-mix(in srgb, var(--p) 16%, var(--line));
}
.product-card__art svg { width: 100%; height: 100%; }
.product-card__body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.product-card__head { display: flex; align-items: center; gap: 12px; }
.product-card__head h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.product-card__head .tag { margin-top: 2px; }
.product-card__head .status { margin-left: auto; }
.product-card__body > p { color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.product-card .ticks { margin-top: 0; gap: 8px; }
.product-card .ticks li { font-size: .875rem; }
.product-card .link-arrow { margin-top: auto; padding-top: 6px; }
.product-card .stretched { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.product-card .stretched:focus-visible { outline-offset: -3px; }

.partner-card {
    grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
    padding: 28px clamp(24px, 3vw, 36px); border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
    background: transparent;
}
.partner-card .plus { width: 48px; height: 48px; border-radius: 12px; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted); }
.partner-card h3 { font-size: 1.125rem; letter-spacing: -.02em; }
.partner-card p { color: var(--muted); font-size: .9375rem; margin-top: 4px; }
@media (max-width: 760px) { .partner-card { grid-template-columns: 1fr; } }

/* The DeusCore engine stack (dark) */
.core-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (max-width: 960px) { .core-grid { grid-template-columns: 1fr; } }
.principles { display: grid; gap: 22px; margin-top: 36px; }
.principle { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.principle .num { font-family: var(--mono); font-size: .75rem; color: var(--brand); padding-top: 3px; }
.principle strong { display: block; color: #fff; font-weight: 600; font-size: 1rem; }
.principle span { color: var(--night-muted); font-size: .9375rem; line-height: 1.6; }

.stack { position: relative; display: grid; gap: 34px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--night-line); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--night-2), var(--night)); }
.stack-label { font-family: var(--mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--night-muted); margin-bottom: 10px; display: flex; justify-content: space-between; }
.stack-row { position: relative; display: grid; gap: 10px; }
.stack-row--products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack-row--practices { grid-template-columns: 1fr 1fr; }
.stack-cell {
    display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border-radius: 12px;
    background: var(--night-3); border: 1px solid var(--night-line); color: #fff; font-size: .875rem; font-weight: 600;
    text-decoration: none; transition: border-color .2s, transform .2s var(--ease);
}
a.stack-cell:hover { border-color: var(--p); transform: translateY(-2px); }
.stack-cell .pmark { width: 26px; height: 26px; border-radius: 7px; }
.stack-cell--ghost { background: transparent; border-style: dashed; color: var(--night-muted); font-weight: 500; justify-content: center; }
.stack-cell .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p) 22%, transparent); flex: none; }
.stack-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .stack-row--products { grid-template-columns: 1fr 1fr; } }

/* Signal lines between the stack's layers: a faint wire with a pulse travelling up it. */
.pulse-lines { position: absolute; left: 8%; right: 8%; top: -34px; height: 34px; display: flex; justify-content: space-around; pointer-events: none; }
.pulse-lines i { width: 1px; height: 100%; position: relative; overflow: hidden; background: var(--night-line); }
.pulse-lines i::after {
    content: ""; position: absolute; left: 0; width: 2px; height: 12px; border-radius: 2px;
    background: linear-gradient(transparent, var(--brand)); animation: rise 2.4s linear infinite; animation-delay: calc(var(--d, 0) * .6s);
}
.stack-core {
    position: relative; border-radius: 16px; padding: 18px; overflow: hidden;
    background: linear-gradient(135deg, rgba(100, 149, 237, .16), rgba(100, 149, 237, .04)); border: 1px solid rgba(100, 149, 237, .45);
}
.stack-core__title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: #fff; font-weight: 700; letter-spacing: -.01em; }
.stack-core__title svg { width: 30px; height: 30px; }
.stack-core__title small { display: block; font-weight: 400; color: var(--night-muted); font-size: .8125rem; letter-spacing: 0; }
.core-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.core-chips span {
    font-family: var(--mono); font-size: .75rem; color: #CFE0FF; padding: 6px 10px; border-radius: 8px;
    background: rgba(100, 149, 237, .12); border: 1px solid rgba(100, 149, 237, .28);
}
.stack-core::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .07) 50%, transparent 70%);
    transform: translateX(-100%); animation: sheen 6s 1s var(--ease) infinite;
}

/* Playground (existing Three.js demo) */
.playground-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .playground-grid { grid-template-columns: 1fr; } }
#playground-container {
    display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--line); padding: 1rem; border-radius: var(--r-lg); width: 100%; height: 480px;
}
#placeholder-container { position: relative; width: 100%; flex: 1; min-height: 0; }
.viz-canvas { width: 100%; height: 100%; border-radius: 14px; background: var(--surface-2); opacity: 0; transform: scale(.96); transition: opacity 1s ease, transform 1s ease; position: absolute; inset: 0; }
.viz-canvas.visible { opacity: 1; transform: none; }
#playground-canvas-container { width: 100%; flex-grow: 1; border-radius: 10px; overflow: hidden; position: relative; }
#playground-canvas { background: #fff; cursor: grab; display: block; width: 100%; height: 100%; }
#playground-controls { display: flex; justify-content: space-between; align-items: center; width: 100%; flex-wrap: wrap; gap: 1rem; }
#agent-palette { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; flex-grow: 1; }
.agent-item {
    padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
    font-weight: 600; font-size: .8125rem; cursor: grab; transition: transform .2s, box-shadow .2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .05); display: flex; align-items: center; gap: .5rem;
}
.agent-item:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, .1); }
.agent-color-dot { width: 10px; height: 10px; border-radius: 50%; }
#loading-bar-container { display: none; width: 80%; background: var(--line); border-radius: 5px; overflow: hidden; height: 6px; }
#loading-bar { width: 0%; height: 100%; background: var(--brand); transition: width 1.5s ease-out; }
.label-renderer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.label {
    color: var(--ink); background: rgba(255, 255, 255, .85); padding: 4px 8px; border-radius: 6px;
    font-size: .75rem; font-weight: 600; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); pointer-events: none;
    border: 1px solid var(--line); white-space: nowrap;
}
.agent-tooltip-palette {
    position: absolute; z-index: 200; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px;
    font-size: .8125rem; font-weight: 500; box-shadow: 0 4px 15px rgba(0, 0, 0, .15); width: 220px; line-height: 1.55;
    user-select: none; pointer-events: none; opacity: 0; transition: opacity .2s ease; white-space: normal;
}

/* Engagement steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.step { padding: 28px 24px 8px 0; position: relative; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step .num { font-family: var(--mono); font-size: .75rem; color: var(--brand-strong); }
.step h3 { font-size: 1.125rem; margin: 14px 0 8px; letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.step::before { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 0; background: var(--brand); transition: width .9s var(--ease); transition-delay: calc(var(--i, 0) * 180ms); }
.step + .step::before { left: -1px; }
.is-in .step::before, .steps.is-in .step::before { width: 48px; }
@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr 1fr; }
    .step:nth-child(3) { border-left: 0; padding-left: 0; }
    .step:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 8px; }
}
@media (max-width: 560px) {
    .steps { grid-template-columns: 1fr; }
    .step, .step + .step { border-left: 0; padding-left: 0; }
    .step + .step { border-top: 1px solid var(--line); }
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.pillars { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pillar { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pillar .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); }
.pillar .icon svg { width: 22px; height: 22px; }
.pillar strong { display: block; font-weight: 600; }
.pillar span { color: var(--muted); font-size: .9375rem; line-height: 1.6; }

/* 7 ─ Product pages ------------------------------------------------------ */
.p-hero { position: relative; isolation: isolate; padding-block: clamp(36px, 5vw, 72px) clamp(56px, 7vw, 104px); }
.p-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(55% 60% at 88% 18%, var(--p-soft), transparent 70%),
        radial-gradient(circle at 1px 1px, rgba(14, 19, 33, .075) 1px, transparent 1.4px) 0 0 / 22px 22px;
    -webkit-mask-image: linear-gradient(#000 55%, transparent);
    mask-image: linear-gradient(#000 55%, transparent);
}
.p-hero__grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
@media (max-width: 1000px) { .p-hero__grid { grid-template-columns: 1fr; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: .75rem; color: var(--faint); margin-bottom: 28px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-2); }
.lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.lockup strong { display: block; font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.lockup small { display: block; font-size: .8125rem; color: var(--muted); }
.lockup .status { margin-left: 6px; }
.p-hero .h1 { font-size: clamp(2.5rem, 3.8vw + 1rem, 4.5rem); }
.p-hero .lede { margin-top: 22px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 30px; font-size: .8125rem; color: var(--muted); }
.meta-row span { display: inline-flex; align-items: center; gap: 8px; }
.meta-row span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--p); }
.p-hero__art { position: relative; }

.art {
    position: relative; container-type: inline-size; border-radius: var(--r-lg); padding: clamp(18px, 3.4vw, 40px);
    border: 1px solid color-mix(in srgb, var(--p) 20%, var(--line));
    background:
        radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--p) 24%, transparent) 1px, transparent 1.5px) 0 0 / 18px 18px,
        linear-gradient(165deg, var(--p-soft), color-mix(in srgb, var(--p-soft) 35%, #fff));
}
.art--bare { padding: 0; background: none; border: 0; }
.art--plain { background: var(--surface); }
.art svg.ill { width: 100%; height: auto; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.fact { padding: 28px 24px; }
.fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact svg { width: 26px; height: 26px; color: var(--p-strong); margin-bottom: 14px; }
.fact strong { display: block; font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.fact span { display: block; margin-top: 4px; font-size: .875rem; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) {
    .facts { grid-template-columns: 1fr 1fr; }
    .fact:nth-child(3) { border-left: 0; padding-left: 0; }
    .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
    .facts { grid-template-columns: 1fr; }
    .fact, .fact + .fact { padding-left: 0; padding-right: 0; border-left: 0; }
    .fact + .fact { border-top: 1px solid var(--line); }
}

.feature { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.feature + .feature { margin-top: clamp(88px, 10vw, 152px); }
.feature--flip { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
.feature--flip .feature__copy { order: 2; }
.feature__copy .h3 { margin-top: 18px; }
.feature__copy .body { margin-top: 16px; font-size: 1.0625rem; line-height: 1.7; }
@media (max-width: 960px) {
    .feature, .feature--flip { grid-template-columns: 1fr; }
    .feature--flip .feature__copy { order: 0; }
}

.band { position: relative; overflow: hidden; background: var(--night); color: var(--night-text); }
.band::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(45% 55% at 85% 0%, color-mix(in srgb, var(--p) 24%, transparent), transparent 70%),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .06) 1px, transparent 1.4px) 0 0 / 22px 22px;
}
.band .container { position: relative; }
.band .h2, .band .h3, .band .h4 { color: #fff; }
.band .lede, .band .body { color: var(--night-muted); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (max-width: 960px) { .band-grid { grid-template-columns: 1fr; } }

.capabilities { display: grid; gap: 0; margin-top: 36px; border-top: 1px solid var(--night-line); }
.capability { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--night-line); }
.capability .k { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--p); padding-top: 2px; }
.capability p { color: var(--night-text); font-size: .9375rem; line-height: 1.6; }
.capability p span { color: var(--night-muted); }

.mini-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1024px) { .mini-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .mini-cards { grid-template-columns: 1fr; } }
.mini-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; transition: border-color .25s, transform .25s var(--ease); }
.mini-card:hover { border-color: color-mix(in srgb, var(--p) 45%, var(--line)); transform: translateY(-2px); }
.mini-card .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--p-soft); color: var(--p-strong); margin-bottom: 18px; }
.mini-card .icon svg { width: 20px; height: 20px; }
.mini-card h3 { font-size: 1.0625rem; letter-spacing: -.02em; }
.mini-card p { color: var(--muted); font-size: .9063rem; line-height: 1.6; margin-top: 8px; }

.channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .channel-grid { grid-template-columns: 1fr 1fr; } }
.channel { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9375rem; }
.channel svg { width: 36px; height: 36px; flex: none; }
.channel small { display: block; font-weight: 400; color: var(--muted); font-size: .8125rem; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: t; }
@media (max-width: 1000px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }
.moment { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.moment time { font-family: var(--mono); font-size: .75rem; color: var(--p-strong); }
.moment h3 { font-size: 1.0625rem; letter-spacing: -.02em; margin: 10px 0 8px; }
.moment p { color: var(--muted); font-size: .9063rem; line-height: 1.6; }
.moment blockquote { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--p-soft); color: var(--p-strong); font-size: .8438rem; line-height: 1.5; }

.ecosystem { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
@media (max-width: 860px) { .ecosystem { grid-template-columns: 1fr; } }

.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(32px, 6vw, 72px); background: var(--night); color: var(--night-text); }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 80% at 100% 0%, color-mix(in srgb, var(--p) 30%, transparent), transparent 70%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band .h2 { color: #fff; max-width: 18ch; }
.cta-band p { color: var(--night-muted); margin-top: 16px; max-width: 56ch; font-size: 1.0625rem; line-height: 1.65; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter {
    height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
    font-size: .875rem; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all .2s;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.note { font-size: .8125rem; color: var(--faint); margin-top: 14px; }
.band .note { color: var(--night-muted); }

/* 8 ─ Mock UI (product visuals built in HTML, scaled by their container) -- */
.mock {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
    font-size: clamp(11px, 2.35cqi, 13.5px); line-height: 1.45; color: var(--ink-2); overflow: hidden; min-width: 0;
}
.mock__head { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .9em 1.15em; border-bottom: 1px solid var(--line); }
.mock__title { font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
.mock__meta { font-family: var(--mono); font-size: .8em; color: var(--faint); }
.mock__body { padding: .8em 1.15em 1em; }
.mock__foot { padding: .8em 1.15em; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; gap: .6em; flex-wrap: wrap; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .42em 0; }
.row + .row { border-top: 1px dashed var(--line); }
.row--muted { color: var(--muted); font-size: .92em; }
.row--total { font-weight: 700; color: var(--ink); border-top: 1.5px solid var(--ink) !important; margin-top: .3em; padding-top: .65em; }
.num { font-variant-numeric: tabular-nums; }
.chip {
    display: inline-flex; align-items: center; gap: .4em; white-space: nowrap;
    font-size: .8em; font-weight: 600; padding: .28em .75em; border-radius: 999px; background: var(--surface-2); color: var(--ink-2);
}
.chip--p { background: var(--p-soft); color: var(--p-strong); }
.chip--solid { background: var(--p-strong); color: #fff; }
.chip--ok { background: #DCFCE7; color: #166534; }
.chip--warn { background: #FEF3C7; color: #92400E; }
.chip--bad { background: #FEE2E2; color: #B91C1C; }
.chip--ink { background: var(--ink); color: #fff; }
.chip--line { background: transparent; border: 1px solid var(--line-strong); }
.chip .d { width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.bar { height: .5em; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--v, 50%); background: var(--p); border-radius: inherit; }
.bar--warn > i { background: #F59E0B; }
.bar--bad > i { background: #EF4444; }
.av { width: 2.2em; height: 2.2em; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .85em; font-weight: 700; color: var(--p-strong); background: var(--p-soft); }

.compose { display: grid; gap: 1.1em; font-size: clamp(11px, 2.35cqi, 13.5px); }
.compose--2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.compose--2 > :nth-child(2) { margin-top: 3.5em; }
.compose--2r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.compose--2r > :nth-child(1) { margin-top: 3.5em; }
@container (max-width: 470px) {
    .compose--2, .compose--2r { grid-template-columns: 1fr; }
    .compose--2 > :nth-child(2), .compose--2r > :nth-child(1) { margin-top: 0; }
}
.stackv { display: grid; gap: 1em; }

/* KDS ticket */
.ticket { position: relative; padding: 1em 1.1em 1.05em; }
.ticket::before { content: ""; position: absolute; inset: 0 0 auto; height: .32em; background: var(--brand-c, var(--p)); }
.ticket__top { display: flex; align-items: center; gap: .6em; }
.ticket__no { font-weight: 800; color: var(--ink); font-size: 1.15em; letter-spacing: -.02em; }
.ticket__brand { font-weight: 650; color: var(--brand-c, var(--p-strong)); }
.ticket__top .chip { margin-left: auto; }
.ticket ul { margin: .7em 0 .8em; display: grid; gap: .3em; }
.ticket li { display: flex; gap: .6em; align-items: center; }
.ticket li::before { content: ""; width: .95em; height: .95em; border: 1.5px solid var(--line-strong); border-radius: .25em; flex: none; }
.ticket li.done { color: var(--faint); text-decoration: line-through; }
.ticket li.done::before { background: var(--p) ; border-color: var(--p); }
.ticket__time { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: .88em; margin-bottom: .45em; color: var(--muted); }
.ticket__time b { color: var(--ink); font-size: 1.15em; }
.ticket--late .ticket__time b { color: #B91C1C; }

.slip {
    background: #fff; font-family: var(--mono); font-size: .86em; color: var(--ink); padding: 1.1em 1.1em 1.6em;
    box-shadow: var(--shadow); position: relative;
    -webkit-mask: radial-gradient(circle at 50% 100%, transparent .42em, #000 .45em) 0 100% / .9em .9em repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - .44em) no-repeat;
    mask: radial-gradient(circle at 50% 100%, transparent .42em, #000 .45em) 0 100% / .9em .9em repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - .44em) no-repeat;
}
.slip__band { background: var(--ink); color: #fff; text-align: center; font-weight: 700; letter-spacing: .12em; padding: .35em; margin: .6em 0; }
.slip hr { border: 0; border-top: 1px dashed var(--line-strong); margin: .6em 0; }
.slip .row { padding: .2em 0; border: 0 !important; }

/* Stock rows */
.stock { display: grid; grid-template-columns: 1fr 3.8em; gap: .35em 1em; align-items: center; }
.stock + .stock { margin-top: .75em; }
.stock__name { display: flex; justify-content: space-between; font-weight: 550; color: var(--ink); }
.stock__name span { font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: .88em; }
.stock .bar { grid-column: 1; }
.stock .chip { grid-row: 1 / span 2; grid-column: 2; justify-self: end; }

/* Brand × platform grid */
.heat { width: 100%; border-collapse: collapse; font-size: .92em; }
.heat th { text-align: left; font-weight: 500; color: var(--faint); font-family: var(--mono); font-size: .82em; padding: .3em .4em .6em; }
.heat th:not(:first-child), .heat td:not(:first-child) { text-align: right; }
.heat td { padding: .55em .4em; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.heat td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.heat td:first-child i { display: inline-block; width: .6em; height: .6em; border-radius: 2px; margin-right: .5em; background: var(--brand-c); }
.heat td[data-h] { background: color-mix(in srgb, var(--p) calc(var(--h, 0) * 1%), transparent); }

/* App chrome */
.app { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); min-height: 22em; }
.app__side { background: var(--ink); color: #C7CCD6; padding: 1em .7em; display: grid; align-content: start; gap: .2em; }
.app__side .brandline { display: flex; align-items: center; gap: .5em; color: #fff; font-weight: 700; padding: 0 .4em .9em; }
.app__side .brandline svg { width: 1.7em; height: 1.7em; }
.app__nav { display: flex; align-items: center; gap: .55em; padding: .5em .55em; border-radius: .5em; font-size: .92em; }
.app__nav::before { content: ""; width: .8em; height: .8em; border-radius: .2em; border: 1.5px solid currentColor; opacity: .6; }
.app__nav.is-active { background: rgba(255, 255, 255, .09); color: #fff; }
.app__nav.is-active::before { background: var(--p); border-color: var(--p); opacity: 1; }
.app__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
@container (max-width: 520px) { .app { grid-template-columns: 1fr; } .app__side { display: none; } }
.convos { border-right: 1px solid var(--line); }
.convo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6em; padding: .75em .85em; border-bottom: 1px solid var(--line); align-items: start; }
.convo.is-active { background: var(--p-soft); }
.convo strong { display: block; font-size: .95em; color: var(--ink); font-weight: 600; }
.convo span { display: block; font-size: .86em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo time { font-family: var(--mono); font-size: .75em; color: var(--faint); }
.ch { width: 2.2em; height: 2.2em; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); position: relative; }
.ch::after { content: ""; position: absolute; right: -.1em; bottom: -.1em; width: .8em; height: .8em; border-radius: 50%; border: 2px solid #fff; background: var(--ch, var(--p)); }
.ch b { font-size: .8em; color: var(--ink-2); }
.thread { display: flex; flex-direction: column; gap: .6em; padding: .9em; }
.bubble { max-width: 85%; padding: .6em .8em; border-radius: .9em; font-size: .92em; line-height: 1.45; }
.bubble--in { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: .25em; }
.bubble--out { align-self: flex-end; background: var(--p-strong); color: #fff; border-bottom-right-radius: .25em; }
.bubble--bot { align-self: flex-end; background: var(--p-soft); color: var(--ink); border-bottom-right-radius: .25em; }
.bubble small { display: block; font-size: .78em; opacity: .75; margin-top: .25em; font-family: var(--mono); }
.note-private { background: #FEF9C3; color: #713F12; border-radius: .6em; padding: .55em .75em; font-size: .88em; }
.composer { margin-top: auto; border: 1px solid var(--line); border-radius: .7em; padding: .55em .7em; color: var(--faint); display: flex; justify-content: space-between; align-items: center; gap: .5em; font-size: .9em; }

/* Chat (dark, sequenced) */
.chat {
    background: var(--night-2); border: 1px solid var(--night-line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--night-line); color: #fff; }
.chat__head .pmark { width: 30px; height: 30px; border-radius: 8px; }
.chat__head strong { font-size: .9375rem; font-weight: 600; display: block; }
.chat__head small { display: block; color: var(--night-muted); font-size: .75rem; }
.chat__head .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .6875rem; color: var(--p); text-transform: uppercase; letter-spacing: .08em; }
.chat__head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p); animation: blink 1.6s infinite; }
.chat__body { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 20px 18px; height: 460px; overflow: hidden; }
.chat__body.is-static { height: auto; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; font-size: .9063rem; line-height: 1.55; }
.msg--me { align-self: flex-end; background: var(--night-3); color: #fff; border-bottom-right-radius: 4px; }
.msg--ai { align-self: flex-start; color: var(--night-text); border: 1px solid var(--night-line); background: rgba(255, 255, 255, .02); border-bottom-left-radius: 4px; }
.msg b { color: #fff; font-weight: 600; }
.msg .tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg .tools span {
    font-family: var(--mono); font-size: .6875rem; color: color-mix(in srgb, var(--p) 75%, #fff);
    padding: 3px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--p) 40%, transparent);
}
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--night-line); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--night-muted); animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.js [data-step]:not(.is-shown) { display: none; }
[data-step].is-shown { animation: msgIn .45s var(--ease) both; }

/* 9 ─ Illustrations ------------------------------------------------------ */
.ill { width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.ill text { font-family: var(--font); }
.ill .t-mono { font-family: var(--mono); }
.ill .spin { transform-box: fill-box; transform-origin: center; animation: spin 18s linear infinite; }
.ill .spin-rev { transform-box: fill-box; transform-origin: center; animation: spin 26s linear infinite reverse; }
.ill .float { animation: floaty 6s ease-in-out infinite; }
.ill .float-2 { animation: floaty 7s -2s ease-in-out infinite; }
.ill .pop { animation: popIn 7s var(--ease) infinite; transform-box: fill-box; transform-origin: center; }
.ill .rise-in { animation: riseLoop 8s var(--ease) infinite; }
.ill .dash-flow { stroke-dasharray: 4 6; animation: dashFlow 1.4s linear infinite; }
.ill .arm-upper { transform-box: view-box; animation: armUpper 7s ease-in-out infinite; }
.ill .arm-fore { transform-box: view-box; animation: armFore 7s ease-in-out infinite; }
.ill .grow-x { transform-box: fill-box; transform-origin: left center; animation: growX 7s var(--ease) infinite; }
.ill .print { animation: print 7s var(--ease) infinite; }
.ill .slide-in { animation: slideIn 7s var(--ease) infinite; }
.ill .fade-seq { opacity: 0; animation: fadeSeq 8s var(--ease) infinite; animation-delay: calc(var(--d, 0) * 1s); }
.ill .blink { animation: blink 1.6s infinite; }
.ill .wave rect { transform-box: fill-box; transform-origin: center; animation: wave 1.1s ease-in-out infinite; animation-delay: calc(var(--d, 0) * -0.09s); }
.ill .glow-node { animation: nodeOn 6s var(--ease) infinite; animation-delay: calc(var(--d, 0) * .6s); }

/* 10 ─ Motion ------------------------------------------------------------ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drawX { to { transform: scaleX(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes rise { from { top: 100%; } to { top: -12px; } }
@keyframes sheen { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
@keyframes popIn { 0%, 8% { opacity: 0; transform: translateY(10px) scale(.96); } 16%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes riseLoop { 0%, 10% { opacity: 0; transform: translateY(12px); } 20%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes dashFlow { to { stroke-dashoffset: -20; } }
@keyframes armUpper { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-14deg); } 60% { transform: rotate(6deg); } }
@keyframes armFore { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(22deg); } 60% { transform: rotate(-10deg); } }
@keyframes growX { 0% { transform: scaleX(.15); } 70%, 100% { transform: scaleX(1); } }
@keyframes print { 0%, 8% { transform: translateY(78px); } 45%, 90% { transform: translateY(0); } 100% { transform: translateY(0); opacity: 0; } }
@keyframes slideIn { 0%, 6% { opacity: 0; transform: translateY(-26px); } 16%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes fadeSeq { 0%, 5% { opacity: 0; transform: translateY(8px); } 12%, 85% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes nodeOn { 0%, 100% { opacity: .35; } 10%, 30% { opacity: 1; } }

/* Reveal on scroll (only when JS is running). */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Animations inside [data-anim] only run while it is on screen. */
.js [data-anim]:not(.is-playing) *, .js [data-anim]:not(.is-playing)::before, .js [data-anim]:not(.is-playing)::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
    .marquee-track { animation: none; }
    .ill .fade-seq, .ill .pop, .ill .rise-in, .ill .slide-in { opacity: 1; transform: none; }
}
