/* =====================================================
   INGENIEURBERATUNG — Standalone design system
   Namespaced under .za-ing + body.page-ingenieurberatung
   ===================================================== */

:root {
  --color-ink: #1A1A1C;
  --color-graphite: #2C2C2C;
  --color-stone: #8A8A86;
  --color-mist: #F5F5F5;
  --color-paper: #FFFFFF;
  --color-text-soft: #4A4A4A;
  --color-text-mute: #888888;
  --color-line: rgba(26, 26, 28, 0.08);
  --color-line-strong: rgba(26, 26, 28, 0.18);
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max-w: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset / typography — scoped to .za-ing so parent theme header/footer
   keep their own typography, colours and box-sizing untouched.
   Selectors are body-prefixed (or use html/body) where the parent global
   stylesheet sets a competing rule, so this design system wins the cascade
   regardless of source order. */

/* Page-level background lock — prevents the parent body's --warm-white
   from leaking through transparent gaps inside .za-ing. */
body.page-template-page-ingenieurberatung-php,
body.page-template-page-home-2-php,
body.page-template-page-immobilienberatung-2-php {
  background: var(--color-paper);
}

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

html body .za-ing {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.za-ing img { display: block; max-width: 100%; }
.za-ing a { color: inherit; text-decoration: none; }
.za-ing button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.za-ing ul { list-style: none; margin: 0; padding: 0; }
.za-ing ::selection { background: var(--color-ink); color: var(--color-paper); }

html body .za-ing h1,
html body .za-ing h2,
html body .za-ing h3,
html body .za-ing h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--color-ink);
  margin: 0;
}
html body .za-ing h1 { font-size: clamp(2.75rem, 6.5vw, 5.25rem); font-variation-settings: "opsz" 144, "wght" 400; }
html body .za-ing h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); font-variation-settings: "opsz" 96, "wght" 400; line-height: 1.08; }
html body .za-ing h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-variation-settings: "opsz" 36, "wght" 500; letter-spacing: -0.015em; }
html body .za-ing h4 { font-size: 1.0625rem; font-variation-settings: "opsz" 14, "wght" 500; letter-spacing: -0.005em; }
html body .za-ing p { color: var(--color-text-soft); margin: 0; font-family: var(--font-body); line-height: 1.6; }

.za-ing .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}
.za-ing .eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--color-stone);
}
.za-ing .lead {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 36, "wght" 300;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--color-graphite);
  letter-spacing: -0.005em;
}
.za-ing .container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.za-ing section { padding: var(--section-y) 0; position: relative; }
.za-ing .bg-mist { background: var(--color-mist); }
.za-ing .bg-ink  { background: var(--color-ink); color: var(--color-paper); }
.za-ing .bg-ink h2,
.za-ing .bg-ink h3,
.za-ing .bg-ink h4 { color: var(--color-paper); }
.za-ing .bg-ink p { color: rgba(255, 255, 255, 0.72); }

/* Hero */
.za-ing .hero {
  min-height: 92vh;
  padding-top: calc(var(--section-y) + 4rem);
  padding-bottom: var(--section-y);
  background: var(--color-ink);
  color: var(--color-paper);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.za-ing .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 100%);
  pointer-events: none;
}
.za-ing .hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  pointer-events: none;
}
.za-ing .hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
.za-ing .hero-content { max-width: 60ch; }
.za-ing .hero .eyebrow { color: rgba(255,255,255,0.55); }
.za-ing .hero .eyebrow::before { background: rgba(255,255,255,0.4); }
.za-ing .hero h1 {
  color: var(--color-paper);
  margin: 1.75rem 0 2rem;
  font-variation-settings: "opsz" 144, "wght" 300;
}
.za-ing .hero h1 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 300;
  color: var(--color-stone);
}
.za-ing .hero p {
  color: rgba(255,255,255,0.72);
  font-size: 1.0625rem;
  max-width: 56ch;
  line-height: 1.7;
}
.za-ing .hero-meta {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  max-width: 960px;
}
.za-ing .hero-meta dt { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 6px; }
.za-ing .hero-meta dd { font-family: var(--font-display); font-size: 1.0625rem; font-variation-settings: "opsz" 24, "wght" 400; color: var(--color-paper); margin: 0; }
.za-ing .hero-corner {
  position: absolute;
  width: 40px; height: 40px;
  border-color: rgba(255,255,255,0.25);
  z-index: 2;
}
.za-ing .hero-corner.tl { top: 96px; left: var(--gutter); border-top: 1px solid; border-left: 1px solid; }
.za-ing .hero-corner.br { bottom: 32px; right: var(--gutter); border-bottom: 1px solid; border-right: 1px solid; }

