/* ===== Base Styles ===== */
html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', 'Arial', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Catamaran', 'Arial', sans-serif;
}

/* ===== Selection ===== */
::selection {
  background-color: rgba(1,105,132,0.2);
  color: #016984;
}

.dark ::selection {
  background-color: rgba(125,180,193,0.3);
  color: #7DB4C1;
}

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid #016984;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Navigation ===== */
.nav-link {
  position: relative;
  color: rgba(55,65,81,0.8);
  transition: color 0.2s ease;
}

.dark .nav-link { color: rgba(209,213,219,0.8); }

.nav-link:hover { color: #016984; }
.dark .nav-link:hover { color: #7DB4C1; }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #016984;
  transition: width 0.3s ease;
}

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

.nav-link-active {
  color: #016984 !important;
  font-weight: 600;
}

.dark .nav-link-active { color: #7DB4C1 !important; }

/* ===== Header States ===== */
#header {
  background-color: transparent;
  transition: all 0.3s ease;
}

#header.scrolled,
#header.menu-open {
  background-color: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229,231,235,0.5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dark #header.scrolled,
.dark #header.menu-open {
  background-color: rgba(3,7,18,0.9);
  border-bottom-color: rgba(55,65,71,0.3);
}

/* Nav links: hell auf transparentem Header über dunklem Hero (nur index.html) */
#header.hero-dark:not(.scrolled):not(.menu-open) .nav-link {
  color: rgba(255,255,255,0.85) !important;
}
#header.hero-dark:not(.scrolled):not(.menu-open) .nav-link:hover {
  color: #ffffff !important;
}
#header.hero-dark:not(.scrolled):not(.menu-open) .nav-link::after {
  background: rgba(255,255,255,0.8) !important;
}

/* Icons (Dark-Mode-Toggle, Hamburger): hell wenn nicht gescrollt */
#header.hero-dark:not(.scrolled):not(.menu-open) #darkModeToggle svg.block,
#header.hero-dark:not(.scrolled):not(.menu-open) #mobileMenuBtn svg {
  color: rgba(255,255,255,0.85) !important;
}

/* Logo-Tagline: hell wenn nicht gescrollt */
#header.hero-dark:not(.scrolled):not(.menu-open) .text-gray-400 {
  color: rgba(255,255,255,0.55) !important;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

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

.animate-fade-in-up { animation: fadeInUp 0.6s ease forwards; }

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(1,105,132,0.15); }
  50% { box-shadow: 0 0 40px rgba(1,105,132,0.3); }
}

.glow-hover:hover { animation: glow 2s ease-in-out infinite; }

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

.page-transition { animation: pageIn 0.4s ease-out; }

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #016984;
  animation: pulseRing 2s ease-out infinite;
}

/* ===== Glass Card ===== */
.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.3);
}

.dark .glass {
  background: rgba(30,41,59,0.7);
  border-color: rgba(255,255,255,0.1);
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: linear-gradient(135deg, #016984 0%, #7DB4C1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Feature Cards ===== */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(1,105,132,0.12);
}

/* ===== Process Line ===== */
.process-line {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, #016984, #7DB4C1, #FFB344);
}

/* ===== Solution Process Flow ===== */
.flow-eyebrow-rule {
  letter-spacing: 0.32em;
}

.flow-heading {
  font-family: 'Catamaran', 'Arial', sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  color: #111827;
}

.flow-heading-sub {
  font-family: 'Roboto', 'Arial', sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: 0.55em;
  letter-spacing: 0;
  color: #6b7280;
  margin-right: 0.32em;
  vertical-align: 0.12em;
}

.flow-rail {
  background-image: repeating-linear-gradient(
    to right,
    rgba(1,105,132,0.35) 0,
    rgba(1,105,132,0.35) 6px,
    transparent 6px,
    transparent 16px
  );
}

.flow-rail-glow {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(1,105,132,0) 4%,
    rgba(1,105,132,0.18) 18%,
    rgba(1,105,132,0.18) 38%,
    rgba(255,152,0,0.35) 50%,
    rgba(1,105,132,0.18) 62%,
    rgba(1,105,132,0.18) 82%,
    rgba(1,105,132,0) 96%,
    transparent 100%
  );
  filter: blur(6px);
}

.flow-numeral {
  font-family: 'Catamaran', 'Arial', sans-serif;
  font-weight: 700;
  font-size: 6rem;
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(1,105,132,0.30);
  user-select: none;
  display: inline-block;
}

@media (min-width: 1024px) {
  .flow-numeral { font-size: 7rem; }
}

.flow-numeral-gold {
  -webkit-text-stroke-color: rgba(255,152,0,0.55);
  text-shadow: 0 0 32px rgba(255,179,68,0.20);
}

.flow-station {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #016984;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 5px rgba(1,105,132,0.30),
    0 0 18px 2px rgba(1,105,132,0.30);
}

