/* Schlosserei Lerch — Design-Tokens & Basis (Basic-Paket, 2-3 Farben) */

@font-face {
  font-family: "Space Grotesk";
  src:
    url("../fonts/space-grotesk-var-latin.woff2") format("woff2-variations"),
    url("../fonts/space-grotesk-var-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src:
    url("../fonts/inter-var-latin.woff2") format("woff2-variations"),
    url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farbwelt — bewusst nur 3 Farben (+ Neutrale daraus) */
  --c-bg: #12161b;
  --c-bg-elevated: #191e25;
  --c-bg-elevated-2: #1f2530;
  --c-steel: #3d7ca5;
  --c-steel-light: #6fabd1;
  --c-text: #f3f1ea;
  --c-text-muted: #99a3ad;
  --c-border: rgba(243, 241, 234, 0.1);

  /* Typo */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --fs-900: clamp(2.75rem, 2rem + 3.4vw, 5.25rem);
  --fs-800: clamp(2.1rem, 1.7rem + 1.8vw, 3.25rem);
  --fs-700: clamp(1.4rem, 1.25rem + 0.7vw, 1.85rem);
  --fs-500: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --fs-400: 1rem;
  --fs-300: 0.875rem;

  /* Raster (8px-Baseline, fluid) */
  --space-3xl: clamp(4rem, 3rem + 4.5vw, 8rem);
  --space-2xl: clamp(2.75rem, 2.2rem + 2.5vw, 5rem);
  --space-xl: clamp(2rem, 1.7rem + 1.4vw, 3rem);
  --space-lg: clamp(1.5rem, 1.35rem + 0.7vw, 2rem);
  --space-md: 1rem;
  --space-sm: 0.5rem;

  --ease-in: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out: cubic-bezier(0.32, 0, 0.67, 0);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius: 4px;
  --max-w: 1240px;
}

/* Helles Theme — nur Hintergrund/Text/Rahmen, KEINE Medien betroffen */
:root[data-theme="light"] {
  --c-bg: #f4f2ec;
  --c-bg-elevated: #ffffff;
  --c-bg-elevated-2: #ebe8df;
  --c-steel: #2f6f97;
  --c-steel-light: #2f6f97;
  --c-text: #14181d;
  --c-text-muted: #55606b;
  --c-border: rgba(18, 22, 27, 0.12);
}

:root {
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
}
html {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.01em;
}
h1 {
  font-size: var(--fs-900);
}
h2 {
  font-size: var(--fs-800);
}
h3 {
  font-size: var(--fs-700);
}
p {
  margin: 0 0 var(--space-md);
  color: var(--c-text-muted);
}
a {
  color: inherit;
}

.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-steel);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 22, 27, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}
:root[data-theme="light"] .site-header {
  background: rgba(244, 242, 236, 0.85);
}

/* Theme-Umschalter — Segment-Schalter Sonne/Mond */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-bg-elevated-2);
  cursor: pointer;
  line-height: 0;
}
.theme-toggle__opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--c-text-muted);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
/* Aktive Hälfte hervorheben: dunkel → Mond aktiv, hell → Sonne aktiv */
.theme-toggle .opt-moon {
  background: var(--c-steel);
  color: #fff;
}
:root[data-theme="light"] .theme-toggle .opt-moon {
  background: transparent;
  color: var(--c-text-muted);
}
:root[data-theme="light"] .theme-toggle .opt-sun {
  background: var(--c-steel);
  color: #fff;
}
.theme-toggle:hover {
  border-color: var(--c-steel-light);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--c-steel-light);
  outline-offset: 2px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}
.brand img {
  height: clamp(28px, 4vw, 36px);
  width: auto;
  display: block;
}
.main-nav {
  display: none;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(1.25rem, 2vw, 2.25rem);
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  font-size: var(--fs-300);
  color: var(--c-text-muted);
  transition: color 0.2s var(--ease-in);
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--c-text);
}
@media (min-width: 860px) {
  .main-nav {
    display: block;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.menu-toggle {
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  cursor: pointer;
}
@media (min-width: 860px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-bg-elevated);
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-md) clamp(1.25rem, 4vw, 2.5rem) var(--space-lg);
  display: grid;
  gap: 0.9rem;
}
.mobile-nav a {
  text-decoration: none;
  color: var(--c-text);
  font-size: 1.05rem;
  display: block;
  min-height: 44px;
  display: flex;
  align-items: center;
}
@media (min-width: 860px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-size: var(--fs-300);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-in),
    background 0.2s var(--ease-in),
    border-color 0.2s var(--ease-in);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--c-steel);
  color: #fff;
}
.btn-primary:hover {
  background: var(--c-steel-light);
}
.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border);
}
.btn-ghost:hover {
  border-color: var(--c-steel-light);
}

