/* =========================================================
   Pylon Data Group - main stylesheet
   Palettes are pure CSS variables. Switch with
   <html data-palette="ember|arctic|aurora|signal|paper">
   or preview live: index.html?palettes
   ========================================================= */

:root,
[data-palette="ember"] {
    --bg: #0a0a0c;
    --bg-2: #101013;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --text: #f5f2ed;
    --muted: #a19d97;
    --dim: #6b6862;
    --accent: #ff8344;
    --accent-2: #ffc078;
    --accent-ink: #1a0d05;
    --cool: #8aa4ff;
    --ok: #5ee6a8;
    --glow: rgba(255, 131, 68, 0.35);
    color-scheme: dark;
}

[data-palette="arctic"] {
    --bg: #060a12;
    --bg-2: #0b111d;
    --surface: rgba(148, 197, 255, 0.04);
    --surface-2: rgba(148, 197, 255, 0.07);
    --line: rgba(148, 197, 255, 0.1);
    --line-2: rgba(148, 197, 255, 0.18);
    --text: #eef5ff;
    --muted: #93a3b8;
    --dim: #5d6b80;
    --accent: #29b5e8;
    --accent-2: #a5f3fc;
    --accent-ink: #021018;
    --cool: #c4b5fd;
    --ok: #5ee6a8;
    --glow: rgba(41, 181, 232, 0.35);
    color-scheme: dark;
}

[data-palette="aurora"] {
    --bg: #09080f;
    --bg-2: #100e1a;
    --surface: rgba(196, 181, 253, 0.04);
    --surface-2: rgba(196, 181, 253, 0.07);
    --line: rgba(196, 181, 253, 0.1);
    --line-2: rgba(196, 181, 253, 0.18);
    --text: #f3f0ff;
    --muted: #a39fb8;
    --dim: #67637a;
    --accent: #8b5cf6;
    --accent-2: #2dd4bf;
    --accent-ink: #ffffff;
    --cool: #f0abfc;
    --ok: #5eead4;
    --glow: rgba(139, 92, 246, 0.4);
    color-scheme: dark;
}

[data-palette="signal"] {
    --bg: #0a0b09;
    --bg-2: #10120e;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-2: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --text: #f2f4ee;
    --muted: #9da196;
    --dim: #676b60;
    --accent: #c6f432;
    --accent-2: #f4f9c8;
    --accent-ink: #0e1402;
    --cool: #7dd3fc;
    --ok: #c6f432;
    --glow: rgba(198, 244, 50, 0.28);
    color-scheme: dark;
}

[data-palette="paper"] {
    --bg: #f6f2ea;
    --bg-2: #efe9de;
    --surface: rgba(29, 33, 34, 0.035);
    --surface-2: rgba(29, 33, 34, 0.06);
    --line: rgba(29, 33, 34, 0.1);
    --line-2: rgba(29, 33, 34, 0.18);
    --text: #1d2122;
    --muted: #5f5b55;
    --dim: #8f8a82;
    --accent: #f0652a;
    --accent-2: #ff9e6d;
    --accent-ink: #ffffff;
    --cool: #3b5bdb;
    --ok: #138a55;
    --glow: rgba(240, 101, 42, 0.25);
    color-scheme: light;
}

:root {
    --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --serif: 'Instrument Serif', Georgia, serif;
    --radius: 20px;
    --radius-sm: 12px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --container: 1240px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color .5s var(--ease), color .5s var(--ease);
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.serif {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-right: .08em;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--accent);
    margin-bottom: 18px;
    text-transform: uppercase;
}

.link {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
}

/* film grain for texture */
.grain {
    position: fixed;
    inset: -50%;
    z-index: 999;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grain 1.2s steps(6) infinite;
}

[data-palette="paper"] .grain {
    opacity: .07;
}

@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -3%); }
    60% { transform: translate(-2%, -1%); }
    80% { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    z-index: 1001;
    transform-origin: 0 50%;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------- Buttons ---------- */
.btn {
    --pad-y: 14px;
    --pad-x: 22px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: var(--pad-y) var(--pad-x);
    border-radius: 999px;
    font-weight: 550;
    font-size: 15px;
    letter-spacing: -.005em;
    white-space: nowrap;
    transition: transform .35s var(--ease), background .3s, box-shadow .3s, border-color .3s, color .3s;
    will-change: transform;
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .35s var(--ease);
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 0 0 1px var(--accent), 0 10px 40px -10px var(--glow);
}

.btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    background-size: 250% 100%;
    background-position: 120% 0;
    transition: background-position .9s var(--ease);
    pointer-events: none;
}

.btn--primary:hover::before {
    background-position: -40% 0;
}

.btn--primary:hover {
    box-shadow: 0 0 0 1px var(--accent), 0 16px 60px -8px var(--glow);
}

.btn--ghost {
    border: 1px solid var(--line-2);
    background: var(--surface);
    backdrop-filter: blur(8px);
}

