/* ==========================================================================
   WEBLINE.LK v4 | "The Swarm"
   Night-ocean world, one live WebGL swarm (assets/js/swarm.js) layered
   between photographic plates and real HTML. Cabinet Grotesk display,
   Geist body, Geist Mono labels. Azure = Webline/AI, teal = Codexa,
   violet = Nyoxa. Radius: 10px controls, 18px surfaces, 999px pills.
   Layering: section plates (z 0) < swarm canvas (z 1) < content (z 2).
   ========================================================================== */

@font-face { font-family: 'Cabinet Grotesk'; src: url('../fonts/cabinet-grotesk-vf.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/geist-vf.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-vf.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #03060e;
  --bg-2: #070c19;
  --glass: rgba(12, 20, 40, 0.58);
  --glass-2: rgba(18, 28, 54, 0.72);
  --line: rgba(150, 185, 255, 0.13);
  --line-2: rgba(150, 185, 255, 0.24);
  --txt: #f3f6fc;
  --txt-2: #c6d1e6;
  --txt-3: #8b98b4;
  --accent: #0a8bff;
  --accent-2: #7bcbfe;
  --accent-ink: #ffffff;
  --teal: #37dbb6;
  --violet: #9d7bfa;
  --wa-out: #1d6b4c;
  --wa-in: #1b2436;
  --display: 'Cabinet Grotesk', 'Segoe UI', system-ui, sans-serif;
  --sans: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Code', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1.25rem, 4.2vw, 3.5rem);
  --wide: 80rem;
  --horizon: 60%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans); font-size: 1rem; line-height: 1.6; font-weight: 400;
  color: var(--txt-2); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 300; background: var(--accent); color: #fff; padding: 0.6rem 1rem; }
.skip-link:focus { left: 0; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { color: var(--txt); font-family: var(--display); font-weight: 800; line-height: 0.98; letter-spacing: -0.025em; }
.h-display { font-size: clamp(3rem, 7.4vw, 6.6rem); }
.h-xl { font-size: clamp(2.3rem, 4.8vw, 4.1rem); line-height: 1.02; }
.h-lg { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.08; }
.h-md { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.15; letter-spacing: -0.015em; }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.6; color: var(--txt-2); max-width: 40em; }
p { max-width: 64ch; }
.muted { color: var(--txt-3); }
.dot { color: var(--accent); }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--txt-3); }
.eyebrow { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.t-teal { --tone: var(--teal); }
.t-violet { --tone: var(--violet); }
.eyebrow.t-teal { color: var(--teal); }
.eyebrow.t-violet { color: var(--violet); }

/* ---------- Layout ---------- */
.container { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(5rem, 11vw, 9rem); }
.section-sm { position: relative; padding-block: clamp(3.5rem, 7vw, 6rem); }
.section > .container, .section-sm > .container, .chapter > .container,
.page-hero > .container, .close > .container { position: relative; z-index: 2; }
.stack-1 > * + * { margin-top: 1rem; }
.stack-2 > * + * { margin-top: 1.5rem; }

/* Photographic plate behind a section. Edges dissolve into the page so
   chapters read as one continuous night, not stacked cards. */
.chapter { position: relative; isolation: auto; padding-block: clamp(6rem, 13vw, 11rem); }
.plate { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.plate img { width: 100%; height: 100%; object-fit: cover; }
.plate::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(3, 6, 14, 0) 22%, rgba(3, 6, 14, 0) 72%, var(--bg) 100%),
    linear-gradient(to right, rgba(3, 6, 14, 0.78) 0%, rgba(3, 6, 14, 0.25) 46%, rgba(3, 6, 14, 0) 70%);
}
.plate.center::after {
  background:
    linear-gradient(to bottom, var(--bg) 0%, rgba(3, 6, 14, 0) 25%, rgba(3, 6, 14, 0) 70%, var(--bg) 100%),
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(3, 6, 14, 0.5), rgba(3, 6, 14, 0) 70%);
}

