/* ============================================================
   Sionea AG - Website Styles v2
   Dark fintech theme · Special effects · Premium feel
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI',
    'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 100ms ease, color 100ms ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }
strong { font-weight: 600; color: var(--text); }


/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --bg:          #050A14;
  --bg-2:        #0A1121;
  --bg-card:     rgba(255,255,255,0.025);
  --bg-light:    #FAFBFD;
  --border:      rgba(255,255,255,0.06);
  --border-hi:   rgba(79,142,247,0.4);
  --border-light: rgba(0,0,0,0.08);
  --accent:      #5B9BF8;
  --accent-2:    #22D3EE;
  --grad:        linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
  --grad-text:   linear-gradient(135deg, #7DB4FF 0%, #22D3EE 100%);
  --grad-text-dark: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
  --text:        #F1F5F9;
  --text-sub:    #94A3B8;
  --text-muted:  #4B5E71;
  --text-dark:   #1E293B;
  --text-dark-sub: #475569;
  --r:           18px;
  --r-sm:        10px;
  --nav-h:       72px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Skip link ──────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -60px; left: 0;
  background: var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0;
  z-index: 9999; font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Utility ────────────────────────────────────────────────── */
.container { width: min(100% - 40px, 1200px); margin-inline: auto; }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.center { text-align: center; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff;
  padding: 15px 30px; border-radius: 50px;
  font-weight: 600; font-size: 0.9375rem; border: none;
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s var(--ease-out-expo);
  box-shadow: 0 4px 24px rgba(37,99,235,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.6s var(--ease-out-expo);
}
.btn-primary:hover::after { transform: translateX(110%); }
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(37,99,235,0.5), inset 0 1px 0 rgba(255,255,255,0.15);
  outline: none;
}

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }

/* ── Navigation ─────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; height: var(--nav-h);
  background: rgba(10,17,33,0.92);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  transition: background 0.35s, box-shadow 0.35s;
}
#navbar.scrolled {
  background: rgba(5,10,20,0.97);
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.3);
}
html.theme-light #navbar {
  background: rgba(250,251,253,0.92);
}
html.theme-light #navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 var(--border-light), 0 4px 20px rgba(0,0,0,0.06);
}
body.legal-page #navbar {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 0 var(--border-light);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
  padding: 0 max(20px, calc((100vw - 1200px) / 2 + 20px));
}
.nav-logo {
  display: inline-flex; align-items: center;
  height: 30px; position: relative;
}
.nav-logo img {
  height: 30px; width: auto; transition: opacity 0.2s;
}
/* Logo swap: dark mode shows gradient version, light mode shows original */
.logo-dark { display: none; }
html:not(.theme-light) .logo-light { display: none; }
html:not(.theme-light) .logo-dark  { display: block; opacity: 0.85; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 0.875rem; font-weight: 600; color: rgba(255,255,255,0.8);
  padding: 6px 14px; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  position: relative; letter-spacing: -0.01em;
}
.nav-links a:hover, .nav-links a:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.08);
  outline: none;
}
html.theme-light .nav-links a { color: #374151; }
html.theme-light .nav-links a:hover,
html.theme-light .nav-links a:focus-visible { color: #1d2939; background: rgba(0,0,0,0.05); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px !important; border-radius: 50px;
  background: var(--grad); color: #fff !important;
  font-size: 0.875rem !important; font-weight: 600;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s; border: none;
  box-shadow: 0 2px 12px rgba(37,99,235,0.3);
  margin-left: 8px;
}
.nav-cta:hover {
  opacity: 0.9; transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(37,99,235,0.4);
  background: rgba(0,0,0,0.05) !important;
  /* override the background hover from above */
  background: var(--grad) !important;
}

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px; margin: -8px;
}
.burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s, background 0.2s;
}
html.theme-light .burger span { background: var(--text-dark); }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column;
  background: rgba(10,17,33,0.98);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 12px 0 20px;
}
html.theme-light .mobile-menu {
  background: rgba(255,255,255,0.98);
  border-top-color: var(--border-light);
}
.mobile-menu.open { display: flex; }
.mob-link {
  padding: 15px 24px; font-size: 1rem; font-weight: 500;
  color: var(--text-sub); transition: color 0.2s; display: block;
}
.mob-link:hover { color: var(--text); }
.mob-link svg { vertical-align: middle; margin-left: 4px; }
html.theme-light .mob-link { color: var(--text-dark-sub); }
html.theme-light .mob-link:hover { color: var(--text-dark); }

