/* ============================================================
   PFLASTERDONNER — Global CSS
   Mood: Bavarian Heritage · Steinhandwerk × Editorial Premium
   ============================================================ */

/* ─── Google Fonts Import ─── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@200;300;400;500;600;700;800&display=swap');

/* ─── CSS-Variablen ─── */
:root {
  /* ── Brand: Tannengrün-Welt ── */
  --color-brand-main:       #1E3A2E;   /* Tannengrün — Primary */
  --color-brand-darker:     #142821;   /* Deep Forest — Hover/Press */
  --color-brand-lighter:    #2F5A47;   /* Midtone Sage — Highlights */
  --color-brand-subtle:     #E8EDE9;   /* Mossy mist — Subtle BGs */

  /* ── Akzent: Warmes Gold (Edelmetall) ── */
  --color-gold-main:        #C99852;   /* Honey Gold — Primary Accent */
  --color-gold-darker:      #A87A3D;   /* Dark Bronze — Hover */
  --color-gold-lighter:     #E5C290;   /* Champagne — Subtle Accents */
  --color-gold-subtle:      #F2EBD9;   /* Cream Gold — Wash BGs */

  /* ── Hintergründe ── */
  --color-bg-light:         #F7F4EE;   /* Parchment Cream */
  --color-bg-dark:          #0F1F19;   /* Forest Ink */
  --color-bg-card:          #FFFFFF;   /* Pure White */
  --color-bg-accent:        #F2EBD9;   /* Gold Wash */
  --color-bg-paper:         #FAF7F1;   /* Lighter Parchment */

  /* ── Borders & Strukturen ── */
  --color-border:           #DDD6C7;   /* Warm Beige Border */
  --color-border-strong:    #B8AE99;   /* Stone Border */
  --color-border-gold:      #E5C290;   /* Gold Hairline */

  /* ── Text ── */
  --color-heading:          #0F1F19;   /* Forest Ink */
  --color-body:             #2C2A26;   /* Warm Charcoal */
  --color-text-muted:       #6B6357;   /* Stone Grey */
  --color-text-light:       #9B9384;   /* Soft Stone */
  --color-off-white:        #F7F4EE;   /* For text on dark BGs */

  /* ── Status ── */
  --color-success:          #5A8A3E;   /* Sage Green Success */

  /* ── Typografie ── */
  --font-main:              'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display:           'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --font-size-body:         17px;
  --line-height-body:       1.5;

  --font-size-h1:           68px;
  --font-size-h2:           48px;
  --font-size-h3:           32px;
  --font-size-h4:           22px;
  --font-size-h5:           18px;
  --font-size-small:        17px;
  --font-size-nav:          17px;
  --font-size-button:       17px;

  /* Editorial display sizes — for "wow" moments */
  --font-size-display-xl:   140px;     /* Big numerals: "1987", "2.500+" */
  --font-size-display-lg:   96px;      /* Hero alt size */
  --font-size-eyebrow:      13px;      /* small caps section labels */

  /* ── Layout ── */
  --max-width:              1200px;
  --max-width-wide:         1400px;
  --section-padding:        100px 40px;
  --section-padding-mobile: 60px 20px;

  /* ── Shadows (warm-tinted, not generic) ── */
  --shadow-soft:            0 2px 8px rgba(30, 58, 46, 0.06),
                            0 8px 24px rgba(30, 58, 46, 0.04);
  --shadow-md:              0 4px 12px rgba(30, 58, 46, 0.08),
                            0 12px 32px rgba(30, 58, 46, 0.06);
  --shadow-lg:              0 8px 20px rgba(15, 31, 25, 0.10),
                            0 24px 60px rgba(15, 31, 25, 0.10);
  --shadow-gold:            0 4px 16px rgba(201, 152, 82, 0.20),
                            0 12px 36px rgba(201, 152, 82, 0.12);

  /* ── Motion ── */
  --ease-out:               cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:            cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:          200ms;
  --duration-base:          400ms;
  --duration-slow:          700ms;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

/* ─── Basis ─── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-body);
  background: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv01';
}

/* Subtle paper grain — adds tactile premium feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.55 0 0 0 0 0.45 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Typografie ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.06;
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

h4 {
  font-size: var(--font-size-h4);
  font-weight: 600;
  line-height: 1.3;
}

h5 {
  font-size: var(--font-size-h5);
  font-weight: 600;
  line-height: 1.4;
}

p {
  color: var(--color-body);
  line-height: var(--line-height-body);
}

p.lead {
  font-size: 21px;
  line-height: 1.55;
  color: var(--color-body);
  font-weight: 400;
}

a {
  color: var(--color-brand-main);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover { color: var(--color-gold-darker); }

img { max-width: 100%; display: block; }

/* Smooth fade-in for content images — removes the "pop-in" when bytes
   arrive after the section has already scrolled into view. JS adds
   .is-loaded once img.decode() resolves. */
.sk-leistung__media img,
.sk-ref-card__media img,
.sk-about__media img {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms var(--ease-out),
              transform 1200ms var(--ease-out);
  will-change: opacity, transform;
}
.sk-leistung__media img.is-loaded,
.sk-ref-card__media img.is-loaded,
.sk-about__media img.is-loaded {
  opacity: 1;
  transform: scale(1);
}
/* Keep hover scale-up working after load. */
.sk-leistung:hover .sk-leistung__media img.is-loaded { transform: scale(1.06); }
.sk-ref-card:hover .sk-ref-card__media img.is-loaded { transform: scale(1.05); }

::selection {
  background: var(--color-gold-main);
  color: var(--color-bg-dark);
}

/* ─── Editorial Display Typography ─── */
.display-xl {
  font-size: var(--font-size-display-xl);
  font-weight: 200;
  letter-spacing: -0.05em;
  line-height: 0.95;
  color: var(--color-heading);
  font-feature-settings: 'lnum';
}

.display-lg {
  font-size: var(--font-size-display-lg);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--color-heading);
}

