/* ==========================================================================
   Ingenieurbüro Kröner – Stylesheet
   ========================================================================== */

:root {
  color-scheme: light;

  /* Markenfarbe – bleibt in beiden Modi gleich */
  --brand: #088c5c;
  --brand-hover: #067a50;
  --brand-700: #05603f;
  --brand-900: #0b3d2c;

  /* Akzent für Text und Icons – wird im Dunkelmodus heller */
  --green: #088c5c;
  --green-50: #eef7f2;
  --green-100: #d6eee2;

  --ink: #0e1512;
  --ink-2: #36413c;
  --muted: #69736e;
  --line: #e4e9e6;
  --bg: #ffffff;
  --bg-soft: #f5f7f6;
  --bg-warm: #f7f6f2;
  --surface: #ffffff;

  --header-bg: rgba(255, 255, 255, 0.72);
  --header-bg-strong: rgba(255, 255, 255, 0.85);
  --menu-bg: rgba(255, 255, 255, 0.97);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-ring: rgba(14, 21, 18, 0.06);
  --shadow: rgba(11, 61, 44, 0.35);
  --visual-a: #fafcfb;
  --visual-b: #eef6f1;
  --paper: #ffffff;
  --word-dim: #c7d0cb;
  --toggle-bg: #e8edea;

  --radius-lg: 28px;
  --radius: 22px;
  --radius-sm: 14px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display",
    "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

/* Dunkelmodus: folgt dem System, solange nicht manuell umgeschaltet wurde */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --green: #34c08a;
    --green-50: rgba(52, 192, 138, 0.12);
    --green-100: rgba(52, 192, 138, 0.26);
    --brand-hover: #0a9e68;
    --ink: #edf2ef;
    --ink-2: #c4cdc8;
    --muted: #8e9993;
    --line: #253029;
    --bg: #0a0e0c;
    --bg-soft: #111714;
    --bg-warm: #121612;
    --surface: #18201c;
    --header-bg: rgba(10, 14, 12, 0.7);
    --header-bg-strong: rgba(10, 14, 12, 0.85);
    --menu-bg: rgba(10, 14, 12, 0.97);
    --glass: rgba(24, 32, 28, 0.74);
    --glass-ring: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.65);
    --visual-a: #121a16;
    --visual-b: #0c1310;
    --paper: #1b2420;
    --word-dim: #34403a;
    --toggle-bg: #222b26;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --green: #34c08a;
  --green-50: rgba(52, 192, 138, 0.12);
  --green-100: rgba(52, 192, 138, 0.26);
  --brand-hover: #0a9e68;
  --ink: #edf2ef;
  --ink-2: #c4cdc8;
  --muted: #8e9993;
  --line: #253029;
  --bg: #0a0e0c;
  --bg-soft: #111714;
  --bg-warm: #121612;
  --surface: #18201c;
  --header-bg: rgba(10, 14, 12, 0.7);
  --header-bg-strong: rgba(10, 14, 12, 0.85);
  --menu-bg: rgba(10, 14, 12, 0.97);
  --glass: rgba(24, 32, 28, 0.74);
  --glass-ring: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.65);
  --visual-a: #121a16;
  --visual-b: #0c1310;
  --paper: #1b2420;
  --word-dim: #34403a;
  --toggle-bg: #222b26;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

section,
.site-footer {
  transition: background-color 0.4s var(--ease);
}

body.menu-open {
  overflow: hidden;
}

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

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--green-100);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