.btn--ghost:hover {
    border-color: var(--accent);
}

.btn--sm {
    --pad-y: 10px;
    --pad-x: 18px;
    font-size: 14px;
}

.btn--lg {
    --pad-y: 17px;
    --pad-x: 28px;
    font-size: 16px;
}

.btn--block {
    width: 100%;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 0 var(--ok);
    animation: ping 2s infinite;
    flex: none;
}

@keyframes ping {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); }
    80%, 100% { box-shadow: 0 0 0 10px transparent; }
}

/* ---------- Nav ---------- */
.nav {
    position: fixed;
    top: 14px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 16px;
    transition: transform .5s var(--ease);
}

.nav.is-hidden {
    transform: translateY(-130%);
}

.nav__inner {
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 10px 10px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background .4s, border-color .4s, box-shadow .4s;
}

.nav.is-scrolled .nav__inner {
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border-color: var(--line);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .5);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.brand__mark {
    width: 30px;
    height: 30px;
    transition: transform .6s var(--ease);
}

.brand:hover .brand__mark {
    transform: rotate(-8deg) scale(1.08);
}

.brand__word {
    font-size: 15px;
    letter-spacing: .12em;
    font-weight: 300;
    white-space: nowrap;
}

.brand__word b {
    font-weight: 750;
}

.nav__links {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.nav__links a {
    position: relative;
    padding: 8px 14px;
    font-size: 14px;
    color: var(--muted);
    border-radius: 999px;
    transition: color .25s, background .25s;
}

.nav__links a:hover,
.nav__links a.is-active {
    color: var(--text);
    background: var(--surface-2);
}

.nav__burger {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    position: relative;
    margin-left: auto;
}

.nav__burger span {
    position: absolute;
    left: 13px;
    right: 13px;
    height: 1.5px;
    background: var(--text);
    transition: transform .35s var(--ease), top .35s var(--ease);
}

.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }

.nav__burger[aria-expanded="true"] span:first-child {
    top: 21px;
    transform: rotate(45deg);
}

.nav__burger[aria-expanded="true"] span:last-child {
    top: 21px;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 100px 28px 40px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu a:not(.btn) {
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -.02em;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
}

.mobile-menu .btn {
    margin-top: 28px;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 130px 0 90px;
    overflow: hidden;
    isolation: isolate;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: .9;
}

.hero__glow {
    position: absolute;
    z-index: -3;
    width: 900px;
    height: 900px;
    right: -200px;
    top: -150px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
    filter: blur(30px);
    animation: drift 14s ease-in-out infinite alternate;
}

.hero::after {
    /* fade into next section + subtle grid */
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(to bottom, transparent 70%, var(--bg) 100%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 20%, transparent 75%);
    opacity: .55;
}

.hero__spot {
    position: absolute;
    z-index: -1;
    width: 520px;
    height: 520px;
    left: 0;
    top: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .6s;
}

.hero:hover .hero__spot {
    opacity: 1;
}

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-120px, 80px) scale(1.15); }
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 40px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    font-size: 13px;
    color: var(--muted);
    backdrop-filter: blur(6px);
}

.pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.hero__title {
    margin: 26px 0 24px;
    font-size: clamp(42px, 6.6vw, 92px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 650;
    text-wrap: balance;
}

.hero__title .serif {
    font-size: 1.08em;
    letter-spacing: -.02em;
}

.hero__lede {
    max-width: 560px;
    font-size: clamp(17px, 1.5vw, 19px);
    color: var(--muted);
}

.role-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 34px;
    font-family: var(--mono);
    font-size: 15px;
    min-height: 1.6em;
}

.role-ticker__label {
    color: var(--dim);
}

.role-ticker__label::after {
    content: ' →';
}

.role-ticker__word {
    color: var(--text);
}

.role-ticker__caret {
    display: inline-block;
    width: 9px;
    height: 1.15em;
    margin-left: -6px;
    background: var(--accent);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 40px;
    list-style: none;
    font-size: 13px;
    color: var(--dim);
    font-family: var(--mono);
}

.hero__chips li::before {
    content: '◆';
    color: var(--accent);
    margin-right: 8px;
    font-size: 9px;
    vertical-align: 2px;
}

/* tower */
.tower {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin-left: auto;
    aspect-ratio: 4 / 5;
}

.tower__svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.t-line {
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw 2.2s var(--ease) forwards;
}

