/* ==========================================================================
   IB Quant — "Technical Precision"
   Consolidated stylesheet for the ib-quant.de marketing site.
   Tokens copied verbatim from the design system (tokens/*.css); component and
   layout rules translated 1:1 from the design-system JSX prototypes.
   ========================================================================== */

/* --- Webfonts (self-hosted, DSGVO-konform — keine externen CDN-Requests) ---
   Aus Google Fonts nach assets/fonts/ heruntergeladen. Textschriften nutzen
   font-display: swap; die Icon-Schrift (Material Symbols) ist auf die 14
   verwendeten Icons subsettet und nutzt display: block (Icons bleiben bis zum
   Laden unsichtbar, kein Ligatur-Text-Flash). */
/* Variable Fonts: EINE Datei deckt alle Schriftstärken ab (wght-Achse).
   Vorher lagen identische Dateien unter mehreren Namen (400/600/700/800)
   und wurden vom Browser mehrfach geladen. */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('../assets/fonts/material-symbols-outlined.woff2') format('woff2');
}

/* --- Tokens: colors ------------------------------------------------------- */
:root {
  /* Primary — Signal Red */
  --primary: #9a0006;
  --on-primary: #ffffff;
  --primary-container: #c41212;
  --on-primary-container: #ffd5cf;
  --inverse-primary: #ffb4aa;

  /* Secondary / tertiary neutrals */
  --secondary: #5f5e5e;
  --on-secondary: #ffffff;
  --secondary-container: #e2dfde;
  --on-secondary-container: #636262;
  --tertiary: #4a4a4a;

  /* Surfaces — blueprint neutrals */
  --background: #f9f9f9;
  --on-background: #1a1c1c;
  --surface: #f9f9f9;
  --surface-muted: #fafafa;
  --surface-variant: #e2e2e2;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --on-surface: #1a1c1c;
  --inverse-surface: #2f3131;
  --inverse-on-surface: #f1f1f1;

  /* Outlines */
  --outline: #916f6a;
  --outline-variant: #e6bdb7;
  --outline-structural: #e5e5e5; /* 1px "drawing line" borders on containers */

  /* Accents & semantic */
  --blueprint-blue: #004a99;
  --danger: #c41212;
  --error: #ba1a1a;

  /* --- Tokens: typography -------------------------------------------------- */
  --font-display: "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* --- Tokens: spacing (strict 4px baseline) ------------------------------- */
  --space-unit: 4px;
  --gutter: 24px;
  --margin-desktop: 64px;
  --margin-mobile: 20px;
  --section-gap: 120px;
  --margin: var(--margin-desktop);

  /* --- Tokens: shape & elevation ------------------------------------------ */
  --radius: 0px; /* strictly sharp — no rounding anywhere */
  --shadow-hard: 4px 4px 0px 0px rgba(26, 28, 28, 0.10);
  /* Motion-Tokens: eine gemeinsame Taktung für alle Zustandswechsel */
  --dur-press: 90ms;     /* Klick/Tap-Rückmeldung */
  --dur-fast: 150ms;     /* Farbe, Rahmen */
  --dur-base: 220ms;     /* Anheben, Unterstrich */
  --dur-slow: 480ms;     /* Bild-Zoom */
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);   /* sanftes Abbremsen beim Ankommen */
  --lift: translate(-2px, -2px);
  --shadow-lift: 4px 4px 0 0 rgba(26, 28, 28, .18);
  --shadow-lift-primary: 4px 4px 0 0 rgba(154, 0, 6, .28);
  --shadow-lift-on-dark: 4px 4px 0 0 rgba(255, 255, 255, .22);
  --shadow-hard-primary: 4px 4px 0px 0px rgba(154, 0, 6, 0.10);
}

/* --- Icon font base ------------------------------------------------------- */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

/* --- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* overflow-x: clip statt hidden — "hidden" macht body zum Scroll-Container
   und setzt damit position: sticky der Navigation außer Kraft. */
