/* ============================================
   CodeRS — Modern Minimal Design System
   ============================================ */

:root {
  --bg: #09090b;
  --bg-elevated: #0f0f12;
  --bg-subtle: #18181b;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.1);
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #52525b;
  --accent: #60a5fa;
  --accent-dim: rgba(96,165,250,0.12);
  --accent-glow: rgba(96,165,250,0.08);
  --green: #34d399;
  --red: #f87171;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(.4,0,.2,1);
  --container: 1100px;
}

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

html { scroll-behavior:smooth; scroll-padding-top:80px; }

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

::selection { background: var(--accent); color: var(--bg); }

.hidden { display: none; }

/* Links */
a {
  color: var(--text);
  text-decoration: underline;
  transition: color 0.3s var(--ease);
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem);
}

/* ============================================
   NAVBAR
   ============================================ */

#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  background: transparent;
  border-bottom: 1px solid transparent;
}

#navbar.navbar-scrolled {
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  height: 64px;
  gap: 2rem;
}

.nav-logo {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: color .2s var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--text);
  padding: 0.5rem 1.125rem;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .2s var(--ease);
  flex-shrink: 0;
}

.nav-cta:hover { opacity: 0.85; }

.nav-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  margin-left: auto;
  transition: color .2s var(--ease);
}

.nav-back:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
}

/* ============================================
   HERO
   ============================================ */

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
}

#hero-code-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 80%);
}



.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-container {
  z-index: 2;
  position: relative;
  text-align: center;
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--text-2);
  margin-bottom: 2.5rem;
  background: var(--bg-elevated);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: dotPulse 2s ease infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-badge strong { color: var(--text); font-weight: 600; }

.hero-title {
  font-size: clamp(2.75rem, 2rem + 4vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #fafafa 30%, #71717a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  font-family: var(--font);
}

.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: color .2s var(--ease), border-color .2s var(--ease);
  font-family: var(--font);
}

.btn-ghost:hover { color: var(--text); border-color: var(--border-hover); }

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hero-stack span {
  font-size: 0.75rem;
  color: var(--text-3);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* ============================================
   SECTIONS COMMON
   ============================================ */

.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 4vw, 5rem);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.section-desc {
  font-size: 0.9375rem;
  color: var(--text-2);
  margin-top: 1rem;
}

/* ============================================
   VIBE CODING
   ============================================ */

#vibe-coding {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
}

.vibe-coding-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.vibe-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 3vw, 4rem);
  align-items: center;
}

.vibe-text-content h3 {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: var(--text);
}

.vibe-text-content p {
  font-size: clamp(0.9375rem, 0.875rem + 0.25vw, 1.0625rem);
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.vibe-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vibe-benefits li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.6;
}

.vibe-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.7;
}

.vibe-viz {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vibe-viz svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* Vibe Coding SVG Animations */
@keyframes vibeIdeaPulse {
  0%, 100% { r: 18; opacity: 0.45 }
  50% { r: 22; opacity: 0.65 }
}

@keyframes vibeBrainPulse {
  0%, 100% { opacity: 0.5 }
  50% { opacity: 0.8 }
}

@keyframes vibeThoughtFlow {
  0%, 100% { opacity: 0 }
  25% { opacity: 0.6 }
  50% { opacity: 0.4 }
  75% { opacity: 0 }
}

@keyframes vibeFlowDash {
  0% { stroke-dashoffset: 14; opacity: 0 }
  20% { opacity: 0.6 }
  80% { opacity: 0.4 }
  100% { stroke-dashoffset: 0; opacity: 0 }
}

@keyframes vibeCodeLine {
  0%, 15% { opacity: 0 }
  30%, 70% { opacity: 0.2 }
  85%, 100% { opacity: 0 }
}

@keyframes vibeCursorBlink {
  0%, 49% { opacity: 0.6 }
  50%, 100% { opacity: 0 }
}

#vibe-coding.visible .vibe-idea-core {
  animation: vibeIdeaPulse 3s ease-in-out infinite;
}

#vibe-coding.visible .vibe-brain {
  animation: vibeBrainPulse 2s ease-in-out infinite;
}

#vibe-coding.visible .vibe-t1 {
  animation: vibeThoughtFlow 2.5s ease 0s infinite;
}

#vibe-coding.visible .vibe-t2 {
  animation: vibeThoughtFlow 2.5s ease 0.3s infinite;
}

#vibe-coding.visible .vibe-t3 {
  animation: vibeThoughtFlow 2.5s ease 0.6s infinite;
}

#vibe-coding.visible .vibe-f1 {
  animation: vibeFlowDash 3s ease 0s infinite;
}

#vibe-coding.visible .vibe-f2 {
  animation: vibeFlowDash 3s ease 0.2s infinite;
}

#vibe-coding.visible .vibe-f3 {
  animation: vibeFlowDash 3s ease 0.4s infinite;
}

#vibe-coding.visible .vibe-a1 {
  animation: vibeThoughtFlow 3s ease 0.3s infinite;
}

#vibe-coding.visible .vibe-a2 {
  animation: vibeThoughtFlow 3s ease 0.5s infinite;
}

#vibe-coding.visible .vibe-a3 {
  animation: vibeThoughtFlow 3s ease 0.7s infinite;
}

#vibe-coding.visible .vibe-cl1 {
  animation: vibeCodeLine 4s ease 0s infinite;
}

#vibe-coding.visible .vibe-cl2 {
  animation: vibeCodeLine 4s ease 0.3s infinite;
}

#vibe-coding.visible .vibe-cl3 {
  animation: vibeCodeLine 4s ease 0.6s infinite;
}

#vibe-coding.visible .vibe-cl4 {
  animation: vibeCodeLine 4s ease 0.9s infinite;
}

#vibe-coding.visible .vibe-cursor {
  animation: vibeCursorBlink 1s step-end infinite;
}

@media (max-width: 768px) {
  .vibe-text {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .vibe-benefits {
    text-align: left;
    display: inline-block;
  }

  .vibe-viz {
    order: -1;
  }
}

/* ============================================
   FEATURES
   ============================================ */

#features {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 3rem + 4vw, 7rem);
}

.feat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 3vw, 4rem);
  align-items: center;
}

.feat:nth-child(even) { direction: rtl; }
.feat:nth-child(even) > * { direction: ltr; }

