/* ===========================
   Hemkendreis Engineering
   Clean, Swiss-precision design
   =========================== */

:root {
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-primary: #2c3e50;
  --color-accent: #3a7ca5;
  --color-accent-light: #e8f2f8;
  --color-border: #e0ddd8;
  --color-hero-bg: #1e2a38;
  --color-hero-text: #f0f0ee;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --container-max: 1080px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius: 6px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); }

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

/* ---- Navigation ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.nav__logo span {
  font-weight: 400;
  color: var(--color-text-muted);
  margin-left: 0.2em;
}

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

.nav__menu {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav__menu a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 110;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
  position: absolute;
  left: 0;
}

.nav__toggle span:nth-child(1) { top: 2px; }
.nav__toggle span:nth-child(2) { top: 11px; }
.nav__toggle span:nth-child(3) { top: 20px; }

.nav__toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: calc(64px + var(--space-xl)) 0 var(--space-xl);
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero__content {
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

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

.hero__subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: rgba(240, 240, 238, 0.75);
  margin-bottom: var(--space-md);
  max-width: 520px;
}

.hero__decoration {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(58, 124, 165, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-main);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

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

.btn--primary:hover {
  background: #2e6a8e;
  color: #fff;
  transform: translateY(-1px);
}

/* ---- Sections ---- */
.section {
  padding: var(--space-xl) 0;
}

.section__title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  position: relative;
}

.section__title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  margin-top: var(--space-sm);
  border-radius: 2px;
}

/* ---- Services Grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- About ---- */
.ueber-mich {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-content {
  max-width: 600px;
}

.about-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.about-lead {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

.credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.credential {
  display: flex;
  flex-direction: column;
}

.credential dt {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

.credential dd {
  font-size: 1rem;
  font-weight: 600;
}

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

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.contact-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.contact-list a,
.contact-list .phone-number {
  font-size: 0.95rem;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-main);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition);
  outline: none;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: var(--space-xs);
}

/* Form feedback */
.form-success,
.form-error {
  padding: var(--space-sm);
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}

.form-success {
  background: #e8f5e9;
  color: #2e7d32;
}

.form-error {
  background: #fce4ec;
  color: #c62828;
}

.form-success.visible,
.form-error.visible {
  display: block;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--color-hero-bg);
  color: rgba(240, 240, 238, 0.7);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.site-footer h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(240, 240, 238, 0.5);
  margin-bottom: var(--space-sm);
}

.footer-impressum p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}

.site-footer a {
  color: rgba(240, 240, 238, 0.85);
}

.site-footer a:hover {
  color: #fff;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(240, 240, 238, 0.1);
  padding-top: var(--space-md);
  font-size: 0.8rem;
  color: rgba(240, 240, 238, 0.35);
}

/* ---- Scroll Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    padding: 80px var(--space-md) var(--space-md);
    gap: var(--space-sm);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  }

  .nav__menu.open {
    transform: translateX(0);
  }

  .nav__menu a {
    font-size: 1.1rem;
    padding: var(--space-xs) 0;
    display: block;
  }

  .hero {
    min-height: 60vh;
    padding-top: calc(64px + var(--space-lg));
  }

  .hero__title {
    font-size: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .section {
    padding: var(--space-lg) 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .hero__subtitle {
    font-size: 1rem;
  }

  .credentials {
    flex-direction: column;
  }
}
