/* ===========================================
   Devnity — Landing Page
   Author: Devnity team
   =========================================== */

:root {
  /* dark theme (default) */
  --bg: #07070b;
  --bg-2: #0c0d14;
  --bg-3: #11131c;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f7;
  --text-dim: #a3a3b3;
  --text-mute: #6f6f7e;

  --c1: #2563eb; /* royal blue */
  --c2: #60a5fa; /* sky blue */
  --c3: #93c5fd; /* light blue */
  --c4: #dbeafe; /* near-white blue */
  --c-accent: #2563eb;

  --grad-1: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  --grad-2: linear-gradient(135deg, #1d4ed8 0%, #93c5fd 100%);
  --grad-3: linear-gradient(135deg, #60a5fa 0%, #dbeafe 100%);
  --grad-4: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  --grad-5: linear-gradient(135deg, #3b82f6 0%, #ffffff 100%);
  --grad-6: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
  --grad-text: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 50%, #ffffff 100%);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);

  --container: 1200px;
  --nav-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
  --bg: #fafafb;
  --bg-2: #f4f4f7;
  --bg-3: #ffffff;
  --surface: rgba(20, 20, 30, 0.04);
  --surface-2: rgba(20, 20, 30, 0.06);
  --border: rgba(20, 20, 30, 0.08);
  --border-2: rgba(20, 20, 30, 0.14);
  --text: #0e0e15;
  --text-dim: #4a4a5a;
  --text-mute: #7a7a8a;
}

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

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: rgba(59, 130, 246, 0.4); color: #fff; }

/* === Scroll bar === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--c1); }

/* === Container === */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* === Background layers === */
#bg-canvas {
  position: fixed; inset: 0;
  z-index: -3;
  width: 100%; height: 100%;
  pointer-events: none;
}

.bg-grid {
  position: fixed; inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(167,139,250,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
  opacity: 0.7;
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(20,20,30,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,20,30,0.06) 1px, transparent 1px);
}

.bg-noise {
  position: fixed; inset: 0;
  z-index: -1; pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='3'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
  mix-blend-mode: overlay;
}

/* === Cursor glow (desktop only) === */
.cursor-glow {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s, width 0.3s, height 0.3s;
  opacity: 0;
  mix-blend-mode: screen;
}
@media (hover: hover) and (pointer: fine) {
  body:hover .cursor-glow { opacity: 1; }
}

/* === Loader === */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.loader-logo {
  font-size: 48px; font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseScale 1.4s ease-in-out infinite;
}
.loader-bar {
  width: 160px; height: 3px;
  background: var(--border); border-radius: 99px; overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 40%;
  background: var(--grad-text);
  border-radius: 99px;
  animation: loadSlide 1.2s var(--ease) infinite;
}
@keyframes loadSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}
@keyframes pulseScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ============== NAVBAR ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: all 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(7,7,11,0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .nav.scrolled {
  background: rgba(255,255,255,0.7);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em;
}
.brand-mark { display: inline-flex; }
.brand-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  font-size: 14px; color: var(--text-dim);
  position: relative; padding: 6px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--grad-text);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-tools { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  display: flex; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; padding: 3px;
}
.lang-switch button {
  font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: 99px;
  color: var(--text-mute);
  transition: all 0.2s var(--ease);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active {
  background: var(--grad-1); color: white;
}

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.theme-toggle:hover { color: var(--text); transform: rotate(15deg); }
.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: block; }

.nav-cta { padding: 9px 16px; font-size: 13px; }

.burger {
  display: none;
  width: 36px; height: 36px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
}
.burger span {
  width: 18px; height: 2px; background: var(--text);
  transition: all 0.3s var(--ease);
}
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  flex-direction: column; gap: 16px;
  transform: translateY(-100%);
  opacity: 0; visibility: hidden;
  transition: all 0.4s var(--ease);
}
.mobile-menu.open {
  transform: translateY(0); opacity: 1; visibility: visible;
}
.mobile-menu a { font-size: 16px; padding: 8px 0; color: var(--text-dim); }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  border-radius: 99px;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative; overflow: hidden;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn.full { width: 100%; justify-content: center; }
.btn-primary {
  background: var(--grad-1); color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-2);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 0;
}
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.45);
}
.btn-ghost {
  background: var(--surface); color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--c1);
  transform: translateY(-2px);
}

