/*
 * DACHDECKER STEFAN — Global Styles
 * Reset, base typography, layout utilities, section padding.
 */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* offset for the always-visible top bar */
  padding-top: var(--header-top-h);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container--wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}
.max-width-md { max-width: 820px; margin-left: auto; margin-right: auto; }

/* ── Section Padding ── */
.section { padding: var(--space-xl) 0; }
.section--sm  { padding: var(--space-lg) 0; }
.section--lg  { padding: var(--space-xxl) 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-white);
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.3rem, 3.2vw, 2.16rem); font-weight: 600; }
h2 { font-size: clamp(1.27rem, 3.17vw, 2.06rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--color-text-light); line-height: 1.8; }
p:last-child { margin-bottom: 0; }

strong { color: var(--color-text); font-weight: 600; }

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark p { color: var(--color-white); }

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-accent  { color: var(--color-accent); }
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* ── Grid Utilities ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Micro-Animations (Intersection Observer) ── */
.fade-in-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.25, 0.8, 0.25, 1),
              transform 0.75s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.fade-in-up:nth-child(2) { transition-delay: 0.10s; }
.fade-in-up:nth-child(3) { transition-delay: 0.20s; }
.fade-in-up:nth-child(4) { transition-delay: 0.30s; }
.fade-in-up:nth-child(5) { transition-delay: 0.40s; }
.fade-in-up:nth-child(6) { transition-delay: 0.50s; }
.fade-in-up:nth-child(7) { transition-delay: 0.60s; }
.fade-in-up:nth-child(8) { transition-delay: 0.70s; }

/* ── Buttons ── */
.btn-primary,
.btn-accent,
.btn-outline,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.25);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(44, 62, 80, 0.35);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.30);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192, 57, 43, 0.40);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline--white {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline--white:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-ghost {
  color: var(--color-accent);
  padding: 0;
  font-weight: 700;
  gap: 6px;
}
.btn-ghost i { transition: var(--transition-fast); }
.btn-ghost:hover i { transform: translateX(4px); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