.t-base { stroke: var(--line-2); stroke-width: 2; animation-delay: .2s; }
.t-leg { stroke: url(#legGrad); stroke-width: 2.4; animation-delay: .4s; }
.t-mast { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 6; stroke-dashoffset: 0; animation: none; opacity: .8; }
.t-bar { stroke: var(--line-2); stroke-width: 1.6; animation-delay: .9s; }
.t-brace { stroke: var(--line); stroke-width: 1.1; animation-delay: 1.2s; }

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

.t-nodes circle {
    fill: var(--bg);
    stroke: var(--accent);
    stroke-width: 1.6;
    opacity: 0;
    animation: pop .5s var(--ease) forwards, nodePulse 3s ease-in-out infinite;
    animation-delay: 1.4s, 2s;
    transform-box: fill-box;
    transform-origin: center;
}

.t-nodes circle:nth-child(2n) { animation-delay: 1.55s, 2.6s; }
.t-nodes circle:nth-child(3n) { animation-delay: 1.7s, 3.1s; }

@keyframes pop {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes nodePulse {
    0%, 100% { fill: var(--bg); }
    50% { fill: var(--accent); }
}

.t-packets circle {
    fill: var(--accent-2);
    filter: drop-shadow(0 0 6px var(--accent));
}

.t-orb {
    fill: var(--accent-2);
    filter: drop-shadow(0 0 12px var(--accent));
}

.t-orb-halo {
    transform-box: fill-box;
    transform-origin: center;
    animation: halo 2.6s ease-in-out infinite;
}

@keyframes halo {
    0%, 100% { transform: scale(.8); opacity: .55; }
    50% { transform: scale(1.25); opacity: 1; }
}

.tower__tag {
    position: absolute;
    top: var(--y);
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-family: var(--mono);
    font-size: 12px;
    white-space: nowrap;
    color: var(--text);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    backdrop-filter: blur(8px);
    opacity: 0;
    animation: tagIn .8s var(--ease) forwards;
}

.tower__tag i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.tag-l { left: -6%; }
.tag-r { right: -8%; }

.tower__tag:nth-of-type(1) { animation-delay: 2.6s; }
.tower__tag:nth-of-type(2) { animation-delay: 2.4s; }
.tower__tag:nth-of-type(3) { animation-delay: 2.2s; }
.tower__tag:nth-of-type(4) { animation-delay: 2.0s; }
.tower__tag:nth-of-type(5) { animation-delay: 1.8s; }
.tower__tag:nth-of-type(6) { animation-delay: 1.6s; }

.tower__tag:first-of-type {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
    box-shadow: 0 0 30px -6px var(--glow);
}

@keyframes tagIn {
    from { opacity: 0; transform: translate(0, calc(-50% + 12px)); }
    to { opacity: 1; transform: translate(0, -50%); }
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: 24px;
    height: 38px;
    border: 1.5px solid var(--line-2);
    border-radius: 14px;
}

.scroll-cue span {
    position: absolute;
    left: 50%;
    top: 7px;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--accent);
    animation: cue 1.8s var(--ease) infinite;
}

@keyframes cue {
    0% { transform: translateY(0); opacity: 1; }
    80% { transform: translateY(14px); opacity: 0; }
    100% { opacity: 0; }
}

/* ---------- Trusted / marquee ---------- */
.trusted {
    padding: 30px 0 40px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
}

.trusted__label {
    text-align: center;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 26px;
}

.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee var(--dur, 38s) linear infinite;
}

.marquee:hover .marquee__track {
    animation-play-state: paused;
}

.marquee__group {
    display: flex;
    align-items: center;
    gap: 84px;
    padding-right: 84px;
    flex: none;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

.client-logo {
    height: 26px;
    width: auto;
    opacity: .75;
    transition: opacity .3s, transform .3s;
}

[data-palette]:not([data-palette="paper"]) .client-logo {
    filter: brightness(0) invert(1);
}

[data-palette="paper"] .client-logo {
    filter: brightness(0);
}

.client-logo--hi { height: 20px; }

.client-logo:hover {
    opacity: 1;
}

.client-word {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 300;
    letter-spacing: -.02em;
    white-space: nowrap;
    color: var(--text);
    opacity: .75;
}

.client-word b {
    font-weight: 750;
}

.client-word--sf {
    font-size: 20px;
    font-weight: 500;
    opacity: .55;
}

.client-icon {
    width: 24px;
    height: 24px;
}

[data-palette]:not([data-palette="paper"]) .client-icon {
    filter: brightness(0) invert(1);
}

/* ---------- Manifesto ---------- */
.manifesto {
    padding: clamp(100px, 14vw, 180px) 0;
}

.manifesto__text {
    font-size: clamp(28px, 4.2vw, 56px);
    line-height: 1.15;
    letter-spacing: -.035em;
    font-weight: 550;
    max-width: 1100px;
    text-wrap: pretty;
}

.manifesto__text .w {
    color: var(--text);
    opacity: .14;
    transition: opacity .25s linear, color .25s;
}

.manifesto__text .w.on {
    opacity: 1;
}

.manifesto__text .w.hl.on {
    color: var(--accent);
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    padding: clamp(90px, 11vw, 150px) 0;
}

.section--alt {
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section__head {
    max-width: 820px;
    margin: 0 auto 64px;
    text-align: center;
}

.section__title {
    font-size: clamp(34px, 4.8vw, 64px);
    line-height: 1.02;
    letter-spacing: -.04em;
    font-weight: 650;
    text-wrap: balance;
}

.section__title .serif,
.contact__title .serif {
    font-size: 1.08em;
}

.section__title--left {
    text-align: left;
}

.section__lede {
    margin: 22px auto 0;
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
}

.section__lede--left {
    margin-left: 0;
}

/* spotlight hover (cursor-following glow + border) */
.spotlight {
    --mx: 50%;
    --my: 50%;
    position: relative;
    isolation: isolate;
}

.spotlight::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity .4s;
    background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%);
}

.spotlight::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .4s;
    background: radial-gradient(300px circle at var(--mx) var(--my), var(--accent), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.spotlight:hover::before,
.spotlight:hover::after {
    opacity: 1;
}

/* ---------- Roles ---------- */
.roles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.role-card {
    padding: 34px 30px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    transition: transform .5s var(--ease), border-color .4s;
}

.role-card:hover {
    transform: translateY(-6px);
}

.role-card--feature {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
        var(--surface);
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.role-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.role-card__num {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--dim);
}

.role-card__group {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 6px;
    color: var(--muted);
    border: 1px solid var(--line-2);
}

.role-card__group--build {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.role-card__icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    margin-bottom: 26px;
}

.role-card__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.role-card h3 {
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -.02em;
    font-weight: 600;
    margin-bottom: 14px;
}

.role-card p {
    color: var(--muted);
    font-size: 16px;
}

.ticks {
    list-style: none;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px dashed var(--line-2);
    display: grid;
    gap: 10px;
    font-size: 15px;
}

.ticks li {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.ticks li::before {
    content: '';
    flex: none;
    width: 14px;
    height: 8px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg) translate(2px, -2px);
}

.role-card__badge {
    position: absolute;
    top: 28px;
    right: 26px;
    font-family: var(--mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--accent-ink);
    background: var(--accent);
}

/* ---------- Bento ---------- */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 16px;
}

.tile {
    position: relative;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .5s var(--ease);
}

.tile:hover {
    transform: translateY(-4px);
}

.tile--wide {
    grid-column: span 2;
    flex-direction: row;
    gap: 28px;
    align-items: center;
}

.tile--tall {
    grid-row: span 2;
}

.tile--span3 {
    grid-column: span 3;
}

.tile--hot {
    background:
        radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 60%),
        var(--bg);
    border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.tile__text {
    flex: 1;
}

.tile__kicker {
    display: inline-block;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 14px;
}

.tile__kicker--hot {
    color: var(--accent);
}

.tile h3 {
    font-size: 22px;
    letter-spacing: -.02em;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 10px;
}

.tile p {
    color: var(--muted);
    font-size: 15px;
}

.tile__link {
    margin-top: 18px;
    font-weight: 550;
    color: var(--accent);
    font-size: 15px;
}

.viz {
    margin-top: auto;
    padding-top: 22px;
}

/* layers */
.viz-layers {
    flex: none;
    width: 46%;
    padding-top: 0;
    display: grid;
    gap: 6px;
    perspective: 600px;
}

.viz-layers span {
    display: block;
    padding: 9px 14px;
    border-radius: 10px;
    font-family: var(--mono);
    font-size: 12px;
    border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--accent) calc(22% - var(--i) * 4%), var(--surface));
    color: var(--text);
    transform: rotateX(18deg) translateX(calc(var(--i) * 6px));
    transition: transform .6s var(--ease);
    transition-delay: calc(var(--i) * 50ms);
}

