/* ============================================== */
/* ON ROOFING - HAUPTSTYLESHEET                   */
/* ============================================== */

:root {
  --bg: #0e1418;
  --bg-soft: #161e23;
  --surface: #1d262c;
  --line: #2a353d;
  --ink: #f4f1ea;
  --ink-mute: #b7b1a6;
  --ink-dim: #8a8478;
  --accent: #c0653a;
  --accent-hover: #d57848;
  --accent-soft: rgba(192, 101, 58, 0.12);
  --max-width: 1400px;
  /* Systemfonts – keine externen Server, DSGVO-konform */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-serif: Georgia, "Palatino Linotype", Palatino, "Book Antiqua", serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}

[id] {
  scroll-margin-top: 90px;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 20, 24, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 2rem;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.logo span {
  color: var(--accent);
  font-style: italic;
}
.logo small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 2px;
}
.nav {
  display: flex;
  gap: 2.5rem;
  font-size: 1rem;
}
.nav a {
  color: var(--ink-mute);
  transition: color 0.2s;
}
.nav a:hover {
  color: var(--ink);
}
.nav a:focus-visible {
  color: var(--ink);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}
.nav-cta {
  background: var(--accent);
  color: var(--ink);
  padding: 0.8rem 1.5rem;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s;
}
.nav-cta:hover {
  background: var(--accent-hover);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle svg {
  width: 26px;
  height: 26px;
}

/* ============ HERO ============ */
.hero {
  padding: 5rem 2rem;
  background:
    radial-gradient(
      ellipse at top right,
      rgba(192, 101, 58, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, #0e1418 0%, #131a1f 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-sub {
  font-size: 1.4rem;
  color: var(--ink-mute);
  margin-bottom: 2rem;
}
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual img {
  max-width: 100%;
  height: auto;
}

/* ============ EYEBROW ============ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 2px;
  background: var(--accent);
}

/* ============ BUTTONS ============ */
.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.btn {
  padding: 1rem 1.8rem;
  border-radius: 2px;
  font-size: 1.15rem;
  font-weight: 500;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  border-color: var(--ink);
}

/* ============ SECTION ============ */
.section {
  padding: 5rem 2rem;
  background: var(--bg);
}
.section.alt {
  background: var(--bg-soft);
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.section-header {
  margin-bottom: 3rem;
  max-width: 700px;
}
.section-header h2 {
  font-size: 3rem;
  margin-bottom: 0.85rem;
}
.section-header p {
  color: var(--ink-mute);
  font-size: 1.3rem;
}

/* ============ SERVICES GRID ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.service-card {
  background: var(--bg);
  padding: 2.5rem 2rem;
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 260px;
  box-shadow:
    1px 0 0 0 var(--line),
    0 1px 0 0 var(--line);
}
.service-card h3 {
  overflow-wrap: break-word;
}
.service-card:hover {
  background: var(--bg-soft);
}
.service-icon {
  color: var(--accent);
  width: 60px;
  height: 60px;
}
.service-card h3 {
  font-size: 1.75rem;
  font-weight: 500;
}
.service-card p {
  color: var(--ink-dim);
  font-size: 1.25rem;
  line-height: 1.5;
  margin-top: auto;
}

/* ============ DETAIL BLOCKS ============ */
.detail {
  padding: 5rem 2rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.detail.alt {
  background: var(--bg-soft);
}
.detail-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.detail.reverse .detail-inner > :first-child {
  order: 2;
}
.detail-content h2 {
  font-size: 2.6rem;
  margin-bottom: 1.5rem;
}
.detail-content .lead {
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}
.detail-content p {
  color: var(--ink-mute);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.detail-content h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.detail-visual {
  display: grid;
  gap: 1rem;
}
.detail-visual.dual {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 400px;
}
.detail-visual.triple {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 275px 275px;
}
.detail-visual.triple > :first-child {
  grid-row: 1 / 3;
}
.detail-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.detail-visual:not(.dual):not(.triple) img {
  height: 490px;
}

/* ============ CONTACT ============ */
.contact {
  padding: 5rem 2rem;
  background:
    radial-gradient(
      ellipse at bottom left,
      rgba(192, 101, 58, 0.1),
      transparent 60%
    ),
    var(--bg);
  border-top: 1px solid var(--line);
}
.contact-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
}
.contact-info h2 {
  font-size: 2.6rem;
  margin-bottom: 1.25rem;
}
.contact-info > p {
  color: var(--ink-mute);
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}
.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.contact-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 24px;
  height: 24px;
}
.contact-label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.contact-value {
  color: var(--ink);
  font-size: 1.25rem;
}

/* ============ FORM ============ */
.form-group input[type="file"] {
  padding: 0.6rem;
  cursor: pointer;
}
.form-group input[type="file"]::file-selector-button {
  background: var(--accent);
  color: var(--ink);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  margin-right: 1rem;
  transition: background 0.2s;
}
.form-group input[type="file"]::file-selector-button:hover {
  background: var(--accent-hover);
}
.form-hint {
  display: block;
  margin-top: 0.4rem;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

/* Formular Statusmeldungen */
#form-status:empty {
  display: none;
}
.form-status-success,
.form-status-error {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
}
.form-status-success {
  background: rgba(80, 160, 80, 0.15);
  border: 1px solid rgba(80, 160, 80, 0.4);
  color: #7ecb7e;
}
.form-status-error {
  background: rgba(192, 101, 58, 0.12);
  border: 1px solid rgba(192, 101, 58, 0.4);
  color: var(--accent-hover);
}

.contact-form-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.contact-form {
  background: var(--surface);
  padding: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.contact-form h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.85rem 1rem;
  border-radius: 2px;
  font-family: inherit;
  font-size: 1.1rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.form-group textarea {
  min-height: 130px;
  resize: vertical;
}
.form-check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--ink-mute);
  margin-bottom: 1.5rem;
}
.form-check input {
  margin-top: 0.25rem;
}
.form-check a {
  color: var(--accent);
}

/* ============ FOOTER ============ */
.footer {
  background: #0a0e11;
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--line);
}
.footer a {
  color: var(--ink-mute);
  transition: color 0.2s;
}
.footer a:hover {
  color: var(--ink);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
.footer-logo span {
  color: var(--accent);
  font-style: italic;
}
.footer-logo small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 2px;
}
.footer-brand p {
  color: var(--ink-dim);
  margin-top: 1rem;
  font-size: 1.05rem;
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 0.6rem;
  color: var(--ink-mute);
  font-size: 1.05rem;
}
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-dim);
  font-size: 0.9rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ============ OPENSTREETMAP ============ */
.contact-map {
  position: relative;
  margin-top: 2rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.contact-map::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: 0;
  background: url("/assets/bilder/Teil%201/preview_maps.png") center / cover
    no-repeat #c8bfb0;
  filter: blur(10px) brightness(0.6);
  pointer-events: none;
}
.contact-map iframe {
  display: none;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 220px;
  border: none;
  filter: grayscale(30%) brightness(0.85);
}
.contact-map-link {
  display: none;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--ink-dim);
  font-size: 0.78rem;
  text-align: right;
  transition: color 0.2s;
}
.contact-map-link:hover {
  color: var(--ink);
}

