/* ============================================
   AIdvisors Design System v2
   Brand: Red/Coral → Purple → Deep Indigo
   Typography: Helvetica Neue / System
   Premium: Noise, particles, glassmorphism
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Brand Colors */
  --coral: #E8705A;
  --coral-light: #F0917E;
  --coral-dark: #D15A44;
  --coral-text: #B84D3A; /* AA contrast on white (4.6:1) */
  --red-warm: #C94A3A;
  --orange: #D9855D;
  --peach: #D9A88D;
  --peach-light: #F0DDD0;
  --purple-light: #9B7BBF;
  --purple: #7B5EA7;
  --purple-deep: #5B3D8F;
  --indigo: #3B2C7F;
  --navy: #2D1B5E;
  --navy-dark: #1A0F3A;
  --blue-deep: #1B1464;

  /* Neutrals */
  --white: #FFFFFF;
  --off-white: #FAF7F5;
  --gray-50: #F5F3F0;
  --gray-100: #E8E4DF;
  --gray-200: #D0CBC4;
  --gray-300: #A9A19A;
  --gray-400: #7A7269;
  --gray-500: #4A443E;
  --gray-600: #2A2520;
  --black: #1A1512;

  /* Semantic */
  --text-primary: var(--gray-600);
  --text-secondary: var(--gray-400);
  --text-on-dark: var(--off-white);
  --text-on-dark-secondary: rgba(255,255,255,0.65);
  --bg-primary: var(--white);
  --bg-secondary: var(--off-white);
  --bg-dark: var(--navy);
  --bg-dark-deep: var(--navy-dark);
  --accent: var(--coral);
  --accent-hover: var(--coral-dark);

  /* Gradients — Brand: Red-left → Purple-mid → Deep Blue-right */
  --gradient-brand: linear-gradient(135deg, #C94A3A 0%, #E8705A 18%, #D9855D 35%, #9B7BBF 55%, #5B3D8F 75%, #1B1464 100%);
  --gradient-brand-horizontal: linear-gradient(90deg, #C94A3A 0%, #E8705A 20%, #D9855D 35%, #9B7BBF 55%, #5B3D8F 75%, #1B1464 100%);
  --gradient-warm: linear-gradient(135deg, #C94A3A 0%, var(--coral) 30%, var(--orange) 50%, var(--purple-light) 80%, var(--indigo) 100%);
  --gradient-dark: linear-gradient(135deg, var(--navy-dark) 0%, var(--purple-deep) 50%, var(--blue-deep) 100%);
  --gradient-subtle: linear-gradient(180deg, var(--off-white) 0%, var(--white) 100%);
  --gradient-text: linear-gradient(135deg, var(--red-warm) 0%, var(--purple-deep) 50%, var(--indigo) 100%);
  --gradient-hero: linear-gradient(130deg, #B83A2E 0%, #D95E45 15%, #D9855D 30%, #9B7BBF 50%, #5B3D8F 70%, #2D1B5E 85%, #1B1464 100%);

  /* Typography */
  --font-primary: 'Helvetica Neue', 'Arial', system-ui, -apple-system, sans-serif;
  --font-display: 'Helvetica Neue', 'Arial', system-ui, sans-serif;
  --font-accent: 'Copperplate', 'Copperplate Gothic Light', 'small-caps', serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.1em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26,15,58,0.05);
  --shadow-md: 0 4px 12px rgba(26,15,58,0.08);
  --shadow-lg: 0 8px 30px rgba(26,15,58,0.12);
  --shadow-xl: 0 16px 50px rgba(26,15,58,0.16);
  --shadow-glow: 0 0 40px rgba(232,112,90,0.25);
  --shadow-glow-purple: 0 0 60px rgba(91,61,143,0.2);
  --shadow-card-hover: 0 12px 40px rgba(26,15,58,0.18), 0 0 0 1px rgba(232,112,90,0.08);

  /* Transitions */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --nav-height: 72px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Belt-and-braces: clip any stray horizontal overflow from grids/gradients
     that ignore body overflow (position: fixed children, -webkit-transform, etc.) */
  overflow-x: clip;
  max-width: 100vw;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: clip;
  max-width: 100vw;
}

/* Selection */
::selection {
  background: rgba(232,112,90,0.25);
  color: var(--navy-dark);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); font-weight: 700; }
h2 { font-size: var(--text-4xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl); font-weight: 600; }

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-label {
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--coral-text);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--container-lg);
}

