/* ============================================================
   KEHRLEIN CONSULTING — main.css
   ============================================================ */

/* === CSS CUSTOM PROPERTIES === */
:root {
  /* Brand Colors — unveränderlich */
  --color-blue:        #1d6289;
  --color-grey:        #666666;

  /* Design System */
  --color-dark:        #0f2a40;   /* Hero, Kontakt — dunkles Marineblau */
  --color-footer:      #091c2b;   /* Footer — eine Nuance dunkler */
  --color-white:       #ffffff;
  --color-light-grey:  #f4f6f8;
  --color-light-blue:  #e8f2f8;
  --color-text:        #1e2d3a;   /* Haupttext — warm, nicht reines Schwarz */
  --color-text-muted:  #666666;
  --color-border:      #e2e8ed;

  /* Typography — CSS-Variable für späteren TheSans-Wechsel */
  --font-primary: 'Source Sans 3', system-ui, -apple-system, Arial, sans-serif;

  /* Layout */
  --container-max:    1160px;
  --header-height:    110px;
  --section-v:        88px;
  --section-v-sm:     56px;

  /* UI */
  --radius:           4px;
  --shadow-sm:        0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:        0 4px 20px rgba(0,0,0,0.12);
  --transition:       0.25s ease;
}

/* === FONT === */
@font-face {
  font-family: 'Source Sans 3';
  src: url('/assets/fonts/source-sans-3/SourceSans3-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition), opacity var(--transition); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

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

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; }
p  { font-size: 1.05rem; line-height: 1.75; }

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 12px;
}
.section-label--light { color: rgba(255,255,255,0.6); }


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  height: 88px;
  flex-shrink: 0;
}
.header-logo img {
  height: 88px;
  width: auto;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover {
  background: var(--color-light-grey);
  color: var(--color-blue);
}
.nav-link--cta {
  background: var(--color-blue);
  color: var(--color-white);
  margin-left: 8px;
}
.nav-link--cta:hover {
  background: #155172;
  color: var(--color-white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--color-light-grey); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
/* Hamburger → X animation */
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  background: var(--color-dark);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.15;
  filter: invert(1);
  pointer-events: none;
  user-select: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero h1 {
  color: var(--color-white);
  max-width: 640px;
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: normal;
  color: var(--color-blue);
}

.hero-sub {
  color: rgba(255,255,255,0.72);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 520px;
  line-height: 1.7;
  font-weight: 300;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.35);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-scroll svg { opacity: 0.5; animation: bounce 2s infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}


/* ============================================================
   PROFIL
   ============================================================ */
.profil {
  padding: var(--section-v) 0;
  background: var(--color-white);
}

.profil-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 64px;
  align-items: start;
}

.profil-photo {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}

.profil-photo img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

.profil-content h2 { margin-bottom: 20px; }

.profil-text {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.profil-referenzen {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.profil-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-blue);
  margin-bottom: 40px;
}
.profil-linkedin:hover { opacity: 0.75; }
.profil-linkedin svg { flex-shrink: 0; }

/* Credentials Blocks */
.credentials {
  border-top: 1px solid var(--color-border);
  padding-top: 28px;
  margin-top: 28px;
}

.cred-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.mikrotik-logo {
  height: 22px;
  width: auto;
}

.safe-badge {
  height: 72px;
  width: auto;
}

.cred-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.cred-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.cert-list {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 12px;
}

.tech-list {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.safe-creds {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.safe-creds-text { flex: 1; }


/* ============================================================
   LEISTUNGEN
   ============================================================ */
.leistungen {
  padding: var(--section-v) 0;
  background: var(--color-blue);
  color: var(--color-white);
}

.leistungen h2 {
  color: var(--color-white);
  text-align: center;
  margin-bottom: 56px;
}

.leistungen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.leistung {
  background: var(--color-blue);
  padding: 40px 32px;
  transition: background var(--transition);
}
.leistung:hover { background: rgba(255,255,255,0.08); }

.leistung-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.85);
}

.leistung h3 {
  color: var(--color-white);
  margin-bottom: 14px;
  font-size: 1.15rem;
}

.leistung p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.7;
}


/* ============================================================
   REMOTE SUPPORT (innerhalb Kontakt-Sektion)
   ============================================================ */
.kontakt-remote {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: 48px;
}

.kontakt-remote-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.5);
}

.kontakt-remote-content { flex: 1; }
.kontakt-remote-content h3 {
  color: var(--color-white);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  margin-bottom: 10px;
}
.kontakt-remote-content p {
  color: rgba(255,255,255,0.65);
  margin-bottom: 24px;
  max-width: 540px;
  font-size: 0.98rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--color-blue);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { background: #155172; transform: translateY(-1px); color: var(--color-white); }
.btn svg { flex-shrink: 0; }


/* ============================================================
   KONTAKT
   ============================================================ */
.kontakt {
  padding: var(--section-v) 0;
  background: var(--color-dark);
  color: var(--color-white);
}

.kontakt h2 {
  color: var(--color-white);
  margin-bottom: 48px;
}

.kontakt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.kontakt-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.kontakt-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-blue);
  margin-top: 3px;
}

