/* ==========================================================================
   AlinePage — Modern Tech Design System (Dark)
   Inter + JetBrains Mono. Single accent. Hairline geometry.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg-0: #07080B;         /* page canvas */
  --bg-1: #0B0D12;         /* section base */
  --bg-2: #10141B;         /* elevated panel */
  --bg-3: #161B24;         /* input / inset */

  /* Text */
  --text-1: #F4F6FA;
  --text-2: #A7B0C0;
  --text-3: #6B7484;
  --text-4: #454C59;

  /* Lines */
  --line-1: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.10);
  --line-3: rgba(255, 255, 255, 0.16);

  /* Accent — locked to logo palette: navy #16345C, blue #2563EB, cyan #22D3EE */
  --logo-navy: #16345C;
  --logo-blue: #2563EB;
  --logo-cyan: #22D3EE;
  --accent: #2563EB;         /* primary — logo blue */
  --accent-strong: #22D3EE;  /* highlight — logo cyan lens */
  --accent-ink: #16345C;     /* deep — logo navy */
  --accent-glow: rgba(37, 99, 235, 0.45);
  --accent-glow-cyan: rgba(34, 211, 238, 0.35);

  /* Signal colors kept minimal for status only */
  --signal-warn: #F5A524;
  --signal-ok: #34D399;
  --signal-error: #F87171;

  /* Legacy tokens (mapped so any lingering rules still resolve) */
  --bg-white: var(--bg-0);
  --bg-slate: var(--bg-1);
  --bg-ink: var(--bg-0);
  --color-navy: var(--accent-ink);
  --color-blue: var(--accent);
  --color-cyan: var(--accent-strong);
  --color-lens-cyan: var(--accent);
  --color-light-blue: var(--accent);
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: var(--line-2);
  --glass-glow: rgba(37, 99, 235, 0.04);
  --text-primary: var(--text-1);
  --text-secondary: var(--text-2);
  --text-muted: var(--text-3);

  /* Type */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sora: var(--font-sans);
  --font-manrope: var(--font-sans);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: all 260ms var(--ease-out);
  --transition-fast: all 160ms var(--ease-out);

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

/* ------------------------------------------------------------ Reset & base */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  background: var(--bg-0);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(37, 99, 235, 0.06), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(34, 211, 238, 0.05), transparent 55%),
    var(--bg-0);
}

/* Subtle grid backdrop — the "tech" texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
}

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

/* Ambient glows retained but muted to a single accent hue */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(140px);
  opacity: 0.35;
}
.glow-1 {
  width: 640px; height: 640px; top: -180px; right: -160px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}
.glow-2 {
  width: 520px; height: 520px; top: 46%; left: -200px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22) 0%, transparent 70%);
  opacity: 0.25;
}
.glow-3 { display: none; }

/* ------------------------------------------------------------ Layout */

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

.grid { display: grid; gap: 40px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

.text-center { text-align: center; }

/* ------------------------------------------------------------ Typography */

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--text-1);
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 { font-weight: 700; letter-spacing: -0.03em; }

p { color: var(--text-2); font-weight: 400; }
strong { color: var(--text-1); font-weight: 600; }

/* ------------------------------------------------------------ Glass panel */

.glass-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005)),
    var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 60px -20px rgba(0, 0, 0, 0.6);
  transition: var(--transition-smooth);
  backdrop-filter: none;
}

.glass-panel:hover {
  border-color: var(--line-3);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 80px -20px rgba(0, 0, 0, 0.7);
}

/* ------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-1);
  color: var(--bg-0);
  border-color: var(--text-1);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-0);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-secondary {
  background: transparent;
  color: var(--text-1);
  border-color: var(--line-3);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-tertiary {
  background: transparent;
  color: var(--text-2);
  border-color: var(--line-2);
}
.btn-tertiary:hover {
  color: var(--text-1);
  border-color: var(--line-3);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: var(--r-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 24px;
}

/* ------------------------------------------------------------ Header */

.main-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: var(--transition-smooth);
}