/* OSM-Consent-Overlay */
.osm-consent {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  height: 220px;
  background: rgba(14, 20, 24, 0.45);
  text-align: center;
  padding: 1.5rem 2rem;
}
.osm-consent p,
.osm-consent-actions {
  position: relative;
  z-index: 2;
}
.osm-consent p {
  color: var(--ink-mute);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 420px;
}
.osm-consent-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.osm-consent-link {
  color: var(--accent);
  font-size: 0.875rem;
  text-decoration: underline;
}
.btn-osm-accept {
  background: var(--accent);
  color: var(--ink);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-osm-accept:hover {
  background: var(--accent-hover);
}

/* ============ COOKIE-BANNER ============ */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 1rem 2rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-mute);
  flex-wrap: wrap;
}
#cookie-banner.is-visible {
  display: flex;
}
#cookie-banner p {
  flex: 1;
  min-width: 200px;
  line-height: 1.5;
}
#cookie-banner a {
  color: var(--accent);
  text-decoration: underline;
}
#cookie-ok {
  flex-shrink: 0;
  background: var(--accent);
  color: var(--ink);
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 2px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
#cookie-ok:hover {
  background: var(--accent-hover);
}

/* ============ PAGE LOADER ============ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}
#page-loader.is-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-ring {
  width: 38px;
  height: 38px;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loader-spin 0.65s linear infinite;
}
@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============ MOBILE ============ */
@media (max-width: 860px) {
  .header {
    padding: 1rem 1.25rem;
  }
  .nav {
    display: none;
  }
  .nav-cta {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .footer {
    padding: 3rem 1.25rem 1.5rem;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hero,
  .section,
  .detail,
  .contact {
    padding: 3rem 1.25rem;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .detail-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .detail.reverse .detail-inner > :first-child {
    order: initial;
  }
  .detail-visual.dual,
  .detail-visual.triple {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .detail-visual.triple > :first-child {
    grid-row: auto;
  }
  .detail-visual img,
  .detail-visual:not(.dual):not(.triple) img {
    height: 330px;
  }
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: 1.75rem;
  }
  .hero h1 {
    font-size: 2.4rem;
  }
  .section-header h2 {
    font-size: 2rem;
  }
  .detail-content h2 {
    font-size: 1.7rem;
  }
  .contact-info h2 {
    font-size: 1.9rem;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