/* ── Reel Toggle (Theme + Language) ────────────────────────── */
.nav-controls {
  display: flex; align-items: center; gap: 8px;
}
.reel-toggle {
  position: relative;
  width: 44px; height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  overflow: hidden;
  perspective: 120px;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
/* Gradient overlays for drum slot effect */
.reel-toggle::before,
.reel-toggle::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 12px; z-index: 2;
  pointer-events: none;
}
.reel-toggle::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(30,30,40,0.7) 0%, transparent 100%);
}
.reel-toggle::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(30,30,40,0.7) 0%, transparent 100%);
}
html.theme-light .reel-toggle::before {
  background: linear-gradient(to bottom, rgba(210,215,225,0.85) 0%, transparent 100%);
}
html.theme-light .reel-toggle::after {
  background: linear-gradient(to top, rgba(210,215,225,0.85) 0%, transparent 100%);
}
html.theme-light .reel-toggle {
  background: rgba(0,0,0,0.06);
  border-color: rgba(0,0,0,0.1);
}
.reel-toggle:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 3px rgba(91,155,248,0.2);
}
html.theme-light .reel-toggle:hover {
  background: rgba(0,0,0,0.1);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.reel-toggle:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}
.reel-drum {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--reel-angle, 0deg));
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  pointer-events: none;
}
.reel-drum.no-transition { transition: none; }
.reel-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
}
html.theme-light .reel-face { color: #374151; }
/* 6-face drum: each face 60° apart, translateZ = apothem tuned for 36px height */
.reel-face--0 { transform: rotateX(  0deg) translateZ(26px); }
.reel-face--1 { transform: rotateX(-60deg) translateZ(26px); }
.reel-face--2 { transform: rotateX(-120deg) translateZ(26px); }
.reel-face--3 { transform: rotateX(-180deg) translateZ(26px); }
.reel-face--4 { transform: rotateX(-240deg) translateZ(26px); }
.reel-face--5 { transform: rotateX(-300deg) translateZ(26px); }

/* Wobble hint on hover (desktop only) */
@media (hover: hover) {
  .reel-toggle:hover .reel-drum:not(.no-transition):not(.dragging) {
    animation: reelWobble 0.6s ease-in-out;
  }
}
@keyframes reelWobble {
  0%, 100% { transform: rotateX(var(--reel-angle, 0deg)); }
  25%      { transform: rotateX(calc(var(--reel-angle, 0deg) + 8deg)); }
  75%      { transform: rotateX(calc(var(--reel-angle, 0deg) - 8deg)); }
}
/* Long-press visual feedback */
.reel-toggle.pressing {
  box-shadow: 0 0 0 3px rgba(91,155,248,0.4);
}
html.theme-light .reel-toggle.pressing {
  box-shadow: 0 0 0 3px rgba(37,99,235,0.25);
}

/* ── Theme toggle (dedicated dark/light button) ─────────────── */
.theme-toggle {
  width: 38px; height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 3px rgba(91,155,248,0.2);
}
.theme-toggle:focus-visible {
  outline: 2px solid #2563EB; outline-offset: 2px;
}
html.theme-light .theme-toggle {
  background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.1); color: #374151;
}
html.theme-light .theme-toggle:hover {
  background: rgba(0,0,0,0.1); box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.theme-toggle .icon-theme { width: 18px; height: 18px; display: block; }
/* Dark mode → offer the sun (switch to light); light mode → offer the moon */
.theme-toggle .icon-moon { display: none; }
html.theme-light .theme-toggle .icon-sun { display: none; }
html.theme-light .theme-toggle .icon-moon { display: block; }

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden; padding-top: var(--nav-h);
  background: var(--bg);
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; will-change: transform;
  transition: transform 0.15s linear;
}
.orb-1 {
  width: clamp(320px, 50vw, 700px); height: clamp(320px, 50vw, 700px);
  background: radial-gradient(circle, rgba(37,99,235,0.3) 0%, transparent 70%);
  filter: blur(80px);
  top: -18%; right: -10%;
  animation: floatOrb1 18s ease-in-out infinite;
}
.orb-2 {
  width: clamp(260px, 42vw, 580px); height: clamp(260px, 42vw, 580px);
  background: radial-gradient(circle, rgba(6,182,212,0.22) 0%, transparent 70%);
  filter: blur(70px);
  bottom: 5%; left: -8%;
  animation: floatOrb2 22s ease-in-out infinite;
}
.orb-3 {
  width: clamp(180px, 28vw, 380px); height: clamp(180px, 28vw, 380px);
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  filter: blur(60px);
  top: 40%; left: 50%;
  animation: floatOrb3 15s ease-in-out infinite;
}
@keyframes floatOrb1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-40px) scale(1.05); }
  66% { transform: translate(-20px,25px) scale(0.96); }
}
@keyframes floatOrb2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(-25px,30px) scale(1.03); }
  66% { transform: translate(35px,-20px) scale(0.97); }
}
@keyframes floatOrb3 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px,30px) scale(1.08); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(0,0,0,0.4) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(0,0,0,0.4) 0%, transparent 70%);
}
#heroCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.4;
}