.kontakt-item p, .kontakt-item a {
  color: rgba(255,255,255,0.82);
  font-size: 0.98rem;
  line-height: 1.6;
}

.kontakt-item a:hover { color: var(--color-white); }

.kontakt-company {
  font-weight: 700;
  color: var(--color-white) !important;
  font-size: 1rem !important;
  letter-spacing: 0.02em;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.social-link:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--color-white);
  background: rgba(255,255,255,0.06);
}
.social-link svg { flex-shrink: 0; }


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-footer);
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 4px;
}

.footer-nav a {
  padding: 6px 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  border-radius: var(--radius);
  transition: color var(--transition);
}
.footer-nav a:hover { color: rgba(255,255,255,0.8); }

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}


/* ============================================================
   DIVIDER
   ============================================================ */
.section-divider {
  width: 48px;
  height: 3px;
  background: var(--color-blue);
  margin: 20px 0 32px;
  border-radius: 2px;
}
.section-divider--light { background: rgba(255,255,255,0.4); }


/* ============================================================
   RESPONSIVE — Tablet (< 960px)
   ============================================================ */
@media (max-width: 960px) {
  :root {
    --section-v: 64px;
  }

  /* Header Nav */
  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-open .main-nav { display: flex; }
  .nav-link { padding: 12px 16px; }
  .nav-link--cta { margin-left: 0; text-align: center; justify-content: center; }

  /* Profil */
  .profil-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .profil-photo {
    position: static;
    max-width: 320px;
  }

  /* Leistungen */
  .leistungen-grid { grid-template-columns: 1fr; }

  /* Remote Support */
  .kontakt-remote { flex-direction: column; align-items: flex-start; gap: 24px; }

  /* Kontakt */
  .kontakt-grid { grid-template-columns: 1fr; gap: 40px; }
}


/* ============================================================
   RESPONSIVE — Mobile (< 600px)
   ============================================================ */
@media (max-width: 600px) {
  :root {
    --section-v: var(--section-v-sm);
  }

  .hero { min-height: 90vh; }
  .hero .container { padding-top: 48px; padding-bottom: 48px; }

  .safe-creds { flex-direction: column; gap: 16px; }

  .social-links { flex-direction: column; }

  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-wrap: wrap; }
}


/* ============================================================
   SUBPAGES (Impressum, Datenschutz, Disclaimer, 404)
   ============================================================ */
.subpage {
  min-height: calc(100vh - var(--header-height));
  padding: 64px 0 80px;
  background: var(--color-white);
}

.subpage-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.subpage-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 8px;
}


.subpage-content {
  max-width: 720px;
}
.subpage-content h2 { font-size: 1.2rem; margin: 32px 0 12px; }
.subpage-content h3 { font-size: 1rem; margin: 24px 0 8px; font-weight: 600; }
.subpage-content h4 { font-size: 0.95rem; margin: 20px 0 6px; font-weight: 600; color: var(--color-text); }
.subpage-content p  { color: var(--color-text-muted); margin-bottom: 14px; font-size: 0.95rem; }
.subpage-content a  { color: var(--color-blue); text-decoration: underline; text-underline-offset: 3px; }
.subpage-content ul { margin: 12px 0 16px 20px; list-style: disc; }
.subpage-content ul li { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 6px; }
.datenschutz-source { font-size: 0.8rem !important; color: var(--color-text-faint, #aaa) !important; margin-top: 40px; border-top: 1px solid var(--color-border, #e8edf2); padding-top: 16px; }

/* Info-Seite */
.info-list { display: grid; grid-template-columns: 120px 1fr; gap: 6px 24px; margin-bottom: 32px; font-size: 0.95rem; }
.info-list dt { color: var(--color-text-muted); font-weight: 600; padding-top: 2px; }
.info-list dd { color: var(--color-text); margin: 0; word-break: break-all; }
.info-commands { background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 6px; padding: 16px 20px; font-family: monospace; font-size: 0.9rem; color: var(--color-text); line-height: 1.8; }

/* Impressum */
.impressum-contact {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 24px;
}
.impressum-contact a { color: var(--color-blue); }
.impressum-contact a:hover { text-decoration: underline; }

.impressum-meta {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 24px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  align-items: baseline;
}
.impressum-meta dt {
  font-weight: 600;
  color: var(--color-text-muted);
}
.impressum-meta dd {
  margin: 0;
}
.impressum-meta a {
  color: var(--color-blue);
}
.impressum-meta a:hover { text-decoration: underline; }

/* 404 */
.page-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - var(--header-height));
  padding: 40px 24px;
}
.page-404 .error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--color-light-grey);
  line-height: 1;
  margin-bottom: 16px;
}
.page-404 h1 { margin-bottom: 12px; font-size: 1.8rem; }
.page-404 p  { color: var(--color-text-muted); margin-bottom: 32px; }
