/* ==========================================================================
   klarchitektur ZT GmbH — Stylesheet
   Keine externen Ressourcen. Nur Systemschriften.
   ========================================================================== */

/* --- Design Tokens ------------------------------------------------------ */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f4f2ef;
  --fg:        #14130f;
  --fg-muted:  #56534c;
  --line:      #d8d3cb;
  --accent:    #7a6a52;
  --accent-fg: #ffffff;
  --shadow:    0 1px 2px rgba(20, 19, 15, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --wrap: 74rem;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --section: clamp(4rem, 10vw, 8rem);

  --logo-filter: none;
  color-scheme: light;
}

/* Dunkle Tokens — einmal für Systemeinstellung, einmal für manuelle Wahl. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #121110;
    --bg-alt:    #1b1a18;
    --fg:        #ece9e4;
    --fg-muted:  #a8a29a;
    --line:      #33302c;
    --accent:    #c9b48f;
    --accent-fg: #121110;
    --shadow:    0 1px 2px rgba(0, 0, 0, .5);
    --logo-filter: invert(1);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:        #121110;
  --bg-alt:    #1b1a18;
  --fg:        #ece9e4;
  --fg-muted:  #a8a29a;
  --line:      #33302c;
  --accent:    #c9b48f;
  --accent-fg: #121110;
  --shadow:    0 1px 2px rgba(0, 0, 0, .5);
  --logo-filter: invert(1);
  color-scheme: dark;
}

/* --- Reset / Basis ------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 {
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.015em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 500; letter-spacing: 0; }
h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

address { font-style: normal; }
dd { margin-inline-start: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
       font-size: .92em; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  text-decoration-color: var(--line);
  transition: text-decoration-color .18s ease, color .18s ease;
}
a:hover { text-decoration-color: currentColor; }

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

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--section) 0;
}

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

/* --- Hilfsklassen ------------------------------------------------------- */

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

.wrap-narrow { max-width: 46rem; }

.section { padding-block: var(--section); }
.section--alt { background: var(--bg-alt); }

.kicker {
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 1.4em;
  font-weight: 500;
}

.lead {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.55;
  font-weight: 300;
  color: var(--fg);
}

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

.measure { max-width: 52ch; }
.mt-l { margin-top: clamp(2rem, 5vw, 3rem); }
.mb-l { margin-bottom: clamp(2.5rem, 6vw, 4rem); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: .75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

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

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

.btn {
  display: inline-block;
  padding: .8rem 1.7rem;
  border: 1px solid var(--fg);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--fg); color: var(--bg); }

.btn--ghost { border-color: var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--fg); color: var(--fg); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.2rem;
}

/* --- Kopfzeile ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--bg); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.5rem;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
  flex-shrink: 0;
}
.brand img {
  height: 2.5rem;
  width: auto;
  filter: var(--logo-filter);
}
@media (max-width: 30rem) {
  .brand img { height: 2.1rem; }
}

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2.1rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .02em;
  color: var(--fg-muted);
  padding-block: .4rem;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

.header-tools {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--fg-muted);
}
.lang-switch a { text-decoration: none; padding: .2rem; }
.lang-switch a:hover { color: var(--fg); }
.lang-switch [aria-current="true"] { color: var(--fg); font-weight: 600; }
.lang-switch__sep { opacity: .5; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  border-radius: 50%;
  transition: border-color .18s ease, background .18s ease;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; fill: none;
                    stroke: currentColor; stroke-width: 1.5;
                    stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  border-radius: 50%;
}
.nav-toggle svg { width: 1.1rem; height: 1.1rem; margin-inline: auto;
                  stroke: currentColor; stroke-width: 1.5; fill: none;
                  stroke-linecap: round; }

/* Ohne JavaScript sind die Schalter wirkungslos und bleiben ausgeblendet. */
.theme-toggle[hidden], .nav-toggle[hidden] { display: none; }

@media (max-width: 56rem) {
  .nav-toggle { display: inline-grid; place-items: center; }

  .nav {
    position: fixed;
    inset: 4.5rem 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav[data-open="true"] { display: block; }
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
  }
  .nav li + li { border-top: 1px solid var(--line); }
  .nav a { display: block; padding: .95rem 0; font-size: 1.05rem; border-bottom: 0; }
  .nav a[aria-current="page"] { border-bottom: 0; color: var(--accent); }
}

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

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(4.5rem, 13vw, 9.5rem) var(--gutter);
}

.hero__claim {
  max-width: 22ch;
  font-size: clamp(2.1rem, 6.2vw, 4.25rem);
  font-weight: 200;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0;
}
.hero__claim em { font-style: normal; color: var(--accent); }

