/* ==========================================================================
   Design-Tokens – übernommen aus der Bieterplattform
   Quelle: bieterverfahren-plattform, frontend/app/assets/css/tokens.css
   (Stand main 3c3b800 / prod v1.2.0, 20.10.2026): Geometrie und Typografie aus
   Prototyp D, Farbwelt Schiefer/Creme aus F.6. Werte hier nur gemeinsam mit der
   Plattform ändern, damit Website und Plattform wie aus einem Guss wirken.
   Hell/Dunkel: ohne Auswahl gilt prefers-color-scheme; der Schalter in der
   Kopfzeile (assets/js/site.js) setzt wie auf der Plattform data-theme.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* --- Flächen (F.6) ------------------------------------------------------ */
  --c-bg:            #faf8f4;   /* Seitenhintergrund, Off-White */
  --c-bg-alt:        #f1ebdf;   /* Creme-Sektionen */
  --c-surface:       #ffffff;   /* Karten */
  --c-surface-2:     #f4efe6;   /* Infokästen, ruhige Sektionen */
  --c-fill:          rgba(63, 77, 86, .10);
  --c-fill-strong:   rgba(63, 77, 86, .18);
  --c-line:          rgba(31, 42, 48, .12);
  --c-line-strong:   rgba(31, 42, 48, .28);
  --c-glass:         rgba(250, 248, 244, .88);
  --c-glass-strong:  rgba(255, 255, 255, .94);

  /* --- Text ----------------------------------------------------------------- */
  --c-text:          #1f2a30;
  --c-text-2:        #66727a;   /* auf Off-White */
  --c-text-on-tint:  #5f6b73;   /* auf Cremeflächen, hält AA */

  /* --- Akzent: Schiefer, Nebenbutton Creme ---------------------------------- */
  --c-accent:             #3f4d56;
  --c-accent-hover:       #303d46;
  --c-on-accent:          #ffffff;
  --c-accent-soft:        #e7dcc6;
  --c-accent-soft-hover:  #ddd0b5;
  --c-link:               #3f4d56;
  --c-focus:              #3f4d56;

  /* --- Status und Rückmeldungen (Bedeutung wie auf der Plattform) ---------- */
  --c-live-fg:  #1a7f37;  --c-live-bg:  #e6f6ea;
  --c-award-fg: #7a2fa5;  --c-award-bg: #f4ebfa;
  --c-success:  #1a7f37;  --c-success-bg: #e6f6ea;
  --c-warning:  #a34a00;  --c-warning-bg: #fff1e0;
  --c-info:     #3f4d56;  --c-info-bg:    #f4efe6;

  /* Lichtflecken im Seitenkopf */
  --c-hero-cream: rgba(231, 220, 198, .45);
  --c-hero-slate: rgba(63, 77, 86, .12);

  /* --- Typografie: Systemschrift (SF Pro auf Apple-Geräten), keine Webfonts - */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Inter, Arial, sans-serif;
  /* Größe · Zeilenabstand · Laufweite als Sets: groß = eng + negativ */
  --fs-hero:  clamp(2.5rem, 1.6rem + 4.4vw, 5rem);        --lh-hero: 1.05;  --tr-hero: -0.03em;
  --fs-h1:    clamp(2rem, 1.5rem + 2.4vw, 3.25rem);       --lh-h1:   1.08;  --tr-h1:   -0.025em;
  --fs-h2:    clamp(1.625rem, 1.3rem + 1.5vw, 2.5rem);    --lh-h2:   1.12;  --tr-h2:   -0.02em;
  --fs-h3:    1.3125rem;                                  --lh-h3:   1.24;  --tr-h3:   -0.012em;
  --fs-lead:  clamp(1.1875rem, 1.1rem + .4vw, 1.4375rem); --lh-lead: 1.38;  --tr-lead: -0.01em;
  --fs-body:  1.0625rem;                                  --lh-body: 1.5;   --tr-body: -0.01em;
  --fs-small: .9375rem;                                   --lh-small: 1.45; --tr-small: -0.005em;
  --fs-caption: .8125rem;                                 --lh-caption: 1.4; --tr-caption: 0;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700;

  /* --- Abstände (8er-Raster in rem) ----------------------------------------- */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem;   --sp-7: 3rem;  --sp-8: 4rem;   --sp-9: 6rem; --sp-10: 8rem;

  /* --- Radien, Schatten, Bewegung ------------------------------------------- */
  --r-xs: 8px; --r-s: 12px; --r-m: 16px; --r-l: 22px; --r-xl: 30px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(31,42,48,.04), 0 2px 10px rgba(31,42,48,.04);
  --sh-2: 0 4px 14px rgba(31,42,48,.06), 0 16px 40px rgba(31,42,48,.08);
  --ease-spring: cubic-bezier(.22, 1, .36, 1);
  --dur-fast: 150ms; --dur-med: 320ms; --dur-slow: 560ms;

  /* --- Layout ----------------------------------------------------------------- */
  --max-w: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --nav-h: 52px;
}