.tile:hover .viz-layers span {
    transform: rotateX(0) translateX(calc(var(--i) * -2px));
}

/* flow */
.viz-flow {
    position: relative;
    height: 44px;
    margin-top: auto;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    overflow: hidden;
}

.viz-flow i {
    position: absolute;
    top: 50%;
    left: -10%;
    width: 22px;
    height: 8px;
    margin-top: -4px;
    border-radius: 4px;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
    animation: flow 3s linear infinite;
}

.viz-flow i:nth-child(2) { animation-delay: .6s; width: 12px; opacity: .7; }
.viz-flow i:nth-child(3) { animation-delay: 1.2s; }
.viz-flow i:nth-child(4) { animation-delay: 1.8s; width: 16px; opacity: .6; }
.viz-flow i:nth-child(5) { animation-delay: 2.4s; width: 10px; }

@keyframes flow {
    to { left: 110%; }
}

/* code */
.viz-code {
    display: grid;
    gap: 8px;
}

.viz-code code {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viz-code .k { color: var(--cool); }
.viz-code .s { color: var(--accent-2); }
.viz-code .ok { color: var(--ok); }

/* chat */
.viz-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 28px;
}

.bubble {
    max-width: 88%;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
}

.bubble--q {
    align-self: flex-end;
    background: var(--accent);
    color: var(--accent-ink);
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.bubble--a {
    align-self: flex-start;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
    border-bottom-left-radius: 4px;
}

.bubble--a small {
    color: var(--ok);
    font-family: var(--mono);
    font-size: 11px;
}

.bubble--typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
}