.feat-text h3 {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.feat-text p {
  font-size: clamp(0.9375rem, 0.875rem + 0.25vw, 1.0625rem);
  color: var(--text-2);
  line-height: 1.75;
}

.feat-viz {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat-viz svg {
  width: 100%;
  max-width: 240px;
  height: auto;
}

/* Feature separator */
.feat + .feat { position: relative; }
.feat + .feat::before {
  content: '';
  position: absolute;
  top: calc(-1 * clamp(2rem, 1.5rem + 2vw, 3.5rem));
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 1px;
  background: var(--border);
}

/* ============================================
   SCROLL COMPOSE/DECOMPOSE
   ============================================ */

.scroll-compose {
  --scroll-progress: 0;
}

.scroll-compose-text,
.scroll-compose-viz {
  opacity: var(--scroll-progress);
  filter: blur(calc(4px * (1 - var(--scroll-progress))));
  will-change: transform, opacity, filter;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out, filter 0.15s ease-out;
}

[data-compose="slide-h"] .scroll-compose-text {
  transform: translateX(calc(-60px * (1 - var(--scroll-progress))));
}
[data-compose="slide-h"] .scroll-compose-viz {
  transform: translateX(calc(60px * (1 - var(--scroll-progress)))) scale(calc(0.9 + 0.1 * var(--scroll-progress)));
}

[data-compose="slide-v"] .scroll-compose-text {
  transform: translateY(calc(50px * (1 - var(--scroll-progress))));
}
[data-compose="slide-v"] .scroll-compose-viz {
  transform: translateY(calc(-50px * (1 - var(--scroll-progress)))) scale(calc(0.9 + 0.1 * var(--scroll-progress)));
}

[data-compose="fade-scale"] .scroll-compose-text {
  transform: scale(calc(0.85 + 0.15 * var(--scroll-progress)));
}
[data-compose="fade-scale"] .scroll-compose-viz {
  transform: scale(calc(0.7 + 0.3 * var(--scroll-progress)));
}

[data-compose="rotate-in"] .scroll-compose-text {
  transform: perspective(600px) rotateY(calc(-8deg * (1 - var(--scroll-progress)))) translateX(calc(-30px * (1 - var(--scroll-progress))));
}
[data-compose="rotate-in"] .scroll-compose-viz {
  transform: perspective(600px) rotateY(calc(8deg * (1 - var(--scroll-progress)))) translateX(calc(30px * (1 - var(--scroll-progress))));
}

[data-compose="split"] .scroll-compose-text {
  transform: translateX(calc(-80px * (1 - var(--scroll-progress))));
  filter: none;
}
[data-compose="split"] .scroll-compose-viz {
  transform: translateX(calc(80px * (1 - var(--scroll-progress))));
  filter: none;
}

[data-compose="rise"] .scroll-compose-text {
  transform: translateY(calc(40px * (1 - var(--scroll-progress)))) rotate(calc(-2deg * (1 - var(--scroll-progress))));
}
[data-compose="rise"] .scroll-compose-viz {
  transform: translateY(calc(60px * (1 - var(--scroll-progress)))) scale(calc(0.8 + 0.2 * var(--scroll-progress)));
}

/* ============================================
   SVG ANIMATIONS
   ============================================ */

/* Workspace */
@keyframes wsPanelGlow { 0%,100%{opacity:.3} 50%{opacity:.7} }
@keyframes wsCursorMove { 0%{cx:52;cy:42} 20%{cx:147;cy:25} 40%{cx:147;cy:62} 60%{cx:37;cy:117} 80%{cx:102;cy:117} 100%{cx:52;cy:42} }
.feat.visible .ws-p1{animation:wsPanelGlow 3s ease-in-out 0s infinite}
.feat.visible .ws-p2{animation:wsPanelGlow 3s ease-in-out .5s infinite}
.feat.visible .ws-p3{animation:wsPanelGlow 3s ease-in-out 1s infinite}
.feat.visible .ws-p4{animation:wsPanelGlow 3s ease-in-out 1.5s infinite}
.feat.visible .ws-p5{animation:wsPanelGlow 3s ease-in-out 2s infinite}
.feat.visible .ws-p6{animation:wsPanelGlow 3s ease-in-out 2.5s infinite}
.feat.visible .ws-cursor{animation:wsCursorMove 8s ease-in-out infinite}

/* Browser */
@keyframes brTabActive { 0%,30%,100%{opacity:.3} 5%,25%{opacity:.6} }
@keyframes brTabSwitch2 { 0%,30%,60%,100%{opacity:.15} 35%,55%{opacity:.5} }
@keyframes brTabSwitch3 { 0%,60%,90%,100%{opacity:.15} 65%,85%{opacity:.5} }
@keyframes brUrlLoad { 0%{width:0} 15%{width:100px} 25%,100%{width:120px} }
@keyframes brContentFade { 0%,20%{opacity:0} 30%,90%{opacity:.25} 100%{opacity:0} }
.feat.visible .br-tab1{animation:brTabActive 6s ease infinite}
.feat.visible .br-tab2{animation:brTabSwitch2 6s ease infinite}
.feat.visible .br-tab3{animation:brTabSwitch3 6s ease infinite}
.feat.visible .br-url-fill{animation:brUrlLoad 6s ease infinite}
.feat.visible .br-c1{animation:brContentFade 6s ease .2s infinite}
.feat.visible .br-c2{animation:brContentFade 6s ease .35s infinite}
.feat.visible .br-c3{animation:brContentFade 6s ease .5s infinite}
.feat.visible .br-c4{animation:brContentFade 6s ease .65s infinite}
.feat.visible .br-c5{animation:brContentFade 6s ease .8s infinite}
.feat.visible .br-c6{animation:brContentFade 6s ease .95s infinite}

/* Terminal */
@keyframes termType { 0%,10%{opacity:0;transform:translateX(-4px)} 15%,100%{opacity:1;transform:translateX(0)} }
@keyframes cursorBlink { 0%,49%{opacity:.85} 50%,100%{opacity:0} }
.feat.visible .term-l1{animation:termType 4s ease 0s infinite}
.feat.visible .term-l2{animation:termType 4s ease .8s infinite}
.feat.visible .term-l3{animation:termType 4s ease 1.6s infinite}
.feat.visible .term-l4{animation:termType 4s ease 2.4s infinite}
.feat.visible .term-l5{animation:termType 4s ease 3.2s infinite}
.feat.visible .term-cursor{animation:cursorBlink 1s step-end infinite}

/* AI */
@keyframes aiConn { 0%,100%{opacity:0} 20%,80%{opacity:.45} }
@keyframes aiBrain { 0%,100%{r:8;opacity:.25} 50%{r:12;opacity:.55} }
@keyframes aiNode { 0%,100%{opacity:.25} 50%{opacity:.6} }
@keyframes aiP1 { 0%{cx:35;cy:45;opacity:0} 10%{opacity:.85} 50%{cx:100;cy:80;opacity:.85} 60%,100%{opacity:0} }
@keyframes aiP2 { 0%{cx:165;cy:45;opacity:0} 10%{opacity:.85} 50%{cx:100;cy:80;opacity:.85} 60%,100%{opacity:0} }
@keyframes aiP3 { 0%{cx:100;cy:25;opacity:0} 10%{opacity:.85} 50%{cx:100;cy:80;opacity:.85} 60%,100%{opacity:0} }
.feat.visible .ai-c1{animation:aiConn 4s ease 0s infinite}
.feat.visible .ai-c2{animation:aiConn 4s ease .5s infinite}
.feat.visible .ai-c3{animation:aiConn 4s ease 1s infinite}
.feat.visible .ai-c4{animation:aiConn 4s ease 1.5s infinite}
.feat.visible .ai-c5{animation:aiConn 4s ease 2s infinite}
.feat.visible .ai-c6{animation:aiConn 4s ease 2.5s infinite}
.feat.visible .ai-brain-inner{animation:aiBrain 3s ease-in-out infinite}
.feat.visible .ai-n1{animation:aiNode 3s ease .2s infinite}
.feat.visible .ai-n2{animation:aiNode 3s ease .7s infinite}
.feat.visible .ai-n3{animation:aiNode 3s ease 1.2s infinite}
.feat.visible .ai-n4{animation:aiNode 3s ease 1.7s infinite}
.feat.visible .ai-n5{animation:aiNode 3s ease 2.2s infinite}
.feat.visible .ai-n6{animation:aiNode 3s ease 2.7s infinite}
.feat.visible .ai-pulse1{animation:aiP1 3s ease 0s infinite}
.feat.visible .ai-pulse2{animation:aiP2 3s ease 1s infinite}
.feat.visible .ai-pulse3{animation:aiP3 3s ease 2s infinite}

/* Orchestrator */
@keyframes orchLine { 0%,100%{opacity:0} 30%,70%{opacity:.5} }
@keyframes orchNode { 0%,100%{opacity:.25} 50%{opacity:.65} }
@keyframes orchDot { 0%{cy:25;cx:100;opacity:0} 5%{opacity:.85} 15%{cy:80;cx:50} 25%{cy:80;cx:100;opacity:.85} 35%{cy:80;cx:150} 50%{cy:135;cx:100;opacity:.85} 60%,100%{opacity:0} }
.feat.visible .orch-planner{animation:orchNode 5s ease 0s infinite}
.feat.visible .orch-l1{animation:orchLine 5s ease .5s infinite}
.feat.visible .orch-l2{animation:orchLine 5s ease .7s infinite}
.feat.visible .orch-l3{animation:orchLine 5s ease .9s infinite}
.feat.visible .orch-dev1{animation:orchNode 5s ease 1.2s infinite}
.feat.visible .orch-dev2{animation:orchNode 5s ease 1.4s infinite}
.feat.visible .orch-dev3{animation:orchNode 5s ease 1.6s infinite}
.feat.visible .orch-l4{animation:orchLine 5s ease 2s infinite}
.feat.visible .orch-l5{animation:orchLine 5s ease 2.2s infinite}
.feat.visible .orch-l6{animation:orchLine 5s ease 2.4s infinite}
.feat.visible .orch-rev{animation:orchNode 5s ease 3s infinite}
.feat.visible .orch-dot{animation:orchDot 5s ease infinite}

/* Database */
@keyframes dbGlow { 0%,100%{opacity:.25} 50%{opacity:.55} }
@keyframes dbD1 { 0%{cx:75;cy:55;opacity:0} 10%{opacity:.8} 50%{cx:100;cy:85;opacity:.8} 60%,100%{opacity:0} }
@keyframes dbD2 { 0%{cx:125;cy:55;opacity:0} 10%{opacity:.8} 50%{cx:100;cy:85;opacity:.8} 60%,100%{opacity:0} }
@keyframes dbD3 { 0%{cx:100;cy:115;opacity:0} 10%{opacity:.8} 50%{cx:100;cy:85;opacity:0} 100%{opacity:0} }
.feat.visible .db-c1{animation:dbGlow 3s ease 0s infinite}
.feat.visible .db-c2{animation:dbGlow 3s ease 1s infinite}
.feat.visible .db-c3{animation:dbGlow 3s ease 2s infinite}
.feat.visible .db-d1{animation:dbD1 4s ease 0s infinite}
.feat.visible .db-d2{animation:dbD2 4s ease 1.3s infinite}
.feat.visible .db-d3{animation:dbD3 4s ease 2.6s infinite}

/* Git */
@keyframes gitPop { 0%,100%{r:2;opacity:.25} 50%{r:5;opacity:.6} }
@keyframes gitDraw { 0%{stroke-dasharray:200;stroke-dashoffset:200;opacity:.25} 50%{stroke-dashoffset:0;opacity:.5} 100%{stroke-dashoffset:0;opacity:.25} }
.feat.visible .git-cm1{animation:gitPop 4s ease 0s infinite}
.feat.visible .git-cm2{animation:gitPop 4s ease .5s infinite}
.feat.visible .git-cm3{animation:gitPop 4s ease 1s infinite}
.feat.visible .git-cm4{animation:gitPop 4s ease 1.5s infinite}
.feat.visible .git-cb1{animation:gitPop 4s ease .3s infinite}
.feat.visible .git-cb2{animation:gitPop 4s ease .8s infinite}
.feat.visible .git-cb3{animation:gitPop 4s ease 1.3s infinite}
.feat.visible .git-branch{animation:gitDraw 4s ease infinite}

/* Code-Server */
@keyframes csType { 0%{width:0;opacity:0} 20%,100%{opacity:.25} }
.feat.visible .cs-code1{animation:csType 5s ease 0s infinite}
.feat.visible .cs-code2{animation:csType 5s ease .3s infinite}
.feat.visible .cs-code3{animation:csType 5s ease .6s infinite}
.feat.visible .cs-code4{animation:csType 5s ease .9s infinite}
.feat.visible .cs-code5{animation:csType 5s ease 1.2s infinite}
.feat.visible .cs-code6{animation:csType 5s ease 1.5s infinite}
.feat.visible .cs-code7{animation:csType 5s ease 1.8s infinite}
.feat.visible .cs-cursor{animation:cursorBlink 1s step-end infinite}
@keyframes csFile { 0%,100%{opacity:.15} 50%{opacity:.35} }
.feat.visible .cs-f1{animation:csFile 6s ease 0s infinite}
.feat.visible .cs-f2{animation:csFile 6s ease 1s infinite}
.feat.visible .cs-f3{animation:csFile 6s ease 2s infinite}
.feat.visible .cs-f4{animation:csFile 6s ease 3s infinite}

/* SFTP */
@keyframes sftpD1 { 0%{cx:88;opacity:0} 10%{opacity:.85} 50%{cx:112;opacity:.85} 60%,100%{opacity:0} }
@keyframes sftpD2 { 0%{cx:112;opacity:0} 10%{opacity:.85} 50%{cx:88;opacity:.85} 60%,100%{opacity:0} }
.feat.visible .sftp-dot1{animation:sftpD1 4s ease 0s infinite}
.feat.visible .sftp-dot2{animation:sftpD2 4s ease 1.3s infinite}

/* Video Recording */
@keyframes recBlink { 0%,49%{opacity:.8} 50%,100%{opacity:.25} }
@keyframes recWave { 0%,100%{y1:112;y2:118} 25%{y1:106;y2:124} 50%{y1:110;y2:120} 75%{y1:108;y2:122} }
.feat.visible .rec-dot{animation:recBlink 1.5s step-end infinite}
.feat.visible .rec-w1{animation:recWave 1.2s ease 0s infinite}
.feat.visible .rec-w2{animation:recWave 1.2s ease .1s infinite}
.feat.visible .rec-w3{animation:recWave 1.2s ease .2s infinite}
.feat.visible .rec-w4{animation:recWave 1.2s ease .3s infinite}
.feat.visible .rec-w5{animation:recWave 1.2s ease .4s infinite}

/* Projects */
@keyframes projFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
@keyframes projPulse { 0%,100%{r:3;opacity:.5} 50%{r:5;opacity:.8} }
.feat.visible .proj-c1{animation:projFloat 4s ease 0s infinite}
.feat.visible .proj-c2{animation:projFloat 4s ease .8s infinite}
.feat.visible .proj-c3{animation:projFloat 4s ease 1.6s infinite}
.feat.visible .proj-active{animation:projPulse 2s ease infinite}

/* Productivity */
@keyframes prodCheck { 0%,20%{opacity:0} 30%,100%{opacity:.8} }
@keyframes prodFill { 0%{stroke-dashoffset:163} 50%,100%{stroke-dashoffset:82} }
.feat.visible .prod-chm1{animation:prodCheck 6s ease .5s infinite}
.feat.visible .prod-chm2{animation:prodCheck 6s ease 1.5s infinite}
.feat.visible .prod-progress{animation:prodFill 6s ease infinite}

/* ============================================
   BENTO SVG ANIMATIONS
   ============================================ */

/* Convergence (Tutto in uno) */
@keyframes bentoConvLine { 0%,100%{opacity:.2} 50%{opacity:.45} }
@keyframes bentoConvNode { 0%,100%{opacity:.35} 50%{opacity:.6} }
@keyframes bentoConvCenter { 0%,100%{r:18;opacity:.45} 50%{r:22;opacity:.6} }
.bento-card.visible .bento-conv-l1{animation:bentoConvLine 4s ease 0s infinite}
.bento-card.visible .bento-conv-l2{animation:bentoConvLine 4s ease .3s infinite}
.bento-card.visible .bento-conv-l3{animation:bentoConvLine 4s ease .6s infinite}
.bento-card.visible .bento-conv-l4{animation:bentoConvLine 4s ease .9s infinite}
.bento-card.visible .bento-conv-l5{animation:bentoConvLine 4s ease 1.2s infinite}
.bento-card.visible .bento-conv-l6{animation:bentoConvLine 4s ease 1.5s infinite}
.bento-card.visible .bento-conv-l7{animation:bentoConvLine 4s ease 1.8s infinite}
.bento-card.visible .bento-conv-l8{animation:bentoConvLine 4s ease 2.1s infinite}
.bento-card.visible .bento-conv-n1{animation:bentoConvNode 3s ease 0s infinite}
.bento-card.visible .bento-conv-n2{animation:bentoConvNode 3s ease .4s infinite}
.bento-card.visible .bento-conv-n3{animation:bentoConvNode 3s ease .8s infinite}
.bento-card.visible .bento-conv-n4{animation:bentoConvNode 3s ease 1.2s infinite}
.bento-card.visible .bento-conv-n5{animation:bentoConvNode 3s ease 1.6s infinite}
.bento-card.visible .bento-conv-n6{animation:bentoConvNode 3s ease 2s infinite}
.bento-card.visible .bento-conv-n7{animation:bentoConvNode 3s ease 2.4s infinite}
.bento-card.visible .bento-conv-n8{animation:bentoConvNode 3s ease 2.8s infinite}
.bento-card.visible .bento-conv-center{animation:bentoConvCenter 3s ease infinite}

/* Benchmark (Zero Electron) */
@keyframes bentoBenchSwift { 0%{width:0} 30%,100%{width:35px} }
@keyframes bentoBenchEl { 0%{width:0} 30%,100%{width:95px} }
.bento-card.visible .bento-bench-swift{animation:bentoBenchSwift 3s ease 0s infinite}
.bento-card.visible .bento-bench-el{animation:bentoBenchEl 3s ease 0s infinite}

/* MCP (AI-First) */
@keyframes bentoMcpLine { 0%,100%{opacity:0} 30%,70%{opacity:.45} }
@keyframes bentoMcpNode { 0%,100%{opacity:.35} 50%{opacity:.65} }
@keyframes bentoMcpDot1 { 0%{cx:100;cy:70;opacity:0} 10%{opacity:.85} 40%{cx:100;cy:39;opacity:.85} 50%,100%{opacity:0} }
@keyframes bentoMcpDot2 { 0%{cx:100;cy:70;opacity:0} 10%{opacity:.85} 40%{cx:100;cy:101;opacity:.85} 50%,100%{opacity:0} }
@keyframes bentoMcpDot3 { 0%{cx:100;cy:70;opacity:0} 10%{opacity:.85} 40%{cx:69;cy:70;opacity:.85} 50%,100%{opacity:0} }
@keyframes bentoMcpDot4 { 0%{cx:100;cy:70;opacity:0} 10%{opacity:.85} 40%{cx:131;cy:70;opacity:.85} 50%,100%{opacity:0} }
@keyframes bentoMcpDot5 { 0%{cx:100;cy:70;opacity:0} 10%{opacity:.85} 40%{cx:70;cy:45;opacity:.85} 50%,100%{opacity:0} }
.bento-card.visible .bento-mcp-l1{animation:bentoMcpLine 4s ease 0s infinite}
.bento-card.visible .bento-mcp-l2{animation:bentoMcpLine 4s ease .5s infinite}
.bento-card.visible .bento-mcp-l3{animation:bentoMcpLine 4s ease 1s infinite}
.bento-card.visible .bento-mcp-l4{animation:bentoMcpLine 4s ease 1.5s infinite}
.bento-card.visible .bento-mcp-l5{animation:bentoMcpLine 4s ease 2s infinite}
.bento-card.visible .bento-mcp-n1{animation:bentoMcpNode 3s ease 0s infinite}
.bento-card.visible .bento-mcp-n2{animation:bentoMcpNode 3s ease .75s infinite}
.bento-card.visible .bento-mcp-n3{animation:bentoMcpNode 3s ease 1.5s infinite}
.bento-card.visible .bento-mcp-n4{animation:bentoMcpNode 3s ease 2.25s infinite}
.bento-card.visible .bento-mcp-n5{animation:bentoMcpNode 3s ease 3s infinite}
.bento-card.visible .bento-mcp-d1{animation:bentoMcpDot1 4s ease 0s infinite}
.bento-card.visible .bento-mcp-d2{animation:bentoMcpDot2 4s ease 1s infinite}
.bento-card.visible .bento-mcp-d3{animation:bentoMcpDot3 4s ease 2s infinite}
.bento-card.visible .bento-mcp-d4{animation:bentoMcpDot4 4s ease 3s infinite}
.bento-card.visible .bento-mcp-d5{animation:bentoMcpDot5 4s ease 4s infinite}
.bento-card.visible .bento-mcp-center{animation:bentoConvCenter 3s ease infinite}

/* Lock (Privacy) */
@keyframes bentoLockRing { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes bentoLockPulse { 0%,100%{opacity:.45} 50%{opacity:.6} }
.bento-card.visible .bento-lock-ring{animation:bentoLockRing 20s linear infinite;transform-origin:120px 70px}
.bento-card.visible .bento-lock-body{animation:bentoLockPulse 2s ease infinite}
.bento-card.visible .bento-lock-shackle{animation:bentoLockPulse 2s ease infinite}

/* ============================================
   WHY
   ============================================ */

#why {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.why-bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.bento-card {
  background: var(--bg-elevated);
  padding: clamp(2rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.bento-card:nth-child(1) { grid-column: 1 / 3; }
.bento-card:nth-child(2) { grid-column: 3 / 4; }
.bento-card:nth-child(3) { grid-column: 1 / 2; }
.bento-card:nth-child(4) { grid-column: 2 / 4; }

.bento-wide {
  flex-direction: row;
  align-items: center;
}

.bento-tall {
  flex-direction: column;
  justify-content: space-between;
}

.bento-content {
  flex: 1;
}

.bento-number {
  font-size: clamp(3rem, 4vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.bento-unit {
  font-size: 0.6em;
  opacity: 0.5;
}

.bento-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.bento-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.bento-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

.bento-viz {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-wide .bento-viz {
  flex: 0 0 auto;
  width: 240px;
}

.bento-tall .bento-viz {
  width: 100%;
  max-height: 140px;
}

.bento-viz svg {
  width: 100%;
  height: auto;
}

/* ============================================
   MCP SERVERS
   ============================================ */

#mcp-servers {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
}

.mcp-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
  grid-template-columns: repeat(3, 1fr);
}

.mcp-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s var(--ease);
}

.mcp-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.mcp-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.mcp-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge-optimized,
.badge-preinstalled,
.badge-performant {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-optimized {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
}

.badge-preinstalled {
  background: rgba(96, 165, 250, 0.12);
  color: var(--accent);
}

.badge-performant {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}

.mcp-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.mcp-desc {
  font-size: 0.875rem;
  color: var(--text-2);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.mcp-features {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.mcp-features li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

.mcp-features li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.mcp-diagram {
  margin-top: 4rem;
  text-align: center;
}

.diagram-viz {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.diagram-caption {
  font-size: 0.875rem;
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto;
}

/* Tablet */
@media (max-width: 900px) {
  .mcp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 600px) {
  .mcp-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   AI STUDIO PROGETTO
   ============================================ */

#ai-studio {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.ai-studio-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(96,165,250,0.04) 0%, transparent 100%);
  pointer-events: none;
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.studio-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  position: relative;
  transition: all 0.4s var(--ease);
  overflow: hidden;
}

.studio-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.studio-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(96,165,250,0.06) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.studio-card:hover .studio-card-glow {
  opacity: 1;
}

.studio-card-featured {
  border-color: rgba(96,165,250,0.25);
  background: linear-gradient(135deg, rgba(96,165,250,0.06) 0%, transparent 50%);
}

.studio-card-featured:hover {
  border-color: rgba(96,165,250,0.4);
}

.studio-featured-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(96,165,250,0.15);
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.studio-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.studio-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  margin-bottom: 0.85rem;
}

.studio-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.studio-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.studio-features {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.studio-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.studio-features li svg {
  flex-shrink: 0;
  color: var(--green);
  opacity: 0.8;
}

/* Flow Steps */
.studio-flow {
  margin-top: 5rem;
  text-align: center;
}

.studio-flow-header {
  margin-bottom: 3rem;
}

.studio-flow-title {
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}

.studio-flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.flow-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(96,165,250,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.3s var(--ease);
}

.flow-step:hover .flow-step-num {
  background: rgba(96,165,250,0.25);
  transform: scale(1.1);
}

.flow-step-content {
  text-align: left;
  max-width: 160px;
}

.flow-step-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.flow-step-content p {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.4;
}

.flow-arrow {
  margin: 0 1rem;
  flex-shrink: 0;
  opacity: 0.4;
}

/* Tablet */
@media (max-width: 900px) {
  .studio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .studio-flow-steps {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
  }

  .flow-step {
    width: 100%;
  }

  .flow-arrow {
    display: none;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FAQ
   ============================================ */

#faq {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: color .2s var(--ease);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  transition: transform .3s var(--ease), color .2s var(--ease);
  color: var(--text-3);
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
}

.faq-answer p {
  padding-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.75;
}

/* ============================================
   PRICING
   ============================================ */

#pricing {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
}

.pricing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: clamp(2.5rem, 3vw, 4rem);
}

.pricing-toggle-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-3);
  transition: color 0.3s var(--ease);
  cursor: default;
}

.pricing-toggle-label.pricing-toggle-active {
  color: var(--text);
}

.pricing-toggle-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(52, 211, 153, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-left: 0.25rem;
}

.pricing-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  padding: 0;
}

.pricing-toggle:hover {
  border-color: var(--border-hover);
}

.pricing-toggle.active {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.pricing-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-2);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.pricing-toggle.active .pricing-toggle-knob {
  transform: translateX(20px);
  background: var(--accent);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 1.5vw, 1.5rem);
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(1.5rem, 2vw, 2.5rem);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.pricing-card:hover {
  border-color: var(--border-hover);
}

.pricing-card-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(96,165,250,0.04) 0%, var(--bg-elevated) 100%);
  transform: scale(1.03);
}

.pricing-card-featured:hover {
  border-color: var(--accent);
  transform: scale(1.05);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.pricing-card-header {
  margin-bottom: 1.5rem;
}

.pricing-plan-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.pricing-plan-desc {
  font-size: 0.8125rem;
  color: var(--text-3);
  line-height: 1.5;
}

.pricing-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.pricing-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-2);
}

.pricing-amount {
  font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.pricing-period {
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-left: 0.125rem;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-2);
}

.pricing-features li svg {
  color: var(--green);
  flex-shrink: 0;
}

.pricing-cta {
  display: block;
  text-align: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-subtle);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.15s var(--ease);
}

