/* =====================================================================
   Culturetek Design System — MASTERPLAN §3
   CULA-163 / W2+W3
   ===================================================================== */

:root {
  /* ── Brand Colors (Navy/Coral) ──────────────────────────────────── */
  --ct-navy-900:    #0B2545;
  --ct-navy-700:    #1E3A60;
  --ct-navy-500:    #375685;
  --ct-coral-600:   #DA6A3C;
  --ct-coral-500:   #F08455;
  --ct-coral-100:   #FCE6DA;

  /* ── Neutral / Slate ────────────────────────────────────────────── */
  --ct-slate-900:   #1E2735;
  --ct-slate-700:   #4B5263;
  --ct-slate-500:   #8C939E;
  --ct-slate-200:   #D5DAE3;

  /* ── Surface / Backgrounds ──────────────────────────────────────── */
  --ct-surface-50:  #F5F6F8;
  --ct-surface-100: #ECEFF4;
  --ct-white:       #FFFFFF;

  /* ── Semantic ───────────────────────────────────────────────────── */
  --ct-green-700:   #15803D;
  --ct-amber-700:   #B45309;
  --ct-red-700:     #B91C1C;

  /* ── Typography ─────────────────────────────────────────────────── */
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  /* ── Spacing (8px grid) ─────────────────────────────────────────── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* ── Layout ─────────────────────────────────────────────────────── */
  --container-narrow: 720px;
  --container-prose:  900px;
  --container-wide:   1200px;
  --container-hero:   1440px;
  --section-pad:      96px;

  /* ── Radius ─────────────────────────────────────────────────────── */
  --radius-sm:   4px;
  --radius-input: 8px;
  --radius-card: 12px;
  --radius-card-lg: 16px;
  --radius-hero: 24px;
  --radius-pill: 999px;

  /* ── Shadows ────────────────────────────────────────────────────── */
  --shadow-sm:   0 1px 2px rgba(11,37,69,0.04);
  --shadow-md:   0 4px 16px rgba(11,37,69,0.08);
  --shadow-lg:   0 8px 24px rgba(11,37,69,0.12);
  --shadow-xl:   0 12px 36px rgba(11,37,69,0.18);
  --shadow-hero: 0 24px 48px rgba(11,37,69,0.24);
}

/* ── Global Reset Additions ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ── Typography Scale ──────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ct-slate-900);
  background: var(--ct-white);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ct-navy-900);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ct-navy-900);
}

h3, h4 {
  font-family: var(--font-body);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--ct-navy-900);
}

p.lead {
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ct-slate-700);
}

/* ── Section Padding ───────────────────────────────────────────────────── */
.ct-section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

@media (max-width: 768px) {
  .ct-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/* ── Container Variants ────────────────────────────────────────────────── */
.ct-container {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.ct-container--narrow { max-width: var(--container-narrow); }
.ct-container--prose  { max-width: var(--container-prose); }
.ct-container--hero   { max-width: var(--container-hero); }

/* ── Button Variants ───────────────────────────────────────────────────── */
.ct-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.ct-btn:focus-visible {
  outline: 3px solid var(--ct-coral-500);
  outline-offset: 3px;
}

.ct-btn--primary {
  background: var(--ct-coral-600);
  color: var(--ct-white);
  border-color: var(--ct-coral-600);
}

.ct-btn--primary:hover {
  background: var(--ct-navy-900);
  border-color: var(--ct-navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ct-btn--secondary {
  background: transparent;
  color: var(--ct-navy-900);
  border-color: var(--ct-navy-900);
}

.ct-btn--secondary:hover {
  background: var(--ct-navy-900);
  color: var(--ct-white);
  transform: translateY(-2px);
}

.ct-btn--ghost {
  background: transparent;
  color: var(--ct-coral-600);
  border-color: transparent;
  padding-inline: 8px;
}

.ct-btn--ghost:hover {
  color: var(--ct-navy-900);
  text-decoration: underline;
}

.ct-btn--sm { padding: 10px 16px; font-size: 14px; }
.ct-btn--lg { padding: 18px 32px; font-size: 18px; border-radius: 12px; }

/* ── Card Base ─────────────────────────────────────────────────────────── */
.ct-card {
  background: var(--ct-white);
  border-radius: var(--radius-card-lg);
  padding: var(--space-8);
  border: 1px solid var(--ct-slate-200);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ct-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.ct-card--featured {
  border: 2px solid var(--ct-coral-600);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(218,106,60,0.1);
}

/* ── Stat Counter ──────────────────────────────────────────────────────── */
.ct-stat-number {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  color: var(--ct-coral-600);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ct-stat-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--ct-slate-700);
  margin-top: var(--space-2);
}

/* ── Section BG Variants ───────────────────────────────────────────────── */
.ct-bg-white     { background: var(--ct-white); }
.ct-bg-surface   { background: var(--ct-surface-50); }
.ct-bg-surface-alt { background: var(--ct-surface-100); }
.ct-bg-navy      { background: var(--ct-navy-900); color: var(--ct-white); }
.ct-bg-navy h1,
.ct-bg-navy h2,
.ct-bg-navy h3  { color: var(--ct-white); }
.ct-bg-navy p   { color: rgba(255,255,255,0.8); }

/* ── Fade-in-up animation (scroll-triggered via JS) ────────────────────── */
.ct-fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .ct-fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Logo Wall ─────────────────────────────────────────────────────────── */
.ct-logo-wall {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  justify-content: center;
}

.ct-logo-wall img {
  height: 40px;
  width: auto;
  filter: grayscale(100%) opacity(0.6);
  transition: filter 0.2s ease;
}

.ct-logo-wall img:hover {
  filter: grayscale(0%) opacity(1);
}

/* ── Process Timeline ──────────────────────────────────────────────────── */
.ct-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-6);
  position: relative;
}

.ct-timeline-step {
  text-align: center;
  position: relative;
}

.ct-timeline-step__number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--ct-coral-600);
  color: var(--ct-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin: 0 auto var(--space-3);
}

/* ── Compliance Badges ─────────────────────────────────────────────────── */
.ct-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px;
  background: var(--ct-surface-50);
  border: 1px solid var(--ct-slate-200);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ct-navy-900);
}

