/*
  Kühnetix – Celonis-inspired visual system
  - Clean, high-contrast typography
  - Neutral surfaces + subtle borders
  - Dark/ink hero with gradient glow
  - Crisp cards, generous spacing, soft motion
*/

/* ========================
   Design Tokens
   ======================== */
:root {
  /* Neutrals - Dark Theme */
  --bg: #0a0d17;
  --bg-muted: #0b0f1a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-solid: #0f1320;
  --ink: #ffffff;
  --ink-2: #f0f2f8;
  --text: rgba(255, 255, 255, 0.85);
  --text-2: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.12);

  /* Accent (kept brand-neutral; adjust if you have Kühnetix brand colors) */
  --accent: #6d5efc;          /* violet */
  --accent-2: #28b0ff;        /* cyan */
  --accent-ink: #0b0f1a;

  /* Shadows */
  --shadow-sm: 0 8px 24px rgba(11, 15, 26, 0.08);
  --shadow-md: 0 18px 40px rgba(11, 15, 26, 0.12);

  /* Radius */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;

  /* Layout */
  --container: 1240px;
}

/* ========================
   Reset & Base
   ======================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(180deg, #070912 0%, #0a0d17 50%, #0b0f1a 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Accessibility: visible focus */
:focus-visible {
  outline: 3px solid rgba(40, 176, 255, 0.5);
  outline-offset: 3px;
}

/* ========================
   Parallax Background
   ======================== */
.parallax-background {
  position: fixed;
  top: -60%; /* Negativer Offset verhindert schwarzen Balken oben */
  left: 0;
  width: 100%;
  height: 300vh; /* Ausreichend groß für 50% Parallax-Speed */
  z-index: -1;
  overflow: hidden;
  transform: translateZ(0); /* GPU-Beschleunigung */
  will-change: transform;
  
  /* Durchgehender Gradient über alle Sektionen */
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(109, 94, 252, 0.45), transparent 50%),
    radial-gradient(900px 520px at 85% 30%, rgba(40, 176, 255, 0.35), transparent 50%),
    radial-gradient(1100px 550px at 50% 60%, rgba(109, 94, 252, 0.25), transparent 50%),
    radial-gradient(1000px 500px at 20% 80%, rgba(40, 176, 255, 0.30), transparent 50%),
    linear-gradient(180deg, #070912 0%, #0a0d17 33%, #0b0f1a 66%, #0a0d17 100%);
}

/* Folienhintergrund Textur */
.parallax-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Nimmt volle Höhe des Parents (300vh) */
  background:
    url('../images/Folienhintergrund.png') center/cover no-repeat;
  background-size: cover;
  background-position: center center;
  background-repeat: repeat; /* Wiederholt das Bild vertikal */
  opacity: 0.18; /* Stärker sichtbar */
  filter: saturate(0.9) contrast(1.05);
  pointer-events: none;
}

/* Grain Pattern für Textur */
.parallax-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
  background-size: 42px 42px;
  opacity: 0.06;
  pointer-events: none;
}

/* Content Wrapper */
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1),
              transform 0.8s cubic-bezier(.2,.8,.2,1);
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Section Animations */
.section-animated {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(.2,.8,.2,1),
              transform 1s cubic-bezier(.2,.8,.2,1);
}

.section-animated.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile: Deaktiviere Parallax auf kleinen Bildschirmen */
@media (max-width: 768px) {
  .parallax-background {
    position: absolute;
    top: 0;
    height: 100%;
    min-height: 100vh;
  }
}

/* ========================
   Navigation
   ======================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 8px 0;
  background: rgba(7, 9, 18, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(109, 94, 252, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  transition: all 300ms cubic-bezier(.2,.8,.2,1);
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    rgba(109, 94, 252, 0.03) 0%, 
    rgba(40, 176, 255, 0.03) 50%, 
    rgba(109, 94, 252, 0.03) 100%);
  pointer-events: none;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  position: relative;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 300ms ease;
}

.logo h1:hover {
  transform: scale(1.02);
}

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

.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: 999px;
  transition: all 250ms cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(109, 94, 252, 0.08) 0%, 
    rgba(40, 176, 255, 0.08) 100%);
  opacity: 0;
  transition: opacity 250ms ease;
  border-radius: 999px;
}

.nav-links a:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 94, 252, 0.35);
}

.nav-links a:hover::before {
  opacity: 1;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  gap: 6px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  transition: transform 180ms ease, opacity 180ms ease;
}

/* ========================
   Hero
   ======================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  display: flex;
  align-items: center;
  color: #fff;
  background: transparent; /* Background jetzt im Parallax-Container */
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
  padding: 40px 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 3.2vw + 1.2rem, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
  margin-bottom: 18px;
}

.hero p {
  font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.3rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 60ch;
  margin-bottom: 28px;
}

/* Keep your existing fade-in animation but make it slightly smoother */
.fade-in { animation: fadeInUp 700ms cubic-bezier(.2,.8,.2,1) forwards; opacity: 0; }
.fade-in:nth-child(1) { animation-delay: 140ms; }
.fade-in:nth-child(2) { animation-delay: 280ms; }
.fade-in:nth-child(3) { animation-delay: 420ms; }

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

/* ========================
   Buttons
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(109, 94, 252, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(109, 94, 252, 0.22);
}

/* ========================
   Section Defaults
   ======================== */
