/* ==========================================================================
   Harm Engineering — Stylesheet
   Akzentfarbe #b22222 = exakter Rot-Ton aus dem Logo.
   ========================================================================== */

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-alt: #f4f4f6;
  --color-text: #17181c;
  --color-text-muted: #686c74;
  --color-primary: #131418;
  --color-primary-dark: #0a0a0d;
  --color-primary-light: #26272e;
  --color-accent: #b22222;
  --color-accent-dark: #8f1b1b;
  --color-accent-light: #d64545;
  --color-border: #e6e7ea;
  --color-success: #2f7d4f;
  --color-error: #b3261e;

  --font-heading: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  --max-width: 1160px;
  --radius: 4px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 13, 0.05);
  --shadow-md: 0 12px 28px rgba(10, 10, 13, 0.10);
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--color-primary);
  text-decoration: none;
  text-underline-offset: 3px;
}

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

section p a,
.contact-list a {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}
section p a:hover,
.contact-list a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  font-weight: 700;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

ul { margin: 0 0 1em; padding-left: 0; list-style: none; }
ul li {
  position: relative;
  padding-left: 1.3em;
  margin-bottom: 0.35em;
}
ul li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
  font-family: var(--font-heading);
}

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

section {
  padding: 72px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--color-accent);
  flex-shrink: 0;
}
.eyebrow-on-dark {
  color: var(--color-accent-light);
}
.eyebrow-on-dark::before {
  background: var(--color-accent-light);
}

/* ---- Profile ----
   Text links, Foto rechts daneben; auf schmalen Screens rutscht das Foto
   automatisch unter den Text (Reihenfolge im Markup: Text, dann Bild). */
.profile-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 8px;
}
.profile-text { flex: 1; min-width: 0; }
.profile-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .profile-layout { flex-direction: column; }
  .profile-photo { width: 100%; max-width: 280px; height: auto; aspect-ratio: 1; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: #fff;
}

.btn-secondary {
  background: var(--color-primary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--color-primary-light);
  color: #fff;
}

/* ---- Header / Nav ---- */
.site-header {
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--color-text); }

.brand-logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-name-full { display: block; }
.brand-name-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.main-nav ul li { padding-left: 0; margin-bottom: 0; }
.main-nav ul li::before { content: none; }

.main-nav a {
  display: inline-block;
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow: inset 0 -2px 0 0 transparent;
  transition: color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.main-nav a:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.main-nav a.active {
  color: var(--color-text);
  box-shadow: inset 0 -2px 0 0 var(--color-accent);
}

/* ---- Hero ---- */
.hero,
.page-hero {
  background:
    radial-gradient(560px circle at 88% -12%, rgba(178, 34, 34, 0.28), transparent 60%),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
}

.hero { padding: 100px 0; }
.page-hero { padding: 68px 0; }

.hero h1,
.page-hero h1 { color: #fff; }
.page-hero h1 { margin-bottom: 0.3em; }

.hero-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
}
.page-hero p { color: rgba(255, 255, 255, 0.72); max-width: 640px; margin: 0; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ---- Cards / Grid ---- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Zweispaltige Karten-/Listen-Raster, die auf Tablet-Breiten (z. B. iPad Hochformat)
   noch zweispaltig bleiben sollen statt wie .grid-2 schon bei 860px umzubrechen. */
.grid-cards { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  color: var(--color-accent);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-row strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--color-accent);
}
.stat-row span {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
input, textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--color-text);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 140px; }

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-weight: 500;
}
.alert-success { background: #e6f4ea; color: var(--color-success); border: 1px solid #bfe3cc; }
.alert-error { background: #fbeae9; color: var(--color-error); border: 1px solid #f2c6c3; }

/* ---- Contact info list ---- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 10px;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list li::before { content: none; }
.contact-list strong { min-width: 110px; display: inline-block; color: var(--color-primary-dark); }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 48px 0 24px;
  margin-top: 72px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.site-footer a { color: rgba(255, 255, 255, 0.75); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; padding-left: 0; }
.site-footer li::before { content: none; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.section-head {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: 1fr; gap: 16px; }
}

/* Footer und Karten-Raster nutzen die Breite auf Tablets (z. B. iPad Hochformat,
   768px) noch aus und brechen erst auf Handy-Breite um. */
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

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

  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 10px 0 16px;
  }
  .main-nav a { display: block; }

  .nav-wrap { flex-wrap: wrap; }

  section { padding: 52px 0; }
  .hero { padding: 64px 0; }
}