.bubble--typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    animation: typing 1.2s infinite;
}

.bubble--typing i:nth-child(2) { animation-delay: .15s; }
.bubble--typing i:nth-child(3) { animation-delay: .3s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: .4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* metric chips */
.viz-metric {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    font-family: var(--mono);
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
}

.chip--ok {
    color: var(--ok);
    border-color: color-mix(in srgb, var(--ok) 40%, transparent);
}

/* bars */
.viz-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 90px;
}

.viz-bars i {
    flex: 1;
    height: var(--h);
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(to top, color-mix(in srgb, var(--accent) 30%, transparent), var(--accent));
    transform-origin: bottom;
    transform: scaleY(.25);
    transition: transform .9s var(--ease);
}

.tile.is-in .viz-bars i { transform: scaleY(1); }
.viz-bars i:nth-child(2) { transition-delay: .08s; }
.viz-bars i:nth-child(3) { transition-delay: .16s; }
.viz-bars i:nth-child(4) { transition-delay: .24s; }
.viz-bars i:nth-child(5) { transition-delay: .32s; }
.viz-bars i:nth-child(6) { transition-delay: .4s; }

/* spark */
.viz-spark {
    width: 100%;
    height: 80px;
    overflow: visible;
}

.spark-hist {
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.spark-fc {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke;
}

.spark-band {
    fill: color-mix(in srgb, var(--accent) 15%, transparent);
}

/* learn */
.viz-learn {
    flex: none;
    width: 42%;
    padding-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.viz-learn span {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 13px;
    background: var(--surface);
    transition: background .3s, color .3s, transform .4s var(--ease);
}

.viz-learn span:hover {
    background: var(--accent);
    color: var(--accent-ink);
    transform: translateY(-3px);
}

/* ---------- Pipeline ---------- */
.pipe {
    position: relative;
    padding: 10px 0 0;
}

.pipe__rail {
    position: absolute;
    left: 8.33%;
    right: 8.33%;
    top: 34px;
    height: 2px;
    background: var(--line-2);
    overflow: hidden;
}

.pipe__rail span {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 34px);
    animation: rail 1.4s linear infinite;
    opacity: .8;
}

@keyframes rail {
    to { background-position: 34px 0; }
}

.pipe__nodes {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

.pipe__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    color: var(--muted);
    transition: color .3s;
}

.pipe__dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    background: var(--bg);
    position: relative;
    transition: border-color .3s, box-shadow .3s, transform .4s var(--ease);
}

.pipe__dot::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: var(--line-2);
    transition: background .3s;
}

.pipe__name {
    font-size: 15px;
    font-weight: 550;
}

.pipe__node:hover,
.pipe__node.is-active {
    color: var(--text);
}

.pipe__node:hover .pipe__dot {
    transform: scale(1.1);
}

.pipe__node.is-active .pipe__dot {
    border-color: var(--accent);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 15%, transparent), 0 0 30px var(--glow);
}

.pipe__node.is-active .pipe__dot::after {
    background: var(--accent);
}

.pipe__panel {
    margin-top: 36px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 36px;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    min-height: 220px;
}

.pipe__panel-num {
    font-size: clamp(60px, 8vw, 110px);
    font-weight: 700;
    line-height: .85;
    letter-spacing: -.05em;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
}

.pipe__panel h3 {
    font-size: 28px;
    letter-spacing: -.02em;
    margin-bottom: 10px;
}

.pipe__panel p {
    color: var(--muted);
    max-width: 720px;
}

.pipe__panel.swap > div {
    animation: swapIn .5s var(--ease);
}

@keyframes swapIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

.pipe__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.pipe__tools span {
    font-family: var(--mono);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--bg);
}

/* ---------- Demo ---------- */
.demo {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 60px;
    align-items: center;
}

.demo__prompts {
    display: grid;
    gap: 10px;
    margin-top: 34px;
}

.prompt {
    text-align: left;
    padding: 16px 20px 16px 46px;
    position: relative;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    font-size: 15px;
    color: var(--muted);
    transition: border-color .3s, color .3s, background .3s, transform .4s var(--ease);
}

.prompt::before {
    content: '↳';
    position: absolute;
    left: 18px;
    top: 15px;
    color: var(--dim);
    font-family: var(--mono);
}

.prompt:hover {
    color: var(--text);
    transform: translateX(4px);
}

.prompt.is-active {
    color: var(--text);
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.prompt.is-active::before {
    color: var(--accent);
}

.demo__note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--dim);
    font-family: var(--mono);
}

