/* ====================================================
   LSDS Platform — Global Stylesheet (v2)
   Light & Dark Theme · OKLCH Designsystem
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&family=Geist+Mono:wght@400;500;600&display=swap');

/* ─── Theme Tokens (Light) ──────────────────────────── */
:root {
  --background:        oklch(0.955 0.008 82);
  --background-2:      oklch(0.93 0.012 82);
  --background-3:      oklch(0.91 0.014 82);
  --foreground:        oklch(0.28 0.03 250);
  --foreground-muted:  oklch(0.48 0.03 250);
  --foreground-subtle: oklch(0.62 0.025 250);

  --card:              oklch(0.985 0.006 82);
  --card-foreground:   oklch(0.28 0.03 250);
  --card-hover:        oklch(0.97 0.01 82);

  /* Primär / „Orange“-Buttons — Referenzton ~#C99646 (einheitlich Light & Dark) */
  --primary:           oklch(0.595 0.099 73.2);
  --primary-foreground: oklch(0.11 0.038 260);
  --primary-hover:     oklch(0.535 0.099 73.2);

  --secondary:         oklch(0.89 0.018 85);
  --secondary-foreground: oklch(0.28 0.035 250);

  --muted:             oklch(0.9 0.012 85);
  --muted-foreground:  oklch(0.48 0.03 250);

  --accent:            oklch(0.85 0.04 78);
  --accent-foreground: oklch(0.25 0.04 250);

  --border:            oklch(0.78 0.02 83 / 0.4);
  --border-strong:     oklch(0.72 0.025 83 / 0.6);
  --input:             oklch(0.83 0.022 83);
  --ring:              oklch(0.595 0.099 73.2);

  --destructive:       oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.985 0.005 82);
  --success:           oklch(0.62 0.13 152);
  --warning:           oklch(0.595 0.099 73.2);
  --info:              oklch(0.58 0.11 245);

  --sidebar-bg:        oklch(0.22 0.045 250);
  --sidebar-fg:        oklch(0.96 0.01 82);
  --sidebar-border:    oklch(0.36 0.04 245 / 0.6);
  --sidebar-accent:    oklch(0.3 0.045 245);
  --sidebar-active:    oklch(0.595 0.099 73.2);

  --radius:            10px;
  --radius-sm:         6px;
  --radius-md:         8px;
  --radius-lg:         16px;
  --radius-xl:         22px;
  --radius-pill:       9999px;

  --shadow-sm:         0 1px 2px oklch(0 0 0 / 0.06);
  --shadow-md:         0 4px 12px oklch(0 0 0 / 0.08);
  --shadow-lg:         0 16px 48px oklch(0 0 0 / 0.12);

  --transition:        0.22s cubic-bezier(.4,0,.2,1);

  /* Legacy aliases */
  --bg:                var(--background);
  --bg2:               var(--background-2);
  --bg3:               var(--background-3);
  --text:              var(--foreground);
  --text2:             var(--foreground-muted);
  --text3:             var(--foreground-subtle);
  --glass:             oklch(0.5 0.02 250 / 0.05);
  --glass-hover:       oklch(0.5 0.02 250 / 0.08);
  --border-gold:       oklch(0.595 0.099 73.2 / 0.38);
  --blue:              var(--primary);
  --blue-dim:          oklch(0.595 0.099 73.2 / 0.6);
  --blue-glow:         oklch(0.595 0.099 73.2 / 0.25);
  --gold:              var(--primary);
  --gold-light:        oklch(0.72 0.09 73.2);
  --gold-glow:         oklch(0.595 0.099 73.2 / 0.25);
  --warm:              oklch(0.595 0.099 73.2);
  --warm-dim:          oklch(0.595 0.099 73.2 / 0.55);
  --warm-glow:         oklch(0.595 0.099 73.2 / 0.18);
  --shadow:            var(--shadow-lg);
  --shadow-blue:       0 0 24px oklch(0.595 0.099 73.2 / 0.18);
  --shadow-gold:       0 0 24px oklch(0.595 0.099 73.2 / 0.18);
  --blur:              blur(18px);
  --blur-sm:           blur(10px);
}