.hero__sub {
  max-width: 44ch;
  margin-top: 1.8rem;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 300;
  color: var(--fg-muted);
}

/* Platzhalter-Grafik bis das Titelbild vorliegt. */
.hero__art {
  position: absolute;
  right: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46%, 34rem);
  color: var(--fg);
  opacity: .13;
  pointer-events: none;
}
.hero__art svg { width: 100%; height: auto; display: block; }

@media (max-width: 48rem) {
  .hero__art { right: -22%; width: 78%; opacity: .09; }
}

.page-head {
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.page-head p.lead { max-width: 52ch; margin-top: .5rem; }

/* Ohne Fliesstext trennt die Linie nichts, sie stünde nur knapp über der
   ersten Trennlinie des Inhalts. */
.page-head:not(:has(.lead)) {
  border-bottom: 0;
  padding-bottom: 0;
}

/* --- Raster ------------------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
}
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 52rem) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}

/* --- Prinzipien / Karten ------------------------------------------------ */

.principle { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.principle h3 { margin-bottom: .5rem; }
.principle p { color: var(--fg-muted); font-size: .98rem; margin: 0; }

.service {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.service__no {
  display: block;
  font-size: .75rem;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: .9rem;
  font-weight: 600;
}
.service p { color: var(--fg-muted); margin: 0; }

.service-block { border-top: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3.25rem); }
.service-block:last-child { border-bottom: 1px solid var(--line); }
.service-block__grid {
  display: grid;
  gap: clamp(1rem, 3vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) {
  .service-block__grid { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); }
}
.service-block h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.service-block__body { max-width: 58ch; color: var(--fg-muted); }

/* --- Projekte ----------------------------------------------------------- */

/* Dreispaltige Galerie mit einheitlich hochformatigen Bildern, laufender
   Nummer seitlich am Bild und linksbündiger Unterschrift. */
.projects {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: clamp(1.5rem, 4vw, 3rem);
  row-gap: clamp(3rem, 7vw, 5.5rem);
}
@media (min-width: 40rem) { .projects { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .projects { grid-template-columns: repeat(3, 1fr); } }

.project { margin: 0; }

.project__frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: start;
}

.project img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--bg-alt);
}

.project__no {
  writing-mode: vertical-rl;
  border-left: 1px solid var(--line);
  padding-left: .4rem;
  font-size: .7rem;
  letter-spacing: .12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  align-self: stretch;
}

.project figcaption { margin-top: 1.15rem; }
.project figcaption b {
  display: block;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .01em;
  margin-bottom: .4rem;
}
.project figcaption span {
  display: block;
  color: var(--fg-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.note {
  border-left: 2px solid var(--accent);
  padding: .3rem 0 .3rem 1.25rem;
  color: var(--fg-muted);
  font-size: .98rem;
  max-width: 52ch;
}

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

.prose h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.prose h2:first-child { margin-top: 0; }
.prose p { max-width: 62ch; color: var(--fg-muted); }
.prose p.lead { color: var(--fg); }

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

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.6rem;
}
.contact-list dt, .contact-list__label {
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: .3rem;
}
.contact-list a { font-size: 1.15rem; }

.cta-band {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.cta-band .wrap { padding-block: clamp(3rem, 7vw, 5rem); }
.cta-band h2 { max-width: 20ch; }

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

.legal { max-width: 48rem; }
.legal h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: 0;
            margin-top: 2.75rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--fg-muted); }
.legal address { font-style: normal; color: var(--fg-muted); }
.legal dl { display: grid; grid-template-columns: max-content 1fr;
            gap: .35rem 1.5rem; margin: 0 0 1.5rem; }
.legal dt { color: var(--fg-muted); }
.legal dd { margin: 0; }
.legal ul { padding-left: 1.1rem; }
.legal .todo {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  padding: .05em .4em;
  border-radius: 2px;
  color: var(--fg);
}

@media (max-width: 34rem) {
  .legal dl { grid-template-columns: 1fr; gap: 0 0; }
  .legal dd { margin-bottom: .75rem; }
}

/* --- Fußzeile ----------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  font-size: .92rem;
  color: var(--fg-muted);
}
.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.site-footer h2 {
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--fg);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.site-footer address { font-style: normal; }
.site-footer__bottom {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  font-size: .85rem;
}

/* --- Bewegung reduzieren ------------------------------------------------ */

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

/* --- Druck -------------------------------------------------------------- */

@media print {
  .site-header, .cta-band, .hero__art, .btn-row { display: none; }
  body { color: #000; background: #fff; }
}
