/* ===== EnDeCo – Engineering Development Consulting ===== */

/* ---- Lokale Schriften (DSGVO-konform, kein Google-Server) ---- */
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/Lexend-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/Lexend-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/Lexend-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/Lexend-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/SourceSans3-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: italic; font-weight: 400; font-display: swap; src: url('../assets/fonts/SourceSans3-400i-latin.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/SourceSans3-600-latin.woff2') format('woff2'); }

/* ---- Design Tokens ---- */
:root {
  --primary: #1E3A66;        /* EnDeCo Navy */
  --primary-dark: #142948;
  --accent: #2E64AD;         /* CTA-Blau */
  --accent-hover: #24528F;
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --text: #1B2536;
  --text-muted: #4E5D75;
  --border: #DFE6F0;
  --light-blue: #DCE6F5;
  --ring: #2E64AD;

  --font-head: 'Lexend', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(20, 41, 72, .08);
  --shadow-md: 0 6px 24px rgba(20, 41, 72, .10);

  --space-1: 8px; --space-2: 16px; --space-3: 24px;
  --space-4: 32px; --space-5: 48px; --space-6: 64px; --space-7: 96px;
}

/* ---- Reset & Basis ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); color: var(--primary); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

.container { max-width: 1120px; margin-inline: auto; padding-inline: var(--space-3); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: var(--space-3); min-height: 68px; }
.brand { display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: 'Calibri Light', Calibri, 'Segoe UI', sans-serif; font-style: italic; font-weight: 300; font-size: 1.6rem; color: var(--primary); letter-spacing: .01em; }
.brand-sub { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.main-nav { display: flex; gap: var(--space-3); }
.main-nav a { color: var(--text); font-weight: 600; font-size: .95rem; padding: 8px 2px; }
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.lang-switch { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); }
.lang-sep { color: var(--border); }
.lang-btn {
  background: none; border: none; font: inherit; font-weight: 600; font-size: .9rem;
  color: var(--text-muted); cursor: pointer; padding: 8px 6px; border-radius: 6px;
}
.lang-btn:hover { color: var(--accent); }
.lang-btn.active { color: var(--primary); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.nav-toggle { display: none; background: none; border: none; color: var(--primary); cursor: pointer; padding: 10px; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(247, 249, 252, .97) 0%, rgba(247, 249, 252, .88) 45%, rgba(222, 232, 245, .72) 100%),
    url('../assets/bild-entwicklung.webp') right center / cover no-repeat;
}
.hero-inner { position: relative; padding-block: var(--space-7) var(--space-6); max-width: 780px; margin-inline: 0; }
.hero-eyebrow {
  font-family: var(--font-head); font-weight: 500; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-2);
}
.hero-sub { font-size: 1.2rem; color: var(--text-muted); margin-top: var(--space-3); max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }

.btn {
  display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 13px 28px; border-radius: 8px; cursor: pointer; border: 2px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost:hover { background: var(--primary); color: #fff; }
/* Kompakte Variante für den 68px hohen Sticky-Header */
.btn-sm { padding: 9px 18px; font-size: .9rem; white-space: nowrap; }

/* ---- Stats ---- */
.stats { background: var(--primary); color: #fff; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3); padding-block: var(--space-4);
}
.stat { text-align: center; }
.stat-value { display: block; font-family: var(--font-head); font-weight: 700; font-size: 2.1rem; }
.stat-label { display: block; font-size: .92rem; color: #C7D5EC; margin-top: 2px; }

/* ---- Sektionen ---- */
.section { padding-block: var(--space-7); }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: var(--space-5); }
.section-head p { color: var(--text-muted); font-size: 1.1rem; margin-top: var(--space-2); }

/* ---- Leistungen ---- */
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-3); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); transform: translateY(-2px); }
.card-icon {
  width: 46px; height: 46px; border-radius: 10px; background: var(--light-blue); color: var(--primary);
  display: grid; place-items: center; margin-bottom: var(--space-2);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.05rem; }
.card p {
  font-size: .95rem; color: var(--text-muted);
  max-height: 0; opacity: 0; overflow: hidden; margin-top: 0;
  transition: max-height .35s ease, opacity .35s ease, margin-top .35s ease;
}
.card:hover p, .card:focus-visible p, .card:focus-within p {
  max-height: 200px; opacity: 1; margin-top: var(--space-1);
}
/* Touch-Geräte ohne Hover: Beschreibungen immer sichtbar */
@media (hover: none) {
  .card p { max-height: none; opacity: 1; margin-top: var(--space-1); }
}

