/* ==========================================================================
   Dielmann Systems – Stylesheet
   Markenfarben: #14171C (Dunkel), #F6F5F2 (Hell), #2F6BFF (Akzent)
   ========================================================================== */

/* --- Schriften (lokal gehostet, SIL Open Font License, siehe assets/fonts/OFL.txt) --- */
@font-face {
  font-family: "Red Hat Display";
  src: url("../assets/fonts/RedHatDisplay-VF.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Text";
  src: url("../assets/fonts/RedHatText-VF.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --- */
:root {
  --ink: #14171C;
  --paper: #F6F5F2;
  --accent: #2F6BFF;

  /* Abstufungen der Markenfarben */
  --ink-soft: #4B5059;        /* Sekundärtext, Kontrast auf --paper ca. 7.5:1 */
  --ink-faint: #8A8E95;       /* nur für Dekor, nicht für Text */
  --line: #DCD9D2;
  --surface: #ECEAE5;         /* leicht abgesetzte Flächen */
  --accent-strong: #2459E0;   /* Akzent für Text und Buttons (Kontrast ≥ 4.5:1) */
  --accent-stronger: #1C47B8;
  --on-ink-soft: #A9ADB4;     /* Sekundärtext auf dunkler Fläche */
  --ink-line: #2C3038;

  --font-display: "Red Hat Display", "Segoe UI", system-ui, sans-serif;
  --font-text: "Red Hat Text", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  --step-3: clamp(1.875rem, 1.2rem + 2.4vw, 2.875rem);
  --step-4: clamp(2.375rem, 1.3rem + 4vw, 4.25rem);

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 74rem;
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 6px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); font-weight: 650; line-height: 1.1; letter-spacing: -0.018em; }
h3 { font-size: var(--step-1); font-weight: 650; line-height: 1.3; letter-spacing: -0.005em; }
h4 { font-size: var(--step-0); font-weight: 650; line-height: 1.35; }

p { margin: 0; }
p + p { margin-top: 1em; }

a { color: var(--accent-strong); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-stronger); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { top: 0.75rem; color: var(--paper); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  background: var(--accent-strong);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  text-decoration: none;
  border: 0;
}
.button:hover { background: var(--accent-stronger); color: var(--paper); }
.button--quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.button--quiet:hover { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand { display: block; color: var(--ink); text-decoration: none; }
.brand svg { height: 3rem; width: auto; }
.brand:hover { color: var(--ink); }

.nav-toggle { display: none; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--step--1);
}
.site-nav a:hover { color: var(--accent-strong); }
.site-nav .button { color: var(--paper); padding: 0.6rem 1rem; font-size: var(--step--1); }
.site-nav .button:hover { color: var(--paper); }

/* Mobile Navigation (nur wenn JS aktiv, sonst bleibt die Liste sichtbar) */
@media (max-width: 52rem) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1.5px solid var(--ink);
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font: 600 var(--step--1) var(--font-display);
    color: var(--ink);
    cursor: pointer;
  }
  .nav-toggle-icon { width: 1rem; height: 0.75rem; position: relative; }
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: currentColor;
  }
  .nav-toggle-icon::before { top: 1px; }
  .nav-toggle-icon::after { bottom: 1px; }

  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-bottom: 1rem;
  }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 0.85rem 0; font-size: var(--step-0); }
  .site-nav .button { display: flex; margin-top: 0.75rem; justify-content: center; padding: 0.85rem 1rem; }
  .site-nav li:last-child { border-top: 0; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 8vw, 6rem); }

.hero h1 { max-width: 20ch; }

