/* ============================================================
   CSS-Variablen & Reset
   ============================================================ */
:root {
  --color-bg:        #FFFFFF;
  --color-bg-alt:    #FAFAFA;
  --color-text:      #1D1D1F;
  --color-text-sec:  #6E6E73;
  --color-accent:    #0071E3;
  --color-border:    #D2D2D7;
  --color-surface:   #F5F5F7;
  --color-footer-bg: #1D1D1F;

  --font:  -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --mono:  'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --container-max: 980px;
  --section-pad:   120px;
  --section-pad-m: 80px;
  --nav-height:    60px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* Globale Basis: alle interaktiven Elemente reagieren smooth */
a, button, [role="button"] {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: var(--section-pad) 0; }

/* ============================================================
   Typografie
   ============================================================ */
h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--color-text);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--color-text);
}

p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-sec);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav__logo:hover { text-decoration: none; opacity: 0.7; }

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav__links a:hover { color: var(--color-accent); text-decoration: none; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: 1.5rem;
  z-index: 99;
}

.nav__mobile.open { display: block; }

.nav__mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav__mobile a {
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav__mobile a:hover { color: var(--color-accent); text-decoration: none; }

/* ============================================================
   Hero
   ============================================================ */
#hero {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--section-pad));
  padding-bottom: var(--section-pad);
  text-align: center;
  overflow: hidden;
}

/* Subtiles Dot-Grid */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #D2D2D7 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero__portrait {
  position: relative;
  z-index: 1;
  width: 300px;
  height: auto;
  margin: 0 auto 2rem;
}