.pricing-cta:hover {
  background: var(--bg);
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.pricing-cta-featured {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.pricing-cta-featured:hover {
  background: #7ab8fc;
  border-color: #7ab8fc;
  color: var(--bg);
}

/* ============================================
   BETA FORM
   ============================================ */

#beta {
  padding: clamp(5rem, 4rem + 5vw, 10rem) 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.beta-bar-wrap {
  max-width: 280px;
  height: 3px;
  background: var(--bg-subtle);
  border-radius: 9999px;
  margin: 1rem auto 0;
  overflow: hidden;
}

.beta-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 9999px;
  transition: width 1s var(--ease);
}

.beta-form {
  max-width: 440px;
  margin: 0 auto;
}

.field { margin-bottom: 1.25rem; }

.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0.375rem;
}

.field-opt { color: var(--text-3); font-weight: 400; }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Select custom arrow */
.field select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

/* Select options styling */
.field select option[value=""] {
  color: var(--text-3);
}

.field select option {
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
}

/* Selected option in Firefox */
.field select option:checked {
  background: var(--accent);
  color: var(--bg);
}

/* Option hover (not supported in all browsers but fallback) */
@media not all and (min-resolution: 0.001dpcm) {
  @supports (-webkit-appearance: none) or (appearance: none) {
    .field select option:hover {
      background: var(--accent-dim);
    }
  }
}

