/* ============================================================
   DSR Automation – Stylesheet
   Farbwelt: Dunkles Stahlblau + Bernstein-Akzent (industriell)
   ============================================================ */

:root {
  /* Markenfarben aus dem DSR-Logo */
  --ink: #203958;          /* Navy aus den Logo-Würfeln (Header/Hero) */
  --ink-2: #2a4a72;        /* etwas heller für Karten auf dunkel */
  --accent: #3f72af;       /* Logo-Blau (Banner) */
  --accent-dark: #33619a;
  --accent-light: #8fb4e3; /* Akzenttext auf dunklem Grund */
  --text: #334155;
  --heading: #1b3049;
  --muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --line: #e2e8f0;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(32, 57, 88, 0.08);
  --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { color: var(--heading); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.6em; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 0.9em;
}

.accent { color: var(--accent); }

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { max-width: 640px; margin-bottom: 48px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4d82c2; }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.35); color: #fff; }
.btn-ghost:hover { border-color: var(--accent-light); color: var(--accent-light); }
.btn-big { padding: 18px 40px; font-size: 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(32, 57, 88, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 4px;
}
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--accent-light); }
.nav-cta {
  border: 1.5px solid var(--accent-light);
  padding: 8px 18px;
  border-radius: 8px;
  color: #fff !important;
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.25s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, #182c46 0%, var(--ink) 55%, #2a4a72 100%);
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 20%, black 30%, transparent 75%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding-top: 96px;
  padding-bottom: 72px;
}
.hero h1 { color: #fff; margin: 0.3em 0 0.5em; }
.hero .eyebrow { color: var(--accent-light); }
.hero .accent { color: var(--accent-light); }
.hero-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
  max-width: 520px;
  margin-bottom: 2em;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 56px;
}
.stat {
  border-left: 3px solid var(--accent-light);
  padding-left: 16px;
}
.stat strong { display: block; font-size: 1.5rem; color: #fff; }
.stat span { color: rgba(255, 255, 255, 0.65); font-size: 0.88rem; }

/* ---------- Bild-Platzhalter (bis echte Fotos da sind) ---------- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(120, 140, 165, 0.5);
  border-radius: var(--radius);
  background: rgba(120, 140, 165, 0.08);
  color: var(--muted);
  min-height: 220px;
  font-size: 0.9rem;
  padding: 16px;
}
.img-placeholder small { opacity: 0.7; }
.img-hero { min-height: 340px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.25); }
.img-portrait { min-height: 420px; }

/* ---------- Echte Fotos ---------- */
.photo {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}
.photo-hero { height: 460px; border: 1px solid rgba(255, 255, 255, 0.18); }
.industry .photo { height: 220px; margin-bottom: 18px; }
.photo-portrait { height: 460px; }

/* ---------- Leistungen (Cards) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--ink), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.card p { font-size: 0.96rem; }

/* ---------- Dunkle Sektionen ---------- */
.section-dark {
  background: linear-gradient(160deg, var(--ink) 0%, #182c46 100%);
  color: rgba(255, 255, 255, 0.85);
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--accent-light); }

/* ---------- Arbeitsweise (Steps) ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.step-num {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.step p { font-size: 0.94rem; color: rgba(255, 255, 255, 0.75); }

/* ---------- Branchen ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.industry .img-placeholder { margin-bottom: 18px; min-height: 200px; }
.industry p { font-size: 0.95rem; }
.reference-note {
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

/* ---------- Über uns ---------- */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.about-text p { margin-bottom: 1em; }
.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.badges li {
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
}

/* ---------- Werdegang (Timeline) ---------- */
.timeline {
  list-style: none;
  margin-top: 40px;
  border-left: 2px solid var(--line);
  padding-left: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 28px 32px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline .t-year {
  display: block;
  font-weight: 700;
  color: var(--accent-dark);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.timeline h3 { margin-bottom: 0.2em; font-size: 1.05rem; }
.timeline p { font-size: 0.95rem; color: var(--muted); }

/* ---------- Zertifikate ---------- */
.certs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.cert {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.cert h3 { font-size: 1rem; margin-bottom: 0.3em; }
.cert p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Software & HMI (Screenshot-Showcase) ---------- */
.showcase {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: start;
}
.showcase figure { margin: 0; }
.showcase-side { display: grid; gap: 24px; }
.showcase .photo { height: auto; }
.section-dark .photo { border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.section-dark figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}
.duo-flat { margin-bottom: 40px; }
.duo-flat .photo { height: auto; object-fit: unset; background: none; border-color: rgba(255, 255, 255, 0.15); }
.banner-fig { margin: 0; }
.banner-fig .photo { height: auto; }
.banner-fig figcaption { text-align: center; }
.twin-fig { margin-top: 48px; }

/* ---------- Schaltplan-Banner + Detail-Trio (helle Sektion) ---------- */
.plan-fig { margin-bottom: 40px; }
.plan-fig .photo { border: 1px solid var(--line); background: #fff; }
.plan-fig figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.trio figure { margin: 0; }
.trio .photo { height: 240px; }
.trio figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--muted); text-align: center; }

/* ---------- Plan/Realität-Gegenüberstellung ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.duo figure { margin: 0; }
.duo + .duo { margin-top: 32px; }
.duo .photo { height: 380px; background: #fff; object-fit: contain; border: 1px solid var(--line); }
.duo figure:last-child .photo { object-fit: cover; }
.duo figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- Kontakt ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.contact-details { margin-top: 28px; }
.contact-details p { margin-bottom: 10px; }
.contact-details a { color: var(--accent-light); text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-cta { text-align: center; }
.contact-hint {
  margin-top: 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0a1420;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-left: 22px;
}
.site-footer a:hover { color: var(--accent-light); }

/* ---------- Rechtstexte (Impressum/Datenschutz) ---------- */
.legal { max-width: 780px; }
.legal h1 { font-size: 2rem; margin-bottom: 1em; }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; }
.legal p, .legal ul { margin-bottom: 1em; }
.legal ul { padding-left: 1.3em; }
.legal .todo {
  background: #fef3c7;
  border-left: 4px solid var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
}
.back-link { display: inline-block; margin-bottom: 32px; color: var(--accent-dark); text-decoration: none; font-weight: 600; }
.back-link:hover { text-decoration: underline; }

/* ---------- Scroll-Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .cards, .industry-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .about, .contact, .duo, .certs, .showcase, .trio { grid-template-columns: 1fr; gap: 36px; }
  .img-portrait { min-height: 320px; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .cards, .industry-grid, .steps { grid-template-columns: 1fr; }

  .main-nav {
    position: fixed;
    top: 68px;
    right: 0;
    left: 0;
    flex-direction: column;
    background: var(--ink);
    padding: 24px;
    gap: 18px;
    transform: translateY(-130%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .main-nav.open { transform: translateY(0); }
  .nav-toggle { display: block; }
}