.console {
    border-radius: var(--radius);
    border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--bg) 85%, #000);
    box-shadow: 0 50px 120px -40px rgba(0, 0, 0, .7), 0 0 0 1px var(--line), 0 0 120px -60px var(--glow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

[data-palette="paper"] .console {
    background: #fffdf9;
    box-shadow: 0 50px 120px -50px rgba(60, 40, 20, .35), 0 0 0 1px var(--line);
}

.console__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--dim);
}

.console__lights {
    display: flex;
    gap: 6px;
}

.console__lights i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--line-2);
}

.console__title b {
    color: var(--muted);
    font-weight: 500;
}

.console__status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ok);
}

.console__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.msg-q {
    align-self: flex-end;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 500;
    font-size: 15px;
    animation: swapIn .4s var(--ease);
}

.msg-a {
    display: grid;
    gap: 12px;
    animation: swapIn .4s var(--ease);
}

.steps {
    display: grid;
    gap: 8px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
    animation: swapIn .35s var(--ease);
}

.step__icon {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 50%;
    border: 1.5px solid var(--line-2);
    border-top-color: var(--accent);
    animation: spin .8s linear infinite;
}

.step.done .step__icon {
    animation: none;
    border: 0;
    background: var(--ok);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / contain no-repeat;
}

.step b {
    color: var(--text);
    font-weight: 500;
}

.step .tag {
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--ok);
    border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.sql {
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.65;
    white-space: pre;
    overflow-x: auto;
    color: var(--text);
    animation: swapIn .35s var(--ease);
}

.sql .k { color: var(--cool); }
.sql .s { color: var(--accent-2); }
.sql .f { color: var(--accent); }
.sql .n { color: var(--ok); }

.answer {
    padding: 16px 18px;
    border-radius: 16px 16px 16px 4px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    font-size: 15px;
    animation: swapIn .4s var(--ease);
}

.answer b {
    color: var(--accent);
    font-weight: 600;
}

.chart {
    margin-top: 16px;
    display: grid;
    gap: 9px;
}

.chart__title {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.chart__row {
    display: grid;
    grid-template-columns: 92px 1fr 60px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.chart__label {
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart__bar {
    height: 12px;
    border-radius: 6px;
    background: var(--surface-2);
    overflow: hidden;
}

.chart__bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 50%, transparent), var(--accent));
    transition: width 1s var(--ease);
}

.chart__row.is-hot .chart__bar i {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 14px var(--glow);
}

.chart__val {
    font-family: var(--mono);
    font-size: 12px;
    text-align: right;
}

.console__input {
    display: flex;
    align-items: center;
    margin: 0 16px 16px;
    padding: 14px 14px 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    font-size: 15px;
    min-height: 54px;
}

.console__typed {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.console__typed:empty::before {
    content: 'Ask a question about your business…';
    color: var(--dim);
}

.console__cursor {
    width: 2px;
    height: 18px;
    background: var(--accent);
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}

.console__send {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--accent);
    flex: none;
}

.console__send svg {
    width: 15px;
    height: 15px;
    fill: var(--accent-ink);
}

/* ---------- Stack ---------- */
.stack {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.stack__hero {
    padding: 36px;
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    background:
        radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
        var(--surface);
}

.stack__hero--alt {
    border-color: var(--line);
    background: var(--surface);
}

.stack__hero-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}

.stack__hero-top .tile__kicker {
    margin-bottom: 2px;
}

.stack__hero h3 {
    font-size: 32px;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.stack__hero > p {
    color: var(--muted);
    max-width: 520px;
}

.feature-list {
    list-style: none;
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--line);
}

.feature-list--compact {
    grid-template-columns: 1fr;
}

.feature-list li {
    padding: 14px 16px;
    background: var(--bg);
    display: grid;
    gap: 2px;
    transition: background .3s;
}

.feature-list li:hover {
    background: var(--bg-2);
}

.feature-list b {
    font-size: 15px;
    font-weight: 600;
}

.feature-list span {
    font-size: 13px;
    color: var(--muted);
}

/* logos rendered via CSS mask, so they follow the palette */
.tech-mask {
    display: inline-block;
    width: 28px;
    height: 28px;
    flex: none;
    background: var(--muted);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transition: background .3s, transform .4s var(--ease);
}

.tech-mask--lg {
    width: 54px;
    height: 54px;
    background: var(--accent);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--line);
}

.tech {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    background: var(--bg);
    font-size: 14px;
    color: var(--muted);
    transition: background .3s, color .3s;
}

.tech:hover {
    background: var(--bg-2);
    color: var(--text);
}

.tech:hover .tech-mask {
    background: var(--brand, var(--accent));
    transform: scale(1.12) rotate(-4deg);
}

