/* ==========================================================================
   ddIT - Modern Redesign Design System & Styles
   ========================================================================== */

/* 1. Design Tokens & Root Variables */
:root {
  /* Colors */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-glass: rgba(17, 24, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --color-accent: #3b82f6; /* Trust Blue */
  --color-accent-hover: #2563eb;
  --color-accent-glow: rgba(59, 130, 246, 0.15);
  
  --color-success: #10b981;
  --color-error: #ef4444;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 20px 0 rgba(59, 130, 246, 0.3);
}

/* 2. Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

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

/* 3. Utility Classes */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.section-bg-alt {
  background-color: var(--bg-secondary);
}

.section-title-wrapper {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.section-subtitle {
  color: var(--color-accent);
  text-transform: uppercase;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

/* 4. Layout Components */

/* Navigation Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-normal);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 40px;
  width: auto;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 40%, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

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

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-normal);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  z-index: 10;
}

.hero-tagline {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tagline::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-accent);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #9cbdff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 580px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-shape-wrapper {
  position: relative;
  width: 350px;
  height: 350px;
}

.hero-shape-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-accent), #1d4ed8);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  filter: blur(40px);
  opacity: 0.25;
  animation: morphing 15s ease-in-out infinite alternate;
}

.hero-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.hero-card-logo {
  height: 70px;
  width: auto;
  margin: 0 auto 1.5rem auto;
  filter: drop-shadow(0 0 8px var(--color-accent-glow));
}

.hero-card-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.hero-card-subtitle {
  font-size: 0.9rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}

/* Feature Bar */
.feature-bar {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(17, 24, 39, 0.4);
  padding: 2rem 0;
}

.feature-bar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.feature-bar-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.feature-bar-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Services (Leistungen) */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  padding: 3rem 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-lg), 0 10px 30px rgba(59, 130, 246, 0.05);
}

.service-icon {
  width: 54px;
  height: 54px;
  background-color: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(59, 130, 246, 0.15);
  transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
  background-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

.service-card h3 {
  margin-bottom: 1rem;
}

.service-card p {
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.service-card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.service-card-link span {
  transition: transform var(--transition-fast);
}

.service-card:hover .service-card-link span {
  transform: translateX(4px);
}

/* About (Über uns) Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-content h3 {
  margin-bottom: 1.5rem;
}

.about-list {
  list-style: none;
  margin-top: 2rem;
}

.about-list-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.about-list-icon {
  color: var(--color-success);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.about-list-text h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.about-list-text p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.about-info-box {
  padding: 2.5rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 0.5) 100%);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.about-info-box::before {
  content: '"';
  position: absolute;
  font-size: 12rem;
  color: rgba(255, 255, 255, 0.03);
  top: -2rem;
  left: 1rem;
  font-family: Georgia, serif;
  line-height: 1;
}

.about-quote {
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
}

.about-author {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}

.about-author-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Contact (Kontakt) Section */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1.25rem;
}

.contact-info-icon {
  width: 46px;
  height: 46px;
  background-color: rgba(59, 130, 246, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.contact-info-text h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
}

.contact-info-text p, .contact-info-text a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0;
}

.contact-info-text a:hover {
  color: var(--color-accent);
}

.contact-card {
  padding: 3rem;
  border-radius: 20px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background-color: var(--bg-secondary);
}

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

.form-submit-btn {
  width: 100%;
  padding: 0.9rem;
}

/* Form Success & Error Messages */
.form-status {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-status.success {
  display: block;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--color-success);
}

.form-status.error {
  display: block;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--color-error);
}

/* Footer */
.footer {
  background-color: #070a10;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  color: var(--text-secondary);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-img {
  height: 32px;
  width: auto;
}

.footer-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  font-size: 0.9rem;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Legal Pages (Impressum & Datenschutz) */
.legal-container {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 6rem;
  max-width: 800px;
}

.legal-title {
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content p, .legal-content ul {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* Animations */
@keyframes morphing {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  
  .hero-title { font-size: 3rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-btns {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }
  
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
  
  .mobile-nav-toggle {
    display: block;
    z-index: 1001;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 6rem 2rem 2rem 2rem;
    transition: right var(--transition-normal);
    z-index: 1000;
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .nav-link {
    font-size: 1.1rem;
    display: block;
  }
  
  /* Hamburger menu transforms to X when open */
  .mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .feature-bar-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .footer-top {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ==========================================================================
   New Features: Scroll Reveal & Scroll to Top
   ========================================================================== */

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 99;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}
