/* ============================================================
   ingenieurbüro oehlckers – Hauptstylesheet
   Look: Apple-orientiert – viel Weißraum, klare Typo-Hierarchie,
   fast monochrome Palette (Weiß + helles Grau), Blau nur für
   interaktive Elemente (Buttons, Links, Fokus).
   ============================================================ */

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

:root {
  /* Flächen */
  --bg:        #FFFFFF;   /* Grundfläche */
  --bg-alt:    #F5F5F7;   /* helle Trennfläche (jede zweite Sektion) */
  --surface:   #FFFFFF;   /* Karten / Eingabefelder */

  /* Text */
  --text:      #1D1D1F;   /* Schwarz/Anthrazit */
  --text-muted:#515154;   /* sekundärer Fließtext (AA auf Weiß und auf #F5F5F7) */

  /* Akzent – ausschließlich für interaktive Elemente */
  --blue:      #004AAD;
  --blue-dark: #00368A;

  /* Linien & Schatten */
  --border:        #D2D2D7;
  --border-strong: #AEAEB2;
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.06);
  --grid-line:     rgba(0, 0, 0, 0.045);   /* feines Blueprint-Raster im Hero */

  --font: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue",
          Arial, sans-serif;

  --max-w: 1100px;
  --radius: 18px;
  --transition: 0.35s ease;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p { max-width: 68ch; }              /* angenehme Zeilenlänge im Fließtext */

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

/* Fokus-Zustand für Barrierefreiheit */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Hilfsklassen ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- Scroll-Animationen (ruhig, Apple-Stil) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition:
    opacity   0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter    0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal.delay-1 { transition-delay: 0.07s; }
.reveal.delay-2 { transition-delay: 0.14s; }
.reveal.delay-3 { transition-delay: 0.21s; }
.reveal.delay-4 { transition-delay: 0.28s; }
.cards .reveal:nth-child(2) { transition-delay: 0.10s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Header / Navigation ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition),
              box-shadow var(--transition);
}
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 84px;
}

/* Logo randlos – kein Kasten, viel Luft. */
.logo-link { display: flex; align-items: center; }
.logo-link img {
  height: 52px;
  width: auto;
  transition: opacity 0.4s;
}
.logo-link:hover img { opacity: 0.75; }
@media (max-width: 768px) {
  .header-inner { height: 72px; }
  .logo-link img { height: 44px; }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.25rem;
}
.nav-menu a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0;
  transition: color var(--transition);
}
/* Unterstreichung – Navigation ist interaktiv, daher Blau erlaubt. */
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-menu a:hover { color: var(--blue); text-decoration: none; }
.nav-menu a:hover::after,
.nav-menu a[aria-current="page"]::after { transform: scaleX(1); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- Buttons / CTAs ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--blue);
  color: #fff;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  border: 1px solid transparent;
  transition: background var(--transition), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.btn:hover {
  background: var(--blue-dark);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

/* Niedrigschwelliger Zweit-CTA – Textlink mit Pfeil. */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue);
  font-size: 1rem;
  font-weight: 600;
}
.btn-text .arrow { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.btn-text:hover { text-decoration: none; }
.btn-text:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */
#hero {
  background: var(--bg);
  padding-block: clamp(5.5rem, 15vw, 11rem);
  text-align: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

#hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text);     /* einfarbig – Wirkung aus Größe & Weißraum */
  max-width: 16ch;
  margin-inline: auto;
}

#hero p {
  margin-top: 1.75rem;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 580px;
  margin-inline: auto;
}

.hero-actions {
  margin-top: 2.75rem;
  display: flex;
  gap: 1.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------- Sektion-Grundlayout ---------- */
section {
  padding-block: clamp(5rem, 12vw, 9rem);
}

.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);   /* nicht mehr blau */
  margin-bottom: 0.9rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  max-width: 18ch;
}

.section-intro {
  margin-top: 1.25rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 620px;
}

/* Zentrierte Sektionsköpfe (Ablauf, Referenz) */
#ablauf .section-label,
#ablauf .section-title,
#ablauf .section-intro,
#referenzen .section-label,
#referenzen .section-title,
#referenzen .section-intro {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

/* ---------- Leistungen ---------- */
#leistungen { background: var(--bg-alt); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.card:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.09);
  transform: translateY(-4px);
}

/* Dünnes Outline-Icon, einfarbig, ohne Hintergrundkasten. */
.card-icon {
  margin-bottom: 1.35rem;
}
.card-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: none;
}

.card ul {
  margin-top: 1.4rem;
  padding-left: 0;
  list-style: none;
  color: var(--text);
  font-size: 1rem;
}
.card ul li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.4;
}