/* ---------- Swarm canvas (fixed, between plates and content) ---------- */
#swarm {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease);
}
#swarm.on { opacity: 1; }
main, footer { position: relative; }
.nav { z-index: 100; }
.mnav { z-index: 95; } /* below the nav so the burger stays reachable as the close button */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem; border-radius: 10px;
  font-family: var(--sans); font-weight: 560; font-size: 0.98rem; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .ar { transition: transform 0.4s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 34px -12px rgba(10, 139, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-primary:hover { background: #2a9bff; box-shadow: 0 14px 40px -12px rgba(10, 139, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-ghost { color: var(--txt); border: 1px solid rgba(220, 232, 255, 0.34); background: rgba(6, 10, 22, 0.32); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: rgba(220, 232, 255, 0.6); background: rgba(14, 22, 44, 0.55); }
.btn-sm { padding: 0.6rem 1.05rem; font-size: 0.9rem; border-radius: 9px; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 560; color: var(--txt); transition: color 0.3s; }
.link-arrow .ar { transition: transform 0.4s var(--ease); }
.link-arrow:hover { color: var(--tone, var(--accent-2)); }
.link-arrow:hover .ar { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: 4.6rem;
  display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.4rem);
  padding-inline: var(--gutter);
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), height 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid { height: 4rem; background: rgba(3, 6, 14, 0.74); border-color: var(--line); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; margin-right: auto; }
.brand svg { height: 1.55rem; width: auto; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 1.42rem; letter-spacing: -0.03em; color: var(--txt); }
.brand i { font-style: normal; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2.2vw, 2.1rem); }
.nav-links > li > a:not(.btn) { font-size: 0.95rem; font-weight: 480; color: var(--txt-2); transition: color 0.3s; }
.nav-links > li > a:not(.btn):hover, .nav-links > li > a[aria-current] { color: var(--txt); }
.has-menu { position: relative; }
.has-menu > a::after { content: ''; display: inline-block; width: 0.38em; height: 0.38em; margin-left: 0.45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-0.18em) rotate(45deg); opacity: 0.7; }
.menu {
  position: absolute; top: calc(100% + 1.1rem); left: 50%; width: min(46rem, 90vw);
  transform: translate(-50%, 8px); opacity: 0; visibility: hidden;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem;
  padding: 0.7rem; border-radius: 18px; border: 1px solid var(--line-2);
  background: rgba(6, 11, 24, 0.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.menu a { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.85rem; align-items: center; padding: 0.55rem; border-radius: 12px; transition: background-color 0.25s; }
.menu a:hover { background: rgba(120, 160, 255, 0.08); }
.menu img { width: 3.4rem; height: 2.4rem; object-fit: cover; border-radius: 7px; }
.menu b { display: block; color: var(--txt); font-weight: 560; font-size: 0.93rem; }
.menu small { display: block; color: var(--txt-3); font-size: 0.8rem; line-height: 1.35; }
.menu .menu-all { grid-column: 1 / -1; display: flex; justify-content: space-between; padding: 0.75rem 0.9rem; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; margin-top: 0.2rem; color: var(--accent-2); font-size: 0.88rem; font-weight: 560; }

.burger { display: none; width: 2.7rem; height: 2.7rem; position: relative; z-index: 130; }
.burger b { position: absolute; left: 0.6rem; right: 0.6rem; height: 1.5px; background: var(--txt); transition: transform 0.45s var(--ease), top 0.45s var(--ease); }
.burger b:first-child { top: calc(50% - 4px); }
.burger b:last-child { top: calc(50% + 4px); }
.burger.open b:first-child { top: 50%; transform: rotate(45deg); }
.burger.open b:last-child { top: 50%; transform: rotate(-45deg); }
.mnav {
  position: fixed; inset: 0; background: rgba(3, 6, 14, 0.96); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; padding-inline: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.mnav.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.mnav-links a { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 9vw, 3.2rem); line-height: 1.3; letter-spacing: -0.03em; color: var(--txt); }
.mnav-links a:hover { color: var(--accent-2); }
.mnav-sub { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.4rem 0 0.8rem; }
.mnav-sub a { font-family: var(--sans); font-weight: 480; font-size: 0.95rem; line-height: 1.6; color: var(--txt-3); }
.mnav-foot { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 1.4rem; color: var(--txt-3); font-size: 0.92rem; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding-bottom: clamp(3.5rem, 9vh, 6.5rem); overflow: clip; }
.hero-layer { position: absolute; inset: -6% 0 -6% 0; z-index: 0; background-size: cover; background-position: center; will-change: transform; pointer-events: none; }
.hero { --plate: url('../img/plate-hero.webp'); --poster: url('../img/poster-hero.webp'); }
@media (max-width: 860px) { .hero { --plate: url('../img/plate-hero-m.webp'); --poster: url('../img/poster-hero-m.webp'); } }
.hero-sky, .hero-sea { background-image: var(--poster); }
.hero-sea { clip-path: inset(var(--horizon) 0 0 0); }
html.js:not(.no-swarm):not(.reduce) .hero-sky,
html.js:not(.no-swarm):not(.reduce) .hero-sea { background-image: var(--plate); }
.hero-mist {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 30% at 70% var(--horizon), rgba(123, 203, 254, 0.12), rgba(123, 203, 254, 0) 70%),
    linear-gradient(to top, var(--bg) 0%, rgba(3, 6, 14, 0.55) 20%, rgba(3, 6, 14, 0) 46%),
    linear-gradient(to right, rgba(3, 6, 14, 0.6) 0%, rgba(3, 6, 14, 0) 55%);
}
.hero .container { position: relative; z-index: 2; width: 100%; }
.hero h1 { max-width: 9.5em; }
.hero h1 .dot { color: var(--accent); }
.hero .lede { margin-top: 1.4rem; max-width: 34em; color: var(--txt-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.1rem; }
.hero-meta { position: absolute; right: var(--gutter); bottom: clamp(3.5rem, 9vh, 6.5rem); z-index: 2; text-align: right; }

/* Inner page hero (plate + optional swarm) */
.page-hero { position: relative; min-height: 86vh; min-height: 86svh; display: flex; align-items: flex-end; padding: 9rem 0 clamp(3.5rem, 8vh, 6rem); overflow: clip; }
.page-hero .plate::after {
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(3, 6, 14, 0.4) 26%, rgba(3, 6, 14, 0) 55%),
    linear-gradient(to right, rgba(3, 6, 14, 0.82) 0%, rgba(3, 6, 14, 0.3) 48%, rgba(3, 6, 14, 0) 72%);
}
.page-hero h1 { max-width: 11em; margin-top: 1.1rem; }
.page-hero .lede { margin-top: 1.3rem; }
.crumb { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--txt-3); }
.crumb a:hover { color: var(--txt); }