/* Typografie ------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow::before {
  content: "[";
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0;
}

.eyebrow::after {
  content: "]";
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0;
}

.display {
  font-size: clamp(44px, 7.4vw, 92px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.h2 {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.032em;
}

.lead {
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.55;
  color: var(--muted);
}

.text-green {
  color: var(--green);
}

.section {
  padding-block: clamp(96px, 13vw, 168px);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-head .eyebrow {
  margin-bottom: 20px;
}

.section-head .lead {
  margin-top: 22px;
}

/* Logo ------------------------------------------------------------------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}

.logo-mark {
  display: inline-flex;
  align-items: baseline;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.logo-mark .br {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--green);
  transition: transform 0.35s var(--ease);
}

.logo-mark .br:first-child {
  margin-right: 2px;
}

.logo-mark .br:last-child {
  margin-left: 2px;
}

.logo:hover .br:first-child {
  transform: translateX(-3px);
}

.logo:hover .br:last-child {
  transform: translateX(3px);
}

.logo-sub {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.btn:hover svg.arrow {
  transform: translateX(4px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -12px rgba(8, 140, 92, 0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
}

.btn-ghost:hover {
  background: var(--green-50);
}

.btn-light {
  background: #fff;
  color: var(--brand-700);
}

.btn-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-outline:hover {
  box-shadow: inset 0 0 0 1px var(--green);
  color: var(--green);
}

.btn-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

/* Header ----------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  background: var(--header-bg-strong);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Umschalter Hell/Dunkel */
.theme-toggle {
  position: relative;
  flex: none;
  width: 54px;
  height: 30px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--toggle-bg);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background-color 0.4s var(--ease);
}

.theme-thumb {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.45s var(--ease), background-color 0.4s var(--ease);
}

.theme-thumb svg {
  position: absolute;
  inset: 5px;
  width: 14px;
  height: 14px;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}

.theme-thumb .i-sun {
  color: var(--brand);
}

.theme-thumb .i-moon {
  color: #e6ece9;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.theme-toggle[aria-checked="true"] .theme-thumb {
  transform: translateX(24px);
  background: #0a0e0c;
}

.theme-toggle[aria-checked="true"] .i-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.theme-toggle[aria-checked="true"] .i-moon {
  opacity: 1;
  transform: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav a:not(.btn) {
  position: relative;
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.2s var(--ease);
}

.nav a:not(.btn):hover,
.nav a.active {
  color: var(--ink);
}

.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1.5px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav a:not(.btn):hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.6px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.menu-toggle span:first-child {
  top: 18px;
}

.menu-toggle span:last-child {
  top: 25px;
}

.menu-open .menu-toggle span:first-child {
  top: 21.5px;
  transform: rotate(45deg);
}

.menu-open .menu-toggle span:last-child {
  top: 21.5px;
  transform: rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  padding: 24px clamp(20px, 5vw, 40px);
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.2s;
}

.mobile-menu a:hover {
  color: var(--green);
}

.menu-open .mobile-menu a {
  opacity: 1;
  transform: none;
}

.menu-open .mobile-menu a:nth-child(2) { transition-delay: 0.04s; }
.menu-open .mobile-menu a:nth-child(3) { transition-delay: 0.08s; }
.menu-open .mobile-menu a:nth-child(4) { transition-delay: 0.12s; }

/* Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(64px, 10vw, 124px));
  padding-bottom: clamp(72px, 9vw, 120px);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -340px;
  left: 50%;
  width: 1200px;
  height: 820px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(8, 140, 92, 0.11), rgba(8, 140, 92, 0));
  pointer-events: none;
}

.hero .eyebrow {
  margin-bottom: 26px;
}

.hero .display {
  max-width: 980px;
  margin-inline: auto;
}

.hero .lead {
  max-width: 680px;
  margin: 28px auto 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.hero-visual-wrap {
  margin-top: clamp(56px, 8vw, 88px);
  perspective: 1400px;
}

.hero-visual {
  --s: 0.94;
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, var(--visual-a) 0%, var(--visual-b) 100%);
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px var(--shadow),
    0 18px 36px -24px var(--shadow);
  transform: scale(var(--s));
  transform-origin: center top;
  will-change: transform;
}

.hero-visual svg.plan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ink);
}

.plan .paper { fill: var(--paper); }
.plan .row { fill: var(--line); }
.plan .win { fill: var(--visual-a); }
.plan .dim { stroke: var(--muted); }
.plan .dim-t { fill: var(--muted); }

.plan .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.2s var(--ease) forwards;
}

.plan .d1 { animation-delay: 0.3s; }
.plan .d2 { animation-delay: 0.7s; }
.plan .d3 { animation-delay: 1.1s; }
.plan .d4 { animation-delay: 1.5s; }

.plan .fade {
  opacity: 0;
  animation: fade 1.2s var(--ease) forwards;
}

.plan .f1 { animation-delay: 1.4s; }
.plan .f2 { animation-delay: 1.9s; }
.plan .f3 { animation-delay: 2.4s; }

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes fade {
  to { opacity: 1; }
}

.chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 16px;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 0 0 1px var(--glass-ring), 0 16px 32px -16px var(--shadow);
  text-align: left;
  opacity: 0;
  animation: chip-in 0.9s var(--ease) forwards, float 7s ease-in-out infinite;
}

.chip-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--green-50);
  color: var(--green);
}

.chip-icon svg {
  width: 18px;
  height: 18px;
}

.chip strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.chip small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.3;
}

.chip-1 {
  top: 48%;
  left: 3%;
  animation-delay: 2.2s, 3.1s;
}

.chip-2 {
  top: 40%;
  right: 3%;
  animation-delay: 2.6s, 3.5s;
}

.chip-3 {
  bottom: 6%;
  left: 46%;
  animation-delay: 3s, 3.9s;
}

/* Zeichnen erst starten, wenn das Visual im Bild ist */
.js .hero-visual-wrap:not(.in) .draw,
.js .hero-visual-wrap:not(.in) .fade,
.js .hero-visual-wrap:not(.in) .chip {
  animation-play-state: paused;
}

@keyframes chip-in {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Statement -------------------------------------------------------------- */

.statement {
  padding-block: clamp(72px, 10vw, 136px);
}

.statement-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 7vw, 104px);
  align-items: start;
}