/* Section header */
.za-ing .section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 880px;
}
@media (min-width: 880px) {
  .za-ing .section-head.split {
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
    max-width: none;
  }
}
.za-ing .section-head h2 em { font-style: italic; color: var(--color-stone); font-variation-settings: "opsz" 96, "wght" 400; }
.za-ing .section-head .lead { max-width: 60ch; }

/* Scope */
.za-ing .scope-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}
@media (min-width: 768px) {
  .za-ing .scope-grid { grid-template-columns: 1fr 1fr; gap: 0; }
}
.za-ing .scope-card {
  padding: 2.5rem;
  border: 1px solid var(--color-line-strong);
  background: var(--color-paper);
  position: relative;
}
@media (min-width: 768px) {
  .za-ing .scope-card + .scope-card { border-left: none; }
}
.za-ing .scope-card .tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: var(--color-mist);
  color: var(--color-stone);
  display: inline-block;
  margin-bottom: 1.5rem;
}
.za-ing .scope-card.accent .tag { background: var(--color-ink); color: var(--color-paper); }
.za-ing .scope-card h3 { margin-bottom: 1rem; }
.za-ing .scope-card p { font-size: 0.9375rem; }

/* Service grid */
.za-ing .service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--color-line-strong);
}
@media (min-width: 768px) {
  .za-ing .service-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
  }
  .za-ing .service-grid.cols-2 .service-item { align-self: stretch; }
}
.za-ing .service-item {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--color-line-strong);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
  transition: background 0.3s var(--ease);
}
@media (min-width: 768px) {
  .za-ing .service-grid.cols-2 .service-item:nth-child(odd) { padding-right: 2.5rem; border-right: 1px solid var(--color-line-strong); }
  .za-ing .service-grid.cols-2 .service-item:nth-child(even) { padding-left: 2.5rem; }
}
.za-ing .service-num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "wght" 300;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1;
  color: var(--color-stone);
  letter-spacing: -0.02em;
  padding-top: 0;
  min-width: 3.5rem;
}
.za-ing .service-body h3 { margin-bottom: 0.625rem; }
.za-ing .service-body p { font-size: 0.9375rem; line-height: 1.65; }

.za-ing section.bg-ink .service-grid { border-top-color: rgba(255,255,255,0.12); }
.za-ing section.bg-ink .service-item { border-bottom-color: rgba(255,255,255,0.12); }
.za-ing section.bg-ink .service-grid.cols-2 .service-item:nth-child(odd) { border-right-color: rgba(255,255,255,0.12); }

/* Credentials */
.za-ing .creds-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-line-strong);
  border: 1px solid var(--color-line-strong);
  margin-top: 3rem;
}
@media (min-width: 700px) { .za-ing .creds-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .za-ing .creds-grid { grid-template-columns: repeat(4, 1fr); } }
.za-ing .cred-card {
  background: var(--color-paper);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.3s var(--ease);
  position: relative;
}
.za-ing .cred-card:hover { background: var(--color-mist); }
.za-ing .cred-icon {
  width: 36px; height: 36px;
  color: var(--color-stone);
}
.za-ing .cred-card h3 {
  font-size: 1.125rem;
  font-variation-settings: "opsz" 24, "wght" 500;
}
.za-ing .cred-card p {
  font-size: 0.875rem;
  line-height: 1.6;
}
.za-ing .cred-card .cred-no {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-stone);
  letter-spacing: 0.1em;
}

