/**
 * Geisler & Schambach — Base Stylesheet
 *
 * Enthält:
 *   1. @font-face Definitionen für General Sans (woff2)
 *   2. Minimaler CSS-Reset
 *   3. Globale Typografie & Utility-Klassen
 *   4. Buttons, Links, Layout-Helfer
 *
 * Voraussetzung: design-tokens.css ist vor dieser Datei eingebunden.
 * Schriftdateien werden unter ../fonts/ erwartet — Pfad ggf. anpassen.
 */

/* ─── 1. Schriften ────────────────────────────────────────────────── */
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-MediumItalic.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GeneralSans';
  src: url('../assets/fonts/GeneralSans-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ─── 2. Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--gs-bg-primary);
  color: var(--gs-text-primary);
  font-family: var(--gs-font-family);
  font-size: var(--gs-text-body-size);
  line-height: var(--gs-text-body-lh);
  font-weight: var(--gs-fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { padding: 0; }

/* ─── 3. Typografie-Utilities ────────────────────────────────────── */
.gs-h1 {
  font-size:   var(--gs-text-h1-size);
  line-height: var(--gs-text-h1-lh);
  font-weight: var(--gs-text-h1-weight);
  letter-spacing: var(--gs-text-h1-tracking);
  color: var(--gs-text-primary);
}
.gs-h2 {
  font-size:   var(--gs-text-h2-size);
  line-height: var(--gs-text-h2-lh);
  font-weight: var(--gs-text-h2-weight);
  letter-spacing: var(--gs-text-h2-tracking);
  color: var(--gs-text-secondary);
}
.gs-body {
  font-size:   var(--gs-text-body-size);
  line-height: var(--gs-text-body-lh);
  font-weight: var(--gs-text-body-weight);
  max-width:   var(--gs-content-measure);
  color: var(--gs-text-primary);
}
.gs-cta {
  font-size:   var(--gs-text-cta-size);
  line-height: var(--gs-text-cta-lh);
  font-weight: var(--gs-text-cta-weight);
  color: var(--gs-text-primary);
}
.gs-label {
  font-size: var(--gs-text-label-size);
  letter-spacing: var(--gs-text-label-tracking);
  text-transform: uppercase;
  font-weight: var(--gs-fw-medium);
  color: var(--gs-text-secondary);
}
.gs-caption {
  font-size:   var(--gs-text-caption-size);
  line-height: var(--gs-text-caption-lh);
  color: var(--gs-text-muted);
}

/* Semantische Element-Defaults */
h1 { font-size: var(--gs-text-h1-size); line-height: var(--gs-text-h1-lh); font-weight: var(--gs-text-h1-weight); letter-spacing: var(--gs-text-h1-tracking); }
h2 { font-size: var(--gs-text-h2-size); line-height: var(--gs-text-h2-lh); font-weight: var(--gs-text-h2-weight); letter-spacing: var(--gs-text-h2-tracking); }
h3 { font-size: 1.375rem; line-height: 1.4; font-weight: var(--gs-fw-medium); }
p  { max-width: var(--gs-content-measure); }
strong { font-weight: var(--gs-fw-semibold); }
em { font-style: italic; }
small { font-size: var(--gs-text-caption-size); color: var(--gs-text-muted); }

/* ─── 4. Links, Buttons, CTA ─────────────────────────────────────── */
a {
  color: var(--gs-text-secondary);
  text-decoration: none;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  border-bottom: 1px solid currentColor;
  transition: color var(--gs-duration-1) var(--gs-ease),
              border-color var(--gs-duration-1) var(--gs-ease);
}
a:hover, a:focus-visible { color: var(--gs-text-primary); }
.gs-theme-dark a, .gs-theme-contrast a { color: var(--gs-text-primary); }

.gs-button {
  display: inline-flex;
  align-items: center;
  gap: var(--gs-space-2);
  padding: var(--gs-space-3) var(--gs-space-5);
  font-family: inherit;
  font-size: var(--gs-text-cta-size);
  font-weight: var(--gs-fw-medium);
  line-height: 1;
  border: 1px solid var(--gs-accent);
  border-radius: var(--gs-radius-sm);
  background: var(--gs-accent);
  color: var(--gs-color-white);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--gs-duration-2) var(--gs-ease),
              transform var(--gs-duration-1) var(--gs-ease);
}
.gs-button:hover { background: color-mix(in srgb, var(--gs-accent) 85%, black); }
.gs-button:active { transform: translateY(1px); }

.gs-button-secondary {
  background: transparent;
  color: var(--gs-accent);
  border-color: var(--gs-accent);
}
.gs-button-secondary:hover { background: var(--gs-accent); color: var(--gs-color-white); }

.gs-theme-dark .gs-button {
  background: var(--gs-color-white);
  color: var(--gs-color-metal);
  border-color: var(--gs-color-white);
}
.gs-theme-dark .gs-button:hover { background: var(--gs-color-gray); }

/* Link-Style CTA mit Pfeil (Manual-Beispiel "Mehr erfahren") */
.gs-link-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--gs-space-2);
  font-size: var(--gs-text-cta-size);
  font-weight: var(--gs-fw-medium);
  color: var(--gs-text-secondary);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  text-decoration: none;
  transition: gap var(--gs-duration-2) var(--gs-ease);
}
.gs-link-cta::after { content: '→'; transition: transform var(--gs-duration-2) var(--gs-ease); }
.gs-link-cta:hover { gap: var(--gs-space-3); }
.gs-link-cta:hover::after { transform: translateX(2px); }
.gs-theme-dark .gs-link-cta { color: var(--gs-color-white); }

/* ─── 5. Layout-Helfer ───────────────────────────────────────────── */
.gs-container {
  width: 100%;
  max-width: var(--gs-container-max);
  margin-inline: auto;
  padding-inline: var(--gs-space-5);
}
.gs-container--narrow { max-width: var(--gs-container-narrow); }

.gs-section {
  padding-block: var(--gs-space-8);
  background: var(--gs-bg-primary);
  color: var(--gs-text-primary);
}
.gs-section--secondary { background: var(--gs-bg-secondary); }
.gs-section--inverted  { background: var(--gs-bg-inverted); color: var(--gs-text-inverted); }
.gs-section--contrast  { background: var(--gs-bg-contrast); color: var(--gs-text-inverted); }

.gs-stack > * + * { margin-top: var(--gs-space-4); }
.gs-stack-sm > * + * { margin-top: var(--gs-space-2); }
.gs-stack-lg > * + * { margin-top: var(--gs-space-6); }

/* Logo-Komponente */
.gs-logo {
  display: inline-block;
}
.gs-logo img { display: block; height: auto; }

/* Divider */
.gs-divider {
  border: 0;
  border-top: var(--gs-border-divider);
  margin-block: var(--gs-space-6);
}

/* Fokus-Stil — markenkonform */
:focus-visible {
  outline: 2px solid var(--gs-accent);
  outline-offset: 3px;
  border-radius: var(--gs-radius-sm);
}