.main-header.scrolled {
  background: rgba(7, 8, 11, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-1);
  padding: 12px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-svg { transition: var(--transition-smooth); }
.logo-link:hover .logo-svg { transform: rotate(4deg) scale(1.04); }

.brand-text {
  font-family: var(--font-sans);
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--text-1);
  line-height: 1;
}
.brand-light { font-weight: 300; color: var(--text-2); }
.brand-bold { font-weight: 700; color: var(--text-1); }

.logo-link { gap: 12px; }
.logo-svg { flex-shrink: 0; }

.nav-menu { display: flex; gap: 28px; }

.nav-item {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-2);
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  padding: 4px 0;
}
.nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: var(--transition-fast);
}
.nav-item:hover { color: var(--text-1); }
.nav-item.active { color: var(--text-1); }
.nav-item.active::after,
.nav-item:hover::after { width: 100%; }

@media (max-width: 768px) {
  .nav-menu, .header-action { display: none; }
}

/* ------------------------------------------------------------ Hero */

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
  padding-top: 80px;
}

#canvas-container {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-orbit-visual {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: absolute;
  top: 50%;
  right: max(4vw, 36px);
  width: min(46vw, 640px);
  aspect-ratio: 1.1;
  perspective: 1200px;
  transform: translateY(-46%) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}

.hero-render {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 34px 90px rgba(37, 99, 235, 0.14))
    brightness(1.06)
    hue-rotate(180deg)
    saturate(0.9);
  opacity: 0.62;
  transform: translateZ(10px);
  mix-blend-mode: screen;
}

.hero-depth-grid {
  position: absolute;
  inset: 12% 3% 6% 8%;
  border-radius: 50%;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: rotateX(62deg) rotateZ(-17deg) translateZ(-130px);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  opacity: 0.28;
}

.hero-orbit-ring {
  position: absolute;
  top: 20%; left: 17%;
  width: 67%; aspect-ratio: 1;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.ring-one { transform: rotateX(68deg) rotateZ(-22deg) translateZ(-50px); animation: orbitRingOne 16s linear infinite; }
.ring-two {
  width: 56%; top: 26%; left: 25%;
  border-color: rgba(34, 211, 238, 0.14);
  transform: rotateX(74deg) rotateZ(28deg) translateZ(15px);
  animation: orbitRingTwo 20s linear infinite;
}

.hero-3d-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: stageDrift 8s ease-in-out infinite;
}

.agent-core, .agent-panel, .hero-node { display: none; }

.hero-network-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.28), transparent);
  animation: heroLinePulse 5.8s ease-in-out infinite;
}
.line-healthcare { top: 34%; left: 22%; width: 31%; transform: rotate(24deg); }
.line-banking    { top: 38%; right: 5%; width: 34%; transform: rotate(-20deg); animation-delay: -1.2s; }
.line-insurance  { right: 8%; bottom: 24%; width: 34%; transform: rotate(28deg); animation-delay: -2.4s; }
.line-government { left: 17%; bottom: 30%; width: 32%; transform: rotate(-28deg); animation-delay: -3.6s; }

