/* ============================================================================
   HugoCodesNet — v8  ·  Self-contained design system (NO Tailwind).
   Graphite & emerald, soft contrast, generous spacing, editorial layout.
   Loads render-blocking in <head> → no FOUC, always styled.
   ============================================================================ */

:root {
    /* Palette — soft dark */
    --bg: #191c20; --elev: #1e2226; --surface: #23282d; --surface-2: #2a3036;
    --line: rgba(236,233,222,.10); --line-2: rgba(236,233,222,.055);
    --ink: #e8e5db; --text: #b7bcb4; --muted: #8a9088; --faint: #666c65;
    --emerald: #35b183; --emerald-2: #4ac598; --on-emerald: #06231a;
    --emerald-soft: rgba(53,177,131,.12); --emerald-line: rgba(53,177,131,.30);
    --brass: #cbac74; --brass-soft: rgba(203,172,116,.12); --brass-line: rgba(203,172,116,.28);
    --sapphire: #6e90cc; --jade: #83c5a3; --copper: #d09b74;

    /* Fixed dark surfaces (terminal mockups) */
    --code-bg: #14171a; --code-bg-2: #101315; --code-fg: #d6ddd6;

    /* Fonts */
    --serif: 'Fraunces','Cormorant Garamond',Georgia,serif;
    --sans: 'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
    --mono: 'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;

    /* Spacing scale (generous) */
    --s-1:.25rem; --s-2:.5rem; --s-3:.75rem; --s-4:1rem; --s-5:1.5rem; --s-6:2rem; --s-7:3rem; --s-8:4rem;
    --gap: clamp(1.25rem, 2.4vw, 2rem);
    --sec-pad: clamp(5.5rem, 11vw, 10rem);
    --head-gap: clamp(3rem, 6vw, 5rem);

    --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-pill: 999px;
    --wrap: 1180px;
    --nav-h: 76px;
    --ease: cubic-bezier(.16,1,.3,1);
    --shadow: 0 26px 60px -34px rgba(0,0,0,.75);
    --shadow-lg: 0 50px 110px -50px rgba(0,0,0,.85);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
body {
    margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 16px; line-height: 1.7;
    color: var(--text); background-color: var(--bg);
    background-image:
        radial-gradient(1100px 640px at 86% -10%, rgba(53,177,131,.06), transparent 62%),
        radial-gradient(860px 580px at -10% 18%, rgba(203,172,116,.045), transparent 62%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--emerald); color: var(--on-emerald); }
h1,h2,h3,h4 { font-family: var(--serif); color: var(--ink); margin: 0; font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 4px; }
em { font-style: italic; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: .7rem 1.1rem; background: var(--emerald); color: var(--on-emerald); font-weight: 600; border-radius: 0 0 var(--r-sm) 0; }
.skip-link:focus { left: 0; }

/* ---------- layout primitives ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }
.wrap--narrow { max-width: 880px; }
.sec { padding: var(--sec-pad) 0; position: relative; }
.sec--alt { background: var(--elev); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.sec--clip { overflow: hidden; }

.sec-head { max-width: 46rem; margin: 0 auto var(--head-gap); text-align: center; }
.sec-head--left { margin-inline: 0; text-align: left; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--emerald); margin-bottom: 1.1rem; }
.sec-title { font-size: clamp(2rem, 4.4vw, 3.2rem); color: var(--ink); letter-spacing: -.02em; margin-bottom: 1.1rem; line-height: 1.08; }
.sec-title em { font-style: italic; }
.sec-sub { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 42rem; margin: 0 auto; line-height: 1.65; }
.sec-head--left .sec-sub { margin-inline: 0; }

.gradient-text {
    background: linear-gradient(92deg, var(--emerald), var(--brass), var(--jade), var(--emerald));
    background-size: 300% 100%; -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent; animation: grad 10s ease infinite;
}
@keyframes grad { 0%,100%{background-position:0 50%} 50%{background-position:100% 50%} }

/* ---------- grids ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font-family: var(--mono); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 1.05rem 1.9rem; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; transition: transform .35s var(--ease), background .25s, border-color .25s, box-shadow .35s, color .25s; position: relative; }
.btn i { font-size: 1.05rem; }
.btn--primary { background: var(--emerald); color: var(--on-emerald); box-shadow: 0 16px 34px -16px rgba(53,177,131,.55); }
.btn--primary:hover { background: var(--emerald-2); transform: translateY(-2px); box-shadow: 0 22px 44px -16px rgba(53,177,131,.65); }
.btn--primary:hover i { transform: translateX(3px); }
.btn--primary i { transition: transform .3s var(--ease); }
.btn--ghost { border-color: rgba(236,233,222,.18); color: var(--ink); }
.btn--ghost:hover { border-color: var(--emerald); color: var(--emerald); transform: translateY(-2px); }
.btn--light { background: #fff; color: #0d2b21; }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -16px rgba(0,0,0,.5); }
.btn--on-dark { border-color: rgba(255,255,255,.3); color: #fff; }
.btn--on-dark:hover { border-color: #fff; }

/* ---------- icon tile ---------- */
.tile { width: 3.3rem; height: 3.3rem; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--emerald); background: var(--emerald-soft); border: 1px solid var(--emerald-line); flex-shrink: 0; transition: background .4s, color .4s, transform .4s var(--ease); }
.tile--sm { width: 2.5rem; height: 2.5rem; font-size: 1.05rem; }
.tile.brass    { color: var(--brass);    background: var(--brass-soft);            border-color: var(--brass-line); }
.tile.sapphire { color: var(--sapphire); background: rgba(110,144,204,.12);        border-color: rgba(110,144,204,.28); }
.tile.jade     { color: var(--jade);     background: rgba(131,197,163,.12);        border-color: rgba(131,197,163,.28); }
.tile.copper   { color: var(--copper);   background: rgba(208,155,116,.12);        border-color: rgba(208,155,116,.28); }