/* Hero */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(18, 22, 27, 0.35) 0%,
    rgba(18, 22, 27, 0.55) 45%,
    rgba(18, 22, 27, 0.96) 100%
  );
}
.hero-content {
  position: relative;
  padding-block: var(--space-2xl) var(--space-2xl);
  max-width: 46rem;
  /* Über dem dunklen Video IMMER helle Schrift — unabhängig vom Theme */
  --c-text: #f3f1ea;
  --c-text-muted: #c8cfd6;
  --c-steel-light: #8fc0e0;
  --c-border: rgba(243, 241, 234, 0.18);
  color: var(--c-text);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-300);
  color: var(--c-steel-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--c-steel-light);
}
.hero h1 {
  color: var(--c-text);
}
.hero-lead {
  font-size: var(--fs-500);
  max-width: 34rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--space-lg);
}
.hero-rating {
  margin-top: var(--space-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: rgba(243, 241, 234, 0.04);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.hero-rating:hover {
  border-color: rgba(255, 200, 87, 0.5);
  background: rgba(255, 200, 87, 0.07);
}
.hero-rating__stars {
  color: #ffc857;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  line-height: 1;
}
.hero-rating__score {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-text);
  line-height: 1;
}
.hero-rating__label {
  font-size: var(--fs-300);
  color: var(--c-text-muted);
}

.hero-trust {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  font-size: var(--fs-300);
  color: var(--c-text-muted);
}
.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-trust span::before {
  content: "✓";
  color: var(--c-steel-light);
}

/* Sections */
section {
  padding-block: var(--space-2xl);
}
.section-head {
  max-width: 40rem;
  margin-bottom: var(--space-xl);
}
.section-head .eyebrow {
  color: var(--c-steel-light);
}
.section-alt {
  background: var(--c-bg-elevated);
  border-block: 1px solid var(--c-border);
}

/* Leistungen */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.service-card {
  background: var(--c-bg);
}
.service-summary {
  position: relative;
  display: block;
  padding: var(--space-lg) calc(var(--space-md) + 1.3rem) var(--space-lg)
    var(--space-md);
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}
.service-summary::-webkit-details-marker {
  display: none;
}
.service-summary:hover {
  background: var(--c-bg-elevated);
}
.service-card[open] > .service-summary {
  background: var(--c-bg-elevated);
}
.service-summary:focus-visible {
  outline: 2px solid var(--c-steel-light);
  outline-offset: -2px;
}
.service-card .num {
  font-family: var(--font-display);
  color: var(--c-steel-light);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.service-card h3 {
  font-size: 1.15rem;
  margin-top: 0.6rem;
  margin-bottom: 0.4rem;
}
.service-summary p {
  font-size: var(--fs-300);
  margin: 0;
}
.service-chevron {
  position: absolute;
  top: calc(var(--space-lg) + 0.15rem);
  right: var(--space-md);
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--c-steel-light);
  border-bottom: 2px solid var(--c-steel-light);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.service-card[open] .service-chevron {
  transform: rotate(-135deg);
}
.service-detail {
  padding: 0 var(--space-md) var(--space-md);
}
.service-detail p {
  margin: 0;
  padding: 0.9rem 1rem;
  background: var(--c-bg-elevated-2);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: var(--fs-300);
  color: var(--c-text-muted);
  line-height: 1.6;
}
.service-card[open] .service-detail {
  animation: svcReveal 0.28s ease;
}
@keyframes svcReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .service-card[open] .service-detail {
    animation: none;
  }
  .service-chevron {
    transition: none;
  }
}

/* Feature-Block mit Bild (Tor/Zaun) */
.feature {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.feature-media img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}
.feature-text .eyebrow {
  margin-bottom: var(--space-sm);
}

/* Referenz */
.reference-figure {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.reference-figure img {
  width: 100%;
  display: block;
}
.reference-figure figcaption {
  padding: var(--space-md);
  font-size: var(--fs-300);
  color: var(--c-text-muted);
  background: var(--c-bg-elevated);
}

/* Über uns / Trust */
.about-grid {
  display: grid;
  gap: var(--space-xl);
}
@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-bg-elevated);
  margin-top: var(--space-md);
  font-size: var(--fs-300);
  text-decoration: none;
  color: var(--c-text);
}
.trust-badge .stars {
  color: var(--c-steel-light);
  letter-spacing: 0.05em;
}