html, body { overflow-x: clip; max-width: 100%; }
/* Anker-Sprünge (#inhalt, #kontakt …) nicht unter der Sticky-Navigation verstecken */
html { scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--primary); }
a { transition: color var(--dur-fast) var(--ease-standard); }
a:not(.btn):hover { color: var(--primary-container); }
::selection { background: var(--primary); color: #fff; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* --- Blueprint grid texture ---------------------------------------------- */
.blueprint-grid {
  background-image: linear-gradient(#e5e5e5 1px, transparent 1px),
    linear-gradient(90deg, #e5e5e5 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --- Layout helpers ------------------------------------------------------- */
.section { padding: var(--section-gap) var(--margin); }
.wrap { max-width: 1100px; margin: 0 auto; }
.wrap-wide { max-width: 900px; margin: 0 auto; }

/* ==========================================================================
   Typography utilities (from the prototypes' inline text styles)
   ========================================================================== */
.display {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--on-surface);
}
.headline-md {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
}
.headline-sm {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.body-lg {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: var(--secondary);
}
.body-md {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--secondary);
}
.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface);
}
.mono-sm {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.text-primary { color: var(--primary); }

/* ==========================================================================
   Component: Chip  — [ LABEL ]
   ========================================================================== */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  white-space: nowrap;
  /* filled (default) */
  background: var(--primary);
  color: #fff;
  padding: 4px 16px;
}
.chip--label {
  background: transparent;
  color: var(--primary);
  padding: 0;
}
.chip--outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--outline-structural);
  padding: 3px 15px;
}
.chip--blue { color: var(--blueprint-blue); }
.chip--blue.chip:not(.chip--label):not(.chip--outline) { background: var(--blueprint-blue); color: #fff; }

/* ==========================================================================
   Component: Button — sharp corners, uppercase mono label
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  border: none;
  text-decoration: none;
  padding: 12px 24px; /* md */
  position: relative;
  transition:
    background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* primary */
  background: var(--primary);
  color: var(--on-primary);
}
.btn .material-symbols-outlined { font-size: 18px; }
.btn--sm { padding: 8px 16px; }
.btn--lg { padding: 16px 32px; }
/* Hover nur auf Geräten mit echter Maus (verhindert "klebende" Hover-Zustände am Handy) */
@media (hover: hover) {
  .btn:hover {
    background: var(--primary-container);
    color: var(--on-primary);
    transform: var(--lift);
    box-shadow: var(--shadow-lift-primary);
  }
}
/* Drücken: schnell, flach — Button "rastet ein" */
.btn:active {
  transform: translate(0, 0) scale(.98);
  box-shadow: none;
  transition-duration: var(--dur-press);
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

.btn--secondary {
  background: transparent;
  color: var(--on-surface);
  border: 2px solid var(--on-surface);
  opacity: 1;
}
@media (hover: hover) {
  .btn--secondary:hover { background: var(--on-surface); color: var(--background); border-color: var(--on-surface); box-shadow: var(--shadow-lift); }
}

.btn--ghost { background: transparent; color: var(--primary); opacity: 1; }
@media (hover: hover) {
  .btn--ghost:hover { background: transparent; color: var(--primary-container); box-shadow: none; transform: none; }
}

/* light button used on dark CTA (phone number) */
.btn--light { background: #fff; color: var(--on-surface); }
@media (hover: hover) {
  .btn--light:hover { background: #fff; color: var(--primary); }
}
/* Auf dunklem Hintergrund (CTA-Band): heller Schatten + heller Fokusring */
@media (hover: hover) {
  .cta .btn:hover { box-shadow: var(--shadow-lift-on-dark); }
}
.cta .btn:focus-visible { outline-color: #fff; }

.btn[disabled], .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* ==========================================================================
   Component: Card — white, 1px border, no resting shadow
   ========================================================================== */
.card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: 0;
  padding: 40px;
  transition:
    border-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.card__icon {
  font-size: 36px;
  color: var(--primary);
  display: block;
  margin-bottom: 24px;
}
.card__title {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  color: var(--on-surface);
  margin: 0 0 16px;
}
@media (hover: hover) {
  .card--hover-border:hover { border-color: var(--primary); }
  .card--hover-shadow:hover { transform: var(--lift); box-shadow: var(--shadow-lift); border-color: var(--on-surface); }
}
.card--muted { background: var(--surface-muted); }

/* ==========================================================================
   Component: Form fields (Input / Select / Textarea)
   ========================================================================== */
.field { display: block; }
.field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: 8px;
}
.field__control {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface);
  background: #fff;
  border-radius: 0;
  outline: none;
  border: 1px solid var(--outline-variant);
  transition: border-color .2s, box-shadow .2s;
}
.field__control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
textarea.field__control { resize: none; }
select.field__control { appearance: none; -webkit-appearance: none; background-image: none; }

/* ==========================================================================
   Component: ProgressBar
   ========================================================================== */
.progress__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.progress__head span {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface);
}
.progress__track {
  position: relative;
  height: 8px;
  background: var(--outline-variant);
}
.progress__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary);
  transition: width .5s;
}
.progress--blue .progress__fill { background: var(--blueprint-blue); }