/* ============== HERO ============== */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 40px);
  padding-bottom: 60px;
  position: relative; overflow: hidden;
}
.hero-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  position: relative; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  font-size: 13px; color: var(--text-dim);
  backdrop-filter: blur(8px);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 900px;
}
.hero-title > span { display: inline-block; }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.rotator {
  display: inline-grid;
  grid-template-areas: "stack";
  position: relative;
  vertical-align: bottom;
  overflow: hidden;
  line-height: 1.1;
}
.rotator > span {
  grid-area: stack;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  white-space: nowrap;
}
.rotator > span.active { opacity: 1; transform: translateY(0); }
.rotator > span.out { opacity: 0; transform: translateY(-100%); }

.hero-sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.6;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.hero-marquee {
  width: 100%;
  margin-top: 50px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.hero-orbs {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}
.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #2563eb, transparent 70%);
  top: -100px; left: -120px;
  animation: float1 18s ease-in-out infinite;
}
.orb-2 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #60a5fa, transparent 70%);
  bottom: -150px; right: -120px;
  animation: float2 22s ease-in-out infinite;
}
.orb-3 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #93c5fd, transparent 70%);
  top: 40%; left: 50%;
  animation: float3 26s ease-in-out infinite;
}
[data-theme="light"] .orb { opacity: 0.28; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 80px) scale(1.1); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, -60px) scale(1.15); }
}
@keyframes float3 {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-30%, 40px) scale(1.05); }
}

/* ============== STATS ============== */
.stats { padding: 60px 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.4s var(--ease);
  backdrop-filter: blur(10px);
}
.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--c1);
  box-shadow: 0 14px 40px rgba(59, 130, 246, 0.18);
}
.stat-num {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
  display: inline-block;
}
.stat-suffix {
  display: inline-block; font-size: 32px; font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  margin-top: 6px;
  font-size: 13px; color: var(--text-dim);
}

/* ============== SECTIONS ============== */
.section { padding: 100px 0; position: relative; }
.section-head {
  text-align: center;
  margin-bottom: 56px;
  max-width: 720px; margin-left: auto; margin-right: auto;
}
.eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px; color: var(--c1);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-sub {
  margin-top: 14px;
  color: var(--text-dim);
  font-size: 16px;
}

/* ============== BENTO (SERVICES) ============== */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.bento-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  transform-style: preserve-3d;
  display: flex; flex-direction: column;
  backdrop-filter: blur(10px);
}
.bento-card.big { grid-column: span 2; grid-row: span 2; }
.bento-card.wide { grid-column: span 2; }
.bento-card.accent {
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(34,211,238,0.08));
  border-color: rgba(167,139,250,0.3);
}

.card-glow {
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,50%), rgba(167,139,250,0.15), transparent 40%);
  opacity: 0; transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.bento-card:hover .card-glow { opacity: 1; }
.bento-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(34,211,238,0.15));
  color: var(--c1);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}
