/* ==========================================================================
   Portfolio – Stylesheet
   Keine externen Ressourcen. Systemschriften, keine Bilder.
   ========================================================================== */

:root {
  --ink: #16233a;
  --ink-soft: #3b4659;
  --muted: #5d6676;
  --paper: #f7f4ee;
  --paper-2: #efeae0;
  --card: #fffdf9;
  --rule: #d9d2c4;
  --accent: #9e4c1b;      /* gebranntes Kupfer, Kontrast ≥ 4.5:1 auf --paper, --paper-2, --card und --accent-soft */
  --accent-soft: #f1e2d5;
  --focus: #1f5fbf;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --space: clamp(4rem, 10vw, 7.5rem);
  --radius: 4px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece7dd;
    --ink-soft: #c9c3b7;
    --muted: #a39d92;
    --paper: #12161d;
    --paper-2: #181d26;
    --card: #1a2029;
    --rule: #2e3542;
    --accent: #e09a6a;
    --accent-soft: #2c2219;
    --focus: #8fb6ff;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.6em;
  hyphens: manual;
}
h1 { font-size: clamp(2.3rem, 1.6rem + 3.4vw, 4.25rem); font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 500; }
h3 { font-size: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem); }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
li + li { margin-top: 0.3em; }
strong { font-weight: 600; }

a { hyphens: manual; color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

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

::selection { background: var(--accent-soft); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

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

/* Platzhalter: bewusst auffällig, damit sie beim Ausfüllen gefunden werden */
.placeholder {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--accent);
  background: var(--accent-soft);
  border-bottom: 1.5px dashed var(--accent);
  padding: 0 0.25em;
  border-radius: 2px;
  hyphens: none;
  white-space: normal;
}

/* Kleine Kapitälchen-Labels */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
  hyphens: manual;
}

/* ---------- Kopfbereich ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom: 1px solid var(--rule);
}
@supports (backdrop-filter: blur(6px)) {
  .site-header { backdrop-filter: saturate(1.2) blur(8px); }
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  padding-block: 0.6rem;
}
.brand-mark {
  width: 1.9rem; height: 1.9rem;
  flex: none;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  font-size: 0.95rem;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}
.nav-toggle-bars { width: 1.1rem; height: 0.75rem; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after, .nav-toggle-bars span {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars span { top: calc(50% - 1px); }
.nav-toggle-bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(0.36rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-0.36rem) rotate(-45deg); }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
  gap: 0.25rem 1.4rem;
}
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-block;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Ohne JS: Navigation einfach umbrechen. Mit JS (html.js) auf kleinen Screens einklappen. */
@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { flex-basis: 100%; display: none; padding-bottom: 1rem; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .site-nav { flex-basis: 100%; }
  .site-nav ul { gap: 0.1rem 1rem; padding-bottom: 0.6rem; }
}
@media (min-width: 52.01rem) {
  .site-nav { flex-basis: auto; }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.hero::after {
  /* dezente typografische Linienstruktur statt Stockbild */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, color-mix(in srgb, var(--rule) 45%, transparent) 31px 32px);
  mask-image: linear-gradient(to left, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 55%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 16ch; margin-bottom: 0.4em; }
.hero-claim {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.05rem + 0.8vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 36ch;
  margin-bottom: 1.4rem;
}
.hero-intro { max-width: 60ch; color: var(--ink-soft); }
.hero-meta {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.hero-meta li { margin: 0; }
.tag {
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--card);
}



/* ---------- Sektionen ---------- */
.section { padding-block: var(--space); border-bottom: 1px solid var(--rule); }
.section--tint { background: var(--paper-2); }

.section-head {
  display: grid;
  gap: 0.5rem 2rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
  font-feature-settings: "lnum", "tnum";
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-num::after { content: ""; flex: 1; max-width: 4rem; height: 1px; background: var(--accent); }
.section-head h2 { margin-bottom: 0.3em; }
.section-head h2:last-child { margin-bottom: 0; }
.section-head p { color: var(--ink-soft); max-width: 62ch; margin: 0; }

@media (min-width: 60rem) {
  .section-head { grid-template-columns: 12rem minmax(0, 1fr); align-items: baseline; }
  .section-head .section-num { padding-top: 0.6rem; }
}

.lead { font-size: 1.1em; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Auf einen Blick (Faktenblatt) ---------- */
.facts {
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
}
.facts-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 1.1rem clamp(1.1rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
}
.facts-head h3 { margin: 0; font-size: 1.15rem; }
.facts-head p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.facts dl { margin: 0; display: grid; }
.fact {
  display: grid;
  gap: 0.2rem 1.5rem;
  padding: 1rem clamp(1.1rem, 3vw, 1.75rem);
  border-bottom: 1px solid var(--rule);
}
.fact:last-child { border-bottom: 0; }
.fact dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.fact dd { margin: 0; }
.fact dd strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.08rem; }
.fact dd span.sub { display: block; color: var(--ink-soft); font-size: 0.94rem; }
@media (min-width: 46rem) {
  .fact { grid-template-columns: 13rem minmax(0, 1fr); align-items: baseline; }
}

/* ---------- Leistungen ---------- */
.services {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.services > li { margin: 0; }
.service {
  background: var(--card);
  padding: clamp(1.4rem, 3vw, 2rem);
  height: 100%;
  display: flex; flex-direction: column;
}
.service-icon { width: 2.25rem; height: 2.25rem; color: var(--accent); margin-bottom: 1.1rem; }
.service h3 { margin-bottom: 0.5rem; }
.service p { color: var(--ink-soft); }
.service .deliverables-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin: auto 0 0.4rem; padding-top: 0.75rem; border-top: 1px dashed var(--rule);
}
.service ul { margin: 0; padding-left: 1.1em; font-size: 0.94rem; }
.service ul li::marker { color: var(--accent); }
@media (min-width: 40rem) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.service--note { background: var(--paper-2); justify-content: center; }
.service--note p { font-size: 0.95rem; margin: 0; }

/* ---------- Ablauf ---------- */
.steps {
  list-style: none; padding: 0; margin: 0;
  counter-reset: step;
  display: grid;
  gap: 0;
}
.step {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding-bottom: 2rem;
  margin: 0;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-feature-settings: "lnum", "tnum";
  width: 3.25rem; height: 3.25rem;
  display: grid; place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  position: relative; z-index: 1;
}
.section--tint .step::before { background: var(--paper-2); }
.step::after {
  content: "";
  position: absolute;
  left: calc(1.625rem - 0.5px); top: 3.25rem; bottom: 0;
  width: 1px; background: var(--rule);
}
.step:last-child::after { display: none; }
.step:last-child { padding-bottom: 0; }
.step-body { padding-top: 0.55rem; }
.step h3 { margin-bottom: 0.35rem; }
.step p { color: var(--ink-soft); margin-bottom: 0.5rem; max-width: 60ch; }
.step .step-out { font-size: 0.9rem; color: var(--muted); }
.step .step-out b { color: var(--ink-soft); font-weight: 600; }

@media (min-width: 64rem) {
  .steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
  .step { grid-template-columns: 1fr; padding-bottom: 0; }
  .step::after { left: 3.25rem; right: -1.5rem; top: 1.625rem; bottom: auto; width: auto; height: 1px; }
  .step-body { padding-top: 1.1rem; }
}

/* ---------- Projekttypen ---------- */
.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.notice svg { width: 1.25rem; height: 1.25rem; color: var(--accent); margin-top: 0.2rem; }
.notice p { margin: 0; }
.notice p + p { margin-top: 0.4rem; }

.projects { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.project {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-direction: column;
}
.project-label {
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  padding: 0.2rem 0.55rem; border-radius: 2px;
  margin-bottom: 1rem;
}
.project h3 { margin-bottom: 0.6rem; }
.project > p { color: var(--ink-soft); }
.project dl { margin: 0.5rem 0 0; display: grid; gap: 0.75rem; font-size: 0.94rem; }
.project dl div { display: grid; gap: 0.1rem; }
.project dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.project dd { margin: 0; }
@media (min-width: 30rem) {
  .project dl div { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; }
}

/* ---------- Kundengewinnung ---------- */
.split { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; } }

.pullquote {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.35;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--ink);
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 1.75rem; margin: 0 0 0.75rem; color: var(--ink-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 0.85rem; height: 0.45rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-0.2rem);
}
.checklist--neutral li::before {
  width: 0.7rem; height: 0; border-left: 0; border-bottom: 2px solid var(--muted); transform: none; top: 0.8em;
}

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; } }