section { padding: 92px 0; }

.services h2,
.about h2,
.contact h2 {
  font-size: clamp(1.8rem, 1.4vw + 1.4rem, 2.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 42px;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.services h2,
.about h2 {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact h2 {
  color: #fff;
}

/* ========================
   Services
   ======================== */
.services { 
  position: relative;
  overflow: hidden;
  background: transparent; /* Background jetzt im Parallax-Container */
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(109, 94, 252, 0.25);
  border-radius: var(--r-lg);
  padding: 26px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 300ms cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(109, 94, 252, 0.03) 0%, 
    rgba(40, 176, 255, 0.03) 100%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 48px rgba(109, 94, 252, 0.35);
  border-color: rgba(109, 94, 252, 0.55);
}

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

.service-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.18), rgba(40, 176, 255, 0.16));
  border: 1px solid rgba(109, 94, 252, 0.20);
  margin-bottom: 16px;
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(109, 94, 252, 0.15);
  transition: all 300ms cubic-bezier(.2,.8,.2,1);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 28px rgba(109, 94, 252, 0.25);
}

.service-icon i { 
  font-size: 1.35rem;
  transition: transform 300ms cubic-bezier(.2,.8,.2,1);
}

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

.service-card h3 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 8px;
  font-weight: 760;
}

.service-card p {
  color: var(--text-2);
  line-height: 1.7;
}

/* ========================
   About
   ======================== */
.about {
  position: relative;
  overflow: hidden;
  background: transparent; /* Background jetzt im Parallax-Container */
}

.about-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.about-text p {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.80);
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-image {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--r-lg);
  border: 1px solid rgba(109, 94, 252, 0.30);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 400ms cubic-bezier(.2,.8,.2,1);
}

.about-image::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, 
    rgba(109, 94, 252, 0.4) 0%, 
    rgba(40, 176, 255, 0.4) 100%);
  border-radius: var(--r-lg);
  opacity: 0;
  z-index: -1;
  filter: blur(20px);
  transition: opacity 400ms ease;
}

.about-image:hover {
  transform: scale(1.02);
  box-shadow: 0 28px 65px rgba(109, 94, 252, 0.45);
}

.about-image:hover::before {
  opacity: 1;
}

.about-image img {
  width: 100%;
  border-radius: calc(var(--r-lg) - 8px);
  transition: transform 400ms cubic-bezier(.2,.8,.2,1);
}

.about-image:hover img {
  transform: scale(1.02);
}

/* ========================
   Contact
   ======================== */
.contact {
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.85);
  background: transparent; /* Background jetzt im Parallax-Container */
}

.contact h2 { color: #fff; }

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.contact-form,
.contact-info {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.contact-info h3,
.contact-form h3 {
  color: #fff;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 650;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(40, 176, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(40, 176, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.form-group.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-group.checkbox input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.form-group.checkbox label {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.45;
}

.form-group.checkbox label a {
  color: rgba(40, 176, 255, 0.95);
  text-decoration: none;
  font-weight: 700;
}

.form-group.checkbox label a:hover { text-decoration: underline; }

.contact-form .btn {
  width: 100%;
  margin-top: 6px;
}

.form-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(39, 174, 96, 0.18);
  border: 1px solid rgba(39, 174, 96, 0.35);
  color: rgba(255, 255, 255, 0.92);
}

.form-message.error {
  display: block;
  background: rgba(231, 76, 60, 0.18);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: rgba(255, 255, 255, 0.92);
}

.contact-info h3 {
  font-size: 1.25rem;
  margin-bottom: 18px;
}

.info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.info-item i {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
}

.info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.01em;
}

.info-item p { color: rgba(255, 255, 255, 0.75); }

.info-item a {
  color: rgba(40, 176, 255, 0.95);
  text-decoration: none;
  font-weight: 650;
}

.info-item a:hover { text-decoration: underline; }

/* ========================
   Footer
   ======================== */
.footer {
  background: #070912;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.75);
  padding: 26px 0;
}

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

.footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 650;
}

.footer a:hover { text-decoration: underline; }

.footer .links { display: inline-flex; gap: 12px; align-items: center; }

/* ========================
   Cookie Banner
   ======================== */
.cookie-consent {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 9, 18, 0.88);
  color: rgba(255, 255, 255, 0.86);
  padding: 14px;
  z-index: 9999;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cookie-consent__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.cookie-consent a {
  color: rgba(40, 176, 255, 0.95);
  text-decoration: none;
  font-weight: 700;
}

.cookie-consent a:hover { text-decoration: underline; }

.cookie-consent__actions button {
  margin-left: 0;
  padding: 10px 14px;
}

@media (max-width: 600px) {
  .cookie-consent__inner { flex-direction: column; text-align: center; }
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 900px) {
  .hero { min-height: 620px; }
  .hero-content { max-width: 720px; }
  .about-content { grid-template-columns: 1fr; }
}

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

  .menu-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px;
    background: rgba(7, 9, 18, 0.95);
    border: 1px solid rgba(109, 94, 252, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active { display: flex; }

  .nav-links a {
    padding: 12px 12px;
    border-radius: 12px;
  }

  .hero-content { text-align: left; padding: 22px 0; }

  .contact-content { grid-template-columns: 1fr; }

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

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .btn { width: 100%; }
}
