/* ============================================================
   KT.lab — Krzysztof Teodorowski / AI Automation Builder
   Dark premium futuristic landing page
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg-0: #04050c;
  --bg-1: #070812;
  --bg-2: #0c0f22;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.08);
  --text-hi: #eef1fa;
  --text-mid: #a6adc5;
  --text-low: #5f6782;
  --blue: #38bdf8;
  --blue-soft: #7cc7ff;
  --violet: #8b6bff;
  --violet-soft: #b39bff;
  --gold: #f2b84b;
  --gold-soft: #ffd166;
  --green: #34d399;
  --grad-main: linear-gradient(90deg, #38bdf8, #8b6bff 50%, #f2b84b);
  --font-d: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-b: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', 'Consolas', monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@property --ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  overflow-x: hidden;
}

body {
  background: var(--bg-0);
  color: var(--text-hi);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body:not(.is-loaded) { overflow-x: hidden; }
body.menu-open { overflow: hidden; }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: rgba(124, 92, 255, 0.5); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #202544; border-radius: 6px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #2e3560; }

:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--font-m); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
main { position: relative; z-index: 2; }

/* gradient text helpers */
.grad-a, .grad-b, .grad-ab {
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradShift 7s ease-in-out infinite alternate;
}
.grad-a  { background-image: linear-gradient(90deg, #5ac8ff, #8b6bff, #5ac8ff); }
.grad-b  { background-image: linear-gradient(90deg, #ffd166, #f2955b, #ffd166); }
.grad-ab { background-image: linear-gradient(90deg, #5ac8ff, #8b6bff 45%, #f2b84b); }

@keyframes gradShift { to { background-position: 100% 0; } }

/* ============================================================
   BACKGROUND LAYERS
   ============================================================ */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  mix-blend-mode: screen;
}
.ab-1 { width: 55vw; height: 55vw; left: -12vw; top: -18vw; background: radial-gradient(circle, rgba(124, 92, 255, 0.16), transparent 65%); animation: drift1 34s ease-in-out infinite alternate; }
.ab-2 { width: 46vw; height: 46vw; right: -14vw; top: 22vh; background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 65%); animation: drift2 28s ease-in-out infinite alternate; }
.ab-3 { width: 40vw; height: 40vw; left: 28vw; bottom: -22vw; background: radial-gradient(circle, rgba(242, 184, 75, 0.08), transparent 65%); animation: drift3 40s ease-in-out infinite alternate; }

@keyframes drift1 { to { transform: translate(9vw, 7vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-7vw, -6vh) scale(0.92); } }
@keyframes drift3 { to { transform: translate(-6vw, -8vh) scale(1.15); } }

.noise {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

.spotlight {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(620px circle at var(--sx, 50%) var(--sy, 30%), rgba(100, 130, 255, 0.06), transparent 65%);
  mix-blend-mode: screen;
}

/* ============================================================
   CURSOR
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 10001; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.3s;
}
body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { opacity: 1; }
body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }

.cursor-dot { width: 7px; height: 7px; background: #d4dcff; }
.cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(160, 175, 255, 0.55);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s, opacity 0.3s;
}
.cursor-ring.is-active {
  width: 58px; height: 58px;
  border-color: rgba(242, 184, 75, 0.75);
  background: rgba(242, 184, 75, 0.06);
}

@media (hover: none), (pointer: coarse) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: auto; }
  .cursor-dot, .cursor-ring, .spotlight { display: none; }
  .glass-card, .demo-panel, .p-card, .orbit-pill { will-change: auto; }
  .ticker-track { animation-duration: 56s; }
}

/* ============================================================
   BOOT OVERLAY
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg-0);
  display: grid; place-items: center;
  transition: transform 0.75s cubic-bezier(0.7, 0, 0.25, 1), visibility 0s 0.75s;
  animation: bootFailSafe 0.01s linear 3.8s forwards;
}
.boot.is-done { transform: translateY(-101%); visibility: hidden; }
.boot-inner { width: min(420px, 78vw); display: flex; flex-direction: column; gap: 16px; }
.boot-logo { font-family: var(--font-d); font-weight: 700; font-size: 30px; letter-spacing: 0.04em; }
.boot-logo span {
  background-image: var(--grad-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.boot-bar { height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.boot-bar-fill { height: 100%; width: 0%; background: var(--grad-main); border-radius: 3px; }
.boot-row { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.18em; color: var(--text-low); text-transform: uppercase; }
@keyframes bootFailSafe {
  to { opacity: 0; transform: translateY(-101%); visibility: hidden; pointer-events: none; }
}
@keyframes revealFailSafe {
  to { opacity: 1; transform: none; }
}
@keyframes wordFailSafe {
  to { transform: none; }
}

/* ============================================================
   CHROME
   ============================================================ */
.progress-bar {
  position: fixed; top: 0; left: 0; z-index: 950;
  width: 100%; height: 2px;
  background: var(--grad-main);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(6, 8, 18, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 28px;
  height: 70px; display: flex; align-items: center; gap: 36px;
}
.logo { display: flex; align-items: baseline; font-family: var(--font-d); font-weight: 700; font-size: 21px; letter-spacing: 0.02em; }
.logo-dot {
  background-image: var(--grad-main);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-size: 24px;
}
.logo-suffix { font-size: 11px; letter-spacing: 0.22em; color: var(--text-low); margin-left: 3px; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-link {
  position: relative; padding: 6px 0;
  font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-mid); transition: color 0.3s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--grad-main);
  transition: width 0.35s var(--ease-out);
}
.nav-link:hover, .nav-link.is-active { color: var(--text-hi); }
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }

.menu-btn { display: none; width: 42px; height: 42px; position: relative; z-index: 901; margin-left: auto; }
.menu-btn span {
  position: absolute; left: 11px; width: 20px; height: 2px;
  background: var(--text-hi); border-radius: 2px;
  transition: transform 0.35s var(--ease-out), top 0.35s var(--ease-out);
}
.menu-btn span:nth-child(1) { top: 17px; }
.menu-btn span:nth-child(2) { top: 24px; }
body.menu-open .menu-btn span:nth-child(1) { top: 20px; transform: rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

/* mobile menu */
.m-menu {
  position: fixed; inset: 0; z-index: 890;
  background: rgba(5, 6, 15, 0.9);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0s 0.4s;
}
body.menu-open .m-menu { opacity: 1; visibility: visible; transition: opacity 0.4s; }
.m-menu-links { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.m-link {
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(1.9rem, 7.5vw, 2.6rem); letter-spacing: -0.02em;
  color: var(--text-hi);
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), color 0.3s;
}
body.menu-open .m-link { opacity: 1; transform: none; transition-delay: calc(0.1s + var(--i) * 0.055s); }
.m-link:hover { color: var(--blue-soft); }
.m-menu-foot { font-size: 12px; color: var(--text-low); letter-spacing: 0.14em; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font-family: var(--font-b); font-weight: 600; font-size: 14px; letter-spacing: 0.01em;
  overflow: hidden; white-space: nowrap;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s, border-color 0.3s, background 0.3s;
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.3s var(--ease-out); }
.btn-sm { padding: 10px 20px; font-size: 12.5px; }

.btn-primary {
  background: linear-gradient(135deg, #2f9ff5, #7c5cff 85%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(95, 115, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 12px 44px rgba(105, 125, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -70%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s var(--ease-out);
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover svg { transform: translateY(3px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-hi);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(242, 184, 75, 0.55);
  background: rgba(242, 184, 75, 0.07);
  box-shadow: 0 8px 30px rgba(242, 184, 75, 0.12);
}
.btn-ghost:hover svg { transform: translateX(4px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(140, 160, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 68% 42%, #000 0%, transparent 68%);
  mask-image: radial-gradient(ellipse 90% 80% at 68% 42%, #000 0%, transparent 68%);
}

.hero-inner { position: relative; z-index: 3; width: 100%; }

.hero-kicker {
  margin-bottom: 28px; min-height: 1.3em;
  font-size: 12.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue-soft);
}
.caret {
  display: inline-block; width: 9px; height: 1.05em;
  margin-left: 7px; vertical-align: text-bottom;
  background: linear-gradient(180deg, var(--blue-soft), var(--violet));
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(2.5rem, 5.6vw, 4.55rem);
  line-height: 1.06; letter-spacing: -0.025em;
  max-width: 860px;
}
.w-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.w {
  display: inline-block;
  transform: translateY(115%) rotate(3deg);
  transition: transform 1s var(--ease-out) var(--d, 0s);
}
body:not(.is-loaded) .w { animation: wordFailSafe 0.01s linear 3.9s forwards; }
body.is-loaded .w { transform: none; }

.hero-sub {
  margin-top: 30px; max-width: 580px;
  color: var(--text-mid);
  font-size: clamp(1rem, 1.35vw, 1.15rem); line-height: 1.75;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.9s var(--ease-out) 0.75s, transform 0.9s var(--ease-out) 0.75s;
}
body:not(.is-loaded) .hero-sub { animation: revealFailSafe 0.01s linear 3.9s forwards; }
body.is-loaded .hero-sub { opacity: 1; transform: none; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(140, 160, 255, 0.2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; color: #cfd8f5;
  box-shadow: 0 4px 22px rgba(20, 30, 80, 0.35);
  opacity: 0;
  transition: opacity 0.8s var(--d, 0s), border-color 0.3s, box-shadow 0.3s;
  animation: bob 6.5s ease-in-out calc(var(--d, 0s) + 1s) infinite;
}
body:not(.is-loaded) .badge {
  animation:
    revealFailSafe 0.01s linear 3.9s forwards,
    bob 6.5s ease-in-out calc(var(--d, 0s) + 1s) infinite;
}
body.is-loaded .badge { opacity: 1; }
.badge:hover { border-color: rgba(242, 184, 75, 0.5); box-shadow: 0 4px 26px rgba(242, 184, 75, 0.18); }
.badge svg { width: 15px; height: 15px; color: var(--gold-soft); }
.badge:nth-child(1) svg { color: var(--blue-soft); }
.badge:nth-child(2) svg { color: var(--violet-soft); }
@keyframes bob { 50% { translate: 0 -7px; } }

.hero-cta-row {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.9s var(--ease-out) 1.2s, transform 0.9s var(--ease-out) 1.2s;
}
body:not(.is-loaded) .hero-cta-row { animation: revealFailSafe 0.01s linear 3.9s forwards; }
body.is-loaded .hero-cta-row { opacity: 1; transform: none; }

/* floating telemetry cards */
.hero-floats { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.float-card {
  position: absolute;
  min-width: 170px;
  padding: 12px 15px; border-radius: 14px;
  background: rgba(10, 13, 28, 0.6);
  border: 1px solid rgba(140, 160, 255, 0.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-m); font-size: 11px; color: var(--text-mid);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.4);
  animation: floatY 7s ease-in-out infinite;
  opacity: 0;
  transition: opacity 1.2s ease 1.5s;
}
body:not(.is-loaded) .float-card {
  animation:
    revealFailSafe 0.01s linear 3.9s forwards,
    floatY 7s ease-in-out infinite;
}
body.is-loaded .float-card { opacity: 1; }
.fc-a { right: 29%; top: 21%; }
.fc-b { right: 5%;  top: 33%; animation-delay: -2.4s; }
.fc-c { right: 31%; bottom: 19%; animation-delay: -4.1s; }
.fc-d { right: 7%;  bottom: 27%; animation-delay: -1.2s; }
@keyframes floatY { 50% { translate: 0 -11px; } }

.fc-head { display: flex; align-items: center; gap: 8px; color: #ccd6f6; font-weight: 500; }
.fc-head svg { width: 14px; height: 14px; color: var(--blue-soft); flex: none; }
.fc-body { margin-top: 7px; color: #8b93ad; }
.fc-foot { margin-top: 8px; font-size: 10px; color: #78809c; letter-spacing: 0.04em; }
.fc-foot.ok { color: #6ee7b7; }

.fc-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.fc-dot.amber  { background: var(--gold);  box-shadow: 0 0 9px rgba(242, 184, 75, 0.8);  animation: pulseDot 1.7s ease-in-out infinite; }
.fc-dot.blue   { background: var(--blue-soft); box-shadow: 0 0 9px rgba(124, 199, 255, 0.7); }
.fc-dot.green  { background: var(--green); box-shadow: 0 0 9px rgba(52, 211, 153, 0.7); }
.fc-dot.violet { background: var(--violet-soft); box-shadow: 0 0 9px rgba(179, 155, 255, 0.7); }
.fc-dot.gold   { background: var(--gold-soft); box-shadow: 0 0 9px rgba(255, 209, 102, 0.7); }
@keyframes pulseDot { 50% { opacity: 0.35; } }

.fc-bar { margin-top: 9px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.fc-bar i {
  display: block; height: 100%; width: var(--w, 60%);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  animation: barPulse 3.4s ease-in-out infinite alternate;
}
@keyframes barPulse { from { width: 26%; } to { width: var(--w, 60%); } }

.fc-foot.dots i { animation: dotBlink 1.4s infinite; }
.fc-foot.dots i:nth-child(2) { animation-delay: 0.2s; }
.fc-foot.dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBlink { 50% { opacity: 0.15; } }

/* scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 3;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  opacity: 0;
  transition: opacity 0.9s ease 1.7s;
}
body:not(.is-loaded) .scroll-cue { animation: revealFailSafe 0.01s linear 3.9s forwards; }
body.is-loaded .scroll-cue { opacity: 0.85; }
body.is-loaded .scroll-cue.is-hidden { opacity: 0; transition: opacity 0.4s; }
.cue-line { position: relative; width: 1px; height: 46px; background: rgba(140, 170, 255, 0.2); overflow: hidden; }
.cue-line::after {
  content: ''; position: absolute; left: -1px; top: -10px;
  width: 3px; height: 10px; border-radius: 3px;
  background: var(--blue-soft);
  animation: cueDrop 1.9s ease-in infinite;
}
@keyframes cueDrop { to { top: 52px; } }
.cue-txt { font-size: 10px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--text-low); }

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 10, 24, 0.45);
  padding: 17px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: tick 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-list { display: flex; }
.ticker-list li {
  position: relative; padding: 0 27px;
  font-size: 11.5px; letter-spacing: 0.24em; white-space: nowrap;
  color: #6a7390;
}
.ticker-list li::after {
  content: '✦'; position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%);
  font-size: 9px; color: rgba(242, 184, 75, 0.55);
}
@keyframes tick { to { transform: translateX(-50%); } }

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section {
  position: relative;
  padding: clamp(90px, 11vw, 150px) 0;
  scroll-margin-top: 60px;
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.kicker { font-size: 12px; letter-spacing: 0.22em; color: var(--text-low); margin-bottom: 20px; }
.section-title {
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  line-height: 1.1; letter-spacing: -0.02em;
  max-width: 820px;
}
.lead {
  margin-top: 24px; max-width: 690px;
  color: var(--text-mid);
  font-size: clamp(1rem, 1.25vw, 1.13rem); line-height: 1.78;
}
.lead.center { margin-left: auto; margin-right: auto; }

.status-line { margin-top: 20px; font-size: 12.5px; letter-spacing: 0.04em; color: #6ee7b7; }
.status-line .prompt-sign { color: var(--gold); margin-right: 8px; }
.status-line .caret { height: 0.95em; width: 7px; }

/* reveal system */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(7px);
  transition:
    opacity 0.95s var(--ease-out) var(--d, 0s),
    transform 0.95s var(--ease-out) var(--d, 0s),
    filter 0.95s var(--ease-out) var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ============================================================
   ABOUT — cards
   ============================================================ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 64px; }

.glass-card {
  position: relative; overflow: hidden;
  padding: 32px 28px; border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.18s ease-out, border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.glass-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(140, 170, 255, 0.09), transparent 62%);
  opacity: 0; transition: opacity 0.35s;
}
.glass-card:hover { border-color: rgba(140, 170, 255, 0.28); box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45); }
.glass-card:hover::after { opacity: 1; }

.card-index { position: absolute; top: 24px; right: 26px; font-size: 11px; letter-spacing: 0.15em; color: var(--text-low); }
.card-icon {
  width: 54px; height: 54px; border-radius: 15px;
  display: grid; place-items: center;
  margin-bottom: 24px;
  border: 1px solid;
  transition: transform 0.35s var(--ease-out);
}
.glass-card:hover .card-icon { transform: translateY(-4px) rotate(-4deg) scale(1.05); }
.card-icon svg { width: 25px; height: 25px; }
.icon-blue   { color: var(--blue-soft);   background: rgba(56, 189, 248, 0.08);  border-color: rgba(56, 189, 248, 0.28);  box-shadow: 0 0 26px rgba(56, 189, 248, 0.14); }
.icon-violet { color: var(--violet-soft); background: rgba(139, 107, 255, 0.09); border-color: rgba(139, 107, 255, 0.3);  box-shadow: 0 0 26px rgba(139, 107, 255, 0.16); }
.icon-gold   { color: var(--gold-soft);   background: rgba(242, 184, 75, 0.08);  border-color: rgba(242, 184, 75, 0.28);  box-shadow: 0 0 26px rgba(242, 184, 75, 0.14); }

.glass-card h3 { font-family: var(--font-d); font-size: 19px; font-weight: 600; margin-bottom: 11px; }
.glass-card p { color: var(--text-mid); font-size: 14.5px; line-height: 1.68; }

/* ============================================================
   LIVE DEMOS
   ============================================================ */
.demos { overflow: hidden; }
.demo-stack { display: flex; flex-direction: column; gap: 28px; margin-top: 64px; }

.demo-panel {
  position: relative; overflow: hidden;
  min-width: 0;
  scroll-margin-top: 92px;
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 28px;
  padding: 30px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform 0.18s ease-out, border-color 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.demo-panel:hover { border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5); }
.demo-panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.2px;
  background: conic-gradient(from var(--ang), transparent 0 32%, var(--c1) 47%, var(--c2) 55%, transparent 72% 100%);
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.32;
  pointer-events: none;
}
.demo-panel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--hue-soft), transparent 64%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 42%);
  opacity: 0.7;
}
.demo-panel > * { position: relative; z-index: 1; }
.demo-copy { display: flex; flex-direction: column; min-width: 0; }
.demo-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; width: fit-content;
  margin-bottom: 16px;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--hue-txt);
}
.demo-copy h3 { font-family: var(--font-d); font-size: clamp(1.35rem, 2vw, 1.9rem); line-height: 1.15; font-weight: 600; margin-bottom: 13px; }
.demo-copy > p { color: var(--text-mid); font-size: 14.5px; line-height: 1.72; }

.demo-meta {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin: 24px 0 26px;
}
.demo-meta div {
  padding: 11px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.075);
}
.demo-meta dt {
  margin-bottom: 3px;
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-low);
}
.demo-meta dd { color: #c8d0e8; font-size: 13px; line-height: 1.45; }

.demo-input-label {
  display: block;
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hue-txt);
}
.demo-engine-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 142px;
  max-height: 230px;
  margin-bottom: 22px;
  padding: 14px 15px;
  resize: vertical;
  color: #dbe3f7;
  background: rgba(4, 7, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 11px;
  line-height: 1.6;
}
.demo-engine-input:focus {
  border-color: rgba(124, 199, 255, 0.52);
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.demo-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: auto; }
.demo-actions .btn { padding: 12px 18px; font-size: 12.5px; }
.demo-panel.is-running .btn-run { box-shadow: 0 12px 44px rgba(105, 125, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }

.demo-machine {
  min-width: 0; min-height: 430px;
  overflow: hidden;
  padding: 20px; border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(8, 11, 26, 0.8), rgba(5, 7, 16, 0.72)),
    radial-gradient(460px circle at 74% 18%, var(--hue-soft), transparent 64%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.machine-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
  color: #d9e3ff; font-size: 12px;
}
.machine-badge {
  flex: none; padding: 5px 10px; border-radius: 999px;
  color: var(--gold-soft);
  border: 1px solid rgba(242, 184, 75, 0.25);
  background: rgba(242, 184, 75, 0.06);
  font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
}

.demo-anim {
  opacity: 0.32;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), border-color 0.45s, background 0.45s, box-shadow 0.45s;
}
.demo-anim.is-active { opacity: 1; transform: none; }
.demo-panel.is-complete .machine-status { color: #6ee7b7; }

.invoice-machine {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 14px;
}
.invoice-machine .machine-head { grid-column: 1 / -1; margin-bottom: 2px; }
.invoice-doc {
  grid-row: span 3;
  padding: 16px; border-radius: 17px;
  background: rgba(255, 255, 255, 0.038);
  border: 1px solid rgba(124, 199, 255, 0.16);
}
.doc-top { margin-bottom: 12px; font-size: 10px; letter-spacing: 0.16em; color: var(--text-low); text-transform: uppercase; }
.doc-field {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 12px;
}
.doc-field:last-child { border-bottom: none; }
.doc-field span { color: var(--text-low); }
.doc-field strong { color: #dce6ff; font-weight: 600; text-align: right; }

.demo-pipeline {
  display: grid; grid-template-columns: 1fr 18px 1fr 18px 1fr 18px 1fr; align-items: center; gap: 8px;
  padding: 13px; border-radius: 15px;
  background: rgba(56, 189, 248, 0.055);
  border: 1px solid rgba(56, 189, 248, 0.16);
}
.demo-pipeline span {
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.09em; color: #c9d8ff; text-align: center; text-transform: uppercase;
}
.demo-pipeline i { height: 1px; background: linear-gradient(90deg, transparent, var(--blue-soft), transparent); }

.validation-list { display: grid; gap: 8px; }
.validation-list li {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.075);
  color: #bfc8df; font-size: 12px;
}
.xlsx-wrap {
  padding: 13px; border-radius: 15px;
  background: rgba(52, 211, 153, 0.045);
  border: 1px solid rgba(52, 211, 153, 0.16);
}
.mini-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.mini-table th, .mini-table td { padding: 7px 6px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.075); }
.mini-table th { color: var(--text-low); font-family: var(--font-m); font-weight: 500; }
.mini-table td { color: #dce6ff; }
.machine-status { margin-top: 11px; font-size: 10.5px; letter-spacing: 0.08em; color: var(--text-low); }

.ar-machine { display: flex; flex-direction: column; gap: 14px; }
.receivables-list { display: flex; flex-direction: column; gap: 8px; }
.ar-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: order 0.3s, opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), border-color 0.45s, background 0.45s;
}
.ar-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #dce6ff; font-size: 12px; }
.ar-row strong, .ar-row em { color: #aeb8d2; font-size: 11px; font-style: normal; }
.ar-row b {
  padding: 4px 9px; border-radius: 999px;
  font-family: var(--font-m); font-size: 9.5px; font-weight: 500; letter-spacing: 0.05em;
}
.ar-row.low b { color: #6ee7b7; background: rgba(52, 211, 153, 0.09); border: 1px solid rgba(52, 211, 153, 0.2); }
.ar-row.medium b { color: var(--gold-soft); background: rgba(242, 184, 75, 0.08); border: 1px solid rgba(242, 184, 75, 0.2); }
.ar-row.high b { color: #ff9b9b; background: rgba(255, 118, 118, 0.08); border: 1px solid rgba(255, 118, 118, 0.22); }
.demo-panel.is-sorted .ar-row.high { order: -3; border-color: rgba(255, 118, 118, 0.34); background: rgba(255, 118, 118, 0.055); }
.demo-panel.is-sorted .ar-row.medium { order: -2; }
.demo-panel.is-sorted .ar-row.low { order: -1; }

.ar-stages, .ar-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ar-stages span, .ar-summary div, .email-draft {
  padding: 11px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.075);
}
.ar-stages span { color: #bfc8df; font-size: 11px; text-align: center; }
.ar-summary span { display: block; margin-bottom: 5px; color: var(--text-low); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.ar-summary strong { color: #dce6ff; font-size: 12px; }
.email-draft span { display: block; margin-bottom: 8px; color: var(--gold-soft); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }
.email-draft strong { display: block; margin-bottom: 7px; color: #dce6ff; font-size: 12px; }
.email-draft p { color: var(--text-mid); font-size: 12px; line-height: 1.6; }

.workflow-machine { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.workflow-line {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; align-items: stretch;
}
.process-node {
  position: relative;
  min-height: 86px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 12px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.085);
  color: #dce6ff; text-align: center; font-weight: 600; font-size: 12px;
}
.process-node::after {
  content: ''; position: absolute; right: -10px; top: 50%;
  width: 10px; height: 1px;
  background: linear-gradient(90deg, var(--hue-txt), transparent);
}
.process-node:last-child::after { display: none; }
.process-node small { color: var(--text-low); font-family: var(--font-m); font-size: 10px; font-weight: 400; }
.process-node.bottleneck.is-active {
  border-color: rgba(242, 184, 75, 0.42);
  background: rgba(242, 184, 75, 0.075);
  box-shadow: 0 0 28px rgba(242, 184, 75, 0.12);
}
.metric-bars, .workflow-metrics, .recommendations { display: grid; gap: 10px; }
.metric-bars div {
  display: grid; grid-template-columns: 145px 1fr 42px; align-items: center; gap: 10px;
  color: #bfc8df; font-size: 11px;
}
.metric-bars i {
  height: 7px; width: var(--w);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--violet));
  box-shadow: 0 0 18px rgba(242, 184, 75, 0.16);
}
.metric-bars strong { color: #dce6ff; font-size: 11px; text-align: right; }
.workflow-metrics { grid-template-columns: repeat(3, 1fr); }
.workflow-metrics div, .recommendations span {
  padding: 12px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid rgba(255, 255, 255, 0.075);
}
.workflow-metrics span { display: block; margin-bottom: 5px; color: var(--text-low); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.workflow-metrics strong { color: #dce6ff; font-size: 12px; }
.recommendations { grid-template-columns: repeat(3, 1fr); }
.recommendations span { color: #cbd4ec; font-size: 12px; line-height: 1.45; }

/* case study modal */
body.case-open { overflow: hidden; }
body.has-cursor.case-open .case-modal,
body.has-cursor.case-open .case-modal * { cursor: auto; }
body.has-cursor.case-open .case-modal button,
body.has-cursor.case-open .case-modal [data-close-case] { cursor: pointer; }
.case-modal {
  position: fixed; inset: 0; z-index: 12000;
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0s 0.28s;
}
.case-modal.is-open { opacity: 1; visibility: visible; transition: opacity 0.28s ease; }
.case-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 5, 12, 0.78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.case-dialog {
  position: relative; width: min(760px, 100%); max-height: min(760px, 88vh);
  overflow: auto;
  padding: 34px; border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}
.case-close {
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.case-close span {
  position: absolute; left: 12px; top: 20px;
  width: 18px; height: 2px; border-radius: 2px;
  background: var(--text-hi);
}
.case-close span:first-child { transform: rotate(45deg); }
.case-close span:last-child { transform: rotate(-45deg); }
.case-kicker {
  margin-bottom: 12px;
  color: var(--gold-soft); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
}
.case-dialog h2 { max-width: 640px; margin-bottom: 22px; font-family: var(--font-d); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; font-weight: 600; }
.case-body { display: grid; gap: 13px; }
.case-row {
  display: grid; grid-template-columns: 160px 1fr; gap: 18px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.case-row dt { font-family: var(--font-m); color: var(--text-low); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.case-row dd { color: #cbd4ec; line-height: 1.68; }

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 64px; }

.p-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 28px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform 0.18s ease-out, box-shadow 0.35s, border-color 0.35s;
  will-change: transform;
}
.p-card:hover { box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5); border-color: rgba(255, 255, 255, 0.14); }

.hue-blue   { --c1: #38bdf8; --c2: #8b6bff; --hue-soft: rgba(56, 189, 248, 0.1);  --hue-line: rgba(56, 189, 248, 0.3);  --hue-txt: #7cc7ff; }
.hue-violet { --c1: #8b6bff; --c2: #c084fc; --hue-soft: rgba(139, 107, 255, 0.1); --hue-line: rgba(139, 107, 255, 0.32); --hue-txt: #b39bff; }
.hue-gold   { --c1: #f2b84b; --c2: #ff9a62; --hue-soft: rgba(242, 184, 75, 0.09); --hue-line: rgba(242, 184, 75, 0.3);  --hue-txt: #ffd166; }

/* rotating conic gradient border */
.p-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1.2px;
  background: conic-gradient(from var(--ang), transparent 0 30%, var(--c1) 46%, var(--c2) 54%, transparent 70% 100%);
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0; transition: opacity 0.45s;
  pointer-events: none;
}
.p-card:hover::before { opacity: 1; animation: spinAng 3.2s linear infinite; }
@keyframes spinAng { to { --ang: 360deg; } }

.p-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), var(--hue-soft), transparent 62%);
  opacity: 0; transition: opacity 0.35s;
}
.p-card:hover::after { opacity: 1; }

.p-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; position: relative; z-index: 1; }
.p-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  color: var(--hue-txt);
  background: var(--hue-soft);
  border: 1px solid var(--hue-line);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.p-card:hover .p-icon { transform: translateY(-4px) rotate(-5deg) scale(1.06); box-shadow: 0 0 30px var(--hue-soft); }
.p-icon svg { width: 24px; height: 24px; }
.p-arrow { width: 20px; height: 20px; color: var(--text-low); transition: transform 0.35s var(--ease-out), color 0.3s; }
.p-card:hover .p-arrow { transform: translate(4px, -4px); color: var(--text-hi); }

.p-card h3 { font-family: var(--font-d); font-size: 19px; font-weight: 600; margin-bottom: 10px; position: relative; z-index: 1; }
.p-card > p { color: var(--text-mid); font-size: 14px; line-height: 1.68; position: relative; z-index: 1; }

.p-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; position: relative; z-index: 1; }
.p-tags span {
  font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.05em;
  padding: 5px 12px; border-radius: 999px;
  color: #aeb6cf;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.p-status {
  display: flex; align-items: center; gap: 9px;
  margin-top: auto; padding-top: 18px;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
  font-size: 11px; letter-spacing: 0.06em; color: var(--text-low);
  position: relative; z-index: 1;
}
.p-tags + .p-status { margin-top: 20px; }

/* ============================================================
   PHILOSOPHY — flow diagram
   ============================================================ */
.glass-panel {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.flow-panel { margin-top: 64px; padding: 30px 28px 24px; border-radius: 24px; overflow-x: auto; }
.flow-svg { width: 100%; min-width: 880px; height: auto; }
.flow-tagline { text-align: center; margin-top: 16px; font-size: 12.5px; letter-spacing: 0.12em; color: #9aa3c0; }

.mono-svg { font-family: var(--font-m); }
.flow-label { font-size: 13px; letter-spacing: 0.18em; fill: #8b93ad; }
.chaos-label { fill: #f0908d; }
.auto-label { fill: #6ee7b7; }
.flow-caption { font-size: 12px; letter-spacing: 0.08em; fill: var(--text-low); }
.tiny-svg { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.12em; fill: #6a7390; text-anchor: middle; }

.chaos-links path {
  fill: none; stroke: rgba(255, 118, 118, 0.16); stroke-width: 1.2;
  stroke-dasharray: 5 7;
  animation: dashDrift 9s linear infinite;
}
@keyframes dashDrift { to { stroke-dashoffset: -96; } }

.chaos-node rect { fill: rgba(255, 255, 255, 0.035); stroke: rgba(255, 255, 255, 0.15); }
.chaos-node .glyph { fill: none; stroke: #93a0c0; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chaos-node.warn .glyph { stroke: var(--gold); }
.chaos-node.warn rect { stroke: rgba(242, 184, 75, 0.4); }

/* jitter — translate baked into keyframes (CSS transform overrides the SVG attribute) */
.cn-1 { animation: cn1 4.4s ease-in-out infinite alternate; }
.cn-2 { animation: cn2 5.2s ease-in-out infinite alternate; }
.cn-3 { animation: cn3 4.8s ease-in-out infinite alternate; }
.cn-4 { animation: cn4 3.6s ease-in-out infinite alternate; }
.cn-5 { animation: cn5 5.6s ease-in-out infinite alternate; }
.cn-6 { animation: cn6 4.1s ease-in-out infinite alternate; }
@keyframes cn1 { from { transform: translate(90px, 120px) rotate(-1.6deg); }  to { transform: translate(94px, 126px) rotate(1.4deg); } }
@keyframes cn2 { from { transform: translate(230px, 80px) rotate(1.4deg); }   to { transform: translate(224px, 86px) rotate(-1.6deg); } }
@keyframes cn3 { from { transform: translate(280px, 185px) rotate(-1.2deg); } to { transform: translate(286px, 190px) rotate(1.6deg); } }
@keyframes cn4 { from { transform: translate(130px, 245px) rotate(1.8deg); }  to { transform: translate(124px, 250px) rotate(-1.8deg); } }
@keyframes cn5 { from { transform: translate(255px, 300px) rotate(-1.4deg); } to { transform: translate(260px, 306px) rotate(1.2deg); } }
@keyframes cn6 { from { transform: translate(90px, 320px) rotate(1.6deg); }   to { transform: translate(96px, 314px) rotate(-1.4deg); } }

.flow-streams .stream-path { stroke: url(#gradPipe); stroke-width: 1.2; opacity: 0.3; stroke-dasharray: 3 6; animation: dashDrift 7s linear infinite reverse; }
.packet { opacity: 0.95; }
.p-gold { fill: var(--gold-soft); }
.p-blue { fill: var(--blue-soft); }
.p-violet { fill: var(--violet-soft); }

.engine-halo { fill: rgba(139, 107, 255, 0.07); }
.engine-ring { fill: none; stroke: url(#gradEngine); stroke-width: 1.4; stroke-dasharray: 4 10; stroke-linecap: round; }
.engine-ring-g { transform-box: view-box; transform-origin: 560px 232px; animation: spinSlow 14s linear infinite; }
.engine-core { fill: rgba(10, 12, 28, 0.92); stroke: url(#gradEngine); stroke-width: 1.5; }
.engine-bolt { fill: var(--gold-soft); animation: boltPulse 2.4s ease-in-out infinite; }
@keyframes boltPulse { 50% { opacity: 0.45; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }

.pipe-base { stroke: rgba(120, 170, 255, 0.2); stroke-width: 1.4; fill: none; }
.pipe-node rect {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(120, 170, 255, 0.3); stroke-width: 1.2;
  animation: nodeGlow 4.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.55s);
}
.pipe-node .glyph { fill: none; stroke: #9fc2ff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pipe-node.last rect { stroke: rgba(52, 211, 153, 0.45); }
.pipe-node.last .glyph { stroke: #6ee7b7; }
@keyframes nodeGlow {
  0%, 100% { stroke: rgba(120, 170, 255, 0.3); fill: rgba(255, 255, 255, 0.03); }
  50% { stroke: rgba(124, 199, 255, 0.85); fill: rgba(56, 189, 248, 0.08); }
}
.pipe-badge rect { fill: rgba(52, 211, 153, 0.07); stroke: rgba(52, 211, 153, 0.35); stroke-width: 1; }
.badge-svg { font-family: var(--font-m); font-size: 12.5px; letter-spacing: 0.08em; fill: #6ee7b7; }

/* ============================================================
   STACK — orbit
   ============================================================ */
.orbit-wrap {
  position: relative;
  max-width: 980px; height: 580px;
  margin: 56px auto 0;
}
.orbit-track {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(150, 165, 255, 0.09);
  border-radius: 50%;
  aspect-ratio: 1 / 0.38;
}
.ot-1 { width: 46%; }
.ot-2 { width: 72%; }
.ot-3 { width: 95%; }

.orbit-core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 172px; height: 172px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: radial-gradient(circle at 35% 28%, rgba(139, 107, 255, 0.28), rgba(9, 11, 24, 0.94) 62%);
  border: 1px solid rgba(160, 150, 255, 0.32);
  box-shadow: 0 0 70px rgba(124, 92, 255, 0.28), inset 0 0 34px rgba(80, 90, 200, 0.16);
  z-index: 40;
  text-align: center;
}
.orbit-core::before {
  content: ''; position: absolute; inset: -11px; border-radius: 50%;
  padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0 68%, rgba(140, 170, 255, 0.65) 84%, transparent 100%);
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: spinAng 4.5s linear infinite;
}
.orbit-core::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(140, 170, 255, 0.35);
  animation: corePulse 3.2s ease-out infinite;
}
@keyframes corePulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(1.45); opacity: 0; }
}
.core-label { font-size: 10px; letter-spacing: 0.3em; color: #9fb0d8; }
.core-title { font-family: var(--font-d); font-weight: 600; font-size: 25px; letter-spacing: -0.01em; }

.orbit-pill {
  position: absolute; left: 50%; top: 50%;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(12, 15, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: #dbe2f7;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
  will-change: transform;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.orbit-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--dot, var(--blue-soft));
  box-shadow: 0 0 8px var(--dot, var(--blue-soft));
}
.orbit-pill:hover { border-color: rgba(255, 255, 255, 0.35); box-shadow: 0 8px 34px rgba(90, 110, 255, 0.25); }
.cat-lang { --dot: #38bdf8; }
.cat-data { --dot: #b39bff; }
.cat-ai   { --dot: #ffd166; }
.cat-ops  { --dot: #5eead4; }

/* static fallback (mobile / reduced motion) */
.orbit-wrap.is-static { height: auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.orbit-wrap.is-static .orbit-track { display: none; }
.orbit-wrap.is-static .orbit-core {
  position: static; order: -1; transform: none;
  width: 100%; height: auto; border-radius: 18px;
  padding: 20px; margin-bottom: 14px;
  flex-direction: row; gap: 12px;
}
.orbit-wrap.is-static .orbit-core::before, .orbit-wrap.is-static .orbit-core::after { display: none; }
.orbit-wrap.is-static .orbit-pill { position: static; }

/* ============================================================
   EXPERIENCE — timeline
   ============================================================ */
.timeline { position: relative; margin-top: 68px; }
.tl-line {
  position: absolute; left: 19px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #38bdf8, #8b6bff 55%, #f2b84b);
  opacity: 0.65;
  transform: scaleY(0); transform-origin: top;
  transition: transform 1.6s var(--ease-out) 0.2s;
}
.timeline.is-in .tl-line { transform: scaleY(1); }

.tl-item { position: relative; max-width: 660px; padding: 0 0 46px 66px; }
.tl-item:last-child { padding-bottom: 6px; }
.tl-dot {
  position: absolute; left: 12px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #0b0e20;
  border: 2px solid var(--blue-soft);
  box-shadow: 0 0 14px rgba(124, 199, 255, 0.55);
}
.tl-dot::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  border: 1px solid rgba(124, 199, 255, 0.5);
  animation: corePulse 2.8s ease-out infinite;
}
.tl-tag {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(242, 184, 75, 0.25);
  background: rgba(242, 184, 75, 0.06);
}
.tl-item h3 { font-family: var(--font-d); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.tl-item p { color: var(--text-mid); font-size: 14.5px; line-height: 1.7; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; overflow: hidden; }
.contact-inner { position: relative; z-index: 1; }
.contact .kicker { text-align: center; }

.ring-deco {
  position: absolute; left: 50%; top: 52%;
  width: 660px; height: 660px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(140, 160, 255, 0.13);
  border-radius: 50%;
  animation: spinDeco 46s linear infinite;
  pointer-events: none;
}
.ring-deco::before {
  content: ''; position: absolute; inset: 11%;
  border: 1px solid rgba(242, 184, 75, 0.1);
  border-radius: 50%;
}
.ring-deco::after {
  content: ''; position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 16px rgba(255, 209, 102, 0.8);
}
@keyframes spinDeco { to { transform: translate(-50%, -50%) rotate(360deg); } }

.contact-title {
  font-family: var(--font-d); font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 5rem);
  line-height: 1.05; letter-spacing: -0.03em;
}
.contact .lead { text-align: center; }
.contact-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 44px; }
.contact-mail { margin-top: 34px; font-size: 12.5px; letter-spacing: 0.1em; color: var(--text-low); }
.contact-mail a { color: var(--blue-soft); border-bottom: 1px solid rgba(124, 199, 255, 0.35); padding-bottom: 2px; transition: color 0.3s, border-color 0.3s; }
.contact-mail a:hover { color: var(--gold-soft); border-color: rgba(255, 209, 102, 0.5); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--stroke); padding: 34px 0; position: relative; z-index: 2; background: rgba(5, 6, 14, 0.6); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-name { font-size: 14px; font-weight: 600; }
.footer-name .muted { color: var(--text-mid); font-weight: 400; }
.footer-name .sep { color: var(--text-low); }
.footer-meta { font-size: 11px; color: var(--text-low); letter-spacing: 0.05em; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 1181px) and (max-width: 1366px) {
  .hero-title { max-width: 760px; }
  .hero-sub { max-width: 540px; }
  .float-card {
    min-width: 154px;
    max-width: 210px;
    padding: 10px 12px;
    font-size: 10px;
  }
  .fc-a { right: 10%; top: 16%; }
  .fc-b { right: 4%; top: 29%; }
  .fc-c { right: 18%; bottom: 17%; }
  .fc-d { right: 5%; bottom: 24%; }
}

@media (min-width: 1025px) and (max-width: 1180px) {
  .hero-title { max-width: min(690px, calc(100vw - 330px)); }
  .hero-sub { max-width: min(520px, calc(100vw - 360px)); }
  .float-card {
    min-width: 138px;
    max-width: 190px;
    padding: 9px 11px;
    font-size: 9.8px;
  }
  .fc-a, .fc-c { display: none; }
  .fc-b { right: 24px; top: 25%; }
  .fc-d { right: 32px; bottom: 21%; }
}

@media (max-width: 1080px) {
  .demo-panel { grid-template-columns: 1fr; }
  .demo-machine { min-height: auto; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 1024px) {
  .hero-floats { display: none; }
  .hero-canvas { opacity: 0.55; }
  .hero-grid {
    -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 35%, #000 0%, transparent 70%);
    mask-image: radial-gradient(ellipse 100% 80% at 50% 35%, #000 0%, transparent 70%);
  }
}

@media (max-width: 940px) {
  .cards-3 { grid-template-columns: 1fr; max-width: 560px; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .nav-inner { height: 64px; }
  .section { scroll-margin-top: 50px; }
}

@media (max-width: 700px) {
  .aurora-blob { filter: blur(82px); opacity: 0.42; }
  .noise { opacity: 0.035; }
  .demo-stack { margin-top: 42px; }
  .demo-panel { padding: 20px; border-radius: 20px; }
  .demo-copy > p, .demo-meta dd, .email-draft p, .recommendations span { overflow-wrap: anywhere; }
  .demo-engine-input {
    min-height: 168px;
    max-height: 300px;
    font-size: 10.5px;
    line-height: 1.55;
  }
  .demo-actions { flex-direction: column; align-items: stretch; }
  .demo-actions .btn { width: 100%; justify-content: center; }
  .demo-machine { padding: 15px; border-radius: 17px; }
  .machine-head { align-items: flex-start; flex-direction: column; }
  .invoice-machine { grid-template-columns: 1fr; }
  .demo-pipeline { grid-template-columns: 1fr; gap: 7px; }
  .demo-pipeline i { width: 1px; height: 13px; justify-self: center; background: linear-gradient(180deg, transparent, var(--blue-soft), transparent); }
  .ar-row { grid-template-columns: 1fr auto; }
  .ar-row strong, .ar-row em { justify-self: end; }
  .ar-row b { grid-column: 1 / -1; width: fit-content; }
  .ar-stages, .ar-summary, .workflow-line, .workflow-metrics, .recommendations { grid-template-columns: 1fr; }
  .process-node::after { display: none; }
  .metric-bars div { grid-template-columns: 1fr 1fr 38px; }
  .metric-bars div > span { min-width: 0; overflow-wrap: anywhere; }
  .mini-table { font-size: 10.5px; }
  .mini-table th, .mini-table td { padding: 6px 4px; }
  .case-modal { padding: 14px; }
  .case-dialog { padding: 28px 20px; border-radius: 20px; }
  .case-row { grid-template-columns: 1fr; gap: 6px; }
  .projects-grid { grid-template-columns: 1fr; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .hero { padding: 110px 0 80px; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .contact-cta { flex-direction: column; align-items: stretch; }
  .contact-cta .btn { justify-content: center; }
  .ring-deco { width: 480px; height: 480px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .flow-panel { padding: 20px 16px 18px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  html { scroll-behavior: auto; }
  body:not(.is-loaded) { overflow-x: hidden; }
  .boot { display: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .w, .hero-sub, .hero-cta-row, .badge, .float-card, .scroll-cue { opacity: 1 !important; transform: none !important; }
  .hero-canvas { opacity: 0.45; }
  .hero-floats { display: none; }
  .cursor-dot, .cursor-ring, .spotlight { display: none; }
  .aurora-blob,
  .ticker-track,
  .ring-deco,
  .tl-dot::after,
  .engine-ring-g,
  .engine-bolt,
  .flow-streams .stream-path,
  .cue-line::after,
  .fc-dot.amber,
  .fc-bar i,
  .fc-foot.dots i { animation: none !important; }
  .orbit-wrap {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }
  .orbit-wrap .orbit-track { display: none; }
  .orbit-wrap .orbit-core {
    position: static;
    order: -1;
    transform: none;
    width: 100%;
    height: auto;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 14px;
    flex-direction: row;
    gap: 12px;
  }
  .orbit-wrap .orbit-core::before,
  .orbit-wrap .orbit-core::after { display: none; }
  .orbit-wrap .orbit-pill {
    position: static;
    transform: none !important;
    opacity: 1 !important;
  }
}
