/* ============================================================
   marketingRAUM — global.css
   Reset · CSS-Variablen · Typografie · @font-face
   ============================================================ */

/* ------------------------------------------------------------
   @font-face — self-hosted, DSGVO-konform
   ------------------------------------------------------------ */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/CormorantGaramond-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/CormorantGaramond-LightItalic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/CormorantGaramond-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/CormorantGaramond-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../fonts/cormorant-garamond/CormorantGaramond-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow/Barlow-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow/Barlow-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow/Barlow-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow/Barlow-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------
   CSS Custom Properties
   ------------------------------------------------------------ */

:root {
  /* Markenfarben */
  --color-forest:        #33443D;
  --color-sage:          #53685F;
  --color-mist:          #B9C7C1;
  --color-cream:         #F8F6F3;
  --color-sand:          #BAAE93;

  /* Erweiterungen */
  --color-forest-deep:   #1E2B26;
  --color-forest-light:  #4A5E56;
  --color-cream-dark:    #EEE9E1;
  --color-sand-light:    #D4CBB5;
  --color-sand-dark:     #9A9076;
  --color-white:         #FFFFFF;

  /* Semantische Text-Farben */
  --color-text-primary:   #33443D;
  --color-text-secondary: #53685F;
  --color-text-muted:     #8A9E97;
  --color-text-on-dark:   #E8EDE9;
  --color-text-on-dark-muted: #8AA098;

  /* Semantische Hintergrund-Farben */
  --color-bg-page:        #F8F6F3;
  --color-bg-card:        #FFFFFF;
  --color-bg-card-alt:    #EEE9E1;
  --color-bg-dark:        #1E2B26;
  --color-bg-darker:      #131A15;

  /* Borders */
  --color-border:         #D8E0DC;
  --color-border-dark:    #2A3D35;

  /* Typografie */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Barlow', system-ui, sans-serif;

  /* Schriftgrößen — fluid (clamp) */
  --text-xs:   1rem;            /* 16px — Minimum */
  --text-sm:   1rem;            /* 16px — Minimum */
  --text-base: 1.125rem;        /* 18px — Fließtext */
  --text-lg:   1.25rem;         /* 20px */
  --text-xl:   1.375rem;        /* 22px */
  --text-2xl:  1.625rem;        /* 26px */
  --text-3xl:  clamp(1.875rem, 3vw, 2.375rem);
  --text-4xl:  clamp(2.125rem, 4vw, 3.125rem);
  --text-5xl:  clamp(2.625rem, 5vw, 4.125rem);
  --text-hero: clamp(3.5rem,   8vw, 7rem);

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-max:   1280px;
  --container-wide:  1440px;
  --container-text:  720px;
  --gutter:          clamp(1.5rem, 5vw, 4rem);

  /* Übergänge */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.4, 0, 1, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast:   150ms;
  --duration-base:   300ms;
  --duration-slow:   600ms;
  --duration-slower: 900ms;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-full: 9999px;

  /* Schatten */
  --shadow-sm:  0 1px 3px rgba(51, 68, 61, 0.08);
  --shadow-md:  0 4px 16px rgba(51, 68, 61, 0.10);
  --shadow-lg:  0 12px 40px rgba(51, 68, 61, 0.14);
  --shadow-xl:  0 24px 64px rgba(51, 68, 61, 0.18);

  /* Z-Index Skala */
  --z-below:    -1;
  --z-base:      0;
  --z-raised:   10;
  --z-overlay:  20;
  --z-nav:      30;
  --z-modal:    40;
  --z-cursor:   50;
}

/* ------------------------------------------------------------
   Reset — Modern CSS Reset
   ------------------------------------------------------------ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Verhindert FOUC bei JS-Animationen */
body.js-loading * {
  transition: none !important;
  animation: none !important;
}

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

/* Logo darf nicht durch max-width beschnitten werden */
.nav__logo img,
.nav__logo-img {
  max-width: none;
  width: auto;
}

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

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

ul, ol {
  list-style: none;
}

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

/* ------------------------------------------------------------
   Typografie — Skala
   ------------------------------------------------------------ */

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }
.text-5xl  { font-size: var(--text-5xl); }

.font-light    { font-weight: 300; }
.font-regular  { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }

.italic { font-style: italic; }

.tracking-wide   { letter-spacing: 0.05em; }
.tracking-wider  { letter-spacing: 0.1em; }
.tracking-widest { letter-spacing: 0.2em; }

.uppercase { text-transform: uppercase; }

/* Eyebrow — kleines Label über Headlines */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-sage);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Layout-Utilities
   ------------------------------------------------------------ */

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

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

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

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

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

/* ------------------------------------------------------------
   Accessibility
   ------------------------------------------------------------ */

/* Skip-Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-modal);
  padding: var(--space-3) var(--space-6);
  background: var(--color-forest);
  color: var(--color-cream);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast);
}
.skip-link:focus {
  top: var(--space-4);
}

/* Fokus-Styles */
:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* 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;
  }
}

/* ------------------------------------------------------------
   Scrollbar — dezentes Styling
   ------------------------------------------------------------ */

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-cream-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--color-mist);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-sage);
}

/* ------------------------------------------------------------
   Selektion
   ------------------------------------------------------------ */

::selection {
  background: var(--color-forest);
  color: var(--color-cream);
}