.section {
  padding: var(--space-24) 0;
  position: relative;
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 {
  color: var(--white);
}

.section--gradient {
  background: var(--gradient-brand);
  color: var(--text-on-dark);
}

.section--gradient h1, .section--gradient h2, .section--gradient h3 {
  color: var(--white);
}

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

/* ═══ LUCIDE ICONS ═══ */
.card__icon i,
.card__icon .lucide {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
  color: var(--white);
}
.icon { display: inline-block; vertical-align: middle; }
.icon--sm i, .icon--sm .lucide { width: 18px; height: 18px; }
.icon--lg i, .icon--lg .lucide { width: 40px; height: 40px; }
.icon--coral { color: var(--coral); }
.icon--purple { color: var(--purple); }
.icon--navy { color: var(--navy); }
.icon--white { color: var(--white); }

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #000000;
  position: relative;
  overflow: hidden;
}

/* Noise grain overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 1;
}

/* Animated gradient canvas */
#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero .container {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero__content {
  max-width: min(960px, 92%);
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--nav-height) + 22vh);
  padding-bottom: var(--space-10);
}

.hero__stats { margin-top: auto !important; }

.hero__title {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--white);
  text-shadow: 0 1px 16px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 0.08em;
}

.hero__title-line { display: block; }

.hero__title-line--lead {
  font-size: 1em;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.03em;
}

.hero__title-line--punch {
  font-size: 0.82em;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.015em;
  color: rgba(255,255,255,0.85);
}

/* Floating particles */
.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hero__particle {
  position: absolute;
  width: 3px; height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: particleRise linear infinite;
}

@keyframes particleRise {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

.grid {
  display: grid;
  gap: var(--space-8);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* --- Components --- */

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 44px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--coral);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 2px 8px rgba(232,112,90,0.18);
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out);
}

.btn--primary:hover::before {
  transform: translateX(100%);
}

.btn--primary:hover {
  background: var(--coral-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232,112,90,0.25);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--gray-200);
}

.btn--secondary:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-2px);
}

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
}

.btn--outline-light:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* Primary with light outline — for use on gradient / dark backgrounds */
.btn--primary.btn--on-dark {
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn--primary.btn--on-dark:hover {
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 6px 16px rgba(0,0,0,0.14);
}

/* Glass button — translucent white-on-gradient CTA */
.btn--glass {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn--glass:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-1px);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn .arrow {
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* Skip-to-content link — hidden until focused (keyboard accessibility) */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10000;
  padding: var(--space-3) var(--space-5);
  background: var(--coral);
  color: var(--white);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  transform: translateY(-120%);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Bereich pill list — non-interactive labels (coaching topics) */
.bereich-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bereich-pill {
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-8);
  color: var(--white);
  font-weight: 600;
  text-align: center;
  font-size: var(--text-base);
  transition: transform var(--duration-normal) var(--ease-spring);
}

@media (hover: hover) {
  .bereich-pill:hover { transform: translateX(4px); }
}

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--gray-100);
  transition: all var(--duration-normal) var(--ease-spring);
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  background: linear-gradient(135deg, rgba(232,112,90,0.03) 0%, rgba(91,61,143,0.03) 100%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(232,112,90,0.15);
}

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

.card--glass {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
}

.card--glass:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.1);
  transform: translateY(-6px);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.card__tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.card__tag--coral { background: rgba(201,74,58,0.15); color: var(--coral-dark); }
.card__tag--purple { background: rgba(91,61,143,0.12); color: var(--purple-deep); }
.card__tag--navy { background: rgba(45,27,94,0.12); color: var(--navy); }

/* Stat Card — Editorial Style */
.stat {
  text-align: center;
  padding: var(--space-6) var(--space-4) var(--space-8);
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: 0 0 2px 2px;
}

.stat-card--accent-purple::before {
  background: var(--purple-deep);
}