/* ============================================
   CUSTOM SELECT DROPDOWN
   ============================================ */

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select .select-trigger {
  width: 100%;
  padding: 0.6875rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-select .select-trigger:hover {
  border-color: var(--border-hover);
}

.custom-select.open .select-trigger {
  border-color: var(--accent);
}

.custom-select .select-trigger:focus {
  outline: none;
  border-color: var(--accent);
}

.custom-select .select-trigger.input-error {
  border-color: var(--red);
}

.custom-select .select-placeholder {
  color: var(--text-3);
  flex: 1;
}

.custom-select .select-value {
  color: var(--text);
  flex: 1;
}

.custom-select .select-arrow {
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform .2s var(--ease);
}

.custom-select.open .select-arrow {
  transform: rotate(180deg);
}

/* Source other field */
.field-other {
  margin-top: -0.75rem;
  padding-top: 0;
  animation: slideDown .2s var(--ease);
}

.field-other.hidden {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select .select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.375rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 280px;
  overflow-y: auto;
}

.custom-select.open .select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Custom scrollbar for dropdown */
.custom-select .select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select .select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select .select-dropdown::-webkit-scrollbar-thumb {
  background: var(--text-3);
  border-radius: 3px;
}

.custom-select .select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--text-2);
}

.custom-select .select-option {
  padding: 0.625rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text);
  transition: background-color .15s var(--ease);
}

