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

/* ── 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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--primary);
  background: var(--bg-white);
  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;
}

.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-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Mouse-tracking spotlight glow */
.service-card::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.12),
    transparent 40%
  );
  border-radius: inherit;
  pointer-events: none;
  transition: --glow-size 0.3s ease;
}

/* Gradient top border */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #a78bfa, var(--accent-light));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.15),
    0 20px 50px -12px rgba(99, 102, 241, 0.25),
    0 0 80px -20px rgba(99, 102, 241, 0.12);
}

.service-card:hover::before {
  --glow-size: 250px;
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
  transform: scale(1.08);
  border-color: rgba(99, 102, 241, 0.3);
}

.service-icon svg {
  width: 28px;
  height: 28px;
  transition: transform 0.4s ease;
}

.service-card:hover .service-icon svg {
  transform: scale(1.1);
}

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

.service-card p {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
  transition: color 0.4s ease;
}

.service-card:hover p {
  color: rgba(226, 232, 240, 0.7);
}

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

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

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

/* ══════════════════════════════════════
   PROJECTS / WORK
   ══════════════════════════════════════ */
.work {
  background: linear-gradient(180deg, #0c0a1d 0%, #0f0d24 50%, #0c0a1d 100%);
  position: relative;
}

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

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

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.project-featured {
  grid-column: 1 / -1;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.1),
    0 20px 50px -12px rgba(99, 102, 241, 0.2),
    0 0 60px -20px rgba(99, 102, 241, 0.1);
}

.project-preview {
  height: 240px;
  position: relative;
  overflow: hidden;
}

.project-featured .project-preview {
  height: 320px;
}

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

.project-card:hover .project-screenshot {
  transform: scale(1.03);
}

.project-info {
  padding: 24px 28px 28px;
}

.project-type {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 8px;
}

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

.project-info p {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
}

.project-link-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}

.project-card:hover .project-link-hint {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════
   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;
}

/* Cards Grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.why-card {
  text-align: center;
  padding: 40px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow:
    0 20px 50px -12px rgba(99, 102, 241, 0.2),
    0 0 60px -20px rgba(99, 102, 241, 0.1);
}

.why-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
  transition: all 0.4s ease;
}

.why-card:hover .why-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
  transform: scale(1.08);
}

.why-icon svg {
  width: 26px;
  height: 26px;
}

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

.why-card p {
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════
   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;
}

.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;
}

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

.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);
}

/* ══════════════════════════════════════
   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) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

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

  .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);
  }
}

@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;
  }

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

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

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

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

  .project-preview {
    height: 180px;
  }
}

@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);
  }

  .service-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;
  }
}
