/* =================================================================
   SABESUS DESIGN SYSTEM — Color + Type tokens
   Brand: SABESUS Group — "Mit uns in die Zukunft"
   Derived from: sabesus.de + Fiscus Figma template (green #05806a)
   ================================================================= */

/* Self-hosted webfonts (DSGVO-konform – kein Google-CDN-Aufruf vom Browser) */
@import url('fonts/manrope/manrope.css');
@import url('fonts/poppins/poppins.css');
@import url('fonts/material-symbols/material-symbols.css');

/* Bell MT — the classical serif used in the SABESUS wordmark.
   Reserved for brand display lockups and the "SABESUS GROUP" wordmark.
   Do NOT use for UI or body copy. */
@font-face {
  font-family: 'Bell MT';
  src: url('fonts/Bell_MT_Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- BRAND COLORS ---------- */
  /* Primary — SABESUS green (warthog silhouette). Confirmed brand value: #05806a */
  --sbs-green-900:  #022e26;
  --sbs-green-800:  #034a3d;
  --sbs-green-700:  #046656;
  --sbs-green-600:  #05806a;   /* PRIMARY — confirmed brand green */
  --sbs-green-500:  #1a9a83;
  --sbs-green-400:  #4ab39e;
  --sbs-green-300:  #84ccbc;
  --sbs-green-200:  #bee2d8;
  --sbs-green-100:  #e1f1ec;
  --sbs-green-050:  #f1f8f5;
  --sbs-green-tint: rgba(5,128,106,0.15);  /* tinted bg for pills / icon tiles */

  /* Neutrals — dark forest/ink scale (Figma rgb(38,47,46) + rgb(151,151,151)) */
  --sbs-ink-900:    #1a1f1e;
  --sbs-ink-800:    #262f2e;   /* Figma primary text */
  --sbs-ink-700:    #3a4443;
  --sbs-ink-600:    #575f5e;
  --sbs-ink-500:    #979797;   /* Figma body grey */
  --sbs-ink-400:    #b4b7b6;
  --sbs-ink-300:    #d4d4d8;
  --sbs-ink-200:    #e5e7e8;
  --sbs-ink-100:    #f3f4f6;   /* Figma page bg */
  --sbs-ink-050:    #fafbfb;
  --sbs-white:      #ffffff;
  --sbs-black:      #000000;

  /* Semantic */
  --sbs-success:    #2f9d6f;
  --sbs-warning:    #e0a62c;
  --sbs-danger:     #c0453b;
  --sbs-info:       var(--sbs-green-600);

  /* ---------- SEMANTIC COLOR TOKENS ---------- */
  --bg-page:        var(--sbs-ink-100);
  --bg-surface:     var(--sbs-white);
  --bg-elevated:    var(--sbs-white);
  --bg-inverse:     var(--sbs-ink-800);
  --bg-brand:       var(--sbs-green-600);
  --bg-brand-soft:  var(--sbs-green-tint);

  --fg-primary:     var(--sbs-ink-800);
  --fg-secondary:   var(--sbs-ink-500);
  --fg-muted:       var(--sbs-ink-400);
  --fg-inverse:     var(--sbs-white);
  --fg-brand:       var(--sbs-green-600);
  --fg-on-brand:    var(--sbs-white);

  --border-subtle:  var(--sbs-ink-200);
  --border-default: var(--sbs-ink-300);
  --border-strong:  var(--sbs-ink-500);
  --border-brand:   var(--sbs-green-600);

  /* ---------- TYPOGRAPHY ---------- */
  --font-display:   'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-sans:      'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body:      'Poppins', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-wordmark:  'Bell MT', 'Bell MT Std', 'Times New Roman', Georgia, serif;
  --font-mono:      ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Type scale (from Figma) */
  --fs-display-xl: 98px;   /* Hero — Manrope SemiBold */
  --fs-display-lg: 84px;   /* Section hero — Manrope Light */
  --fs-display-md: 64px;
  --fs-h1:         48px;
  --fs-h2:         40px;   /* Manrope Medium */
  --fs-h3:         28px;   /* Manrope SemiBold */
  --fs-h4:         24px;   /* Manrope Medium */
  --fs-h5:         20px;   /* Manrope Medium */
  --fs-lead:       25px;   /* Poppins Regular (Figma section labels) */
  --fs-body-lg:    18px;
  --fs-body:       16px;   /* Poppins Regular default */
  --fs-body-sm:    14px;
  --fs-caption:    12px;

  /* Weights */
  --fw-light:      300;
  --fw-regular:    400;
  --fw-medium:     500;
  --fw-semibold:   600;
  --fw-bold:       700;

  /* Line heights (Figma uses generous leading) */
  --lh-tight:      1.05;   /* hero display */
  --lh-heading:    1.15;
  --lh-snug:       1.2;
  --lh-body:       2.2;    /* Poppins 35px on 16px — very airy */
  --lh-compact:    1.6;

  /* Letter-spacing */
  --ls-display:    -0.03em;   /* Figma hero */
  --ls-tight:      -0.01em;
  --ls-normal:     0;
  --ls-wide:       0.04em;

  /* ---------- SPACING (8px base) ---------- */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   20px;
  --sp-6:   24px;
  --sp-8:   32px;
  --sp-10:  40px;
  --sp-12:  48px;
  --sp-16:  64px;
  --sp-20:  80px;
  --sp-24:  96px;
  --sp-32:  128px;

  /* Page gutter (Figma uses 200px margins on 1920) */
  --gutter:        200px;
  --gutter-md:     64px;
  --gutter-sm:     24px;
  --content-max:   1520px;

  /* ---------- RADII ---------- */
  --r-sm:   8px;
  --r-md:   15px;   /* Figma "Guide" pill */
  --r-lg:   26px;   /* Figma primary button */
  --r-xl:   30px;   /* Figma hero image */
  --r-2xl:  35px;   /* Figma service cards */
  --r-pill: 999px;
  --r-full: 50%;

  /* ---------- SHADOWS ---------- */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:  0 8px 20px rgba(0,0,0,0.05);
  --shadow-lg:  22px 40px 40px rgba(0,0,0,0.05); /* Figma card shadow */
  --shadow-xl:  0 30px 60px rgba(0,0,0,0.08);

  /* ---------- TRANSITIONS ---------- */
  --ease-out:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    120ms;
  --dur-med:     220ms;
  --dur-slow:    420ms;
}

/* =================================================================
   SEMANTIC ELEMENT DEFAULTS
   ================================================================= */

html, body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-compact);
  color: var(--fg-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--fg-primary);
  margin: 0;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: var(--fs-display-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

h2 {
  font-size: var(--fs-display-lg);
  font-weight: var(--fw-light);
  line-height: 1.13;
  letter-spacing: var(--ls-display);
}

h3 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  line-height: 1.2;
}