.custom-select .select-option:hover {
  background: var(--accent-dim);
}

.custom-select .select-option.selected {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}

.custom-select .select-option.selected:hover {
  background: var(--accent);
}

/* Field error for custom select */
.custom-select.input-error .select-trigger {
  border-color: var(--red);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--bg);
}

.field input:hover:not(:focus),
.field select:hover:not(:focus),
.field textarea:hover:not(:focus) {
  border-color: var(--border-hover);
}

.field input.input-error,
.field select.input-error,
.field textarea.input-error {
  border-color: var(--red);
}

.field input.input-error:focus,
.field select.input-error:focus,
.field textarea.input-error:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

.field-error {
  display: none;
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 0.25rem;
}

.field-error.visible { display: block; }

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.field-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.field-check label { margin-bottom: 0; font-size: 0.8125rem; }

.char-count {
  font-size: 0.75rem;
  color: var(--text-3);
  text-align: right;
  margin-top: 0.25rem;
}

.btn-full { width: 100%; margin-top: 0.5rem; }

.form-ok {
  text-align: center;
  padding: 3rem 0;
}

.ok-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.form-ok h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
}

.form-ok p { color: var(--text-2); font-size: 0.9375rem; }

.form-server-error {
  color: var(--red);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-3);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color .2s var(--ease);
}