/* ---------- Discipline triptych ---------- */
.trio-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.8rem, 1.4vw, 1.2rem); }
.tcard { position: relative; display: block; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); aspect-ratio: 3 / 4; background: var(--bg-2); }
.tcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.tcard:hover img { transform: scale(1.045); }
.tcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3, 6, 14, 0.92) 0%, rgba(3, 6, 14, 0.35) 34%, rgba(3, 6, 14, 0) 58%); }
.tcard-body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: clamp(1.3rem, 2.2vw, 1.9rem); }
.tcard-body h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.tcard-body p { color: var(--txt-2); margin-top: 0.45rem; font-size: 0.96rem; }
.tcard-body .link-arrow { margin-top: 0.9rem; font-size: 0.92rem; color: var(--tone, var(--accent-2)); }
.tcard:hover { border-color: color-mix(in srgb, var(--tone, var(--accent)) 45%, transparent); }

/* ---------- AI services bento (7 cells, 4 x 2) ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(19rem, auto); gap: clamp(0.7rem, 1.2vw, 1rem); margin-top: clamp(2.2rem, 4vw, 3.2rem); }
.bcell { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 18px; border: 1px solid var(--line); background: rgba(8, 13, 28, 0.82); min-height: 19rem; }
.bcell.wide { grid-column: span 2; }
.bcell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.86; transition: transform 1.1s var(--ease), opacity 0.6s; }
.bcell:hover img { transform: scale(1.05); opacity: 1; }
.bcell::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(3, 6, 14, 0.96) 6%, rgba(3, 6, 14, 0.5) 42%, rgba(3, 6, 14, 0.05) 75%); }
.bcell-body { position: relative; z-index: 1; padding: 1.3rem 1.35rem 1.4rem; }
.bcell h3 { font-size: 1.38rem; letter-spacing: -0.02em; }
.bcell p { color: var(--txt-2); font-size: 0.92rem; margin-top: 0.4rem; line-height: 1.5; }
.bcell .go { position: absolute; top: 1rem; right: 1rem; z-index: 1; width: 2.3rem; height: 2.3rem; border-radius: 999px; display: grid; place-items: center; border: 1px solid rgba(220, 232, 255, 0.3); background: rgba(3, 6, 14, 0.4); backdrop-filter: blur(6px); color: var(--txt); transition: background-color 0.3s, transform 0.4s var(--ease); }
.bcell:hover .go { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }
.bcell:hover { border-color: rgba(10, 139, 255, 0.45); }

/* ---------- Agent demo (the peak) ---------- */
.demo { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.demo-copy h2 { max-width: 9em; }
.scenarios { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.8rem; }
.scenario { padding: 0.62rem 1.1rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--txt-2); font-size: 0.93rem; font-weight: 520; background: rgba(6, 10, 22, 0.5); transition: all 0.3s var(--ease); }
.scenario:hover { border-color: rgba(220, 232, 255, 0.5); color: var(--txt); }
.scenario[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.demo-note { margin-top: 1.6rem; }
.demo-stage { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative; width: min(21.5rem, 86vw); aspect-ratio: 9 / 18.6; border-radius: 3rem; padding: 0.7rem;
  background: linear-gradient(145deg, #1f2533, #0b0f18 40%, #1a2030); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 50px 100px -30px rgba(0, 0, 0, 0.9), 0 0 120px -30px rgba(10, 139, 255, 0.45);
}
.phone-screen { position: relative; height: 100%; border-radius: 2.4rem; overflow: hidden; background: #0b111d; display: flex; flex-direction: column; }
.phone-bar { display: flex; align-items: center; gap: 0.7rem; padding: 2.4rem 1rem 0.8rem; background: #111a2a; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.phone-bar .avatar { width: 2.3rem; height: 2.3rem; border-radius: 999px; display: grid; place-items: center; background: linear-gradient(135deg, #0a8bff, #7bcbfe); }
.phone-bar .avatar svg { width: 1.2rem; }
.phone-bar b { display: block; color: var(--txt); font-size: 0.95rem; font-weight: 600; }
.phone-bar small { display: block; color: #6fd99b; font-size: 0.74rem; }
.chat { flex: 1; overflow-y: auto; padding: 1rem 0.85rem; display: flex; flex-direction: column; gap: 0.55rem; scrollbar-width: none; }
.chat::-webkit-scrollbar { display: none; }
.msg { max-width: 82%; padding: 0.6rem 0.8rem 0.45rem; border-radius: 14px; font-size: 0.88rem; line-height: 1.42; color: #eef3fb; animation: msg-in 0.45s var(--ease) both; }
.msg time { display: block; text-align: right; font-size: 0.66rem; opacity: 0.55; margin-top: 0.15rem; }
.msg.out { align-self: flex-end; background: var(--wa-out); border-bottom-right-radius: 4px; }
.msg.in { align-self: flex-start; background: var(--wa-in); border-bottom-left-radius: 4px; }
.msg.typing { display: inline-flex; gap: 0.25rem; padding: 0.75rem 0.85rem; }
.msg.typing i { width: 0.42rem; height: 0.42rem; border-radius: 999px; background: #9fb0cc; animation: typing 1.1s infinite ease-in-out; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
.quick { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 0.75rem 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.05); background: #0d1522; min-height: 3.6rem; }
.quick button { padding: 0.45rem 0.75rem; border-radius: 999px; font-size: 0.8rem; color: #cfe6ff; border: 1px solid rgba(123, 203, 254, 0.4); background: rgba(10, 139, 255, 0.1); transition: background-color 0.25s; }
.quick button:hover { background: rgba(10, 139, 255, 0.24); }
.actions { position: absolute; right: -0.5rem; top: 22%; display: flex; flex-direction: column; gap: 0.6rem; z-index: 3; }
.action { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(8, 14, 30, 0.86); backdrop-filter: blur(10px); color: var(--txt); font-size: 0.86rem; font-weight: 520; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8); animation: action-in 0.6s var(--ease) both; white-space: nowrap; }
.action .ok { width: 1.3rem; height: 1.3rem; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 0.72rem; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes action-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- Agentic workflow graph ---------- */
.flow { margin-top: clamp(2.4rem, 5vw, 3.6rem); position: relative; }
.flow svg { width: 100%; height: auto; overflow: visible; }
.flow .rail { stroke: rgba(150, 185, 255, 0.18); stroke-width: 2; fill: none; }
.flow .rail-lit { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(10, 139, 255, 0.8)); transition: stroke-dashoffset 0.25s linear; }
.flow-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.flow-step { opacity: 0.38; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transform: translateY(6px); }
.flow-step.lit { opacity: 1; transform: none; }
.flow-step b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--txt); letter-spacing: -0.02em; }
.flow-step span { display: block; color: var(--txt-3); font-size: 0.9rem; margin-top: 0.3rem; line-height: 1.45; }
.flow .node { fill: #0b1426; stroke: rgba(150, 185, 255, 0.3); stroke-width: 1.5; transition: fill 0.5s, stroke 0.5s; }
.flow .node.lit { fill: var(--accent); stroke: #bfe2ff; }
.flow .node-label { font-family: var(--mono); font-size: 13px; fill: var(--txt-3); letter-spacing: 0.04em; }

/* ---------- Chapter split (Development / Security) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split .copy h2 { max-width: 9em; margin-top: 1.1rem; }
.split .copy > p { margin-top: 1.2rem; color: var(--txt-2); }
.ticks { margin-top: 1.6rem; display: grid; gap: 0.15rem; }
.ticks li { display: flex; gap: 0.8rem; align-items: baseline; padding-block: 0.62rem; border-bottom: 1px solid var(--line); color: var(--txt-2); }
.ticks li::before { content: ''; width: 0.5rem; height: 0.5rem; flex: none; border-radius: 2px; transform: translateY(-0.1em) rotate(45deg); background: var(--tone, var(--accent)); box-shadow: 0 0 10px var(--tone, var(--accent)); }
.split .actions-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.site-peek { justify-self: end; align-self: end; width: min(26rem, 100%); border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(6, 10, 22, 0.6); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.85); transition: transform 0.6s var(--ease), border-color 0.4s; }
.site-peek:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 60%, transparent); }
.site-peek .bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; color: var(--txt-3); }
.site-peek .bar i { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
.site-peek .bar span { margin-left: 0.5rem; }
.site-peek img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.8rem, 1.4vw, 1.2rem); margin-top: clamp(2.2rem, 4vw, 3rem); }
.step { padding: 1.6rem 1.4rem 1.7rem; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.step h3 { font-size: 1.45rem; }
.step p { color: var(--txt-3); font-size: 0.95rem; margin-top: 0.6rem; }
.step .bar { display: block; width: 2.2rem; height: 3px; border-radius: 3px; background: var(--accent); margin-bottom: 1.2rem; box-shadow: 0 0 12px rgba(10, 139, 255, 0.8); }

/* ---------- Detail rows (services list on /ai and pages) ---------- */
.rows { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: clamp(1rem, 3vw, 3rem); align-items: center; padding-block: clamp(1.4rem, 2.6vw, 2rem); border-bottom: 1px solid var(--line); }
.row img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.row h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.row p { color: var(--txt-3); margin-top: 0.6rem; }

.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.8rem, 1.4vw, 1.1rem); margin-top: clamp(2rem, 4vw, 3rem); }
.gcard { padding: 1.6rem 1.5rem; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color 0.4s, transform 0.5s var(--ease); }
.gcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--tone, var(--accent)) 45%, transparent); }
.gcard h3 { font-size: 1.32rem; }
.gcard p { color: var(--txt-3); font-size: 0.94rem; margin-top: 0.55rem; }
.gcard .k { display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tone, var(--accent-2)); margin-bottom: 0.9rem; }

.checklist { margin-top: 1.6rem; display: grid; gap: 0.15rem; max-width: 46rem; }
.checklist li { display: flex; gap: 0.85rem; align-items: baseline; padding: 0.8rem 0; border-bottom: 1px solid var(--line); color: var(--txt-2); }
.checklist li::before { content: ''; width: 0.5rem; height: 0.5rem; flex: none; border-radius: 2px; transform: translateY(-0.1em) rotate(45deg); background: var(--tone, var(--accent)); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.chips span { padding: 0.45rem 0.85rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.86rem; color: var(--txt-2); background: rgba(6, 10, 22, 0.5); }

/* ---------- FAQ ---------- */
.faq { margin-top: clamp(1.8rem, 3.5vw, 2.6rem); max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 1.2rem; align-items: center; padding: 1.25rem 0.2rem; cursor: pointer; list-style: none; color: var(--txt); font-weight: 560; font-size: 1.06rem; transition: color 0.3s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--mono); font-size: 1.3rem; color: var(--accent-2); transition: transform 0.4s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-2); }
.faq .a { padding: 0 0.2rem 1.3rem; color: var(--txt-3); max-width: 62ch; }