.hero-content {
  position: relative; z-index: 1;
  width: min(100% - 40px, 780px); margin-inline: auto;
  text-align: center; padding: 60px 0 48px;
  flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -0.04em; color: var(--text);
  margin-bottom: 24px;
}
.hero-line {
  display: block;
  animation: fadeUp 0.75s var(--ease-out-expo) both;
}
.hero-line:nth-child(1) { animation-delay: 0.12s; }
.hero-line:nth-child(2) { animation-delay: 0.22s; }
.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text-sub); line-height: 1.75;
  max-width: 600px; margin: 0 auto 38px;
  animation: fadeUp 0.75s var(--ease-out-expo) 0.32s both;
}
.hero-ctas {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 0.75s var(--ease-out-expo) 0.42s both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* Stats strip */
.hero-stats {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  background: rgba(5,10,20,0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: fadeUp 0.8s var(--ease-out-expo) 0.55s both;
}
.stat-item {
  padding: 30px 20px; text-align: center;
  border-right: 1px solid var(--border);
  transition: background 0.3s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(79,142,247,0.04); }
.stat-num {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800; line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; display: block;
}
.stat-label {
  font-size: 0.72rem; color: var(--text-muted); font-weight: 600;
  margin-top: 6px; text-transform: uppercase; letter-spacing: 0.08em;
  display: block;
}

/* ── Section shared ─────────────────────────────────────────── */
.section-pad { padding: clamp(72px, 9vw, 120px) 0; }
.section-dark { background: var(--bg-2); }
.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin-inline: auto; }
.section-label {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--text); margin-bottom: 16px;
}
.section-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text-sub); line-height: 1.7;
  max-width: 560px;
}

/* ── Services ───────────────────────────────────────────────── */
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo),
    border-color 0.3s;
}
.service-card:hover {
  border-color: var(--border-hi);
  box-shadow: 0 28px 70px rgba(37,99,235,0.12);
  transform: translateY(-6px);
}
.card-glow {
  position: absolute; inset: -1px; border-radius: var(--r);
  background: linear-gradient(135deg, rgba(37,99,235,0.5), rgba(6,182,212,0.4));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}
.service-card:hover .card-glow { opacity: 1; }
/* Featured card shimmer overlay */
.card-shimmer {
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.04), transparent);
  transition: none;
  z-index: 2; pointer-events: none;
}
.service-card--featured:hover .card-shimmer {
  animation: shimmerSlide 1.2s var(--ease-out-expo) forwards;
}
@keyframes shimmerSlide {
  to { left: 150%; }
}
.service-card--featured {
  border-color: rgba(79,142,247,0.2);
  background: linear-gradient(160deg, rgba(37,99,235,0.06) 0%, rgba(6,182,212,0.03) 100%);
}
.service-card--featured:hover {
  border-color: rgba(79,142,247,0.5);
  box-shadow: 0 32px 80px rgba(37,99,235,0.18);
}
.card-img-wrap {
  position: relative; overflow: hidden;
  height: 200px;
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}
.service-card:hover .card-img-wrap img { transform: scale(1.05); }
.card-img-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg-2) 100%);
  pointer-events: none;
}
.card-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: #fff;
  background: rgba(37,99,235,0.85); backdrop-filter: blur(6px);
  padding: 5px 12px; border-radius: 50px; z-index: 2;
}
/* Body overlaps the image by 10px - this covers the sub-pixel seam without
   needing an opaque background, so the card-glow (z-index:-1) stays visible. */