.bento-card h3 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.bento-card.big h3 { font-size: 28px; }
.bento-card p {
  color: var(--text-dim); font-size: 14.5px;
  line-height: 1.55;
}
.chip-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; margin-top: auto; padding-top: 16px;
}
.chip-row li {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* Mobile device mock for big card */
.floating-card {
  position: absolute;
  right: -10px; bottom: -30px;
  width: 180px; height: 280px;
  transform: rotate(8deg);
  transition: transform 0.6s var(--ease);
}
.bento-card.big:hover .floating-card { transform: rotate(0deg) translateY(-10px); }
.device {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #1a1b26, #0d0e15);
  border-radius: 24px;
  border: 1px solid var(--border-2);
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.device-screen {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #14151f, #0a0b13);
  border-radius: 18px;
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.dev-row {
  height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(167,139,250,0.5), rgba(34,211,238,0.3));
}
.dev-row.short { width: 60%; background: rgba(255,255,255,0.08); }
.dev-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 6px; flex: 1; margin: 6px 0;
}
.dev-grid i {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  position: relative; overflow: hidden;
}
.dev-grid i::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(167,139,250,0.4), transparent);
  transform: translateX(-100%);
  animation: shimmer 2.4s infinite;
}
.dev-grid i:nth-child(2)::after { animation-delay: 0.4s; }
.dev-grid i:nth-child(3)::after { animation-delay: 0.8s; }
.dev-grid i:nth-child(4)::after { animation-delay: 1.2s; }
@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* AI orb */
.ai-orb {
  position: absolute;
  width: 140px; height: 140px;
  right: -20px; top: 30px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #1d4ed8, #3b82f6, #93c5fd, #1d4ed8);
  filter: blur(2px);
  opacity: 0.6;
  animation: spin 14s linear infinite;
}
.ai-orb::before {
  content: '';
  position: absolute; inset: 14px;
  border-radius: 50%;
  background: var(--bg-2);
}
.ai-orb::after {
  content: '';
  position: absolute; inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #60a5fa, transparent);
  animation: pulseScale 2.5s infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Terminal */
.terminal {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #07080d;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}
.term-bar {
  display: flex; gap: 5px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-body {
  padding: 14px 16px;
  color: #d4d4dc;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}
.prompt { color: var(--c2); }
.cmd { color: var(--c1); }
.muted { color: #6f6f7e; }
.ok { color: #34d399; }

/* ============== STACK / ORBIT ============== */
.stack { padding-bottom: 80px; }
.orbit {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 1;
  margin: 40px auto 60px;
}
.orbit-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 130px; height: 130px;
  border-radius: 50%;
  background: var(--grad-1);
  display: grid; place-items: center;
  z-index: 3;
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.5);
}
.orbit-core-text {
  font-weight: 700; color: white; font-size: 18px;
  letter-spacing: -0.02em;
}
.orbit-core-ring, .orbit-core-ring.r2 {
  position: absolute; inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(167,139,250,0.3);
  animation: pulseRing 2.5s ease-out infinite;
}
.orbit-core-ring.r2 { animation-delay: 1.25s; }
@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.orbit-ring {
  position: absolute; top: 50%; left: 50%;
  border: 1px dashed var(--border-2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.ring-1 {
  width: 60%; height: 60%;
  animation: spin 30s linear infinite;
}
.ring-2 {
  width: 100%; height: 100%;
  animation: spin 50s linear infinite reverse;
}
.tech-pill {
  position: absolute; top: 50%; left: 50%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  transform-origin: center;
  animation: counter-spin 30s linear infinite;
}
.ring-1 .tech-pill {
  --r: 180px;
  transform: rotate(calc(var(--i) * 60deg)) translateX(var(--r)) rotate(calc(var(--i) * -60deg)) translate(-50%, -50%);
}
.ring-2 .tech-pill.alt {
  --r: 320px;
  transform: rotate(calc(var(--i) * 45deg)) translateX(var(--r)) rotate(calc(var(--i) * -45deg)) translate(-50%, -50%);
  animation: counter-spin-2 50s linear infinite reverse;
}
@keyframes counter-spin {
  100% { transform: rotate(calc(var(--i) * 60deg + 360deg)) translateX(var(--r)) rotate(calc(var(--i) * -60deg - 360deg)) translate(-50%, -50%); }
}
@keyframes counter-spin-2 {
  100% { transform: rotate(calc(var(--i) * 45deg + 360deg)) translateX(var(--r)) rotate(calc(var(--i) * -45deg - 360deg)) translate(-50%, -50%); }
}

.stack-flat {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.stack-col {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
}
.stack-col:hover {
  border-color: var(--c1);
  background: var(--surface-2);
  transform: translateY(-3px);
}
.stack-col h4 {
  font-size: 14px; font-weight: 600;
  color: var(--c1); margin-bottom: 8px;
  font-family: "JetBrains Mono", monospace;
}
.stack-col p {
  font-size: 14px; color: var(--text-dim); line-height: 1.6;
}

/* ============== WORKS ============== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.work-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s var(--ease);
  position: relative;
}
.work-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.work-thumb {
  aspect-ratio: 16 / 10;
  position: relative; overflow: hidden;
}
.work-1 { background: linear-gradient(135deg, #6d28d9, #db2777); }
.work-2 { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.work-3 { background: linear-gradient(135deg, #06b6d4, #10b981); }
.work-4 { background: linear-gradient(135deg, #f97316, #ef4444); }
.work-5 { background: linear-gradient(135deg, #eab308, #f97316); }
.work-6 { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }

.work-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,0.25), transparent 60%);
}

/* Visual mockups inside work cards */
.work-mock {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 75%; height: 70%;
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  overflow: hidden;
  transition: transform 0.5s var(--ease);
}
[data-theme="light"] .work-mock { background: #fff; }
.work-card:hover .work-mock { transform: translate(-50%, -54%) scale(1.04); }

.work-mock.fintech::before, .work-mock.saas::before, .work-mock.ai::before,
.work-mock.health::before, .work-mock.edu::before, .work-mock.ecom::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background: linear-gradient(90deg, #ddd 20%, transparent 20%, transparent 30%, #ddd 30%, #ddd 60%, transparent 60%);
  background-size: 60px 100%;
}
.work-mock.fintech::after {
  content: ''; position: absolute; inset: 28px 16px 16px;
  background:
    linear-gradient(135deg, #6d28d9, #db2777) 0 0 / 100% 70px no-repeat,
    repeating-linear-gradient(0deg, #eee 0 6px, transparent 6px 14px) 0 80px / 100% 100% no-repeat;
  border-radius: 8px;
}
.work-mock.saas::after {
  content: ''; position: absolute; inset: 28px 16px 16px;
  background:
    linear-gradient(#eee,#eee) 0 0 / 70px 100% no-repeat,
    repeating-linear-gradient(0deg, #f5f5f5 0 16px, transparent 16px 22px) 80px 0 / 100% 100% no-repeat;
}
.work-mock.ai::after {
  content: ''; position: absolute; inset: 28px 16px 16px;
  background:
    radial-gradient(circle at 50% 40%, #60a5fa 0 30px, transparent 31px),
    repeating-linear-gradient(0deg, #f5f5f5 0 8px, transparent 8px 16px) 0 80px / 100% calc(100% - 80px) no-repeat;
}
.work-mock.health::after {
  content: ''; position: absolute; inset: 28px 16px 16px;
  background:
    linear-gradient(#f97316,#ef4444) 0 0 / 100% 40px no-repeat,
    repeating-linear-gradient(90deg, #eee 0 30%, transparent 30% 33%) 0 50px / 100% 60px no-repeat,
    repeating-linear-gradient(0deg, #f5f5f5 0 10px, transparent 10px 18px) 0 120px / 100% 100% no-repeat;
}
.work-mock.edu::after {
  content: ''; position: absolute; inset: 28px 16px 16px;
  background:
    repeating-linear-gradient(0deg, #eab308 0 4px, transparent 4px 24px) 0 0 / 30% 100% no-repeat,
    repeating-linear-gradient(0deg, #f5f5f5 0 12px, transparent 12px 20px) 35% 0 / 65% 100% no-repeat;
}
.work-mock.ecom::after {
  content: ''; position: absolute; inset: 28px 16px 16px;
  background:
    repeating-conic-gradient(#14b8a6 0 25%, #0ea5e9 0 50%) 0 0 / 50% 50% no-repeat,
    repeating-linear-gradient(0deg, #f5f5f5 0 12px, transparent 12px 22px) 0 60% / 100% 40% no-repeat;
}

.work-meta { padding: 20px 22px 22px; }
.work-tag {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--c1);
  margin-bottom: 8px;
}
.work-meta h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.work-meta p { font-size: 14px; color: var(--text-dim); }

/* ============== TEAM ============== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.member {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s var(--ease);
}
.member:hover {
  transform: translateY(-4px);
  border-color: var(--c1);
  background: var(--surface-2);
}
.member-photo {
  width: 88px; height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 28px;
  color: white;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.gradient-1 { background: var(--grad-1); }
.gradient-2 { background: var(--grad-2); }
.gradient-3 { background: var(--grad-3); }
.gradient-4 { background: var(--grad-4); }
.gradient-5 { background: var(--grad-5); }
.gradient-6 { background: var(--grad-6); }

.member h4 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.member .role { font-size: 13px; color: var(--c1); font-weight: 500; }
.member .bio { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

/* ============== TESTIMONIALS ============== */
.testimonials { background: linear-gradient(180deg, transparent, var(--bg-2) 50%, transparent); }

.testi-wrap { max-width: 720px; margin: 0 auto; }
.testi-track {
  display: flex;
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.testi-card {
  flex: 0 0 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  text-align: center;
  margin: 0 8px;
  backdrop-filter: blur(10px);
}
.quote {
  font-family: "JetBrains Mono", serif;
  font-size: 80px;
  line-height: 0.6;
  color: var(--c1);
  opacity: 0.4;
  position: absolute; top: 24px; left: 30px;
}
.testi-card p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 28px;
  position: relative; z-index: 1;
}
.testi-author {
  display: flex; align-items: center; gap: 14px;
  justify-content: center;
}
.avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: white; font-size: 16px;
}
.testi-author strong { display: block; font-weight: 600; }
.testi-author span { font-size: 13px; color: var(--text-mute); }

.testi-controls {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-top: 30px;
}
.testi-controls button {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-2);
  display: grid; place-items: center;
  transition: all 0.2s var(--ease);
}
.testi-controls button:hover {
  background: var(--c1); color: white; transform: scale(1.08);
}
.testi-dots { display: flex; gap: 8px; }
.testi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border-2);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.testi-dot.active {
  width: 24px; border-radius: 8px;
  background: var(--grad-1);
}

/* ============== CONTACT ============== */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-left .section-title {
  text-align: left; margin-top: 8px;
}
.contact-left .section-sub {
  text-align: left; max-width: 480px;
}
.contact-list {
  list-style: none;
  margin: 32px 0;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-list li {
  display: flex; align-items: center; gap: 14px;
}
.contact-list .ic {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 20px;
}
.contact-list strong { display: block; font-size: 13px; color: var(--text-dim); font-weight: 500; }
.contact-list a, .contact-list span { font-size: 15px; color: var(--text); }
.contact-list a:hover { color: var(--c1); }

.socials { display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.socials a:hover {
  background: var(--grad-1); color: white;
  transform: translateY(-3px);
  border-color: transparent;
}

/* form */
.glass {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.contact-form {
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
}
.contact-form::before {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(167,139,250,0.25), transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.form-head { position: relative; z-index: 1; }
.form-head h3 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.form-head p { color: var(--text-dim); font-size: 14px; }

.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.contact-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: var(--text-dim);
  position: relative; z-index: 1;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: all 0.2s var(--ease);
  outline: none;
  width: 100%;
  font-family: inherit;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--c1);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.15);
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chk {
  display: inline-flex !important; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 13px !important; cursor: pointer;
  transition: all 0.2s var(--ease);
  flex-direction: row !important;
  color: var(--text) !important;
}
.chk input { display: none; }
.chk span::before {
  content: ''; display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  margin-right: 6px; vertical-align: middle;
  transition: all 0.2s var(--ease);
}
.chk input:checked + span::before {
  background: var(--c1); border-color: var(--c1);
  box-shadow: inset 0 0 0 3px var(--bg-3);
}
.chk:has(input:checked) {
  background: rgba(167,139,250,0.12);
  border-color: var(--c1);
}
.form-foot {
  font-size: 12px; color: var(--text-mute); text-align: center;
  position: relative; z-index: 1;
}
.form-success {
  padding: 12px 16px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid #34d399;
  color: #34d399;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
}

/* ============== FOOTER ============== */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  position: relative;
}
.footer-inner {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}
.foot-brand p { color: var(--text-dim); font-size: 14px; margin-top: 12px; max-width: 280px; }
.foot-col h5 {
  font-size: 13px; font-weight: 600; margin-bottom: 14px;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.foot-col a, .foot-col span {
  display: block;
  font-size: 14px; color: var(--text-dim);
  padding: 4px 0;
}
.foot-col a:hover { color: var(--c1); }

.foot-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-mute);
}
.to-top:hover { color: var(--c1); }

/* ============== ANIMATIONS ============== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].in {
  opacity: 1; transform: none;
}

[data-tilt] { transform-style: preserve-3d; will-change: transform; }

/* ============== RESPONSIVE ============== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .mobile-menu { display: flex; }
  .nav-cta { display: none; }
  .lang-switch button { padding: 4px 8px; }

  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card.big { grid-column: span 2; grid-row: span 2; }
  .bento-card.wide { grid-column: span 2; }

  .stack-flat { grid-template-columns: repeat(2, 1fr); }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 70px 0; }
  .hero { padding-top: calc(var(--nav-h) + 30px); }
  .hero-cta .btn { padding: 12px 18px; font-size: 13px; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .bento-card { padding: 22px; min-height: 200px; }
  .bento-card.big, .bento-card.wide { grid-column: span 1; }
  .bento-card.big { grid-row: auto; min-height: 320px; }
  .floating-card { width: 130px; height: 200px; right: -20px; bottom: -20px; }

  .stack-flat { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .member { padding: 20px 12px; }
  .member-photo { width: 64px; height: 64px; font-size: 20px; }

  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .foot-bottom { flex-direction: column; gap: 10px; text-align: center; }

  .form-row { grid-template-columns: 1fr; }
  .glass { padding: 22px; }

  .orbit { max-width: 100%; }
  .ring-1 .tech-pill { --r: 110px; font-size: 11px; padding: 6px 10px; }
  .ring-2 .tech-pill.alt { --r: 180px; font-size: 11px; padding: 6px 10px; }
  .orbit-center { width: 90px; height: 90px; }
  .orbit-core-text { font-size: 14px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .testi-card { padding: 28px 22px; }
  .testi-card p { font-size: 15px; }
  .quote { font-size: 56px; left: 18px; top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}