/* ---------- Work ---------- */
.work {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.work-card {
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transition: transform .5s var(--ease);
}

.work-card:hover {
    transform: translateY(-6px);
}

.work-card__logo {
    height: 64px;
    display: flex;
    align-items: center;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.work-card__logo .client-logo {
    height: 28px;
    opacity: .95;
}

.work-card__logo .client-logo--hi {
    height: 22px;
}

.work-card__logo .client-word {
    opacity: .95;
    font-size: 28px;
}

.work-card__role {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.work-card h3 {
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -.02em;
    margin: 10px 0 12px;
}

.work-card p {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 22px;
}

.tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags span {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    color: var(--muted);
}

.why {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.why__item {
    padding-top: 22px;
    border-top: 1px solid var(--line-2);
    position: relative;
}

.why__item::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 40px;
    height: 1px;
    background: var(--accent);
    transition: width .8s var(--ease);
}

.why__item:hover::before {
    width: 100%;
}

.why__k {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
}

.why h4 {
    font-size: 19px;
    letter-spacing: -.01em;
    margin: 10px 0 8px;
    font-weight: 600;
}

.why p {
    color: var(--muted);
    font-size: 15px;
}

/* ---------- Process ---------- */
.process {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    counter-reset: step;
}

.process__step {
    position: relative;
    padding: 30px 26px 34px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
}

.process__step::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s var(--ease);
}

.process__step.is-in::after {
    transform: scaleX(1);
}

.process__step:nth-child(2)::after { transition-delay: .3s; }
.process__step:nth-child(3)::after { transition-delay: .6s; }
.process__step:nth-child(4)::after { transition-delay: .9s; }

.process__n {
    display: block;
    font-size: 64px;
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: 1;
    margin-bottom: 26px;
    color: transparent;
    -webkit-text-stroke: 1.2px var(--line-2);
    transition: -webkit-text-stroke-color .4s;
}

.process__step:hover .process__n {
    -webkit-text-stroke-color: var(--accent);
}

.process__step h3 {
    font-size: 22px;
    margin-bottom: 10px;
    letter-spacing: -.02em;
}

.process__step p {
    color: var(--muted);
    font-size: 15px;
}

/* ---------- FAQ ---------- */
.faq {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 60px;
    align-items: start;
}

.faq__head {
    position: sticky;
    top: 120px;
}

.faq__list {
    display: grid;
    gap: 10px;
}

.faq details {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--bg);
    transition: border-color .3s;
}

.faq details[open] {
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.faq summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 60px 22px 24px;
    font-size: 17px;
    font-weight: 550;
    position: relative;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-2);
    font-size: 18px;
    font-weight: 300;
    transition: transform .4s var(--ease), background .3s, color .3s;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}

.faq details p {
    padding: 0 24px 24px;
    color: var(--muted);
    font-size: 16px;
}

.faq details[open] p {
    animation: swapIn .4s var(--ease);
}

/* ---------- Contact ---------- */
.contact {
    position: relative;
    padding: clamp(100px, 12vw, 160px) 0;
    overflow: hidden;
    isolation: isolate;
}

.contact__glow {
    position: absolute;
    z-index: -1;
    left: -10%;
    bottom: -40%;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow), transparent 60%);
    filter: blur(40px);
    animation: drift 16s ease-in-out infinite alternate;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: start;
}

.contact__title {
    font-size: clamp(42px, 6vw, 84px);
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 650;
    text-wrap: balance;
}

.contact__mail {
    margin-top: 36px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 500;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-2);
    transition: border-color .3s, color .3s;
}

.contact__mail svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform .4s var(--ease);
}

.contact__mail:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.contact__mail:hover svg {
    transform: translate(3px, -3px);
}

.form {
    padding: 34px;
    border-radius: 24px;
    border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--bg-2) 80%, transparent);
    backdrop-filter: blur(16px);
    display: grid;
    gap: 14px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.field {
    position: relative;
}

.field input,
.field textarea {
    width: 100%;
    padding: 24px 16px 10px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    resize: vertical;
    transition: border-color .3s, background .3s, box-shadow .3s;
}

.field textarea {
    min-height: 120px;
}

.field label {
    position: absolute;
    left: 17px;
    top: 17px;
    font-size: 15px;
    color: var(--dim);
    pointer-events: none;
    transform-origin: left top;
    transition: transform .25s var(--ease), color .25s;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-2);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
    transform: translateY(-10px) scale(.78);
    color: var(--accent);
}

.field.is-invalid input {
    border-color: #ff5a5a;
}

.choices {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.choices legend {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 10px;
}

.choices label {
    cursor: pointer;
}

.choices input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choices span {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    font-size: 14px;
    color: var(--muted);
    transition: all .25s var(--ease);
}

.choices label:hover span {
    color: var(--text);
    border-color: var(--text);
}

.choices input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.choices input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.form__msg {
    font-size: 14px;
    min-height: 1.4em;
    text-align: center;
}

.form__msg.ok { color: var(--ok); }
.form__msg.err { color: #ff6b6b; }

.form.is-sent {
    place-items: center;
    text-align: center;
    min-height: 420px;
}

.sent {
    display: grid;
    gap: 14px;
    justify-items: center;
    animation: swapIn .6s var(--ease);
}

.sent__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 34px;
    box-shadow: 0 0 60px var(--glow);
}

.sent h3 {
    font-size: 28px;
    letter-spacing: -.02em;
}

.sent p {
    color: var(--muted);
}

.spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin .7s linear infinite;
}