/* ==========================================================================
   Component: ProjectOverlay (image placeholder)
   ========================================================================== */
.project-overlay {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--outline-variant);
  height: 320px;
}
.project-overlay__ph {
  width: 100%;
  height: 100%;
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--secondary);
}
.project-overlay__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
/* dezenter Zoom bei Mouse-over (Container hat overflow: hidden) */
@media (hover: hover) {
  .project-overlay:hover .project-overlay__img { transform: scale(1.04); }
}
.project-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
  pointer-events: none;
}
.project-overlay__meta {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 20px;
  color: #fff;
}
.project-overlay__meta .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.project-overlay__meta .sublabel {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* red metadata plate that overlaps an image corner */
.plate {
  position: absolute;
  bottom: -24px;
  left: -24px;
  background: var(--primary);
  color: #fff;
  padding: 24px;
}
.plate .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.plate .title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* ==========================================================================
   Site chrome: navigation
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-container-lowest);
  border-bottom: 1px solid var(--outline-variant);
  transition: box-shadow var(--dur-base) var(--ease-out);
}
/* Nach dem Scrollen: dezenter Schatten trennt die Navigation vom Inhalt */
.nav.is-scrolled { box-shadow: 0 1px 0 rgba(26, 28, 28, .04), 0 6px 16px -8px rgba(26, 28, 28, .18); }
.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 var(--margin);
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 40px; width: auto; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: 32px; }
.nav__link {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  color: var(--secondary);
  font-weight: 400;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--dur-fast) var(--ease-standard);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav__link:hover { color: var(--primary); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--primary); font-weight: 700; }
.nav__cta { display: inline-flex; }
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--on-surface);
  padding: 8px;
}
.nav__toggle .material-symbols-outlined { font-size: 28px; }

/* ==========================================================================
   Site chrome: footer
   ========================================================================== */
.footer {
  background: var(--surface-container-high);
  border-top: 1px solid var(--outline-variant);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  padding: 80px var(--margin);
}
.footer__logo { height: 56px; width: auto; margin-bottom: 24px; }
.footer__addr {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-secondary-container);
  margin: 0;
}
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer__h {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 16px;
}
.footer__link {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-secondary-container);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: color var(--dur-fast) var(--ease-standard);
}
.footer__link:hover { color: var(--primary); }
.footer__bar {
  border-top: 1px solid var(--outline-variant);
  padding: 32px var(--margin);
}
.footer__bar p {
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  color: var(--on-secondary-container);
  margin: 0;
}
.footer__bar strong { font-weight: 700; color: var(--primary); }

/* ==========================================================================
   Section building blocks used across pages
   ========================================================================== */
.eyebrow-plate {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.list-mono { display: flex; flex-direction: column; gap: 8px; }
.list-mono li {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.list-mono .bullet {
  width: 6px;
  height: 6px;
  background: var(--primary);
  flex-shrink: 0;
}

.tile {
  background: #fff;
  padding: 16px;
  border: 1px solid var(--outline-variant);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.tile .material-symbols-outlined { color: var(--primary); }
.tile span:last-child {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface);
}

.check-item { display: flex; align-items: flex-start; gap: 16px; }
.check-item .material-symbols-outlined { color: var(--primary); }
.check-item p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  margin: 0;
}

/* --- Long-form service lists (Leistungen detail) -------------------------- */
.svc-panel {
  background: var(--surface-muted);
  border: 1px solid var(--outline-structural);
  padding: 32px;
}
.svc-panel__icon { font-size: 40px; color: var(--primary); display: block; margin-bottom: 16px; }
.svc-list { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.svc-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface);
}
.svc-list .bullet {
  width: 7px;
  height: 7px;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 9px;
}

