/* JD Dobler – joerndobler.de
   Farben und Tokens: jd-brain/02-marke/farben-und-design.md */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Echtes Kursiv, wird nur geladen, wenn kursiver Text auf der Seite steht */
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --brand:        #2563EB;
  --brand-strong: #1D4ED8;
  --fg:           #0B1B2B;
  --fg-muted:     #475569;
  --fg-subtle:    #64748B;
  --bg:           #F8FAFC;
  --surface:      #FFFFFF;
  --border:       #E2E8F0;
  --border-input: #94A3B8;
  --panel:        #E2E8F0;
  --on-brand:     #FFFFFF;
  --band:         #EFF6FF;

  --success-fg: #047857;  --success-bg: #ECFDF5;  --success-border: #A7F3D0;
  --danger-fg:  #B91C1C;  --danger-bg:  #FEF2F2;  --danger-border:  #FECACA;

  --measure: 48rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --space-section: clamp(4rem, 8vw, 6.5rem);
  --radius: 8px;

  /* Prozesslinie: Stärke, Radius der Biegung */
  --rail: 3px;
  --bend: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-strong: #38BDF8;
    --fg:           #F8FAFC;
    --fg-muted:     #94A3B8;
    --fg-subtle:    #94A3B8;
    --bg:           #0B1B2B;
    --surface:      #10263D;
    --border:       #243B53;
    --border-input: #4B6584;
    --panel:        #16324F;
    --band:         color-mix(in srgb, #2563EB 14%, #0B1B2B);

    --success-fg: #34D399;
    --success-bg: color-mix(in srgb, #34D399 15%, #0B1B2B);
    --success-border: color-mix(in srgb, #34D399 40%, #0B1B2B);
    --danger-fg:  #F87171;
    --danger-bg:  color-mix(in srgb, #F87171 15%, #0B1B2B);
    --danger-border: color-mix(in srgb, #F87171 40%, #0B1B2B);
  }
}

/* Grundlagen */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6.5rem; }

body {
  position: relative;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-feature-settings: "cv11", "ss03";
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; }

/* Überschriften: Inter Display (optische Größe 32), farben-und-design.md §4 */
h1, h2 { font-variation-settings: "opsz" 32; font-weight: 600; }

p { margin: 0; }
p + p { margin-top: 1em; }

a { color: var(--brand-strong); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}


.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--surface);
  padding: 0.5rem 1rem;
}
.skip:focus { top: 1rem; }

/* Kopf */

/* Kopf bleibt beim Scrollen stehen. Fläche und Linie laufen über die volle Breite
   (Schatten statt zusätzlichem Wrapper, clip-path schneidet oben und seitlich ab). */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1rem;
  background: var(--bg);
  box-shadow: 0 0 0 100vmax var(--bg), 0 1px 0 100vmax var(--border);
  clip-path: inset(0 -100vmax -1px);
}

.site-head .logo img { width: 180px; }

.site-head nav { display: flex; gap: 1.75rem; }

.site-head nav a {
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-head nav a:hover { color: var(--brand-strong); }

@media (max-width: 40rem) {
  .site-head nav a:not([href="#kontakt"]):not([href^="./"]) { display: none; }
}

/* Abschnitte */

.section { padding-top: var(--space-section); }

.label {
  margin-bottom: 0.6rem;
  color: var(--brand-strong);
  font-size: 0.9375rem;
  font-weight: 600;
}

.section h2,
.about h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: clamp(1.5rem, 3.5vw, 2.25rem);
}

.section p,
.about-text p { max-width: var(--measure); }

/* Hero */

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) 0; }

.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
}

.hero .claim { display: block; }

.hero .kicker {
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 32;
}

.hero .lead {
  max-width: var(--measure);
  margin-top: 1rem;
  font-size: clamp(1.0625rem, 1.6vw, 1.15rem);
  color: var(--fg-muted);
}

.hero .button { margin-top: 2rem; }

/* Das eine auffällige Element: die Prozesslinie aus Logo und Briefpapier.
   Im Hero verbindet sie die zwei Hälften des Claims, läuft nach rechts, biegt ab
   und führt im rechten Rand bis zum Fußband (.rail, gesetzt in main.js),
   mit einem Node an jedem Abschnitt – wie im Briefpapier. */

.route {
  position: relative;
  display: flex;
  align-items: center;
  margin-block: clamp(0.9rem, 2vw, 1.4rem);
  margin-right: calc(var(--gutter) / -2 - var(--rail) / 2);
  padding-right: var(--bend);
}

.route .node-end { display: none; }

.route .corner {
  position: absolute;
  right: 0;
  top: calc(50% - var(--rail) / 2);
  width: var(--bend);
  height: var(--bend);
  border-top: var(--rail) solid var(--brand);
  border-right: var(--rail) solid var(--brand);
  border-top-right-radius: var(--bend);
}

.route .node {
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
}

.route .node-start { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 18%, transparent); }

.route .line {
  flex: 1;
  height: 3px;
  background: var(--brand);
  box-shadow: 0 0 16px color-mix(in srgb, var(--brand) 50%, transparent);
  transform-origin: left center;
}

/* Schmale Bildschirme: nur die waagrechte Linie mit End-Node, kein Rand-Strang */
@media (max-width: 51.99rem) {
  .route { margin-right: 0; padding-right: 0; }
  .route .corner { display: none; }
  .route .node-end { display: block; }
}

.rail {
  display: none;
  position: absolute;
  width: var(--rail);
  background: var(--brand);
  pointer-events: none;
}

.rail i {
  position: absolute;
  left: calc(var(--rail) / 2 - 10px);
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: var(--bg);
}
.rail i.end { background: var(--brand); }

