/* Karrer Solutions: Styles und Design Tokens */

@font-face { font-family: "IBM Plex Sans"; src: url("schriften/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("schriften/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("schriften/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* Primitive */
  --paper-100: #f3f6f4;
  --paper-200: #e4ecea;
  --stone-600: #52646a;
  --stone-300: #b3c6c8;
  --ink-900: #0b2326;
  --teal-600: #0e5a5f;
  --teal-700: #0a4549;
  --teal-300: #8fd0c8;
  --sand-300: #c9ad78;
  --white: #ffffff;

  --font-display: "IBM Plex Sans", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.875rem, 0.86rem + 0.08vw, 0.9375rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.1875rem, 1.12rem + 0.33vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.5rem);
  --step-4: clamp(2.375rem, 1.5rem + 4.6vw, 5.5rem);

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4rem, 3rem + 6vw, 8rem);

  --radius-s: 4px;
  --radius-m: 10px;
  --gutter: clamp(1.25rem, 0.5rem + 3.5vw, 3rem);
  --maxw: 1200px;
  --header-h: 4.25rem;

  /* Semantic */
  --bg: var(--paper-100);
  --bg-alt: var(--paper-200);
  --bg-inverse: var(--ink-900);
  --text: var(--ink-900);
  --text-muted: var(--stone-600);
  --text-inverse: var(--paper-100);
  --text-inverse-muted: var(--stone-300);
  --accent: var(--teal-600);
  --accent-hover: var(--teal-700);
  --accent-on-dark: var(--teal-300);
  --on-accent: var(--white);
  --warm: var(--sand-300);
  --on-warm: var(--ink-900);
  --rule: rgba(11, 35, 38, 0.16);
  --rule-inverse: rgba(243, 246, 244, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.process :focus-visible, .contact :focus-visible, .site-footer :focus-visible { outline-color: var(--accent-on-dark); }

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-4); top: -4rem; z-index: 200; background: var(--ink-900); color: var(--paper-100); padding: var(--space-3) var(--space-4); border-radius: var(--radius-s); }
.skip-link:focus { top: var(--space-4); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: var(--header-h); gap: 0 var(--space-5); }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; min-height: 44px; }
.brand-mark { width: 36px; height: 35px; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: var(--space-6); font-size: var(--step--1); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) left bottom 10px / 0 2px no-repeat; transition: background-size .25s ease; }
.site-nav a:hover { background-size: 100% 2px; }
.site-nav .nav-cta { background: var(--ink-900); color: var(--paper-100); padding: 0 1.1rem; border-radius: var(--radius-s); font-weight: 500; transition: background-color .2s ease; }
.site-nav .nav-cta:hover { background: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.5rem; font: inherit; font-weight: 500; font-size: var(--step--1); text-decoration: none; border-radius: var(--radius-s); border: 1.5px solid transparent; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--ink-900); color: var(--ink-900); }
.btn-ghost:hover { background: var(--ink-900); color: var(--paper-100); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: var(--space-9) 0 var(--space-8); }
.hero .wrap { position: relative; z-index: 1; }
/* Punktraster: statisch per CSS, die Mausreaktion zeichnet script.js darüber */
.hero-field { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, rgba(14, 90, 95, 0.2) 1.2px, transparent 1.7px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(ellipse 70% 90% at 82% 38%, #000 15%, transparent 78%); mask-image: radial-gradient(ellipse 70% 90% at 82% 38%, #000 15%, transparent 78%); }
.hero-field.is-canvas { background-image: none; }
.hero-field canvas { width: 100%; height: 100%; display: block; }
.hero-kicker { display: inline-flex; align-items: center; gap: 0.6rem; font-size: var(--step--1); font-weight: 500; color: var(--text-muted); margin-bottom: var(--space-5); }
.hero-kicker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--warm); flex-shrink: 0; }
.hero-title { font-size: var(--step-4); font-weight: 600; max-width: 14ch; letter-spacing: -0.025em; line-height: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 36rem) auto; gap: var(--space-6) var(--space-8); align-items: end; margin-top: var(--space-7); }
.lead { font-size: var(--step-1); line-height: 1.55; max-width: 34rem; }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Direkter Draht: einzige Bewegung auf der Seite */
.direct { margin-top: var(--space-8); position: relative; }
.direct-line { position: absolute; left: 0; right: 0; top: 14px; height: 1.5px; margin-top: -0.75px; background: var(--ink-900); transform: scaleX(0); transform-origin: left; animation: draw 1.4s cubic-bezier(.65, 0, .25, 1) .3s forwards; }
.direct-nodes { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; }
.node { display: flex; flex-direction: column; gap: var(--space-3); opacity: 0; animation: appear .5s ease forwards; }
.node-a { align-items: flex-start; animation-delay: .2s; }
.node-b { align-items: center; text-align: center; animation-delay: 1.1s; }
.node-c { align-items: flex-end; text-align: right; animation-delay: 1.6s; }
.dot { display: block; width: 14px; height: 28px; position: relative; }
.dot::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--ink-900); }
.node-b .dot { width: 28px; }
.node-b .dot::before { width: 28px; height: 28px; margin-top: -14px; background: var(--warm); box-shadow: 0 0 0 6px var(--bg); }
.node-c .dot::before { left: auto; right: 0; }
.node-label { font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); letter-spacing: -0.015em; line-height: 1.2; max-width: 12ch; }
.node-b .node-label { max-width: none; }
.node-label small { display: block; font-family: var(--font-body); font-weight: 400; font-size: var(--step--1); color: var(--text-muted); letter-spacing: 0; margin-top: 2px; }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Abschnitte */
.section-head h2 { font-size: var(--step-3); max-width: 20ch; }
.section-head p { margin-top: var(--space-5); color: var(--text-muted); max-width: 34rem; font-size: var(--step-1); line-height: 1.5; }

