/* ==========================================================================
   RuhrRanking – zentrales Stylesheet
   --------------------------------------------------------------------------
   Statische Website, kein Build-Prozess. Alle Farben und Schriften sind als
   CSS-Variablen in :root definiert und können dort zentral geändert werden.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design-Tokens (Farben, Schriften, Abstände)
   -------------------------------------------------------------------------- */
:root {
  /* Farben */
  --color-bg: #FFFFFF;          /* Standard-Hintergrund */
  --color-bg-alt: #F7F5F2;      /* Alternativer Sektions-Hintergrund (warmes Grau) */
  --color-text: #1F2937;        /* Fließtext, Anthrazit */
  --color-text-muted: #4B5563;  /* Sekundärtext (erfüllt WCAG AA auf beiden Hintergründen) */
  --color-accent: #D9642C;      /* Markenorange – für große Elemente, Icons, Ränder */
  --color-accent-dark: #B04E1F; /* Dunkleres Orange – für Textlinks und Button-Flächen,
                                   damit der Kontrast WCAG AA erfüllt (≥ 4,5:1) */
  --color-accent-darker: #9A431A; /* Hover-Zustand für Buttons */
  --color-border: #E5E1DB;      /* Feine Linien, Kartenränder */
  --color-footer-bg: #1F2937;   /* Dunkler Footer */
  --color-footer-text: #E5E7EB; /* Heller Text im Footer */

  /* Typografie */
  --font-heading: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --container-max: 72rem;       /* 1152px */
  --container-narrow: 46rem;    /* 736px – für lange Textseiten */
  --radius: 8px;
  --radius-small: 4px;
  --shadow-card: 0 2px 12px rgba(31, 41, 55, 0.06);
  --shadow-card-hover: 0 6px 24px rgba(31, 41, 55, 0.10);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

/* Überschriften: Serifenschrift, ruhige Laufweite */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
  color: var(--color-text);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.125rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

a {
  color: var(--color-accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-accent-darker);
}

/* Deutlich sichtbarer Fokusring für Tastaturnutzung */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   3. Layout-Helfer
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-intro {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-intro p {
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.75rem;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

/* Sprunglink für Screenreader-/Tastaturnutzer */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-small) 0;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-small);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background-color: var(--color-accent-dark);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-accent-darker);
  color: #FFFFFF;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn-secondary:hover {
  background-color: var(--color-text);
  color: #FFFFFF;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.0625rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   5. Header und Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

/* Wortmarke */
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo:hover {
  color: var(--color-text);
}

.logo span {
  color: var(--color-accent-dark);
}

/* Hamburger-Button (nur mobil sichtbar) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-list a:not(.btn) {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.nav-list a:not(.btn):hover {
  color: var(--color-accent-dark);
}

/* Aktive Seite */
.nav-list a[aria-current="page"]:not(.btn) {
  color: var(--color-accent-dark);
  border-bottom-color: var(--color-accent);
}

.nav-cta {
  padding: 0.55rem 1.1rem;
  font-size: 0.9375rem;
}

/* Mobile Navigation */
@media (max-width: 51.99rem) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-card-hover);
    padding: 0.5rem 1.25rem 1.25rem;
  }

  .nav-open .nav-list {
    display: flex;
  }

  .nav-list li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-list li:last-child {
    border-bottom: none;
    padding-top: 1rem;
  }

  .nav-list a:not(.btn) {
    display: block;
    padding: 0.85rem 0;
    border-bottom: none;
  }

  .nav-list a[aria-current="page"]:not(.btn) {
    border-bottom: none;
  }

  .nav-cta {
    display: block;
    text-align: center;
  }
}

@media (min-width: 52rem) {
  .nav-toggle {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   6. Hero-Bereich
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--color-bg-alt);
  padding: 4.5rem 0 4rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 52rem) {
  .hero-grid {
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
  }
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 36rem;
  margin-bottom: 1.75rem;
}

.hero-note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.9rem;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 22rem;
}

