/*
 * Gläser IT-Solutions — Corporate Design fuer Onetime Secret (secrets.glaeser-it.com)
 * Werte 1:1 von glaeser-it.com (SiteLayout.css): --blue #005ec9, --deep #0036a1,
 * --ink #17232e, --muted #5b6670, --line #dde4ea, --pale #eaf2fb, --paper #f4f7fa,
 * Display = Archivo, Text = IBM Plex Sans.
 *
 * Wird per <link> aus partials/head-base.rue NACH den Vite-Assets geladen und
 * ueberschreibt nur Design-Tokens (CSS-Variablen) plus ein paar Flaechen.
 * Kein Eingriff in den Vue-Code -> uebersteht OTS-Updates, solange die
 * Token-Namen (--font-brand, --font-serif, --radius-brand) gleich bleiben.
 * Die CSP erlaubt style-src/font-src/img-src nur 'self' -> alles liegt lokal.
 */

@font-face { font-family: Archivo; src: url(fonts/archivo-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url(fonts/archivo-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Archivo; src: url(fonts/archivo-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Plex; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600 700; font-display: swap; }

/* Metrik-kompatible Fallbacks wie auf der Website (kein Layout-Sprung beim Font-Swap) */
@font-face { font-family: "Archivo Fallback"; src: local(Arial), local(ArialMT); font-weight: 400; size-adjust: 98.6988%; ascent-override: 88.9575%; descent-override: 21.2769%; line-gap-override: 0%; }
@font-face { font-family: "Archivo Fallback"; src: local("Arial Bold"), local(Arial-BoldMT); font-weight: 600 700; size-adjust: 95.0039%; ascent-override: 92.4173%; descent-override: 22.1044%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback"; src: local(Arial), local(ArialMT); font-weight: 400 500; size-adjust: 101.166%; ascent-override: 101.318%; descent-override: 27.183%; line-gap-override: 0%; }
@font-face { font-family: "Plex Fallback"; src: local("Arial Bold"), local(Arial-BoldMT); font-weight: 600 700; size-adjust: 97.2956%; ascent-override: 105.349%; descent-override: 28.2644%; line-gap-override: 0%; }

:root {
  --gl-blue: #005ec9;
  --gl-deep: #0036a1;
  --gl-ink: #17232e;
  --gl-muted: #5b6670;
  --gl-line: #dde4ea;
  --gl-pale: #eaf2fb;
  --gl-paper: #f4f7fa;

  --gl-display: Archivo, "Archivo Fallback", Arial, sans-serif;
  --gl-text: Plex, "Plex Fallback", Arial, sans-serif;

  /* OTS-Tokens: alle Schrift-Varianten auf die Hausschriften */
  --font-brand: var(--gl-display);
  --font-brand-slab: var(--gl-display);
  --font-brand-sans: var(--gl-text);
  --font-brand-system: var(--gl-text);
  --font-brand-humanist: var(--gl-text);
  --font-brand-geometric: var(--gl-display);
  --font-brand-rounded: var(--gl-text);
  --font-serif: var(--gl-text);
  --font-sans: var(--gl-text);

  /* Radien wie die Website-Karten (18px) bzw. Buttons/Inputs (12px) */
  --radius-brand: 12px;
  --radius-xl: 18px;
  --radius-2xl: 18px;
}

body {
  font-family: var(--gl-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.light body {
  background-color: var(--gl-paper) !important;
  color: var(--gl-ink);
}

h1, h2, h3, .font-brand {
  font-family: var(--gl-display) !important;
  font-weight: 600;
  letter-spacing: -0.015em;
}

html.light h1, html.light h2, html.light h3 { color: var(--gl-ink); }

/* Buttons und Labels in Plex statt der Slab-Schrift */
button, input, select, label { font-family: var(--gl-text); }

/* Karten: weiss auf Papier-Grund, feine Linie statt grauem Schatten */
html.light .shadow-lg, html.light .shadow-xl, html.light .shadow-2xl {
  box-shadow: 0 1px 2px rgba(23, 35, 46, .04), 0 12px 32px -12px rgba(0, 54, 161, .14) !important;
}

/* Fokus-Ringe in Markenblau */
:focus-visible { outline-color: var(--gl-blue); }

/* Logo im Header: Wortmarke braucht Breite, nicht Hoehe */
header img[src*="/dist/glaeser/logo"] {
  height: 52px !important;
  width: auto !important;
  max-width: 280px;
  object-fit: contain;
}
@media (max-width: 480px) {
  header img[src*="/dist/glaeser/logo"] { height: 34px !important; }
}

/* Footer + alle Links in der Textschrift (einige Komponenten setzen font-serif direkt) */
footer, footer *, a, p, li, span, small { font-family: var(--gl-text); }
footer h3, footer h4 { font-family: var(--gl-display) !important; }

/* Hinweiskasten u. a.: OTS erzeugt aus der Primaerfarbe eine Komplementaerfarbe
   ("brandcomp", bei unserem Blau ein Ocker). Die Palette steht inline am <html>,
   deshalb !important. Gemappt auf helle/dunkle Blautoene der Website. */
html {
  --color-brandcomp-50: #eaf2fb !important;
  --color-brandcomp-100: #dbe8f8 !important;
  --color-brandcomp-200: #c4daf4 !important;
  --color-brandcomp-300: #9cc0ec !important;
  --color-brandcomp-400: #5a95dd !important;
  --color-brandcomp-500: #005ec9 !important;
  --color-brandcomp-600: #004fad !important;
  --color-brandcomp-700: #0036a1 !important;
  --color-brandcomp-800: #002c80 !important;
  --color-brandcomp-900: #00255c !important;
  --color-brandcomp-950: #001a40 !important;
}

/* Empfaengerseite (/secret/...): OTS rendert dort einen LEEREN <header> (Minimal-Layout ohne
   Masthead). Den nutzen wir fuer eine zentrierte Logo-Leiste -> Kunden sehen sofort, von wem
   der Link kommt. Greift nur, solange der Header leer ist (auf normalen Seiten nie). */
header:empty {
  display: flex;
  justify-content: center;
  padding: 22px 16px 18px;
  background: #fff;
  border-bottom: 1px solid var(--gl-line);
}
header:empty::before {
  content: "";
  display: block;
  width: 240px;
  height: 52px;
  background: url(logo.webp) center / contain no-repeat;
}
html.dark header:empty { background: rgb(17 24 39); border-bottom-color: rgb(55 65 81); }
html.dark header:empty::before { background-image: url(logo-dark.webp); }

/* Eingabefelder: Fokus in Markenblau statt Tinte */
html.light textarea:focus, html.light input:focus {
  border-color: var(--gl-blue) !important;
  box-shadow: 0 0 0 3px rgba(0, 94, 201, .15) !important;
  outline: none;
}
