/* ==========================================================================
   Ingenieurbüro Hauck — Custom Stylesheet
   Mobile-first, no frameworks.
   ========================================================================== */

:root {
  --navy: #0b1e3b;
  --navy-light: #142c56;
  --anthracite: #22262b;
  --white: #f5f7fa;
  --paper: #ffffff;
  --accent: #1fb8a6;
  --accent-dark: #158a7d;
  --line: #d9dee6;
  --text: #1b2330;
  --text-muted: #5b6472;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1180px;
  --radius: 10px;
  --shadow: 0 20px 50px -20px rgba(11, 30, 59, 0.25);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 16px; color: var(--navy); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.15rem; margin-bottom: 8px; }
p { margin: 0 0 16px; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }

.section-eyebrow, .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 12px;
  display: inline-block;
}
.section-lead { max-width: 60ch; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  text-align: center;
}
.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: var(--accent-dark); color: var(--white); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(245,247,250,0.4); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-lg { padding: 16px 34px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-nav { padding: 10px 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(11, 30, 59, 0.92);
  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;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { color: var(--white); font-size: 1rem; font-weight: 700; }
.logo-text em { color: var(--accent); font-style: normal; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { color: rgba(245,247,250,0.85); font-weight: 500; font-size: 0.94rem; transition: color 0.2s; }
.main-nav a:hover { color: var(--accent); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.25s var(--ease); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 24px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 4px; width: 100%; }
  .main-nav ul a { display: block; padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .main-nav .btn-nav { margin-top: 20px; width: 100%; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-light) 0%, var(--navy) 55%);
  color: var(--white);
  overflow: hidden;
  padding: 96px 0 80px;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 20px; }
.hero-lead { color: rgba(245,247,250,0.78); font-size: 1.1rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin: 28px 0 48px; }

.hero-stats { display: flex; gap: 40px; margin: 0; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.12); flex-wrap: wrap; }
.hero-stats dt { font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.hero-stats dd { margin: 4px 0 0; font-size: 0.85rem; color: rgba(245,247,250,0.65); }

/* ---------- Services ---------- */
.services { padding: 96px 0; background: var(--paper); }
.services h2, .services .section-lead { max-width: 640px; }

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 48px;
}
@media (min-width: 720px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.service-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
  color: var(--accent);
  border-radius: 8px;
  margin-bottom: 20px;
}
.service-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); padding-top: 16px; }
.service-list li { position: relative; padding-left: 18px; font-size: 0.92rem; color: var(--text-muted); margin-bottom: 8px; }
.service-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; }

/* ---------- Philosophy ---------- */
.philosophy { padding: 96px 0; background: var(--white); }
.philosophy-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 900px) { .philosophy-grid { grid-template-columns: 0.9fr 1.1fr; } }
.philosophy-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.philosophy-values { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
@media (min-width: 560px) { .philosophy-values { grid-template-columns: repeat(3, 1fr); } }
.philosophy-values h3 { font-size: 1rem; color: var(--accent-dark); }
.philosophy-values p { font-size: 0.9rem; margin-bottom: 0; }

/* ---------- Process ---------- */
.process { padding: 96px 0; background: var(--anthracite); color: var(--white); }
.process h2 { color: var(--white); max-width: 620px; }
.process-steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  counter-reset: step;
}
@media (min-width: 720px) { .process-steps { grid-template-columns: repeat(4, 1fr); } }
.process-steps li { border-top: 2px solid var(--accent); padding-top: 20px; }
.step-num { display: block; font-size: 2rem; font-weight: 800; color: rgba(245,247,250,0.25); margin-bottom: 8px; }
.process-steps h3 { color: var(--white); }
.process-steps p { color: rgba(245,247,250,0.65); font-size: 0.92rem; margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent); padding: 64px 0; text-align: center; }
.cta-band h2 { color: var(--navy); margin-bottom: 8px; }
.cta-band p { color: rgba(11,30,59,0.75); margin-bottom: 28px; }
.cta-band .btn-primary { background: var(--navy); color: var(--white); }
.cta-band .btn-primary:hover { background: var(--anthracite); }

/* ---------- Contact ---------- */
.contact { padding: 96px 0; background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 56px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-details { list-style: none; margin: 32px 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-details li { display: flex; align-items: flex-start; gap: 14px; color: var(--text); }
.contact-details svg { color: var(--accent-dark); flex-shrink: 0; margin-top: 2px; }
.contact-details a:hover { color: var(--accent-dark); }

.map-placeholder {
  height: 220px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--line);
  background: repeating-linear-gradient(45deg, #f0f2f5, #f0f2f5 10px, #f6f7f9 10px, #f6f7f9 20px);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 16px;
}

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.85rem; font-weight: 600; color: var(--navy); }
.form-row input, .form-row select, .form-row textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--text);
  transition: border-color 0.2s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-consent { flex-direction: row; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 0.85rem; font-weight: 400; color: var(--text-muted); }
.checkbox input { margin-top: 3px; }
.form-status { font-size: 0.9rem; font-weight: 600; min-height: 1.2em; }
.form-status.success { color: var(--accent-dark); }
.form-status.error { color: #c0392b; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(245,247,250,0.7); padding: 48px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { color: var(--white); display: block; }
.footer-brand p { margin: 2px 0 0; font-size: 0.85rem; color: rgba(245,247,250,0.55); }
.footer-nav { display: flex; gap: 24px; }
.footer-nav a { font-size: 0.88rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { width: 100%; font-size: 0.8rem; color: rgba(245,247,250,0.4); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; margin-top: 8px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .service-card { transition: none; }
}
