/* ============================================================
   IMMOWEB TEMPLATE 2026 · DESIGN SYSTEM TOKEN
   FluentSnippet · Styles (CSS) · Frontend head · Prio 10
   ============================================================ */

:root {
  /* ====== LAYOUT ====== */
  --container-max: 85rem;
  --content-x: 20px;   /* horizontales Content-Padding – Nav UND Sections */

  /* ====== FARB-TOKENS ====== */
  --brand-1: #0F0F0F;
  --brand-2: #FEC800;
  --light-1: #FFFFFF;
  --light-2: #F5F5F5;
  --light-3: #E2E2E2;
  --dark-1:  #232323;
  --dark-2:  #3C3C3C;
  --dark-3:  #555555;

  /* ====== SEMANTISCHE FARB-TOKENS ====== */
  --color-heading:    var(--dark-1);
  --color-text:       var(--dark-2);
  --color-text-muted: #6B6B6B;   /* war #999999 (2,85:1 – unter WCAG AA) */

  /* ====== STATUS-FARBEN ======
     Bewusst NICHT pro Kunde änderbar: Grün heißt Erlös, Rot heißt
     Fehler. Erlernte Bedeutung, keine Marke. Alle Werte ≥ 4,5:1
     auf Weiß. */
  --color-success:      #1E7A47;   /* 5,34:1 – Erlös, Bestätigung */
  --color-success-soft: #EAF5EF;
  --color-warning:      #B25E09;   /* 4,67:1 – Hinweis, Zusatzkosten */
  --color-warning-soft: #FBF2E8;
  --color-error:        #B3261E;   /* 6,29:1 – Validierungsfehler */
  --color-error-soft:   #FCEEED;

  /* ====== RADIUS ======
     Abgeleitet von --radius-base → ein Wert steuert die Rundung des ganzen
     Templates (scharf ↔ weich). Pro Variante nur --radius-base drehen. */
  --radius-base: 0.2rem;                         /* Grundwert – hier justieren */
  --radius-sm:   calc(var(--radius-base) * 0.5); /* Badges, kleine Elemente */
  --radius-md:   var(--radius-base);             /* Buttons, Inputs */
  --radius-lg:   calc(var(--radius-base) * 1.5); /* Cards */
  --radius-full: 9999px;                         /* Pills, runde Icons */

  /* ====== SHADOW ====== */
  --shadow-sm: 0 1px 2px rgba(25, 24, 27, 0.06);
  --shadow-md: 0 4px 12px rgba(25, 24, 27, 0.08);
  --shadow-lg: 0 12px 32px rgba(25, 24, 27, 0.12);

  /* ====== BORDER ====== */
  --ds-border-color: var(--light-3);
  --border-color:    var(--ds-border-color);   /* Alias: Components nutzt beide Namen */
  --border-width: 1px;
  --divider-color: #D1D1D1;

  /* ====== FOCUS ======
     Zentraler Fokus-Ring für alle Bedienelemente. Farbe aus
     --brand-2 → zieht pro Kunde automatisch mit. */
  --focus-ring:   0 0 0 3px color-mix(in srgb, var(--brand-2) 40%, transparent);
  --focus-offset: 2px;

  /* ====== FONT-TOKENS ====== */
  --font-heading: "Inter", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-features: "cv11", "ss01", "liga" 1, "calt" 1;

  /* ====== SPACING-SKALA (innerhalb von Komponenten) ======
     Section-Padding regelt den Rhythmus ZWISCHEN Sektionen.
     Diese Skala regelt Abstände INNERHALB einer Komponente
     (Padding, Feldabstände, Panel-Innenraum). Tailwind-Skala: 4 = 1rem. */
  --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;

  /* ====== TRANSITION ====== */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* ====== SECTION-PADDING (Basis / Desktop) ====== */
  --section-x-min: 1.25rem;   --section-x-max: 5rem;
  --section-xxl-min: 9.375rem; --section-xxl-max: 10rem;
  --section-xl-min:  6.875rem; --section-xl-max:  7.5rem;
  --section-l-min:   5.625rem; --section-l-max:   6.25rem;
  --section-m-min:   5rem;     --section-m-max:   5rem;
  --section-s-min:   3.75rem;  --section-s-max:   3.75rem;
  --section-xs-min:  2.5rem;   --section-xs-max:  2.5rem;
  --section-xxs-min: 1.5rem;   --section-xxs-max: 1.5rem;
  --section-header-min: 1.25rem; --section-header-max: 1.25rem;

  /* ====== SECTION SPEZIAL ====== */
  --section-hero-height: 56vh;
  --section-offset-header: 80px;
  --section-narrow: 62.5rem;
  --section-narrow-xs: 45rem;
}


