/* ============================================================
   EtagenWerk Berlin – zentrales Stylesheet
   Mobile First · keine externen Abhängigkeiten
   ============================================================ */

:root {
  --bg: #faf7f1;          /* Cremeweiß – Grundton */
  --surface: #ffffff;     /* Karten, Flächen */
  --ink: #2b2118;         /* dunkles Braun – Text */
  --ink-soft: #5a4a38;    /* weicheres Braun – Nebentext */
  --accent: #c98f33;      /* Goldorange aus dem Logo – Linien, Icons */
  --accent-deep: #9a6011; /* dunkleres Gold – Links (kontraststark) */
  --border: #e8dfd2;      /* warme Trennlinien */
  --footer-bg: #2b2118;
  --footer-ink: #efe7da;
  --radius: 6px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word; /* lange deutsche Wörter nie über den Rand laufen lassen */
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 3.5vw, 2.1rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-deep); }
a:hover { color: var(--ink); }

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

ul, ol { padding-left: 1.3rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.wrap-narrow { max-width: 760px; }
.pb-0 { padding-bottom: 0; }
.mt-lg { margin-top: 1.5rem; }
.mt-xl { margin-top: 2rem; }
.card-grid.cols-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Skip-Link (Barrierefreiheit) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent-deep);
  color: #fff;
  border: 2px solid var(--accent-deep);
}
.btn-primary:hover { background: #7d4e0d; border-color: #7d4e0d; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light {
  background: #fff;
  color: var(--ink);
  border: 2px solid #fff;
}
.btn-light:hover { background: var(--bg); border-color: var(--bg); color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.75);
}
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 44px; height: 44px; }
.brand-name {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(43, 33, 24, 0.08);
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; padding: 0.5rem 0; margin: 0; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 0.7rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap; /* Menüpunkte wie „Über mich" nie umbrechen */
}
.site-nav a:hover, .site-nav a.active { color: var(--accent-deep); }
.site-nav .submenu {
  list-style: none;
  padding: 0;
}
.site-nav .submenu a {
  padding-left: 2.6rem;
  font-weight: 400;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.site-nav .nav-cta { padding: 0.7rem 1.5rem; }
.site-nav .nav-cta .btn { width: 100%; }
.site-nav a.btn-primary { color: #fff; }
.site-nav a.btn-primary:hover { color: #fff; background: #443626; }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
  }
  .site-nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
  }
  .site-nav a { padding: 0.5rem 0.75rem; font-size: 0.98rem; }
  .site-nav .has-submenu { position: relative; }
  .site-nav .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(43, 33, 24, 0.12);
    padding: 0.4rem 0;
  }
  .site-nav .has-submenu:hover .submenu,
  .site-nav .has-submenu:focus-within .submenu { display: block; }
  .site-nav .submenu a { padding: 0.55rem 1.1rem; }
  .site-nav .nav-cta { padding: 0 0 0 0.5rem; }
  .site-nav .nav-cta .btn { width: auto; padding: 0.55rem 1.1rem; font-size: 0.95rem; }
}

/* ---------- Hero (Startseite) ---------- */
.hero {
  position: relative;
  min-height: 520px;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero picture, .hero img.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero img.hero-img { object-fit: cover; object-position: center 30%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(30, 22, 14, 0.82) 0%, rgba(30, 22, 14, 0.35) 55%, rgba(30, 22, 14, 0.15) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 1.25rem 3rem;
  width: 100%;
}
.hero h1 { color: #fff; max-width: 34ch; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.hero .hero-sub {
  color: #f3ece0;
  font-size: 1.1rem;
  max-width: 52ch;
  margin-top: 0.75rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.hero .kicker {
  display: inline-block;
  color: #f0c679;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 0.6rem;
}

/* ---------- Unterseiten-Kopf ---------- */
.page-head {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.page-head .kicker {
  color: var(--accent-deep);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.page-head p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-top: 0.75rem;
}

/* ---------- Abschnitte ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section .section-intro {
  max-width: 62ch;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}
.center { text-align: center; }
.center .section-intro { margin-left: auto; margin-right: auto; }

/* ---------- Karten / Leistungen ---------- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent-deep); }
.card p { color: var(--ink-soft); font-size: 0.98rem; flex-grow: 1; }
.card .more {
  display: inline-block;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  margin-top: 0.5rem;
  padding: 0.55rem 0; /* Tipp-Ziel mind. ~44px hoch */
}
.card h3 a { display: inline-block; padding: 0.15rem 0; }
.card-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.9rem;
  color: var(--accent);
}

/* ---------- Ablauf / Schritte ---------- */
.steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  counter-reset: step;
  list-style: none;
  padding: 0;
}
@media (min-width: 640px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-family: Georgia, serif;
  margin-bottom: 0.75rem;
}
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- Kundenstimmen ---------- */
.quote-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .quote-grid { grid-template-columns: 1fr 1fr; } }
blockquote.quote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.6rem;
  font-size: 1.02rem;
}
blockquote.quote p { font-style: italic; color: var(--ink); }
blockquote.quote footer {
  margin-top: 0.9rem;
  font-style: normal;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Bild + Text nebeneinander ---------- */
.split {
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .split.img-right .split-img { order: 2; }
}
.split-img img {
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(43, 33, 24, 0.14);
  width: 100%;
  object-fit: cover;
}

/* ---------- Galerie ---------- */
.gallery {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: 1rem 1.25rem; font-size: 0.97rem; color: var(--ink-soft); }
.gallery figcaption strong { color: var(--ink); display: block; margin-bottom: 0.15rem; }

/* ---------- Checkliste ---------- */
ul.checklist { list-style: none; padding: 0; }
ul.checklist li {
  padding-left: 1.9rem;
  position: relative;
  margin-bottom: 0.55rem;
}
ul.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: var(--accent) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="none" stroke="white" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" d="M3.5 8.5l3 3 6-6.5"/></svg>') center / 70% no-repeat;
}

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}
.faq details[open] summary { margin-bottom: 0.6rem; }
.faq details p { color: var(--ink-soft); }

