/* ══════════════════════════════════════
   sakalli.ai – Premium Website Styles
   ══════════════════════════════════════ */

/* ── A11y: Skip Link (only visible on keyboard focus) ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: #818cf8;
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── A11y: Screen-reader only ── */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── A11y: Focus-visible (keyboard users see where they are) ── */
:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
}
/* Remove the focus ring for mouse clicks but keep for keyboard */
a:focus:not(:focus-visible), button:focus:not(:focus-visible) {
  outline: none;
}

/* ── Form field wrapper (keeps label + input together) ── */
.form-field {
  display: block;
  width: 100%;
}
.form-row .form-field {
  flex: 1;
}

/* ── Local Fonts (DSGVO-konform) ── */
@font-face { font-family: 'Quicksand'; font-weight: 400; font-style: normal; font-display: swap; src: url('../assets/fonts/quicksand-400.ttf') format('truetype'); }
@font-face { font-family: 'Quicksand'; font-weight: 500; font-style: normal; font-display: swap; src: url('../assets/fonts/quicksand-500.ttf') format('truetype'); }
@font-face { font-family: 'Quicksand'; font-weight: 600; font-style: normal; font-display: swap; src: url('../assets/fonts/quicksand-600.ttf') format('truetype'); }
@font-face { font-family: 'Quicksand'; font-weight: 700; font-style: normal; font-display: swap; src: url('../assets/fonts/quicksand-700.ttf') format('truetype'); }

/* ══════════════════════════════════════
   INTRO VIDEO OVERLAY
   ══════════════════════════════════════ */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  /* Match the hero gradient exactly so there's no color jump */
  background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-dark-2) 50%, #1a0f3c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}

#intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#intro-overlay.hidden {
  display: none;
}

#intro-video {
  max-width: 40vw;
  max-height: 40vh;
  object-fit: contain;
  mix-blend-mode: lighten;
}

/* ── While intro plays: hide everything ── */
body.intro-active .hero-content > * {
  opacity: 0 !important;
  animation: none !important;
}

body.intro-active .navbar {
  opacity: 0;
  transform: translateY(-100%);
  transition: none;
}

body.intro-active #hero-canvas {
  opacity: 0;
}

/* ── intro-done: permanently kill original hero animations ── */
body.intro-done .hero-logo,
body.intro-done .hero h1,
body.intro-done .hero-sub,
body.intro-done .hero-cta {
  animation: none !important;
}

/* Before reveal starts, keep everything hidden with starting positions */
body.intro-done:not(.intro-reveal) .hero-content > * {
  opacity: 0 !important;
}

body.intro-done:not(.intro-reveal) .hero h1,
body.intro-done:not(.intro-reveal) .hero-sub,
body.intro-done:not(.intro-reveal) .hero-cta {
  transform: translateY(30px);
}

body.intro-done:not(.intro-reveal) .navbar {
  opacity: 0;
  transform: translateY(-100%);
}

body.intro-done:not(.intro-reveal) #hero-canvas {
  opacity: 0;
}

/* ── intro-reveal: staggered fade-in ── */
body.intro-reveal .navbar {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.8s ease 0.1s, transform 0.8s ease 0.1s;
}

body.intro-reveal #hero-canvas {
  opacity: 1 !important;
  transition: opacity 1.2s ease;
}

body.intro-reveal .hero-logo {
  opacity: 1 !important;
  transition: none;
}

body.intro-reveal .hero h1 {
  opacity: 1 !important;
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
  transform: translateY(0) !important;
}

body.intro-reveal .hero-sub {
  opacity: 1 !important;
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
  transform: translateY(0) !important;
}

body.intro-reveal .hero-cta {
  opacity: 1 !important;
  transition: opacity 0.6s ease 0.45s, transform 0.6s ease 0.45s;
  transform: translateY(0) !important;
}

body.intro-reveal .hero-scroll-mouse {
  opacity: 1 !important;
  transition: opacity 0.6s ease 0.6s;
}

/* ── Reset & Variables ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #475569;
  --primary-dark: #1e293b;
  --secondary: #f1f5f9;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --bg-dark: #0c0a1d;
  --bg-dark-2: #130f2a;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --text-light: #e2e8f0;
  --text-light-muted: #94a3b8;
  --border: rgba(99, 102, 241, 0.12);
  --border-light: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Quicksand", -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  /* scroll-behavior: smooth removed — fights with GSAP ScrollTrigger pin on mobile */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #0c0a1d; /* dark fallback so iOS overscroll bounces dark, not white */
}

body {
  font-family: var(--font);
  color: var(--primary);
  background: #0c0a1d; /* dark — prevents "white flash" between pinned sections */
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(12, 10, 29, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.01em;
}

.logo-icon {
  height: 44px;
  width: auto;
  transition: all var(--transition);
  animation: logoPulse 3s ease-in-out infinite;
}

.navbar.scrolled .logo-icon {
  height: 38px;
}

@keyframes logoPulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.6)) drop-shadow(0 0 32px rgba(99, 102, 241, 0.3));
  }
}


.logo-text {
  color: var(--text-light);
}

.logo-text .accent {
  color: var(--accent-light);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-light-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Blog Nav Button */
.blog-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  color: #818cf8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}
.blog-nav-btn svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.blog-nav-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #e2e0ff;
  padding-right: 18px;
}
.blog-nav-btn:hover svg {
  transform: translateX(4px);
}

/* Blog CTA under contact */
.blog-cta-section {
  text-align: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(99, 102, 241, 0.08);
}
.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  color: #818cf8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.4s ease;
  position: relative;
}
.blog-cta-btn svg {
  transition: transform 0.4s ease;
}
.blog-cta-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #e2e0ff;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}
.blog-cta-btn:hover svg {
  transform: translateX(6px);
}

.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  padding: 4px 6px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0.5;
  filter: grayscale(0.5);
}

.lang-btn:hover {
  opacity: 0.85;
  filter: grayscale(0);
}