h4 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-medium);
}

h6 {
  font-size: var(--fs-h5);
  font-weight: var(--fw-medium);
}

p, li {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--fg-secondary);
  line-height: 2.1;
}

small {
  font-size: var(--fs-body-sm);
  color: var(--fg-muted);
}

code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

a {
  color: var(--fg-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover {
  color: var(--sbs-green-800);
}

/* ---------- Material Symbols Rounded — ligature support ---------- */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

/* ---------- Utility section label (underlined small caps-ish) ---------- */
.sbs-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-weight: var(--fw-medium);
  font-size: var(--fs-h5);
  color: var(--fg-primary);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.sbs-eyebrow::before {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--fg-brand);
  text-decoration: none;
}

/* =================================================================
   MOBILE NAV — Hamburger-Button + Drawer
   Sichtbar nur unterhalb 720 px, sonst per CSS ausgeblendet.
   ================================================================= */
.nav-burger {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 10px;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 10px;
}
.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--sbs-ink-800);
  border-radius: 2px;
  transition: transform var(--dur-med) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-burger:focus-visible {
  outline: 2px solid var(--sbs-green-600);
  outline-offset: 2px;
}

.nav-mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px 24px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 128px; /* unter der sticky-Nav */
  z-index: 49;
}
.nav-mobile-drawer.open { display: flex; }
.nav-mobile-drawer a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--sbs-ink-800);
  text-decoration: none;
  padding: 14px 12px;
  border-radius: 12px;
  transition: background var(--dur-fast) var(--ease-out);
}
.nav-mobile-drawer a:hover,
.nav-mobile-drawer a:focus-visible {
  background: var(--sbs-ink-100);
}
.nav-mobile-drawer a.active {
  background: var(--sbs-green-tint);
  color: var(--sbs-green-700);
}
.nav-mobile-drawer .btn {
  margin-top: 10px;
  justify-content: center;
}
/* Body-Scroll lock wenn Drawer offen */
body.nav-open { overflow: hidden; }

/* =================================================================
   MOBILE LAYOUT — gemeinsame Mobile-Overrides für index + Subpages
   Greift unterhalb 720 px (Tablet-Portrait und kleiner).
   !important nötig, weil die Inline-<style>-Blocks der HTMLs nach
   dieser Datei geladen werden — bei gleicher Spezifität gewänne sonst
   die Inline-Regel.
   ================================================================= */
@media (max-width: 720px) {
  /* Hamburger zeigen, Desktop-Links + Anfragen-CTA verstecken */
  .nav-burger { display: flex !important; }
  nav.main .links,
  nav.main .nav-cta { display: none !important; }
  nav.main { padding: 14px 0 !important; gap: 12px !important; }
  nav.main .logo img { height: 56px !important; }

  /* Page-Container weiter zusammenfassen */
  .page { padding: 0 20px !important; }

  /* Section-Heads dürfen die volle Mobile-Breite nutzen */
  .section-head,
  .section-head.center { max-width: 100% !important; }

  /* CTA-Strip stack */
  .cta-strip { padding: 40px 24px !important; border-radius: 28px !important; margin: 40px 0 !important; }
  .cta-strip h2 { font-size: 36px !important; line-height: 1.15 !important; }

  /* Footer-Bottom in eine Spalte */
  .footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 14px !important; }
  .footer-bottom .legal { flex-wrap: wrap !important; }

  /* Stats / KPIs auf einem schmalen Mobile in eine Spalte */
  .stats { grid-template-columns: 1fr !important; }
  .kpis { grid-template-columns: 1fr !important; }
  .stats .stat,
  .kpis .kpi { border-right: 0 !important; padding: 12px 24px !important; }

  /* Page-Hero: weniger Polster auf Mobile */
  .page-hero { padding: 32px 0 48px 0 !important; }

  /* Lange deutsche Wörter dürfen auf Mobile umbrechen / Silbentrennung */
  h1, h2, h3, .hero h1, .page-hero h1, .section-head h2, .vision-band h2 {
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
  }
  /* Globaler Schutz gegen horizontalen Overflow durch zu starre Inline-Boxen */
  body { overflow-x: hidden; }
}