/* ====== FONT-FEATURES (Element-Regel, gehört außerhalb :root) ====== */
body,
[class*="heading-"],
[class*="body-"] {
  font-feature-settings: var(--font-features);
}


/* ============================================
   FOKUS · GLOBALE BASIS
   --------------------------------------------
   :focus-visible greift nur bei Tastaturbedienung, nicht bei
   Mausklick – kein störender Ring beim Klicken.
   ============================================ */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: var(--focus-offset);
}


/* ============================================
   TEXTFARB-UTILITIES
   --------------------------------------------
   Ergänzung zu den bg-*-Utilities im Core-Snippet.
   Ändern NUR die Farbe – im Gegensatz zu body-*/heading-*,
   die Größe, Zeilenhöhe und Farbe als Paket setzen.
   ============================================ */
.text-brand-1 { color: var(--brand-1); }
.text-brand-2 { color: var(--brand-2); }
.text-light-1 { color: var(--light-1); }
.text-light-3 { color: var(--light-3); }
.text-muted   { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error   { color: var(--color-error); }


/* ============================================
   SECTION-PADDING · RESPONSIVE OVERRIDES
   --------------------------------------------
   Überschreibt die Basis-Section-Variablen je Breakpoint.
   Tablet ~-25%, Mobile ~-50%.
   ============================================ */

/* --- Tablet (768–1024px): ~-25% --- */
@media (max-width: 1024px) and (min-width: 768px) {
  :root {
    --section-x-min: 1.125rem;  --section-x-max: 3rem;
    --section-xxl-min: 7rem;    --section-xxl-max: 7.5rem;
    --section-xl-min:  5.25rem;  --section-xl-max:  5.625rem;
    --section-l-min:   4.25rem;  --section-l-max:   4.75rem;
    --section-m-min:   3.75rem;  --section-m-max:   3.75rem;
    --section-s-min:   2.75rem;  --section-s-max:   2.75rem;
    --section-xs-min:  2rem;     --section-xs-max:  2rem;
    --section-xxs-min: 1.125rem; --section-xxs-max: 1.125rem;
    --section-header-min: 1rem;  --section-header-max: 1rem;
    --section-offset-header: 72px;
  }
}

/* --- Mobile (≤767px): ~-50% --- */
@media (max-width: 767px) {
  :root {
    --section-x-min: 1rem;      --section-x-max: 2rem;
    --section-xxl-min: 4.6875rem; --section-xxl-max: 5rem;
    --section-xl-min:  3.4375rem; --section-xl-max:  3.75rem;
    --section-l-min:   2.8125rem; --section-l-max:   3.125rem;
    --section-m-min:   2.5rem;   --section-m-max:   2.5rem;
    --section-s-min:   1.875rem; --section-s-max:   1.875rem;
    --section-xs-min:  1.25rem;  --section-xs-max:  1.25rem;
    --section-xxs-min: 0.75rem;  --section-xxs-max: 0.75rem;
    --section-header-min: 0.75rem; --section-header-max: 0.75rem;
    --section-offset-header: 56px;
  }
}