/* =========================================
   Basis & Farbwelt
========================================= */

:root {
  --bg: #f5f7fb;
  --bg-soft: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #0052cc;      /* Blau */
  --accent-soft: #e5efff;
  --accent-gold: #f4b000; /* Gold */
  --border: rgba(15,23,42,.08);
  --shadow-soft: 0 12px 30px rgba(15,23,42,.06);
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 480px at 0 0, rgba(0,82,204,.10), transparent 60%),
    radial-gradient(900px 480px at 100% -5%, rgba(244,176,0,.12), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #00328a;
}

main {
  flex: 1;
}

/* =========================================
   Container
========================================= */

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* =========================================
   Navigation
========================================= */

nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
}

/* Logo */

.brand {
  display: flex;
  align-items: center;
}

.logo-header {
  height: 100px;
  width: auto;
}

@media (max-width: 600px) {
  .logo-header {
    height: 60px;
  }
}

/* Menü Desktop */

.menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu a {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid transparent;
  transition: .18s ease;
}

.menu a:hover {
  background: #f3f4f6;
  color: var(--text);
}

/* aktiver Link – via JS class="active" ODER data-active="true" */
.menu a[data-active="true"],
.menu a.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(0,82,204,.25);
}

/* Burger & Mobile-Menü */

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  padding: 0 0 10px;
  border-top: 1px solid var(--border);
}

.mobile-menu a {
  display: block;
  padding: 8px 0;
  font-size: .95rem;
  color: var(--muted);
}
.mobile-menu a:hover {
  color: var(--accent);
}

.mobile-menu a.active {
  color: var(--accent);
  font-weight: 600;
}

/* wird per JS .open gesetzt */
.mobile-menu.open,
.mobile-menu.show {
  display: block;
}

@media (max-width: 860px) {
  .menu { display: none; }
  .burger { display: block; }
}

/* =========================================
   Hero / Startbereich
========================================= */

.hero {
  padding: 40px 0 34px;
  background: linear-gradient(180deg, #ffffff, rgba(255,255,255,0.7));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(0,.9fr);
  gap: 32px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero {
    padding: 28px 0 26px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Label oben */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.30);
}

.hero h1 {
  font-size: clamp(1.9rem, 2.2rem + 0.7vw, 2.5rem);
  line-height: 1.15;
  margin: 16px 0 12px;
}

.lead {
  font-size: 1.02rem;
  color: var(--muted);
  max-width: 38rem;
}

/* kleine Chips */

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
}

.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--muted);
}

/* Hero Bild rechts */

.hero-logo {
  max-width: 320px;
  margin-left: auto;
}

.hero-logo .inner {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* float Animation */

.floaty {
  animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* =========================================
   Buttons
========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: .18s ease;
}

.btn:hover {
  background: #f3f4f6;
}

.btn.primary {
  background: var(--accent);
  border-color: rgba(0,82,204,.8);
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(0,82,204,.28);
}
.btn.primary:hover {
  background: #003fa1;
}

.btn.gold {
  background: var(--accent-gold);
  border-color: #d89c00;
  color: #1f2933;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.notice {
  margin-top: 10px;
  font-size: .86rem;
  color: var(--muted);
}

/* =========================================
   Sektionen & Karten
========================================= */

.section {
  padding: 34px 0;
}

.section h2 {
  font-size: 1.5rem;
  margin: 0 0 4px;
}

.section .sub {
  margin: 0 0 18px;
  font-size: .96rem;
  color: var(--muted);
  max-width: 36rem;
}

.card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}

/* Grid 3-Spalten */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* Feature-Karten */

.feature .icon {
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.feature p {
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
}

/* Tag / Label-Style */

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--muted);
}

/* Profil / Zwei-Spalten */

.profile {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-start;
}
.profile .left {
  flex: 1 1 260px;
}
.profile .right {
  flex: 1 1 220px;
}

/* =========================================
   Galerie / Referenzen
========================================= */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-top: 14px;
}

.g-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #e5e7eb;
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cap {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15,23,42,.78);
  color: #f9fafb;
  font-size: .75rem;
}

@media (max-width: 780px) {
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* =========================================
   Formulare / Kontakt
========================================= */

.form-grid {
  display: grid;
  grid-template-columns: 2.1fr 2fr;
  gap: 20px;
}

@media (max-width: 880px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  font-size: .9rem;
}

.field label {
  font-weight: 600;
}

.input,
textarea.input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  font: inherit;
  color: var(--text);
  resize: vertical;
  min-height: 40px;
}

.input:focus,
textarea.input:focus {
  outline: none;
  border-color: rgba(0,82,204,.7);
  box-shadow: 0 0 0 1px rgba(0,82,204,.30);
}

/* (optional) Statusboxen */

.success,
.error {
  display: none;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: .85rem;
  border: 1px solid transparent;
  margin-bottom: 10px;
}
.success {
  background: #ecfdf3;
  border-color: #4ade80;
  color: #166534;
}
.error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* =========================================
   Tabellen (allgemein) & Offertenrechner
========================================= */

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  min-width: 640px;
}

.table th {
  padding: 0 8px;
  text-align: left;
  font-size: .86rem;
  font-weight: 600;
  color: var(--muted);
}

.table td {
  padding: 9px 8px;
  font-size: .9rem;
}

/* "Karten"-Style für andere Tabellen (nicht Offertenrechner) */
.rowcard {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(15,23,42,.04);
}
.rowcard td:first-child { border-radius: 14px 0 0 14px; }
.rowcard td:last-child { border-radius: 0 14px 14px 0; }

/* Spezieller Tabellenstil für den Offertenrechner */
.table-offer {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
}
.table-offer thead tr {
  border-bottom: 1px solid rgba(148, 163, 184, 0.6);
}
.table-offer tbody tr + tr {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.table-offer th,
.table-offer td {
  padding: 10px 8px;
  text-align: left;
  font-size: .9rem;
}
.table-offer th:last-child,
.table-offer td:last-child,
.table-offer th:nth-child(4),
.table-offer td:nth-child(4) {
  text-align: right;
}

/* Beträge / Zahlen – monospace nur dort wo .mono gesetzt ist */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

/* Gesamtbetrag-Box */
.totalbox {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f3f4f6;
  border: 1px solid var(--border);
}
.totalbox span {
  font-size: .86rem;
  color: var(--muted);
}
.totalbox strong {
  font-size: 1.05rem;
}

/* =========================================
   Popup (Kontakt + Offertenrechner)
========================================= */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: transparent;          /* kein dunkler Hintergrund */
  display: none;                    /* standardmässig versteckt */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-box {
  background: #ffffff;
  color: #111827;
  padding: 2rem 2.5rem;
  border-radius: 0.75rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
  text-align: center;               /* Text zentriert */
}

.popup-box h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.popup-box p {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* =========================================
   Footer
========================================= */

footer {
  border-top: 1px solid var(--border);
  background: #f3f4f6;
  margin-top: 30px;
}

.footer-inner {
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  font-size: .86rem;
}

footer strong {
  font-weight: 700;
}

footer small {
  color: var(--muted);
}

.sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}

/* =========================================
   Reveal-on-scroll (für .reveal + JS)
========================================= */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Responsive Feinschliff
========================================= */

@media (max-width: 600px) {
  .section {
    padding: 26px 0;
  }
  .hero h1 {
    font-size: 1.9rem;
  }

  .table,
  .table-offer {
    min-width: 0;
  }
}
