/* ---------- Fonts (lokal) ---------- */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/source-sans-3-latin-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/source-sans-3-latin-italic-var.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0c;
  --surface: #121214;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #ecebe8;
  --muted: #a3a29e;
  --faint: #6e6d6a;
  --accent: #ff9500;
  --accent-hover: #ffa733;

  --font: 'Source Sans 3', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1160px;
  --header-h: 72px;
  --radius: 6px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #111; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.06; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #111;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Hintergrund ---------- */
#waves {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

main, .site-footer { position: relative; z-index: 1; }
main { flex: 1; }

.container {
  width: min(100% - 3rem, var(--container));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.3s;
}
.site-header.is-scrolled {
  background: rgba(11, 11, 12, 0.96);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 1.1;
}
.logo-mark { width: 20px; height: 20px; flex: none; }
.logo-name { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.logo-sub { color: var(--muted); font-size: 1.15rem; margin-left: 2px; }

.nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0; padding: 0;
}
.nav a {
  display: inline-block;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current='page'] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
.nav .nav-cta {
  margin-left: 12px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 7px 16px;
  transition: border-color 0.2s;
}
.nav .nav-cta:hover { border-color: var(--text); }
.nav .nav-cta[aria-current='page'] { text-decoration: none; border-color: var(--text); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  position: relative;
  z-index: 60;
}
.nav-toggle span {
  position: absolute;
  left: 50%; top: 50%;
  width: 18px; height: 1.5px;
  margin-left: -9px;
  background: currentColor;
  transition: transform 0.25s;
}
.nav-toggle span:nth-child(1) { transform: translateY(-4px); }
.nav-toggle span:nth-child(2) { transform: translateY(4px); }
.nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { transform: rotate(-45deg); }

/* ---------- Buttons & Links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.text-link svg { width: 16px; height: 16px; }
.text-link svg { transition: transform 0.2s; }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Typo Helpers ---------- */
.label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.lead { font-size: clamp(1.2rem, 1.7vw, 1.38rem); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.subtle { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head p { color: var(--muted); font-size: 1.2rem; }

.split {
  display: grid;
  grid-template-columns: minmax(220px, 4fr) 8fr;
  gap: clamp(32px, 6vw, 96px);
}
.split-side { align-self: start; position: sticky; top: calc(var(--header-h) + 32px); }

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
}
.hero h1 { max-width: 16ch; margin-bottom: 0.45em; }
.hero h1 .subtle { display: block; }
.hero .lead { margin-bottom: 36px; }

.focus-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
  font-size: 1.15rem;
  min-height: 1.6em;
}
.focus-line .label { margin: 0; }
.typed-text { color: var(--text); font-weight: 600; }
.typed-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: -0.12em;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------- Leistungs-Liste (Start) ---------- */
.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.service-list a {
  display: grid;
  grid-template-columns: 56px 1fr 24px;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
}
.service-list .num { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 1rem; }
.service-list h3 { margin-bottom: 6px; }
.service-list p { color: var(--muted); margin: 0; max-width: 60ch; }
.service-list svg { width: 20px; height: 20px; color: var(--faint); align-self: center; transition: color 0.2s; }
.service-list a:hover svg { color: var(--text); }

/* ---------- Grundsätze ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.principle { padding-top: 4px; }
.principle .num { display: block; color: var(--faint); font-size: 1rem; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.principle p { color: var(--muted); margin: 0; }

/* ---------- Über mich ---------- */
.about {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.portrait {
  width: clamp(140px, 16vw, 200px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.5s ease;
}
.portrait:hover img { filter: grayscale(0); }
.portrait.large { width: clamp(170px, 20vw, 240px); }
.about p { max-width: 62ch; }

/* ---------- Listen ---------- */
.bullet-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bullet-list li { position: relative; padding-left: 20px; }
.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.8em;
  width: 5px; height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--muted);
}
.bullet-list.cols { grid-template-columns: repeat(2, 1fr); gap: 10px 32px; }

/* ---------- CTA ---------- */
.cta h2 { max-width: 20ch; }
.cta .lead { margin-bottom: 28px; }
.mail-link {
  display: inline-block;
  font-size: clamp(1.35rem, 3.2vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  transition: color 0.2s;
  overflow-wrap: anywhere;
}
.mail-link:hover { color: var(--muted); }

/* ---------- Unterseiten ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(64px, 10vw, 128px)) 0 clamp(48px, 7vw, 88px); }
.page-hero h1 { max-width: 18ch; }

.toc { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; padding: 0; list-style: none; }
.toc a { color: var(--muted); text-decoration: none; font-size: 1.05rem; }
.toc a:hover { color: var(--text); }

.service {
  padding: clamp(56px, 7vw, 88px) 0;
}
.service .num { display: block; color: var(--faint); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.service h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); margin-bottom: 0.35em; }
.service .tagline { color: var(--muted); font-size: 1.2rem; margin: 0; }
.service-body > p { font-size: 1.2rem; }
.service-body h3 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 16px;
}
.ideal { margin: 36px 0 0; color: var(--muted); }
.ideal strong { color: var(--text); }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 40px);
}

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 20px; }
.contact-grid .panel { display: flex; flex-direction: column; }
.contact-side { display: grid; gap: 20px; }
.contact-side address { font-style: normal; line-height: 1.6; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: auto; }
.copy-feedback { font-size: 0.95rem; color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.copy-feedback.is-visible { opacity: 1; }

/* ---------- Rechtliches ---------- */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.45rem; margin: 2em 0 0.6em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li, .legal address { color: #cfcdc9; }
.legal address { font-style: normal; margin-bottom: 1em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.35em; }
.legal a { color: var(--text); font-weight: 600; }
.legal a:hover { color: var(--muted); }
.legal .todo {
  border-left: 3px solid var(--accent);
  padding: 10px 16px;
  background: rgba(255, 149, 0, 0.07);
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h2 {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); }
.footer-grid address { font-style: normal; color: var(--muted); }
.footer-about p { color: var(--muted); max-width: 34ch; margin-top: 16px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  font-size: 0.95rem;
  color: var(--faint);
}
.footer-bottom a { color: var(--faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--text); }
.footer-bottom nav { display: flex; gap: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .logo-sub { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav ul { flex-direction: column; gap: 8px; }
  .nav a { font-size: 1.6rem; padding: 8px 20px; }
  .nav .nav-cta { margin: 16px 0 0; font-size: 1.25rem; padding: 10px 24px; }

  .split, .contact-grid, .about { grid-template-columns: 1fr; }
  .split-side { position: static; }
  .principles { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  .container { width: min(100% - 2.5rem, var(--container)); }
  .service-list a { grid-template-columns: 40px 1fr; }
  .service-list svg { display: none; }
  .bullet-list.cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .typed-caret { animation: none; }
}
