/* Global */
:root { --bg: #ffffff; --text: #333333; --muted: #666666; --accent: #333333; --card: #EAEAEA; --border: #e6e6e6; --text-primary: #333333; --text-secondary: #888888; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }
h1 { font-size: clamp(36px, 5.5vw, 72px); line-height: 1.4em; font-weight: 400; }
h2 { font-size: clamp(36px, 4vw, 40px) !important; line-height: 1.5em; font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; border: none !important; outline: none !important; }
.hero .container { border: none !important; outline: none !important; }
.section { padding: 96px 0; }
.section-title { margin: 0 0 8px; font-weight: 300; text-transform: lowercase; padding: 40px 0 20px 0; }
.section-subtitle { margin: 0 0 64px; color: var(--muted); font-weight: 300; }
.accent { color: var(--accent); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 1000; background: #ffffff; overflow: hidden; transition: box-shadow 0.3s ease; }
.site-header.scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { width: 160px; height: auto; object-fit: contain; }
.brand-logo-desktop { display: block; }
.brand-logo-mobile { display: none; }
.brand-text { display: none; }
.site-nav { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.nav-list a { color: var(--text); opacity: .8; }
.nav-list a:hover { color: var(--text); opacity: 1; }
.nav-list a.active { 
	color: #333333; 
	font-weight: bold; 
	opacity: 1; 
	position: relative;
	padding: 8px 16px;
	border: none !important;
	outline: none !important;
	overflow: visible;
	background: transparent;
}

/* Dark mode: make active header nav link a darker gray (less bright) */
body.theme-dark .nav-list a.active { 
  color: #0a0a0a !important; 
}

/* Dark mode: make active nav glow more vibrant (less transparent) */
body.theme-dark .nav-list a.active::before { opacity: 0.75; }

/* Dark mode: use hero title gradient colors for active nav glow */
body.theme-dark .nav-list a.active::before {
  background: linear-gradient(90deg, #612ff9 0%, #fc466b 40%, #ffc445 80%) !important;
}

/* System dark fallback: apply same gradient when in system dark mode */
@media (prefers-color-scheme: dark) {
  .nav-list a.active::before {
    background: linear-gradient(90deg, #612ff9 0%, #fc466b 40%, #ffc445 80%) !important;
  }
}

.nav-list a.active::before {
	content: '';
	position: absolute;
	top: -4px;
	left: -4px;
	right: -4px;
	bottom: -4px;
	background: linear-gradient(90deg, #8FA6FB 0%, #F89CAD 50%, #FFDFA6 100%);
	border-radius: 6px;
	filter: blur(8px);
	-webkit-filter: blur(8px);
	z-index: -1;
	opacity: 0.6;
	margin: 0;
}
.nav-toggle { width: 40px; height: 40px; border: 1px solid var(--border); background: transparent; border-radius: 8px; color: var(--text); display: grid; place-items: center; }
.nav-toggle-box { width: 18px; height: 2px; background: var(--text); position: relative; }
.nav-toggle-box::before, .nav-toggle-box::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--text); }
.nav-toggle-box::before { top: -6px; }
.nav-toggle-box::after { top: 6px; }

@media (min-width: 880px) {
	.nav-toggle { display: none; }
	.site-nav { display: block; }
}

@media (max-width: 1199px) {
	.brand-logo-desktop { display: none; }
	.brand-logo-mobile { display: block; }
}

@media (min-width: 1200px) {
	.brand-logo { width: 280px; }
}

/* Hero */
.hero { min-height: 90vh; padding: 96px 0 56px; margin-bottom: 0 !important; border-bottom: none !important; background: transparent; background-image: url('../assets/images/hero-bg.png'); background-repeat: no-repeat; background-position: bottom center; background-size: cover; position: relative; display: flex; align-items: center; overflow: hidden; }
.hero::after,
.hero::before {
  content: none !important;
  display: none !important;
}
.hero-inner { max-width: 1160px; position: relative; z-index: 1; border: none !important; outline: none !important; }
.eyebrow { margin: 0 0 12px; color: var(--muted); text-transform: lowercase; letter-spacing: .4px; }
.hero-title { margin: 0 0 8px; font-size: clamp(36px, 5.5vw, 72px) !important; line-height: 1.4em; font-weight: 300; text-transform: lowercase; letter-spacing: -0.5px; }
.hero-title-gradient { margin: 0 0 20px; font-size: clamp(36px, 5.5vw, 72px) !important; line-height: 1.4em; font-weight: 500; text-transform: lowercase; letter-spacing: -0.5px; background: linear-gradient(90deg, #612ff9 0%, #fc466b 13%, #ffc445 26%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Homepage-specific gradient stops for hero title */
.home-page .hero-title-gradient { 
  background: linear-gradient(90deg, #612ff9 0%, #fc466b 40%, #ffc445 80%) !important; 
  -webkit-background-clip: text !important; 
  -webkit-text-fill-color: transparent !important; 
  background-clip: text !important; 
}
.ai-gradient { background: linear-gradient(90deg, #EF4444 0%, #F97316 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mega-title { display: none; }
.lede { margin: 0 0 16px; font-size: clamp(16px, 2vw, 24px); color: var(--text-primary); }

/* Ensure portfolio subtitle spacing overrides .lede defaults */
.lede.section-subtitle { margin: 0 0 64px; color: var(--muted); font-weight: 300; }
.lede.portfolio-subtitle { margin: 0 0 40px; }
.cta-row { margin-top: 60px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-scroll { display: flex; justify-content: center; position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); width: 100%; border: none !important; outline: none !important; }
.scroll-down-btn { width: 48px; height: 48px; border-radius: 50%; background: #333333; border: none; color: #ffffff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; }
.scroll-down-btn:hover { transform: scale(1.05); background: linear-gradient(90deg, #612ff9 0%, #CB3F99 100%) !important; color: #ffffff !important; }
.scroll-down-btn i { font-size: 1.8em; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 20px 32px; border-radius: 10px; border: 1px solid var(--border); color: #ffffff; background: #333333; font-size: clamp(16px, 2vw, 24px); font-weight: 700; letter-spacing: 4px; transition: all 0.3s ease; text-transform: lowercase; position: relative; }
@media (max-width: 640px) { .button { width: 100%; } }
.button:hover { transform: scale(1.05); background: linear-gradient(90deg, #612ff9 0%, #fc466b 50%, #F86D1B 100%) !important; color: #ffffff !important; border: none !important; }
.button-chevron { margin-left: 12px; font-size: 1.2em; opacity: 0; transition: opacity 0.3s ease; }
.button:hover .button-chevron { opacity: 1; }
.button.primary { background: #333333; border-color: #333333; color: #ffffff; }

/* Remove border/line between hero and next section */
.hero,
.team-hero,
.section-portfolio,
.team-members {
  border-top: none !important;
  border-bottom: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Ensure no visual line from adjacent sections - match backgrounds */
.hero + section,
.team-hero + section {
  border-top: none !important;
  outline: none !important;
}

/* Match section backgrounds to hero to prevent color line */
.section-portfolio {
  margin-top: 0 !important;
  padding-top: 96px !important;
}
.team-members {
  margin-top: 0 !important;
}

/* Ensure body/main doesn't create a line */
.site-main {
  background: transparent !important;
}

/* Match backgrounds in dark mode too - hero uses #0f0f0f, so match it */
@media (prefers-color-scheme: dark) {
  .hero + .section-portfolio,
  .section-portfolio {
    background: #0f0f0f !important;
  }
  .team-hero + .team-members,
  .team-members {
    background: #0f0f0f !important;
  }
  .team-grid {
    background: #0f0f0f !important;
  }
  
  /* Override for explicit light theme in system dark mode */
  body.theme-light .section-portfolio {
    background: #ffffff !important;
  }
  body.theme-light .team-members {
    background: #ffffff !important;
  }
}

body.theme-dark .hero + .section-portfolio,
body.theme-dark .section-portfolio {
  background: #0f0f0f !important;
}
body.theme-dark .team-hero + .team-members,
body.theme-dark .team-members {
  background: #0f0f0f !important;
}
body.theme-dark .team-grid {
  background: #0f0f0f !important;
}

/* Explicit light theme overrides */
body.theme-light .section-portfolio {
  background: #ffffff !important;
}
body.theme-light .team-members {
  background: #ffffff !important;
}

/* Portfolio Cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 36px; }
.card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.card { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 18px; padding: 30px; border: none; border-radius: 16px; background: var(--card); transition: all 0.5s ease; cursor: pointer; height: 100%; will-change: transform; transform-origin: center; }
.card:hover { background: #727272; color: #ffffff; box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.1); transition: all 0.5s ease; transform: scale(1.01); }

/* Ensure portfolio cards visibly scale on hover */
.section-portfolio .card:hover { transform: scale(1.01); z-index: 1; }

/* Make portfolio card hover entrance slower (gentle ease-in), keep exit ease-out */
.section-portfolio .card { transition: transform 0.6s ease-out, background 0.5s ease-out, box-shadow 0.5s ease-out, color 0.5s ease-out; }
.section-portfolio .card:hover { transition-timing-function: ease-in; }
.card:hover .card-title,
.card:hover .card-kicker,
.card:hover .card-text { color: #ffffff; transition: color 0.3s ease; }

/* Custom hover shadow colors for each card */
.card-quality-quanta:hover { box-shadow: 12px 12px 12px rgba(243, 193, 33, 1); transition: box-shadow 0.3s ease; }
.card-valuechains:hover { box-shadow: 12px 12px 12px rgba(65, 218, 174, 1); transition: box-shadow 0.3s ease; }
.card-tea:hover { box-shadow: 12px 12px 12px rgba(9, 225, 192, 1); transition: box-shadow 0.3s ease; }
.card-kanzlei21:hover { box-shadow: 12px 12px 12px rgba(255, 105, 105, 1); transition: box-shadow 0.3s ease; }
.card-cybersecurity:hover { box-shadow: 12px 12px 12px rgba(28, 52, 183, 1); transition: box-shadow 0.3s ease; }
.card-media { display: flex; align-items: center; justify-content: center; }
.card-media img { width: 330px; height: 330px; object-fit: contain; filter: saturate(.98); padding: 20px; }
.card-body { display: flex; flex-direction: column; justify-content: space-between; }
.card-title { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 400; text-transform: lowercase; }

/* Dark mode: dim card images to 80% opacity by default (no hover) */
body.theme-dark .card-media img { opacity: 0.7; }
body.theme-dark .card:hover .card-media img { opacity: 1; }

/* Support system-dark when no explicit theme-dark class is set */
@media (prefers-color-scheme: dark) {
	/* Only affect portfolio card images */
	.section-portfolio .card-media img { opacity: 0.7; }
	.section-portfolio .card:hover .card-media img { opacity: 1; }
}

/* Dark mode: slightly lighter card background (no hover) for portfolio */
body.theme-dark .section-portfolio .card { background: #222222; }
/* Dark mode: make portfolio card hover background a bit lighter */
body.theme-dark .section-portfolio .card:hover { background: #2e2e2e; }

/* Light mode: explicitly set light background to override system dark */
body.theme-light .section-portfolio .card { background: var(--card) !important; }
body.theme-light .section-portfolio .card:hover { background: #727272 !important; }

/* System dark fallback: slightly lighter card background (no hover) for portfolio */
@media (prefers-color-scheme: dark) {
  .section-portfolio .card { background: #222222; }
  /* System dark: make portfolio card hover background a bit lighter */
  .section-portfolio .card:hover { background: #2e2e2e; }
  
  /* But override if user explicitly selected light mode */
  body.theme-light .section-portfolio .card { background: var(--card) !important; }
  body.theme-light .section-portfolio .card:hover { background: #727272 !important; }
}
.card-kicker { margin: 6px 0 12px; font-size: clamp(14px, 1.8vw, 18px); color: var(--text-secondary); text-transform: lowercase; }
.card-text { margin: 0; color: var(--text); opacity: .9; font-size: clamp(12px, 1.6vw, 16px); }
.badge-row { margin-top: 10px; }
.badge { display: inline-block; padding: 4px 8px; font-size: 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); }

@media (max-width: 640px) { .cards { max-width: 450px; margin: 0 auto; } }

/* Mobile/Tablet: Display portfolio cards in hover state by default */
@media (max-width: 1199px) {
  /* Override global card hover rules */
  .section-portfolio .card,
  .section-portfolio .card:hover,
  .section-portfolio .card:active,
  .section-portfolio .card:focus,
  .section-portfolio .card-link:hover .card,
  .section-portfolio .card-link:active .card {
    background: #727272 !important;
    color: #ffffff !important;
    box-shadow: 8px 8px 8px rgba(0, 0, 0, 0.1) !important;
    transform: scale(1.01) !important;
    transition: none !important;
    pointer-events: auto;
  }
  
  /* Text colors from hover state - override all hover rules */
  .section-portfolio .card .card-title,
  .section-portfolio .card .card-kicker,
  .section-portfolio .card .card-text,
  .section-portfolio .card:hover .card-title,
  .section-portfolio .card:hover .card-kicker,
  .section-portfolio .card:hover .card-text,
  .section-portfolio .card:active .card-title,
  .section-portfolio .card:active .card-kicker,
  .section-portfolio .card:active .card-text {
    color: #ffffff !important;
    transition: none !important;
  }
  
  /* Custom shadow colors for each card - override all hover states and prevent any shadow changes */
  .section-portfolio .card-quality-quanta,
  .section-portfolio .card-quality-quanta:hover,
  .section-portfolio .card-quality-quanta:active,
  .section-portfolio .card-quality-quanta:focus,
  .section-portfolio .card-link:hover .card-quality-quanta,
  .section-portfolio .card-link:active .card-quality-quanta {
    box-shadow: 12px 12px 12px rgba(243, 193, 33, 1) !important;
    transition: none !important;
  }
  .section-portfolio .card-valuechains,
  .section-portfolio .card-valuechains:hover,
  .section-portfolio .card-valuechains:active,
  .section-portfolio .card-valuechains:focus,
  .section-portfolio .card-link:hover .card-valuechains,
  .section-portfolio .card-link:active .card-valuechains {
    box-shadow: 12px 12px 12px rgba(65, 218, 174, 1) !important;
    transition: none !important;
  }
  .section-portfolio .card-tea,
  .section-portfolio .card-tea:hover,
  .section-portfolio .card-tea:active,
  .section-portfolio .card-tea:focus,
  .section-portfolio .card-link:hover .card-tea,
  .section-portfolio .card-link:active .card-tea {
    box-shadow: 12px 12px 12px rgba(9, 225, 192, 1) !important;
    transition: none !important;
  }
  .section-portfolio .card-kanzlei21,
  .section-portfolio .card-kanzlei21:hover,
  .section-portfolio .card-kanzlei21:active,
  .section-portfolio .card-kanzlei21:focus,
  .section-portfolio .card-link:hover .card-kanzlei21,
  .section-portfolio .card-link:active .card-kanzlei21 {
    box-shadow: 12px 12px 12px rgba(255, 105, 105, 1) !important;
    transition: none !important;
  }
  .section-portfolio .card-cybersecurity,
  .section-portfolio .card-cybersecurity:hover,
  .section-portfolio .card-cybersecurity:active,
  .section-portfolio .card-cybersecurity:focus,
  .section-portfolio .card-link:hover .card-cybersecurity,
  .section-portfolio .card-link:active .card-cybersecurity {
    box-shadow: 12px 12px 12px rgba(28, 52, 183, 1) !important;
    transition: none !important;
  }
  
  /* Ensure custom shadows are maintained on hover - explicitly set them again */
  .section-portfolio .card-link:hover .card-quality-quanta,
  .section-portfolio .card-link:active .card-quality-quanta,
  .section-portfolio .card-link:focus .card-quality-quanta {
    box-shadow: 12px 12px 12px rgba(243, 193, 33, 1) !important;
  }
  .section-portfolio .card-link:hover .card-valuechains,
  .section-portfolio .card-link:active .card-valuechains,
  .section-portfolio .card-link:focus .card-valuechains {
    box-shadow: 12px 12px 12px rgba(65, 218, 174, 1) !important;
  }
  .section-portfolio .card-link:hover .card-tea,
  .section-portfolio .card-link:active .card-tea,
  .section-portfolio .card-link:focus .card-tea {
    box-shadow: 12px 12px 12px rgba(9, 225, 192, 1) !important;
  }
  .section-portfolio .card-link:hover .card-kanzlei21,
  .section-portfolio .card-link:active .card-kanzlei21,
  .section-portfolio .card-link:focus .card-kanzlei21 {
    box-shadow: 12px 12px 12px rgba(255, 105, 105, 1) !important;
  }
  .section-portfolio .card-link:hover .card-cybersecurity,
  .section-portfolio .card-link:active .card-cybersecurity,
  .section-portfolio .card-link:focus .card-cybersecurity {
    box-shadow: 12px 12px 12px rgba(28, 52, 183, 1) !important;
  }
  
  /* Dark mode - override all hover states */
  body.theme-dark .section-portfolio .card,
  body.theme-dark .section-portfolio .card:hover,
  body.theme-dark .section-portfolio .card:active {
    background: #2e2e2e !important;
    color: #ffffff !important;
    transform: scale(1.01) !important;
    transition: none !important;
  }
  
  @media (prefers-color-scheme: dark) {
    .section-portfolio .card,
    .section-portfolio .card:hover,
    .section-portfolio .card:active {
      background: #2e2e2e !important;
      color: #ffffff !important;
      transform: scale(1.01) !important;
      transition: none !important;
    }
  }
  
  /* Light mode - override all hover states */
  body.theme-light .section-portfolio .card,
  body.theme-light .section-portfolio .card:hover,
  body.theme-light .section-portfolio .card:active {
    background: #727272 !important;
    color: #ffffff !important;
    transform: scale(1.01) !important;
    transition: none !important;
  }
  
  /* Images at full opacity (as if hovered) - no change on hover */
  .section-portfolio .card-media img,
  .section-portfolio .card:hover .card-media img,
  .section-portfolio .card:active .card-media img {
    opacity: 1 !important;
    transition: none !important;
  }
  
  body.theme-dark .section-portfolio .card-media img,
  body.theme-dark .section-portfolio .card:hover .card-media img,
  body.theme-dark .section-portfolio .card:active .card-media img {
    opacity: 1 !important;
    transition: none !important;
  }
  
  @media (prefers-color-scheme: dark) {
    .section-portfolio .card-media img,
    .section-portfolio .card:hover .card-media img,
    .section-portfolio .card:active .card-media img {
      opacity: 1 !important;
      transition: none !important;
    }
  }
}
@media (min-width: 641px) and (max-width: 1199px) { .cards { max-width: 650px; margin: 0 auto; } }
@media (min-width: 1200px) { .cards { grid-template-columns: 1fr 1fr; } }

/* Certification */
.certification { padding: 96px 0; background: #ffffff; background-image: url('../assets/images/hero-bg.png'); background-repeat: no-repeat; background-position: bottom center; background-size: cover; display: flex; align-items: center; justify-content: center; border-top: 0; border-bottom: 0; }

/* CTA wide */
.cta-wide { padding: 56px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #ffffff; }
.cta-wide-inner { display: flex; flex-direction: column; align-items: start; gap: 24px; }
.cta-wide-text { margin: 0; max-width: 760px; color: var(--text); }

/* Footer */
.site-footer { padding: 60px 0; background: #333333; color: #ffffff; }
.footer-inner { display: flex; flex-direction: row; align-items: stretch; justify-content: space-between; gap: 40px; border-top: 0; padding-top: 0; text-align: left; min-height: 200px; }
.copyright { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .2px; color: #ffffff; opacity: 1; }
.footer-links { list-style: none; margin: 0; padding: 40px 0 80px 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.footer-links a { color: #ffffff; opacity: 1; text-transform: lowercase; }
.footer-links a:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; }

.footer-left { flex: 2; }
.footer-right { flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; text-align: right; }

@media (max-width: 1199px) {
	.footer-inner { flex-direction: column; align-items: flex-start; text-align: left; gap: 20px; }
	.footer-links { align-items: flex-start; }
	.footer-right { align-items: flex-start; text-align: left; }
}

/* Footer-specific CTA alignment */
.site-footer .cta-wide-inner { align-items: flex-start; text-align: left; }
.site-footer .cta-wide-text { color: #ffffff; }
.site-footer .card-title { color: #ffffff; margin-bottom: 8px; }
.site-footer .lede.portfolio-subtitle { color: #ffffff; margin-bottom: 16px; font-size: 18px; }
.footer-logo { width: 180px; height: auto; margin: 0 0 0 -30px; padding: 0; }
.site-footer .card-title { color: #ffffff; margin: 0; padding: 0; }

/* Footer brand column */
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

/* Footer gradient text */
.footer-gradient-text { background: linear-gradient(90deg, #8434D8 0%, #fc466b 50%, #ffc445 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 700; }

/* Mobile nav */
@media (max-width: 879.98px) {
	.site-nav { position: fixed; inset: 64px 0 auto 0; background: rgba(10,10,10,.95); border-bottom: 1px solid var(--border); display: none; }
	.site-nav.open { display: block; }
	.nav-list { flex-direction: column; padding: 12px 20px 20px; gap: 12px; }
	.site-nav.open .nav-list { align-items: center; text-align: center; }
	.site-nav.open .nav-list a { color: #ffffff !important; opacity: 1; }
}

/* Reveal (slide-up) animation */
.reveal-up { opacity: 1; transform: translateY(0); transition: opacity 600ms ease-in-out, transform 600ms ease-in-out; }
.reveal-up.is-hidden { opacity: 0; transform: translateY(30%); }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
	.reveal-up { transition: none; opacity: 1; transform: none; }
}

/* Back to top button */
.back-to-top { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); width: 48px; height: 48px; border-radius: 50%; background: #333333; border: none; color: #ffffff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; opacity: 0; visibility: hidden; z-index: 100; box-shadow: 0 0 0 2px #ffffff; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateX(-50%) scale(1.05); background: linear-gradient(90deg, #612ff9 0%, #CB3F99 100%) !important; color: #ffffff !important; }
.back-to-top i { font-size: 1.8em; }

/* Imprint page content */
.imprint-content { width: 100%; }
.imprint-content h2 { margin: 40px 0 16px 0; font-size: clamp(36px, 4vw, 40px); font-weight: 600; color: var(--text); }
.imprint-content h2:first-child { margin-top: 0; }
.imprint-content p { margin: 0 0 16px 0; line-height: 1.6; color: var(--text); }
.imprint-content a { color: var(--text); text-decoration: underline; }
.imprint-content a:hover { color: var(--accent); }
.imprint-content .lede { text-align: left; }

/* Imprint title gradient */
.section-title.hero-title-gradient { -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Imprint page layout */
.imprint-page { height: 100vh; display: flex; flex-direction: column; }
.imprint-page .site-main { flex: 1; padding-top: 72px; }
.imprint-page .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }

/* Mobile and tablet imprint layout */
@media (max-width: 1199px) {
  .imprint-page { height: 120vh; }
}

@media (max-width: 640px) {
  .imprint-page { height: 175vh; }
}

/* Imprint hero section */
.imprint-hero { 
  height: 100%; 
  padding: 96px 0; 
  background: #ffffff; 
  background-image: url('../assets/images/hero-bg.png'); 
  background-repeat: no-repeat; 
  background-position: center; 
  background-size: cover; 
  display: flex; 
  align-items: center; 
  position: relative; 
}

.imprint-hero::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(255, 255, 255, 0.7); 
  z-index: 1; 
}

.imprint-hero .container { 
  position: relative; 
  z-index: 2; 
  padding-top: 120px; 
}

/* Privacy page layout */
.privacy-page { height: 100vh; display: flex; flex-direction: column; }
.privacy-page .site-main { flex: 1; padding-top: 72px; }
.privacy-page .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }

/* Mobile and tablet privacy layout */
@media (max-width: 1199px) {
  .privacy-page { height: 120vh; }
}

@media (max-width: 640px) {
  .privacy-page { height: 175vh; }
}

/* Privacy hero section */
.privacy-hero { 
  height: 100%; 
  padding: 96px 0; 
  background: #ffffff; 
  background-image: url('../assets/images/hero-bg.png'); 
  background-repeat: no-repeat; 
  background-position: left bottom; 
  background-size: cover; 
  display: flex; 
  align-items: center; 
  position: relative; 
}

.privacy-hero::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(255, 255, 255, 0.5); 
  z-index: 1; 
}

.privacy-hero .container { 
  position: relative; 
  z-index: 2; 
  padding-top: 120px; 
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* Privacy content */
.privacy-content { width: 100%; }
.privacy-content h2 { margin: 40px 0 16px 0; font-size: clamp(36px, 4vw, 40px) !important; font-weight: 400; color: var(--text); }
.privacy-content h2:first-child { margin-top: 0; }
.privacy-content h3 { margin: 32px 0 12px 0; font-size: clamp(24px, 3.5vw, 32px); font-weight: 400; color: var(--text); }
.privacy-content h4 { margin: 24px 0 8px 0; font-size: clamp(16px, 3vw, 24px); font-weight: 400; color: var(--text); }
.privacy-content p { margin: 0 0 16px 0; line-height: 1.6; color: var(--text); font-size: 16px; }
.privacy-content a { color: var(--text); text-decoration: underline; }
.privacy-content a:hover { color: var(--accent); }
.privacy-content .lede { text-align: left; color: #888888; }

/* Floating Navigation */
.floating-nav { 
  position: fixed; 
  top: 10%; 
  right: 20px; 
  background: #ffffff; 
  border: 1px solid var(--border); 
  border-radius: 8px; 
  padding: 16px; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); 
  z-index: 999; 
  max-width: 220px; 
  max-height: 70vh; 
  overflow-y: auto; 
  display: none; 
}

/* Hide floating nav on privacy page - temporarily hidden */
.privacy-hero .floating-nav {
  display: none !important;
}

/* Privacy page layout - single column since floating nav is hidden */
@media (min-width: 1200px) {
  .privacy-hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
  }
  
  .privacy-hero .section-title {
    grid-column: 1;
  }
  
  .privacy-content {
    grid-column: 1;
  }
  
  .privacy-hero .floating-nav {
    position: sticky !important;
    display: none !important;
    max-height: none;
    align-self: start;
    top: 100px;
    grid-column: 1;
    max-width: none;
    width: 100%;
    right: auto !important;
    z-index: 10;
  }
  
  /* Hide the duplicate floating nav outside the container */
  body.privacy-page > .floating-nav {
    display: none !important;
  }
}

/* On extra-wide screens, push floating nav into the right gutter (outside container) */
@media (min-width: 1600px) {
  .privacy-hero .floating-nav {
    position: fixed !important;
    top: 100px !important;
    display: none !important;
    /* Place it in the right gutter outside the centered 1160px container */
    right: calc((100vw - 1160px) / 2 - 16px) !important;
    grid-column: auto;
    max-width: 220px;
    width: 220px;
    z-index: 100;
  }
}

.floating-nav-title { 
  display: block;
  margin: 0 0 16px 0; 
  font-size: clamp(16px, 2.5vw, 24px); 
  font-weight: 400; 
  text-transform: lowercase; 
  text-decoration: none;
  color: #888888;
  transition: all 0.2s ease;
  cursor: pointer;
}

.floating-nav-title:hover { 
  transform: scale(1.05); 
  opacity: 0.8; 
}

.floating-nav-list { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}

.floating-nav-list li { 
  margin: 0 0 8px 0; 
}

.floating-nav-list a { 
  display: block; 
  padding: 6px 8px; 
  font-size: 12px; 
  color: #888888; 
  text-decoration: none; 
  border-radius: 4px; 
  transition: all 0.2s ease; 
  line-height: 1.4; 
  font-weight: 400;
}

.floating-nav-list a:hover { 
  background: var(--card); 
  color: var(--accent); 
}

.floating-nav-list a.active { 
  font-weight: 700; 
  color: var(--text); 
}

/* Show floating nav on larger screens - but only if it's not inside privacy-hero container */
@media (min-width: 1200px) {
  .floating-nav:not(.privacy-hero .floating-nav) { display: block; }
}

/* Team page layout */
.team-page { height: 100vh; display: flex; flex-direction: column; }
.team-page .site-main { flex: 1; padding-top: 72px; }
.team-page .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }

/* Mobile and tablet team layout */
@media (max-width: 1199px) {
  .team-page { height: 120vh; }
}

@media (max-width: 640px) {
  .team-page { height: 175vh; }
}

/* Team hero section */
.team-hero { 
  padding: 180px 0; 
  margin-bottom: 0 !important;
  border-bottom: none !important;
  background: transparent; 
  background-image: url('../assets/images/hero-bg.png'); 
  background-repeat: no-repeat; 
  background-position: center; 
  background-size: cover; 
  position: relative; 
}

.team-hero::before { 
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(255, 255, 255, 0); 
  z-index: 1; 
}

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

/* Team members section */
.team-members { 
  background: #ffffff; 
  padding: 0 0 40px 0; 
}

/* Team grid layout */
.team-grid { 
  display: grid;
  grid-template-columns: 1fr;
  gap: 0; 
  margin-top: 40px; 
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  align-items: start;
}

/* Desktop layout: 3 cards per row normally, 2 in last rows */
@media (min-width: 1200px) {
  .team-grid {
    grid-template-columns: repeat(6, 1fr);
    align-items: start;
    grid-auto-rows: auto;
  }
  /* default card spans 2 columns = 3 cards per row */
  .team-member { grid-column: span 2; }
  /* force last rows to two per row by spanning 3 columns each */
  .team-member.two-wide { grid-column: span 3; }
  
}

/* Tablet: 2 cards per row */
@media (min-width: 768px) and (max-width: 1199px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    grid-auto-rows: auto;
  }
  
  .team-member {
    padding-bottom: 150px !important;
    grid-column: auto;
  }
  
}

/* Mobile: 1 card per row */
@media (max-width: 767px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .team-member {
    padding-bottom: 150px;
  }
}

.team-member { 
  display: grid; 
  grid-template-columns: 120px 1fr; 
  grid-template-rows: 72px 72px auto; 
  column-gap: 12px; 
  row-gap: 6px; 
  padding: 30px; 
  padding-left: 70px;
  padding-right: 70px;
  padding-bottom: 150px; 
  background: var(--bg);
  border-radius: 24px;
  box-shadow: none;
  margin-top: -100px;
  margin-left: -15px;
  margin-right: -15px;
  padding-top: 50px;
  transition: transform 0.2s ease-out, box-shadow 0.35s ease-out, background 0.35s ease-out, color 0.35s ease-out; 
  position: relative;
  will-change: transform;
  transform-origin: center;
}

/* Gradient top bar for all cards */
.team-member::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: linear-gradient(90deg, #8FA6FB 0%, #F89CAD 50%, #FFDFA6 100%);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

/* Two-color gradient for cards 1, 4, 7, 10, 13, 16, 19 */
.team-member:nth-child(1)::before,
.team-member:nth-child(4)::before,
.team-member:nth-child(7)::before,
.team-member:nth-child(10)::before,
.team-member:nth-child(13)::before,
.team-member:nth-child(16)::before,
.team-member:nth-child(19)::before {
  background: linear-gradient(90deg, #8FA6FB 0%, #F89CAD 100%);
}

/* Two-color gradient for cards 2, 5, 8, 11, 14, 17 */
.team-member:nth-child(2)::before,
.team-member:nth-child(5)::before,
.team-member:nth-child(8)::before,
.team-member:nth-child(11)::before,
.team-member:nth-child(14)::before,
.team-member:nth-child(17)::before {
  background: linear-gradient(90deg, #F89CAD 0%, #FFDFA6 100%);
}

/* Two-color gradient for cards 3, 6, 9, 12, 15, 18 */
.team-member:nth-child(3)::before,
.team-member:nth-child(6)::before,
.team-member:nth-child(9)::before,
.team-member:nth-child(12)::before,
.team-member:nth-child(15)::before,
.team-member:nth-child(18)::before {
  background: linear-gradient(90deg, #FFDFA6 0%, #8FA6FB 100%);
}


.team-member:hover { 
  transform: translateY(-5px) scale(1.01); 
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); 
  transition: transform 0.06s ease-out, box-shadow 0.3s ease-out, background 0.3s ease-out, color 0.3s ease-out;
}

/* Ensure team member hover scale takes effect and layers above neighbors */
.team-members .team-member { will-change: transform; }
.team-members .team-member:hover { transform: translateY(-5px) scale(1.01); }

.team-member-image { 
  text-align: center; 
  grid-column: 1; 
  grid-row: 1 / span 2;
  align-self: start;
}

.team-member-image img { 
  width: 100px; 
  height: 100px; 
  border-radius: 50%; 
  object-fit: cover; 
  margin: 0 auto; 
}

.team-member-info { 
  text-align: left; 
  display: contents; /* allow children to be placed on the grid */
}

/* Place title and subtitle to the right of the avatar */
.team-member-info h4 { grid-column: 2; grid-row: 1; line-height: 1.15; margin: 0 0 0 0; }
.team-member-info h5 { grid-column: 2; grid-row: 2; margin: 0 0 24px 0; }
/* Make the body span full width below header */
.team-member-info .lede { 
  grid-column: 1 / -1; 
  grid-row: 3; 
  margin-top: 0; 
  padding-top: 40px; 
  border-top: 1px solid var(--border);
}

.team-member-info h4 { 
  margin: 0 0 8px 0; 
  font-size: clamp(18px, 2.5vw, 20px); 
  font-weight: 600; 
  color: var(--text); 
}

.team-member-info h5 { 
  margin: 0 0 16px 0; 
  font-size: clamp(14px, 2vw, 16px); 
  font-weight: 500; 
  color: var(--text-secondary); 
  text-transform: none; 
  letter-spacing: 1px; 
  line-height: 1.2;
}

.team-member-info .lede { 
  text-align: left; 
  margin: 0; 
  line-height: 1.6; 
  font-size: clamp(12px, 1.6vw, 16px);
  color: var(--text-secondary);
}

/* Responsive team grid */
@media (max-width: 768px) {
  .team-grid { 
    grid-template-columns: 1fr; 
    gap: 30px; 
  }
  
  .team-member { 
    padding: 50px 30px 150px 30px;
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: 72px 72px auto;
    column-gap: 12px;
    row-gap: 6px;
  }
  .team-member-info { display: contents; }
  .team-member-info h4 { grid-column: 2; grid-row: 1; line-height: 1.15; margin: 0 0 0 0; }
  .team-member-info h5 { grid-column: 2; grid-row: 2; margin: 0 0 24px 0; }
  .team-member-info .lede { grid-column: 1 / -1; grid-row: 3; margin-top: 0; padding-top: 40px; border-top: 1px solid var(--border); }
}

/* Reveal-up Animation */
.reveal-up {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  opacity: 0;
  transform: translateY(30px);
}

.reveal-up.is-hidden {
  opacity: 0;
  transform: translateY(30px);
}

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

/* Footer Links Active State */
.footer-links a.active { 
	color: #ffffff; 
	font-weight: bold; 
	opacity: 1; 
	position: relative;
	border: none !important;
	outline: none !important;
	overflow: visible;
	background: transparent;
}

.footer-links a.active::before {
	content: '';
	position: absolute;
	top: -20px;
	left: -20px;
	right: -20px;
	bottom: -20px;
	background: linear-gradient(90deg, #8FA6FB 0%, #F89CAD 50%, #FFDFA6 100%);
	border-radius: 12px;
	filter: blur(24px);
	-webkit-filter: blur(24px);
	z-index: -1;
	opacity: 0.6;
	margin: 0;
}


/* Ensure team section respects dark mode (override later light declarations) */
@media (prefers-color-scheme: dark) {
  /* Match hero background to prevent visual line */
  .team-members { background: #0f0f0f !important; }
  .team-grid { background: #0f0f0f !important; }
}

/* Explicit theme class override */
body.theme-dark .team-members { background: #0f0f0f !important; }
body.theme-dark .team-grid { background: #0f0f0f !important; }

/* Explicit theme overrides via class */
body.theme-dark {
  color-scheme: dark;
  --bg: #0b0b0b;
  --text: #f2f2f2;
  --muted: #bdbdbd;
  --accent: #f2f2f2;
  --card: #1a1a1a;
  --border: #2a2a2a;
  --text-primary: #e9e9e9;
  --text-secondary: #b0b0b0;
}

/* Explicit dark header background when user selects dark */
body.theme-dark .site-header { background: #0b0b0b; }

body.theme-light {
  color-scheme: light;
  --bg: #ffffff;
  --text: #333333;
  --muted: #666666;
  --accent: #333333;
  --card: #EAEAEA;
  --border: #e6e6e6;
  --text-primary: #333333;
  --text-secondary: #888888;
}

/* Force light theme visuals when user selects light, even if system is dark */
body.theme-light .site-header { background: #ffffff; }
body.theme-light .hero,
body.theme-light .certification,
body.theme-light .team-hero,
body.theme-light .imprint-hero,
body.theme-light .privacy-hero { background-image: url('../assets/images/hero-bg.png'); }
/* Ensure team section and grid stay light in light theme */
body.theme-light .team-members { background: #ffffff !important; }
body.theme-light .team-grid { background: #ffffff !important; }
/* Ensure privacy hero background color is white in light theme (preserve image) */
body.theme-light .privacy-hero { background-color: #ffffff !important; }
/* Ensure privacy hero overlay is light in light theme (50%) */
body.theme-light .privacy-hero::before { background: rgba(255, 255, 255, 0.5) !important; }
/* Privacy page floating-nav in light mode */
body.theme-light.privacy-page .floating-nav { 
  background: #ffffff !important; 
  color: var(--text) !important;
  border-color: var(--border) !important; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
body.theme-light.privacy-page .floating-nav-title { color: var(--text) !important; }
body.theme-light.privacy-page .floating-nav-list a { color: var(--text-secondary) !important; }
body.theme-light.privacy-page .floating-nav-list a:hover { background: var(--card) !important; color: var(--accent) !important; }
body.theme-light.privacy-page .floating-nav-list a.active { color: var(--text) !important; }

/* Theme toggle button */
.theme-toggle-container { margin: 8px 0 16px 0; }
.theme-toggle { 
  display: inline-flex; align-items: center; gap: 24px; 
  padding: 8px 20px; border-radius: 999px; 
  border: 1px solid #ffffff; background: transparent; 
  color: #ffffff; cursor: pointer; font-size: 14px; transition: all 0.3s ease;
}
.theme-toggle i { color: inherit; font-size: 1.1em; line-height: 1; }
.theme-toggle:hover { 
  transform: scale(1.05);
  background: linear-gradient(90deg, #612ff9 0%, #fc466b 50%, #F86D1B 100%) !important; 
  color: #ffffff !important; 
  border: 1px solid #ffffff !important; 
}
/* Disable hover effects for theme toggle on mobile/tablet */
@media (max-width: 879.98px) {
  .theme-toggle { transition: none; }
  .theme-toggle:hover { 
    transform: none !important; 
    background: transparent !important; 
    color: #ffffff !important; 
    border: 1px solid #ffffff !important; 
  }
}

/* Tooltip for theme toggle */
.theme-tooltip { 
  position: fixed; 
  pointer-events: none; 
  background: rgba(10, 10, 10, 0.9); 
  color: #ffffff; 
  padding: 6px 10px; 
  border-radius: 6px; 
  font-size: 12px; 
  line-height: 1; 
  z-index: 9999; 
  transition: opacity 0.12s ease-out; 
  opacity: 0; 
}

/* System Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --text: #f2f2f2;
    --muted: #bdbdbd;
    --accent: #f2f2f2;
    --card: #1a1a1a;
    --border: #2a2a2a;
    --text-primary: #e9e9e9;
    --text-secondary: #b0b0b0;
  }

  body { background: var(--bg); color: var(--text); }

  /* Areas with hardcoded light backgrounds */
  .hero,
  .imprint-hero,
  .privacy-hero,
  .team-hero { background: transparent; }
  .team-members,
  .certification,
  .cta-wide,
  .floating-nav { background: #0f0f0f; }

  /* Dark header background */
  .site-header { background: #0b0b0b; }

  .floating-nav { border-color: var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
  .floating-nav-title { color: #c8c8c8; }
  .floating-nav-list a { color: #b0b0b0; }
  .floating-nav-list a:hover { background: #1a1a1a; color: #ffffff; }

  .site-header { border-bottom-color: transparent; }

  /* Active nav link color override in system dark mode */
  .site-header .nav-list a.active { color: #0a0a0a !important; }
  .nav-list a.active { color: #0a0a0a !important; }

  /* Common UI elements */
  .button.primary { background: #2d2d2d; border-color: #2d2d2d; color: #ffffff; }
  .button { border-color: var(--border); }
  .badge { border-color: var(--border); color: var(--muted); }
  .card { background: var(--card); }
  .card:hover { background: #2a2a2a; color: #ffffff; }
  .card:hover .card-title,
  .card:hover .card-kicker,
  .card:hover .card-text { color: #ffffff; }

  /* Footer */
  .site-footer { background: #0f0f0f; color: var(--text); }
  .footer-links a { color: #e0e0e0; }

  /* Dark-mode: swap hero background image and remove overlays */
  .hero,
  .certification,
  .team-hero,
  .imprint-hero,
  .privacy-hero { 
    background-image: url('../assets/images/hero-bg-dark.png');
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: cover;
  }

  .hero::after,
  .certification::after,
  .team-hero::after { content: none !important; }

  .imprint-hero::before { background: transparent !important; }
  .privacy-hero::before { background: rgba(0, 0, 0, 0.5) !important; }
}

/* Explicit dark theme: swap image and remove overlays */
body.theme-dark .hero,
body.theme-dark .certification,
body.theme-dark .team-hero,
body.theme-dark .imprint-hero,
body.theme-dark .privacy-hero { 
  background: transparent;
  background-image: url('../assets/images/hero-bg-dark.png');
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: cover;
}

body.theme-dark .hero::after,
body.theme-dark .certification::after,
body.theme-dark .team-hero::after { content: none !important; }

body.theme-dark .imprint-hero::before { background: transparent !important; }
body.theme-dark .privacy-hero::before { background: rgba(0, 0, 0, 0.5) !important; }
}