/* Fragen */
.questions { padding: var(--space-9) 0; background: var(--bg-alt); border-block: 1px solid var(--rule); }
.questions .section-head h2 { max-width: 16ch; }
.question-list { margin-top: var(--space-7); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.question-list li { border-top: 3px solid var(--ink-900); padding-top: var(--space-5); font-family: var(--font-display); font-weight: 500; font-size: var(--step-1); line-height: 1.35; letter-spacing: -0.01em; }

/* Leistungen */
.services { padding: var(--space-9) 0; }
.services-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: start; }
.sticky { position: sticky; top: calc(var(--header-h) + 2rem); }
.service-list { border-top: 1px solid var(--rule); }
.service { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: var(--space-5); padding: var(--space-6) 0; border-bottom: 1px solid var(--rule); }
.icon { width: 32px; height: 32px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.service h3 { font-size: var(--step-2); margin-bottom: var(--space-3); }
.service p { color: var(--text-muted); max-width: 40rem; }
.service p + p { margin-top: var(--space-3); }

.prices { width: 100%; margin-top: var(--space-5); border-collapse: collapse; font-size: var(--step--1); }
.prices caption { text-align: left; font-weight: 600; margin-bottom: var(--space-2); }
.prices th, .prices td { text-align: left; padding: var(--space-3) var(--space-3) var(--space-3) 0; border-top: 1px solid var(--rule); font-weight: 400; vertical-align: baseline; }
.prices tbody th { font-weight: 600; white-space: nowrap; }
.prices td:last-child { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.prices small { font-weight: 400; color: var(--text-muted); }

/* Ablauf */
.process { background: var(--bg-inverse); color: var(--text-inverse); padding: var(--space-9) 0; }
.process .section-head h2 { max-width: 18ch; }
.process .section-head p { color: var(--text-inverse-muted); }
.steps { counter-reset: step; margin-top: var(--space-8); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7); }
.steps li { counter-increment: step; position: relative; padding-top: var(--space-7); }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 50%; background: var(--warm); color: var(--on-warm); font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 1.25rem; left: 2.5rem; right: calc(var(--space-7) * -1); height: 1px; background: var(--rule-inverse); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--step-2); margin-bottom: var(--space-3); }
.steps p { color: var(--text-inverse-muted); max-width: 26rem; }

