/* =========================================================
   Montageservice Karnick — Dachfenster
   Stylesheet (mobile-first, vanilla CSS)
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f3;
  --color-bg-dark: #1a2330;
  --color-text: #1a2330;
  --color-text-muted: #5a6470;
  --color-border: #e4e4e0;
  --color-accent: #0e43a2;        /* Marken-Blau */
  --color-accent-dark: #08306e;
  --color-accent-light: #e7edf6;
  --color-warning: #c2410c;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif Pro", Georgia, "Times New Roman", serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(20, 28, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 28, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(20, 28, 40, 0.12);

  --container: 1200px;
  --container-narrow: 820px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-bg-dark);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }

ul, ol { padding-left: 1.2em; margin: 0 0 1.1em; }
li { margin-bottom: 0.4em; }

/* ---------- Layout-Helfer ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4.5rem 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-bg-dark); color: #e8eaee; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-tight { padding: 2.5rem 0; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: var(--container);
  margin: 0 auto;
  gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  font-weight: 700; font-size: 1.05rem;
  color: var(--color-bg-dark); text-decoration: none;
}
.brand-logo {
  height: 106px; width: auto; display: block;
}
.brand-footer {
  display: inline-flex;
  background: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
}
.brand-footer .brand-logo { height: 48px; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--color-accent);
  color: #fff;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  font-weight: 800; font-size: 1.1rem;
}
.brand-name { line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--color-text-muted); letter-spacing: 0.04em; text-transform: uppercase; }

.nav-list {
  display: none;
  list-style: none; margin: 0; padding: 0;
  gap: 0.25rem; align-items: center;
}
.nav-list li { margin: 0; }
.nav-list a {
  display: block;
  padding: 0.55rem 0.85rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.97rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-list a:hover, .nav-list a.active {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.nav-cta {
  display: none;
  background: var(--color-accent);
  color: #fff !important;
  padding: 0.65rem 1.1rem !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.nav-cta:hover { background: var(--color-accent-dark) !important; text-decoration: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--color-border);
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; position: relative;
  width: 20px; height: 2px; background: var(--color-text);
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 980px) {
  .nav-list {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff;
    flex-direction: column; align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    gap: 0.1rem;
  }
  .nav-list[hidden] { display: none; }
  .nav-list:not([hidden]) { display: flex; }
}
@media (min-width: 981px) {
  .nav-toggle { display: none; }
  .nav-list { display: flex; }
  .nav-cta { display: inline-block; }
}

/* ---------- Top-Bar (Kontakt-Streifen) ---------- */
.top-bar {
  background: var(--color-bg-dark); color: #cdd5df;
  font-size: 0.83rem;
}
.top-bar-inner {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  justify-content: space-between; align-items: center;
  padding: 0.45rem 1.25rem;
  max-width: var(--container); margin: 0 auto;
}
.top-bar a { color: #cdd5df; text-decoration: none; }
.top-bar a:hover { color: #fff; }
.top-bar-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 540px;
  display: flex; align-items: center;
  background: linear-gradient(120deg, #1a2330 0%, #243447 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(14,67,162,0.35), transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(255,255,255,0.05), transparent 50%);
}
.hero-img-placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 70% 40%, rgba(14,67,162,0.22), transparent 65%),
    linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
  display: grid; place-items: center;
  font-size: 0; color: transparent;
}
.hero-inner {
  position: relative; z-index: 1;
  padding: 4.5rem 1.25rem;
  max-width: var(--container); margin: 0 auto; width: 100%;
}
.hero-content { max-width: 720px; }
.hero .eyebrow, .hero-sub .eyebrow { color: #a9c3ec; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,0.88); margin-bottom: 1.75rem; }
.hero-meta {
  display: flex; gap: 1.5rem 2rem; flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.95rem;
}
.hero-meta strong { display: block; font-size: 1.5rem; color: #fff; font-weight: 700; }
.hero-meta span { color: rgba(255,255,255,0.75); }

.hero-sub {
  background: linear-gradient(120deg, #1a2330 0%, #243447 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
}
.hero-sub h1 { color: #fff; }
.hero-sub p { color: rgba(255,255,255,0.85); max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: var(--color-accent); color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--color-accent-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-outline {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-ghost {
  background: transparent; color: var(--color-accent-dark);
  border: 1.5px solid var(--color-accent);
}
.btn-ghost:hover { background: var(--color-accent-light); }
.btn-row { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #cfd5dc; }
.card h3 { margin-top: 0; }
.card .icon {
  width: 44px; height: 44px;
  background: var(--color-accent-light); color: var(--color-accent-dark);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 1.3rem; font-weight: 800;
  margin-bottom: 1rem;
}
.card-link {
  display: inline-block; margin-top: 0.5rem;
  font-weight: 600; color: var(--color-accent-dark);
}
.card-link::after { content: " →"; }

/* ---------- Service-Block (Bild + Text) ---------- */
.split {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 850px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .split-reverse > :first-child { order: 2; }
}
.split-img {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  display: grid; place-items: center;
  color: var(--color-text-muted);
  font-size: 0.9rem; text-align: center; padding: 1rem;
  border: 1px dashed var(--color-border);
}
.split-img-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}
.blog-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Bild-Platzhalter (allgemein) ---------- */
.img-placeholder {
  position: relative;
  background:
    radial-gradient(circle at 75% 35%, rgba(14,67,162,0.10), transparent 65%),
    var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  aspect-ratio: 16/10;
  font-size: 0; color: transparent;
  overflow: hidden;
}
.img-placeholder::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e43a2' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2'/><circle cx='9' cy='10' r='1.5'/><path d='M21 17l-5-5-9 9'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 48px 48px;
  opacity: 0.5;
}
.img-placeholder small { display: none; }

/* ---------- USP-Bar ---------- */
.usp-bar {
  background: var(--color-accent-light);
  padding: 1.5rem 0;
}
.usp-bar-inner {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
  text-align: center;
}
@media (min-width: 700px) {
  .usp-bar-inner { grid-template-columns: repeat(4, 1fr); }
}
.usp-item { font-size: 0.95rem; }
.usp-item strong { display: block; color: var(--color-accent-dark); font-size: 1.05rem; margin-bottom: 0.15rem; }

/* ---------- Marken ---------- */
.brand-tile {
  display: flex; gap: 1.25rem; align-items: center;
  padding: 1.25rem;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.brand-tile-logo {
  width: 130px; height: 80px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  padding: 0.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.brand-tile-logo img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}

/* ---------- FAQ ---------- */
.faq details {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-bg-dark);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem; color: var(--color-accent);
  transition: transform 0.2s;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] { border-color: var(--color-accent); }
.faq details > *:not(summary) { margin-top: 0.85rem; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card .img-placeholder { aspect-ratio: 16/9; border: none; border-radius: 0; border-bottom: 1px solid var(--color-border); }
.blog-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { font-size: 0.8rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.blog-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.blog-card h3 a { color: var(--color-bg-dark); text-decoration: none; }
.blog-card h3 a:hover { color: var(--color-accent-dark); }
.blog-card p { color: var(--color-text-muted); font-size: 0.95rem; flex: 1; }
.blog-card .card-link { margin-top: auto; }

/* ---------- Artikel-Layout ---------- */
.article {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.article header { margin-bottom: 2rem; }
.article-meta { font-size: 0.88rem; color: var(--color-text-muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.article h2 { margin-top: 2.5rem; }
.article h3 { margin-top: 1.75rem; }
.article ul li, .article ol li { margin-bottom: 0.5rem; }
.article blockquote {
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-light);
  margin: 1.5rem 0; padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-bg-dark);
}
.article blockquote p:last-child { margin-bottom: 0; }
.article .img-placeholder { margin: 1.5rem 0; }

.callout {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
}
.callout h4 { margin: 0 0 0.5rem; color: var(--color-accent-dark); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Tabelle ---------- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  text-align: left; padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
th { background: var(--color-bg-alt); font-weight: 600; color: var(--color-bg-dark); }
tbody tr:hover { background: rgba(14,67,162,0.04); }

/* ---------- Kontakt-Formular ---------- */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form label {
  display: block; font-weight: 600; font-size: 0.92rem;
  margin-bottom: 0.35rem; color: var(--color-bg-dark);
}
.form input, .form select, .form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(14,67,162,0.15);
}
.form textarea { min-height: 140px; resize: vertical; }
.form-hint { font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------- CTA-Streifen ---------- */
.cta-strip {
  background: var(--color-bg-dark);
  color: #fff;
  padding: 3rem 0;
}
.cta-strip-inner {
  display: grid; gap: 1.5rem; align-items: center;
  grid-template-columns: 1fr;
  text-align: center;
}
@media (min-width: 800px) {
  .cta-strip-inner { grid-template-columns: 1fr auto; text-align: left; }
}
.cta-strip h2 { color: #fff; margin: 0 0 0.5rem; }
.cta-strip p { margin: 0; color: rgba(255,255,255,0.85); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f1620;
  color: #cdd5df;
  padding: 3.5rem 0 1.5rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: #cdd5df; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-name small { color: #8b95a5; }

.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between;
  font-size: 0.85rem; color: #8b95a5;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem; color: var(--color-text-muted);
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs span { margin: 0 0.5rem; }
.breadcrumbs .current { color: var(--color-bg-dark); font-weight: 500; }

/* ---------- Sterne / Bewertung ---------- */
.stars { color: #f5b800; letter-spacing: 0.1em; }

/* ---------- Hilfsklassen ---------- */
.muted { color: var(--color-text-muted); }
.lead { font-size: 1.15rem; color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