/* Kundenstimmen / Bewertungen */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 46rem;
}
@media (min-width: 720px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.review-card {
  margin: 0;
  padding: var(--space-lg);
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.review-stars {
  color: #ffc857;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  line-height: 1;
}
.review-card blockquote {
  margin: 0;
  font-size: var(--fs-400);
  line-height: 1.6;
  color: var(--c-text);
}
.review-card figcaption {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.review-author {
  font-weight: 600;
  color: var(--c-text);
}
.review-source {
  font-size: var(--fs-300);
  color: var(--c-text-muted);
}
.reviews-cta {
  display: inline-block;
  margin-top: var(--space-lg);
  color: var(--c-steel-light);
  text-decoration: none;
  font-size: var(--fs-300);
}
.reviews-cta:hover {
  text-decoration: underline;
}
.about-facts {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.about-facts li {
  padding-left: 1.4rem;
  position: relative;
  font-size: var(--fs-300);
  color: var(--c-text-muted);
}
.about-facts li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--c-steel-light);
}

/* Kontakt */
.contact-grid {
  display: grid;
  gap: var(--space-xl);
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }
}
.contact-card {
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
}
.contact-card dl {
  margin: var(--space-md) 0 0;
}
.contact-card dt {
  font-size: var(--fs-300);
  color: var(--c-text-muted);
  margin-top: var(--space-sm);
}
.contact-card dd {
  margin: 0 0 var(--space-sm);
  font-size: 1.05rem;
}
.contact-card dd a {
  text-decoration: none;
  color: var(--c-text);
}
.contact-card dd a:hover {
  color: var(--c-steel-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
.form-field {
  margin-bottom: var(--space-md);
}
.form-field label {
  display: block;
  font-size: var(--fs-300);
  margin-bottom: 0.4rem;
  color: var(--c-text-muted);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-400);
}
.form-field textarea {
  min-height: 120px;
  resize: vertical;
}
.form-field input[type="date"] {
  color-scheme: dark;
}
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--c-steel);
  outline-offset: 1px;
}
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-300);
  color: var(--c-text-muted);
}
.form-consent input {
  min-height: 20px;
  min-width: 20px;
  margin-top: 3px;
}
.form-consent a {
  color: var(--c-steel-light);
}
.form-status {
  font-size: var(--fs-300);
  margin-top: var(--space-sm);
  min-height: 1.2em;
}
.form-status.is-error {
  color: #e08a8a;
}
.form-status.is-success {
  color: var(--c-steel-light);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding-block: var(--space-xl);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-lg);
}
.footer-nap {
  font-size: var(--fs-300);
  color: var(--c-text-muted);
}
.footer-nap strong {
  color: var(--c-text);
  display: block;
  margin-bottom: 0.3rem;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  font-size: var(--fs-300);
}
.footer-links a {
  text-decoration: none;
  color: var(--c-text-muted);
}
.footer-links a:hover {
  color: var(--c-text);
}
.footer-bottom {
  margin-top: var(--space-lg);
  font-size: 0.8rem;
  color: var(--c-text-muted);
  opacity: 0.7;
}

/* Reveal-Animation */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s var(--ease-in),
    transform 0.8s var(--ease-in);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Legal-Seiten */
.legal main {
  padding-block: var(--space-2xl);
}
.legal h2 {
  font-size: var(--fs-700);
  margin-top: var(--space-xl);
}
.legal a {
  color: var(--c-steel-light);
}
.legal address {
  font-style: normal;
}