/* Process */
.za-ing .process-flow {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 768px) { .za-ing .process-flow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .za-ing .process-flow { grid-template-columns: repeat(4, 1fr); } }
.za-ing .phase {
  background: var(--color-ink);
  padding: 2.5rem 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: background 0.4s var(--ease);
}
.za-ing .phase:hover { background: var(--color-graphite); }
.za-ing .phase-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--color-stone);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.za-ing .phase-num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.16);
}
.za-ing .phase h3 {
  color: var(--color-paper);
  font-variation-settings: "opsz" 36, "wght" 400;
  font-size: 1.375rem;
}
.za-ing .phase-desc { color: rgba(255,255,255,0.72); font-size: 0.9375rem; line-height: 1.65; }
.za-ing .phase-deliv {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.za-ing .phase-deliv-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: 0.5rem;
}
.za-ing .phase-deliv-text { color: rgba(255,255,255,0.85); font-size: 0.875rem; line-height: 1.55; }

/* Stats */
.za-ing .stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid var(--color-line-strong);
  border-bottom: 1px solid var(--color-line-strong);
}
@media (min-width: 768px) { .za-ing .stats { grid-template-columns: repeat(3, 1fr); } }
.za-ing .stat {
  padding: 2.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  border-bottom: 1px solid var(--color-line-strong);
}
.za-ing .stat:last-child { border-bottom: none; }
@media (min-width: 768px) {
  .za-ing .stat { border-bottom: none; border-right: 1px solid var(--color-line-strong); }
  .za-ing .stat:last-child { border-right: none; }
}
.za-ing .stat-num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "wght" 300;
  font-size: clamp(3rem, 6vw, 4.75rem);
  line-height: 1;
  color: var(--color-ink);
  letter-spacing: -0.04em;
}
.za-ing .stat-num em { font-style: italic; color: var(--color-stone); font-size: 0.55em; vertical-align: top; margin-left: 4px; font-variation-settings: "opsz" 36, "wght" 400; }
.za-ing .stat-label { font-size: 0.875rem; color: var(--color-text-soft); max-width: 30ch; line-height: 1.5; }
.za-ing .stat-tag { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-stone); }

/* CTA */
.za-ing .cta-section {
  background: var(--color-ink);
  color: var(--color-paper);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.za-ing .cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(138,138,134,0.15), transparent 50%);
  pointer-events: none;
}
.za-ing .cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: end;
}
@media (min-width: 880px) {
  .za-ing .cta-inner { grid-template-columns: 1.5fr 1fr; gap: 5rem; }
}
.za-ing .cta-section h2 {
  color: var(--color-paper);
  margin: 1.5rem 0 1.5rem;
  max-width: 18ch;
}
.za-ing .cta-section h2 em { font-style: italic; color: var(--color-stone); }
.za-ing .cta-section .lead { color: rgba(255,255,255,0.78); }
.za-ing .cta-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.za-ing .cta-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-variation-settings: "opsz" 36, "wght" 400;
  color: var(--color-paper);
  transition: color 0.2s var(--ease), padding 0.3s var(--ease);
  white-space: nowrap;
}
.za-ing .cta-link:hover { color: var(--color-stone); padding-left: 0.75rem; }
.za-ing .cta-link svg { margin-left: auto; transition: transform 0.3s var(--ease); }
.za-ing .cta-link:hover svg { transform: translateX(6px); }
.za-ing .cta-link-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-right: 1.25rem;
  min-width: 70px;
}
.za-ing .cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--color-paper);
  color: var(--color-ink);
  padding: 1.125rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  margin-top: 0.5rem;
  align-self: flex-start;
}
.za-ing .cta-button:hover { background: var(--color-stone); color: var(--color-paper); }
.za-ing .cta-button svg { transition: transform 0.3s var(--ease); }
.za-ing .cta-button:hover svg { transform: translateX(4px); }
.za-ing .cta-note {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  max-width: 60ch;
  font-style: italic;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 24, "wght" 300;
  line-height: 1.6;
}