.statement-head {
  position: sticky;
  top: calc(var(--header-h) + 40px);
}

.statement .eyebrow {
  margin-bottom: 22px;
}

.statement-text {
  font-size: clamp(26px, 2.9vw, 38px);
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.024em;
}

.statement-text .w {
  color: var(--word-dim);
  transition: color 0.5s var(--ease);
}

.statement-text .w.on {
  color: var(--ink);
}

.statement-text .w.accent.on {
  color: var(--green);
}

.statement-body {
  padding-top: 6px;
}

.statement-body p + p {
  margin-top: 18px;
}

.statement-body > p:not(.lead) {
  color: var(--ink-2);
}

.benefits {
  display: grid;
  gap: 22px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.benefits li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.benefit-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--green-50);
  color: var(--green);
}

.benefit-icon svg {
  width: 20px;
  height: 20px;
}

.benefits strong {
  display: block;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.benefits span:not(.benefit-icon) {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* Leistungen ------------------------------------------------------------- */

.services {
  padding-top: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 36px 38px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease),
    transform 0.4s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(8, 140, 92, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

.card:hover {
  background: var(--surface);
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -36px var(--shadow);
}

.card:hover::before {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}

.card-num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 0 0 1px var(--line);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.card:hover .card-icon {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.card p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.check-list {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-50)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23088c5c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.training {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  margin-top: 20px;
  padding: clamp(36px, 5vw, 56px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  overflow: hidden;
}

.training::after {
  content: "[ ]";
  position: absolute;
  right: -20px;
  bottom: -110px;
  font-family: var(--mono);
  font-size: 300px;
  font-weight: 500;
  line-height: 1;
  color: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}

.training .eyebrow {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 14px;
}

.training h3 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.12;
}

.training p {
  max-width: 640px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.training .btn {
  position: relative;
  z-index: 1;
}

/* Vorgehen --------------------------------------------------------------- */

.process {
  background: var(--bg-warm);
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
}

.steps::after {
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.8s var(--ease) 0.2s;
}

.steps.in::after {
  transform: scaleX(1);
}

.step {
  position: relative;
  padding-top: 44px;
}

.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-warm);
  box-shadow: inset 0 0 0 2px var(--line);
  transition: box-shadow 0.4s var(--ease), background-color 0.4s var(--ease);
}

.steps.in .step::before {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(8, 140, 92, 0.15);
}

.steps.in .step:nth-child(1)::before { transition-delay: 0.2s; }
.steps.in .step:nth-child(2)::before { transition-delay: 0.7s; }
.steps.in .step:nth-child(3)::before { transition-delay: 1.2s; }
.steps.in .step:nth-child(4)::before { transition-delay: 1.7s; }

.step-num {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
}

.step h3 {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.step p {
  margin-top: 12px;
  font-size: 16px;
  color: var(--muted);
}

/* Über mich -------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.profile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 5;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-900) 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: 0 40px 80px -40px var(--shadow);
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  pointer-events: none;
}

.profile-label {
  position: relative;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.profile-meta {
  position: relative;
}

.profile-name {
  display: block;
  font-size: clamp(36px, 4.2vw, 50px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.profile-role {
  display: block;
  margin-top: 10px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.82);
}

.profile-meta ul {
  display: grid;
  gap: 8px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
}

.profile-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-meta svg {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.75;
}

.about-text .eyebrow {
  margin-bottom: 20px;
}

.about-text p:not(.eyebrow) {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.65;
}

.about-text p.lead {
  color: var(--muted);
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}

.value {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.value strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.value span {
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* Kontakt ---------------------------------------------------------------- */

.contact {
  position: relative;
  text-align: center;
  background: var(--bg-soft);
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  bottom: -420px;
  left: 50%;
  width: 1100px;
  height: 760px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(8, 140, 92, 0.12), rgba(8, 140, 92, 0));
  pointer-events: none;
}

.contact .container {
  position: relative;
}

.contact .eyebrow {
  margin-bottom: 22px;
}

.contact .h2 {
  max-width: 820px;
  margin-inline: auto;
}

.contact .lead {
  max-width: 560px;
  margin: 24px auto 0;
}

.mail-link {
  position: relative;
  display: inline-block;
  margin-top: 44px;
  font-size: clamp(24px, 3.6vw, 42px);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--green);
}

.mail-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0.15);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.mail-link:hover::after {
  transform: scaleX(1);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.contact-note {
  margin-top: 36px;
  font-size: 14px;
  color: var(--muted);
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding-block: 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin-top: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-links a {
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--green);
}

/* Rechtstexte ------------------------------------------------------------ */

.legal {
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 104px));
  padding-bottom: clamp(80px, 10vw, 128px);
}