.lang-btn.active {
  opacity: 1;
  filter: grayscale(0);
  background: rgba(255, 255, 255, 0.1);
}

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-light);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-dark-2) 50%, #1a0f3c 100%);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  pointer-events: none;
}


#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* ── Walking Robot Animation ── */
.hero-robot-walker {
  position: absolute;
  bottom: 22%;
  left: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  animation: none;
  transform: translateX(105vw);
  will-change: transform, opacity;
  filter: drop-shadow(0 0 20px rgba(129, 140, 248, 0.3));
  cursor: pointer;
  transition: filter 0.3s;
}
.hero-robot-walker.active {
  pointer-events: auto;
}
.hero-robot-walker:hover {
  filter: drop-shadow(0 0 30px rgba(129, 140, 248, 0.6));
}

.hero-robot-walker.active {
  animation: robotWalkIn 3s ease-out forwards;
}

@keyframes robotWalkIn {
  0%   { transform: translateX(105vw); opacity: 0; }
  20%  { opacity: 0.6; }
  100% { transform: translateX(55vw); opacity: 0.7; }
}

@media (max-width: 768px) {
  .hero-robot-walker {
    bottom: 18%;
    opacity: 0;
  }
  .hero-robot-walker lottie-player {
    width: 90px !important;
    height: 90px !important;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 60px 24px 60px;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease-out;
}

.hero-logo-icon {
  height: 56px;
  width: auto;
  animation: heroIconPulse 3s ease-in-out infinite;
}

.hero-logo-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
}

.hero-logo-text .accent {
  color: var(--accent-light);
}

@keyframes heroIconPulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.2));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)) drop-shadow(0 0 40px rgba(99, 102, 241, 0.2));
    transform: scale(1.04);
  }
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: var(--text-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero h1 .accent {
  color: var(--accent-light);
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-light-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  font-weight: 500;
  line-height: 1.7;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  animation: fadeInUp 0.8s ease-out 0.6s both;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.hero-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.hero-cta svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition);
}

.hero-cta:hover svg {
  transform: translateX(3px);
}

/* ── Scroll Mouse Indicator ── */
.hero-scroll-mouse {
  position: relative;
  z-index: 2;
  cursor: pointer;
  text-decoration: none;
  margin-top: 32px;
  display: block;
  text-align: center;
}

.mouse {
  display: inline-block;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(99, 102, 241, 0.5);
  border-radius: 14px;
  position: relative;
  animation: mouseColorPulse 3s ease-in-out infinite;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-light);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouseScroll 2s ease-in-out infinite;
}

@keyframes mouseScroll {
  0% { opacity: 1; top: 8px; }
  50% { opacity: 0.4; top: 20px; }
  100% { opacity: 1; top: 8px; }
}

@keyframes mouseColorPulse {
  0%, 100% { border-color: rgba(99, 102, 241, 0.35); }
  50% { border-color: rgba(129, 140, 248, 0.7); box-shadow: 0 0 12px rgba(99, 102, 241, 0.2); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ══════════════════════════════════════
   SECTION BASE
   ══════════════════════════════════════ */
section {
  padding: 96px 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text-dark);
  margin-bottom: 56px;
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children > .visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   SERVICES
   ══════════════════════════════════════ */
.services {
  background: linear-gradient(180deg, #0c0a1d 0%, #110e28 50%, #0c0a1d 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle noise overlay for depth */
.services::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.services .section-label {
  color: var(--accent-light);
}

.services .section-title {
  color: var(--text-light);
}

/* ── SERVICES (horizontal pinned scroll) ── */
.services {
  padding: 0 !important;
  position: relative;
  background: #0c0a1d; /* fail-safe bg so no white flash during pin handoff */
}

.services-pin {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
  position: relative;
  background: #0c0a1d;
  z-index: 2;
}

.services-header {
  text-align: center;
  margin: 0 auto 50px;
  padding: 0 24px;
  max-width: 720px;
}

.services-header .section-label {
  display: inline-block;
}

.services-header .section-title {
  margin-top: 8px;
}

.services-track-wrap {
  width: 100%;
  overflow: visible; /* let rotated cards extend beyond box without clipping */
  padding: 40px 0; /* breathing room so corners of rotated cards don't touch section edges */
}

/* Dot indicators — desktop hides them, mobile shows them (overridden in @media) */
.services-dots,
.services-swipe-hint { display: none; }

/* 3-column grid — cards reveal one by one via scroll, end up all visible */
.services-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr; /* equal-height rows */
  gap: 24px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 5vw;
  box-sizing: border-box;
  align-items: stretch;
  will-change: transform;
}

.bento-card {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: relative;
  display: flex; /* so shell fills the cell */
  align-items: stretch;
  /* GSAP sets opacity/x/rotation/scale to hide initially */
}

/* The actual styled card — vertical: visual on top, content below */
.bento-card-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 600px; /* room for mockups + content */
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focused card — newest one revealed, has the spotlight + active animations */
.bento-card.focused .bento-card-shell {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.25),
    0 30px 70px -12px rgba(99, 102, 241, 0.45),
    0 0 120px -20px rgba(167, 139, 250, 0.35);
}

.bento-card.focused .bento-card-shell::after {
  opacity: 1;
}

/* Pause all CSS-driven animations inside non-focused cards (visible but frozen) */
.bento-card:not(.focused) .bento-card-shell *,
.bento-card:not(.focused) .bento-card-shell *::before,
.bento-card:not(.focused) .bento-card-shell *::after {
  animation-play-state: paused !important;
}

/* Move the spotlight + glow border styles from .bento-card to .bento-card-shell */
.bento-card-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    var(--glow-size, 0px) circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(99, 102, 241, 0.15),
    transparent 45%
  );
  border-radius: inherit;
  pointer-events: none;
  transition: --glow-size 0.3s ease;
  z-index: 1;
}

.bento-card-shell::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #818cf8, #a78bfa, #818cf8, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 2;
}