html[data-theme="dark"] {
  --background:        oklch(0.135 0.035 250);
  --background-2:      oklch(0.165 0.04 250);
  --background-3:      oklch(0.19 0.04 250);
  --foreground:        oklch(0.95 0.014 83);
  --foreground-muted:  oklch(0.74 0.025 82);
  --foreground-subtle: oklch(0.55 0.025 82);

  --card:              oklch(0.19 0.04 250);
  --card-foreground:   oklch(0.95 0.014 83);
  --card-hover:        oklch(0.22 0.04 250);

  --primary:           oklch(0.652 0.101 73.2);
  --primary-foreground: oklch(0.11 0.038 260);
  --primary-hover:     oklch(0.695 0.104 73.2);

  --secondary:         oklch(0.27 0.045 245);
  --secondary-foreground: oklch(0.94 0.014 83);

  --muted:             oklch(0.26 0.035 250);
  --muted-foreground:  oklch(0.74 0.025 82);

  --accent:            oklch(0.32 0.045 245);
  --accent-foreground: oklch(0.96 0.014 83);

  --border:            oklch(0.42 0.035 248 / 0.45);
  --border-strong:     oklch(0.42 0.035 248 / 0.72);
  --input:             oklch(0.39 0.035 248 / 0.78);
  --ring:              oklch(0.652 0.101 73.2);

  --destructive:       oklch(0.704 0.191 22.216);
  --destructive-foreground: oklch(0.985 0.005 82);

  --success:           oklch(0.62 0.13 152);
  --warning:           oklch(0.652 0.101 73.2);

  --sidebar-bg:        oklch(0.18 0.04 250);
  --sidebar-fg:        oklch(0.95 0.014 83);
  --sidebar-border:    oklch(0.42 0.035 248 / 0.55);
  --sidebar-accent:    oklch(0.26 0.04 245);
  --sidebar-active:    oklch(0.652 0.101 73.2);

  --shadow-sm:         0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md:         0 4px 16px oklch(0 0 0 / 0.45);
  --shadow-lg:         0 16px 48px oklch(0 0 0 / 0.55);

  --glass:             oklch(1 0 0 / 0.04);
  --glass-hover:       oklch(1 0 0 / 0.07);
}

/* ─── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--background);
  color: var(--foreground);
}

body {
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

::selection      { background: var(--primary); color: var(--primary-foreground); }
::-moz-selection { background: var(--primary); color: var(--primary-foreground); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--background-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; color: inherit; }

/* ─── Typography ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--foreground);
  letter-spacing: -0.025em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }
p { color: var(--foreground-muted); line-height: 1.65; }

.text-primary { color: var(--primary); }
.text-blue    { color: var(--primary); }
.text-gold    { color: var(--primary); }
.text-muted   { color: var(--foreground-subtle); }
.text-center  { text-align: center; }
.accent       { color: var(--primary); }

/* ─── Layout ────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ─── Card (replaces .glass) ────────────────────────── */
.card,
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--card-foreground);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover,
.glass:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
}
.glass-gold {
  border-color: oklch(from var(--primary) l c h / 0.4);
}

/* ─── Navbar ────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
  display: flex;
  align-items: center;
  background: oklch(from var(--background) l c h / 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 28px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-logo img {
  height: 36px;
  width: auto;
  border-radius: 50%;
}
.navbar-logo-text {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--foreground);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.navbar-logo-text span { color: var(--primary); }

.navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex: 1;
  justify-content: center;
  min-width: 0;
  flex-wrap: nowrap;
}
.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground-muted);
  transition: color var(--transition), background var(--transition);
}
.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--foreground);
  background: var(--muted);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-sq-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--foreground-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.nav-sq-btn:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  background: var(--muted);
}
.nav-discord-sq:hover {
  color: #7289da;
  border-color: oklch(0.58 0.18 268 / 0.45);
}

/* Theme Toggle */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--foreground-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  position: relative;
}
.theme-toggle-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: oklch(from var(--primary) l c h / 0.08);
}
.theme-toggle-btn svg { width: 18px; height: 18px; }
.theme-toggle-btn .icon-sun  { display: none; }
.theme-toggle-btn .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle-btn .icon-sun  { display: block; }
html[data-theme="dark"] .theme-toggle-btn .icon-moon { display: none; }

/* Performance toggle (kept) */
.perf-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.perf-toggle-btn:hover { border-color: var(--border-strong); background: var(--muted); }
.perf-toggle-track {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 9999px;
  background: var(--muted);
  transition: background var(--transition);
}
.perf-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: var(--foreground-subtle);
  transition: transform var(--transition), background var(--transition);
}
.perf-toggle-btn.perf-active .perf-toggle-track { background: var(--primary); }
.perf-toggle-btn.perf-active .perf-toggle-knob {
  transform: translateX(12px);
  background: var(--primary-foreground);
}