/* Gradient-Text für den Namen */
.hero__name {
  position: relative;
  z-index: 1;
  margin-bottom: 0.375rem;
  background: linear-gradient(135deg, #1D1D1F 0%, #3a3a3f 50%, #0071E3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__title {
  position: relative;
  z-index: 1;
  font-size: 1.125rem;
  color: var(--color-text-sec);
  margin-bottom: 1.75rem;
  font-weight: 400;
}

.hero__tagline {
  position: relative;
  z-index: 1;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  color: var(--color-text-sec);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.hero__tagline strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Credential-Chips */
.hero__chips {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.625rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-sec);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 980px;
  padding: 0.3125rem 0.875rem;
  letter-spacing: 0.01em;
}

.chip--accent {
  color: var(--color-accent);
  background: rgba(0, 113, 227, 0.07);
  border-color: rgba(0, 113, 227, 0.2);
}

.hero__socials {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 980px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
  border: none;
}

.btn:hover { text-decoration: none; }

.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: #0062C3; transform: scale(1.02); }

.btn--secondary { background: var(--color-surface); color: var(--color-text); }
.btn--secondary:hover { background: #E8E8ED; transform: scale(1.02); }

.btn--outline { background: transparent; color: var(--color-text); border: 1.5px solid var(--color-border); }
.btn--outline:hover { background: var(--color-surface); }

/* Social Buttons Hero: weiß/transparent → schwarz beim Hover */
.btn--social {
  background: #fff;
  color: var(--color-text);
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--color-border);
}

.btn--social:hover {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
  transform: scale(1.1);
  opacity: 1;
}

.btn--social svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ============================================================
   Section-Alternierende Hintergründe
   ============================================================ */
.section--alt { background: var(--color-bg-alt); }

/* ============================================================
   Section-Header mit Nummer-Watermark
   ============================================================ */
.section-inner {
  position: relative;
}

.section-num {
  position: absolute;
  top: -0.5rem;
  right: -1rem;
  font-size: clamp(6rem, 14vw, 10rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-border);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.section-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-tag svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.section-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  max-width: 760px;
}

.section-body {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-bottom: 2.5rem;
}

/* ============================================================
   Kennzahlen-Grid mit Icons
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 3rem 0;
  background: var(--color-border);
  position: relative;
  z-index: 1;
}

.stats__item {
  background: var(--color-bg);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

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

.stats__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 113, 227, 0.08);
  border-radius: 10px;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.stats__icon svg { width: 18px; height: 18px; }

.stats__number {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1;
}

.stats__label {
  font-size: 0.875rem;
  color: var(--color-text-sec);
  line-height: 1.4;
}

/* ============================================================
   CTAs
   ============================================================ */
.section-ctas {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   KI Terminal-Card
   ============================================================ */
.ki-card {
  position: relative;
  z-index: 1;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  overflow: hidden;
  max-width: 560px;
  margin: 2.5rem 0;
  font-family: var(--mono);
}

.ki-card__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #181818;
  border-bottom: 1px solid #2a2a2a;
}

.ki-card__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.ki-card__dot--red    { background: #ff5f57; }
.ki-card__dot--yellow { background: #febc2e; }
.ki-card__dot--green  { background: #28c840; }

.ki-card__title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.75rem;
  color: #666;
  font-family: var(--mono);
}

.ki-card__body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.ki-card__line {
  font-size: 0.875rem;
  line-height: 1.5;
  color: #ccc;
}

.ki-card__line--cmd {
  color: #7ee787;
}

.ki-card__line--cmd::before {
  content: '$ ';
  color: #58a6ff;
}

.ki-card__line--ok::before {
  content: '✓ ';
  color: #28c840;
}

.ki-card__line--arrow::before {
  content: '→ ';
  color: #febc2e;
}

.ki-card__cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: #58a6ff;
  vertical-align: text-bottom;
  animation: blink 1.1s step-start infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Skill-Pills */
.skill-pills {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.skill-pill {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.3125rem 0.75rem;
  letter-spacing: 0.01em;
}

/* ============================================================
   Kontaktformular
   ============================================================ */
#kontakt { background: var(--color-surface); }

.contact-form { max-width: 560px; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  cursor: text;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

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

.form-message {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  display: none;
}

.form-message--success { color: #1a7f37; }
.form-message--error   { color: #d93025; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--color-footer-bg);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 40px;
}

.footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
}

.footer__tagline {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
}

.footer__socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Footer Social Icons: transparent mit weißem Border → weiß beim Hover */
.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.footer__social-link:hover {
  background: #fff;
  color: var(--color-text);
  border-color: #fff;
  transform: scale(1.1);
  text-decoration: none;
}

.footer__social-link svg { width: 18px; height: 18px; }

.footer__email { margin-top: 1rem; font-size: 0.9375rem; }
.footer__email a { color: rgba(255,255,255,0.7); transition: color 0.2s ease; }
.footer__email a:hover { color: #fff; text-decoration: underline; }

.impressum {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.impressum h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.25rem;
}

.impressum p,
.impressum address {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  font-style: normal;
  margin-bottom: 1.25rem;
}

.impressum a { color: rgba(255,255,255,0.6); transition: color 0.2s ease; }
.impressum a:hover { color: var(--color-accent); text-decoration: underline; }
.impressum strong { color: rgba(255,255,255,0.7); }

.footer__copy {
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
}

/* ============================================================
   Scroll-Animationen
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  section { padding: var(--section-pad-m) 0; }

  #hero {
    padding-top: calc(var(--nav-height) + var(--section-pad-m));
    padding-bottom: var(--section-pad-m);
  }

  .hero__portrait { width: 220px; }

  .nav__links { display: none; }
  .nav__hamburger { display: flex; }

  .stats { grid-template-columns: 1fr; }
  .stats__item { padding: 1.5rem; }

  .section-num { font-size: 5rem; right: 0; }

  .footer__top { flex-direction: column; }

  .section-ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .ki-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero__socials { gap: 0.5rem; }
  .btn--social { font-size: 0.8125rem; padding: 0.5rem 1rem; }
  .hero__chips { gap: 0.5rem; }
}

/* ============================================================
   Section-Foto-Layouts
   ============================================================ */

/* 2-spaltiges Grid: Text + Foto */
.section-grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}

/* Text links, Foto rechts 45% */
.section-grid--45-right {
  grid-template-columns: 1fr 45%;
}

/* Foto links 45%, Text rechts */
.section-grid--45-left {
  grid-template-columns: 45% 1fr;
}

/* Text links, Foto rechts 40% */
.section-grid--40-right {
  grid-template-columns: 1fr 40%;
}

/* Foto-Wrapper */
.section-grid__photo {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Basis aller Section-Fotos */
.section-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
}

/* Seitenverhältnisse */
.section-photo--4-3 {
  aspect-ratio: 4 / 3;
  object-position: center;
}

.section-photo--3-4 {
  aspect-ratio: 3 / 4;
  object-position: center top;
}

/* Volle Breite Trenner-Foto (Wheelie) */
.section-photo-full {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 0;
  box-shadow: none;
  margin-top: 4rem;
}

/* Section 1 (#unternehmen): alle Korrekturen */
#unternehmen .section-grid {
  align-items: stretch;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

#unternehmen .section-grid__photo {
  height: 100%;
}

#unternehmen .section-photo {
  aspect-ratio: unset;
  height: 100%;
  min-height: 400px;
  object-position: center 30%;
}

#unternehmen h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.2;
}

#unternehmen .stats {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

#unternehmen .stats__number {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

#unternehmen .stats__label {
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Mobile: Grids einspaltig, Foto immer zuerst */
@media (max-width: 768px) {
  .section-grid--45-right,
  .section-grid--45-left,
  .section-grid--40-right {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-grid__photo {
    order: -1;
  }

  .section-photo--3-4 {
    aspect-ratio: 4 / 3;
  }

  .section-photo-full {
    height: 250px;
    margin-top: 2rem;
  }

  #unternehmen .section-photo {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: unset;
  }
}

/* ============================================
   Blog-Teaser Section (One-Pager)
   ============================================ */
.blog-teaser-section {
  padding: 120px 0;
  background: var(--color-bg-alt);
}
.blog-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.blog-teaser__heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--color-text);
  margin: 16px 0 20px;
}
.blog-teaser__excerpt {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-sec);
  margin-bottom: 28px;
  max-width: 480px;
}
.blog-teaser__image img {
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .blog-teaser {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .blog-teaser-section {
    padding: 80px 0;
  }
}