/* ---------- card ---------- */
.card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.9rem, 3vw, 2.6rem); transition: transform .5s var(--ease), border-color .35s, box-shadow .5s; display: flex; flex-direction: column; box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 2px 4px rgba(0,0,0,.25), 0 18px 40px -30px rgba(0,0,0,.7); }
.card:hover { transform: translateY(-5px); border-color: var(--emerald-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 26px 60px -34px rgba(0,0,0,.8); }
.card__title { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); margin: 0 0 .7rem; }
.card__text { color: var(--muted); font-size: .95rem; line-height: 1.7; margin: 0; }
.card > .tile { margin-bottom: 1.5rem; }
.card:hover .tile { transform: translateY(-2px); }
/* icon tiles fill with their own hue on card hover */
.card:hover .tile { background: var(--emerald); color: var(--on-emerald); border-color: transparent; box-shadow: 0 10px 22px -10px var(--emerald-line); }
.card:hover .tile.brass    { background: var(--brass);    color: #241a06; box-shadow: 0 10px 22px -10px var(--brass-line); }
.card:hover .tile.sapphire { background: var(--sapphire); color: #0a1526; box-shadow: 0 10px 22px -10px rgba(110,144,204,.4); }
.card:hover .tile.jade     { background: var(--jade);     color: #0a2016; box-shadow: 0 10px 22px -10px rgba(131,197,163,.4); }
.card:hover .tile.copper   { background: var(--copper);   color: #2a1606; box-shadow: 0 10px 22px -10px rgba(208,155,116,.4); }

[data-spotlight]::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 0; background: radial-gradient(460px circle at var(--mx,50%) var(--my,0%), rgba(53,177,131,.12), transparent 60%); opacity: 0; transition: opacity .4s; }
[data-spotlight]:hover::before { opacity: 1; }
[data-spotlight] > * { position: relative; z-index: 1; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font-family: var(--mono); font-size: .76rem; padding: .35rem .75rem; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); color: var(--text); transition: color .2s, border-color .2s, background .2s, transform .2s var(--ease); }
.chip:hover { color: var(--emerald); border-color: var(--emerald-line); background: var(--emerald-soft); transform: translateY(-1px); }
.pill { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted); padding: .5rem 1rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.tag { font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .65rem; border-radius: var(--r-pill); color: var(--emerald); background: var(--emerald-soft); border: 1px solid var(--emerald-line); }

/* ---------- reveal on scroll (CSS keyframe; JS only sets data-delay) ---------- */
@keyframes rev      { from{opacity:0;transform:translateY(34px)} to{opacity:1;transform:none} }
@keyframes rev-l    { from{opacity:0;transform:translateX(-42px)} to{opacity:1;transform:none} }
@keyframes rev-r    { from{opacity:0;transform:translateX(42px)} to{opacity:1;transform:none} }
.reveal    { animation: rev 1s var(--ease) both; }
.reveal-l  { animation: rev-l 1s var(--ease) both; }
.reveal-r  { animation: rev-r 1s var(--ease) both; }
/* staggered cascade within card grids */
.grid > :nth-child(2), .bento > :nth-child(2), .kpis > :nth-child(2), .steps > :nth-child(2), .cases > :nth-child(2), .contact-grid > :nth-child(2), .timeline > :nth-child(2) { animation-delay: .07s; }
.grid > :nth-child(3), .bento > :nth-child(3), .kpis > :nth-child(3), .steps > :nth-child(3), .cases > :nth-child(3), .contact-grid > :nth-child(3), .timeline > :nth-child(3) { animation-delay: .14s; }
.grid > :nth-child(4), .bento > :nth-child(4), .kpis > :nth-child(4), .steps > :nth-child(4) { animation-delay: .21s; }
.grid > :nth-child(5), .bento > :nth-child(5), .steps > :nth-child(5) { animation-delay: .28s; }
.grid > :nth-child(6), .steps > :nth-child(6) { animation-delay: .35s; }

/* ---------- background fx ---------- */
.orb { position: absolute; border-radius: 9999px; filter: blur(80px); opacity: .45; pointer-events: none; z-index: 0; }
.orb--emerald { background: radial-gradient(circle, rgba(53,177,131,.6) 0%, transparent 70%); }
.orb--brass   { background: radial-gradient(circle, rgba(203,172,116,.5) 0%, transparent 70%); }
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--emerald), var(--brass)); z-index: 200; }
#grain { position: fixed; inset: 0; z-index: 9997; pointer-events: none; opacity: .04; mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 140px 140px; }
.float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.pulse-ring { position: absolute; inset: 0; border-radius: 50%; background: rgba(53,177,131,.55); animation: pring 2.6s cubic-bezier(.215,.61,.355,1) infinite; }
@keyframes pring { 0%{transform:scale(.7);opacity:.7} 100%{transform:scale(2.4);opacity:0} }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(25,28,32,.7); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, box-shadow .3s; }
.nav.is-scrolled { background: rgba(25,28,32,.9); border-bottom-color: var(--line-2); box-shadow: 0 12px 34px -22px rgba(0,0,0,.7); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-mark { width: 2.3rem; height: 2.3rem; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--emerald), var(--emerald-2)); color: var(--on-emerald); font-size: 1rem; box-shadow: 0 8px 20px -8px rgba(53,177,131,.5); transition: transform .3s var(--ease); }
.brand:hover .brand-mark { transform: rotate(6deg); }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--ink); }
.brand-name .dot { color: var(--emerald); }
.brand-name small { font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a { position: relative; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.5rem; height: 1px; background: var(--emerald); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover { color: var(--ink); } .nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-emerald); background: var(--emerald); padding: .65rem 1.15rem; border-radius: var(--r-pill); transition: background .2s, transform .2s; }
.nav-cta:hover { background: var(--emerald-2); transform: translateY(-1px); }
.nav-burger { display: none; width: 2.9rem; height: 2.9rem; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; font-size: 1.4rem; }
.nav-drawer { display: none; }
@media (max-width: 1000px) {
    .nav-links, .nav-inner > .nav-cta { display: none; }
    .nav-burger { display: inline-flex; }
    .nav-drawer { flex-direction: column; gap: .25rem; padding: .5rem clamp(1.25rem,4vw,2.5rem) 1.5rem; border-top: 1px solid var(--line); background: var(--bg); }
    .nav-drawer.is-open { display: flex; }
    .nav-drawer a { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); padding: .95rem 0; border-bottom: 1px solid var(--line-2); }
    .nav-drawer a.nav-cta { justify-content: center; color: var(--on-emerald); border: 0; margin-top: .8rem; padding: .95rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 1; padding: clamp(3.5rem,7vw,6rem) 0 clamp(4.5rem,9vw,8rem); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2.5rem,5vw,5rem); align-items: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--emerald); background: var(--emerald-soft); border: 1px solid var(--emerald-line); padding: .5rem 1rem; border-radius: var(--r-pill); margin-bottom: 1.8rem; }