@keyframes stageDrift {
  0%, 100% { transform: translateY(0) rotateZ(0deg); }
  50%      { transform: translateY(-10px) rotateZ(0.6deg); }
}
@keyframes orbitRingOne { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes orbitRingTwo { from { rotate: 360deg; } to { rotate: 0deg; } }
@keyframes heroLinePulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.7; } }
@keyframes heroNodePulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.hero-container { z-index: 10; pointer-events: none; }
.hero-text-wrapper { max-width: 680px; pointer-events: auto; }

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(40px, 5.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
  color: var(--text-1);
  font-weight: 600;
  background: linear-gradient(180deg, #FFFFFF 0%, #C6CBD5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 36px;
  color: var(--text-2);
  max-width: 620px;
}

.hero-sector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 620px;
  margin-bottom: 34px;
}
.hero-sector-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.hero-sector-list span::before {
  content: '';
  width: 6px; height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.hero-sector-list span:nth-child(n)::before { background: var(--accent); }

.hero-actions { display: flex; gap: 12px; }

@media (max-width: 900px) {
  .hero-orbit-visual { right: -32%; width: 100vw; opacity: 0.5; }
}
@media (max-width: 768px) {
  .hero-subtitle { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  #canvas-container { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-3d-stage, .hero-orbit-ring, .hero-network-line, .hero-node { animation: none; }
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0.55;
}
.mouse-icon {
  width: 22px; height: 36px;
  border: 1.5px solid var(--text-3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.wheel {
  width: 3px; height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel {
  0%   { transform: translateY(0); opacity: 1; }
  50%  { transform: translateY(8px); opacity: 0.2; }
  100% { transform: translateY(0); opacity: 1; }
}
.scroll-text {
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-3);
}

/* ------------------------------------------------------------ Sections */

section {
  padding: 120px 0;
  position: relative;
}

.page-main { padding-top: 76px; }

.page-hero {
  overflow: hidden;
  padding: 130px 0 90px;
  border-bottom: 1px solid var(--line-1);
  background:
    radial-gradient(700px 400px at 82% 30%, rgba(37, 99, 235, 0.08), transparent 60%),
    radial-gradient(600px 400px at 18% 20%, rgba(34, 211, 238, 0.06), transparent 55%),
    var(--bg-0);
}
.page-hero::after { display: none; }

.page-hero-inner { position: relative; z-index: 1; max-width: 840px; }
.page-hero .section-title {
  max-width: 780px;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.page-hero .section-desc { max-width: 720px; font-size: 17px; }

.content-section { background: var(--bg-0); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.detail-card {
  padding: 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  transition: var(--transition-smooth);
}
.detail-card:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.detail-card h2 {
  font-size: 18px;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}
.detail-card p { font-size: 14.5px; line-height: 1.7; color: var(--text-2); }

.process-band {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  margin-top: 70px;
  padding: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.02), transparent 60%),
    var(--bg-1);
}
.process-list {
  display: grid;
  gap: 18px;
  color: var(--text-2);
  padding-left: 20px;
}
.process-list li { padding-left: 6px; font-size: 15px; }
.process-list li::marker { color: var(--accent); font-family: var(--font-mono); }
.process-list strong { color: var(--text-1); }

.platform-stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
.platform-stack div {
  min-height: 170px;
  padding: 22px;
  border-radius: var(--r-lg);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  transition: var(--transition-smooth);
}
.platform-stack div:hover { border-color: var(--line-3); transform: translateY(-2px); }
.platform-stack strong, .platform-stack span { display: block; }
.platform-stack strong {
  color: var(--text-1);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.platform-stack span { color: var(--text-2); font-size: 13.5px; line-height: 1.6; }

.sector-detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.sector-detail-list article {
  min-height: 220px;
  padding: 32px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  transition: var(--transition-smooth);
}
.sector-detail-list article:hover { border-color: var(--line-3); transform: translateY(-2px); }
.sector-detail-list h2 { font-size: 22px; margin-bottom: 12px; letter-spacing: -0.02em; }

.page-contact-panel { margin-bottom: 30px; }
.page-contact-panel h2 { font-size: 28px; margin-bottom: 12px; letter-spacing: -0.02em; }

@media (max-width: 900px) {
  .detail-grid, .process-band, .platform-stack, .sector-detail-list {
    grid-template-columns: 1fr;
  }
  .process-band { padding: 28px; }
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.section-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  border-radius: 999px;
}

.section-title {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.028em;
  margin-bottom: 18px;
  color: var(--text-1);
  font-weight: 600;
}

.section-desc {
  font-size: 15.5px;
  line-height: 1.7;
  max-width: 620px;
  color: var(--text-2);
}
.text-center .section-desc { margin: 0 auto; }

/* ------------------------------------------------------------ Philosophy */

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

.concept-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.interactive-card {
  width: 100%;
  max-width: 460px;
  position: relative;
  background: var(--bg-2);
}

.card-dots { display: flex; gap: 6px; margin-bottom: 20px; }
.card-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line-3);
}
.card-dot.red { background: #FF5F57; }
.card-dot.yellow { background: #FEBC2E; }
.card-dot.green { background: #28C840; }

.concept-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-1);
  letter-spacing: -0.015em;
}
.manifesto-line {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 24px;
  line-height: 1.6;
}

.wireframe-mockup {
  position: relative;
  height: 200px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background:
    linear-gradient(rgba(37, 99, 235, 0.03), transparent 60%),
    var(--bg-3);
  overflow: hidden;
}
.wireframe-line { position: absolute; }
.wireframe-line.select-v {
  top: 0; bottom: 0; left: 60%;
  width: 1px;
  border-left: 1px dashed rgba(37, 99, 235, 0.24);
}
.wireframe-line.select-h {
  left: 0; right: 0; top: 40%;
  height: 1px;
  border-top: 1px dashed rgba(37, 99, 235, 0.24);
}

/* ------------------------------------------------------------ Dot grid ("shift" section) */

.shift-section {
  background: var(--bg-0);
  border-bottom: 1px solid var(--line-1);
}

.grid-display-container {
  margin-top: 48px;
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
}

.dot-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 20px;
  justify-items: center;
  align-items: center;
  padding: 20px 10px;
  max-width: 920px;
  margin: 0 auto;
  min-height: 240px;
}

.grid-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-3);
  transition:
    background-color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
}

.grid-dot.shift-column {
  background: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.grid-dot.hover-neighbor-1 {
  background: rgba(37, 99, 235, 0.6);
  transform: scale(1.8) translateY(-3px);
}
.grid-dot.hover-neighbor-2 {
  background: rgba(37, 99, 235, 0.3);
  transform: scale(1.4) translateY(-1px);
}
.grid-dot.hover-target {
  background: var(--accent);
  transform: scale(2.6) translateY(-5px);
  box-shadow: 0 0 12px var(--accent-glow), 0 0 4px #fff;
}

.grid-overlay-label {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line-1);
  margin-top: 24px;
  padding-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}
.grid-overlay-label .coord { color: var(--accent); }

/* ------------------------------------------------------------ Facet lab */

.facet-section {
  background: var(--bg-0);
  border-bottom: 1px solid var(--line-1);
}

.control-group { margin-top: 24px; }

.control-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.control-label span:last-child { color: var(--accent); font-weight: 500; }

.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--line-2);
  border-radius: 2px;
  outline: none;
  margin: 8px 0;
}
.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--accent), 0 0 12px var(--accent-glow);
  transition: var(--transition-fast);
}
.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.lab-status-display {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.status-indicator-light {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.status-indicator-light.pulse { animation: pulseLight 1.6s infinite; }
@keyframes pulseLight {
  0%   { transform: scale(1); opacity: 0.6; }
  50%  { transform: scale(1.35); opacity: 1; box-shadow: 0 0 14px var(--accent); }
  100% { transform: scale(1); opacity: 0.6; }
}

.lab-viewport-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  perspective: 1000px;
  background:
    radial-gradient(400px 240px at 50% 50%, rgba(37, 99, 235, 0.06), transparent 70%),
    var(--bg-1);
}

.facet-preview-box {
  width: 300px; height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(20deg) rotateY(-20deg);
  transition: transform 0.1s linear;
}
.facet-plane {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s linear, opacity 0.3s;
}
.facet-plane.plane-bg {
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  color: var(--text-2);
  border: 1px solid var(--line-3);
  top: 30px; left: 30px;
  transform: translateZ(-20px);
}
.facet-plane.plane-fg {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(34, 211, 238, 0.7));
  color: var(--bg-0);
  border: 1px solid rgba(255, 255, 255, 0.2);
  top: 90px; left: 90px;
  transform: translateZ(20px);
}
.facet-lens {
  position: absolute;
  top: 90px; left: 90px;
  width: 120px; height: 120px;
  border-radius: 32px 0 32px 0;
  background: var(--accent);
  mix-blend-mode: screen;
  opacity: 0.7;
  z-index: 10;
  pointer-events: none;
  transform: translateZ(21px);
  transition: opacity 0.3s, transform 0.1s linear;
}