.legal .container {
  max-width: 820px;
}

.legal .eyebrow {
  margin-bottom: 20px;
}

.legal h1 {
  font-size: clamp(40px, 5.4vw, 60px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.legal .intro {
  margin-top: 20px;
  color: var(--muted);
}

.legal h2 {
  margin-top: 56px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal h3 {
  margin-top: 28px;
  font-size: 17px;
  font-weight: 650;
}

.legal p,
.legal address,
.legal ul {
  margin-top: 14px;
  color: var(--ink-2);
  font-style: normal;
  line-height: 1.7;
}

.legal ul {
  padding-left: 20px;
  list-style: disc;
}

.legal li + li {
  margin-top: 6px;
}

.legal a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal .card-block {
  margin-top: 40px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.legal .card-block p:first-child,
.legal .card-block address:first-child {
  margin-top: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  font-weight: 600;
  color: var(--green);
}

.back-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* 404 -------------------------------------------------------------------- */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: calc(var(--header-h) + 40px) 20px 60px;
  text-align: center;
}

.notfound .code {
  font-family: var(--mono);
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--green);
  line-height: 1;
}

.notfound p {
  margin: 20px auto 36px;
  max-width: 460px;
}

/* Scroll-Animationen ----------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  filter: none;
}

.js .reveal.r1 { transition-delay: 0.08s; }
.js .reveal.r2 { transition-delay: 0.16s; }
.js .reveal.r3 { transition-delay: 0.24s; }
.js .reveal.r4 { transition-delay: 0.32s; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1024px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-grid .card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-right {
    gap: 12px;
  }

  .statement-grid {
    grid-template-columns: 1fr;
  }

  .statement-head {
    position: static;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    aspect-ratio: auto;
    min-height: 340px;
    gap: 72px;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    row-gap: 48px;
  }

  .steps::before,
  .steps::after {
    display: none;
  }

  .training {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .training .btn {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .logo-sub {
    display: none;
  }

  .eyebrow {
    gap: 6px;
    font-size: 11.5px;
    letter-spacing: 0.1em;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 32px 26px;
  }

  .card-top {
    margin-bottom: 36px;
  }

  .hero-visual {
    aspect-ratio: 4 / 5;
  }

  .chip {
    padding: 10px 14px 10px 10px;
  }

  .chip-1 {
    top: 4%;
    left: 5%;
  }

  .chip-2 {
    top: auto;
    bottom: 4%;
    right: 5%;
  }

  .chip-3 {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    row-gap: 36px;
  }

  .values {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn,
  .contact-actions .btn {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

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

  .hero-visual {
    transform: none;
  }
}