/* ─── Eyebrow / Section labels ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-main);
  font-size: var(--font-size-eyebrow);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-darker);
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--color-gold-main);
}

/* ─── Buttons ─── */
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: var(--font-size-button);
  font-weight: 600;
  letter-spacing: 0.005em;
  padding: 16px 28px;
  min-height: 52px;
  min-width: 44px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-brand-main);
  color: var(--color-off-white);
  border: 1px solid var(--color-brand-main);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-brand-darker);
  transform: translateY(101%);
  transition: transform var(--duration-base) var(--ease-out);
  z-index: 0;
}

.btn-primary > * { position: relative; z-index: 1; }

.btn-primary:hover {
  color: var(--color-gold-lighter);
  border-color: var(--color-brand-darker);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover::after { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--color-brand-main);
  border: 1px solid var(--color-brand-main);
}

.btn-secondary:hover {
  background: var(--color-brand-main);
  color: var(--color-off-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-brand-main);
  border: 1px solid transparent;
  padding: 16px 0;
}

.btn-ghost::after {
  content: '→';
  font-size: 19px;
  transition: transform var(--duration-base) var(--ease-out);
}

.btn-ghost:hover {
  color: var(--color-gold-darker);
}

.btn-ghost:hover::after {
  transform: translateX(6px);
}

/* Gold accent button — used sparingly */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-gold-main);
  color: var(--color-brand-darker);
  border: 1px solid var(--color-gold-main);
  font-family: var(--font-main);
  font-size: var(--font-size-button);
  font-weight: 700;
  padding: 16px 28px;
  min-height: 52px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  letter-spacing: 0.005em;
}

.btn-gold:hover {
  background: var(--color-gold-darker);
  border-color: var(--color-gold-darker);
  color: var(--color-bg-light);
  box-shadow: var(--shadow-gold);
}

/* ─── Form Inputs ─── */
.input,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: var(--font-main);
  font-size: var(--font-size-body);
  color: var(--color-body);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 14px 18px;
  width: 100%;
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  min-height: 52px;
}

.input:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-brand-main);
  box-shadow: 0 0 0 3px rgba(30, 58, 46, 0.08);
}

/* ─── Badges & Tags ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  background: var(--color-brand-subtle);
  color: var(--color-brand-darker);
  border: 1px solid var(--color-brand-subtle);
}

.badge--gold {
  background: var(--color-gold-subtle);
  color: var(--color-gold-darker);
  border-color: var(--color-gold-lighter);
}

.badge--dark {
  background: var(--color-brand-darker);
  color: var(--color-gold-lighter);
  border-color: var(--color-brand-darker);
}

/* ─── Dividers ─── */
.divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  width: 100%;
}

.divider--gold {
  height: 1px;
  background: linear-gradient(to right,
    transparent,
    var(--color-gold-main) 15%,
    var(--color-gold-darker) 50%,
    var(--color-gold-main) 85%,
    transparent);
  border: none;
  width: 100%;
}

.divider--ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.divider--ornament::before,
.divider--ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-gold);
}

.divider--ornament::after { background: var(--color-border-gold); }

/* ─── Layout Helpers ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

.container--wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

/* ─── Cards ─── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 32px;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-gold);
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.06); }
}

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

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

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  :root {
    --font-size-h1: 48px;
    --font-size-h2: 36px;
    --font-size-display-xl: 96px;
    --font-size-display-lg: 64px;
    --section-padding: 80px 32px;
  }
  .container, .container--wide { padding: 0 32px; }
}

@media (max-width: 767px) {
  :root {
    --font-size-h1: 36px;
    --font-size-h2: 28px;
    --font-size-h3: 24px;
    --font-size-display-xl: 72px;
    --font-size-display-lg: 48px;
  }
  .container, .container--wide { padding: 0 20px; }
  .btn-primary, .btn-secondary, .btn-gold { width: 100%; }
}

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