.flow-station-gold {
  background: #ff9800;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 5px rgba(255,152,0,0.40),
    0 0 24px 4px rgba(255,152,0,0.40);
}

.flow-station::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 9999px;
  background: rgba(1,105,132,0.22);
  animation: flowPulse 2.6s ease-out infinite;
}

.flow-station-gold::after {
  background: rgba(255,152,0,0.28);
  animation-duration: 2.2s;
}

@keyframes flowPulse {
  0%   { transform: scale(0.55); opacity: 1; }
  100% { transform: scale(2.1);  opacity: 0; }
}

.flow-card {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  transition: transform 0.45s cubic-bezier(.22,.61,.36,1),
              border-color 0.45s ease,
              box-shadow 0.45s ease;
  height: 100%;
}

@media (min-width: 1024px) {
  .flow-card { padding: 1.75rem; }
}

.flow-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 0% 0%,
      rgba(1,105,132,0.05) 0%,
      transparent 55%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.flow-card:hover {
  transform: translateY(-6px);
  border-color: rgba(1,105,132,0.35);
  box-shadow: 0 22px 50px -18px rgba(1,105,132,0.22);
}

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

.flow-card-gold {
  background:
    linear-gradient(160deg,
      rgba(255,179,68,0.08) 0%,
      #ffffff 60%);
  border-color: rgba(255,152,0,0.30);
  box-shadow: 0 6px 22px -10px rgba(255,152,0,0.18);
}

.flow-card-gold::before {
  content: '';
  position: absolute;
  top: -1px; left: 16%; right: 16%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,152,0,0.7),
    transparent);
  border-radius: 1rem 1rem 0 0;
}

.flow-card-gold:hover {
  border-color: rgba(255,152,0,0.55);
  box-shadow: 0 28px 60px -18px rgba(255,152,0,0.30);
}

.flow-card-gold::after {
  background:
    radial-gradient(120% 80% at 100% 0%,
      rgba(255,152,0,0.08) 0%,
      transparent 60%);
}

.flow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: rgba(1,105,132,0.08);
  box-shadow: inset 0 0 0 1px rgba(1,105,132,0.18);
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.flow-card:hover .flow-icon {
  background: rgba(1,105,132,0.13);
  box-shadow: inset 0 0 0 1px rgba(1,105,132,0.35);
}

.flow-icon-gold {
  background: rgba(255,152,0,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,152,0,0.35);
}

.flow-card-gold:hover .flow-icon-gold {
  background: rgba(255,152,0,0.20);
  box-shadow: inset 0 0 0 1px rgba(255,152,0,0.55);
}

.flow-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #016984;
}

.flow-eyebrow-gold { color: #d97706; }

/* ===== Mobile Menu ===== */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open { max-height: 400px; }

/* ===== Form Styles ===== */
input, textarea, select {
  font-family: 'Roboto', 'Arial', sans-serif;
}

.form-input {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  border-color: #016984;
  box-shadow: 0 0 0 3px rgba(1,105,132,0.15);
  outline: none;
}

/* ===== Cookie Banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 1rem 1rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner-inner {
  max-width: 72rem;
  margin: 0 auto;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(229,231,235,0.8);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.dark .cookie-banner-inner {
  background: rgba(17,24,39,0.95);
  border-color: rgba(55,65,81,0.6);
}

.cookie-banner-text { flex: 1; min-width: 280px; }

.cookie-banner-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.375rem;
}

.dark .cookie-banner-title { color: #f9fafb; }

.cookie-banner-desc {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
}

.dark .cookie-banner-desc { color: #9ca3af; }

.cookie-banner-link {
  color: #016984;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dark .cookie-banner-link { color: #7DB4C1; }

.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 0.625rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.cookie-btn-accept {
  background: #016984;
  color: #fff;
}

.cookie-btn-accept:hover {
  background: #015a72;
  box-shadow: 0 4px 12px rgba(1,105,132,0.25);
}

.cookie-btn-decline {
  background: transparent;
  color: #374151;
  border: 1.5px solid #d1d5db;
}

.dark .cookie-btn-decline { color: #d1d5db; border-color: #4b5563; }
.cookie-btn-decline:hover { background: #f3f4f6; border-color: #9ca3af; }
.dark .cookie-btn-decline:hover { background: #1f2937; border-color: #6b7280; }

.cookie-btn-settings {
  background: transparent;
  color: #016984;
  border: 1.5px solid #016984;
}

.cookie-btn-settings:hover {
  background: rgba(1,105,132,0.05);
}

.dark .cookie-btn-settings { color: #7DB4C1; border-color: #7DB4C1; }

/* Cookie Settings Modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
}

.cookie-modal.visible { display: flex; }

@media (max-width: 640px) {
  .cookie-banner-inner {
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
  }
  .cookie-banner-actions { width: 100%; flex-wrap: wrap; }
  .cookie-btn { flex: 1; text-align: center; min-width: 120px; }
  .hero-floating-card { display: none; }
}

/* ===== Geometric Background Pattern ===== */
.geo-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ===== Tech Tags (dark backgrounds) ===== */
.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.12);
}