.hero-eyebrow .d { width: .45rem; height: .45rem; border-radius: 50%; background: var(--emerald); }
.hero-title { font-size: clamp(2.7rem, 6.2vw, 4.8rem); color: var(--ink); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 1.8rem; }
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 34rem; line-height: 1.7; margin-bottom: 2.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1rem 2rem; color: var(--muted); font-size: .9rem; }
.hero-trust > div { display: inline-flex; align-items: center; gap: .55rem; }
.hero-trust i { color: var(--emerald); }
.hero-visual { position: relative; }
.hero-visual .glow { position: absolute; inset: -1.5rem; border-radius: var(--r-lg); background: linear-gradient(140deg, rgba(53,177,131,.22), transparent 55%, rgba(110,144,204,.18)); filter: blur(30px); z-index: 0; }
@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
    .hero-visual { order: -1; max-width: 420px; margin-inline: auto; }
}

/* mockup */
.mockup { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; }
.mockup-head { display: flex; align-items: center; gap: .5rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.dot { width: .7rem; height: .7rem; border-radius: 50%; } .dot.r{background:#c8756a} .dot.y{background:var(--brass)} .dot.g{background:var(--emerald)}
.mockup-url { margin-left: .6rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.mockup-body { padding: 1.5rem; }
.mockup-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.1rem; }
.mockup-row .lbl { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mockup-row .big { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); }
.chart { height: 8rem; display: flex; align-items: flex-end; gap: .5rem; margin-bottom: 1.3rem; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.chart-bar { width: 100%; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--emerald-2), var(--emerald)); min-height: 8px; transform-origin: bottom; animation: bar-grow .9s var(--ease) both; }
@keyframes bar-grow { from { transform: scaleY(0); opacity: .35; } to { transform: scaleY(1); opacity: 1; } }
.chart .col:nth-child(2) .chart-bar { animation-delay: .06s; } .chart .col:nth-child(3) .chart-bar { animation-delay: .12s; } .chart .col:nth-child(4) .chart-bar { animation-delay: .18s; } .chart .col:nth-child(5) .chart-bar { animation-delay: .24s; } .chart .col:nth-child(6) .chart-bar { animation-delay: .30s; } .chart .col:nth-child(7) .chart-bar { animation-delay: .36s; }
.chart .col span { font-family: var(--mono); font-size: .62rem; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.mini { border-radius: var(--r-sm); padding: .85rem 1rem; border: 1px solid var(--line); background: var(--surface-2); }
.mini.accent { background: var(--emerald-soft); border-color: var(--emerald-line); }
.mini .k { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mini.accent .k { color: var(--emerald); }
.mini .v { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.float-card { position: absolute; bottom: -1.6rem; left: -1.4rem; z-index: 2; display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.float-card .ic { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--emerald-soft); color: var(--emerald); display: flex; align-items: center; justify-content: center; }
.float-card .t1 { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.float-card .t2 { font-size: .85rem; font-weight: 600; color: var(--ink); }
@media (max-width: 520px) { .float-card { position: static; margin-top: 1.5rem; } }

/* ---------- marquee ---------- */
.marquee-band { background: var(--elev); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 1.4rem 0; overflow: hidden; }
.marquee-mask { -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); overflow: hidden; }
.marquee-track { display: inline-flex; gap: 2.8rem; width: max-content; white-space: nowrap; align-items: center; animation: marq 62s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marq { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
.marquee-item { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .92rem; color: var(--text); }
.marquee-item i { color: var(--emerald); font-size: 1.1rem; }
.marquee-sep { color: var(--brass); opacity: .5; }

/* ---------- KPI band ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 2.5rem; }
.kpi { text-align: center; }
.kpi .tile { margin: 0 auto 1.1rem; }
.kpi-val { font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--ink); line-height: 1; }
.kpi-lbl { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .7rem; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2.5rem,5vw,5rem); align-items: center; }
.about-lead { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); line-height: 1.45; margin-bottom: 1.4rem; }
.about-grid p { color: var(--muted); margin-bottom: 1.1rem; }
.hobbies { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: .75rem; margin-top: 2rem; }
.hobby { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border-radius: var(--r-sm); background: var(--brass-soft); border: 1px solid var(--brass-line); color: var(--text); font-size: .9rem; }
.hobby i { color: var(--brass); }
.about-visual { position: relative; }
.photo-card { position: relative; z-index: 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-lg); }
.photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center 20%; }
.photo-card .who { padding: 1.2rem 1.3rem; font-family: var(--mono); font-size: .82rem; line-height: 1.6; border-top: 1px solid var(--line); }
.photo-card .who .p { color: var(--emerald); } .photo-card .who strong { color: var(--ink); } .photo-card .who .r { color: var(--emerald); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 3rem; } }

/* ---------- bento (services) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.bento .card { grid-column: span 4; }
.bento .b-big { grid-column: span 8; }
.bento .b-dark { grid-column: span 4; background: linear-gradient(150deg, #1c5f47, #12201c); border-color: var(--emerald-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.09); }
.bento .b-dark:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 26px 60px -34px rgba(0,0,0,.8); }
.bento .b-dark .card__title, .bento .b-dark { color: #fff; }
.bento .b-dark .card__title { color: #fff; }
.bento .b-dark .card__text { color: rgba(255,255,255,.72); }
.bento .b-dark .tile { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.feature-points { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 2rem; margin-top: auto; padding-top: 1.6rem; }
.feature-points li { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--text); list-style: none; }
.feature-points i { color: var(--emerald); margin-top: .25rem; }
.feature-points { padding-left: 0; margin-bottom: 0; }
@media (max-width: 980px) {
    .bento { grid-template-columns: repeat(6, 1fr); }
    .bento .card { grid-column: span 2; } .bento .b-big { grid-column: span 6; } .bento .b-dark { grid-column: span 6; }
}
@media (max-width: 620px) { .bento .card, .bento .b-big, .bento .b-dark { grid-column: span 6; } .feature-points { grid-template-columns: 1fr; } }

/* ---------- steps (process) ---------- */
.steps { display: flex; flex-direction: column; gap: 1.1rem; }
.card.step { display: grid; grid-template-columns: 4.5rem 1fr; gap: clamp(1.25rem,3vw,2.2rem); align-items: center; padding: clamp(1.5rem,2.4vw,2rem) clamp(1.75rem,3vw,2.4rem); }
.step-no { font-family: var(--serif); font-style: italic; font-size: clamp(2.8rem,5vw,3.6rem); color: var(--emerald); opacity: .34; line-height: 1; text-align: center; transition: opacity .4s; }
.card.step:hover .step-no { opacity: .6; }
.step-head { display: flex; align-items: center; gap: .85rem; margin-bottom: .5rem; }
.step-head h3 { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
@media (max-width: 560px) { .card.step { grid-template-columns: 1fr; } .step-no { text-align: left; font-size: 2.6rem; } }

/* skill card */
.skill-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.skill-head h3 { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); }

/* deploy status row inside hero mockup */
.deploy-row { display: flex; align-items: center; gap: .85rem; margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.deploy-row .ic { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--emerald-soft); color: var(--emerald); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.deploy-row .t1 { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.deploy-row .t2 { font-size: .88rem; font-weight: 600; color: var(--ink); }

/* ---------- cases ---------- */
.cases { display: flex; flex-direction: column; gap: var(--gap); }
.case { position: relative; overflow: hidden; }
.case::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c, var(--emerald)); }
.case-grid { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(1.75rem,3vw,3rem); }
.case-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.3rem; }
.case-ic { width: 3.3rem; height: 3.3rem; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 1.45rem; flex-shrink: 0; }
.case-kind { font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.case-name { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); line-height: 1.1; }
.case-tag { color: var(--ink); font-size: 1.05rem; margin-bottom: 1.4rem; }
.case-block { margin-bottom: 1.1rem; }
.case-block h4 { font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.case-block p { color: var(--text); font-size: .92rem; line-height: 1.7; }
.case-stack { margin-top: 1.4rem; }
.case-results { display: flex; flex-direction: column; gap: .8rem; }
.case-result { border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-2); padding: 1.1rem 1.2rem; }
.case-result .v { font-family: var(--serif); font-size: 1.3rem; }
.case-result .l { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
@media (max-width: 820px) { .case-grid { grid-template-columns: 1fr; } .case-results { flex-direction: row; flex-wrap: wrap; } .case-result { flex: 1 1 140px; } }

/* ---------- article (automation) ---------- */
.article-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem,5vw,4rem); align-items: start; }
.article-lead { font-family: var(--serif); font-size: 1.45rem; color: var(--ink); line-height: 1.45; margin-bottom: 1.8rem; }
.article-body h3 { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); margin: 2rem 0 .6rem; }
.article-body h3:first-of-type { margin-top: 0; }
.article-body p { color: var(--muted); margin-bottom: 1.2rem; }
.article-body em { color: var(--emerald); font-style: normal; font-weight: 600; }
.article-list { display: flex; flex-direction: column; gap: .9rem; margin-top: .5rem; list-style: none; padding: 0; }
.article-list li { display: flex; align-items: flex-start; gap: .9rem; color: var(--text); font-size: .95rem; }
.article-sticky { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
@media (max-width: 1000px) { .article-grid { grid-template-columns: 1fr; } .article-sticky { position: static; } }

/* ---------- quote ---------- */
.quote { max-width: 60rem; margin: 0 auto clamp(3.5rem,7vw,6rem); text-align: center; }
.quote .qm { color: var(--emerald); font-size: 3rem; line-height: 1; }
.quote p { font-family: var(--serif); font-size: clamp(1.6rem,3.4vw,2.5rem); color: var(--ink); line-height: 1.35; margin: .8rem 0 1.4rem; }
.quote .by { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- timeline ---------- */
.timeline { position: relative; list-style: none; padding: 0; margin: 0; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(180deg, var(--emerald), var(--brass-line), transparent); }
.tl-item { position: relative; padding-left: 3rem; margin-bottom: var(--gap); }
.tl-item:last-child { margin-bottom: 0; }
.tl-node { position: absolute; left: 5px; top: .4rem; width: 14px; height: 14px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 5px var(--emerald-soft); }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .6rem; margin-bottom: .5rem; }
.tl-head h3 { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); }
.period { font-family: var(--mono); font-size: .74rem; color: var(--emerald); background: var(--emerald-soft); border: 1px solid var(--emerald-line); padding: .25rem .7rem; border-radius: var(--r-pill); }
.tl-meta { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.tl-meta i { color: var(--emerald); margin-right: .3rem; }
.tl-meta .sep { margin: 0 .6rem; opacity: .4; }
.bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.bullets li { display: flex; gap: .7rem; color: var(--text); font-size: .93rem; }
.bullets li::before { content: "▸"; color: var(--emerald); flex-shrink: 0; }

/* ---------- education ---------- */
.edu-period { align-self: flex-start; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--emerald); background: var(--emerald-soft); border: 1px solid var(--emerald-line); padding: .25rem .65rem; border-radius: var(--r-pill); margin-bottom: 1rem; }
.edu-title { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); line-height: 1.35; margin-bottom: .3rem; }
.edu-inst { font-size: .88rem; color: var(--muted); margin-top: auto; padding-top: .8rem; }
.edu-note { font-size: .8rem; color: var(--emerald); margin-top: .5rem; display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- faq ---------- */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .3s; }
.faq-item.is-open { border-color: var(--emerald-line); }
.faq-item:not(.is-open):hover { border-color: var(--emerald-line); }
.faq-item:not(.is-open):hover .faq-icon { color: var(--emerald); border-color: var(--emerald-line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; padding: 1.4rem 1.6rem; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.faq-icon { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--brass-line); color: var(--brass); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .3s var(--ease), background .2s, color .2s, border-color .2s; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); background: var(--emerald-soft); border-color: var(--emerald-line); color: var(--emerald); }
.faq-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq-body > div { overflow: hidden; }
.faq-item.is-open .faq-body { grid-template-rows: 1fr; }
.faq-a { padding: 0 1.6rem 1.5rem; color: var(--muted); line-height: 1.7; max-width: 64ch; }

/* ---------- CTA ---------- */
.cta-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: clamp(3rem,7vw,6rem) clamp(1.5rem,5vw,3rem); text-align: center; background: linear-gradient(150deg, #1c5f47, #10201b); border: 1px solid var(--emerald-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow-lg); }
.cta-card .inner { position: relative; z-index: 1; }
.cta-card .eyebrow { color: rgba(255,255,255,.85); }
.cta-card h2 { font-family: var(--serif); font-size: clamp(2.2rem,5.5vw,3.6rem); color: #fff; margin-bottom: 1.1rem; }
.cta-card p { color: rgba(255,255,255,.86); font-size: 1.1rem; max-width: 40rem; margin: 0 auto 2.4rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- contact ---------- */
.avail { display: flex; justify-content: center; margin-bottom: 3rem; }
.avail .badge { display: inline-flex; align-items: center; gap: .7rem; padding: .65rem 1.2rem; border-radius: var(--r-pill); background: var(--emerald-soft); border: 1px solid var(--emerald-line); color: var(--ink); font-size: .92rem; }
.avail .rt { color: var(--muted); }
.avail .dot { position: relative; width: .6rem; height: .6rem; border-radius: 50%; background: var(--emerald); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); max-width: 62rem; margin: 0 auto 3rem; }
.contact-card { display: flex; align-items: center; gap: 1.1rem; flex-direction: row; }
.contact-card .tile { margin: 0; }
.contact-card .cb { min-width: 0; flex: 1; }
.contact-card .cl { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-card .cv { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.contact-card .arr { color: var(--muted); transition: transform .3s var(--ease), color .3s; }
.contact-card:hover .arr { color: var(--emerald); transform: translate(3px,-3px); }
.contact-foot { font-family: var(--mono); font-size: .85rem; color: var(--muted); text-align: center; }
.contact-foot .p { color: var(--emerald); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .avail .badge { flex-direction: column; gap: .35rem; border-radius: var(--r); text-align: center; } }

/* ---------- footer ---------- */
.footer { background: var(--elev); border-top: 1px solid var(--line-2); padding: clamp(3.5rem,6vw,5rem) 0 2rem; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3.5rem; }
.footer-tag { color: var(--muted); font-size: .9rem; max-width: 22rem; margin-top: 1rem; }
.footer-social { display: flex; gap: .7rem; margin-top: 1.6rem; }
.footer-social a { width: 2.6rem; height: 2.6rem; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--text); display: inline-flex; align-items: center; justify-content: center; transition: color .2s, border-color .2s; }
.footer-social a:hover { color: var(--emerald); border-color: var(--emerald-line); }
.footer-col h3 { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.footer-col a { color: var(--text); font-size: .92rem; transition: color .2s; } .footer-col a:hover { color: var(--emerald); }
.footer-col a i { color: var(--brass); margin-right: .4rem; }
.footer-mega { font-family: var(--serif); font-style: italic; font-size: clamp(2rem,13vw,10rem); line-height: 1; letter-spacing: -.03em; margin-bottom: 2.5rem; }
.footer-mega .a { color: var(--emerald); } .footer-mega .b { color: var(--brass); font-style: normal; } .footer-mega .c { color: var(--faint); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line-2); padding-top: 1.6rem; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.footer-bottom i { color: var(--brass); }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   AI PIPELINE DEMO (terminal mockup)
   ============================================================================ */
.demo-frame { border-radius: var(--r); overflow: hidden; background: radial-gradient(ellipse at top, rgba(53,177,131,.1), transparent 60%), linear-gradient(180deg, var(--code-bg), var(--code-bg-2)); border: 1px solid rgba(203,172,116,.22); box-shadow: var(--shadow-lg); }
.demo-frame-header { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; background: rgba(0,0,0,.3); border-bottom: 1px solid rgba(255,255,255,.06); }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; } .demo-dot.red{background:#c8756a} .demo-dot.yellow{background:var(--brass)} .demo-dot.green{background:var(--emerald)}
.demo-frame-title { margin-left: .6rem; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.demo-live { margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .6rem; border-radius: var(--r-pill); background: rgba(53,177,131,.1); border: 1px solid rgba(53,177,131,.3); color: var(--emerald); font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; }
.demo-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 8px var(--emerald); animation: live-blink 1.5s ease-in-out infinite; }
@keyframes live-blink { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.85)} }
.demo-pipeline { position: relative; display: grid; grid-template-columns: 1fr 1.1fr 1fr; padding: 1.6rem 1.25rem; min-height: 320px; isolation: isolate; }
.demo-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.demo-col { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; gap: .4rem; }
.demo-col-in { align-items: flex-start; } .demo-col-out { align-items: flex-end; } .demo-col-brain { align-items: center; justify-content: center; gap: .85rem; }
.demo-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; border-radius: var(--r-pill); background: rgba(20,26,22,.9); border: 1px solid rgba(53,177,131,.25); color: #eef2ee; font-family: var(--mono); font-size: .77rem; white-space: nowrap; box-shadow: 0 4px 12px -4px rgba(0,0,0,.5); animation: pill-pulse 6s ease-in-out infinite; }
.demo-pill i { color: var(--emerald); }
@keyframes pill-pulse { 0%,100%{transform:translateX(0)} 50%{transform:translateX(2px)} }
.demo-col-in .demo-pill:nth-child(1){animation-delay:0s;border-color:rgba(53,177,131,.35)} .demo-col-in .demo-pill:nth-child(2){animation-delay:.6s;border-color:rgba(110,144,204,.35)} .demo-col-in .demo-pill:nth-child(3){animation-delay:1.2s;border-color:rgba(203,172,116,.35)} .demo-col-in .demo-pill:nth-child(4){animation-delay:1.8s;border-color:rgba(53,177,131,.35)} .demo-col-in .demo-pill:nth-child(5){animation-delay:2.4s;border-color:rgba(110,144,204,.35)}
.demo-col-out .demo-pill:nth-child(1){animation-delay:.4s} .demo-col-out .demo-pill:nth-child(2){animation-delay:1s} .demo-col-out .demo-pill:nth-child(3){animation-delay:1.6s} .demo-col-out .demo-pill:nth-child(4){animation-delay:2.2s} .demo-col-out .demo-pill:nth-child(5){animation-delay:2.8s}
.demo-col-in i.bi-receipt, .demo-col-out i.bi-file-earmark-pdf { color: var(--emerald); }
.demo-col-in i.bi-envelope, .demo-col-out i.bi-reply { color: var(--sapphire); }
.demo-col-in i.bi-file-earmark-text, .demo-col-out i.bi-archive { color: var(--brass); }
.demo-col-in i.bi-person-plus, .demo-col-out i.bi-file-earmark-richtext { color: var(--jade); }
.demo-col-in i.bi-broadcast-pin, .demo-col-out i.bi-bell { color: var(--copper); }
.demo-brain-wrap { position: relative; width: 130px; height: 130px; display: flex; align-items: center; justify-content: center; }
.demo-brain-ring { position: absolute; border-radius: 50%; border: 1.5px dashed rgba(53,177,131,.35); inset: 0; }
.demo-brain-ring.r1 { border-style: solid; border-color: rgba(53,177,131,.2); animation: ring-pulse 3s ease-in-out infinite; }
.demo-brain-ring.r2 { inset: 12px; animation: ring-spin 15s linear infinite; }
.demo-brain-ring.r3 { inset: 26px; border-style: dotted; border-color: rgba(203,172,116,.42); animation: ring-spin 24s linear infinite reverse; }
@keyframes ring-spin { to { transform: rotate(360deg); } }
@keyframes ring-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(53,177,131,.25), inset 0 0 18px rgba(53,177,131,.12)} 50%{box-shadow:0 0 0 8px transparent, inset 0 0 28px rgba(53,177,131,.22)} }
.demo-brain-orbit { position: absolute; inset: 6px; border-radius: 50%; animation: ring-spin 9s linear infinite; }
.demo-orbit-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px var(--emerald); top: -4px; left: 50%; }
.demo-orbit-dot:nth-child(1){transform:rotate(0) translate(0,-60px)} .demo-orbit-dot:nth-child(2){transform:rotate(120deg) translate(0,-60px); background:var(--brass); box-shadow:0 0 12px var(--brass)} .demo-orbit-dot:nth-child(3){transform:rotate(240deg) translate(0,-60px); background:var(--sapphire); box-shadow:0 0 12px var(--sapphire)}
.demo-brain-core { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at center, rgba(53,177,131,.35), transparent 70%), rgba(10,13,11,.95); border: 1.5px solid rgba(53,177,131,.55); display: flex; align-items: center; justify-content: center; color: var(--emerald); font-size: 1.6rem; box-shadow: 0 0 30px rgba(53,177,131,.45), inset 0 0 22px rgba(53,177,131,.18); animation: core-pulse 2.4s ease-in-out infinite; z-index: 2; }
@keyframes core-pulse { 0%,100%{transform:scale(1);filter:brightness(1)} 50%{transform:scale(1.08);filter:brightness(1.25)} }
.demo-brain-status { position: relative; height: 1.2rem; width: min(11rem, 100%); text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--emerald); }
.demo-brain-status span { position: absolute; inset: 0; opacity: 0; animation: status-cycle 8s linear infinite; }
.demo-brain-status .s1{animation-delay:0s} .demo-brain-status .s2{animation-delay:2s} .demo-brain-status .s3{animation-delay:4s} .demo-brain-status .s4{animation-delay:6s}
@keyframes status-cycle { 0%,22%,100%{opacity:0;transform:translateY(4px)} 3%,22%{opacity:1;transform:translateY(0)} 25%{opacity:0;transform:translateY(-4px)} }
.demo-packets { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.pkt { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); top: 0; left: 0; opacity: 0; }
@keyframes pkt-in-flow { 0%{left:12%;top:var(--y);opacity:0} 8%{opacity:1} 100%{left:50%;top:50%;opacity:0} }
.pkt-in { animation: pkt-in-flow 2.3s cubic-bezier(.4,0,.6,1) infinite; }
.pkt-i1{--y:12%;animation-delay:0s;background:var(--emerald);box-shadow:0 0 10px var(--emerald)} .pkt-i2{--y:32%;animation-delay:.4s;background:var(--sapphire);box-shadow:0 0 10px var(--sapphire)} .pkt-i3{--y:52%;animation-delay:.8s;background:var(--brass);box-shadow:0 0 10px var(--brass)} .pkt-i4{--y:72%;animation-delay:1.2s;background:var(--jade);box-shadow:0 0 10px var(--jade)} .pkt-i5{--y:92%;animation-delay:1.6s;background:var(--copper);box-shadow:0 0 10px var(--copper)}
@keyframes pkt-out-flow { 0%{left:50%;top:50%;opacity:0} 10%{opacity:1} 100%{left:88%;top:var(--y);opacity:0} }
.pkt-out { animation: pkt-out-flow 2.3s cubic-bezier(.4,0,.6,1) infinite; }
.pkt-o1{--y:12%;animation-delay:1.15s;background:var(--brass);box-shadow:0 0 10px var(--brass)} .pkt-o2{--y:32%;animation-delay:1.55s;background:var(--sapphire);box-shadow:0 0 10px var(--sapphire)} .pkt-o3{--y:52%;animation-delay:1.95s;background:var(--emerald);box-shadow:0 0 10px var(--emerald)} .pkt-o4{--y:72%;animation-delay:2.35s;background:var(--jade);box-shadow:0 0 10px var(--jade)} .pkt-o5{--y:92%;animation-delay:2.75s;background:var(--copper);box-shadow:0 0 10px var(--copper)}
.demo-log { position: relative; height: 110px; overflow: hidden; background: rgba(0,0,0,.35); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); font-family: var(--mono); font-size: .76rem; color: #b6c0b4; -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.demo-log-inner { padding: .6rem 1rem; animation: log-scroll 24s linear infinite; }
@keyframes log-scroll { 0%{transform:translateY(0)} 100%{transform:translateY(-50%)} }
.demo-log-line { padding: .18rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-log-line .t { color: #6f776d; margin-right: .6rem; } .demo-log-line .ok { color: var(--emerald); font-weight: 700; margin-right: .4rem; } .demo-log-line .warn { color: var(--brass); font-weight: 700; margin-right: .4rem; }
.demo-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(0,0,0,.25); }
.demo-stat { padding: .9rem .4rem; text-align: center; border-right: 1px solid rgba(255,255,255,.06); }
.demo-stat:last-child { border-right: 0; }
.demo-stat-val { display: block; font-family: var(--serif); font-size: 1.3rem; color: var(--emerald); line-height: 1; }
.demo-stat-val small { font-size: .55em; color: #b6c0b4; }
.demo-stat-lbl { display: block; font-size: .66rem; color: #9aa398; margin-top: .35rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 640px) {
    .demo-pipeline { grid-template-columns: 1fr; row-gap: 1.25rem; }
    .demo-col-in, .demo-col-out { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
    .demo-brain-status { width: auto; max-width: 100%; } .demo-brain-wrap { width: 110px; height: 110px; }
    .demo-pill { white-space: normal; } .demo-wires, .demo-packets { display: none; }
    .demo-stats { grid-template-columns: repeat(2, 1fr); } .demo-stat:nth-child(2n) { border-right: 0; }
}

/* ============================================================================
   CODE SHOWCASE (terminal + interactive tabs)
   ============================================================================ */
.code-showcase { display: grid; grid-template-columns: 290px 1fr; gap: clamp(1.5rem,3vw,2.2rem); align-items: start; }
.code-side { position: sticky; top: calc(var(--nav-h) + 1rem); display: flex; flex-direction: column; gap: 1.4rem; max-height: calc(100vh - var(--nav-h) - 2rem); overflow-y: auto; padding-right: .4rem; }
.code-side::-webkit-scrollbar { width: 6px; } .code-side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.code-category-title { font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin: 0 0 .5rem; display: flex; align-items: center; gap: .5rem; }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; }
.code-tab-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.code-tab { width: 100%; display: flex; align-items: center; gap: .65rem; padding: .65rem .85rem; background: transparent; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--muted); font-family: var(--mono); font-size: .83rem; cursor: pointer; text-align: left; transition: all .2s var(--ease); }
.code-tab:hover { background: var(--surface); color: var(--ink); }
.code-tab.is-active { background: var(--emerald-soft); border-color: var(--emerald-line); color: var(--ink); }
.code-tab i { font-size: 1rem; color: var(--muted); } .code-tab.is-active i { color: var(--emerald); }
.code-tab .tab-name { flex: 1; } .code-tab .tab-arrow { color: var(--emerald); font-size: .85rem; }
.code-panel { overflow: hidden; border-radius: var(--r); border: 1px solid rgba(203,172,116,.2); background: linear-gradient(180deg, var(--code-bg), var(--code-bg-2)); box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.3rem; background: rgba(0,0,0,.35); border-bottom: 1px solid rgba(255,255,255,.06); }
.code-traffic { display: inline-flex; gap: .35rem; } .code-traffic span { width: 12px; height: 12px; border-radius: 50%; background: #3a423b; } .code-traffic span:nth-child(1){background:#c8756a} .code-traffic span:nth-child(2){background:var(--brass)} .code-traffic span:nth-child(3){background:var(--emerald)}
.code-file { flex: 1; font-family: var(--mono); font-size: .83rem; color: #b6c0b4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-file i { color: var(--emerald); margin-right: .35rem; }
.code-lang-pill { font-family: var(--mono); font-size: .64rem; padding: .25rem .6rem; border-radius: var(--r-pill); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.code-meta { padding: 1.6rem 1.8rem .5rem; }
.code-cat { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.code-meta h3 { font-family: var(--serif); color: #fff; font-size: 1.35rem; margin: .35rem 0 .5rem; }
.code-meta p { color: #b6c0b4; margin: 0 0 1rem; max-width: 65ch; font-size: .93rem; line-height: 1.6; }
.code-block { margin: 0; padding: 1rem 1.6rem 1.9rem; overflow-x: auto; font-family: var(--mono); font-size: .83rem; line-height: 1.7; color: var(--code-fg); background: transparent; }
.code-block code { font-family: inherit; color: inherit; background: transparent; }
.code-block::-webkit-scrollbar { height: 8px; } .code-block::-webkit-scrollbar-thumb { background: rgba(53,177,131,.3); border-radius: 4px; }
.tok-k { color: #e0a3c8; font-weight: 600; } .tok-t { color: #8fd0c4; } .tok-f { color: var(--brass); } .tok-s { color: #9fd8a4; } .tok-n { color: #b9a6e0; } .tok-c { color: #6b756a; font-style: italic; }
@media (max-width: 900px) { .code-showcase { grid-template-columns: 1fr; } .code-side { position: static; max-height: none; overflow: visible; flex-direction: row; flex-wrap: wrap; } }

/* ---------- blazor system ui ---------- */
.blazor-error-boundary { background: #241012; color: #fff; padding: 1rem 1.5rem; border: 1px solid #c8756a; border-radius: var(--r); }
.blazor-error-boundary::after { content: "Er is een fout opgetreden."; }
#blazor-error-ui { background: #16130a; border-top: 1px solid var(--brass); bottom: 0; color: var(--brass); display: none; left: 0; padding: .8rem 1.5rem; position: fixed; width: 100%; z-index: 1000; font-family: var(--mono); font-size: .9rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: .8rem; background: none; border: 0; color: inherit; font: inherit; line-height: 1; padding: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .reveal, .reveal-l, .reveal-r { animation: none !important; opacity: 1; transform: none; }
    #grain { display: none !important; }
}
