/* =========================================================================
   Gerlach Flemming GbR – öffentlicher Webauftritt
   Modern-mineralisch: Anthrazit + Akzentgelb. Kein Framework, kein CDN.
   ========================================================================= */

:root {
  --ink: #1b1e24;          /* Anthrazit (Text & dunkle Flächen) */
  --ink-2: #23272f;
  --ink-3: #2d323b;
  --paper: #ffffff;
  --canvas: #f3f4f6;       /* heller Arbeitsgrund */
  --muted: #5b6472;
  --muted-2: #8a929e;
  --line: #e4e7ec;
  --line-dark: rgba(255, 255, 255, 0.10);

  --accent: #f5b50c;       /* Signal-/Baustellengelb */
  --accent-d: #d99a00;
  --accent-soft: #fdf3d6;

  --radius: 12px;
  --radius-sm: 8px;
  --pill: 999px;
  --shadow: 0 1px 2px rgba(16, 19, 24, .06), 0 8px 24px rgba(16, 19, 24, .07);
  --shadow-lg: 0 18px 50px rgba(16, 19, 24, .18);
  --header-h: 68px;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans",
    "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .6rem; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .14em; color: var(--accent-d);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }
.eyebrow.on-dark { color: var(--accent); }

.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--pill);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  border: 2px solid transparent; transition: transform .08s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-d); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.4); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-sm { padding: .5rem .9rem; font-size: .9rem; }

