/* Migal Ingenieur und Gebäudetechnik GmbH – Stylesheet */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plex-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/plex-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/plex-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/plex-700.woff2") format("woff2"); }

:root {
  --navy: #1B2B45;
  --navy-dark: #142036;
  --navy-soft: #24365A;
  --blue: #1673A8;
  --blue-dark: #0F5A86;
  --blue-light: #5BC0EB;
  --green: #8DC63F;
  --text: #1B2B45;
  --muted: #4B5563;
  --line: #E5E7EB;
  --bg-soft: #F3F4F6;
  --on-dark: #D1D9E6;
  --radius: 8px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--navy); color: #fff; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 48px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--blue); }
.section--dark .eyebrow { color: var(--blue-light); }
h2 { font-size: clamp(28px, 4vw, 38px); }
.lead { font-size: 18px; color: var(--muted); }

.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 16px; top: 16px; }

/* Buttons */
.btn { display: inline-block; padding: 14px 26px; border-radius: 6px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.4; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); color: #fff; }
.btn--ghost { border-color: #8A9BB8; color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo img { display: block; height: 84px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.main-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover { color: var(--blue); }
.header-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-phone { color: var(--text); font-weight: 600; text-decoration: none; font-size: 15px; white-space: nowrap; }
.header-cta .btn { padding: 11px 18px; font-size: 15px; }

/* Hero */
.hero { background: var(--navy); color: #fff; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 96px; padding-bottom: 96px; }
.hero-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; }
.hero p.lead { color: var(--on-dark); font-size: 19px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }
.hero-media { flex: 1 1 400px; min-width: 0; height: 480px; border-radius: var(--radius); background: var(--navy-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 75% 72%; }
.placeholder { color: #C3CEDF; font-size: 15px; text-align: center; padding: 24px; border: 1px dashed #5B6E8F; border-radius: var(--radius); width: 100%; min-height: inherit; display: flex; align-items: center; justify-content: center; }

/* Trust bar */
.trust { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0 auto; padding: 22px 24px; max-width: var(--max); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-weight: 600; font-size: 15px; }
.trust li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 10px; vertical-align: middle; }

/* Cards */
.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.card { flex: 1 1 260px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.card svg { width: 36px; height: 36px; stroke: var(--blue); }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); font-size: 15px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; display: flex; flex-direction: column; gap: 4px; }
.card .tag { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: auto; }

.card--compact { flex: 1 1 300px; gap: 10px; }
.funding { margin-top: 32px; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; border-left: 0; }
.funding-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.funding h3 { font-size: 22px; }
.funding p { color: var(--on-dark); font-size: 16px; }
.section--soft .about-media { background: #fff; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.steps li { flex: 1 1 240px; min-width: 0; border-top: 3px solid var(--navy); padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.steps li:last-child { border-top-color: var(--green); }
.step-no { font-size: 14px; font-weight: 700; color: var(--blue); }
.steps h3 { font-size: 19px; }
.steps p { color: var(--muted); font-size: 15px; }

.table-wrap { overflow-x: auto; margin-top: 48px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: #fff; font-weight: 600; }
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 700; color: var(--blue); width: 64px; }

/* About */
.about { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about-media { flex: 1 1 320px; min-width: 0; min-height: 360px; border-radius: var(--radius); background: var(--bg-soft); display: flex; }
.about-media .placeholder { color: var(--muted); border-color: #9CA3AF; }
.about-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about-text > p { color: var(--muted); }
.reasons { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.reasons h3 { font-size: 18px; margin-bottom: 4px; }
.reasons p { color: var(--muted); font-size: 15px; }

/* Projects */
.projects-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 48px; }
.projects-head .section-head { margin-bottom: 0; }
.project { flex: 1 1 300px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.project-img { height: 200px; background: var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.project-img img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.project-meta { font-size: 13px; font-weight: 600; color: var(--blue); }
.project h3 { font-size: 18px; }
.project p { font-size: 14px; color: var(--muted); }

/* Contact */
.contact { display: flex; flex-wrap: wrap; gap: 56px; }
.contact-info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-info p.lead { color: var(--on-dark); font-size: 17px; }
.contact-info address { font-style: normal; display: flex; flex-direction: column; gap: 6px; }
.contact-info a { color: #fff; }
.form { flex: 1 1 480px; min-width: 0; background: #fff; color: var(--text); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea { padding: 12px; border: 1px solid #9CA3AF; border-radius: 6px; font-size: 16px; font-family: inherit; background: #fff; color: var(--text); width: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.5; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.form > .field { flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { align-self: flex-start; }
.form-note { font-size: 13px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--navy-dark); color: #C3CEDF; font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 32px; padding-bottom: 32px; }
.site-footer a { color: #C3CEDF; }
.site-footer a:hover { color: #fff; }
.footer-nav { display: flex; gap: 24px; }

/* Legal pages */
.legal { padding: 64px 0 96px; }
.legal .container { max-width: 820px; }
.legal h1 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin: 36px 0 12px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal ul { margin: 0 0 12px; }
.todo { background: #FFF7E0; border: 1px solid #E8C55A; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 32px; font-size: 15px; }

/* Thank-you page */
.message { padding: 96px 0; min-height: calc(100vh - 200px); box-sizing: border-box; }
.message .container { max-width: 720px; display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .hero-inner { padding-top: 56px; padding-bottom: 56px; gap: 40px; }
  .hero-media { height: 300px; }
  .logo img { height: 68px; }
  .site-header { position: static; }
  html { scroll-padding-top: 0; }
  .header-inner { justify-content: center; }
  .main-nav ul { justify-content: center; gap: 4px 18px; }
  .form { padding: 24px; }
  .card { padding: 24px; }
}

/* Schnellcheck */
.check-wrap { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.quick-check { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: #fff; }
.quick-check fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quick-check legend { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: 10px 16px; border: 1px solid #9CA3AF; border-radius: 6px; font-size: 15px; cursor: pointer; background: #fff; min-height: 44px; box-sizing: border-box; line-height: 1.5; }
.choice input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.field--inline { max-width: 240px; flex: none; }
.quick-check .btn { align-self: flex-start; }
.check-error { color: #B42318; font-size: 14px; font-weight: 600; }
.check-result { flex: 1 1 380px; min-width: 0; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.check-result .eyebrow { color: var(--blue-light); }
.check-result h3 { font-size: 24px; }
.check-result .load { font-size: 17px; color: var(--on-dark); }
.check-result .load strong { color: #fff; }
.check-result ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--on-dark); font-size: 15px; }
.check-note { font-size: 13px; color: #A9B7CC; }
.check-result .btn { align-self: flex-start; }
.funding-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq summary { cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 600; font-size: 17px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 20px; color: var(--muted); }

/* Upload */
.field input[type="file"] { padding: 10px; font-size: 14px; }
.field-hint { font-size: 13px; font-weight: 400; color: var(--muted); }

@media (max-width: 720px) {
  .quick-check, .check-result { padding: 24px; }
}