/* --------------------------------------------------------------------------
   7. Karten (Pakete, Referenzen, Vorteile)
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 40rem) {
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 60rem) {
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-bottom: 0.35em;
}

.card-tagline {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.1rem;
}

/* Hervorgehobenes Paket */
.card-featured {
  border-top: 4px solid var(--color-accent);
}

.card-badge {
  display: inline-block;
  align-self: flex-start;
  background-color: var(--color-bg-alt);
  color: var(--color-accent-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-small);
  margin-bottom: 0.9rem;
}

/* Häkchen-Liste in Paketen */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.check-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.55rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.05rem;
  height: 1.05rem;
  background-color: var(--color-accent);
  /* Häkchen-Symbol als Maske, färbt sich über background-color */
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') no-repeat center / contain;
}

/* Preisangabe in Paketkarten */
.card-price {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.card-price strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   8. Ablauf in Schritten
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 40rem) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 60rem) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

.step {
  counter-increment: step;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--color-bg);
  border: 2px solid var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4em;
}

.step p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   9. FAQ (details/summary)
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: var(--container-narrow);
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-bg);
  margin-bottom: 0.85rem;
}

.faq-item summary {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  cursor: pointer;
  position: relative;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Plus/Minus-Indikator */
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-accent-dark);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-answer {
  padding: 0 1.25rem 1.2rem;
  color: var(--color-text-muted);
}

.faq-item .faq-answer p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   10. CTA-Band
   -------------------------------------------------------------------------- */
.cta-band {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 4rem 0;
  text-align: center;
}

.cta-band h2 {
  color: #FFFFFF;
}

.cta-band p {
  color: var(--color-footer-text);
  max-width: 38rem;
  margin: 0 auto 1.75rem;
}

.cta-band .btn-primary {
  background-color: var(--color-accent);
  /* Auf dunklem Grund reicht das hellere Orange für den Kontrast */
  color: #FFFFFF;
}

.cta-band .btn-primary:hover {
  background-color: var(--color-accent-dark);
}

/* --------------------------------------------------------------------------
   11. Platzhalter für Bilder
   -------------------------------------------------------------------------- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-alt);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  text-align: center;
  padding: 1rem;
}

.img-placeholder-portrait {
  aspect-ratio: 3 / 4;
  max-width: 20rem;
}

/* --------------------------------------------------------------------------
   12. Formulare
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40rem) {
  .form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9375rem;
}

.form-field .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid #9CA3AF;
  border-radius: var(--radius-small);
  padding: 0.7rem 0.85rem;
  width: 100%;
}

input:focus,
textarea:focus {
  border-color: var(--color-accent-dark);
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

.form-consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.form-consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--color-accent-dark);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   13. Kontakt-Alternativen (E-Mail / WhatsApp)
   -------------------------------------------------------------------------- */
.contact-options {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 40rem) {
  .contact-options {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-option {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background-color: var(--color-bg);
}

.contact-option h3 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-option svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent-dark);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   14. Referenzen-Hinweis
   -------------------------------------------------------------------------- */
.notice {
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.4rem;
  margin-bottom: 2.5rem;
  max-width: var(--container-narrow);
}

.notice p {
  margin: 0;
  font-size: 0.9375rem;
}

.case-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.case-section {
  margin-bottom: 0.9rem;
}

.case-section:last-child {
  margin-bottom: 0;
}

.case-section p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   15. Textseiten (Impressum, Datenschutz, Über mich)
   -------------------------------------------------------------------------- */
.prose h2 {
  margin-top: 2.2em;
  font-size: 1.5rem;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.2rem;
}

/* Deutlich markierte Platzhalter, die vor dem Livegang ersetzt werden müssen */
.placeholder-value {
  background-color: #FDF0E7;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-small);
  padding: 0 0.3em;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 3.5rem 0 0;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 52rem) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
  }
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
}

.footer-logo span {
  color: var(--color-accent);
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.site-footer p {
  color: var(--color-footer-text);
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--color-footer-text);
  text-decoration: none;
}

.site-footer a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(229, 231, 235, 0.2);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.875rem;
}

.footer-bottom ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}