/* Dunkel: dieselben Werte wie data-theme="dark" der Plattform – einmal für die
   Systemeinstellung (sofern nicht ausdrücklich „hell“ gewählt), einmal für die Auswahl „dunkel“ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #161c20; --c-bg-alt: #1b2329; --c-surface: #222b31; --c-surface-2: #2b363d;
    --c-fill: rgba(167,176,181,.14); --c-fill-strong: rgba(167,176,181,.24);
    --c-line: rgba(243,239,231,.12); --c-line-strong: rgba(243,239,231,.28);
    --c-glass: rgba(22,28,32,.90); --c-glass-strong: rgba(34,43,49,.96);
    --c-text: #f3efe7; --c-text-2: #a7b0b5; --c-text-on-tint: #a7b0b5;
    --c-accent: #e7dcc6; --c-accent-hover: #f3ead9; --c-on-accent: #1f2a30;
    --c-accent-soft: #354149; --c-accent-soft-hover: #3f4d56;
    --c-link: #e7dcc6; --c-focus: #e7dcc6;
    --c-live-fg: #4cd471; --c-live-bg: rgba(48,209,88,.16);
    --c-award-fg: #da8fff; --c-award-bg: rgba(191,90,242,.2);
    --c-success: #4cd471; --c-success-bg: rgba(48,209,88,.16);
    --c-warning: #ffb340; --c-warning-bg: rgba(255,159,10,.16);
    --c-info: #e7dcc6; --c-info-bg: #2b363d;
    --c-hero-cream: rgba(231,220,198,.08); --c-hero-slate: rgba(167,176,181,.08);
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 8px 30px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --c-bg: #161c20; --c-bg-alt: #1b2329; --c-surface: #222b31; --c-surface-2: #2b363d;
  --c-fill: rgba(167,176,181,.14); --c-fill-strong: rgba(167,176,181,.24);
  --c-line: rgba(243,239,231,.12); --c-line-strong: rgba(243,239,231,.28);
  --c-glass: rgba(22,28,32,.90); --c-glass-strong: rgba(34,43,49,.96);
  --c-text: #f3efe7; --c-text-2: #a7b0b5; --c-text-on-tint: #a7b0b5;
  --c-accent: #e7dcc6; --c-accent-hover: #f3ead9; --c-on-accent: #1f2a30;
  --c-accent-soft: #354149; --c-accent-soft-hover: #3f4d56;
  --c-link: #e7dcc6; --c-focus: #e7dcc6;
  --c-live-fg: #4cd471; --c-live-bg: rgba(48,209,88,.16);
  --c-award-fg: #da8fff; --c-award-bg: rgba(191,90,242,.2);
  --c-success: #4cd471; --c-success-bg: rgba(48,209,88,.16);
  --c-warning: #ffb340; --c-warning-bg: rgba(255,159,10,.16);
  --c-info: #e7dcc6; --c-info-bg: #2b363d;
  --c-hero-cream: rgba(231,220,198,.08); --c-hero-slate: rgba(167,176,181,.08);
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 8px 30px rgba(0,0,0,.5);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Mehr Kontrast gewünscht → Sekundärtext wie Haupttext, kräftige Linien */
@media (prefers-contrast: more) {
  :root, :root[data-theme] { --c-text-2: var(--c-text); --c-text-on-tint: var(--c-text); --c-line-strong: var(--c-text); }
}
/* Weniger Transparenz gewünscht → Glas wird solide */
@media (prefers-reduced-transparency: reduce) {
  :root, :root[data-theme] { --c-glass: var(--c-bg); --c-glass-strong: var(--c-surface); }
}