.footer-links a:hover { color: var(--text-2); }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-on-scroll {
  opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.animate-on-scroll.fade-in { transform: translateY(0); }
.animate-on-scroll.slide-up { transform: translateY(24px); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   LEGAL PAGES
   ============================================ */

.legal-page { padding-top: calc(64px + clamp(3rem, 5vw, 6rem)); padding-bottom: clamp(3rem, 5vw, 6rem); min-height: 100vh; }
.legal-header { margin-bottom: 3rem; }
.legal-header h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.legal-date { font-size: 0.875rem; color: var(--text-3); }
.legal-content h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 2.5rem; margin-bottom: 0.75rem; color: var(--text); }
.legal-content h3 { font-size: 1.125rem; font-weight: 600; margin-top: 1.75rem; margin-bottom: 0.5rem; color: var(--text); }
.legal-content p { font-size: 0.9375rem; color: var(--text-2); line-height: 1.8; margin-bottom: 1rem; }
.legal-content ul, .legal-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.legal-content li { font-size: 0.9375rem; color: var(--text-2); line-height: 1.8; margin-bottom: 0.375rem; }
.legal-content a { color: var(--accent); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }
.legal-content strong { color: var(--text); font-weight: 600; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .why-bento { grid-template-columns: 1fr 1fr; }
  .bento-card:nth-child(1) { grid-column: 1 / -1; }
  .bento-card:nth-child(2) { grid-column: auto; }
  .bento-card:nth-child(3) { grid-column: auto; }
  .bento-card:nth-child(4) { grid-column: 1 / -1; }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 680px;
  }
}

