/* ============================================================
   GMKB Recruiting-Landingpages – Base Stylesheet
   ============================================================
   Shared Design Tokens, Reset, Typography, Components.
   Wird von jeder Landingpage importiert.
   ============================================================ */

/* ------------------------------------------------------------
   1. FONT FACE (Self-hosted, DSGVO-konform)
   ------------------------------------------------------------ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------
   2. DESIGN TOKENS (CSS Custom Properties)
   ------------------------------------------------------------ */

:root {
  /* --- Colors: GMKB Corporate Identity --- */
  --color-teal:            #046C6C;
  --color-teal-dark:       #034E4E;
  --color-teal-darker:     #022D2D;
  --color-teal-light:      #E8F5F5;
  --color-teal-text:       #006971;

  /* Accent: GMKB Rot (aus Hauptseite, sekundaere CI-Farbe) */
  --color-accent:          #BC1D1D;
  --color-accent-dark:     #9A1818;
  --color-accent-light:    #FDF2F2;

  --color-white:           #FFFFFF;
  --color-gray-light:      #F6F6F6;
  --color-gray-border:     #E5E5E5;
  --color-gray-input:      #E0E0E0;
  --color-gray-dark:       #1A1A1A;

  --color-text-dark:       #141412;
  --color-text-body:       #374151;
  --color-text-muted:      #6B7280;

  --color-error:           #DC2626;
  --color-success:         #059669;

  /* --- Gradients --- */
  --gradient-teal:         linear-gradient(135deg, #057A7A 0%, #046C6C 50%, #034E4E 100%);
  --gradient-teal-hover:   linear-gradient(135deg, #046C6C 0%, #034E4E 50%, #022D2D 100%);
  --gradient-teal-subtle:  linear-gradient(180deg, #046C6C 0%, #035858 100%);

  /* --- Typography --- */
  --font-family:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --font-size-xs:          clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);    /* ~12-13px */
  --font-size-sm:          clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);  /* ~13-15px */
  --font-size-base:        clamp(1rem, 0.95rem + 0.25vw, 1.125rem);       /* ~16-18px */
  --font-size-lg:          clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);      /* ~18-21px */
  --font-size-h3:          clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);       /* ~20-24px */
  --font-size-h2:          clamp(2rem, 1.5rem + 1.25vw, 2.5rem);           /* ~32-40px */
  --font-size-h1:          clamp(2.5rem, 2rem + 2.5vw, 4.5rem);           /* ~40-72px */

  --font-weight-regular:   400;
  --font-weight-medium:    500;
  --font-weight-semibold:  600;
  --font-weight-bold:      700;
  --font-weight-extrabold: 800;

  --line-height-tight:     1.15;
  --line-height-heading:   1.2;
  --line-height-body:      1.6;

  --letter-spacing-tight:  -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide:   0.05em;
  --letter-spacing-label:  0.1em;

  /* --- Spacing (8px base grid) --- */
  --space-1:    0.25rem;   /*  4px */
  --space-2:    0.5rem;    /*  8px */
  --space-3:    0.75rem;   /* 12px */
  --space-4:    1rem;      /* 16px */
  --space-5:    1.25rem;   /* 20px */
  --space-6:    1.5rem;    /* 24px */
  --space-8:    2rem;      /* 32px */
  --space-10:   2.5rem;    /* 40px */
  --space-12:   3rem;      /* 48px */
  --space-16:   4rem;      /* 64px */
  --space-20:   5rem;      /* 80px */
  --space-24:   6rem;      /* 96px */

  --section-padding: clamp(3rem, 5vw, 7.5rem);

  /* --- Layout --- */
  --container-max:    1300px;
  --container-narrow: 640px;
  --container-padding: clamp(12px, 4vw, 2rem);

  /* --- Border Radius --- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;

  /* --- Shadows --- */
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:   0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl:   0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-sticky: 0 -4px 12px rgba(0, 0, 0, 0.1);

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ------------------------------------------------------------
   3. RESET
   ------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--color-text-body);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ------------------------------------------------------------
   4. TYPOGRAPHY
   ------------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--font-family);
  color: var(--color-text-dark);
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-tight);
  text-wrap: balance;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
}