.contact-card address { font-style: normal; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem);
  font-style: normal;
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.contact-list { margin: 0; display: grid; gap: 0.9rem; }
.contact-list div { display: grid; gap: 0.1rem; }
.contact-list dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; }
@media (min-width: 30rem) { .contact-list div { grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; align-items: baseline; } }

/* ---------- Rechtstexte ---------- */
.legal { padding-block: clamp(3rem, 8vw, 5.5rem) var(--space); }
.legal .wrap { max-width: 50rem; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem); margin-bottom: 0.3em; }
.legal h2 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); font-weight: 600; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.legal h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal address { font-style: normal; margin-bottom: 1em; color: var(--ink-soft); }
.legal .updated { color: var(--muted); font-size: 0.9rem; }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(4rem, 14vw, 9rem); }
.notfound .code { font-family: var(--serif); font-size: clamp(4rem, 3rem + 6vw, 7rem); line-height: 1; color: var(--accent); margin-bottom: 1rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--accent); padding-bottom: 0.1rem;
}

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer li + li { margin-top: 0; }
.site-footer a { color: var(--ink-soft); }
.site-footer a[aria-current="page"] { color: var(--ink); text-decoration-thickness: 2px; }

/* ---------- Scroll-Reveal (nur mit JS und ohne reduzierte Bewegung) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Druck (z. B. für Prüfunterlagen) ---------- */
@media print {
  :root {
    --ink: #000; --ink-soft: #222; --muted: #444; --paper: #fff; --paper-2: #fff; --card: #fff;
    --rule: #bbb; --accent: #7a3a14; --accent-soft: #fff;
  }
  .site-header, .skip-link, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .hero { padding-block: 1.5rem; border: 0; }
  .section--tint { background: none; }
  .hero::after { display: none; }
  .services, .facts, .project, .contact-card { break-inside: avoid; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  a { text-decoration: none; }
}
.lead--spaced { margin-top: 1.5rem; }