/* Aktiver Abschnitt: Node wächst und füllt sich (gesetzt in main.js beim Scrollen) */
.rail i.is-active {
  background: var(--brand);
  transform: scale(1.6);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 20%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
  .rail i { transition: transform .25s ease-out, background-color .25s ease-out, box-shadow .25s ease-out; }
}

@media (min-width: 52rem) {
  .rail.is-ready { display: block; }
}

/* Einblendung des Claims: erste Hälfte, Linie, dann „Einfach umgesetzt.“ buchstabenweise
   mit Cursor wie auf der Kommandozeile. Buchstaben und Cursor setzt main.js,
   ohne JavaScript steht der Text einfach da. */

.claim-2 .sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cursor {
  display: inline-block;
  width: 0.42em;
  height: 0.82em;
  margin-left: 0.06em;
  vertical-align: -0.06em;
  background: var(--brand);
}

@media (prefers-reduced-motion: no-preference) {
  .claim-1      { animation: rise .7s cubic-bezier(.2, .7, .2, 1) .1s both; }
  .route .line  { animation: draw .9s cubic-bezier(.6, 0, .2, 1) .6s both; }
  .route .node-start { animation: fade .3s ease-out .45s both; }
  .route .node-end   { animation: pop .35s ease-out 1.45s both; }
  .route .corner     { animation: fade .3s ease-out 1.45s both; }
  .cursor       { animation: fade 1ms linear 1.5s both, blink 1s steps(1) var(--typed-end, 2.8s) 5; }
  .rail         { animation: fade .6s ease-out 2.4s both; }
}

@keyframes rise  { from { opacity: 0; transform: translateY(0.35em); } to { opacity: 1; transform: none; } }
@keyframes draw  { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pop   { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* Button */

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: var(--on-brand);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #1D4ED8; text-decoration: none; }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* Leistungen: ein Rahmen, zwei gleichrangige Spalten */

.services {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.service { padding: clamp(1.5rem, 3vw, 2.25rem); }
.service + .service { border-top: 1px solid var(--border); }

.service::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 1.25rem;
  background: var(--brand);
}

.service h3 {
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.service p { color: var(--fg-muted); }
.service .examples-intro { margin-top: 1.25rem; color: var(--fg); font-weight: 600; }

@media (min-width: 52rem) {
  .services { grid-template-columns: 1fr 1fr; }
  .service + .service { border-top: 0; border-left: 1px solid var(--border); }
}

/* Aufzählungen mit Logo-Nodes */

.examples,
.milestones {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  max-width: var(--measure);
}

.examples li,
.milestones li {
  position: relative;
  padding-left: 1.5rem;
}
.examples li + li,
.milestones li + li { margin-top: 0.5rem; }

.examples li::before,
.milestones li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.examples li { color: var(--fg-muted); }

/* Ansatz: echte Reihenfolge */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  max-width: var(--measure);
}

.steps li {
  position: relative;
  padding-left: 3.25rem;
  padding-bottom: 2rem;
  counter-increment: step;
}
.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.9rem;
  font-weight: 650;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.steps h3 { font-size: 1.0625rem; font-weight: 650; margin-bottom: 0.2rem; }
.steps p { color: var(--fg-muted); }

/* Über mich: volle Fläche, Foto oben links in den Text eingebunden, der Text fließt herum */

.about-band {
  margin-top: var(--space-section);
  background: var(--panel);
}

.about { padding-block: clamp(3.5rem, 7vw, 5.5rem); }
.about::after { content: ""; display: block; clear: both; }

.portrait {
  float: left;
  width: 10rem;
  margin: 0 clamp(1.5rem, 3vw, 2.25rem) 1rem 0;
}

.about-text .milestones { margin-block: 0.6rem 1em; }

/* Liste und Haltungssatz weichen dem Foto aus, statt darunter zu laufen */
.about-text .milestones,
.about-text .stance { display: flow-root; }

.about-text .stance {
  margin-block: 1.75rem;
  padding-left: 1.25rem;
  border-left: 3px solid var(--brand);
  font-size: clamp(1.125rem, 1.9vw, 1.25rem);
  font-style: italic;
  font-weight: 560;
  line-height: 1.5;
}

@media (max-width: 40rem) {
  .portrait { width: 7rem; }
}

/* Kontakt */

.contact form { display: grid; gap: 1.15rem; max-width: 34rem; }
.contact .intro { margin-bottom: 1.75rem; }

.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.9375rem; }

.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--border-input);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible { outline-offset: 0; border-color: var(--brand); }

.hint { color: var(--fg-muted); font-size: 0.875rem; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.status {
  padding: 1rem 1.15rem;
  border: 1px solid;
  border-radius: 6px;
  max-width: 34rem;
}
.status[hidden] { display: none; }
.status.ok    { color: var(--success-fg); background: var(--success-bg); border-color: var(--success-border); }
.status.error { color: var(--danger-fg);  background: var(--danger-bg);  border-color: var(--danger-border); }

/* Fuß: Fußband wie im Briefpapier */

.site-foot {
  margin-top: var(--space-section);
  padding-block: 2.25rem;
  background: var(--band);
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

.site-foot nav { display: flex; gap: 1.5rem; }
.site-foot a { color: var(--fg-muted); }

/* Rechtstexte */

.legal { padding-block: clamp(2rem, 6vw, 4rem) 0; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -0.025em; margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; font-weight: 650; margin: 2.5rem 0 0.75rem; }
.legal p, .legal ul { max-width: var(--measure); }
.legal ul { padding-left: 1.25rem; }
.legal address { font-style: normal; }