.staff-portal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--foreground);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}
.staff-portal-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--muted);
}

.hidden-mobile { display: inline-flex; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--foreground);
  border-radius: 1px;
  transition: all var(--transition);
}

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}
.btn-lg { padding: 12px 22px; font-size: 0.95rem; }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: var(--muted);
  border-color: var(--foreground);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground-muted);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--foreground); background: var(--muted); }

.btn-danger {
  background: var(--destructive);
  color: var(--destructive-foreground);
  border-color: var(--destructive);
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-discord {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
}
.btn-discord:hover {
  background: #4752C4;
  border-color: #4752C4;
}

/* Gold-Buttons = gleicher Flächenton wie Primär (kein zweiter Orange-Gradient) */
.btn-gold {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  font-weight: 600;
}
.btn-gold:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-gold:disabled {
  opacity: 0.55;
  transform: none;
  cursor: not-allowed;
}

/* ─── Forms ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--foreground);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-size: 0.9rem;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px oklch(from var(--primary) l c h / 0.18);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--foreground-subtle); }
.form-textarea { min-height: 120px; resize: vertical; }

/* ─── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(64px, 10vw, 96px) 0 clamp(48px, 8vw, 80px);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--border);
  /* Hero hat immer dunklen Boden, auch im Light Mode */
  background:
    linear-gradient(180deg, oklch(0.18 0.05 255) 0%, oklch(0.12 0.03 260) 55%, oklch(0.1 0.02 262) 100%);
  color: oklch(0.96 0.012 82);
}
.hero h1,
.hero p,
.hero .hero-title,
.hero .hero-desc { color: inherit; }
.hero .hero-desc { color: oklch(0.85 0.012 82); }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, oklch(0.2 0.06 250 / 0.35), transparent 45%),
    radial-gradient(circle 32rem at calc(100% + 6rem) 50%, oklch(from var(--primary) l c h / 0.07), transparent 70%);
}
.hero-bg-grid, .hero-bg-grad1, .hero-bg-grad2, .hero-bg-horizon, .hero-bg-warm-right { display: none; }
.hero-sparkles { display: none; }
.stars-canvas { display: none; }

.hero-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.hero-content {
  max-width: 720px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero-title .accent { color: var(--primary); }
.hero-desc {
  font-size: clamp(0.95rem, 1.25vw, 1.1rem);
  max-width: 580px;
  margin: 0 0 22px;
  line-height: 1.65;
}
.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 580px;
}
.hero-bullets li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  color: oklch(0.78 0.012 82);
}
.hero-bullets li::before {
  content: "·";
  color: var(--primary);
  font-weight: 700;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid oklch(1 0 0 / 0.1);
  max-width: 580px;
}
.hero-stat-value {
  font-family: 'Geist', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero-stat-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.65 0.012 82);
  margin-top: 2px;
}

/* Hero Logo/Siegel rechts — frei stehend, mit eleganter Schimmer-Animation */
.hero-emblem {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 24rem;
  isolation: isolate;
}
@media (min-width: 901px) {
  .hero-emblem { justify-self: end; max-width: 26rem; }
}

/* Sanfter, pulsierender Glow hinter dem Logo — kein harter Kreis-Cut */
.hero-emblem::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(50% 50% at 50% 50%,
      oklch(from var(--primary) l c h / 0.22) 0%,
      oklch(from var(--primary) l c h / 0.08) 45%,
      transparent 70%);
  filter: blur(48px);
  z-index: -1;
  pointer-events: none;
  animation: lsds-emblem-glow 6.5s ease-in-out infinite;
  will-change: opacity, transform;
}

.hero-emblem img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  background: transparent;
  filter:
    drop-shadow(0 18px 28px oklch(0 0 0 / 0.55))
    drop-shadow(0 0 14px oklch(from var(--primary) l c h / 0.18));
  animation: lsds-emblem-float 6.5s ease-in-out infinite;
  will-change: transform, filter;
}

.hero-emblem-placeholder {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, oklch(0.25 0.06 250), oklch(0.18 0.04 255));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  color: var(--primary);
  box-shadow:
    0 0 0 1px oklch(0.5 0.06 78 / 0.25),
    0 25px 50px -12px oklch(0 0 0 / 0.55);
  animation: lsds-emblem-float 6.5s ease-in-out infinite;
}