/* Über mich */
.about { padding: var(--space-9) 0; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-8); align-items: center; }
.portrait { position: relative; }
.portrait img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-m); }
.portrait::after { content: ""; position: absolute; right: -1rem; bottom: -1rem; width: 40%; height: 40%; border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); border-radius: 0 0 var(--radius-m) 0; pointer-events: none; }
.about-text h2 { font-size: var(--step-3); max-width: 18ch; margin-bottom: var(--space-6); }
.about-text p { color: var(--text-muted); max-width: 38rem; margin-bottom: var(--space-4); }
.about-text .signature { color: var(--text); font-weight: 600; margin-top: var(--space-6); }

/* Kontakt */
.contact { background: var(--accent); color: var(--white); padding: var(--space-9) 0; }
.contact h2 { font-size: var(--step-4); max-width: 14ch; }
.contact-lead { margin-top: var(--space-6); font-size: var(--step-1); max-width: 38rem; line-height: 1.5; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-4) var(--space-7); margin-top: var(--space-7); }
.btn-light { background: var(--white); color: var(--accent); min-height: 3.5rem; padding: 0 2rem; font-size: var(--step-0); }
.btn-light:hover { background: var(--paper-200); }
.reveal-inline { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.reveal-inline:hover { color: var(--accent-hover); }
.mail-link { display: inline-block; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 7.2vw, 3.5rem); white-space: nowrap; letter-spacing: -0.025em; color: var(--white); text-decoration: none; background: linear-gradient(var(--white), var(--white)) left bottom / 100% 3px no-repeat; padding-bottom: 0.15em; transition: background-size .25s ease, color .25s ease; }
.mail-link:hover { background-size: 100% 100%; color: var(--accent); }

/* Footer */
.site-footer { background: var(--ink-900); color: var(--text-inverse-muted); padding: var(--space-6) 0; font-size: var(--step--1); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4) var(--space-6); flex-wrap: wrap; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-inverse); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Rechtstexte */
.legal { padding: var(--space-8) 0 var(--space-9); }
.legal h1 { font-size: var(--step-3); margin-bottom: var(--space-6); }
.legal h2 { font-size: var(--step-1); margin: var(--space-6) 0 var(--space-2); }
.legal p { max-width: 42rem; margin-bottom: var(--space-3); color: var(--text-muted); }
.legal a { color: var(--accent); }
.legal .back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: var(--space-5); font-size: var(--step--1); }

/* Responsive */
@media (max-width: 980px) {
  .services-grid, .about-grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .sticky { position: static; }
  .portrait { max-width: 26rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .question-list, .steps { grid-template-columns: 1fr; gap: var(--space-6); }
  .steps li { padding-top: 0; padding-left: 4rem; }
  .steps li::after { top: 2.5rem; bottom: calc(var(--space-6) * -1); left: 1.25rem; right: auto; width: 1px; height: auto; }
}
@media (max-width: 760px) {
  .site-header { position: static; }
  .header-inner { padding-block: var(--space-2); }
  .site-nav { width: 100%; justify-content: space-between; gap: var(--space-3); border-top: 1px solid var(--rule); }
  .site-nav .nav-cta { padding: 0 0.9rem; }
  .brand-name { font-size: 1.125rem; }
  .service { grid-template-columns: 1fr; gap: var(--space-3); }
  .prices th, .prices td { display: block; padding: 0; border: 0; }
  .prices tr { display: block; padding: var(--space-3) 0; border-top: 1px solid var(--rule); }
  .prices td:last-child { text-align: left; margin-top: 2px; }
  .node-label { max-width: 9ch; font-size: 1rem; }
  .node-b .node-label { max-width: 9ch; }
  .portrait::after { right: -0.5rem; bottom: -0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .direct-line { animation: none; transform: none; }
  .node { animation: none; opacity: 1; }
  * { transition: none !important; }
}
