/* ==========================================================================
   D Resolva – Design-System
   Schwarz/Weiß-Basis passend zum Logo, dezenter Rot-Akzent für CTAs.
   Nur systemeigene Schriftarten (keine externen Font-CDNs) -> DSGVO-schlank.
   ========================================================================== */

:root {
  --bg: #f4f4f5;
  --bg-alt: #e8e8ea;
  --surface: #dedee1;
  --border: rgba(10, 10, 11, 0.08);
  --text: #0a0a0b;
  --text-muted: #0a0a0b;
  --text-faint: #0a0a0b;
  --accent: #820000;
  --accent-hover: #a30000;
  /* Fliessende Abschnitts-Hintergruende: wechseln dezent zwischen leicht
     anthrazit (wie die Navigation) und dem rot-stichigen Ton hinter dem
     Stier, mit sanften Verlaeufen an den Abschnittsgrenzen. */
  --tone-anthra: rgba(35, 37, 42, 0.19);
  --tone-red: rgba(130, 0, 0, 0.035);
  --tone-red-strong: rgba(130, 0, 0, 0.065);
  --max-width: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(
    to bottom,
    var(--tone-anthra) 0%,
    var(--tone-anthra) 4%,
    var(--tone-red) 19%,
    var(--tone-red-strong) 30%,
    var(--tone-anthra) 40%,
    var(--tone-anthra) 50%,
    var(--tone-red) 56%,
    var(--tone-red) 76%,
    var(--tone-anthra) 84%,
    var(--tone-anthra) 100%
  ), var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Partikel-Canvas: fest über die gesamte Seite, wandert nicht mit beim Scrollen.
   Seine Zielformation wird per JS aus der Scroll-Position berechnet. */
#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* berücksichtigt ein-/ausblendende Adressleiste auf Mobilgeräten */
  z-index: 0;
  pointer-events: none;
}

/* Der komplette restliche Seiteninhalt liegt sicher über dem Canvas. */
.page-content {
  position: relative;
  z-index: 1;
}

/* Text bleibt lesbar, auch wenn Partikel dahinter durchscheinen:
   ein enger, dunkler Kern-Schatten sorgt für sofortigen Kontrast,
   ein weicherer äußerer Schatten hebt den Text zusätzlich vom
   Partikel-Hintergrund ab. */
.hero h1,
.hero p.lead,
.section-title,
.section-lead,
.section-eyebrow,
.hero-eyebrow {
  text-shadow:
    0 1px 3px rgba(244, 244, 245, 0.85),
    0 4px 24px rgba(244, 244, 245, 0.65);
}

/* Für Vorkommen innerhalb von .section-eyebrow (das per se GROSSGESCHRIEBEN
   ist, z.B. "LEISTUNGEN", "ABLAUF") - hebt die Transformation nur für den
   eingebetteten Markennamen "D Resolva" wieder auf. */
.eyebrow-brand {
  text-transform: none;
}

/* "Über D Resolva" etwas grösser als die übrigen Eyebrows (Leistungen,
   Ablauf, Kontakt), die bei ihrer Standardgrösse bleiben. Kombinierter
   Selektor nötig, damit die Regel die spätere .section-eyebrow-Regel
   (gleiche Spezifität, aber weiter unten in der Datei) sicher überstimmt. */
.section-eyebrow.eyebrow-about {
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(211, 211, 213, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 18px;
}

.brand img {
  /* Logo-Datei ist jetzt direkt in Schwarz angelegt (kein Invert-Filter
     mehr nötig) - Transparenz bleibt erhalten. */
  height: 22px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
}

.nav-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 9px 20px;
  border: 1px solid var(--text);
  border-radius: 999px;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--text);
  color: var(--bg);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

/* ---------- Hero ---------- */

/* Eigener, dedizierter Abschnitt ganz oben: der Partikel-Canvas liegt fest
   im Hintergrund (siehe #particle-canvas weiter oben), hier nur der Rahmen. */
.intro {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-label {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 13px;
  letter-spacing: 0.32em;
  /* Enthält ausschließlich den Markennamen "D Resolva" - bewusst nicht
     uppercase, damit die Groß-/Kleinschreibung überall gleich aussieht. */
  color: var(--text-faint);
  pointer-events: none;
}

/* Text-Hero: eigener Abschnitt direkt darunter */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 120px;
  /* Leicht durchscheinend statt komplett blickdicht: die Partikel (inkl.
     der Augen-Form dahinter) bleiben sichtbar dahinter. */
  background: radial-gradient(ellipse 70% 65% at 50% 50%,
    rgba(244, 244, 245, 0.55) 0%,
    rgba(244, 244, 245, 0.4) 45%,
    rgba(244, 244, 245, 0.12) 75%,
    rgba(244, 244, 245, 0) 100%);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
  max-width: 760px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 34px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  pointer-events: auto;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), var(--accent)); }

.btn-secondary {
  background: transparent;
  border-color: rgba(10,10,11,0.25);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--text); }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  z-index: 2;
}

.scroll-arrow {
  font-size: 16px;
  line-height: 1;
  animation: scrollArrowBounce 1.8s ease-in-out infinite;
}

@keyframes scrollArrowBounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* ---------- Section basics ---------- */

section { position: relative; padding: 120px 0; }

.section-eyebrow {
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 20px;
  max-width: 640px;
}

