/* ============================================
   PATH & PIXEL — design tokens
   ============================================ */
:root{
  --bg: #0A0B10;
  --surface: #12141C;
  --surface-2: #171A24;
  --line: #262A38;
  --text: #E9EAF0;
  --muted: #8A8FA3;
  --violet: #7C5CFF;
  --violet-soft: rgba(124,92,255,.14);
  --cyan: #35E6C4;
  --cyan-soft: rgba(53,230,196,.14);
  --amber: #FFB86B;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

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

.wrap{ max-width: var(--container); margin: 0 auto; padding: 0 28px; }

h1,h2,h3,h4{ font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
img{ max-width:100%; display:block; }
button{ font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; margin: 0; }

::selection{ background: var(--violet); color: #fff; }

/* subtle grain texture for depth */
.grain{
  position: fixed; inset:0; z-index: 2; pointer-events:none; opacity:.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-dot{
  position: fixed; top:0; left:0; width:18px; height:18px; border:1px solid var(--cyan);
  border-radius: 50%; pointer-events:none; z-index: 999; transform: translate(-50%,-50%);
  transition: width .18s var(--ease), height .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
  mix-blend-mode: difference;
  display:none;
}
@media (hover:hover) and (pointer:fine){ .cursor-dot{ display:block; } }
.cursor-dot.active{ width:38px; height:38px; background: var(--cyan); border-color: transparent; }

/* ============================================
   Signature element: the scroll path
   ============================================ */
.scroll-path{
  position:absolute; top:0; left: 50%; transform: translateX(-50%);
  width: 2px; height: 100%; z-index: 1; pointer-events:none;
  overflow: visible;
}
#scrollPathLine{
  stroke: var(--violet);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  opacity: .35;
}

/* ============================================
   Header
   ============================================ */
.site-header{
  position: fixed; top:0; left:0; right:0; z-index: 100;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease), background .35s var(--ease), backdrop-filter .35s var(--ease);
}
.site-header.scrolled{
  background: rgba(10,11,16,.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
/* header is fixed now, so push page content below it */
main{ display:block; }
.hero-cinematic{ margin-top: -76px; padding-top: 76px; }

.header-inner{ display:flex; align-items:center; justify-content:space-between; height: 76px; }

.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{ color: var(--cyan); display:flex; }
.brand-text{ font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-text em{ font-style: normal; color: var(--violet); }

.main-nav{ display:flex; align-items:center; gap: 8px; }
.main-nav a{
  position:relative; display:flex; align-items:center; gap:8px;
  font-size: .93rem; color: var(--muted); padding: 8px 14px; border-radius: 999px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.main-nav a:hover, .main-nav a.active{ color: var(--text); background: var(--surface); }
.nav-coord{ font-family: var(--font-mono); font-size: .68rem; color: var(--cyan); opacity: .8; }

.header-actions{ display:flex; align-items:center; gap: 16px; }

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: .92rem; font-weight: 600; font-family: var(--font-body);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.btn-primary{ background: var(--text); color: var(--bg); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(124,92,255,.55); background: var(--violet); color:#fff; }
.btn-ghost{ border-color: var(--line); color: var(--text); }
.btn-ghost:hover{ border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn-small{ padding: 10px 18px; font-size: .85rem; }

.nav-toggle{ display:none; flex-direction:column; gap:5px; background:none; border:none; padding:6px; }
.nav-toggle span{ width: 22px; height: 2px; background: var(--text); transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-nav{
  position: fixed; top: 76px; right: 0; height: calc(100% - 76px); width: min(320px, 84vw);
  background: var(--surface); border-left: 1px solid var(--line);
  display:flex; flex-direction:column; gap: 4px; padding: 28px;
  transform: translateX(100%); transition: transform .4s var(--ease);
  z-index: 99;
}
.mobile-nav.open{ transform: translateX(0); }
.mobile-nav a{ padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }

/* ============================================
   Buttons row / eyebrow / section headers
   ============================================ */
.eyebrow{
  display:inline-flex; align-items:center; gap: 8px;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cyan); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
}
.eyebrow::before{ content:''; width:6px; height:6px; border-radius:50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-soft); }

.section{ padding: 120px 0; position: relative; z-index: 2; }
.section-tight{ padding: 80px 0; }
.section-head{ max-width: 640px; margin-bottom: 56px; }
.section-head .eyebrow{ margin-bottom: 20px; }
.section-head h2{ font-size: clamp(1.9rem, 3.4vw, 2.8rem); margin-bottom: 16px; }
.section-head p{ color: var(--muted); font-size: 1.05rem; }

.section-head-row{ display:flex; align-items:flex-end; justify-content:space-between; gap: 24px; flex-wrap:wrap; margin-bottom: 56px; }
.section-head-row .section-head{ margin-bottom: 0; }

/* scroll reveal */
.reveal{ opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in{ opacity: 1; transform: translateY(0); }
.reveal-delay-1{ transition-delay: .08s; }
.reveal-delay-2{ transition-delay: .16s; }
.reveal-delay-3{ transition-delay: .24s; }
.reveal-delay-4{ transition-delay: .32s; }

/* ============================================
   HERO
   ============================================ */
.hero{
  position: relative; padding: 120px 0 100px; overflow: hidden;
}
.hero-glow{
  position:absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, var(--violet-soft) 0%, transparent 65%);
  z-index: 0; pointer-events:none;
}
.hero-inner{ position: relative; z-index: 2; text-align:center; max-width: 900px; margin: 0 auto; }
.hero .eyebrow{ margin-bottom: 28px; }
.hero h1{
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  margin-bottom: 26px;
}
.hero h1 .accent{ color: var(--violet); }
.hero h1 .accent-cyan{ color: var(--cyan); }
.hero-sub{ font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto 40px; }
.hero-cta{ display:flex; align-items:center; justify-content:center; gap: 16px; flex-wrap: wrap; }

.hero-coords{
  display:flex; justify-content:center; gap: 36px; margin-top: 80px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .78rem; color: var(--muted);
}
.hero-coords span{ color: var(--cyan); }

/* ============================================
   Cinematic portal hero (home page)
   ============================================ */
.hero-cinematic{
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 40% at 50% 78%, rgba(255,193,120,.06) 0%, transparent 60%),
    linear-gradient(180deg, #06070A 0%, #0A0B10 55%, #0D0A08 100%);
}

.portal-scene{
  position: relative; width: 100%; height: min(62vh, 620px); min-height: 380px;
  display: flex; align-items: flex-end; justify-content: center;
  margin-top: 40px;
}

/* soft ground glow beneath the portal */
.portal-ground{
  position:absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 120%; height: 40%;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(255,200,140,.10), transparent 70%);
  filter: blur(2px);
  z-index: 1;
}

/* the glowing monolith / doorway */
.portal-wrap{
  position: relative; z-index: 3; width: clamp(140px, 16vw, 230px);
  height: clamp(280px, 46vw, 460px);
  will-change: transform;
  cursor: pointer;
}
.portal-wrap:hover .portal{
  box-shadow:
    0 0 70px 26px rgba(255,238,210,.65),
    0 0 190px 85px rgba(255,210,150,.42),
    0 0 360px 180px rgba(180,150,255,.16);
}
.portal{
  position:absolute; inset:0;
  background: linear-gradient(180deg, #fff 0%, #F2EFE9 55%, #E7E2D8 100%);
  box-shadow:
    0 0 60px 20px rgba(255,238,210,.55),
    0 0 160px 70px rgba(255,210,150,.35),
    0 0 320px 160px rgba(180,150,255,.12);
  transition: box-shadow .5s var(--ease);
  border-radius: 3px;
}
.portal::before{
  content:''; position:absolute; inset: -60px;
  background: radial-gradient(ellipse 60% 90% at 50% 45%, rgba(255,235,200,.55), transparent 70%);
  filter: blur(30px); z-index: -1;
}
/* wrapper handles ground position + rises on hover */
.portal-figure-wrap{
  position:absolute; bottom: 6%; left: 50%; z-index: 4;
  width: 5.5%;
  transform: translateX(-50%) translateY(0);
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.portal-wrap:hover .portal-figure-wrap{
  transform: translateX(-50%) translateY(-38px);
}
/* svg keeps its own small idle drift, independent of the hover lift */
.portal-figure{
  display:block; width:100%; opacity:.92;
  animation: figureDrift 8s ease-in-out infinite;
}
@keyframes figureDrift{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-4px); }
}

/* drifting fog layers */
.fog-layer{
  position:absolute; bottom: -5%; height: 45%; width: 160%; left: -30%;
  background: linear-gradient(180deg, transparent 0%, rgba(40,36,46,.55) 60%, rgba(20,18,24,.75) 100%);
  filter: blur(18px); z-index: 2; pointer-events:none;
}
.fog-layer.fog-2{ opacity:.6; height: 30%; animation: fogDrift 26s linear infinite; }
.fog-layer.fog-3{ opacity:.4; height: 22%; animation: fogDrift 40s linear infinite reverse; }
@keyframes fogDrift{
  0%{ transform: translateX(0); }
  50%{ transform: translateX(4%); }
  100%{ transform: translateX(0); }
}

/* rising dust particles */
.portal-particles{
  position:absolute; inset:0; z-index: 3; pointer-events:none;
}

.hero-cinematic .hero-inner{ position: relative; z-index: 4; text-align:left; max-width: none; margin: 0; }
.hero-cinematic .wrap{ position:relative; z-index: 5; }
.hero-cinematic-text{ max-width: 620px; padding-top: 130px; }
.hero-cinematic-text .eyebrow{ margin-bottom: 26px; }
.hero-cinematic-text h1{ font-size: clamp(2.3rem, 5.6vw, 4rem); margin-bottom: 22px; text-align:left; }
.hero-cinematic-text .hero-sub{ margin: 0 0 36px; text-align:left; }
.hero-cinematic-text .hero-cta{ justify-content: flex-start; }

/* trust / logo strip along the bottom of the cinematic hero */
.trust-strip{
  position: relative; z-index: 5; border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 60px; padding: 28px 0;
}
.trust-strip .wrap{ display:flex; align-items:center; gap: 40px; flex-wrap: wrap; }
.trust-label{ font-family: var(--font-mono); font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.trust-logos{ display:flex; align-items:center; gap: 40px; flex-wrap: wrap; opacity: .55; }
.trust-logos span{ font-family: var(--font-display); font-size: 1rem; color: var(--text); display:flex; align-items:center; gap:8px; }
.trust-logos span::before{ content:''; width:7px; height:7px; border-radius:50%; background: var(--cyan); display:inline-block; }

@media (max-width: 640px){
  .hero-cinematic-text{ padding-top: 100px; }
  .portal-scene{ height: 44vh; margin-top: 20px; }
  .trust-strip .wrap{ gap: 20px; }
}

/* ============================================
   Compact cinematic scene (About / Use Cases hero banners)
   ============================================ */
.hero-scene{
  position: relative; overflow: hidden;
  padding: 150px 0 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 85%, rgba(124,92,255,.07) 0%, transparent 60%),
    linear-gradient(180deg, #06070A 0%, #0A0B10 100%);
}
.hero-scene .hero-cinematic-text{ padding-top: 0; max-width: 700px; }
.hero-scene .hero-cinematic-text h1{ font-size: clamp(2.1rem, 5vw, 3.4rem); }
.scene-stage{ position: relative; height: min(42vh, 360px); min-height: 240px; margin-top: 56px; }

/* --- Constellation scene (About) --- */
.constellation-stage svg{ position:absolute; inset:0; width:100%; height:100%; }
.constellation-node{
  fill: var(--bg); stroke: var(--violet); stroke-width: 1.6;
  filter: drop-shadow(0 0 8px rgba(124,92,255,.65));
  animation: nodePulse 3.2s ease-in-out infinite;
}
.constellation-node.cyan{ stroke: var(--cyan); filter: drop-shadow(0 0 8px rgba(53,230,196,.65)); }
.constellation-node:nth-child(2){ animation-delay: .3s; }
.constellation-node:nth-child(4){ animation-delay: .6s; }
.constellation-node:nth-child(6){ animation-delay: .9s; }
.constellation-node:nth-child(8){ animation-delay: 1.2s; }
@keyframes nodePulse{
  0%,100%{ r: 4; opacity: .85; }
  50%{ r: 5.4; opacity: 1; }
}
.constellation-line{ stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 5; opacity: .8; }
.constellation-label{
  font-family: var(--font-mono); font-size: 9px; fill: var(--muted); letter-spacing: .04em;
}

/* --- Grid-map scene (Use Cases) --- */
.grid-stage{ display:flex; align-items:flex-end; justify-content:center; }
.grid-horizon{
  position:absolute; left:50%; top: 18%; transform: translateX(-50%);
  width: 70%; height: 60px; border-radius: 50%;
  background: radial-gradient(ellipse 60% 100% at 50% 50%, rgba(53,230,196,.16), transparent 75%);
  filter: blur(10px);
}
.grid-floor{
  position:absolute; bottom: -6%; left: 50%; transform: translateX(-50%);
  width: 140%; height: 75%;
  background-image:
    linear-gradient(rgba(140,150,180,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,150,180,.22) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: linear-gradient(to top, black 15%, transparent 92%);
  mask-image: linear-gradient(to top, black 15%, transparent 92%);
  transform-origin: 50% 100%;
  transform: translateX(-50%) perspective(500px) rotateX(62deg);
  animation: gridScroll 5s linear infinite;
}
@keyframes gridScroll{
  from{ background-position: 0 0, 0 0; }
  to{ background-position: 0 46px, 0 0; }
}
.grid-pin{
  position:absolute; display:flex; flex-direction:column; align-items:center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; color: var(--cyan); white-space: nowrap;
}
.grid-pin::before{
  content:''; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(53,230,196,.55);
  animation: ping 2.4s var(--ease) infinite;
}
.grid-pin.violet{ color: var(--violet); }
.grid-pin.violet::before{ background: var(--violet); box-shadow: 0 0 0 0 rgba(124,92,255,.55); animation-name: pingViolet; }
@keyframes pingViolet{
  0%{ box-shadow: 0 0 0 0 rgba(124,92,255,.55); }
  70%{ box-shadow: 0 0 0 16px rgba(124,92,255,0); }
  100%{ box-shadow: 0 0 0 0 rgba(124,92,255,0); }
}
.grid-pin.p1{ top: 8%; left: 22%; animation-delay: .2s; }
.grid-pin.p2{ top: 2%; left: 50%; animation-delay: .5s; }
.grid-pin.p3{ top: 14%; left: 74%; animation-delay: .8s; }

@media (max-width: 640px){
  .hero-scene{ padding-top: 110px; }
  .scene-stage{ height: 30vh; margin-top: 36px; }
  .grid-pin.p1{ left: 12%; } .grid-pin.p3{ left: 82%; }
}

/* ============================================
   Stat strip
   ============================================ */
.stat-strip{ border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-grid{ display:grid; grid-template-columns: repeat(4, 1fr); }
.stat-item{ padding: 40px 28px; text-align:center; border-right: 1px solid var(--line); }
.stat-item:last-child{ border-right: none; }
.stat-num{ font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.6rem); color: var(--text); font-weight: 700; }
.stat-num span{ color: var(--violet); }
.stat-label{ font-size: .85rem; color: var(--muted); margin-top: 6px; }

/* ============================================
   Waypoint / process list (numbered as coordinates — real sequence)
   ============================================ */
.waypoints{ display:flex; flex-direction:column; }
.waypoint{
  display:grid; grid-template-columns: 120px 1fr; gap: 32px; padding: 40px 0;
  border-top: 1px solid var(--line); position: relative;
}
.waypoint:last-child{ border-bottom: 1px solid var(--line); }
.waypoint-coord{ font-family: var(--font-mono); color: var(--cyan); font-size: .95rem; padding-top: 4px; }
.waypoint-body h3{ font-size: 1.35rem; margin-bottom: 10px; }
.waypoint-body p{ color: var(--muted); max-width: 560px; }
.waypoint-node{
  position:absolute; left: 96px; top: 44px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--violet); transition: background .3s var(--ease), transform .3s var(--ease);
}
.waypoint:hover .waypoint-node{ background: var(--violet); transform: scale(1.3); }

/* ============================================
   Card grid (use cases / features)
   ============================================ */
.card-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; position: relative; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover{ transform: translateY(-6px); border-color: var(--violet); box-shadow: 0 20px 50px -20px rgba(0,0,0,.6); }
.card > *{ position: relative; z-index: 1; }
.card-icon{
  width: 46px; height:46px; border-radius: 12px; display:flex; align-items:center; justify-content:center;
  background: var(--violet-soft); color: var(--violet); margin-bottom: 22px;
}
.card h3{ font-size: 1.15rem; margin-bottom: 10px; }
.card p{ color: var(--muted); font-size: .95rem; }
.card-tag{
  position:absolute; top: 24px; right: 24px; font-family: var(--font-mono); font-size: .68rem; color: var(--muted);
}

/* cursor-following glow — JS sets --mx/--my on mousemove (see script.js) */
.card::before, .value-item::before{
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none; opacity:0;
  background: radial-gradient(240px circle at var(--mx,50%) var(--my,50%), rgba(124,92,255,.18), transparent 72%);
  transition: opacity .4s var(--ease);
}
.card:hover::before, .value-item:hover::before{ opacity:1; }

/* ============================================
   Use-case filter tabs + grid
   ============================================ */
.filter-bar{ display:flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.filter-btn{
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: .85rem; transition: all .25s var(--ease);
}
.filter-btn:hover{ color: var(--text); border-color: var(--cyan); }
.filter-btn.active{ background: var(--text); color: var(--bg); border-color: var(--text); }

.usecase-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.usecase-card{
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow:hidden;
  transition: transform .45s var(--ease), border-color .4s var(--ease), opacity .3s ease;
  cursor: pointer;
}
.usecase-card:hover{ transform: translateY(-6px) rotate(-.3deg); border-color: var(--cyan); }
.usecase-visual{
  height: 170px; position:relative; overflow:hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--line);
}
.usecase-thumb{
  position:absolute; inset:0; width:100%; height:100%; object-fit: cover;
  filter: grayscale(.9) contrast(1.1) brightness(.55);
  transform: scale(1.1);
  transition: filter .55s var(--ease), transform .6s var(--ease);
}
.usecase-visual::after{
  content:''; position:absolute; inset:0;
  background: linear-gradient(165deg, rgba(124,92,255,.5), rgba(53,230,196,.2) 65%);
  mix-blend-mode: color; opacity: .9; transition: opacity .5s var(--ease);
}
.usecase-visual::before{
  content: attr(data-glyph); font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  color: var(--text); position:absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(10,11,16,.5); backdrop-filter: blur(6px);
  padding: 4px 9px; border-radius: 999px; letter-spacing: .04em;
  transition: background .4s var(--ease), color .4s var(--ease);
}
.usecase-card:hover .usecase-thumb{ filter: grayscale(.15) contrast(1.05) brightness(.85); transform: scale(1); }
.usecase-card:hover .usecase-visual::after{ opacity: .35; }
.usecase-card:hover .usecase-visual::before{ background: var(--violet); color: #fff; }
.usecase-body{ padding: 24px; }
.usecase-body .js-enquire-btn{ position: relative; z-index: 2; }
.usecase-cat{ font-family: var(--font-mono); font-size: .68rem; color: var(--cyan); text-transform: uppercase; letter-spacing: .06em; }
.usecase-body h3{ font-size: 1.1rem; margin: 10px 0; }
.usecase-body p{ color: var(--muted); font-size: .9rem; }
.usecase-card.hidden{ display:none; }

/* ============================================
   Modal / popup (used for use-case detail + form success)
   ============================================ */
.modal-overlay{
  position: fixed; inset:0; background: rgba(6,7,11,.72); backdrop-filter: blur(6px);
  z-index: 200; display:flex; align-items:center; justify-content:center; padding: 24px;
  opacity: 0; pointer-events:none; transition: opacity .3s var(--ease);
}
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal{
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  max-width: 560px; width: 100%; padding: 40px; position: relative;
  transform: translateY(24px) scale(.97); transition: transform .35s var(--ease);
}
.modal-overlay.open .modal{ transform: translateY(0) scale(1); }
.modal-close{
  position:absolute; top: 18px; right: 18px; width: 34px; height:34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.1rem;
  display:flex; align-items:center; justify-content:center; transition: all .25s var(--ease);
}
.modal-close:hover{ border-color: var(--cyan); color: var(--cyan); }
.modal .eyebrow{ margin-bottom: 18px; }
.modal h3{ font-size: 1.5rem; margin-bottom: 14px; }
.modal p{ color: var(--muted); }
.modal-meta{ display:flex; gap: 20px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: .78rem; color: var(--cyan); }

/* ============================================
   Toast
   ============================================ */
.toast{
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 14px 24px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; z-index: 300; opacity: 0; pointer-events:none;
  transition: all .4s var(--ease); display:flex; align-items:center; gap:10px;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }
.toast::before{ content:'✓'; color: var(--cyan); font-weight: 700; }

/* ============================================
   Quote / testimonial band
   ============================================ */
.quote-band{ text-align:center; max-width: 780px; margin: 0 auto; }
.quote-band p{ font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.4; color: var(--text); }
.quote-band .quote-mark{ font-size: 3rem; color: var(--violet); display:block; margin-bottom: 12px; font-family: var(--font-display); }
.quote-attrib{ margin-top: 28px; color: var(--muted); font-size: .9rem; font-family: var(--font-mono); }

/* ============================================
   CTA band
   ============================================ */
.cta-band{
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: 24px; padding: 72px 48px; text-align:center;
  position: relative; overflow:hidden;
}
.cta-band::after{
  content:''; position:absolute; width: 400px; height:400px; border-radius:50%;
  background: radial-gradient(circle, var(--cyan-soft), transparent 70%);
  top: -150px; right: -100px;
}
.cta-band h2{ font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 18px; position:relative; }
.cta-band p{ color: var(--muted); max-width: 480px; margin: 0 auto 34px; position:relative; }
.cta-band .hero-cta{ position:relative; }

/* ============================================
   Team / values grid (about)
   ============================================ */
.value-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap: 2px; background: var(--line); border-radius: var(--radius); overflow:hidden; }
.value-item{ background: var(--surface); padding: 36px; transition: background .3s var(--ease); position: relative; overflow: hidden; isolation: isolate; }
.value-item > *{ position: relative; z-index: 1; }
.value-item:hover{ background: var(--surface-2); }
.value-item span{ font-family: var(--font-mono); color: var(--cyan); font-size: .78rem; }
.value-item h3{ font-size: 1.2rem; margin: 12px 0 10px; }
.value-item p{ color: var(--muted); font-size: .93rem; }

.timeline-wrap{ display:grid; grid-template-columns: 1fr 380px; gap: 56px; align-items:start; }
.timeline-visual{ position: sticky; top: 110px; }
.timeline-visual .img-frame{ aspect-ratio: 4/5; }
@media (max-width: 900px){
  .timeline-wrap{ grid-template-columns: 1fr; }
  .timeline-visual{ display:none; }
}
.timeline{ position:relative; padding-left: 32px; border-left: 1px dashed var(--line); }
.timeline-item{ position:relative; padding-bottom: 44px; }
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-item::before{
  content:''; position:absolute; left: -37px; top: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
}
.timeline-year{ font-family: var(--font-mono); color: var(--cyan); font-size: .82rem; }
.timeline-item h3{ font-size: 1.1rem; margin: 8px 0; }
.timeline-item p{ color: var(--muted); font-size: .92rem; max-width: 520px; }

/* ============================================
   Contact page
   ============================================ */
.contact-grid{ display:grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items:flex-start; }
.form-group{ margin-bottom: 22px; }
.form-group label{ display:block; font-size: .82rem; color: var(--muted); margin-bottom: 8px; font-family: var(--font-mono); }
.form-group input, .form-group textarea, .form-group select{
  width:100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; color: var(--text); font-family: var(--font-body); font-size: .95rem;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus{
  outline:none; border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft);
}
.form-group textarea{ min-height: 130px; resize: vertical; }
.form-row{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-error{ color: var(--amber); font-size: .78rem; margin-top: 6px; display:none; font-family: var(--font-mono); }
.form-group.error input, .form-group.error textarea{ border-color: var(--amber); }
.form-group.error .form-error{ display:block; }

.info-card{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-bottom: 20px; }
.info-card h3{ font-size: 1rem; margin-bottom: 14px; }
.info-row{ display:flex; justify-content:space-between; padding: 12px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.info-row:first-of-type{ border-top:none; }
.info-row span:first-child{ color: var(--muted); }
.info-row span:last-child{ font-family: var(--font-mono); font-size: .85rem; }

.map-box{
  height: 220px; border-radius: var(--radius); border: 1px solid var(--line);
  background:
    linear-gradient(var(--surface) 1px, transparent 1px) 0 0/24px 24px,
    linear-gradient(90deg, var(--surface) 1px, transparent 1px) 0 0/24px 24px,
    var(--surface-2);
  position: relative; overflow:hidden;
}
.map-box::after{
  content:'⚑ LONDON, UK'; position:absolute; bottom: 16px; left: 16px;
  font-family: var(--font-mono); font-size: .75rem; color: var(--cyan);
  background: rgba(10,11,16,.7); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.map-box .map-dot{
  position:absolute; top:46%; left: 54%; width:12px; height:12px; border-radius:50%; background: var(--violet);
  box-shadow: 0 0 0 0 rgba(124,92,255,.6); animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping{
  0%{ box-shadow: 0 0 0 0 rgba(124,92,255,.55); }
  70%{ box-shadow: 0 0 0 18px rgba(124,92,255,0); }
  100%{ box-shadow: 0 0 0 0 rgba(124,92,255,0); }
}

/* faq */
.faq-item{ border-top: 1px solid var(--line); }
.faq-item:last-child{ border-bottom: 1px solid var(--line); }
.faq-q{
  width:100%; background:none; border:none; color: var(--text); text-align:left;
  padding: 22px 0; display:flex; justify-content:space-between; align-items:center; font-size: 1.02rem; font-family: var(--font-body); font-weight: 500;
}
.faq-q::after{ content:'+'; font-size: 1.4rem; color: var(--cyan); transition: transform .3s var(--ease); }
.faq-item.open .faq-q::after{ transform: rotate(45deg); }
.faq-a{ max-height: 0; overflow:hidden; transition: max-height .4s var(--ease); }
.faq-a p{ color: var(--muted); padding-bottom: 22px; max-width: 640px; font-size: .95rem; }

/* ============================================
   Footer
   ============================================ */
.site-footer{ border-top: 1px solid var(--line); padding: 72px 0 0; position: relative; z-index: 2; }
.footer-inner{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.footer-tagline{ color: var(--muted); font-size: .92rem; margin: 18px 0 14px; max-width: 260px; }
.footer-coord{ font-family: var(--font-mono); font-size: .72rem; color: var(--line); }
.footer-heading{ font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 18px; }
.footer-col a{ display:block; color: var(--muted); font-size: .92rem; padding: 6px 0; transition: color .25s var(--ease); }
.footer-col a:hover{ color: var(--cyan); }
.footer-small{ color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.footer-form{ display:flex; border: 1px solid var(--line); border-radius: 999px; overflow:hidden; }
.footer-form input{ flex:1; background:none; border:none; padding: 12px 16px; color: var(--text); font-size: .88rem; }
.footer-form input:focus{ outline:none; }
.footer-form button{ background: var(--violet); border:none; color:#fff; width: 44px; font-size: 1rem; transition: background .25s var(--ease); }
.footer-form button:hover{ background: var(--cyan); color: var(--bg); }
.footer-form-msg{ font-size: .78rem; color: var(--cyan); margin-top: 10px; font-family: var(--font-mono); min-height: 1em; }
.footer-bottom{
  display:flex; justify-content:space-between; padding: 24px 0; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--muted); flex-wrap: wrap; gap: 10px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 980px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .stat-grid{ grid-template-columns: repeat(2,1fr); }
  .stat-item:nth-child(2){ border-right:none; }
  .card-grid, .usecase-grid{ grid-template-columns: repeat(2,1fr); }
  .contact-grid{ grid-template-columns: 1fr; }
  .footer-inner{ grid-template-columns: 1fr 1fr; }
  .value-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 640px){
  .section{ padding: 80px 0; }
  .card-grid, .usecase-grid{ grid-template-columns: 1fr; }
  .stat-grid{ grid-template-columns: 1fr; }
  .stat-item{ border-right:none; border-bottom: 1px solid var(--line); }
  .waypoint{ grid-template-columns: 1fr; gap: 10px; }
  .waypoint-node{ display:none; }
  .footer-inner{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  .header-actions .btn-small{ display:none; }
  .scroll-path{ display:none; }
}

/* ---------------------------------------------
   MEDIA — imagery added across pages
   Kept in the same dark/cinematic language as
   the rest of the site: duotone-ish treatment,
   thin cyan-adjacent border, soft glow, slow
   ambient motion (no jarring animation).
--------------------------------------------- */

.img-frame{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  isolation: isolate;
}
.img-frame img{
  display:block; width:100%; height:100%; object-fit: cover;
  filter: grayscale(.25) contrast(1.05) brightness(.92);
  transition: filter .5s var(--ease), transform 8s linear;
}
.img-frame::after{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(10,11,16,0) 40%, rgba(10,11,16,.55) 100%),
              linear-gradient(120deg, rgba(53,230,196,.10), transparent 60%);
  pointer-events:none;
}
.img-frame:hover img{ filter: grayscale(0) contrast(1.05) brightness(1); }

/* slow ambient zoom, only while in view */
.img-kenburns img{ transform: scale(1.06); }
.reveal.in .img-kenburns img{ transform: scale(1); }

/* gentle vertical float loop, for smaller accent images */
@keyframes mediaFloat{
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.img-float{ animation: mediaFloat 6s ease-in-out infinite; }

/* -- Split section: image + text side by side -- */
.media-split{
  display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:center;
}
.media-split .media-split-visual .img-frame{ aspect-ratio: 4/5; }
.media-split.reverse .media-split-visual{ order: 2; }

/* -- Full-bleed cinematic banner (Home, between sections) -- */
.media-banner{
  position: relative; height: 62vh; min-height: 380px; max-height: 640px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.media-banner .img-frame{ position:absolute; inset:0; border:none; border-radius:0; }
.media-banner-content{
  position: relative; z-index: 2; height:100%;
  display:flex; flex-direction:column; justify-content:flex-end;
  padding-bottom: 64px;
}
.media-banner-content h2{ font-size: clamp(1.7rem,4vw,2.6rem); max-width: 640px; }
.media-banner-content p{ color: var(--muted); max-width: 480px; margin-top: 12px; }

/* -- Team photo thumbnails on About cards -- */
.card-photo{
  width: 100%; aspect-ratio: 16/10; border-radius: calc(var(--radius) - 6px);
  overflow:hidden; margin-bottom: 18px; border: 1px solid var(--line);
}
.card-photo img{
  width:100%; height:100%; object-fit:cover;
  filter: grayscale(.35) contrast(1.05) brightness(.9);
  transition: filter .4s var(--ease), transform .6s var(--ease);
}
.card:hover .card-photo img{ filter: grayscale(0) brightness(1); transform: scale(1.04); }

/* -- Small mascot-style accent image (CTA bands) -- */
.cta-media{
  width: 96px; height: 96px; border-radius: 50%; overflow:hidden;
  border: 1px solid var(--line); margin: 0 auto 22px;
  box-shadow: 0 0 0 6px var(--cyan-soft);
}
.cta-media img{ width:100%; height:100%; object-fit:cover; }

.hero-about-visual{
  position: absolute; right: 6%; top: 18%; z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}
.hero-about-visual .img-frame{ border-radius: var(--radius); }

.hero-visual-decor{
  position: absolute; right: 6%; top: 20%; z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}

@media (max-width: 900px){
  .media-split{ grid-template-columns: 1fr; gap: 28px; }
  .media-split .media-split-visual{ order: -1 !important; }
  .media-split .media-split-visual .img-frame{ aspect-ratio: 16/10; }
  .media-banner{ height: 46vh; }
  .hero-about-visual, .hero-visual-decor{ display:none; }
}

/* ============================================
   Kinetic text marquee (section divider)
   ============================================ */
.marquee-strip{
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface); padding: 22px 0;
}
.marquee-track{
  display: inline-flex; align-items:center; width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-strip:hover .marquee-track{ animation-play-state: paused; }
.marquee-track span{
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  color: var(--muted); padding: 0 28px; display:inline-flex; align-items:center; gap: 28px;
  flex: none;
}
.marquee-track span em{ font-style: normal; color: var(--text); }
.marquee-track span::after{
  content: '◆'; font-size: .6rem; color: var(--cyan); opacity:.7;
}
@keyframes marqueeScroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.marquee-strip.reverse .marquee-track{ animation-direction: reverse; }

/* ============================================
   Image gallery marquee — auto-scrolling strip
   of the full photo set, duotone-to-color on hover
   ============================================ */
.gallery-marquee{ overflow: hidden; padding: 64px 0; }
.gallery-track{
  display: flex; gap: 20px; width: max-content;
  animation: gallerySlide 40s linear infinite;
}
.gallery-marquee:hover .gallery-track{ animation-play-state: paused; }
.gallery-item{
  flex: none; width: 240px; height: 300px; border-radius: var(--radius);
  overflow: hidden; position: relative; border: 1px solid var(--line);
  background: var(--surface);
}
.gallery-item img{
  width:100%; height:100%; object-fit: cover;
  filter: grayscale(.85) contrast(1.05) brightness(.75);
  transform: scale(1.04);
  transition: filter .5s var(--ease), transform .6s var(--ease);
}
.gallery-item::after{
  content:''; position:absolute; inset:0;
  background: linear-gradient(200deg, rgba(124,92,255,.28), transparent 60%);
  mix-blend-mode: color; pointer-events:none;
  transition: opacity .5s var(--ease);
}
.gallery-item:hover img{ filter: grayscale(0) contrast(1.05) brightness(1); transform: scale(1); }
.gallery-item:hover::after{ opacity: .25; }
.gallery-item-label{
  position:absolute; bottom: 14px; left: 14px; z-index: 2;
  font-family: var(--font-mono); font-size: .7rem; color: var(--text);
  background: rgba(10,11,16,.55); backdrop-filter: blur(6px);
  padding: 5px 10px; border-radius: 999px; opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.gallery-item:hover .gallery-item-label{ opacity: 1; transform: translateY(0); }

@keyframes gallerySlide{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* ============================================
   Scroll-linked parallax (deeper than hover-only
   effects — image shifts as the page actually scrolls)
   ============================================ */
.scroll-parallax{ will-change: transform; }
.media-banner .img-frame .scroll-parallax{
  position: absolute; top: -15%; left: 0; width: 100%; height: 130%;
}

/* ============================================
   Magnetic buttons — primary CTAs pull slightly
   toward the cursor within their own bounds
   ============================================ */
.btn-magnetic{ transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease); }

@media (max-width: 640px){
  .marquee-track span{ font-size: 1.05rem; padding: 0 18px; gap: 18px; }
  .gallery-item{ width: 180px; height: 230px; }
}

/* ============================================
   Typewriter headline — character-by-character
   reveal that preserves inline accent colors
   (see .typewriter usage in index.php + script.js)
   ============================================ */
.tw-char{ transition: opacity .02s linear; }
.tw-cursor{
  display:inline-block; width: 3px; height: .85em; background: var(--cyan);
  margin-left: 3px; vertical-align: -0.08em;
  animation: twBlink .9s steps(1) infinite;
  transition: opacity .4s var(--ease);
}
.tw-cursor.tw-cursor-hide{ opacity: 0; }
@keyframes twBlink{
  0%, 50%{ opacity: 1; }
  50.01%, 100%{ opacity: 0; }
}

/* ============================================
   Site-wide fade page transitions
   (see the blocking inline script in header.php
   and the click-intercept logic in script.js)
   ============================================ */
html.has-js body{ opacity: 0; }
html.has-js body.page-ready{ opacity: 1; transition: opacity .45s var(--ease); }
body.page-leaving{ opacity: 0 !important; transition: opacity .28s var(--ease) !important; }

/* ============================================
   Pixel — the chat bubble assistant
   ============================================ */
.pixel-bubble{
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.6);
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.pixel-bubble:hover{ transform: translateY(-3px) scale(1.04); background: var(--violet); color: #fff; }
.pixel-bubble::before{
  content:''; position:absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid var(--cyan); opacity: .55;
  animation: pixelRing 2.6s var(--ease) infinite;
}
@keyframes pixelRing{
  0%{ transform: scale(.9); opacity: .55; }
  70%{ transform: scale(1.25); opacity: 0; }
  100%{ transform: scale(1.25); opacity: 0; }
}
.pixel-bubble svg{ width: 26px; height: 26px; position: relative; z-index: 1; }
.pixel-bubble .pixel-icon-close{ display:none; }
.pixel-bubble.open .pixel-icon-chat{ display:none; }
.pixel-bubble.open .pixel-icon-close{ display:block; }
.pixel-badge{
  position:absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--cyan); color: var(--bg); font-family: var(--font-mono); font-size: .68rem;
  display:flex; align-items:center; justify-content:center; font-weight: 600;
  opacity: 0; transform: scale(.6); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.pixel-badge.show{ opacity: 1; transform: scale(1); }

.pixel-panel{
  position: fixed; bottom: 98px; right: 24px; z-index: 399;
  width: 368px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 140px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.7);
  transform-origin: bottom right;
  transform: scale(.92) translateY(12px); opacity: 0; pointer-events: none;
  transition: transform .32s var(--ease), opacity .28s var(--ease);
}
.pixel-panel.open{ transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }

.pixel-header{
  display:flex; align-items:center; gap: 12px; padding: 18px 20px;
  border-bottom: 1px solid var(--line); flex: none;
}
.pixel-avatar{
  width: 36px; height: 36px; border-radius: 50%; background: var(--bg);
  border: 1px solid var(--line); display:flex; align-items:center; justify-content:center; color: var(--cyan);
  flex: none;
}
.pixel-header-text{ line-height: 1.25; }
.pixel-header-text strong{ font-family: var(--font-display); font-size: .98rem; display:block; }
.pixel-header-text span{ font-family: var(--font-mono); font-size: .7rem; color: var(--cyan); display:flex; align-items:center; gap: 5px; }
.pixel-header-text span::before{ content:''; width:6px; height:6px; border-radius:50%; background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }

.pixel-messages{
  flex: 1; overflow-y: auto; padding: 18px 20px; display:flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.pixel-messages::-webkit-scrollbar{ width: 5px; }
.pixel-messages::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 999px; }

.pixel-msg{
  max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: .88rem; line-height: 1.5;
  animation: pixelMsgIn .35s var(--ease) both;
}
@keyframes pixelMsgIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}
.pixel-msg.bot{ align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--text); }
.pixel-msg.user{ align-self: flex-end; background: var(--violet); color: #fff; border-bottom-right-radius: 4px; }
.pixel-msg .pixel-msg-link{
  display:inline-flex; align-items:center; gap: 6px; margin-top: 10px;
  font-family: var(--font-mono); font-size: .74rem; color: var(--cyan);
  border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.pixel-msg .pixel-msg-link:hover{ border-color: var(--cyan); }

.pixel-typing{ align-self: flex-start; display:flex; gap: 4px; padding: 13px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 4px; }
.pixel-typing span{ width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: pixelDot 1.2s ease-in-out infinite; }
.pixel-typing span:nth-child(2){ animation-delay: .15s; }
.pixel-typing span:nth-child(3){ animation-delay: .3s; }
@keyframes pixelDot{
  0%, 60%, 100%{ transform: translateY(0); opacity: .5; }
  30%{ transform: translateY(-4px); opacity: 1; }
}

.pixel-chips{ display:flex; flex-wrap: wrap; gap: 8px; padding: 4px 20px 16px; flex: none; }
.pixel-chip{
  font-family: var(--font-body); font-size: .8rem; color: var(--text);
  border: 1px solid var(--line); background: var(--bg); padding: 8px 14px; border-radius: 999px;
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.pixel-chip:hover{ border-color: var(--cyan); background: var(--surface-2); transform: translateY(-1px); }

.pixel-input-row{
  display:flex; align-items:center; gap: 10px; padding: 14px 16px;
  border-top: 1px solid var(--line); flex: none;
}
.pixel-input-row input{
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 11px 16px; color: var(--text); font-size: .86rem; font-family: var(--font-body);
  transition: border-color .25s var(--ease);
}
.pixel-input-row input:focus{ outline: none; border-color: var(--violet); }
.pixel-input-row button{
  width: 38px; height: 38px; border-radius: 50%; background: var(--violet); color: #fff;
  display:flex; align-items:center; justify-content:center; flex: none;
  transition: background .25s var(--ease), transform .2s var(--ease);
}
.pixel-input-row button:hover{ background: var(--cyan); color: var(--bg); transform: scale(1.06); }

@media (max-width: 640px){
  .pixel-bubble{ bottom: 18px; right: 18px; width: 54px; height: 54px; }
  .pixel-panel{
    bottom: 84px; right: 12px; left: 12px; width: auto; height: min(70vh, 560px);
  }
}