.stat__figure {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.stat__number {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__unit {
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 1;
  margin-left: 1px;
  opacity: 0.85;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 200px;
  margin: 0 auto;
  line-height: var(--leading-normal);
}

.stat--gradient .stat__number {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  background: rgba(232,112,90,0.1);
  color: var(--coral);
}

/* Logo Wall */
.logo-wall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  flex-wrap: wrap;
  padding: var(--space-8) 0;
}

.logo-wall__item {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  color: var(--gray-300);
  white-space: nowrap;
}

.logo-wall__img {
  height: 110px;
  max-width: 260px;
  width: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 1;
  flex-shrink: 0;
  /* Kill every source of an "outline": browser focus ring, image border,
     anti-aliased alpha ring from PNGs. */
  border: 0;
  outline: 0;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.logo-wall__img--sm { height: 90px; max-width: 220px; }

/* Marquee wrapper — scrolling logo wall */
.logo-marquee {
  overflow: hidden;
  /* Softer, wider fade on both edges so logos don't appear to have a hard
     outline at the edge of the viewport as they enter/exit. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
  padding: var(--space-2) 0;
}
/* The marquee is its own "reveal" — the moving logos ARE the animation. If a
   page author puts `.fade-in` on the marquee container (which sets opacity:0),
   iOS Safari's IntersectionObserver occasionally fails to fire for this
   element (overflow:hidden + marquee animation + already-above-fold combo),
   leaving the entire logo wall permanently invisible. Force-override here so
   the marquee is always visible regardless of the fade class. */
.logo-marquee.fade-in,
.logo-marquee.fade-in-left,
.logo-marquee.fade-in-right {
  opacity: 1 !important;
  transform: none !important;
}
.logo-marquee .logo-wall {
  flex-wrap: nowrap;
  width: max-content;
  gap: var(--space-10);
  padding: var(--space-4) 0;
  /* Duration is set via the --marquee-duration custom property per-marquee
     (inline style on the .logo-marquee element), so both bands scroll at the
     same pixels/second regardless of how many logos they contain. */
  animation: logoMarquee var(--marquee-duration, 70s) linear infinite;
  /* Deliberately NO `will-change: transform` — on mobile Safari, pre-committing
     a composited layer for a 14000px+ element exceeds the compositor limit
     (~4096-8192px) and whole chunks of the layer drop (logos disappear). The
     3d transform in the keyframes is enough of a hint for GPU compositing
     without forcing a single giant layer. */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
/* Disable the hover-lift inside the marquee — it fights the scroll animation
   and creates the jittery "outline" artefact as the image re-composites. */
.logo-marquee .logo-wall__img { transition: none; }
.logo-marquee .logo-wall__img:hover { transform: none; }
/* Keep the marquee moving on hover — pausing feels broken / dead on a live page. */
@keyframes logoMarquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee .logo-wall { animation: none; }
}

/* Step Indicator */
.steps {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: center;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  max-width: 180px;
  text-align: center;
  position: relative;
}

.step__circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--white);
  position: relative;
  z-index: 1;
}

.step__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  line-height: var(--leading-tight);
}

.step__connector {
  flex: 1;
  height: 2px;
  background: var(--gray-100);
  max-width: 60px;
  align-self: flex-start;
  margin-top: 28px;
}

/* Testimonial */
.testimonial {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.testimonial__quote {
  font-size: var(--text-xl);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  position: relative;
}

.testimonial__quote::before {
  content: '«';
  font-size: var(--text-4xl);
  color: var(--coral);
  position: absolute;
  top: -10px;
  left: -30px;
  font-style: normal;
}

.testimonial__author {
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial__role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav--scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  padding: var(--space-3) 0;
}

.nav--scrolled .nav__logo,
.nav--scrolled .nav__link {
  color: var(--text-primary);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: var(--tracking-wide);
  color: var(--white);
  transition: color var(--duration-normal) var(--ease-out);
}

.nav__logo span {
  font-weight: 300;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav__link:hover {
  color: var(--white);
}

.nav--scrolled .nav__link:hover {
  color: var(--coral);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--coral);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--active {
  color: var(--white);
}

.nav--scrolled .nav__link--active {
  color: var(--coral);
}

.nav__link--active::after {
  width: 100%;
  height: 1.5px;
  background: rgba(255,255,255,0.6);
}

.nav--scrolled .nav__link--active::after {
  background: var(--coral);
}

.nav__cta {
  margin-left: var(--space-4);
  text-decoration: none !important;
}

.nav__cta::after {
  display: none;
}

/* Dropdown — Angebot */
.nav__item { position: relative; display: inline-flex; align-items: center; }

.nav__link--has-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__caret {
  transition: transform var(--duration-normal) var(--ease-out);
  opacity: 0.7;
}

.nav__item--dropdown:hover .nav__caret,
.nav__item--open .nav__caret {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 320px;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(232,112,90,0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal) var(--ease-out);
  z-index: 100;
}

/* Invisible hover bridge so cursor can cross the gap */
.nav__dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav__item--dropdown:hover .nav__dropdown,
.nav__item--dropdown:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: background var(--duration-fast) var(--ease-out);
}

.nav__dropdown-link:hover {
  background: rgba(232,112,90,0.08);
}

.nav__dropdown-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.nav__dropdown-sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.nav__dropdown-footer {
  border-top: 1px solid var(--gray-100);
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-2);
}