/* =========================================================================
   Header / Navigation
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--ink); color: var(--accent);
  border-radius: 10px; font-weight: 800; font-size: 1.05rem;
  letter-spacing: .02em;
}
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.1; letter-spacing: -.01em; }
.brand-sub { display: block; font-weight: 600; font-size: .72rem; color: var(--muted); letter-spacing: .01em; }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a.navlink {
  padding: .5rem .8rem; border-radius: var(--radius-sm);
  font-weight: 600; color: var(--ink); font-size: .96rem;
}
.nav a.navlink:hover { background: var(--canvas); }
.nav .btn { margin-left: .4rem; }

.nav-toggle, .nav-toggle-label { display: none; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 130% at 85% -10%, #2c323c 0%, var(--ink) 55%);
  color: #fff;
}
.hero::after {  /* geologische Schichtkanten */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
      -16deg, transparent 0 44px, rgba(255,255,255,.025) 44px 46px);
  opacity: .9;
}
.hero .wrap { position: relative; z-index: 1; padding: clamp(3.5rem, 8vw, 6.5rem) 1.25rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 .hl { color: var(--accent); }
.hero .lead { color: #c7cdd6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-points { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; }
.hero-point { display: flex; align-items: center; gap: .55rem; font-weight: 600; color: #e7eaef; font-size: .98rem; }
.hero-point .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

/* Schicht-Visual rechts */
.strata {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-dark); box-shadow: var(--shadow-lg);
  background: #11141a;
}
.strata-layer { padding: .9rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.strata-layer:last-child { border-bottom: none; }
.strata-layer b { font-size: .96rem; }
.strata-layer span { font-size: .8rem; color: var(--muted-2); }
.strata-l1 { background: #3a3326; }
.strata-l2 { background: #4a3d28; }
.strata-l3 { background: #3c4250; }
.strata-l4 { background: #2b3340; }
.strata-l5 { background: #20262f; }
.strata-bar { height: 6px; border-radius: var(--pill); background: var(--accent); margin-top: .35rem; }

/* =========================================================================
   Allgemeine Sections
   ========================================================================= */
section.block { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.alt { background: var(--canvas); }
.section-head { max-width: 64ch; margin-bottom: 2.2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Leistungen */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.card-srv {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card-srv:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d7dbe1; }
.card-srv .ic-badge {
  width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-d); margin-bottom: 1rem;
}
.card-srv .ic-badge svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }
.card-srv h3 { margin-bottom: .35rem; }
.card-srv p { color: var(--muted); margin: 0; font-size: .96rem; }

/* Leistungsphasen */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: step; }
.step { position: relative; padding: 1.4rem 1.1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.alt .step { background: #fff; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-weight: 800; font-size: 1rem; color: var(--ink); background: var(--accent);
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; margin-bottom: .8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Büro / Über uns */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: start; }
.fact-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-lg); }
.fact-card h3 { color: #fff; }
.fact-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.fact-list li { display: flex; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.08); color: #d7dbe2; }
.fact-list li:last-child { border-bottom: none; }
.fact-list .k { color: var(--accent); font-weight: 700; min-width: 84px; flex: 0 0 auto; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.tag { background: var(--accent-soft); color: var(--accent-d); font-weight: 700; font-size: .82rem; padding: .3rem .7rem; border-radius: var(--pill); }

/* CTA-Band */
.cta-band { background: var(--accent); color: var(--ink); }
.cta-band .wrap { padding: clamp(2.4rem, 5vw, 3.6rem) 1.25rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1.4rem; }
.cta-band h2 { margin: 0; }
.cta-band p { margin: .3rem 0 0; font-weight: 600; }

/* =========================================================================
   Formularseiten (Bewerbung / Kontakt)
   ========================================================================= */
.page-hero { background: var(--ink); color: #fff; }
.page-hero .wrap { padding: clamp(2.6rem, 6vw, 4rem) 1.25rem; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-hero p { color: #c7cdd6; max-width: 60ch; margin: 0; }

.form-layout { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2rem; align-items: start; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem; }
.aside-card { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.aside-card h3 { margin-top: 0; }
.aside-card a { color: var(--accent-d); font-weight: 700; }
.contact-line { display: flex; gap: .6rem; padding: .5rem 0; color: var(--muted); }
.contact-line .k { color: var(--ink); font-weight: 700; min-width: 76px; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.field .req { color: var(--accent-d); }
.field input, .field textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #cbd0d8; border-radius: var(--radius-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,181,12,.25);
}
.field textarea { min-height: 8rem; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; color: var(--muted); }
.consent input { width: auto; margin-top: .25rem; flex: 0 0 auto; }
.consent a { color: var(--accent-d); font-weight: 700; }
.form-actions { margin-top: 1.2rem; }

/* Flash-Meldungen */
.flash { border-radius: var(--radius-sm); padding: .85rem 1.1rem; margin-bottom: 1rem; border: 1px solid transparent; font-weight: 600; }
.flash-success { background: #e7f7ec; border-color: #a9e0bb; color: #14532d; }
.flash-error { background: #fdeaea; border-color: #f3b6b6; color: #7f1d1d; }
.flash-info { background: var(--accent-soft); border-color: #f1d488; color: #7a5800; }

/* Rechtstexte */
.legal { max-width: 800px; }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal h3 { margin-top: 1.6rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin: .35rem 0; }
.legal address { font-style: normal; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: #c2c8d1; }
.site-footer .wrap { padding: 3rem 1.25rem 1.4rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 1rem; }
.site-footer a { color: #c2c8d1; }
.site-footer a:hover { color: var(--accent); }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin: .45rem 0; }
.foot-brand .brand-mark { width: 46px; height: 46px; }
.foot-contact { font-style: normal; line-height: 1.8; }
.foot-bottom {
  margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; justify-content: space-between;
  font-size: .85rem; color: var(--muted-2);
}
.foot-bottom a { color: var(--muted-2); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .strata { order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about, .form-layout { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }

  /* Mobile-Navigation: Toggle per Checkbox-Hack (kein JS) */
  .nav-toggle-label {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    cursor: pointer; background: #fff;
  }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
  }
  .nav-toggle-label span::before { position: absolute; top: -6px; }
  .nav-toggle-label span::after { position: absolute; top: 6px; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .8rem 1rem 1.2rem; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .18s ease;
  }
  .nav a.navlink { padding: .8rem .6rem; border-radius: var(--radius-sm); }
  .nav .btn { margin: .4rem 0 0; justify-content: center; }
  .nav-toggle:checked ~ .nav { transform: none; opacity: 1; visibility: visible; }
}

@media (max-width: 560px) {
  .cards, .steps, .foot-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
}