/* Reveal */
.za-ing .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.za-ing .reveal.in { opacity: 1; transform: translateY(0); }
.za-ing .reveal-delay-1 { transition-delay: 0.08s; }
.za-ing .reveal-delay-2 { transition-delay: 0.16s; }
.za-ing .reveal-delay-3 { transition-delay: 0.24s; }
.za-ing .reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .za-ing .reveal { opacity: 1; transform: none; }
  .za-ing * { animation: none !important; transition: none !important; }
}

/* Utilities */
.za-ing .divider {
  height: 1px;
  background: var(--color-line-strong);
  width: 100%;
  margin: 0;
}
.za-ing .meta-line {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: 1.5rem;
}
.za-ing .meta-line span:not(:last-child)::after {
  content: "/";
  margin-left: 0.875rem;
  color: var(--color-line-strong);
}

/* =====================================================
   FOOTER — DESIGN SYSTEM VARIANT
   White-bg 3-column footer used by .za-ing page templates
   (loaded via get_footer('design') -> footer-design.php).
   ===================================================== */

/* Brand mark (also reused inside footer) */
.za-ing .brand { display: flex; flex-direction: column; line-height: 1; }
.za-ing .brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-variation-settings: "opsz" 36, "wght" 400;
  letter-spacing: -0.015em;
}
.za-ing .brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  color: var(--color-stone);
  margin-top: 4px;
}

.site-footer-design {
  background: var(--color-paper);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--color-line-strong);
}
.site-footer-design .za-ing { background: transparent; }

.za-ing .footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 720px) {
  .za-ing .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 4rem; }
}

.za-ing .footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.za-ing .footer-col p,
.za-ing .footer-col a {
  font-size: 0.875rem;
  color: var(--color-text-soft);
  line-height: 1.7;
}
.za-ing .footer-col a {
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s var(--ease);
}
.za-ing .footer-col a:hover { color: var(--color-ink); }

.za-ing .footer-brand .brand-name { font-size: 1.5rem; }
.za-ing .footer-brand__logo {
  display: inline-block;
  line-height: 1;
}
.za-ing .footer-brand__logo img {
  display: block;
  height: 48px;
  width: auto;
  max-width: 220px;
}
.za-ing .footer-legal {
  margin-top: 1rem;
  font-size: 0.75rem !important;
  color: var(--color-stone) !important;
  line-height: 1.55 !important;
}

.za-ing .footer-bottom {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-stone);
  letter-spacing: 0.06em;
}

/* =====================================================
   HERO — optional background image
   When ACF "hero_bg_image" is set, the template adds
   .hero--has-image and renders <img class="hero__bg-image">
   plus a darkening overlay. Without an image, the hero
   keeps its dark + grid pattern (default).
   ===================================================== */
.za-ing .hero__bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(100%);
  transition: filter 0.7s var(--ease), transform 0.9s var(--ease);
}
.za-ing .hero--has-image:hover .hero__bg-image {
  filter: grayscale(0%);
  transform: scale(1.02);
}
.za-ing .hero__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,26,28,0.55) 0%, rgba(26,26,28,0.78) 100%);
  z-index: 1;
  transition: opacity 0.7s var(--ease);
}
.za-ing .hero--has-image:hover .hero__bg-overlay {
  opacity: 0.7;
}
.za-ing .hero--has-image::before {
  /* keep the technical grid subtly visible over the photo */
  z-index: 1;
  opacity: 0.45;
}
.za-ing .hero--has-image::after {
  /* ::after originally darkens the bottom — make full-height when there's an image */
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.45) 100%);
  z-index: 1;
}
.za-ing .hero--has-image .hero-inner { z-index: 2; }
.za-ing .hero--has-image .hero-corner { z-index: 2; }

/* =====================================================
   FEEDBACK ROUND 1 — additions / refinements
   ===================================================== */