.nav__dropdown-all {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--coral-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__dropdown-all:hover { color: var(--coral-dark); }

.nav__mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: var(--space-2);
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.nav__mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transform-origin: center;
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out);
}

.nav--scrolled .nav__mobile-toggle span {
  background: var(--text-primary);
}

/* X animation (open state) — driven by a single class, not inline styles */
.nav__mobile-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__mobile-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Always paint the X in the primary colour, no matter whether nav is scrolled */
.nav__mobile-toggle.is-open span { background: var(--text-primary); }

/* Lock page scroll while the mobile panel is open */
body.nav-open { overflow: hidden; }

/* CRITICAL: the drawer is `position: fixed` inside .nav. Any `backdrop-filter`,
   `filter`, or `transform` on an ancestor makes that ancestor the containing
   block for fixed children (per CSS spec), trapping the drawer inside the tiny
   nav bar on subpages where .nav--scrolled is set from page load. Neutralise
   these properties on .nav whenever the drawer is open. */
body.nav-open .nav,
body.nav-open .nav--scrolled {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  will-change: auto !important;
}

/* Mobile drawer footer is only visible when the drawer is open (on mobile) */
.nav__mobile-footer { display: none; }

/* --- Footer --- */
.footer {
  background: var(--navy-dark);
  color: var(--text-on-dark-secondary);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer__brand {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer__desc {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  max-width: 300px;
}

.footer__heading {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.footer__link {
  display: block;
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer__link:hover {
  color: var(--coral-light);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s var(--ease-out);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s var(--ease-out);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.8s var(--ease-spring);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.7s var(--ease-spring);
}

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 400ms; }
.stagger.visible > *:nth-child(7) { transition-delay: 480ms; }
.stagger.visible > *:nth-child(8) { transition-delay: 560ms; }

/* Number count animation */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gradient line animation */
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-line {
  height: 3px;
  background: var(--gradient-brand-horizontal);
  background-size: 200% 200%;
  animation: gradientFlow 4s ease infinite;
  border-radius: var(--radius-full);
}

/* Pulse glow for accents */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(232,112,90,0.2); }
  50% { box-shadow: 0 0 40px rgba(232,112,90,0.4); }
}

.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* Shimmer for premium cards */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* Gradient border for featured items */
.gradient-border {
  position: relative;
  background: var(--white);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: var(--gradient-brand-horizontal);
  z-index: -1;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .stat__number { font-size: var(--text-4xl); }
  .hero { min-height: auto; padding-top: calc(var(--nav-height) + var(--space-16)); padding-bottom: var(--space-16); }
  .hero .container { flex: initial; }
  .hero__content { flex: initial; padding-top: 0; padding-bottom: 0; }
  /* Hero stats on phones: compact 3-col row, hide orphan dividers, shrink typography */
  .hero__stats {
    margin-top: var(--space-10) !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: var(--space-4) !important;
    align-items: start !important;
  }
  /* The 1px inline dividers between stats — desktop ornament, drop on mobile */
  .hero__stats > div[style*="width:1px"] { display: none !important; }
  /* Stat cells: number + label */
  .hero__stats > div > div:first-child { font-size: var(--text-3xl) !important; }
  .hero__stats > div > div:last-child { font-size: 11px !important; line-height: 1.3 !important; letter-spacing: 0.02em !important; }

  .section {
    padding: var(--space-16) 0;
  }

  .grid--2, .grid--3, .grid--4 {
    grid-template-columns: 1fr;
  }

  /* Any element with an inline multi-column grid collapses to 1-col on mobile.
     Covers: subpage dark heroes, homepage phase-flow (3-col), anywhere
     grid-template-columns is set via style="" outside a responsive class. */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: 1.25fr 1fr"],
  [style*="grid-template-columns: 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
    gap: var(--space-6) !important;
    align-items: stretch !important;
  }

  /* Reduce hero top padding on mobile so content doesn't start mid-screen */
  .section--dark[style*="padding-top"] {
    padding-top: calc(var(--nav-height) + var(--space-8)) !important;
    padding-bottom: var(--space-10) !important;
  }

  /* Rein in hero typography on small screens */
  .section--dark h1 { font-size: var(--text-3xl) !important; line-height: 1.15 !important; }
  .section--dark p { font-size: var(--text-base) !important; line-height: 1.5 !important; }

  /* Hero stat-card grids should also collapse to 1 col (they use glass cards) */
  .section--dark .card--glass + .card--glass,
  .section--dark [class*="grid-template-columns: 1fr 1fr"] { gap: var(--space-3); }

  /* Homepage hero stats row — allow wrapping + tighter gap so 1000 / 90 / 95%
     stack cleanly instead of blowing out the viewport. */
  .hero__stats {
    gap: var(--space-6) !important;
    margin-top: var(--space-10) !important;
  }
  .hero__stats > div:not([style*="width:1px"]) { flex: 1 1 40%; }
  .hero__stats > div[style*="width:1px"] { display: none; } /* vertical dividers lose meaning on mobile */

  /* ============================================
     Premium mobile drawer
     ============================================ */
  .nav__links {
    display: none !important;
    position: fixed !important;
    top: var(--nav-height) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    /* Massive z-index so no hero / overlay / modal can outrank it. .nav is
       1000, newsletter modal is 1100 — drawer must beat everything. */
    z-index: 9999 !important;
    background: var(--white) !important;
    background-image:
      radial-gradient(1200px 400px at 100% 0%, rgba(232,112,90,0.08) 0%, transparent 60%),
      radial-gradient(900px 500px at 0% 100%, rgba(91,61,143,0.08) 0%, transparent 60%) !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    isolation: isolate;
  }
  @keyframes navDrawerFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .nav__links.open { display: flex !important; animation: navDrawerFadeIn 0.25s ease; }

  /* Section labels inside the drawer ("Navigation", "Angebote", "Kontakt") */
  .nav__links::before,
  .nav__mobile-footer::before {
    content: 'Navigation';
    display: block;
    padding: var(--space-6) var(--space-6) var(--space-3);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--coral-dark);
  }
  .nav__mobile-footer::before { content: 'Kontakt'; }

  /* Top-level link rows — generous, confident, left-aligned */
  .nav__links .nav__link {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: 700;
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid rgba(232,112,90,0.08);
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: background 0.15s, color 0.15s;
  }
  .nav__links .nav__link::after { display: none; }
  .nav__links .nav__link:active { background: rgba(232,112,90,0.06); }
  .nav__links .nav__link--active {
    color: var(--coral-dark);
    box-shadow: inset 4px 0 0 var(--coral);
    background: rgba(232,112,90,0.04);
  }

  /* Hamburger toggle — always visible, always tappable on mobile */
  .nav__mobile-toggle {
    display: flex !important;
    position: relative;
    z-index: 2; /* above anything inside .nav */
    min-width: 44px;
    min-height: 44px;
  }
  /* Ensure bars always have color (cascade safety) */
  .nav .nav__mobile-toggle span,
  .nav--scrolled .nav__mobile-toggle span {
    background: var(--text-primary) !important;
  }
  .nav:not(.nav--scrolled) .nav__mobile-toggle span {
    background: var(--white) !important;
  }

  /* Kontakt CTA — centered pill, sized for thumb-reach without competing
     visually with the menu links above. */
  .nav__cta {
    display: flex !important;
    justify-content: center !important;
    margin: var(--space-6) auto var(--space-2) !important;
    padding: 0 var(--space-6) !important;
    width: 100%;
    border-bottom: none !important;
  }
  .nav__cta .btn {
    display: inline-flex;
    width: 100%;
    max-width: 320px;
    justify-content: center;
    padding: var(--space-4) var(--space-8) !important;
    border-radius: var(--radius-full) !important;
    font-size: var(--text-base) !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 24px -8px rgba(232,112,90,0.4);
  }

  /* Angebot: parent stays clean, dropdown below shows products as rich rows
     (ALWAYS EXPANDED on mobile — no extra tap needed to discover products) */
  .nav__item--dropdown {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border-bottom: 1px solid rgba(232,112,90,0.08);
  }
  .nav__item--dropdown > .nav__link--has-dropdown {
    border-bottom: none !important;
    padding-bottom: var(--space-2) !important;
  }
  .nav__link--has-dropdown { display: flex !important; }
  .nav__link--has-dropdown .nav__caret { display: none; }  /* no toggle caret on mobile — always open */

  .nav__dropdown {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0 var(--space-6) var(--space-3);
    margin: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
  }
  .nav__dropdown::before { display: none; }
  .nav__item--open .nav__dropdown { max-height: none; }

  /* Product rows inside Angebot — look like cards */
  .nav__dropdown-link {
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(232,112,90,0.04);
    border: 1px solid rgba(232,112,90,0.08);
    border-radius: var(--radius-md);
    border-bottom: 1px solid rgba(232,112,90,0.08);
    color: var(--text-primary);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
  }
  .nav__dropdown-link:active {
    background: rgba(232,112,90,0.1);
    border-color: var(--coral);
    transform: scale(0.98);
  }
  .nav__dropdown-title { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
  .nav__dropdown-sub { font-size: var(--text-xs); color: var(--text-secondary); }

  .nav__dropdown-footer {
    padding: var(--space-2) 0 0;
    border-top: none;
    background: transparent;
  }
  .nav__dropdown-all {
    font-size: var(--text-xs);
    color: var(--coral) !important;
    font-weight: 700;
  }

  /* ============================================
     Drawer footer (Kontakt section)
     ============================================ */
  .nav__mobile-footer {
    display: flex;
    flex-direction: column;
    padding: 0 0 var(--space-8);
    margin-top: var(--space-2);
  }
  .nav__mobile-contact {
    display: flex;
    flex-direction: column;
    padding: 0 var(--space-6);
    gap: var(--space-2);
  }
  .nav__mobile-contact-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--text-sm);
    background: rgba(255,255,255,0.6);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
  }
  .nav__mobile-contact-row:active {
    background: rgba(232,112,90,0.06);
    border-color: var(--coral);
    transform: scale(0.98);
  }
  .nav__mobile-contact-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--gradient-brand, linear-gradient(135deg, var(--coral), var(--purple)));
    color: var(--white);
    flex-shrink: 0;
    box-shadow: 0 4px 10px -3px rgba(232,112,90,0.4);
  }
  .nav__mobile-contact-text {
    display: flex; flex-direction: column; gap: 2px;
    line-height: 1.2; min-width: 0;
  }
  .nav__mobile-contact-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
  }
  .nav__mobile-contact-value {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nav__mobile-legal {
    display: flex; align-items: center; justify-content: center;
    gap: var(--space-2);
    font-size: var(--text-xs); color: var(--text-secondary);
    margin-top: var(--space-6);
    padding: 0 var(--space-6);
  }
  .nav__mobile-legal a { color: var(--text-secondary); text-decoration: none; font-weight: 500; }
  .nav__mobile-legal a:active { color: var(--coral); }

  .steps {
    flex-direction: column;
    gap: var(--space-4);
  }

  .step__connector {
    width: 2px;
    height: 30px;
    max-width: none;
    margin-top: 0;
    align-self: center;
  }

  .logo-wall {
    gap: var(--space-6);
  }
  /* Mobile: shorter animation so the marquee feels alive on small screens. */
  .logo-marquee .logo-wall { animation-duration: 35s; }

  /* iOS Safari's mask-image + wide composited layer = dropped frames and
     logos disappearing. Drop the mask on small screens; the marquee flows
     edge-to-edge without fade but reliably renders. */
  .logo-marquee {
    -webkit-mask-image: none;
            mask-image: none;
  }

  /* Smaller logos on mobile so the total content width stays well under the
     compositor's layer limit (~4096px). Also keeps the marquee readable. */
  .logo-wall__img { height: 56px; max-width: 160px; }
  .logo-wall__img--sm { height: 48px; max-width: 140px; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .testimonial__quote::before {
    position: static;
    display: block;
    text-align: center;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE SAFETY NET — overrides that reach inline-styled blocks
   The site uses a lot of inline grids / paddings / gaps; CSS
   class rules can't touch those, so we use attribute selectors
   to collapse the most common patterns on small screens.
   ═══════════════════════════════════════════════════════════ */

/* Prevent any horizontal overflow across the whole site */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }

@media (max-width: 768px) {
  /* Collapse inline 2-column split grids (hero + feature blocks) */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1.25fr 1fr"],
  [style*="grid-template-columns: 1.25fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Collapse inline repeat() grids and auto-fit chains */
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(5"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns:repeat(auto-fit"],
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }

  /* Tighten inline oversized gaps */
  [style*="gap:var(--space-16)"],
  [style*="gap: var(--space-16)"] { gap: var(--space-8) !important; }
  [style*="gap:var(--space-12)"],
  [style*="gap: var(--space-12)"] { gap: var(--space-8) !important; }
  [style*="gap:var(--space-10)"],
  [style*="gap: var(--space-10)"] { gap: var(--space-6) !important; }

  /* Shrink heavy inline hero padding */
  [style*="padding-top: calc(var(--nav-height) + var(--space-16))"],
  [style*="padding-top:calc(var(--nav-height) + var(--space-16))"],
  [style*="padding-top: calc(var(--nav-height) + var(--space-20))"],
  [style*="padding-top:calc(var(--nav-height) + var(--space-20))"] {
    padding-top: calc(var(--nav-height) + var(--space-8)) !important;
  }

  /* Tone down inline section padding */
  [style*="padding:var(--space-12)"],
  [style*="padding: var(--space-12)"] { padding: var(--space-8) !important; }

  /* Cap headings so inline-styled titles don't overflow tiny screens */
  h1 { font-size: var(--text-3xl) !important; line-height: 1.15; word-wrap: break-word; }
  h2 { font-size: var(--text-2xl) !important; line-height: 1.2; word-wrap: break-word; }
  h3 { font-size: var(--text-xl) !important; word-wrap: break-word; }
  h4 { word-wrap: break-word; }

  /* Any inline text-size that might be too big */
  [style*="font-size:var(--text-5xl)"],
  [style*="font-size: var(--text-5xl)"] { font-size: var(--text-3xl) !important; }
  [style*="font-size:var(--text-6xl)"],
  [style*="font-size: var(--text-6xl)"] { font-size: var(--text-3xl) !important; }
  [style*="font-size:var(--text-7xl)"],
  [style*="font-size: var(--text-7xl)"] { font-size: var(--text-4xl) !important; }
  [style*="font-size:var(--text-4xl)"],
  [style*="font-size: var(--text-4xl)"] { font-size: var(--text-2xl) !important; }

  /* Stack inline flex button groups cleanly */
  [style*="display: flex"][style*="gap: var(--space-4)"][style*="flex-wrap"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Full-width buttons inside hero action rows */
  .hero__actions .btn,
  .hero__actions > a { width: 100%; justify-content: center; }

  /* Flex-wrap card layouts (e.g., Werte) — one card per row on mobile */
  [style*="flex-wrap:wrap"] > .card[style*="flex:1 1"],
  [style*="flex-wrap: wrap"] > .card[style*="flex:1 1"] {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  /* Downscale oversized number/stat figures inline on mobile */
  [style*="font-size: var(--text-4xl)"][style*="font-weight: 800"],
  [style*="font-size:var(--text-4xl)"][style*="font-weight:800"] {
    font-size: var(--text-3xl) !important;
  }

  /* Container padding breathing room on small screens */
  .container { padding-left: var(--space-5); padding-right: var(--space-5); }

  /* Tighten Vision/Mission gradient panel so it doesn't tower on mobile */
  [style*="background:var(--gradient-brand)"][style*="padding:var(--space-12)"] {
    padding: var(--space-10) var(--space-8) !important;
  }

  /* Quiz hero grid */
  .section--gradient [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Section --gradient CTA button rows center on mobile */
  .section--gradient [style*="display: flex"] {
    justify-content: center;
  }
}

/* Extra-tight rules for phones under ~420px */
@media (max-width: 480px) {
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  .btn--lg { padding: var(--space-3) var(--space-5); font-size: var(--text-sm); }
  h1 { font-size: var(--text-2xl) !important; }
  h2 { font-size: var(--text-xl) !important; }

  /* Prevent stat labels collapsing into the number */
  .stat__number { font-size: var(--text-3xl) !important; }

  /* (Nav mobile drawer styles are fully handled by the @max-width:768px block
     above; no overrides needed at <480px) */

  /* Logo-wall cards on referenzen.html inline `min-height:180px` — too tall for phones */
  .card[style*="min-height:180px"] { min-height: 140px !important; padding: var(--space-5) !important; }

  /* Hero stats — tighten further on small phones */
  .hero__stats { gap: var(--space-3) !important; margin-top: var(--space-8) !important; }
  .hero__stats > div > div:first-child { font-size: var(--text-2xl) !important; }
  .hero__stats > div > div:last-child { font-size: 10px !important; }
}