.bento-card-shell:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.15),
    0 25px 60px -12px rgba(99, 102, 241, 0.35),
    0 0 100px -20px rgba(99, 102, 241, 0.2);
}

.bento-card-shell:hover::before { --glow-size: 450px; }
.bento-card-shell:hover::after { opacity: 1; }

/* (old .bento-card pseudo/hover styles moved to .bento-card-shell above) */

/* Visual area (top of card) */
.bento-visual {
  position: relative;
  height: 290px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(13, 12, 32, 0.6) 0%, rgba(13, 12, 32, 0) 100%),
              radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.18), transparent 60%),
              radial-gradient(circle at 70% 70%, rgba(167, 139, 250, 0.12), transparent 55%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Content area (below visual) */
.bento-content {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bento-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bento-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 20px;
  white-space: nowrap;
}

.bento-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 20px;
  font-size: 0.78rem;
  color: #c4b5fd;
  white-space: nowrap;
  box-shadow: 0 0 12px -2px rgba(167, 139, 250, 0.25);
}

.bento-price-from {
  font-size: 0.66rem;
  opacity: 0.75;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bento-price strong {
  font-weight: 700;
  background: linear-gradient(135deg, #e2e8f0 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.bento-content h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #e2e8f0 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bento-content p {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.service-tag {
  padding: 5px 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.bento-card-shell:hover .service-tag {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

/* ─── BROWSER MOCKUP (Websites Card) ─── */
.browser-mockup {
  width: 100%;
  max-width: 320px;
  background: #1a1635;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 60px -10px rgba(99, 102, 241, 0.4);
  transform: perspective(1200px) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-websites:hover .browser-mockup {
  transform: perspective(1200px) rotateX(1deg) translateY(-4px);
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.browser-dots {
  display: flex;
  gap: 5px;
}
.browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.7rem;
  color: rgba(226, 232, 240, 0.7);
  font-family: 'SF Mono', Menlo, monospace;
  text-align: center;
  transition: all 0.4s ease;
}

.browser-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0c0a1d;
  overflow: hidden;
}

.browser-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.browser-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* ─── DASHBOARD MOCKUP (Web Apps Card) ─── */
.dashboard-mockup {
  width: 100%;
  max-width: 300px;
  background: #1a1635;
  border-radius: 12px;
  padding: 16px;
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 60px -10px rgba(167, 139, 250, 0.35);
  transform: perspective(1200px) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-apps:hover .dashboard-mockup {
  transform: perspective(1200px) rotateX(1deg) translateY(-4px);
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dash-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #e2e8f0;
  font-weight: 600;
}

.dash-logo {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
}

.dash-tabs {
  display: flex;
  gap: 4px;
}
.dash-tab {
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.dash-tab.active {
  background: linear-gradient(90deg, #818cf8, #a78bfa);
}

.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.dash-stat {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.dash-stat-label {
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dash-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.dash-stat-trend {
  font-size: 0.62rem;
  font-weight: 600;
  margin-top: 2px;
}
.dash-stat-trend.up { color: #4ade80; }

.dash-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 60px;
  gap: 4px;
  padding-top: 4px;
}

.dash-bar {
  flex: 1;
  height: 0%;
  background: linear-gradient(180deg, #a78bfa, #818cf8);
  border-radius: 3px 3px 0 0;
  transition: height 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.85;
}

.dash-chart.animate .dash-bar { height: var(--h); }

/* ─── CHAT MOCKUP (AI Card) ─── */
.chat-mockup {
  width: 100%;
  max-width: 300px;
  background: #1a1635;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 60px -10px rgba(129, 140, 248, 0.4);
  transform: perspective(1200px) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-ai:hover .chat-mockup {
  transform: perspective(1200px) rotateX(1deg) translateY(-4px);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.chat-status {
  font-size: 0.65rem;
  color: rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  gap: 4px;
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

/* Alte, doppelte Chat-Styles entfernt — einheitlich via .chat-bubble (weiter unten).
   Verhinderte sonst Box-in-Box + erzwungenen Zeilenumbruch bei kurzen Nachrichten. */

/* ─── Progress bar (used across all bento cards) ─── */
.browser-progress {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 14px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  z-index: 2;
}
.browser-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

/* ─── App Rotator (Web Apps card) ─── */
.app-rotator,
.ai-rotator {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px; /* fallback for when parent uses min-height (mobile) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-mockup,
.ai-mockup {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.55s ease, transform 0.7s ease;
  pointer-events: none;
}

.app-mockup.active,
.ai-mockup.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Override default mockup positioning when inside rotator */
.app-rotator > .app-mockup,
.ai-rotator > .ai-mockup {
  width: 100%;
  max-width: 300px;
  margin: auto;
  background: #1a1635;
  border-radius: 12px;
  box-shadow:
    0 20px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 60px -10px rgba(167, 139, 250, 0.35);
  transform: perspective(1200px) rotateX(4deg) scale(0.96);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.55s ease;
  display: block;
  padding: 16px;
}

.app-rotator > .app-mockup.active,
.ai-rotator > .ai-mockup.active {
  transform: perspective(1200px) rotateX(3deg) scale(1);
}

.bento-apps:hover .app-mockup.active,
.bento-ai:hover .ai-mockup.active {
  transform: perspective(1200px) rotateX(1deg) translateY(-4px) scale(1);
}

/* Dash bars live animation pulse */
.live-chart .dash-bar {
  animation: barPulse 3s ease-in-out infinite;
  height: var(--h);
}
@keyframes barPulse {
  0%, 100% { height: var(--h); }
  50% { height: calc(var(--h) - 18%); }
}
.live-chart .dash-bar:nth-child(1) { animation-delay: 0.1s; }
.live-chart .dash-bar:nth-child(2) { animation-delay: 0.3s; }
.live-chart .dash-bar:nth-child(3) { animation-delay: 0.5s; }
.live-chart .dash-bar:nth-child(4) { animation-delay: 0.7s; }
.live-chart .dash-bar:nth-child(5) { animation-delay: 0.9s; }
.live-chart .dash-bar:nth-child(6) { animation-delay: 1.1s; }
.live-chart .dash-bar:nth-child(7) { animation-delay: 1.3s; }

/* ─── CRM Mockup ─── */
.crm-mockup .crm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.crm-logo { background: linear-gradient(135deg, #4ade80, #22d3ee); }
.crm-search {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}
.crm-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.crm-col {
  background: rgba(255, 255, 255, 0.025);
  border-radius: 6px;
  padding: 6px 5px;
  min-height: 110px;
}
.crm-col-title {
  font-size: 0.55rem;
  color: rgba(148, 163, 184, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.crm-col-count {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  font-size: 0.55rem;
  padding: 1px 5px;
  border-radius: 8px;
  text-transform: none;
}
.crm-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 5px 6px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.crm-card-name {
  height: 4px;
  background: rgba(226, 232, 240, 0.45);
  border-radius: 2px;
  margin-bottom: 4px;
  width: 75%;
}
.crm-card-bar {
  height: 3px;
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  border-radius: 2px;
  width: var(--w);
}
.crm-mockup.active .crm-moving {
  animation: crmMove 4s ease-in-out infinite;
}
@keyframes crmMove {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.crm-won {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.2);
}
.crm-won .crm-card-bar {
  background: linear-gradient(90deg, #4ade80, #22d3ee);
}

/* ─── Training Plan Mockup ─── */
.training-mockup .train-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.train-logo { background: linear-gradient(135deg, #f97316, #fb923c); }
.train-week {
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.75);
}
.train-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.train-day {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: rgba(148, 163, 184, 0.7);
  position: relative;
}
.train-day.done {
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.25);
  color: #4ade80;
}
.train-day.done::after {
  content: '✓';
  position: absolute;
  font-size: 0.55rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #4ade80;
  font-weight: 700;
}
.train-day.done .train-day-label { opacity: 0; }
.train-day.today {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.3), rgba(167, 139, 250, 0.2));
  border-color: rgba(167, 139, 250, 0.4);
  color: #e2e8f0;
}
.train-exercises {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.train-ex {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 5px;
  font-size: 0.6rem;
}
.train-check {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  flex-shrink: 0;
  position: relative;
}
.train-ex.done .train-check {
  background: #4ade80;
  border-color: #4ade80;
}
.train-ex.done .train-check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: white;
  font-weight: 700;
}
.train-ex.active .train-check {
  border-color: #a78bfa;
  animation: trainPulse 1.4s ease-in-out infinite;
}
@keyframes trainPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7); }
  50% { box-shadow: 0 0 0 4px rgba(167, 139, 250, 0); }
}
.train-ex-name {
  flex: 1;
  height: 4px;
  background: rgba(226, 232, 240, 0.4);
  border-radius: 2px;
  max-width: 70px;
}
.train-ex.done .train-ex-name { opacity: 0.45; }
.train-ex-meta {
  font-size: 0.55rem;
  color: rgba(148, 163, 184, 0.6);
  letter-spacing: 0.3px;
}

/* ─── Voice Bot Mockup ─── */
.voice-mockup {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 14px !important;
  text-align: center;
}
.voice-orb {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
}
.voice-orb-core {
  position: absolute;
  inset: 12px;
  background: radial-gradient(circle at 30% 30%, #c4b5fd, #818cf8 60%, #6366f1);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(167, 139, 250, 0.7);
  animation: orbPulse 1.6s ease-in-out infinite;
}
.voice-orb-ring,
.voice-orb-ring.delay {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(167, 139, 250, 0.4);
  border-radius: 50%;
  animation: orbRing 1.8s ease-out infinite;
}
.voice-orb-ring.delay {
  animation-delay: 0.9s;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@keyframes orbRing {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 30px;
  margin-bottom: 10px;
}
.voice-wave span {
  width: 3px;
  background: linear-gradient(180deg, #a78bfa, #818cf8);
  border-radius: 2px;
  animation: waveBar 1s ease-in-out infinite;
}
.voice-wave span:nth-child(1)  { animation-delay: 0.00s; height: 30%; }
.voice-wave span:nth-child(2)  { animation-delay: 0.05s; height: 60%; }
.voice-wave span:nth-child(3)  { animation-delay: 0.10s; height: 90%; }
.voice-wave span:nth-child(4)  { animation-delay: 0.15s; height: 50%; }
.voice-wave span:nth-child(5)  { animation-delay: 0.20s; height: 70%; }
.voice-wave span:nth-child(6)  { animation-delay: 0.25s; height: 40%; }
.voice-wave span:nth-child(7)  { animation-delay: 0.30s; height: 85%; }
.voice-wave span:nth-child(8)  { animation-delay: 0.35s; height: 55%; }
.voice-wave span:nth-child(9)  { animation-delay: 0.40s; height: 75%; }
.voice-wave span:nth-child(10) { animation-delay: 0.45s; height: 35%; }
.voice-wave span:nth-child(11) { animation-delay: 0.50s; height: 65%; }
.voice-wave span:nth-child(12) { animation-delay: 0.55s; height: 80%; }
.voice-wave span:nth-child(13) { animation-delay: 0.60s; height: 45%; }
.voice-wave span:nth-child(14) { animation-delay: 0.65s; height: 70%; }
.voice-wave span:nth-child(15) { animation-delay: 0.70s; height: 50%; }
@keyframes waveBar {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}
.voice-transcript {
  font-size: 0.78rem;
  color: #e2e8f0;
  font-style: italic;
  margin-bottom: 8px;
  min-height: 22px;
  padding: 0 8px;
}
.voice-status {
  font-size: 0.62rem;
  color: rgba(148, 163, 184, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ─── Workflow Mockup ─── */
.workflow-mockup .flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.flow-logo { background: linear-gradient(135deg, #22d3ee, #818cf8); }
.flow-status {
  font-size: 0.6rem;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.flow-chain {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.flow-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  font-size: 0.68rem;
  color: #e2e8f0;
  position: relative;
  opacity: 0.45;
  transition: opacity 0.4s, background 0.4s;
}
.flow-node-icon {
  font-size: 0.9rem;
}
.workflow-mockup.active .flow-node.active {
  opacity: 1;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 0 12px -2px rgba(167, 139, 250, 0.4);
}
.workflow-mockup.active .flow-node.done {
  opacity: 1;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.2);
}
.flow-line {
  position: relative;
  width: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  margin-left: 18px;
  border-radius: 2px;
  overflow: hidden;
}
.flow-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, #a78bfa, transparent);
  opacity: 0;
}
.workflow-mockup.active .flow-line.active .flow-pulse {
  opacity: 1;
  animation: flowDown 0.8s linear forwards;
}
@keyframes flowDown {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

/* ══════════════════════════════════════
   PROJECTS / WORK
   ══════════════════════════════════════ */
.work {
  position: relative;
  padding: 0 !important;
  /* Background fallback so no white flash during pin transitions */
  background: linear-gradient(180deg, #0c0a1d 0%, #0f0d24 50%, #0c0a1d 100%);
  /* NO overflow:hidden — breaks GSAP pin */
}

/* The pinned wrapper takes the smaller viewport height so iOS URL bar
   movements don't cause layout jumps during pin */
.work-pin {
  min-height: 100vh; /* fallback */
  min-height: 100svh; /* iOS: small viewport (no URL bar dance) */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 0;
  background: linear-gradient(180deg, #0c0a1d 0%, #0f0d24 50%, #0c0a1d 100%);
  position: relative;
  z-index: 2;
  overflow: hidden; /* clip scattered tiles from going outside */
}

.work .section-label {
  color: var(--accent-light);
}

.work .section-title {
  color: var(--text-light);
}

/* ── Work Section Header ── */
.work-pin {
  position: relative;
  width: 100%;
}

.work-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.work-header .section-label {
  display: inline-block;
}

.work-header .section-title {
  margin-top: 8px;
}

.work-sub {
  color: rgba(148, 163, 184, 0.85);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 16px;
}

/* ── Projects Stage (scroll-triggered grid) ── */
.projects-stage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1400px;
  transform-style: preserve-3d;
}

.project-tile {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background: #13102b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 40px -10px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity;
  transform-origin: center center;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  cursor: pointer;
}

.project-tile:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 25px 60px -10px rgba(99, 102, 241, 0.35),
    0 0 80px -20px rgba(167, 139, 250, 0.25);
}

.project-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-tile:hover img {
  transform: scale(1.06);
}

/* Overlay caption */
.project-tile-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 14px 12px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(12, 10, 29, 0.55) 25%,
    rgba(12, 10, 29, 0.95) 65%,
    rgba(12, 10, 29, 0.98) 100%
  );
  color: #fff;
  pointer-events: none;
  transition: padding-bottom 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.project-tile-type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  opacity: 0.9;
  margin-bottom: 4px;
}

.project-tile-name {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.25;
}

.project-tile-desc {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.62);
  line-height: 1.3;
  margin-top: 4px;
}

.project-tile-live {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 100px;
  background: rgba(12, 10, 29, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.project-tile:hover .project-tile-live {
  opacity: 1;
  transform: translateY(0);
}

.project-tile:hover .project-tile-overlay {
  padding-bottom: 18px;
}

/* CTA Tile (8th) */
.project-tile-cta {
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(167, 139, 250, 0.12)),
    #13102b;
  border: 1px dashed rgba(167, 139, 250, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* span full row so the grid stays balanced regardless of project count */
  grid-column: 1 / -1;
  aspect-ratio: auto;
  min-height: 130px;
}

.project-tile-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
}

.project-tile-cta-arrow {
  font-size: 2.4rem;
  line-height: 1;
  background: linear-gradient(135deg, #e2e8f0 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transform: rotate(-45deg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
}

.project-tile-cta:hover .project-tile-cta-arrow {
  transform: rotate(0deg) translateX(6px);
}

.project-tile-cta-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
}

.project-tile-cta-sub {
  font-size: 0.8rem;
  color: rgba(167, 139, 250, 0.85);
  font-weight: 500;
}

/* ══════════════════════════════════════
   WHY ME
   ══════════════════════════════════════ */
.why {
  background: linear-gradient(180deg, #0c0a1d 0%, #110e28 50%, #0c0a1d 100%);
  position: relative;
}

.why .section-label {
  color: var(--accent-light);
}

.why .section-title {
  color: var(--text-light);
}

/* Stats Bar */
.why-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 48px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.why-stat {
  padding: 32px 24px;
  text-align: center;
  position: relative;
}

.why-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.why-stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e2e8f0 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  line-height: 1.2;
}

.why-stat-label {
  font-size: 0.85rem;
  color: var(--text-light-muted);
  font-weight: 500;
}

/* ── Process Timeline ── */
.process-timeline {
  margin-top: 60px;
  position: relative;
}

.process-section-title {
  text-align: center;
  margin-bottom: 50px;
}
.process-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
}

.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr; /* equal-height rows */
  gap: 28px;
  position: relative;
  align-items: stretch;
}

/* Connecting line behind the markers */
.process-line {
  position: absolute;
  top: 36px; /* center of 72px marker */
  left: calc(12.5% + 36px);
  right: calc(12.5% + 36px);
  height: 3px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 2px;
  z-index: 0;
  overflow: hidden;
}
.process-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #818cf8, #a78bfa, #818cf8);
  background-size: 200% 100%;
  border-radius: inherit;
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.55);
  animation: lineShimmer 3s linear infinite;
}
@keyframes lineShimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-marker {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-dark, #0c0a1d);
  border: 2px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 0 6px rgba(12, 10, 29, 1), 0 0 25px rgba(99, 102, 241, 0.15);
}

.step-marker::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(167, 139, 250, 0.2));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.step-num {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #e2e8f0 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.process-step:hover .step-marker {
  border-color: rgba(167, 139, 250, 0.7);
  transform: scale(1.08);
  box-shadow:
    0 0 0 6px rgba(12, 10, 29, 1),
    0 0 35px rgba(167, 139, 250, 0.5);
}
.process-step:hover .step-marker::before { opacity: 1; }

.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 22px 20px 24px;
  width: 100%;
  flex: 1; /* fill remaining height of .process-step (equal cards) */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-step:hover .step-card {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -12px rgba(99, 102, 241, 0.25);
}

.step-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 20px;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #e2e8f0 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step-card p {
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ══════════════════════════════════════
   CONTACT
   ══════════════════════════════════════ */
.contact {
  background: linear-gradient(160deg, var(--bg-dark) 0%, var(--bg-dark-2) 50%, #1a0f3c 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

#contact-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.contact .container {
  position: relative;
  z-index: 2;
}

.contact .section-label {
  color: var(--accent-light);
}

.contact .section-label::before {
  background: var(--accent-light);
}

.contact .section-title {
  color: var(--text-light);
}

.contact-sub {
  color: var(--text-light-muted);
  font-size: 1.1rem;
  margin-top: -40px;
  margin-bottom: 40px;
  font-weight: 500;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 44px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
  margin-bottom: 24px;
}

.contact-cta:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.contact-cta svg {
  width: 18px;
  height: 18px;
}

/* Helper text above the form: clarifies what kind of requests are welcome */
.form-scope {
  max-width: 520px;
  margin: 0 auto 24px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(200, 197, 226, 0.65);
  padding: 14px 18px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 12px;
}

.contact-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Topic dropdown — styled to match other form inputs */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818cf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-select option {
  background: #110e25;
  color: var(--text-light);
}


.form-row {
  display: flex;
  gap: 16px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 12px;
  color: var(--text-light);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-light-muted);
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .contact-cta {
  align-self: center;
  margin-top: 8px;
}

.contact-or {
  color: var(--text-light-muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
  margin-top: 8px;
}

.contact-email {
  color: var(--accent-light);
  font-size: 1.1rem;
  font-weight: 700;
  transition: color var(--transition);
}

.contact-whatsapp {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 26px;
  border-radius: 12px;
  background: #25D366;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 28px -10px rgba(37, 211, 102, 0.6);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-whatsapp svg {
  width: 22px;
  height: 22px;
}

.contact-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -10px rgba(37, 211, 102, 0.7);
}

/* ══════════════════════════════════════
   LEGAL PAGES (Impressum, Datenschutz)
   ══════════════════════════════════════ */
.legal-page {
  padding-top: 100px;
  padding-bottom: 80px;
  background: var(--bg-white);
  min-height: 80vh;
}

.legal-page h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--text-dark);
  margin-bottom: 8px;
}

.legal-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 48px;
  font-weight: 500;
}

.legal-content h2 {
  font-size: 1.2rem;
  color: var(--text-dark);
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.legal-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-content ul {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 12px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content a:hover {
  color: var(--accent-dark);
}

.contact-email:hover {
  color: #fff;
}

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.footer {
  background: var(--bg-dark);
  padding: 32px 0;
  border-top: 1px solid rgba(99, 102, 241, 0.08);
}

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

.footer-brand {
  font-weight: 700;
  color: var(--text-light-muted);
  font-size: 0.9rem;
}

.footer-brand .accent {
  color: var(--accent-light);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-light-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color var(--transition);
}

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

.footer-copy {
  color: var(--text-light-muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  /* Mobile: disable horizontal pin, stack vertically */
  .services-pin {
    min-height: auto;
    padding: 24px 0 20px; /* tight — header should sit close to cards */
    display: block;
    background: transparent;
  }
  .services-header {
    margin-bottom: 8px; /* small gap to cards */
  }
  .services-track-wrap { overflow: visible; }

  /* Mobile: pin works, but use small viewport height (no URL-bar jump) */
  .work-pin {
    min-height: 100vh;
    min-height: 100svh; /* iOS: stable height during URL bar movement */
    padding: 30px 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  .work-header {
    margin-bottom: 24px;
  }

  /* Mobile: horizontal swipe gallery with scroll-snap */
  .services-track {
    display: flex;
    flex-direction: row;
    grid-template-columns: none;
    grid-auto-rows: auto;
    gap: 12px;
    padding: 12px 7vw 8px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    transform: none !important;
    align-items: stretch;
  }
  .services-track::-webkit-scrollbar { display: none; }

  .bento-card {
    flex: 0 0 86vw;
    max-width: 420px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    padding: 0;
    display: flex;
    align-items: stretch;
    opacity: 1 !important;
    transform: none !important;
  }

  .bento-card-shell {
    width: 100%;
    height: 500px;
    margin: 0;
  }

  .bento-content {
    padding: 14px 18px 16px;
  }

  .bento-content h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  .bento-content p {
    font-size: 0.82rem;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  .bento-header {
    margin-bottom: 8px;
  }

  .bento-badge {
    padding: 4px 10px;
    font-size: 0.66rem;
  }

  .bento-price {
    padding: 4px 10px;
    font-size: 0.72rem;
  }

  .service-tag {
    padding: 3px 9px;
    font-size: 0.68rem;
  }

  .service-tags {
    gap: 5px;
  }

  /* Smaller dots margin */
  .services-dots {
    margin-top: 12px;
  }

  /* Dot indicators below the gallery */
  .services-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0 20px;
  }
  .services-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.25);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    padding: 0;
  }
  .services-dot.active {
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    width: 26px;
    border-radius: 4px;
    box-shadow: 0 0 12px -2px rgba(167, 139, 250, 0.6);
  }

  /* Swipe hint (only visible briefly on first view) */
  .services-swipe-hint {
    text-align: center;
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.75rem;
    margin-top: 10px;
    letter-spacing: 0.05em;
  }

  .bento-visual {
    height: 250px;
    min-height: 250px;
    padding: 14px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    align-items: stretch;
  }
  .app-rotator,
  .ai-rotator {
    height: 100%;
    min-height: 220px;
  }
  .browser-mockup,
  .dashboard-mockup,
  .chat-mockup,
  .app-rotator > .app-mockup,
  .ai-rotator > .ai-mockup {
    max-width: 260px;
  }

  /* Mobile chat: shrink message area so full convo fits inside visual */
  .chat-messages {
    height: 105px;
    padding: 10px;
    gap: 6px;
  }
  .chat-msg {
    font-size: 0.7rem;
    padding: 6px 10px;
  }
  .chat-header {
    padding: 8px 12px;
  }
  .chat-name { font-size: 0.7rem; }
  .chat-status { font-size: 0.58rem; }

  /* Mobile dashboard: tighten chart so bars fit */
  .dash-chart { height: 48px; }
  .dash-stat { padding: 8px; }
  .dash-stat-value { font-size: 1rem; }
  .dash-stat-label { font-size: 0.55rem; }

  /* Mobile workflow: tighter spacing */
  .flow-node {
    padding: 5px 8px;
    font-size: 0.62rem;
  }
  .flow-node-icon { font-size: 0.78rem; }
  .flow-line { height: 6px; }
  .flow-chain { gap: 3px; }

  .bento-content {
    padding: 32px 28px 36px;
  }

  .browser-mockup,
  .dashboard-mockup,
  .chat-mockup,
  .app-rotator > .app-mockup,
  .ai-rotator > .ai-mockup {
    max-width: 360px;
  }

  .projects-stage {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
  }

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

  .why-stat:nth-child(2)::after {
    display: none;
  }

  .why-stat:nth-child(1),
  .why-stat:nth-child(2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

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

  /* Tablet: timeline becomes 2x2 */
  .process-track {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .process-line { display: none; } /* line doesn't make sense in 2x2 */
}

@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }

  .form-row {
    flex-direction: column;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-dark-2);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right var(--transition);
    border-left: 1px solid rgba(99, 102, 241, 0.1);
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-right {
    position: fixed;
    top: 20px;
    right: 60px;
    z-index: 1001;
  }

  .navbar.scrolled .nav-right {
    top: 12px;
  }

  .blog-nav-btn span {
    display: none;
  }
  .blog-nav-btn {
    padding: 6px 8px;
    gap: 0;
  }
  .blog-nav-btn::before {
    content: "Blog";
    font-size: 0.7rem;
  }

  .hero-content {
    padding: 100px 20px 60px;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .why-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  /* Mobile timeline: vertical with line on the left */
  .process-timeline {
    margin-top: 40px;
  }
  .process-track {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-left: 14px;
  }
  .process-line {
    display: block;
    top: 24px;
    bottom: 24px;
    left: 50px;
    right: auto;
    width: 3px;
    height: auto;
  }
  .process-line-fill {
    height: 0%;
    width: 100%;
  }
  .process-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
  }
  .step-marker {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    margin-bottom: 0;
    box-shadow: 0 0 0 6px var(--bg-dark, #0c0a1d), 0 0 20px rgba(99, 102, 241, 0.15);
  }
  .step-num { font-size: 1.15rem; }
  .step-card {
    flex: 1;
    padding: 16px 18px 18px;
  }
  .step-card h3 { font-size: 1.05rem; }
  .step-card p { font-size: 0.85rem; }
  .process-section-title { margin-bottom: 28px; }

  .footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .projects-stage {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    max-width: 560px;
  }

  .project-tile-name {
    font-size: 0.88rem;
  }

  .project-tile-type {
    font-size: 0.6rem;
  }

  .work-header {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .lang-switcher {
    gap: 1px;
  }

  .lang-btn {
    padding: 3px 7px;
    font-size: 0.7rem;
  }
}

/* ── Mobile Performance ── */
@media (max-width: 768px) {
  /* Remove expensive backdrop-filter on mobile */
  .navbar.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(12, 10, 29, 0.95);
  }

  .bento-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.05);
  }

  /* Reduce continuous animations */
  .logo-icon {
    animation: none !important;
  }

  /* Simplify box-shadows on hover */
  .project-card:hover,
  .why-card:hover,
  .feature-card:hover {
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4) !important;
  }

  /* Reduce drop-shadow filters */
  .hero-robot-walker {
    filter: none;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════
   Chatbot Widget
   ══════════════════════════════════════ */
.chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.chat-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-height: 560px;
  background: #13112a;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-widget.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(129, 140, 248, 0.08));
  border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.chat-avatar img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.chat-header-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e0ff;
}
.chat-header-status {
  font-size: 0.7rem;
  color: #34d399;
}
.chat-close {
  background: none;
  border: none;
  color: rgba(226, 224, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}
.chat-close:hover { color: #e2e0ff; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 380px;
}

.chat-msg {
  display: flex;
}
.chat-msg.bot { justify-content: flex-start; }
.chat-msg.user { justify-content: flex-end; }

.chat-bubble {
  max-width: 85%;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg.bot .chat-bubble {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e0ff;
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing dots */
.chat-msg.typing .chat-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 14px 20px;
}
.chat-msg.typing .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.6);
  animation: typingDot 1.4s ease-in-out infinite;
}
.chat-msg.typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(99, 102, 241, 0.12);
  background: rgba(0, 0, 0, 0.2);
}
.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  color: #e2e0ff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input::placeholder { color: rgba(226, 224, 255, 0.3); }
.chat-input:focus { border-color: rgba(99, 102, 241, 0.4); }

.chat-send {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* FAB */
.chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
  animation: fabPulse 3s ease-in-out infinite;
}
.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
}
.chat-fab.hidden {
  opacity: 0;
  pointer-events: none;
}
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4), 0 0 0 8px rgba(99, 102, 241, 0.1); }
}

/* Scrollbar */
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.3); border-radius: 4px; }

@media (max-width: 480px) {
  .chat-widget {
    bottom: 0;
    right: 0;
    width: 100%;
    max-height: 100%;
    border-radius: 20px 20px 0 0;
  }
  .chat-fab {
    bottom: 16px;
    right: 16px;
  }
}

/* ─── AI PULSE Podcast Player ──────────────────────────── */

/* FAB */
.pod-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  cursor: pointer;
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: podPulse 3s ease-in-out infinite;
}
.pod-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
}
.pod-fab.hidden { display: none; }
.pod-fab svg { flex-shrink: 0; }

.pod-fab-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #13112a;
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  pointer-events: none;
}

@keyframes podPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(99, 102, 241, 0.6), 0 0 60px rgba(99, 102, 241, 0.15); }
}

/* Overlay */
.pod-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.pod-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Widget */
.pod-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 380px;
  max-height: 560px;
  background: #13112a;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pod-widget.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Header */
.pod-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}
.pod-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pod-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pod-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pod-brand {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e0ff;
  letter-spacing: 1px;
}
.pod-tagline {
  font-size: 0.7rem;
  color: rgba(200, 197, 226, 0.5);
}
.pod-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pod-lang-toggle {
  display: flex;
  gap: 2px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 8px;
  padding: 2px;
}
.pod-lang {
  border: none;
  background: transparent;
  color: rgba(200, 197, 226, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.pod-lang.active {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.pod-close {
  border: none;
  background: transparent;
  color: rgba(200, 197, 226, 0.5);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}
.pod-close:hover { color: #e2e0ff; }

/* Player */
.pod-player {
  padding: 16px;
}
.pod-now { margin-bottom: 12px; }
.pod-now-date {
  font-size: 0.72rem;
  color: #818cf8;
  font-weight: 600;
  margin-bottom: 2px;
}
.pod-now-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e0ff;
  line-height: 1.4;
}

/* Waveform animation */
.pod-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 32px;
  margin-bottom: 12px;
}
.pod-wave span {
  width: 3px;
  height: 8px;
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
  transition: background 0.3s;
}
.pod-wave.playing span {
  background: #818cf8;
  animation: podWave 1.2s ease-in-out infinite;
}
.pod-wave.playing span:nth-child(1) { animation-delay: 0s; }
.pod-wave.playing span:nth-child(2) { animation-delay: 0.1s; }
.pod-wave.playing span:nth-child(3) { animation-delay: 0.2s; }
.pod-wave.playing span:nth-child(4) { animation-delay: 0.3s; }
.pod-wave.playing span:nth-child(5) { animation-delay: 0.4s; }
.pod-wave.playing span:nth-child(6) { animation-delay: 0.3s; }
.pod-wave.playing span:nth-child(7) { animation-delay: 0.2s; }
.pod-wave.playing span:nth-child(8) { animation-delay: 0.1s; }
.pod-wave.playing span:nth-child(9) { animation-delay: 0s; }

@keyframes podWave {
  0%, 100% { height: 8px; }
  50% { height: 24px; }
}

/* Controls */
.pod-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.pod-play {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pod-play:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}
.pod-play svg { margin-left: 2px; }
.pod-skip {
  border: none;
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
  cursor: pointer;
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  transition: background 0.2s;
}
.pod-skip:hover { background: rgba(99, 102, 241, 0.2); }
.pod-speed {
  border: none;
  background: rgba(99, 102, 241, 0.08);
  color: rgba(200, 197, 226, 0.6);
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.pod-speed:hover { background: rgba(99, 102, 241, 0.15); color: #818cf8; }

/* Progress bar */
.pod-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pod-time {
  font-size: 0.68rem;
  color: rgba(200, 197, 226, 0.4);
  font-weight: 600;
  min-width: 32px;
  font-variant-numeric: tabular-nums;
}
.pod-time-dur { text-align: right; }
.pod-progress {
  flex: 1;
  height: 4px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}
.pod-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 4px;
  width: 0%;
  transition: width 0.1s linear;
}
.pod-progress-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  background: #818cf8;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
  opacity: 0;
  transition: opacity 0.2s;
}
.pod-progress:hover .pod-progress-knob { opacity: 1; }

/* Divider */
.pod-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
  margin: 0 16px;
}

/* Episode list */
.pod-list-header {
  padding: 12px 16px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(200, 197, 226, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pod-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
  max-height: 180px;
}
.pod-list::-webkit-scrollbar { width: 3px; }
.pod-list::-webkit-scrollbar-track { background: transparent; }
.pod-list::-webkit-scrollbar-thumb { background: rgba(99, 102, 241, 0.2); border-radius: 3px; }

.pod-ep {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.pod-ep:hover { background: rgba(99, 102, 241, 0.08); }
.pod-ep.active { background: rgba(99, 102, 241, 0.12); }
.pod-ep-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  flex-shrink: 0;
}
.pod-ep.active .pod-ep-play {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}
.pod-ep-info { flex: 1; min-width: 0; }
.pod-ep-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pod-ep-meta {
  font-size: 0.7rem;
  color: rgba(200, 197, 226, 0.4);
  margin-top: 2px;
}

/* All episodes link */
.pod-all-link {
  display: block;
  text-align: center;
  padding: 10px 16px 14px;
  font-size: 0.78rem;
  color: #818cf8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.pod-all-link:hover { color: #e2e0ff; }

/* Responsive */
@media (max-width: 480px) {
  .pod-widget {
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
  }
  .pod-fab {
    bottom: 16px;
    left: 16px;
  }
  .pod-fab-badge { display: none; }
}

/* ── 3D Logo Container ── */
.hero-logo-3d {
  width: 120px;
  height: 84px;
  display: inline-block;
  vertical-align: middle;
  cursor: grab;
}
.hero-logo-3d:active { cursor: grabbing; }
.hero-logo-3d canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