/* ------------------------------------------------------------ Capabilities / Services */

.capabilities-section {
  background: var(--bg-0);
  border-bottom: 1px solid var(--line-1);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.service-grid.expanded {
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-item {
  min-height: 200px;
  padding: 26px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-1);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.service-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
.service-item:hover {
  border-color: var(--line-3);
  transform: translateY(-3px);
  background: var(--bg-2);
}
.service-item:hover::before { opacity: 1; }

.service-item h3 {
  font-size: 16.5px;
  margin-bottom: 10px;
  color: var(--text-1);
  letter-spacing: -0.015em;
  font-weight: 600;
}
.service-item p { font-size: 14px; line-height: 1.65; color: var(--text-2); }

@media (max-width: 1100px) { .service-grid, .service-grid.expanded { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) {
  .service-grid, .service-grid.expanded { grid-template-columns: 1fr; }
  .service-item { min-height: auto; }
}

/* ------------------------------------------------------------ Sector gallery */

.gallery-section { background: var(--bg-0); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 1100px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--bg-1);
}

.gallery-visual {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(200px 130px at 50% 50%, rgba(37, 99, 235, 0.06), transparent 70%),
    var(--bg-2);
  border-radius: var(--r-md);
  border: 1px solid var(--line-1);
  position: relative;
  overflow: hidden;
}
.gallery-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}
.card-icon-container {
  transition: var(--transition-smooth);
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(37, 99, 235, 0.15));
}
.gallery-card:hover .card-icon-container { transform: scale(1.08) rotate(3deg); }