/* ---------- Close ---------- */
.close { position: relative; text-align: center; min-height: 92vh; display: flex; align-items: center; padding-block: clamp(7rem, 14vw, 11rem); overflow: clip; }
.close h2 { max-width: 11em; margin-inline: auto; }
.close p { margin: 1.3rem auto 0; color: var(--txt-2); max-width: 31em; }
.close .hero-ctas { justify-content: center; }

/* ---------- Footer ---------- */
.footer { z-index: 2; border-top: 1px solid var(--line); background: rgba(3, 6, 14, 0.96); }
.footer-top { display: grid; grid-template-columns: minmax(0, 4fr) repeat(4, minmax(0, 2fr)); gap: clamp(1.6rem, 3vw, 2.6rem); padding-block: clamp(3rem, 6vw, 4.6rem); }
.footer-brand p { color: var(--txt-3); font-size: 0.92rem; margin-top: 1rem; max-width: 24em; }
.footer-brand .mail { display: inline-block; margin-top: 1.2rem; font-family: var(--mono); font-size: 0.88rem; color: var(--txt); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.footer-brand .mail:hover { color: var(--accent-2); border-color: var(--accent-2); }
.footer h4 { font-family: var(--mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--txt-3); margin-bottom: 1rem; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.92rem; color: var(--txt-2); transition: color 0.3s; }
.footer-col a:hover { color: var(--txt); }
/* Reach us: address, phone, WhatsApp, email */
.footer .reach-title { margin: 1.8rem 0 0.9rem; }
.reach li + li { margin-top: 0.7rem; }
.reach a { display: inline-flex; align-items: flex-start; gap: 0.75rem; font-size: 0.92rem; line-height: 1.45; color: var(--txt-2); transition: color 0.3s; }
.reach a:hover { color: var(--txt); }
.reach svg { flex: none; width: 1.05rem; height: 1.05rem; margin-top: 0.12rem; color: var(--accent-2); }
.reach .is-mail { color: var(--accent-2); }
.reach .is-mail:hover { color: var(--txt); }
.reach-lg { margin-top: 1.3rem; }
.reach-lg li + li { margin-top: 0.95rem; }
.reach-lg a { font-size: 0.98rem; color: var(--txt); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.4rem; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--txt-3); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.panel { border-radius: 18px; border: 1px solid var(--line-2); background: var(--glass-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: clamp(1.4rem, 3vw, 2.4rem); }
.field { display: grid; gap: 0.45rem; margin-bottom: 1.15rem; }
.field label { font-weight: 560; font-size: 0.9rem; color: var(--txt); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(3, 6, 14, 0.7); padding: 0.85rem 0.95rem; font: inherit; color: var(--txt); transition: border-color 0.3s, box-shadow 0.3s; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--txt-3) 50%), linear-gradient(135deg, var(--txt-3) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.85rem) 55%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 139, 255, 0.24); }
.field .hint { font-size: 0.8rem; color: var(--txt-3); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-note { display: none; padding: 0.95rem 1.1rem; margin-bottom: 1.3rem; border-radius: 10px; border: 1px solid; font-weight: 520; font-size: 0.94rem; }
.form-note.show { display: block; }
.form-note.ok { border-color: rgba(55, 219, 182, 0.45); color: #8ff0d6; background: rgba(55, 219, 182, 0.08); }
.form-note.err { border-color: rgba(248, 113, 113, 0.45); color: #fca5a5; background: rgba(248, 113, 113, 0.08); }
.aside h3 { font-size: 1.3rem; }
.aside > p { color: var(--txt-3); font-size: 0.93rem; margin-top: 0.6rem; }
.aside .mail { display: inline-block; margin-top: 1rem; font-family: var(--mono); color: var(--accent-2); }
.aside .facts { margin-top: 1.6rem; }
.aside .facts li { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--txt-2); }
.aside .facts li span { color: var(--txt-3); }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: 6rem var(--gutter); }
.nf .code { font-family: var(--display); font-weight: 800; font-size: clamp(6rem, 18vw, 11rem); line-height: 1; color: var(--txt); text-shadow: 0 0 60px rgba(10, 139, 255, 0.5); }
.nf p { margin: 1rem auto 2rem; color: var(--txt-2); text-shadow: 0 1px 14px rgba(3, 6, 14, 0.9), 0 0 2px rgba(3, 6, 14, 0.8); }
.nf .btn { justify-self: center; }

/* ---------- Reveal (JS sets the hidden state; failsafe in main.js) ---------- */
html.reduce [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bcell.wide { grid-column: span 2; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  :root { --horizon: 64%; }
  .demo, .split, .contact-grid { grid-template-columns: 1fr; }
  .site-peek { justify-self: start; }
  .trio { grid-template-columns: 1fr; }
  .tcard { aspect-ratio: 4 / 3.4; }
  .flow-steps { grid-template-columns: 1fr; gap: 0.9rem; }
  .flow svg { display: none; }
  .flow-step { opacity: 1; transform: none; padding-left: 1.1rem; border-left: 2px solid var(--accent); }
  .row { grid-template-columns: 1fr; }
  .grid-cards { grid-template-columns: 1fr; }
  .actions { position: static; margin-top: 1rem; }
  .demo-stage { flex-direction: column; align-items: center; }
  .hero-meta { display: none; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .bcell.wide { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .menu { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Site preview inside a copy column (home chapters keep the right half for the swarm) */
.copy .site-peek { justify-self: start; margin-top: 2.2rem; width: min(22rem, 100%); }
.nf { position: relative; overflow: clip; }

/* ==========================================================================
   Motion layer (all of it is off under prefers-reduced-motion; JS adds the
   hidden states, so nothing stays invisible if a script fails)
   ========================================================================== */
/* Headlines: each word rises out of its own mask */
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0.05em 0.16em; margin: -0.08em -0.05em -0.16em; }
.words .wi { display: inline-block; transform: translate3d(0, 112%, 0) rotate(3deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 45ms + 60ms); }
.words.is-in .wi { transform: none; }

/* Section plates drift slower than the page */
.plate img { transform-origin: 50% 50%; will-change: transform; }

/* Pointer spotlight on cards (mouse only, added by JS) */
.has-spot { position: relative; isolation: isolate; }
.spot {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity 0.5s var(--ease);
  background: radial-gradient(24rem circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--tone, var(--accent-2)) 17%, transparent), transparent 62%);
}
.gcard > .spot, .step > .spot, .aside > .spot { z-index: -1; }
.has-spot:hover > .spot { opacity: 1; }
.tcard, .bcell { will-change: transform; }

/* Primary buttons: a light sweep on hover */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.3) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform 0.95s var(--ease);
}
.btn-primary:hover::before { transform: translateX(130%); }

/* Mobile menu: links arrive one after another */
.mnav-links > li, .mnav-foot { opacity: 0; transform: translateY(18px); transition: opacity 0.45s var(--ease), transform 0.6s var(--ease); }
.mnav.open .mnav-links > li, .mnav.open .mnav-foot { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 60ms + 90ms); }

@media (prefers-reduced-motion: reduce) {
  .words .wi, .mnav-links > li, .mnav-foot { transform: none !important; opacity: 1 !important; }
  .plate img { transform: none !important; }
  .btn-primary::before { display: none; }
}

/* Living card images: a WebGL loop (assets/js/cardfx.js) laid over each still */
.fxc { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.fxc.on { opacity: 1; }
.bcell .fxc.on { opacity: 0.86; }
.tcard:hover .fxc { transform: scale(1.045); }
.bcell:hover .fxc { transform: scale(1.05); opacity: 1; }