p {
  max-width: 65ch;
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-lg {
  font-size: var(--font-size-lg);
}

.section-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

/* On dark backgrounds */
.section-label--light {
  color: var(--color-teal-light);
  opacity: 0.7;
}

/* ------------------------------------------------------------
   5. LAYOUT
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-padding);
}

/* ------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

/* Primary: Teal gradient, white text (default on light BGs) */
.btn--primary {
  background: var(--gradient-teal);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(4, 108, 108, 0.3);
}

.btn--primary:hover {
  background: var(--gradient-teal-hover);
  box-shadow: 0 4px 16px rgba(4, 108, 108, 0.4);
  transform: translateY(-2px);
}

.btn--primary:active {
  box-shadow: 0 1px 4px rgba(4, 108, 108, 0.3);
}

/* Primary inverted: White background, teal text (on dark/teal BGs) */
.btn--primary-inverted {
  background-color: var(--color-white);
  color: var(--color-teal);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn--primary-inverted:hover {
  background-color: #F0FAFA;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Large button (for CTAs) */
.btn--lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--font-size-lg);
}

/* Full-width button */
.btn--full {
  width: 100%;
}

/* Button with arrow icon */
.btn__arrow {
  transition: transform var(--transition-fast);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ------------------------------------------------------------
   7. CARDS
   ------------------------------------------------------------ */

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-teal);
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
}

.card__text {
  font-size: var(--font-size-base);
  color: var(--color-text-body);
  line-height: var(--line-height-body);
}

/* ------------------------------------------------------------
   8. FORM INPUTS
   ------------------------------------------------------------ */

.form-group {
  position: relative;
  margin-bottom: var(--space-5);
}

.form-input {
  width: 100%;
  padding: var(--space-4);
  padding-top: 1.5rem;
  font-size: var(--font-size-base);
  border: 2px solid var(--color-gray-input);
  border-radius: var(--radius-md);
  background: var(--color-white);
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  appearance: none;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(4, 108, 108, 0.15);
}

.form-input--error {
  border-color: var(--color-error);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* Floating label */
.form-label {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  transform: translateY(-50%);
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  pointer-events: none;
  transition: transform var(--transition-fast),
              font-size var(--transition-fast),
              color var(--transition-fast);
  transform-origin: left top;
}

textarea ~ .form-label {
  top: var(--space-4);
  transform: translateY(0);
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
  transform: translateY(-160%);
  font-size: var(--font-size-xs);
  color: var(--color-teal);
}

textarea.form-input:focus ~ .form-label,
textarea.form-input:not(:placeholder-shown) ~ .form-label {
  transform: translateY(-100%);
}

.form-error {
  display: none;
  font-size: var(--font-size-sm);
  color: var(--color-error);
  margin-top: var(--space-1);
}

.form-group--error .form-error {
  display: block;
}

/* Checkbox */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--color-teal);
  cursor: pointer;
}

.form-checkbox__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-body);
  line-height: var(--line-height-body);
}

.form-checkbox__text a {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-checkbox__text a:hover {
  color: var(--color-teal-dark);
}

/* ------------------------------------------------------------
   9. SCROLL REVEAL ANIMATIONS
   ------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-slow),
              transform var(--transition-slow);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s ease,
              transform 1.2s ease;
}

.reveal--scale.reveal--visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger > *:nth-child(7) { transition-delay: 480ms; }

/* Hero-specific stagger */
.hero .reveal:nth-child(1) { transition-delay: 200ms; }
.hero .reveal:nth-child(2) { transition-delay: 400ms; }
.hero .reveal:nth-child(3) { transition-delay: 600ms; }

/* ------------------------------------------------------------
   10. REDUCED MOTION
   ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal--scale {
    opacity: 1;
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------
   11. UTILITY CLASSES
   ------------------------------------------------------------ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-teal { color: var(--color-teal); }
