/* ==========================================================================
   Alfa Romeo Portal (ARP) – Design Tokens
   Quelle: Analyse von www.alfa-romeo-portal.com (WoltLab-Style "ARP Style",
           style-2.css, Stand 16.06.2026) + ARP Adventskalender 2025
   Stand:  04.11.2026 · Version 1.0
   --------------------------------------------------------------------------
   Aufbau:
     1. Basis-Tokens (Rohwerte, 1:1 von der Website übernommen)
     2. Semantische Tokens (Verwendung, darauf baut der Code auf)
     3. Adventskalender-Erweiterung (Vorschlag, aus dem Kalender 2025 abgeleitet)
   Regel: Im Projektcode nur semantische Tokens (--arp-color-*, --arp-*)
          verwenden, keine Hex-Werte direkt.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Schrift – selbst gehostet (DSGVO: keine Google-Fonts-CDN-Einbindung)
   Pfade relativ zu /tokens/ – im Projekt ggf. anpassen.
   -------------------------------------------------------------------------- */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300; font-display: swap;
  src: local("Open Sans Light"), local("OpenSans-Light"), url("fonts/OpenSans-Light.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: local("Open Sans Regular"), local("OpenSans-Regular"), url("fonts/OpenSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: local("Open Sans Italic"), local("OpenSans-Italic"), url("fonts/OpenSans-Italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: local("Open Sans SemiBold"), local("OpenSans-SemiBold"), url("fonts/OpenSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: local("Open Sans Bold"), local("OpenSans-Bold"), url("fonts/OpenSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 800; font-display: swap;
  src: local("Open Sans ExtraBold"), local("OpenSans-ExtraBold"), url("fonts/OpenSans-ExtraBold.woff2") format("woff2"); }

:root {
  /* ======================================================================
     1. BASIS-TOKENS
     ====================================================================== */

  /* Markenrot */
  --arp-red-900: #990000;   /* ARP Rot – Primärfarbe, theme-color der Website */
  --arp-red-800: #b40000;   /* Dunkles Signalrot – Icons "gelöscht" */
  --arp-red-700: #cc0001;   /* Signalrot – Update-Badges, Pflichtfelder, Formfehler */
  --arp-red-600: #cc0000;   /* Badge "rot" */

  /* Neutrale Töne */
  --arp-anthracite: #333333; /* Text, Top-Navigation, Copyright-Footer, Hover */
  --arp-graphite:   #3a3a3d; /* Text in Mobile-Menüs */
  --arp-grey-600:   #6c6c6c; /* gedimmter Text (Mobile-Menü) */
  --arp-grey-500:   #7d8264; /* deaktivierter Text */
  --arp-grey-400:   #aeb0b3; /* deaktivierter Rahmen */
  --arp-grey-300:   #cccccc; /* Eingabefeld-Rahmen */
  --arp-grey-250:   #bdc3c7; /* Box-Titel im roten Footer */
  --arp-grey-200:   #dddddd; /* Rahmen in Menüs */
  --arp-grey-150:   #eeeeee; /* Button-Schrift auf Rot */
  --arp-grey-120:   #efefef; /* aktiver Menüeintrag (Mobile) */
  --arp-mist:       #eceff1; /* Hellgrau-Blau: Breadcrumb-Leiste, Sidebar-Boxen, Hover */
  --arp-smoke:      #f5f5f5; /* deaktivierte Felder (whitesmoke) */
  --arp-white:      #ffffff;
  --arp-black:      #000000;
  --arp-navy:       #2c3e50; /* Spinner / Footer-Boxen-Titel */

  /* Status-Hintergründe (Rahmen auf ARP immer ARP Rot) */
  --arp-status-error-bg:   #f2dede;
  --arp-status-info-bg:    #eceff1;
  --arp-status-success-bg: #dff0d8;
  --arp-status-warning-bg: #fcf8e3;

  /* Label-/Badge-Farben (WoltLab-Standard) */
  --arp-label-green:  #009900;
  --arp-label-red:    #cc0000;
  --arp-label-black:  #333333;
  --arp-label-brown:  #cc6633;
  --arp-label-orange: #ff9900;
  --arp-label-yellow: #ffff00;
  --arp-label-blue:   #336699;
  --arp-label-purple: #cc00ff;
  --arp-label-pink:   #ff00cc;

  /* ======================================================================
     2. SEMANTISCHE TOKENS
     ====================================================================== */

  /* --- Farbe: Marke & Flächen --- */
  --arp-color-primary:            var(--arp-red-900);
  --arp-color-primary-contrast:   var(--arp-white);
  --arp-color-accent:             var(--arp-red-700);
  --arp-color-dark:               var(--arp-anthracite);
  --arp-color-dark-contrast:      var(--arp-white);

  --arp-color-bg:                 var(--arp-white);
  --arp-color-bg-subtle:          var(--arp-mist);      /* Sidebar, Navigation, Hover */
  --arp-color-surface:            var(--arp-white);     /* Karten, Dialoge, Dropdowns */

  /* --- Farbe: Text --- */
  --arp-color-text:               var(--arp-anthracite);
  --arp-color-text-muted:         var(--arp-grey-600);
  --arp-color-text-disabled:      var(--arp-grey-500);
  --arp-color-text-on-primary:    var(--arp-white);
  --arp-color-text-on-dark:       var(--arp-white);
  --arp-color-heading:            var(--arp-red-900);   /* Seiten- & Sektionstitel */
  --arp-color-heading-box:        var(--arp-anthracite);/* Sidebar-Box-Titel */
  --arp-color-link:               var(--arp-red-900);
  --arp-color-link-hover:         var(--arp-red-900);   /* ARP: kein Farbwechsel */

  /* --- Farbe: Bereiche --- */
  --arp-color-topbar-bg:          var(--arp-anthracite); /* fixe Leiste oben, 50 px */
  --arp-color-header-bg:          var(--arp-red-900);    /* Logo-Header */
  --arp-color-breadcrumb-bg:      var(--arp-mist);
  --arp-color-footer-bg:          var(--arp-red-900);    /* Link-Footer */
  --arp-color-footer-title:       var(--arp-grey-250);
  --arp-color-copyright-bg:       var(--arp-anthracite);

  /* --- Farbe: Rahmen --- */
  --arp-color-border:             var(--arp-mist);      /* Trenner zwischen Listenzeilen */
  --arp-color-border-strong:      var(--arp-red-900);   /* Listen-Ober/Unterkante */
  --arp-color-border-input:       var(--arp-grey-300);
  --arp-color-border-disabled:    var(--arp-grey-400);

  /* --- Farbe: Interaktion --- */
  --arp-color-button-bg:          var(--arp-red-900);
  --arp-color-button-text:        var(--arp-grey-150);
  --arp-color-button-bg-hover:    var(--arp-anthracite);
  --arp-color-button-bg-disabled: var(--arp-mist);
  --arp-color-button-text-disabled: var(--arp-grey-500); /* Portal: Weiß (kaum lesbar) – für neue Projekte #7D8264 */
  --arp-color-item-hover-bg:      var(--arp-mist);
  --arp-color-item-hover-text:    var(--arp-red-900);
  --arp-color-badge-bg:           var(--arp-anthracite);
  --arp-color-badge-update-bg:    var(--arp-red-700);
  --arp-color-focus-ring:         rgba(153, 0, 0, 0.45); /* Ergänzung: ARP hat keinen eigenen Fokusring */

  /* --- Farbe: Status --- */
  --arp-color-error-bg:           var(--arp-status-error-bg);
  --arp-color-info-bg:            var(--arp-status-info-bg);
  --arp-color-success-bg:         var(--arp-status-success-bg);
  --arp-color-warning-bg:         var(--arp-status-warning-bg);
  --arp-color-status-border:      var(--arp-red-900);
  --arp-color-error-text:         var(--arp-red-700);

  /* --- Typografie --- */
  --arp-font-family:        "Open Sans", Arial, Helvetica, sans-serif;
  --arp-font-family-mono:   ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", "Courier New", monospace;
  --arp-font-family-quote:  Georgia, "Times New Roman", serif; /* nur für das große Zitat-Zeichen */

  --arp-font-weight-light:     300; /* große Titel */
  --arp-font-weight-regular:   400; /* Fließtext, Buttons, Box-Titel */
  --arp-font-weight-semibold:  600; /* Karten-Titel, Tags, Links in Hinweisen */
  --arp-font-weight-bold:      700;
  --arp-font-weight-extrabold: 800;

  --arp-font-size-xs:   12px;  /* small, Badges, Tags, Tooltip, Copyright */
  --arp-font-size-base: 14px;  /* Fließtext, Buttons, Inputs */
  --arp-font-size-md:   18px;  /* Box-Titel, H3, Karten-Titel, Dialog-Titel */
  --arp-font-size-lg:   23px;  /* Sektionstitel (H2) Desktop · Seitentitel Mobile */
  --arp-font-size-xl:   28px;  /* Seitentitel (H1) Desktop */
  --arp-font-size-lg-mobile: 20px; /* Sektionstitel Mobile */

  --arp-line-height-tight: 1.05; /* H1 */
  --arp-line-height-head:  1.28; /* H2, H3, Box-Titel, Badges */
  --arp-line-height-body:  1.48; /* Fließtext (14 px → 20,72 px) */

  /* --- Abstände (Raster 5 px) --- */
  --arp-space-1:  5px;
  --arp-space-2:  10px;
  --arp-space-3:  15px;
  --arp-space-4:  20px;
  --arp-space-5:  30px;
  --arp-space-6:  40px;
  --arp-space-7:  60px;

  /* --- Layout --- */
  --arp-layout-max-width:   1400px;
  --arp-layout-min-width:   1000px;   /* Desktop ab 1025 px */
  --arp-layout-gutter:      20px;     /* Desktop */
  --arp-layout-gutter-mobile: 10px;
  --arp-sidebar-width:      310px;
  --arp-sidebar-gap:        30px;
  --arp-topbar-height:      50px;
  --arp-header-height:      128px;    /* Logo 80 px + Innenabstand */
  --arp-logo-height:        80px;
  --arp-logo-height-mobile: 30px;

  /* Breakpoints (nur als Referenz – CSS-Variablen funktionieren nicht in @media)
     xs: ≤ 544 px · sm: 545–768 px · md: 769–1024 px · lg: ≥ 1025 px */

  /* --- Radien: ARP ist bewusst kantig --- */
  --arp-radius-none: 0;    /* Eingabefelder */
  --arp-radius-sm:   2px;  /* Buttons, Badges, Dropdowns, Tooltips */
  --arp-radius-md:   3px;  /* Karten, Dialoge */
  --arp-radius-round: 50%; /* Avatare, Online-Punkt */

  /* --- Schatten --- */
  --arp-shadow-card:     0 0 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --arp-shadow-dropdown: 0 12px 28px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
  --arp-shadow-overlay:  0 0 20px rgba(0, 0, 0, 0.19), 0 0 6px rgba(0, 0, 0, 0.23);
  --arp-shadow-badge:    -1px 2px 3px rgba(0, 0, 0, 0.3), inset 0 2px 5px rgba(225, 225, 225, 0.3);
  --arp-backdrop:        rgba(0, 0, 0, 0.34);
  --arp-tooltip-bg:      rgba(0, 0, 0, 0.8);

  /* --- Bewegung --- */
  --arp-duration-fast:   0.12s;  /* Opacity, Tooltips */
  --arp-duration-base:   0.2s;   /* Hintergrund-Hover, Bild-Opacity */
  --arp-duration-slow:   0.24s;  /* Menü-Verschiebung */
  --arp-easing:          ease-in-out;

  /* --- Komponenten --- */
  --arp-button-padding:        8px 18px;
  --arp-button-padding-small:  6px 8px;
  --arp-input-padding:         4px 8px;
  --arp-badge-padding:         2px 6px;
  --arp-tag-padding:           3px 6px 2px 2px;
  --arp-notice-border-width:   5px;
  --arp-card-image-height:     150px;

  /* ======================================================================
     3. ADVENTSKALENDER-ERWEITERUNG  (Vorschlag – aus Kalender 2025 abgeleitet)
     ====================================================================== */
  --arp-xmas-bg-base:      #0b0000;
  --arp-xmas-bg-gradient:  radial-gradient(circle at 30% -20%, #ff5454 0%, #990000 45%, #120000 100%);
  --arp-xmas-red-glow:     #ff5454;
  --arp-xmas-red-deep:     #120000;

  --arp-xmas-pine:         #0f5d2f;  /* Tannengrün */
  --arp-xmas-pine-dark:    #073218;  /* Kontur */
  --arp-xmas-trunk:        #4b2e1f;  /* Stamm */
  --arp-xmas-gold:         #ffd54f;  /* Lichter */
  --arp-xmas-gold-light:   #ffe57f;  /* Stern */
  --arp-xmas-snow:         #ffffff;

  --arp-xmas-text:         #ffffff;
  --arp-xmas-text-muted:   rgba(255, 255, 255, 0.7);

  /* Türchen ("Glas"-Kacheln) */
  --arp-door-bg:           linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.55));
  --arp-door-border:       1.6px solid rgba(255, 255, 255, 0.35);
  --arp-door-shadow:       0 12px 40px rgba(0, 0, 0, 0.45);
  --arp-door-radius:       24px;   /* 2025: 64 px – Empfehlung: 24 px, näher an der Portal-Optik */
  --arp-door-gap:          16px;
  /* Zustände (Vorschlag) */
  --arp-door-locked-opacity:     0.55;  /* Zahl muss trotzdem ≥ 3:1 Kontrast haben */
  --arp-door-today-border:       2px solid var(--arp-xmas-gold);
  --arp-door-today-glow:         0 0 0 4px rgba(255, 213, 79, 0.25), 0 12px 40px rgba(0, 0, 0, 0.45);
  --arp-door-opened-bg:          linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 239, 241, 0.92));
  --arp-door-opened-text:        var(--arp-red-900);
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  :root {
    --arp-duration-fast: 0s;
    --arp-duration-base: 0s;
    --arp-duration-slow: 0s;
  }
}