/* ---- Mobile: centre hero text + hero meta ---- */
@media (max-width: 768px) {
  .za-ing .hero-content {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
  .za-ing .hero .eyebrow { justify-content: center; }
  .za-ing .hero h1 br { display: none; } /* let lines wrap naturally on small screens */
  .za-ing .hero h1 {
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .za-ing .hero p {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .za-ing .hero-meta {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .za-ing .hero-meta dt,
  .za-ing .hero-meta dd { text-align: center; }
  .za-ing .hero-corner.tl,
  .za-ing .hero-corner.br { display: none; }

  /* Section heads on mobile: centred */
  .za-ing .section-head { text-align: center; }
  .za-ing .section-head .eyebrow { justify-content: center; }
  .za-ing .section-head h2 { text-align: center; }
  .za-ing .section-head h2[style*="text-align:left"] { text-align: center !important; }
  .za-ing .section-head .lead { margin-left: auto; margin-right: auto; }
  .za-ing .meta-line { justify-content: center; }
  .za-ing .stats-section .section-head h2 { text-align: center; }

  /* CTA section on mobile — centre everything */
  .za-ing .cta-section { text-align: center; }
  .za-ing .cta-section .eyebrow { justify-content: center; }
  .za-ing .cta-section h2,
  .za-ing .cta-section .lead,
  .za-ing .cta-note { text-align: center; margin-left: auto; margin-right: auto; }
  .za-ing .cta-section .cta-button { align-self: center; }
  .za-ing .cta-actions .cta-link { justify-content: center; flex-wrap: wrap; }
}

/* ---- Mobile footer centred ---- */
@media (max-width: 720px) {
  .site-footer-design { text-align: center; }
  .site-footer-design .footer-grid { text-align: center; }
  .site-footer-design .brand { align-items: center; }
  .site-footer-design .footer-col h4 { text-align: center; }
  .site-footer-design .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ---- Service items: subtle hover + better separation ---- */
.za-ing .service-item {
  padding: 2.25rem 1.25rem 2.25rem 0;
  transition: background 0.4s var(--ease), padding 0.3s var(--ease);
}
.za-ing .service-item:hover {
  background: rgba(26,26,28,0.025);
  padding-left: 1rem;
}
.za-ing .bg-mist .service-item:hover { background: rgba(26,26,28,0.04); }
.za-ing section.bg-ink .service-item:hover { background: rgba(255,255,255,0.04); }
.za-ing .service-item .service-num {
  transition: color 0.3s var(--ease);
}
.za-ing .service-item:hover .service-num { color: var(--color-ink); }
.za-ing section.bg-ink .service-item:hover .service-num { color: var(--color-paper); }

/* ---- Process flow as road-map (dashed connector + dot per phase) ---- */
@media (min-width: 1100px) {
  .za-ing .process-flow {
    position: relative;
    background: transparent;
    border: none;
    gap: 1.5rem;
    padding-top: 2.5rem;
  }
  .za-ing .process-flow::before {
    content: '';
    position: absolute;
    top: 4rem;
    left: calc(12.5% + 4px);
    right: calc(12.5% + 4px);
    height: 1px;
    border-top: 1px dashed rgba(255,255,255,0.32);
    z-index: 0;
    pointer-events: none;
  }
  .za-ing .phase {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2px;
    margin: 1.75rem 0 0;
    padding-top: 2rem;
    transition: background 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
  }
  .za-ing .phase:hover {
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-4px);
  }
  .za-ing .phase::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: var(--color-stone);
    border: 2px solid var(--color-ink);
    border-radius: 50%;
    z-index: 2;
    transition: background 0.3s var(--ease), transform 0.4s var(--ease);
  }
  .za-ing .phase:hover::before {
    background: var(--color-paper);
    transform: translateX(-50%) scale(1.18);
  }
  .za-ing .phase-num::after { display: none; }
}

/* Tablet road-map — vertical with line on the left so it still reads as a journey */
@media (min-width: 600px) and (max-width: 1099.98px) {
  .za-ing .process-flow {
    position: relative;
    grid-template-columns: 1fr;
    background: transparent;
    border: none;
    gap: 1rem;
    padding-left: 2.25rem;
  }
  .za-ing .process-flow::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    bottom: 1.5rem;
    left: 0.75rem;
    width: 1px;
    border-left: 1px dashed rgba(255,255,255,0.32);
    pointer-events: none;
  }
  .za-ing .phase {
    border: 1px solid rgba(255,255,255,0.12);
    position: relative;
    padding-left: 2rem;
  }
  .za-ing .phase::before {
    content: '';
    position: absolute;
    top: 2.25rem;
    left: -2.25rem;
    width: 14px;
    height: 14px;
    background: var(--color-stone);
    border: 2px solid var(--color-ink);
    border-radius: 50%;
  }
}

/* =====================================================
   INLINE CONTACT FORM (.inline-form / .za-inline-form)
   Used inside the dark CTA section on .za-ing pages.
   ===================================================== */
.za-ing .inline-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}
.za-ing .inline-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 540px) {
  .za-ing .inline-form__row { grid-template-columns: 1fr 1fr; gap: 0.875rem; }
}
.za-ing .inline-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.za-ing .inline-form__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
}
.za-ing .inline-form__label em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.95em;
  opacity: 0.7;
}
.za-ing .inline-form input,
.za-ing .inline-form textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--color-paper);
  border: 1px solid var(--color-line-strong);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--color-ink);
  border-radius: 0;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.za-ing .inline-form input:focus,