@media (max-width: 768px) {
  .feat {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .feat:nth-child(even) { direction: ltr; }
  .feat-viz { order: -1; }
  .feat-viz svg { max-width: 180px; }
  .feat + .feat::before { display: none; }

  [data-compose="slide-h"] .scroll-compose-text,
  [data-compose="slide-v"] .scroll-compose-text,
  [data-compose="split"] .scroll-compose-text {
    transform: translateY(calc(30px * (1 - var(--scroll-progress))));
  }
  [data-compose="slide-h"] .scroll-compose-viz,
  [data-compose="slide-v"] .scroll-compose-viz,
  [data-compose="split"] .scroll-compose-viz {
    transform: translateY(calc(-30px * (1 - var(--scroll-progress)))) scale(calc(0.9 + 0.1 * var(--scroll-progress)));
  }

  [data-compose="fade-scale"] .scroll-compose-text {
    transform: scale(calc(0.9 + 0.1 * var(--scroll-progress)));
  }
  [data-compose="fade-scale"] .scroll-compose-viz {
    transform: scale(calc(0.8 + 0.2 * var(--scroll-progress)));
  }

  [data-compose="rotate-in"] .scroll-compose-text {
    transform: translateY(calc(25px * (1 - var(--scroll-progress))));
  }
  [data-compose="rotate-in"] .scroll-compose-viz {
    transform: translateY(calc(-25px * (1 - var(--scroll-progress))));
  }

  [data-compose="rise"] .scroll-compose-text {
    transform: translateY(calc(35px * (1 - var(--scroll-progress))));
  }
  [data-compose="rise"] .scroll-compose-viz {
    transform: translateY(calc(50px * (1 - var(--scroll-progress)))) scale(calc(0.85 + 0.15 * var(--scroll-progress)));
  }

  .why-bento { grid-template-columns: 1fr; }
  .bento-card { grid-column: auto !important; }
  .bento-wide { flex-direction: column; }
  .bento-viz { max-width: 200px; margin: 0 auto; }

  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .faq-list { max-width: 100%; }
  .faq-question { font-size: 0.9375rem; }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  .pricing-card-featured {
    transform: none;
  }
  .pricing-card-featured:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .features-grid { gap: 3rem; }
  .hero-stack { gap: 0.375rem; }
  .hero-stack span { font-size: 0.6875rem; padding: 0.2rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .animate-on-scroll { opacity: 1; transform: none; }
  .scroll-compose-text, .scroll-compose-viz { transform: none !important; filter: none !important; opacity: 1 !important; }
}

/* ===== AI Agents Redesign ===== */
#ai-agents {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
  overflow: hidden;
}

.ai-agents-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, var(--accent-glow, rgba(99, 102, 241, 0.05)) 0%, transparent 70%);
  animation: gradient-shift 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes gradient-shift {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

.ai-agents-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle-line {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.particle-line line {
  animation: dash-flow 2s linear infinite;
}

@keyframes dash-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -16; }
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.agent-card {
  position: relative;
  background: var(--bg-elevated);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  cursor: pointer;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, transparent 0%, var(--accent-dim) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.agent-card:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  box-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent-glow, rgba(99, 102, 241, 0.3));
  border-color: var(--accent);
}

.agent-card:hover::before {
  opacity: 1;
}

.agent-card-featured {
  /* Ora occupa una singola colonna come le altre card */
  padding: 2rem;
}

.agent-card-featured .agent-icon {
  margin-bottom: 1.25rem;
}

.agent-card-featured .agent-badge {
  position: static;
  transform: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.agent-card-featured .agent-tag {
  margin-top: 1rem;
}

.agent-card-featured .agent-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Badge MCP evidenziato */
.agent-badge-mcp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 24px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.6), 0 0 30px rgba(99, 102, 241, 0.3); }
}

.agent-badge-mcp svg {
  animation: badge-pulse 1.5s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

/* Highlight testo MCP */
.highlight-mcp {
  color: var(--accent);
  font-weight: 700;
  display: inline-block;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  padding: 0 0.25rem;
}

.agent-desc-featured {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: var(--text-2);
}

/* MCP Native Box */
.mcp-native-box {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.mcp-native-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
  animation: mcp-bar-flow 3s linear infinite;
}

@keyframes mcp-bar-flow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.mcp-native-header {
  margin-bottom: 1rem;
}

.mcp-native-title {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.mcp-native-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 500;
}

/* MCP Server List */
.mcp-server-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mcp-server-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.mcp-server-item:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateX(4px);
}

.mcp-server-item-featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-dim), var(--bg-elevated));
}

.mcp-server-item-featured:hover {
  transform: translateX(4px) scale(1.02);
}

/* MCP Server Icons */
.mcp-server-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
  position: relative;
}

.mcp-server-icon svg {
  stroke: var(--accent);
  opacity: 0.9;
}

.mcp-server-ssh { background: rgba(34, 197, 94, 0.12); }
.mcp-server-db { background: rgba(99, 102, 241, 0.12); }
.mcp-server-vision { background: rgba(236, 72, 153, 0.12); }
.mcp-server-git { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15)); }

.mcp-server-git svg {
  stroke: var(--accent);
}

.mcp-server-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-size: 0.5625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* MCP Server Content */
.mcp-server-content {
  flex: 1;
  min-width: 0;
}

.mcp-server-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 0 0 0.25rem 0;
}

.mcp-server-desc {
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0;
}