.hero-intro {
  display: grid;
  gap: 2rem 4rem;
  margin-top: 2rem;
  align-items: end;
}
@media (min-width: 60rem) {
  .hero-intro { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.hero-lead {
  max-width: 38rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.hero-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.hero-note::before {
  content: "";
  width: 0.55rem; height: 0.55rem;
  border-radius: 1px;
  background: var(--accent);
  flex: none;
}

/* ==========================================================================
   Allgemeine Sektionen
   ========================================================================== */
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p {
  margin-top: 1.25rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* --- Problem → Lösung --- */
.compare { list-style: none; margin: 0; padding: 0; }
.compare-head,
.compare li {
  display: grid;
  gap: 0.5rem 3rem;
}
@media (min-width: 48rem) {
  .compare-head, .compare li { grid-template-columns: 1fr 1fr; }
}
.compare-head {
  font: 600 var(--step--1)/1.4 var(--font-display);
  color: var(--ink-soft);
  padding-bottom: 0.9rem;
  border-bottom: 1.5px solid var(--ink);
}
.compare-head span:last-child { color: var(--ink); }
@media (max-width: 47.99rem) { .compare-head { display: none; } }

.compare li {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.compare li p { margin: 0; }
.compare-before { color: var(--ink-soft); }
.compare-after {
  position: relative;
  padding-left: 1.4rem;
  font-weight: 500;
}
.compare-after::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem; height: 0.55rem;
  border-radius: 1px;
  background: var(--accent);
}
@media (max-width: 47.99rem) {
  .compare-before::before { content: "Heute: "; font-weight: 600; color: var(--ink-soft); }
}

/* --- Funktionen --- */
.features { display: grid; gap: 0; }
.feature-group {
  display: grid;
  gap: 1.5rem 3rem;
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1.5px solid var(--ink);
}
@media (min-width: 56rem) {
  .feature-group { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
}
.feature-group > h3 { font-size: var(--step-2); font-weight: 650; line-height: 1.2; }
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 2.5rem;
}
@media (min-width: 36rem) {
  .feature-list { grid-template-columns: 1fr 1fr; }
}
.feature-list p { margin-top: 0.4rem; color: var(--ink-soft); }

/* --- Mockup --- */
.mockup {
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1.5px solid var(--ink);
}
.mockup-bar .mockup-address {
  flex: 1;
  max-width: 22rem;
  height: 1.6rem;
  display: flex;
  align-items: center;
  padding-inline: 0.75rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
}
.mockup-bar svg { width: 1.25rem; height: 1.25rem; flex: none; }
.mockup-image {
  width: 100%;
  height: auto;
  background: var(--ink); /* Grundfarbe des Dashboards, solange das Bild lädt */
}
.mockup figcaption {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* --- Ablauf (dunkle Fläche) --- */
.section--dark {
  background: var(--ink);
  color: var(--paper);
}
.section--dark h2,
.section--dark h3 { color: var(--paper); }
.section--dark .section-head p { color: var(--on-ink-soft); }
.section + .section--dark, .section--dark + .section { border-top: 0; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.5rem 2rem;
  counter-reset: step;
}
@media (min-width: 40rem) { .steps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(4, 1fr); } }

.steps li {
  counter-increment: step;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-line);
  position: relative;
}
.steps li::before {
  content: counter(step);
  display: block;
  font: 300 clamp(2.75rem, 2rem + 2.5vw, 3.75rem)/1 var(--font-display);
  color: var(--paper);
  margin-bottom: 1.25rem;
}
.steps li::after {
  /* Markierung auf der Linie – wie das Quadrat im Logo */
  content: "";
  position: absolute;
  top: -0.3125rem;
  left: 0;
  width: 0.625rem; height: 0.625rem;
  border-radius: 1px;
  background: var(--accent);
}
.steps p { margin-top: 0.6rem; color: var(--on-ink-soft); }

/* --- Weitere Leistungen --- */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 3rem;
}
@media (min-width: 48rem) { .services { grid-template-columns: 1fr 1fr; } }
.services li {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.services p { margin-top: 0.3rem; color: var(--ink-soft); }

/* --- Kontakt --- */
.contact {
  display: grid;
  gap: 2.5rem 3rem;
  align-items: end;
}
@media (min-width: 56rem) {
  .contact { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.contact h2 { max-width: 16ch; }
.contact-lead { margin-top: 1.25rem; font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 34rem; }
.contact-actions { margin-top: 2rem; }

.contact-details { margin: 0; display: grid; gap: 1.25rem; }
.contact-details div { padding-top: 1rem; border-top: 1px solid var(--line); }
.contact-details dt { font-size: var(--step--1); color: var(--ink-soft); }
.contact-details dd { margin: 0.2rem 0 0; font: 600 var(--step-1)/1.35 var(--font-display); }
.contact-details a { color: var(--ink); }
.contact-details a:hover { color: var(--accent-strong); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
}
.site-footer ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--accent-strong); }

/* ==========================================================================
   Rechtstexte (Impressum, Datenschutz)
   ========================================================================== */
.legal { padding-block: clamp(3rem, 7vw, 5.5rem) var(--section); }
.legal .wrap > * { max-width: 44rem; }
.legal h1 { font-size: var(--step-3); margin-bottom: 2.5rem; }
.legal h2 { font-size: var(--step-1); margin: 2.5rem 0 0.6rem; letter-spacing: 0; }
.legal address { font-style: normal; }
.legal p + address { margin-top: 1em; }