.za-ing .inline-form textarea:focus {
  outline: none;
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(26,26,28,0.08);
}
.za-ing .inline-form textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.55;
}
.za-ing .inline-form__consent {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-soft);
  margin-top: 0.25rem;
}
.za-ing .inline-form__consent input { width: auto; margin-top: 3px; flex-shrink: 0; accent-color: var(--color-ink); }
.za-ing .inline-form__consent a { text-decoration: underline; text-underline-offset: 3px; color: var(--color-ink); }
.za-ing .inline-form__submit {
  margin-top: 0.5rem;
  align-self: flex-start;
  background: var(--color-ink);
  color: var(--color-paper);
}
.za-ing .inline-form__submit:hover { background: var(--color-graphite); color: var(--color-paper); }
.za-ing .inline-form__message {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 0;
}
.za-ing .inline-form__message.is-success { color: #1d6233; }
.za-ing .inline-form__message.is-error   { color: #b3261e; }

/* When the form sits on a dark CTA, ensure submit button reads on white */
.za-ing .cta-form .inline-form__submit { background: var(--color-ink); color: var(--color-paper); }
.za-ing .cta-form .inline-form__submit:hover { background: var(--color-graphite); }

/* The form container itself — same look on all 3 pages. */
.za-ing .cta-form {
  background: var(--color-paper);
  color: var(--color-ink);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.18);
}
.za-ing .cta-form .inline-form__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-variation-settings: "opsz" 36, "wght" 400;
  margin: 0 0 1.5rem;
  color: var(--color-ink);
}

/* CTA layout when an inline form is rendered — same shape across all
   three design-system pages: copy on the left, form on the right. */
.za-ing .cta-inner--with-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 880px) {
  .za-ing .cta-inner--with-form {
    grid-template-columns: 1.05fr 1fr;
    gap: 4.5rem;
  }
}
.za-ing .cta-inner--with-form .cta-copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.za-ing .cta-inner--with-form .cta-copy h2 { margin: 0.5rem 0 0.5rem; }
.za-ing .cta-inner--with-form .cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1rem;
}
.za-ing .cta-inner--with-form .cta-note {
  margin-top: 1.75rem;
}
@media (min-width: 1100px) {
  .za-ing .cta-inner--with-form .cta-actions {
    flex-direction: row;
    gap: 0 3rem;
    flex-wrap: wrap;
  }
  .za-ing .cta-inner--with-form .cta-actions .cta-link { flex: 1 1 320px; min-width: 0; }
}