/* ---- Über mich ---- */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: var(--space-6); align-items: start; }
.about-photo { position: sticky; top: 100px; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.about-photo-caption { margin-top: var(--space-2); line-height: 1.4; }
.about-photo-caption strong { display: block; font-family: var(--font-head); color: var(--primary); }
.about-photo-caption span { font-size: .9rem; color: var(--text-muted); }
.about-text h2 { margin-bottom: var(--space-3); }
.about-text > p { color: var(--text-muted); font-size: 1.05rem; }

.check-list { list-style: none; margin-top: var(--space-3); display: grid; gap: 10px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px;
  background: var(--light-blue); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E3A66' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12.5 10 17.5 19 7'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}

.timeline-title { margin-top: var(--space-5); margin-bottom: var(--space-3); }
.timeline { list-style: none; border-left: 2px solid var(--light-blue); display: grid; gap: var(--space-3); padding-left: var(--space-3); }
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1 * var(--space-3) - 7px); top: 6px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--light-blue);
}
.tl-date { display: block; font-family: var(--font-head); font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.tl-role { display: block; font-weight: 600; color: var(--primary); margin-top: 2px; }
.tl-org { display: block; font-size: .95rem; color: var(--text-muted); }

/* ---- Konditionen ---- */
.pricing-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--space-3); align-items: start; }
.price-card, .option-b {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-4); box-shadow: var(--shadow-sm);
}
.price-kicker { font-family: var(--font-head); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.price-value { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--primary); margin-block: var(--space-2); }
.price-value span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.option-b-sub { color: var(--text-muted); margin-block: var(--space-1) var(--space-3); }
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.package {
  border: 1px solid var(--border); border-radius: 10px; padding: var(--space-3) var(--space-2);
  text-align: center; display: grid; gap: 4px;
}
.package-featured { border-color: var(--accent); background: linear-gradient(180deg, #F3F7FD, #fff); box-shadow: var(--shadow-sm); }
.pkg-name {
  font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: #fff;
  background: var(--primary); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; margin-inline: auto;
}
.pkg-price { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--primary); margin-top: 6px; }
.pkg-hours { font-size: .92rem; }
.pkg-extra { font-size: .85rem; color: var(--text-muted); }
.dash-list { list-style: none; margin-top: var(--space-3); display: grid; gap: 8px; font-size: .93rem; color: var(--text-muted); }
.dash-list li { padding-left: 18px; position: relative; }
.dash-list li::before { content: "–"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.vat-note { margin-top: var(--space-3); font-size: .9rem; color: var(--text-muted); font-style: italic; }
.terms-note { margin-top: var(--space-1); font-size: .9rem; color: var(--text-muted); }

/* ---- Kontakt ---- */
.contact { position: relative; background: var(--primary); color: #fff; overflow: hidden; }
.contact-bg {
  position: absolute; inset: 0; opacity: .07;
  background: url('../assets/bild-bemessung.webp') center / cover no-repeat;
}
.contact-inner { position: relative; }
.contact .section-head h2 { color: #fff; }
.contact .section-head p { color: #C7D5EC; }
.contact-card {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius); padding: var(--space-4);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); max-width: 860px;
}
.contact-card h3 { color: #fff; font-size: 1.3rem; }
.contact-card p, .contact-card address { font-style: normal; color: #C7D5EC; margin-top: 6px; }
.contact-line { display: flex; align-items: center; gap: 10px; }
.contact-line svg { width: 20px; height: 20px; flex: none; color: #9FBBE3; }
.contact-line a { color: #fff; font-weight: 600; }
.contact-btn { margin-top: var(--space-3); }

/* ---- Footer ---- */
.site-footer { background: var(--primary-dark); color: #A8BCDA; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); justify-content: space-between; padding-block: var(--space-3); }
.site-footer a { color: #fff; margin-left: var(--space-3); }

/* ---- Scroll-Reveal ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .card p { transition: none; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 300px 1fr; gap: var(--space-4); }
}
@media (max-width: 768px) {
  .section { padding-block: var(--space-6); }
  .hero-inner { padding-block: var(--space-6) var(--space-5); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 300px; }
  .contact-card { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  /* Im Burger-Menü steht "Kontakt" bereits; hier wird der Platz gebraucht. */
  .header-cta { display: none; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: none; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
  .packages { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .brand-sub { display: none; }
}

/* ---- Unterseite (Impressum) ---- */
.legal-page { padding-block: var(--space-5) var(--space-7); }
.legal-page h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: var(--space-4); }
.legal-page h2 { font-size: 1.4rem; margin-top: var(--space-6); margin-bottom: var(--space-2); }
.legal-page h1 + h2 { margin-top: var(--space-3); }
.legal-page h3 { margin-top: var(--space-4); margin-bottom: var(--space-1); }
.legal-page p, .legal-page address { color: var(--text-muted); font-style: normal; margin-bottom: var(--space-2); max-width: 760px; }
.legal-page .back-link { display: inline-block; margin-bottom: var(--space-4); font-weight: 600; }
.terms-list { padding-left: 20px; display: grid; gap: 14px; color: var(--text-muted); max-width: 760px; }
.terms-list li { padding-left: 6px; }
.terms-list strong { color: var(--text); }
/* Widerspruchshinweis: Art. 21 Abs. 4 DSGVO verlangt eine von den übrigen
   Informationen getrennte, deutlich erkennbare Darstellung. */
.legal-highlight {
  margin-top: var(--space-5); max-width: 760px;
  padding: var(--space-3) var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
}
.legal-highlight h3 { margin-top: 0; }
.legal-highlight p:last-child { margin-bottom: 0; }
.legal-updated { margin-top: var(--space-5); font-size: .9rem; font-style: italic; }