.card-body {
  padding: 28px 30px 32px;
  margin-top: -10px;
  position: relative; z-index: 1;
}
.card-tag {
  font-size: 0.72rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.card-title {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.25; margin-bottom: 14px;
}
.card-text {
  font-size: 0.9rem; color: var(--text-sub);
  line-height: 1.72; margin-bottom: 12px;
}
.card-features { display: flex; flex-direction: column; gap: 9px; margin: 16px 0; }
.card-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; color: var(--text-sub);
}
.card-features li::before {
  content: ''; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad);
}
/* CTA buttons inside service cards reuse the hero .btn-primary look —
   add a little breathing room below the feature list. */
.card-body .btn-primary { margin-top: 6px; }

/* ── Warum Sionea ───────────────────────────────────────────── */
.why-layout {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 60px; align-items: center;
}
.why-description {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--text-sub); line-height: 1.75; margin-bottom: 24px;
}
.why-visual {
  position: relative; border-radius: var(--r); overflow: hidden;
  max-height: 460px;
}
.why-img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--r);
  transition: transform 0.6s var(--ease-out-expo);
}
.why-visual:hover .why-img { transform: scale(1.03); }
.why-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(37,99,235,0.15) 0%, rgba(5,10,20,0.3) 100%);
  border-radius: var(--r);
}