/* ---------- Footer ---------- */
.footer {
    padding: 70px 0 30px;
    border-top: 1px solid var(--line);
    overflow: hidden;
}

.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    font-size: 14px;
    color: var(--muted);
}

.footer__links a:hover {
    color: var(--accent);
}

.footer__giant {
    margin: 40px 0 10px;
    font-size: clamp(90px, 24vw, 360px);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: .8;
    text-align: center;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-2);
    background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 25%, transparent), transparent 75%);
    -webkit-background-clip: text;
    background-clip: text;
    user-select: none;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--dim);
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(6px);
    transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease);
}

.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .4s; }

.reveal.is-in {
    opacity: 1;
    transform: none;
    filter: none;
}

/* hover transforms need to win once revealed */
.role-card.reveal.is-in:hover,
.work-card.reveal.is-in:hover {
    transform: translateY(-6px);
}

.tile.reveal.is-in:hover {
    transform: translateY(-4px);
}

.reveal.is-done {
    transition: transform .5s var(--ease), border-color .4s, background .3s, color .3s;
    transition-delay: 0s;
}

/* ---------- Palette switcher (preview tool, ?palettes) ---------- */
.palette-dock {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(14px);
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
}

.palette-dock button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
    transition: transform .3s var(--ease), border-color .3s;
}

.palette-dock button:hover {
    transform: scale(1.15);
}

.palette-dock button.is-active {
    border-color: var(--text);
}

.palette-dock span {
    padding: 0 6px;
    min-width: 54px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nav__links { display: none; }
    .nav__burger { display: block; }
    .nav__cta { margin-left: auto; }
    .nav__cta + .nav__burger { margin-left: 0; }

    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile--tall { grid-row: span 2; }
    .tile--span3, .tile--ml { grid-column: span 2; }
    .why { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .hero__grid { grid-template-columns: 1fr; }
    .tower { max-width: 360px; margin: 30px auto 0; }
    .roles, .work { grid-template-columns: 1fr; }
    .demo, .faq, .contact__grid, .stack { grid-template-columns: 1fr; }
    .demo { gap: 40px; }
    .faq__head { position: static; }
    .contact__grid { gap: 50px; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }
    .container { padding: 0 16px; }
    .nav { top: 10px; padding: 0 10px; }
    .nav__inner { padding: 8px 8px 8px 14px; gap: 10px; }
    .nav__cta { display: none; }
    .nav__burger, .nav__cta + .nav__burger { margin-left: auto; }
    .brand__word { font-size: 13px; }

    .hero { padding: 110px 0 80px; }
    .hero__chips { gap: 8px 16px; }
    .tag-l { left: 0; }
    .tag-r { right: 0; }
    .tower__tag { font-size: 10.5px; padding: 5px 9px; }

    .marquee__group { gap: 52px; padding-right: 52px; }
    .client-logo { height: 20px; }
    .client-logo--hi { height: 15px; }
    .client-word { font-size: 20px; }
    .client-word--sf { font-size: 16px; }

    .bento { grid-template-columns: 1fr; }
    .tile--wide { grid-column: auto; flex-direction: column; align-items: stretch; }
    .tile--tall { grid-row: auto; }
    .tile--span3, .tile--ml { grid-column: auto; }
    .viz-layers, .viz-learn { width: 100%; }
    .viz-learn { justify-content: flex-start; }

    .pipe__rail { display: none; }
    .pipe__nodes { grid-template-columns: repeat(3, 1fr); row-gap: 4px; }
    .pipe__dot { width: 34px; height: 34px; }
    .pipe__dot::after { inset: 10px; }
    .pipe__name { font-size: 13px; }
    .pipe__panel { grid-template-columns: 1fr; gap: 14px; padding: 26px; }

    .console { height: 560px; }
    .console__title { display: none; }
    .console__body { padding: 16px; }
    .chart__row { grid-template-columns: 74px 1fr 52px; gap: 8px; }

    .feature-list { grid-template-columns: 1fr; }
    .stack__hero { padding: 26px; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }

    .why, .process { grid-template-columns: 1fr; }
    .why { gap: 28px; margin-top: 60px; }

    .form { padding: 22px; }
    .form__row { grid-template-columns: 1fr; }

    .footer__bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .marquee__track { animation: none; }
    .reveal { opacity: 1; transform: none; filter: none; }
    .t-line { stroke-dashoffset: 0; }
}