/* --- Legal / prose pages -------------------------------------------------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal h2 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  margin: 48px 0 16px;
}
.legal h2:first-of-type { margin-top: 0; }
.legal h3 {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
  margin: 32px 0 8px;
}
.legal p, .legal li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  color: var(--on-surface);
}
.legal p { margin: 0 0 16px; }
.legal ul { list-style: none; padding: 0; margin: 0 0 16px; }
.legal ul li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.legal ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--primary);
}
.legal a { color: var(--primary); }
.legal strong { font-weight: 600; }
.legal .lead {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: var(--secondary);
  margin-bottom: 32px;
}
.legal .updated {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--outline-variant);
}
/* Placeholder marker for fields the firm must supply/confirm before launch */
.legal .todo {
  background: #fff4f3;
  border: 1px solid var(--outline-variant);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* --- Hero (Home) ---------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  background: var(--surface-container-low);
  overflow: hidden;
}
/* Hero mit Foto-Hintergrund: heller Verlauf von links sichert die Lesbarkeit
   des Textes, rechts bleibt das Gebäude frei. */
.hero--photo {
  background-image:
    linear-gradient(90deg,
      rgba(249, 249, 249, 0.96) 0%,
      rgba(249, 249, 249, 0.88) 40%,
      rgba(249, 249, 249, 0.45) 70%,
      rgba(249, 249, 249, 0.10) 100%),
    url("../assets/hero_tower_2-2560.jpg");
  background-image:
    linear-gradient(90deg,
      rgba(249, 249, 249, 0.96) 0%,
      rgba(249, 249, 249, 0.88) 40%,
      rgba(249, 249, 249, 0.45) 70%,
      rgba(249, 249, 249, 0.10) 100%),
    image-set(
      url("../assets/hero_tower_2-2560.webp") type("image/webp"),
      url("../assets/hero_tower_2-2560.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}
/* Kleinere Bildvarianten: Laptop (≤1440px) und Handy (≤720px, Hochformat-Ausschnitt) */
@media (max-width: 1440px) {
  .hero--photo {
    background-image:
      linear-gradient(90deg,
      rgba(249, 249, 249, 0.96) 0%,
      rgba(249, 249, 249, 0.88) 40%,
      rgba(249, 249, 249, 0.45) 70%,
      rgba(249, 249, 249, 0.10) 100%),
      image-set(
        url("../assets/hero_tower_2-1440.webp") type("image/webp"),
        url("../assets/hero_tower_2-1440.jpg") type("image/jpeg"));
  }
}
@media (max-width: 720px) {
  .hero--photo {
    background-image:
      linear-gradient(180deg,
        rgba(249, 249, 249, 0.94) 0%,
        rgba(249, 249, 249, 0.86) 55%,
        rgba(249, 249, 249, 0.50) 100%),
      image-set(
        url("../assets/hero_tower_2-mobile.webp") type("image/webp"),
        url("../assets/hero_tower_2-mobile.jpg") type("image/jpeg"));
    background-position: center bottom;
  }
}
.hero__body {
  position: relative;
  z-index: 1;
  padding: 80px var(--margin);
  max-width: 900px;
}
.hero__capsule {
  position: absolute;
  right: 48px;
  bottom: 48px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  border: 1px solid var(--outline-variant);
  padding: 24px;
  max-width: 280px;
}
.hero__capsule .rule { height: 1px; background: var(--primary); margin-bottom: 16px; }
.hero__capsule .quote {
  font-family: var(--font-body);
  font-size: 14px;
  font-style: normal;
  color: var(--on-surface);
  margin: 0;
}

/* --- Dark CTA band -------------------------------------------------------- */
.cta {
  position: relative;
  background: var(--inverse-surface);
  padding: 96px var(--margin);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--primary);
}
.cta__inner { max-width: 900px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.cta__ghost-icon {
  position: absolute;
  right: -80px;
  bottom: -100px;
  font-size: 400px;
  color: rgba(255,255,255,0.05);
  pointer-events: none;
}

/* --- Generic helpers ------------------------------------------------------ */
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-24 { display: flex; flex-direction: column; gap: 24px; }
.stack-32 { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; align-items: center; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }
.rel { position: relative; }

/* Kachel-Raster in der Kompetenz-Sektion (mobil einspaltig, s. Media Query) */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-width: 0;
}

/* X-Symbol des Menü-Buttons bei geöffnetem Menü (ersetzt die Icon-Ligatur) */
.nav__toggle-x {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

/* ==========================================================================
   Responsive — mobile margins 20px, display 36/44, single-column stacks
   ========================================================================== */
@media (max-width: 960px) {
  :root { --margin: var(--margin-mobile); --section-gap: 72px; }

  .display { font-size: 36px; line-height: 44px; letter-spacing: -0.01em; }

  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }

  /* mobile menu panel */
  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--surface-container-lowest);
    border-bottom: 1px solid var(--outline-variant);
    padding: 8px var(--margin) 16px;
  }
  .nav.is-open .nav__link { padding: 12px 0; border-bottom: none; }
  .nav.is-open .nav__link::after { display: none; }
  .nav.is-open .nav__cta {
    display: inline-flex;
    margin: 0 8px 0 auto;
    padding: 10px 14px;
    white-space: nowrap;
  }

  .grid-3, .grid-2 { grid-template-columns: 1fr; }

  /* stacked two-column sections */
  .split { grid-template-columns: 1fr !important; gap: 48px !important; }
  .split > * { min-width: 0; }
  .tile-grid { grid-template-columns: 1fr; }
  .split .plate { position: static; margin-top: -24px; margin-left: 0; display: inline-block; }

  .hero { display: block; }
  .hero__capsule { position: static; margin: 0 var(--margin) 40px; max-width: none; }
  .hero__body { max-width: none; padding-bottom: 40px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .cta__inner .btn { width: 100%; }
  .cta__buttons { flex-direction: column; }

  .bento { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: 1fr !important; gap: 48px !important; }
  .field-row { grid-template-columns: 1fr !important; }
  .cta__ghost-icon { font-size: 240px; }
}

/* ==========================================================================
   Component: Cookie-Banner (Einwilligung) — injiziert von js/main.js
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: var(--margin);
  right: var(--margin);
  bottom: 24px;
  z-index: 1000;
  max-width: 960px;
  margin: 0 auto;
  background: var(--surface-container-lowest);
  border: 1px solid var(--on-surface);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-hard);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  font-family: var(--font-body);
  color: var(--on-surface);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 8px;
}
.cookie-banner__text { font-size: 14px; line-height: 22px; margin: 0; color: var(--secondary); }
.cookie-banner__text a { color: var(--primary); }
.cookie-banner__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-banner__actions .btn { white-space: nowrap; }
.cookie-banner .btn:focus-visible { outline: 2px solid var(--blueprint-blue); outline-offset: 2px; }
@media (max-width: 720px) {
  .cookie-banner { grid-template-columns: 1fr; bottom: 12px; padding: 20px; gap: 16px; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .btn { flex: 1 1 100%; }
}
@media print { .cookie-banner { display: none !important; } }


/* --- Barrierefreiheit: sichtbarer Tastatur-Fokus & Skip-Link --------------- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 1000;
  background: var(--primary); color: #fff; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* --- Formular: Datenschutz-Hinweis ----------------------------------------- */
.form-note { font-size: 14px; line-height: 20px; color: var(--secondary); margin: 0; }
.form-note a { color: var(--primary); }

/* --- Ansprechpartner (Über uns) -------------------------------------------- */
.person { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.person picture { display: block; line-height: 0; }
.person__photo {
  display: block;
  width: 100%;
  height: auto;            /* verhindert Verzerrung durch das height-Attribut */
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
  border: 1px solid var(--outline-variant);
}
@media (max-width: 720px) {
  .person { grid-template-columns: 1fr; gap: 24px; }
  .person picture { max-width: 240px; width: 100%; justify-self: center; }
  .person-card { text-align: center; }   /* Titel, Name, Text und Kontakt mittig */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:hover, .btn:active, .card--hover-shadow:hover, .project-overlay:hover .project-overlay__img { transform: none !important; }
}

/* --- Footer mobil: Adressblock oben, Linkspalten darunter ------------------- */
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr !important; gap: 40px; }
}

/* hidden-Attribut immer respektieren (Inline-display darf es nicht aushebeln) */
[hidden] { display: none !important; }

/* --- Kontaktformular: Senden-Zeile mit Erfolgsmeldung rechts ---------------- */
.form-submit { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.form-sent {
  display: inline-flex; align-items: center; gap: 8px; margin: 0;
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--on-surface);
}
.form-sent .material-symbols-outlined { font-size: 28px; color: var(--primary); }