/* ── Team ───────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 0 16px;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 0;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.4s var(--ease-out-expo),
    box-shadow 0.4s var(--ease-out-expo);
  position: relative;
}
.team-card:hover, .team-card:focus-visible {
  border-color: var(--border-hi);
  transform: translateY(-6px);
  box-shadow: 0 16px 44px rgba(79,142,247,0.14);
  outline: none;
}
/* Photo wrapper - uniform face-centred crop of the full portrait */
.team-photo-wrap {
  position: relative; width: 100%;
  aspect-ratio: 330 / 430;
  overflow: hidden;
  background: #1a2744;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.team-photo {
  width: 100%; height: 100%;
  background-repeat: no-repeat;
  background-size: cover;               /* fill the frame from the full-res source, resolution-independent */
  background-position: var(--face-x, 50%) 19%;
  transition: transform 0.5s var(--ease-out-expo);
}
.team-card:hover .team-photo,
.team-card:focus-visible .team-photo {
  transform: scale(1.04);
}
.team-name {
  font-size: 0.92rem; font-weight: 600; color: var(--text); line-height: 1.3;
  padding: 0 12px;
}
.team-role {
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 0 12px; margin-top: 4px;
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.35fr;
  gap: 60px; align-items: start;
}
.contact-sub {
  font-size: 0.95rem; color: var(--text-sub);
  margin-bottom: 32px; line-height: 1.72;
}
.contact-details { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9375rem; color: var(--text-sub);
}
.contact-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.contact-item a { color: var(--accent); transition: color 0.2s; }
.contact-item a:hover { color: var(--accent-2); }
.contact-form {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px;
  display: flex; flex-direction: column; gap: 18px;
  transition: border-color 0.3s;
}
.contact-form:focus-within { border-color: rgba(79,142,247,0.25); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.78rem; font-weight: 600; color: var(--text-sub);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 14px 16px; color: var(--text);
  font-family: inherit; font-size: 0.9375rem;
  outline: none; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(79,142,247,0.04);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.1);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.btn-submit { width: 100%; justify-content: center; font-size: 1rem; padding: 16px; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-submit .spinner {
  animation: spin 1s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-result {
  font-size: 0.88rem; text-align: center;
  border-radius: var(--r-sm); padding: 13px 16px; display: none;
}
.form-result.success {
  display: block; background: rgba(5,150,105,0.1);
  border: 1px solid rgba(5,150,105,0.3); color: #34D399;
}
.form-result.error {
  display: block; background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2); color: #F87171;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: rgba(10,17,33,0.95); border-top: 1px solid var(--border);
  padding: 36px 0;
  transition: background 0.1s ease, border-color 0.1s ease;
}
html.theme-light footer {
  background: var(--bg-light); border-top-color: var(--border-light);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo-link {
  display: inline-flex; align-items: center; height: 24px;
}
.footer-logo { height: 24px; width: auto; transition: opacity 0.2s; opacity: 0.85; }
.footer-links { display: flex; gap: 24px; align-items: center; }
.footer-link { font-size: 0.85rem; color: var(--text-sub); transition: color 0.2s; }
.footer-link:hover { color: var(--text); }
html.theme-light .footer-link { color: var(--text-dark-sub); }
html.theme-light .footer-link:hover { color: var(--text-dark); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
html.theme-light .footer-copy { color: var(--text-dark-sub); }

/* ── Modal ──────────────────────────────────────────────────── */
.modal {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.72); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px; overflow-y: auto;
}
.modal.open { display: flex; align-items: flex-start; justify-content: center; }
.modal-box {
  background: #0F1928; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px; width: min(100%, 600px);
  max-height: 85vh; overflow-y: auto; padding: 40px;
  position: relative; margin: auto;
  animation: modalIn 0.3s var(--ease-out-expo);
}
.modal-box--team {
  width: min(100%, 820px);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 16px; right: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border); color: var(--text-sub);
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; line-height: 1;
  z-index: 10;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* Bio modal layout: portrait + text side by side */
.bio-layout {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: start;
}
.bio-portrait-wrap {
  width: 400px; flex-shrink: 0;
}
.bio-portrait {
  width: 100%; height: auto; border-radius: var(--r);
  display: block; background: #1a2744;
}
.bio-content { min-width: 0; }
.bio-header {
  margin-bottom: 16px; padding-right: 44px;
}
.bio-header .team-name { font-size: 1.2rem; font-weight: 700; }
.bio-header .team-role {
  font-size: 0.78rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-top: 4px;
}
.bio-text { font-size: 0.93rem; color: var(--text-sub); line-height: 1.72; }

/* ── Legal pages ────────────────────────────────────────────── */
.legal-hero {
  padding: calc(var(--nav-h) + 56px) 0 56px;
  border-bottom: 1px solid var(--border);
}
.legal-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  letter-spacing: -0.03em; color: var(--text);
}
.legal-content { padding: 56px 0 80px; max-width: 740px; }
.legal-content h2 {
  font-size: 1.2rem; font-weight: 700; color: var(--text);
  margin: 34px 0 10px; padding-top: 8px;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1rem; font-weight: 600; color: var(--accent); margin: 20px 0 6px; }
.legal-content p { font-size: 0.9375rem; color: var(--text-sub); line-height: 1.7; margin-bottom: 10px; }
.legal-content ul { list-style: disc; padding-left: 22px; margin-bottom: 12px; }
.legal-content ul li { font-size: 0.9375rem; color: var(--text-sub); line-height: 1.65; margin-bottom: 4px; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.legal-content a:hover { color: var(--accent-2); }
.legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.875rem; font-weight: 600; color: var(--accent);
  margin-bottom: 32px; transition: gap 0.2s;
}
.legal-back:hover { gap: 10px; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .why-layout { grid-template-columns: 1fr; gap: 40px; }
  .why-visual { max-height: 320px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .burger { display: flex; }
  .nav-controls { margin-left: auto; margin-right: 8px; }
  .cards-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-item { padding: 22px 12px; }
  .modal-box { padding: 28px 20px; }
  .bio-layout { grid-template-columns: 1fr; gap: 20px; }
  .bio-portrait-wrap { width: min(100%, 300px); margin: 0 auto; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .contact-form { padding: 24px 18px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn-primary { justify-content: center; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-label { font-size: 0.65rem; }
  .bio-portrait-wrap { width: min(100%, 260px); margin: 0 auto; }
}

/* Phone landscape: portrait left, content right, full image visible */
@media (orientation: landscape) and (max-height: 600px) {
  .modal { padding: 10px; }
  .modal-box { padding: 16px 20px; max-height: calc(100vh - 20px); }
  .bio-layout { grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
  .bio-portrait-wrap { width: auto; margin: 0; flex-shrink: 0; }
  .bio-portrait {
    height: calc(100vh - 52px); /* viewport minus modal+box padding */
    width: auto; display: block;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE THEME
   .section-dark sections always keep dark tokens for contrast.
   ═══════════════════════════════════════════════════════════════ */
.theme-light body,
html.theme-light body {
  background: #FAFBFD;
  color: #1E293B;
  transition: background-color 100ms ease, color 100ms ease;
}

/* Light sections (Leistungen, Team) */
html.theme-light #leistungen {
  background: #fff;
  color: #1E293B;
  transition: background-color 100ms ease, color 100ms ease;
}
html.theme-light #team {
  background: #f4f7fb;
  color: #1E293B;
  transition: background-color 100ms ease, color 100ms ease;
}
html.theme-light #leistungen .section-label,
html.theme-light #team .section-label {
  color: #2563EB;
}
html.theme-light #leistungen .section-title,
html.theme-light #team .section-title {
  color: #1E293B;
}
html.theme-light #leistungen .section-sub,
html.theme-light #team .section-sub {
  color: #475569;
}
html.theme-light #leistungen .gradient-text,
html.theme-light #team .gradient-text {
  background: var(--grad-text-dark);
  -webkit-background-clip: text; background-clip: text;
}

/* Service cards light mode */
html.theme-light .service-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: background-color 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
}
html.theme-light .service-card:hover {
  border-color: rgba(37,99,235,0.3);
  box-shadow: 0 4px 28px rgba(37,99,235,0.1);
}
html.theme-light .card-title { color: #1E293B; }
html.theme-light .card-text { color: #475569; }
html.theme-light .card-tag { color: #2563EB; }
html.theme-light .card-features li { color: #475569; }
html.theme-light .card-img-wrap::after {
  background: linear-gradient(to bottom, transparent 40%, #fff 100%);
}
html.theme-light .card-features li::before { color: #2563EB; }

/* Team cards light mode */
html.theme-light .team-card {
  background: #fff;
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
html.theme-light .team-card:hover {
  border-color: rgba(37,99,235,0.25);
  box-shadow: 0 4px 20px rgba(37,99,235,0.08);
}
html.theme-light .team-name { color: #1E293B; }
html.theme-light .team-role { color: #475569; }
html.theme-light .team-photo-wrap { background: #e8edf5; border-bottom-color: rgba(0,0,0,0.06); }

/* Modal in light mode */
html.theme-light .modal-box {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}
html.theme-light .modal-close {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
  color: #475569;
}
html.theme-light .modal-close:hover { background: rgba(0,0,0,0.1); color: #1E293B; }
html.theme-light .bio-header .team-name { color: #1E293B; }
html.theme-light .bio-text { color: #475569; }
html.theme-light .bio-portrait { background: #f1f5f9; }

/* Hero in light mode */
html.theme-light #hero {
  background: linear-gradient(180deg, #f0f4fa 0%, #e8eef8 100%);
}
html.theme-light #hero .hero-title { color: var(--text-dark); }
html.theme-light #hero .hero-sub { color: var(--text-dark-sub); }
html.theme-light #hero strong { color: var(--text-dark); }
html.theme-light #hero .gradient-text {
  background: var(--grad-text-dark);
  -webkit-background-clip: text; background-clip: text;
}
html.theme-light .orb-1 { background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, transparent 70%); }
html.theme-light .orb-2 { background: radial-gradient(circle, rgba(6,182,212,0.10) 0%, transparent 70%); }
html.theme-light .orb-3 { background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%); }
html.theme-light .hero-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
}
html.theme-light #heroCanvas { opacity: 0.35; }
html.theme-light .hero-stats {
  background: rgba(255,255,255,0.7);
  border-top-color: rgba(0,0,0,0.06);
  backdrop-filter: blur(12px);
}
html.theme-light .stat-item { border-right-color: rgba(0,0,0,0.06); }
html.theme-light .stat-item:hover { background: rgba(37,99,235,0.04); }
html.theme-light .stat-num {
  background: var(--grad-text-dark);
  -webkit-background-clip: text; background-clip: text;
}
html.theme-light .stat-label { color: var(--text-dark-sub); }
html.theme-light .section-dark {
  background: linear-gradient(180deg, #eaf0f7 0%, #e2eaf4 100%);
}
html.theme-light .section-dark .section-label { color: #2563EB; }
html.theme-light .section-dark .section-title { color: #1E293B; }
html.theme-light .section-dark .section-sub,
html.theme-light .section-dark .why-description,
html.theme-light .section-dark .contact-sub { color: #475569; }
html.theme-light .section-dark .gradient-text {
  background: var(--grad-text-dark);
  -webkit-background-clip: text; background-clip: text;
}
html.theme-light .section-dark .contact-item { color: #475569; }
html.theme-light .section-dark .contact-item a { color: #2563EB; }
html.theme-light .section-dark .contact-item svg { color: #2563EB; }

/* Contact form in light mode */
html.theme-light .contact-form {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}
html.theme-light .form-group label { color: #475569; }
html.theme-light .form-group input,
html.theme-light .form-group textarea {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.12);
  color: #1E293B;
}
html.theme-light .form-group input:focus,
html.theme-light .form-group textarea:focus {
  border-color: #2563EB;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
html.theme-light .form-group input::placeholder,
html.theme-light .form-group textarea::placeholder { color: #94a3b8; }

/* Why section image in light mode */
html.theme-light .why-img-overlay { opacity: 0.3; }