/* ---------- Ablauf ---------- */
#ablauf { background: var(--bg); }

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 3.5rem;
}
.step-num {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--border-strong);   /* dezent, dekorativ */
  letter-spacing: -0.02em;
}
.step h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.75rem 0 0.5rem;
  color: var(--text);
}
.step p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.55;
}

/* ---------- Referenz ---------- */
#referenzen { background: var(--bg-alt); }

.reference-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-top: 3rem;
  max-width: 920px;
  margin-inline: auto;
}
.reference-card h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.reference-card p {
  color: var(--text-muted);
  font-size: 1.12rem;
  line-height: 1.65;
  margin-top: 1.1rem;
  max-width: none;
}
.reference-list {
  list-style: none;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem 2rem;
}
.reference-list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.45;
}
.reference-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.4;
}

/* ---------- Über mich ---------- */
#ueber-uns { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: stretch;   /* beide Spalten gleich hoch → Bild endet bündig mit dem Text */
  margin-top: 2.5rem;
}

.about-text p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.7; }
.about-text p + p { margin-top: 1.15rem; }

.about-media {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
}
.about-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;          /* Standard (Mobil): festes Format */
  object-fit: cover;
  object-position: 50% 32%;     /* Gesicht bleibt sichtbar, auch wenn der Ausschnitt kürzer wird */
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.about-facts {
  display: flex;
  gap: 1.25rem;
}
.about-facts .fact { flex: 1; }

.fact {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.45rem;
}
.fact strong {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.fact span {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 24ch;
}

/* Normen-/Qualifikations-Band (im HTML standardmäßig auskommentiert). */
.quali-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.quali-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Kontakt ---------- */
#kontakt { background: var(--bg-alt); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: 3rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-info address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--text);
}
.contact-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.7;
}
.contact-image {
  width: 100%;
  aspect-ratio: 16 / 10;        /* Standard (Mobil): festes Format */
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}

/* DSGVO-Einwilligung */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.form-consent input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.form-consent a { font-weight: 600; }

/* Kontaktformular */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group textarea {
  font-family: var(--font);
  font-size: 1.05rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #6E6E73; opacity: 1; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 74, 173, 0.12);
}
.contact-form .btn { align-self: flex-start; }

/* ---------- Footer ---------- */
#site-footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.6);
  padding-block: 2.75rem;
  font-size: 0.95rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.footer-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li a {
    display: block;
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
  }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-portrait { aspect-ratio: 3 / 2; }
  .reference-list { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
}

/* ---------- Desktop: Bilder füllen die Spaltenhöhe ---------- */
@media (min-width: 769px) {
  .about-portrait {
    aspect-ratio: auto;
    height: auto;
    flex: 1 1 auto;
    min-height: 300px;
  }
  .contact-grid { align-items: stretch; }
  .contact-info { height: 100%; }
  .contact-image {
    aspect-ratio: auto;
    height: auto;
    flex: 1 1 auto;
    min-height: 240px;
  }
}

/* ============================================================
   Technische Animationen & Gimmicks
   ============================================================ */

/* Scroll-Fortschrittsleiste am oberen Rand. */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--blue);
  z-index: 200;
  transition: width 0.08s linear;
}

/* Hero: feines, langsam driftendes Blueprint-Raster im Hintergrund. */
#hero { position: relative; overflow: hidden; }
#hero .container { position: relative; z-index: 1; }
#hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 42%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 42%, #000 0%, transparent 75%);
  animation: grid-drift 32s linear infinite;
  pointer-events: none;
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 46px 46px, 46px 46px; }
}

/* Großflächiges Bild-Band mit sanftem Zoom-Out beim Einblenden. */
.media-band-grid {
  width: min(920px, calc(100% - 2.5rem));   /* bündig zur Projektbeschreibung */
  margin-inline: auto;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.media-band-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  transform: scale(1.12);
  transition: transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.media-band-grid.visible .media-band-img { transform: scale(1); }
.media-band-grid.visible .media-band-img:nth-child(2) { transition-delay: 0.12s; }

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

/* Karten: dezentes Spotlight, das dem Mauszeiger folgt. */
.card { position: relative; overflow: hidden; }
.card > * { position: relative; z-index: 1; }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
              rgba(0, 74, 173, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

/* Reduzierte Bewegung: alle „Gimmicks" ruhigstellen. */
@media (prefers-reduced-motion: reduce) {
  #hero::before { animation: none; }
  .media-band-img { transform: none; }
  .card::before { display: none; }
  #scroll-progress { transition: none; }
}