/* ---------- CTA-Band ---------- */
.cta-band {
  background: var(--ink);
  color: #f3ece0;
  padding: 3.5rem 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #d9cdbc; max-width: 56ch; margin: 0.5rem auto 0; }
.cta-band .btn-group { justify-content: center; margin-top: 1.5rem; }
.cta-band .tel-note { margin-top: 1rem; font-size: 0.95rem; color: #bfb2a0; }
.cta-band .tel-note a { color: #f0c679; text-decoration: none; font-weight: 600; }
.cta-band .tel-note a:hover { text-decoration: underline; }

/* ---------- Kontaktseite ---------- */
.contact-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-card h3 { display: flex; align-items: center; gap: 0.5rem; }
.contact-card .big-link {
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-card p.hint { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.5rem; }

/* ---------- Rechtstexte ---------- */
.legal h2 { margin-top: 2.2rem; font-size: 1.4rem; }
.legal h3 { margin-top: 1.5rem; }
.legal p, .legal li { color: var(--ink-soft); hyphens: auto; }
.legal a { overflow-wrap: anywhere; } /* lange URLs (z. B. gesetze-im-internet.de) umbrechen */
.legal .uppercase-note { text-transform: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 3rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}
.site-footer p, .site-footer li { color: #c9bda9; font-size: 0.96rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { color: #e8dcc7; text-decoration: none; display: inline-block; padding: 0.4rem 0; }
.site-footer a:hover { color: #f0c679; text-decoration: underline; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.footer-brand img { width: 40px; height: 40px; }
.footer-brand span { font-family: Georgia, serif; font-weight: 700; font-size: 1.1rem; color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  font-size: 0.88rem;
  color: #a4977f;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.footer-bottom a { color: #a4977f; }

/* ---------- Sonstiges ---------- */
.notice {
  background: #fdf3e3;
  border: 1px solid #ecd9b4;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #6b5225;
  font-size: 0.95rem;
}

/* ============================================================
   Design-Feinschliff (Bereich 2)
   ============================================================ */

/* Großzügigerer Weißraum nach festem System */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.page-head { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); }

/* Kicker mit feiner Messlinie – Anklang an die technische Zeichnung */
.kicker::before,
.page-head .kicker::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 2px;
  background: var(--accent);
  vertical-align: 0.22em;
  margin-right: 0.6rem;
}

/* Auswahl- und Fokus-Zustände */
::selection { background: var(--accent); color: #fff; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Fakten-Zeile (Startseite) */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1rem;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
  text-align: center;
}
@media (min-width: 760px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts > div { min-width: 0; }
.facts strong {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--accent-deep);
  line-height: 1.2;
  hyphens: auto;
}
.facts span { color: var(--ink-soft); font-size: 0.95rem; }
.facts-band { border-bottom: 1px solid var(--border); background: var(--surface); }

/* Bilder inszenieren: feine versetzte Rahmenlinie (nur auf großen Schirmen) */
@media (min-width: 860px) {
  .split { grid-template-columns: 1.08fr 0.92fr; }
  .split.img-right { grid-template-columns: 0.92fr 1.08fr; }
  .split-img { position: relative; z-index: 0; }
  .split-img::after {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: -1rem;
    bottom: -1rem;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    opacity: 0.45;
    z-index: -1;
  }
  .split.img-right .split-img::after { left: -1rem; right: 1.25rem; }
}

/* FAQ: eigenes Auf/Zu-Zeichen statt Browser-Pfeil */
.faq summary { list-style: none; position: relative; padding-right: 2.2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-deep);
  font-family: Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }

/* Footer mit goldener Werk-Kante */
.site-footer { border-top: 3px solid var(--accent); }

/* Galerie: Bild in fester Fläche, dezente Vergrößerung beim Zeigen */
.gallery figure { overflow: hidden; }

/* ---------- Dezente Animationen (nur wenn Bewegung erwünscht) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Sanfte Einblendung beim Scrollen – Klasse wird per JS vergeben */
  .js-reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease; }
  .js-reveal.in { opacity: 1; transform: none; }

  /* Hero-Text gleitet beim Laden ein */
  .hero-content > * { animation: hero-in 0.5s ease backwards; }
  .hero-content > *:nth-child(2) { animation-delay: 0.08s; }
  .hero-content > *:nth-child(3) { animation-delay: 0.16s; }
  .hero-content > *:nth-child(4) { animation-delay: 0.24s; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  /* Karten heben sich leicht, Galeriebilder zoomen minimal */
  .card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
  .card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(43, 33, 24, 0.10); border-color: var(--accent); }
  .gallery img { transition: transform 0.45s ease; }
  .gallery figure:hover img { transform: scale(1.04); }
  .brand img { transition: transform 0.3s ease; }
  .brand:hover img { transform: rotate(-6deg); }
}

/* 404-Seite */
.error-page { text-align: center; padding: clamp(4rem, 12vw, 8rem) 0; }
.error-page .big-404 {
  font-family: Georgia, serif;
  font-size: clamp(4rem, 14vw, 7rem);
  color: var(--accent);
  line-height: 1;
}
.error-page .section-intro { margin: 1rem auto 0; }
.error-page .btn-group { justify-content: center; }
.error-page .error-links { margin-top: 2rem; }
.footer-bottom-solo { border-top: none; margin-top: 0; padding-top: 0; }