@keyframes lsds-emblem-float {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter:
      drop-shadow(0 18px 28px oklch(0 0 0 / 0.55))
      drop-shadow(0 0 12px oklch(from var(--primary) l c h / 0.16));
  }
  50% {
    transform: translateY(-8px) scale(1.012);
    filter:
      drop-shadow(0 26px 34px oklch(0 0 0 / 0.6))
      drop-shadow(0 0 22px oklch(from var(--primary) l c h / 0.32));
  }
}

@keyframes lsds-emblem-glow {
  0%, 100% { opacity: 0.65; transform: scale(0.98); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-emblem::before,
  .hero-emblem img,
  .hero-emblem-placeholder {
    animation: none;
  }
}

/* Page hero (sub pages) */
.page-hero {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-hero-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

/* ─── Stats ─────────────────────────────────────────── */
.stat-item {
  padding: 24px 16px;
  text-align: center;
}
.stat-value {
  display: block;
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--foreground-muted);
  letter-spacing: 0.02em;
}

/* ─── Section heading ───────────────────────────────── */
.section-heading { margin-bottom: 32px; }
.section-heading.center { text-align: center; }
.section-heading h2 { margin-bottom: 8px; }
.section-heading p { color: var(--foreground-muted); max-width: 640px; }
.section-heading.center p { margin-left: auto; margin-right: auto; }

/* ─── Tile / Feature card ───────────────────────────── */
.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}
.tile:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tile-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: oklch(from var(--primary) l c h / 0.12);
  color: var(--primary);
  margin-bottom: 14px;
}
.tile-eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.tile-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.tile-desc { font-size: 0.88rem; color: var(--foreground-muted); line-height: 1.6; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* ─── Portfolio ─────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.portfolio-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--foreground);
  display: block;
}
.portfolio-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.portfolio-thumb {
  aspect-ratio: 16/10;
  background: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground-subtle);
  overflow: hidden;
  position: relative;
}
.portfolio-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Elegantes Gouverneurs-Fallback (Siegel-Optik) */
.portfolio-thumb-fallback { isolation: isolate; }
.portfolio-thumb-fallback .portfolio-fallback-inner {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, oklch(from var(--primary) l c h / 0.18), transparent 70%),
    linear-gradient(180deg, oklch(0.22 0.05 255) 0%, oklch(0.12 0.03 260) 100%);
  color: oklch(0.95 0.014 83);
  z-index: 1;
}
.portfolio-thumb-fallback:not(:has(img)) .portfolio-fallback-inner,
.portfolio-thumb-fallback.show-fallback .portfolio-fallback-inner {
  display: flex;
}
.portfolio-fallback-seal {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain !important;
  border-radius: 50%;
  filter: drop-shadow(0 4px 12px oklch(0 0 0 / 0.5));
}
.portfolio-fallback-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.portfolio-fallback-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
}
.portfolio-fallback-title {
  font-family: 'Geist', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: oklch(0.96 0.012 82);
  text-wrap: balance;
}
.portfolio-body { padding: 18px; }
.portfolio-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.portfolio-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.portfolio-desc { font-size: 0.85rem; color: var(--foreground-muted); }

/* ─── Team ──────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  transition: all var(--transition);
}
.team-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
  border: 2px solid var(--border);
}
.team-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--muted);
  border: 2px solid var(--border);
}
.team-name { font-weight: 600; margin-bottom: 4px; }
.team-role { font-size: 0.82rem; color: var(--primary); }

/* ─── Badges ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--muted);
  color: var(--foreground-muted);
  border: 1px solid var(--border);
}
.badge-primary { background: oklch(from var(--primary) l c h / 0.12); color: var(--primary); border-color: oklch(from var(--primary) l c h / 0.3); }
.badge-success { background: oklch(from var(--success) l c h / 0.12); color: var(--success); border-color: oklch(from var(--success) l c h / 0.3); }
.badge-warning { background: oklch(from var(--warning) l c h / 0.14); color: var(--warning); border-color: oklch(from var(--warning) l c h / 0.3); }
.badge-danger  { background: oklch(from var(--destructive) l c h / 0.12); color: var(--destructive); border-color: oklch(from var(--destructive) l c h / 0.3); }
/* Dashboard / Admin Status-Badges (bisher nur Klassennamen in Views) */
.badge-yellow,
.badge-gold {
  background: oklch(from var(--primary) l c h / 0.12);
  color: var(--primary);
  border-color: oklch(from var(--primary) l c h / 0.3);
}
.badge-blue {
  background: oklch(from var(--info) l c h / 0.12);
  color: var(--info);
  border-color: oklch(from var(--info) l c h / 0.3);
}
.badge-green {
  background: oklch(from var(--success) l c h / 0.12);
  color: var(--success);
  border-color: oklch(from var(--success) l c h / 0.3);
}
.badge-red {
  background: oklch(from var(--destructive) l c h / 0.12);
  color: var(--destructive);
  border-color: oklch(from var(--destructive) l c h / 0.3);
}
.badge-gray {
  background: var(--muted);
  color: var(--foreground-muted);
  border-color: var(--border);
}