/* Git Mode Badges */
.git-modes {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.git-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.git-mode-ro {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.git-mode-rw {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.git-mode-read {
  color: #6366f1;
  font-weight: 700;
}

.git-mode-write {
  color: #22c55e;
  font-weight: 700;
}

/* MCP Vision icon animation */
.mcp-server-vision svg {
  animation: vision-pulse 2s ease-in-out infinite;
}

@keyframes vision-pulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* MCP Git icon animation */
.mcp-server-git svg {
  animation: git-rotate 3s ease-in-out infinite;
}

@keyframes git-rotate {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* Hover animation per ogni server */
.mcp-server-item:hover .mcp-server-icon svg {
  animation: mcp-icon-bounce 0.4s ease;
}

@keyframes mcp-icon-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Icona chat animata */
.agent-card-featured .agent-icon svg {
  animation: chat-pulse 2s ease-in-out infinite;
}

@keyframes chat-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

/* Removed: old 900px breakpoint — now handled by progressive 1024/768/480px queries below */

.agent-card-featured::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), var(--accent-dim), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.agent-card-featured:hover::after {
  opacity: 1;
}

.agent-icon {
  margin-bottom: 1.25rem;
  animation: float 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.agent-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.agent-desc {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.agent-features {
  list-style: none;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.agent-features li {
  font-size: 0.8125rem;
  color: var(--text-2);
  padding: 0.375rem 0;
  padding-left: 1.75rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.agent-features li svg {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  opacity: 0.7;
  flex-shrink: 0;
}

.agent-tag {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: none;
  position: absolute;
  z-index: 1;
}

.agent-tag-locale {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.agent-tag-cloud {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.agent-card-featured .agent-tag {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
}

.agent-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: var(--bg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px var(--accent-glow, rgba(99, 102, 241, 0.4));
}

.agent-satelites {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.satellite {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}

.satellite-1 {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: orbit 4s linear infinite;
}

.satellite-2 {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  animation: orbit 4s linear infinite 1.33s;
}

.satellite-3 {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  animation: orbit 4s linear infinite 2.66s;
}

@keyframes orbit {
  0% { transform: translateX(-50%) rotate(0deg) translateY(-60px) rotate(0deg); }
  100% { transform: translateX(-50%) rotate(360deg) translateY(-60px) rotate(-360deg); }
}

.agent-capability {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.capability-item {
  margin-bottom: 0.75rem;
}

.capability-item:last-child {
  margin-bottom: 0;
}

.capability-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-2);
  margin-bottom: 0.375rem;
}

.capability-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.capability-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dim) 100%);
  border-radius: 3px;
  width: 0;
  transition: width 1s ease-out;
}

.capability-fill.animate {
  animation: fill-bar 1s ease-out forwards;
}

@keyframes fill-bar {
  0% { width: 0; }
  100% { width: var(--target-width, 0); }
}

/* ── Tablet landscape / small desktop (≤ 1024px) ── */
@media (max-width: 1024px) {
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .agent-card-featured {
    grid-column: span 1;
    padding: 1.75rem;
  }

  .agent-card-featured .agent-tag {
    grid-column: auto;
  }

  .agent-card-featured .agent-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
  }

  .agent-card-featured .capability-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .agent-card-featured .capability-label {
    min-width: auto;
  }
}

/* ── Tablet portrait (≤ 768px) ── */
@media (max-width: 768px) {
  #ai-agents {
    padding: clamp(3rem, 8vw, 5rem) 0;
  }

  .agents-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .agent-card {
    padding: 1.75rem;
  }

  .agent-card-featured {
    grid-column: span 1;
    padding: 1.75rem;
  }

  .agent-card-featured .agent-icon {
    grid-row: auto;
    justify-self: start;
  }

  .agent-card-featured .agent-tag {
    grid-column: auto;
  }

  .agent-card-featured .agent-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .agent-badge {
    font-size: 0.6875rem;
    padding: 0.375rem 0.75rem;
  }

  .agent-card h3 {
    font-size: 1.25rem;
  }

  .agent-desc {
    font-size: 0.875rem;
  }

  .agent-satelites {
    width: 80px;
    height: 80px;
  }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  #ai-agents {
    padding: clamp(2.5rem, 6vw, 4rem) 0;
  }

  .agents-grid {
    gap: 1rem;
  }

  .agent-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .agent-card::before {
    border-radius: 16px;
  }

  .agent-card-featured {
    padding: 1.25rem;
    gap: 1rem;
    border-radius: 16px;
  }

  .agent-card-featured::after {
    border-radius: 16px;
  }

  .agent-card-featured .agent-features {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .agent-icon svg {
    width: 40px;
    height: 40px;
  }

  .agent-card-featured .agent-icon svg {
    width: 48px;
    height: 48px;
  }

  .agent-card h3 {
    font-size: 1.125rem;
  }

  .agent-desc {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
  }

  .agent-features li {
    font-size: 0.75rem;
    padding: 0.25rem 0;
    padding-left: 1rem;
  }

  .agent-tag {
    font-size: 0.625rem;
    padding: 0.1875rem 0.5rem;
  }

  .agent-badge {
    font-size: 0.625rem;
    padding: 0.3125rem 0.625rem;
    margin-bottom: 1rem;
  }

  .capability-label {
    font-size: 0.6875rem;
    min-width: auto;
  }

  .capability-bar {
    height: 5px;
  }

  .agent-satelites {
    width: 60px;
    height: 60px;
  }

  .satellite {
    width: 6px;
    height: 6px;
  }
}

/* ── Touch devices: disable 3D hover, use simpler feedback ── */
@media (hover: none) {
  .agent-card:hover {
    transform: none;
    box-shadow: none;
  }

  .agent-card:active {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow, rgba(99, 102, 241, 0.2));
  }

  .agent-card:hover::before,
  .agent-card-featured:hover::after {
    opacity: 0;
  }

  .agent-icon {
    animation: none;
  }
}

/* ===== Releases Section ===== */
#releases {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--bg-elevated);
}

.releases-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.release-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.release-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.release-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: transform 0.3s var(--ease);
}

.release-item:hover .release-badge {
  transform: scale(1.05);
}

.release-badge-major {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

.release-badge-minor {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}

.release-badge-patch {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.release-content {
  flex: 1;
  min-width: 0;
}

.release-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.release-version {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.release-date {
  font-size: 0.75rem;
  color: var(--text-3);
}

.release-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
}

.release-description {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 640px) {
  .release-item {
    padding: 1.25rem;
    gap: 1rem;
  }
  
  .release-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  
  .release-title {
    font-size: 1rem;
  }
  
  .release-description {
    font-size: 0.8125rem;
  }
}