/* =====================================================
   QUOTE BAND — heavier visual presence (PDF feedback)
   "A lot of white space, the quote does not have the
    importance it should get in that setup."
   ===================================================== */
.za-ing .quote-band {
  padding: clamp(6rem, 13vw, 11rem) 0;
}
.za-ing .quote-band::before {
  font-size: clamp(8rem, 16vw, 16rem);
  opacity: 0.18;
  top: clamp(1rem, 3vw, 2.5rem);
}
.za-ing .quote-band::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: clamp(2.5rem, 5vw, 4rem);
  transform: translateX(-50%);
  width: 56px;
  height: 1px;
  background: rgba(255,255,255,0.4);
}
.za-ing .quote-band blockquote {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.22;
  max-width: 30ch;
  position: relative;
  z-index: 2;
}
.za-ing .quote-band blockquote::after {
  content: attr(data-attrib);
  display: block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* =====================================================
   STRATEGY CARDS — image-fade hover (Landschaftsarchitekt style)
   Optional .strategy-card__image renders as a soft b/w cover that
   eases up on hover, like the choice cards on /home-2.
   ===================================================== */
.za-ing .strategy-card { overflow: hidden; }
.za-ing .strategy-card > * { position: relative; z-index: 1; }
.za-ing .strategy-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  filter: grayscale(100%);
  transition: opacity 0.55s var(--ease), filter 0.6s var(--ease), transform 0.8s var(--ease);
}
.za-ing .strategy-card:hover .strategy-card__image {
  opacity: 0.18;
  filter: grayscale(70%);
  transform: scale(1.04);
}
.za-ing .strategy-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.0), rgba(255,255,255,0.92));
  z-index: 0;
  opacity: 0;
  transition: opacity 0.55s var(--ease);
  pointer-events: none;
}
.za-ing .strategy-card:hover .strategy-card__overlay { opacity: 1; }

/* =====================================================
   CREDENTIAL CARDS — soft image fade-in on hover
   Same Landschaftsarchitekt pattern, on the
   ingenieurberatung Qualifikationen grid.
   ===================================================== */
.za-ing .cred-card { overflow: hidden; transition: background 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.za-ing .cred-card > * { position: relative; z-index: 1; }
.za-ing .cred-card:hover {
  transform: translateY(-3px);
  background: var(--color-mist);
  box-shadow: 0 14px 40px rgba(26,26,28,0.08);
}
.za-ing .cred-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  filter: grayscale(100%);
  transition: opacity 0.55s var(--ease), filter 0.6s var(--ease);
}
.za-ing .cred-card:hover .cred-card__image {
  opacity: 0.18;
  filter: grayscale(60%);
}

/* =====================================================
   ALTERNATING SERVICE LIST  (.service-grid.alt)
   Used on ingenieurberatung "Bestandsanalyse" to break the
   repetitive 4-up grid into a more scannable rhythm without
   building a slider. Two columns desktop, with offset/
   accent on every second item.
   ===================================================== */
@media (min-width: 768px) {
  .za-ing .service-grid.alt { grid-template-columns: 1fr 1fr; }
  .za-ing .service-grid.alt .service-item:nth-child(odd) { padding-right: 2.5rem; border-right: 1px solid var(--color-line-strong); }
  .za-ing .service-grid.alt .service-item:nth-child(even) { padding-left: 2.5rem; transform: translateY(2rem); }
}
.za-ing .service-grid.alt .service-item {
  align-items: stretch;
  position: relative;
}
.za-ing .service-grid.alt .service-num {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 96, "wght" 300;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1;
  color: var(--color-stone);
  letter-spacing: -0.02em;
  padding-top: 0;
  min-width: 3.5rem;
}
.za-ing .service-grid.alt .service-item:hover .service-num { color: var(--color-ink); }

/* Auto-apply the alternating style to Bestandsanalyse on /ingenieurberatung
   so the 4-up list reads less like a flat catalogue (PDF feedback: "very
   important but repetitive at the same time"). */