/* ── ROI Calculator ────────────────────────────────────────────────────── */
.ct-calculator {
  background: var(--ct-white);
  border-radius: var(--radius-hero);
  padding: var(--space-12);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--ct-slate-200);
}

.ct-calculator__label {
  font-weight: 600;
  color: var(--ct-slate-900);
  margin-bottom: var(--space-2);
  font-size: 15px;
}

.ct-calculator__input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--ct-slate-200);
  border-radius: var(--radius-input);
  font-size: 16px;
  font-family: var(--font-body);
  color: var(--ct-slate-900);
  transition: border-color 0.2s ease;
}

.ct-calculator__input:focus {
  outline: none;
  border-color: var(--ct-coral-600);
}

.ct-calculator__result {
  background: var(--ct-navy-900);
  color: var(--ct-white);
  border-radius: var(--radius-card);
  padding: var(--space-8);
  text-align: center;
  margin-top: var(--space-8);
}

.ct-calculator__result-number {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  color: var(--ct-coral-500);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ct-calculator__range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--ct-slate-200);
  outline: none;
  cursor: pointer;
}

.ct-calculator__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ct-coral-600);
  cursor: pointer;
}

/* ── Responsive helpers ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ct-hide-mobile { display: none !important; }
  .ct-calculator  { padding: var(--space-6); }
}

@media (min-width: 769px) {
  .ct-hide-desktop { display: none !important; }
}

/* ── CULA-171: Offizielle Struktur spacing fix on /ueber-uns/ ──────────── */
/* Root cause: browser-default <p> margins (~1em) inflating rows to ~54px. */
/* Fix: zero margins + 8px row padding → ~17px visual gap between rows.   */

#brxe-uy14pd p.brxe-text-basic {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#brxe-uy14pd > .brxe-container {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

@media (max-width: 767px) {
  #brxe-uy14pd > .brxe-container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

/* ── CULA-202: Flag-Switcher (DE↔EN cross-domain) ────────────────────── */
.ct-flag-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ct-flag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  font-size: 0;
  line-height: 0;
}

.ct-flag-btn img {
  width: 30px;
  height: 30px;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.ct-flag-active {
  opacity: 1;
  border-color: var(--ct-navy-900, #0D1B2A);
}

.ct-flag-inactive {
  opacity: 0.6;
}

.ct-flag-btn:hover {
  transform: scale(1.1);
  opacity: 1;
}

.ct-flag-btn:hover::after {
  content: attr(title);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(13, 27, 42, 0.88);
  color: #fff;
  font-size: 11px;
  font-family: var(--font-body, sans-serif);
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 200;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
}

.ct-flag-active::before {
  content: '';
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ct-coral-500, #E86535);
  border: 1px solid #fff;
  z-index: 1;
}

@media (max-width: 767px) {
  .ct-flag-btn {
    width: 26px;
    height: 26px;
  }
  .ct-flag-btn img {
    width: 26px;
    height: 26px;
  }
}

/* Flag-switcher always visible — override Bricks lazy-load */
#brxe-flgrow.bricks-lazy-hidden,
#brxe-flgrow {
  visibility: visible !important;
  opacity: 1 !important;
  display: flex !important;
}