.gallery-body h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-1);
  letter-spacing: -0.015em;
}
.gallery-body p { font-size: 14px; line-height: 1.6; color: var(--text-2); }

/* ------------------------------------------------------------ Contact panel */

.contact-section { background: var(--bg-0); }

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--line-2);
}
.contact-panel:hover { border-color: rgba(37, 99, 235, 0.25); }
.contact-actions { display: flex; gap: 12px; flex-shrink: 0; }

/* ------------------------------------------------------------ Footer */

.main-footer {
  background: var(--bg-0);
  border-top: 1px solid var(--line-1);
  padding: 44px 0;
  font-family: var(--font-sans);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.brand-text-sm {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-2);
  letter-spacing: -0.015em;
}
.brand-text-sm span { font-weight: 700; color: var(--text-1); }

.footer-links { display: flex; gap: 26px; }
.footer-links a {
  color: var(--text-3);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer-links a:hover { color: var(--text-1); }

.footer-meta p {
  font-size: 12px;
  color: var(--text-4);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

@media (max-width: 768px) {
  .footer-container { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
  .contact-panel, .contact-actions { flex-direction: column; align-items: stretch; }
}

/* ------------------------------------------------------------ Workflow timeline */

.workflow-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  text-align: left;
  background:
    linear-gradient(rgba(37, 99, 235, 0.02), transparent 60%),
    transparent;
}
.timeline-node {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.timeline-node:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: -22px;
  width: 1px;
  background: var(--line-2);
}
.timeline-node.active:not(:last-child)::after { background: var(--accent); }

.node-bullet {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--line-3);
  z-index: 2;
}
.timeline-node.active .node-bullet {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 10px var(--accent-glow);
}
.timeline-node.processing .node-bullet {
  background: var(--signal-warn);
  box-shadow: 0 0 0 1px var(--signal-warn);
}
.pulse-gold { animation: pulseGold 1.5s infinite; }
@keyframes pulseGold {
  0%   { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(245, 165, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 165, 36, 0); }
}

.node-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.005em;
}
.timeline-node.processing .node-label { color: var(--signal-warn); }

/* Legacy queue-stream states — mapped to the single accent */
.icon-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); }
.icon-dot.active,
.icon-dot.active-blue { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.icon-dot.active-saffron { background: var(--signal-warn); box-shadow: 0 0 8px rgba(245, 165, 36, 0.4); }

.grid-dot.stream-active-blue {
  background: var(--accent) !important;
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-4px) scale(1.6);
}
.grid-dot.stream-active-saffron {
  background: var(--signal-warn) !important;
  box-shadow: 0 0 12px rgba(245, 165, 36, 0.45);
  transform: translateY(-4px) scale(1.6);
}

/* ------------------------------------------------------------ Selection */

::selection {
  background: rgba(37, 99, 235, 0.32);
  color: var(--text-1);
}