.tech-tag-dim {
  opacity: 0.5;
  font-size: 0.7rem;
}

/* ===== Tech Tags (light backgrounds) ===== */
.tech-tag-light {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  background: #e6f4f7;
  color: #015a72;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(1,105,132,0.15);
}

.dark .tech-tag-light {
  background: rgba(1,105,132,0.15);
  color: #7DB4C1;
  border-color: rgba(1,105,132,0.25);
}

/* ===== Layer Cards (three-layer section) ===== */
.layer-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.layer-card:hover {
  transform: translateX(4px);
}

.accent-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 1rem 0 0 1rem;
}

.accent-bar-gold { background: linear-gradient(to bottom, #FFA726, #FFB344); }
.accent-bar-libal { background: linear-gradient(to bottom, #269bb5, #016984); }
.accent-bar-secondary { background: linear-gradient(to bottom, #7DB4C1, #4092A5); }

/* ===== Maturity Model Cards ===== */
.maturity-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.maturity-card:hover {
  transform: translateY(-4px);
}

.maturity-bronze {
  background: linear-gradient(160deg, #fdf6ee 0%, #fff 100%);
  border: 2px solid rgba(180,105,40,0.2);
}

.dark .maturity-bronze {
  background: linear-gradient(160deg, rgba(120,60,10,0.15) 0%, rgba(17,24,39,0.4) 100%);
  border-color: rgba(180,105,40,0.25);
}

.maturity-silver {
  background: linear-gradient(160deg, #f0f8fb 0%, #fff 100%);
  border: 2px solid rgba(64,146,165,0.3);
}

.dark .maturity-silver {
  background: linear-gradient(160deg, rgba(1,105,132,0.15) 0%, rgba(17,24,39,0.4) 100%);
  border-color: rgba(64,146,165,0.35);
}

.maturity-gold {
  background: linear-gradient(160deg, #fdf8ec 0%, #fff 100%);
  border: 2px solid rgba(255,167,38,0.3);
}

.dark .maturity-gold {
  background: linear-gradient(160deg, rgba(180,110,0,0.15) 0%, rgba(17,24,39,0.4) 100%);
  border-color: rgba(255,167,38,0.3);
}

.maturity-icon-bronze {
  background: linear-gradient(135deg, #b87333 0%, #d4915a 100%);
  box-shadow: 0 4px 12px rgba(184,115,51,0.25);
}

.maturity-icon-silver {
  background: linear-gradient(135deg, #4092A5 0%, #7DB4C1 100%);
  box-shadow: 0 4px 12px rgba(64,146,165,0.25);
}

.maturity-icon-gold {
  background: linear-gradient(135deg, #FF9800 0%, #FFB344 100%);
  box-shadow: 0 4px 12px rgba(255,152,0,0.3);
}

/* ===== Tab Buttons ===== */
.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #016984;
  background: #e6f4f7;
}

.dark .tab-btn {
  color: #9ca3af;
}

.dark .tab-btn:hover {
  color: #7DB4C1;
  background: rgba(1,105,132,0.1);
}

.tab-btn.tab-active {
  color: #016984;
  background: #e6f4f7;
  border-color: #016984;
  font-weight: 600;
}

.dark .tab-btn.tab-active {
  color: #7DB4C1;
  background: rgba(1,105,132,0.15);
  border-color: #4092A5;
}

/* ===== Tab Panel Animation ===== */
.tab-panel {
  animation: tabFadeIn 0.3s ease forwards;
}

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

/* ===== Integration Tool Boxes ===== */
.integration-tool {
  padding: 0.625rem 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  color: #374151;
  font-weight: 500;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.integration-tool:hover {
  border-color: #b3dde6;
  box-shadow: 0 2px 8px rgba(1,105,132,0.08);
}

.dark .integration-tool {
  background: rgba(30,41,59,0.5);
  border-color: rgba(55,65,81,0.5);
  color: #d1d5db;
}

.dark .integration-tool:hover {
  border-color: rgba(1,105,132,0.4);
}

/* ===== Screenshot Placeholder ===== */
.screenshot-placeholder {
  position: relative;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
.dark ::-webkit-scrollbar-track { background: #1f2937; }
::-webkit-scrollbar-thumb { background: #016984; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #015a72; }

/* ===== Dark Mode Toggle ===== */
.dark-toggle { transition: transform 0.3s ease; }
.dark-toggle:hover { transform: rotate(15deg); }

/* ===== Print ===== */
@media print {
  header, footer, .no-print, .cookie-banner, .cookie-modal { display: none !important; }
  body { color: #000 !important; background: #fff !important; font-size: 12pt; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