/* ─── Partner-Bewerbung (Startseite / Kontakt) ───────────── */
.partner-zone .section-heading h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.partner-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px auto 0;
  padding: 5px;
  background: var(--muted);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  max-width: 440px;
}
.partner-tab {
  flex: 1;
  min-width: 132px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--foreground-muted);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.partner-tab[aria-selected="true"] {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}
.partner-panels { margin-top: 18px; }
.partner-panel[hidden] { display: none !important; }
.partner-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.partner-logo-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.partner-logo-chip img { height: 26px; width: auto; max-width: 120px; object-fit: contain; }
.partner-apply--compact .partner-apply-lead { font-size: 0.88rem; color: var(--foreground-muted); margin-bottom: 14px; }
.partner-apply-lead--spaced { margin-bottom: 16px; color: var(--foreground-muted); }

/* ─── Tables ────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.data-table th {
  background: var(--muted);
  font-weight: 600;
  color: var(--foreground);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--muted); }

/* ─── Toast ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--foreground);
  font-size: 0.88rem;
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease-out;
}
.toast.success { border-color: oklch(from var(--success) l c h / 0.5); }
.toast.error   { border-color: oklch(from var(--destructive) l c h / 0.5); color: var(--destructive); }
.toast-icon { font-weight: 700; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Footer ────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
  background: var(--background-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer-brand-logo img { border-radius: 50%; }
.footer-brand-name {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}
.footer-brand-name span { color: var(--primary); }
.footer-desc {
  font-size: 0.86rem;
  color: var(--foreground-muted);
  max-width: 360px;
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground);
  margin-bottom: 12px;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  font-size: 0.86rem;
  color: var(--foreground-muted);
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-top: 24px;
  flex-wrap: wrap;
}
.footer-legal {
  font-size: 0.72rem;
  color: var(--foreground-subtle);
  line-height: 1.6;
  max-width: 820px;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--foreground-subtle);
  white-space: nowrap;
}

/* ─── Fade-in ────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
html.perf-mode .fade-in { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ─── Modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.show, .modal-overlay.open { display: flex; }

/* Projektanfrage: exakt mittig, kein Versatz nach oben */
.modal-overlay.interest-modal-overlay {
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.modal-overlay.interest-modal-overlay .modal.interest-modal {
  margin: 0 auto;
  max-width: min(640px, calc(100vw - 32px));
  width: 100%;
  max-height: min(90vh, 880px);
  overflow-y: auto;
  flex-shrink: 0;
  align-self: center;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  max-height: none;
  margin-top: max(12px, env(safe-area-inset-top, 0px));
  margin-bottom: auto;
  overflow-y: visible;
  box-shadow: var(--shadow-lg);
}
.interest-form-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.interest-form-actions .btn {
  width: 100%;
  white-space: normal;
}
/* Checkbox-Kacheln (Projektanfrage Modal + Kontaktseite) */
.interest-mode-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  width: 100%;
  min-width: 0;
}

button.btn.interest-mode-btn {
  display: block !important;
  flex-direction: unset !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: unset !important;
  padding: 14px 16px !important;
  text-align: left !important;
  white-space: normal !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  line-height: 1.35 !important;
}

.interest-mode-btn-title {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.interest-mode-btn-hint {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.9;
  margin-top: 6px;
  line-height: 1.45;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.interest-svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.interest-step-fieldset:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.interest-price-hint {
  font-size: 0.78rem;
  color: var(--text3);
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  line-height: 1.45;
}

.interest-svc-tile {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  background: var(--card);
}
.interest-svc-tile input[type='checkbox'] {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 2px;
  accent-color: var(--primary);
}
.interest-svc-tile span:last-of-type {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.modal h2 { margin-bottom: 16px; }

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .navbar-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a { width: 100%; padding: 12px 14px; }
  .hamburger { display: flex; }
  .hidden-mobile { display: none !important; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

@media (max-width: 600px) {
  .container, .container-wide { padding: 0 18px; }
  .section { padding: 56px 0; }
}