.section-lead {
  color: var(--text-muted);
  max-width: 620px;
  font-size: 1.05rem;
  margin-bottom: 56px;
}

/* Leistungen-Lead soll auf Desktop-Breite in einer Zeile stehen statt
   umzubrechen - dafür keine Breitenbegrenzung und etwas kleinere Schrift
   (gleiche Groesse wie der Fliesstext in den Karten darunter). Auf
   schmaleren Bildschirmen (Tablet/Mobile) bricht er trotzdem ganz normal
   um, da hier bewusst kein white-space: nowrap gesetzt ist. */
#leistungen .section-lead {
  max-width: none;
  font-size: 0.95rem;
}

/* fade-in-on-scroll utility */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Leistungen ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.services-more {
  margin-top: 28px;
}

.services-more a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.services-more a:hover { text-decoration: underline; }

.pricing-note {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 760px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pricing-note strong {
  color: var(--text);
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 30px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(130, 0, 0, 0.4);
}

.service-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(130, 0, 0, 0.12);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  font-size: 20px;
  animation: service-icon-glow 2.6s ease-in-out infinite;
}

@keyframes service-icon-glow {
  0%, 100% {
    background: rgba(130, 0, 0, 0.12);
    box-shadow: 0 0 0 rgba(130, 0, 0, 0);
  }
  50% {
    background: rgba(130, 0, 0, 0.32);
    box-shadow: 0 0 16px 3px rgba(130, 0, 0, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-icon,
  .process-step .step-index {
    animation: none;
  }
}

.service-card h3 {
  font-size: 1.2rem;
  margin: 0 0 12px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Über uns ---------- */

.about {
  background: transparent;
}

.about-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.about-text .section-lead {
  margin-left: auto;
  margin-right: auto;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-visual {
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 40%, rgba(130,0,0,0.14), transparent 60%), var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.about-visual img { width: 70%; }

/* ---------- Prozess ---------- */

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.process-step {
  border-top: 2px solid var(--border);
  padding-top: 20px;
}

/* Prozessschritte blenden einzeln nacheinander ein statt gleichzeitig */
.process-step.reveal:nth-child(1) { transition-delay: 0s; }
.process-step.reveal:nth-child(2) { transition-delay: 0.15s; }
.process-step.reveal:nth-child(3) { transition-delay: 0.3s; }
.process-step.reveal:nth-child(4) { transition-delay: 0.45s; }

.process-step .step-index {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
  /* inline-block statt block: die nachfolgende Überschrift ist block-level
     und erzwingt ohnehin einen Zeilenumbruch - so bleibt die Bounding-Box
     eng um die Ziffern ("01" etc.), was der Partikel-Fortschrittsring in
     particles.js für eine präzise Zentrierung braucht. */
  display: inline-block;
  animation: step-index-glow 3.2s ease-in-out infinite;
}

/* Die vier Nummern leuchten der Reihe nach (01 -> 02 -> 03 -> 04) kurz rot auf,
   nicht gleichzeitig - je 0.8s versetzt, danach beginnt der Zyklus von vorn. */
.process-step:nth-child(1) .step-index { animation-delay: 0s; }
.process-step:nth-child(2) .step-index { animation-delay: 0.8s; }
.process-step:nth-child(3) .step-index { animation-delay: 1.6s; }
.process-step:nth-child(4) .step-index { animation-delay: 2.4s; }

@keyframes step-index-glow {
  0%, 100% {
    color: var(--accent);
    text-shadow: none;
  }
  10% {
    color: var(--accent-hover);
    text-shadow: 0 0 10px rgba(130, 0, 0, 0.65);
  }
  25% {
    color: var(--accent);
    text-shadow: none;
  }
}

.process-step h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.process-step p {
  color: var(--text);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Kontakt ---------- */

.contact {
  background: transparent;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info-item {
  margin-bottom: 24px;
}

.contact-info-item .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.contact-info-item a,
.contact-info-item span {
  font-size: 1.05rem;
}

/* Honeypot-Feld gegen Spam-Bots: fuer Menschen unsichtbar, aber im DOM
   vorhanden (display:none wird von manchen Bots erkannt und ignoriert). */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.topic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.topic-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.topic-option.is-checked {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(130, 0, 0, 0.14);
}

.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-consent input { margin-top: 4px; }

.form-consent a { color: var(--text); text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ---------- Leistungen im Detail ---------- */

.service-detail {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.service-detail-icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(130, 0, 0, 0.12);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.service-detail h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: var(--text);
}

.service-detail h3 {
  font-size: 0.92rem;
  margin: 18px 0 6px;
  color: var(--text);
}

.service-detail ul {
  margin: 0 0 4px;
  padding-left: 20px;
}

.service-detail-cta {
  margin-top: 48px;
}

@media (max-width: 640px) {
  .service-detail { flex-direction: column; }
}

/* ---------- Legal pages (Impressum / Datenschutz) ---------- */

.legal-page {
  padding: 160px 0 100px;
  max-width: 780px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin: 40px 0 12px;
}

.legal-page p, .legal-page li {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.legal-page .placeholder {
  color: var(--accent);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  /* Aufgeklapptes mobiles Menü: zeigt alle Links, die sonst ausgeblendet sind. */
  .site-header.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 20px 24px 28px;
    gap: 18px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(10, 10, 11, 0.12);
  }

  .services-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  section { padding: 84px 0; }
}