@media (min-width: 768px) {
  #bestandsanalyse .service-grid.cols-2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; }
  #bestandsanalyse .service-grid.cols-2 .service-item { align-items: stretch; position: relative; align-self: stretch; }
  #bestandsanalyse .service-grid.cols-2 .service-item:nth-child(odd)  { padding-right: 2.5rem; border-right: 1px solid var(--color-line-strong); }
  #bestandsanalyse .service-grid.cols-2 .service-item:nth-child(even) { padding-left: 2.5rem; }
  #bestandsanalyse .service-grid.cols-2 .service-num {
    font-family: var(--font-display);
    font-variation-settings: "opsz" 96, "wght" 300;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    line-height: 1;
    color: var(--color-stone);
    letter-spacing: -0.02em;
    padding-top: 0;
    min-width: 3.5rem;
  }
}

/* =====================================================
   GEO-CARD — visual interaction polish
   Image is clearly visible at idle (~38%), full b/w on hover.
   Client feedback: "the images on the cards have a strange
   opacity that is hard to see."
   ===================================================== */
.za-ing .geo-card { position: relative; }
.za-ing .geo-card .geo-card__image {
  opacity: 0.38;
  filter: grayscale(95%);
  transition: opacity 0.55s var(--ease), filter 0.55s var(--ease), transform 0.7s var(--ease);
}
.za-ing .geo-card:hover .geo-card__image {
  opacity: 0.7;
  filter: grayscale(30%);
  transform: scale(1.03);
}
/* Soft gradient over the image so the text/list reads cleanly */
.za-ing .geo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.95) 100%);
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
}
.za-ing .geo-card:hover::before { opacity: 0.85; }
.za-ing .geo-card:hover { box-shadow: 0 18px 44px rgba(26,26,28,0.08); }

/* (cta-actions layout when sitting next to the inline form is handled
   above by .cta-inner--with-form rules.) */

/* =====================================================
   EXTRA MOBILE TIGHTENING (round 2 feedback)
   ===================================================== */
@media (max-width: 768px) {
  .za-ing .quote-band blockquote { max-width: 24ch; text-align: center; margin: 0 auto; }
  .za-ing .quote-band--right blockquote { margin: 0 auto; text-align: center; }
  .za-ing .cta-form { text-align: left; padding: 1.5rem; }
  .za-ing .cta-form .inline-form__submit { align-self: stretch; justify-content: center; }
  .za-ing .footer-bottom { font-size: 0.6875rem; }
}

/* =====================================================
   PAGE LOADER — full-screen overlay with centred logo
   and an indeterminate progress bar. Rendered by
   za_render_page_loader() via the wp_body_open hook;
   removed from the DOM by design-system.js once the
   window 'load' event fires (or after a 4s safety net).
   ===================================================== */
.za-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-paper);
  opacity: 1;
  transition: opacity 0.55s var(--ease);
}
.za-loader--out {
  opacity: 0;
  pointer-events: none;
}

.za-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 2rem;
  max-width: min(90vw, 480px);
}

.za-loader__logo {
  width: auto;
  height: clamp(64px, 9vw, 112px);
  opacity: 0;
  animation: za-loader-logo-in 0.7s var(--ease) forwards;
}

.za-loader__bar {
  position: relative;
  width: clamp(160px, 22vw, 240px);
  height: 1px;
  background: rgba(26, 26, 28, 0.10);
  overflow: hidden;
}
.za-loader__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  background: var(--color-ink);
  animation: za-loader-bar 1.4s var(--ease) infinite;
}

@keyframes za-loader-logo-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes za-loader-bar {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(160%); }
  100% { transform: translateX(160%); }
}

@media (prefers-reduced-motion: reduce) {
  .za-loader__logo { animation: none; opacity: 1; }
  .za-loader__bar span { animation: none; width: 100%; opacity: 0.4; }
  .za-loader { transition: opacity 0.2s linear; }
}

