/* css/main.css */
@import 'fonts.css';
@import 'tokens.css';

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--color-white); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── Utility classes ── */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-eyebrow);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 14px;
}
.gold-line {
  width: 48px; height: 2px;
  background: var(--color-gold);
  margin: 20px 0;
}
.btn-primary {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-dark);
  padding: 15px 36px;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
}
.btn-primary:hover { background: var(--color-dark); color: var(--color-gold); }
.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--color-white);
  padding: 15px 36px;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base);
}
.btn-outline:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* ── Site Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  transition: background var(--transition-base), padding var(--transition-base), box-shadow var(--transition-base);
}
.site-header.scrolled {
  background: var(--color-dark);
  padding: 16px 48px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.logo-wrap { display: flex; flex-direction: column; }
.logo-name {
  font-family: var(--font-serif);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--color-white);
}
.logo-sub {
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  letter-spacing: 4px;
  color: var(--color-gold);
  margin-top: 3px;
}
.header-nav { display: flex; gap: 32px; }
.header-nav a {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: color var(--transition-base);
}
.header-nav a:hover,
.header-nav a.active { color: var(--color-gold); }
.header-phone {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--color-white);
}
.header-phone::before { content: '✆ '; color: var(--color-gold); }

/* ── Stats Bar ── */
.stats-bar {
  background: var(--color-dark);
  display: flex;
  border-top: 3px solid var(--color-gold);
}
.stat-item {
  flex: 1;
  padding: 36px 20px;
  text-align: center;
  border-right: 1px solid #2a2520;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-gold);
}
.stat-label {
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  letter-spacing: 3px;
  color: #555;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ── Split Section ── */
.split-section { display: grid; grid-template-columns: 1fr 1fr; min-height: 500px; }
.split-img { position: relative; overflow: hidden; }
.split-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.split-section:hover .split-img img { transform: scale(1.03); }
.split-img-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(26,21,16,0.55);
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  letter-spacing: 3px;
  padding: 10px 20px;
  text-transform: uppercase;
}
.split-text {
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.5vw, 40px);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 20px;
}
.split-text p {
  font-size: var(--text-body-sm);
  line-height: 1.85;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

/* ── FAB Chat Button ── */
.fab {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: var(--z-fab);
  width: 58px; height: 58px;
  background: var(--color-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  cursor: pointer;
  border: 2px solid var(--color-gold);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  animation: pulse 3s ease-in-out infinite;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(201,185,154,0.4); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 0 rgba(201,185,154,0.4); }
  50% { box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 10px rgba(201,185,154,0); }
}

/* ── Chat Modal ── */
.chat-modal {
  position: fixed;
  bottom: 100px; right: 28px;
  z-index: var(--z-modal);
  width: 380px;
  background: var(--color-white);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border-radius: 4px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.chat-modal.open { display: flex; opacity: 1; transform: translateY(0); }
.chat-modal-header {
  background: var(--color-dark);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-modal-header span { color: var(--color-white); font-size: 0.75rem; font-family: var(--font-sans); }
.chat-online { display: flex; align-items: center; gap: 6px; font-size: 0.625rem; color: #4caf50; font-family: var(--font-sans); }
.chat-online-dot { width: 6px; height: 6px; background: #4caf50; border-radius: 50%; }
.chat-messages {
  padding: 20px;
  background: #faf8f5;
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px 16px 16px 3px;
  font-size: 0.8125rem;
  max-width: 85%;
  line-height: 1.5;
  font-family: var(--font-sans);
  background: var(--color-dark);
  color: var(--color-white);
  align-self: flex-start;
}
.chat-bubble.user {
  background: var(--color-gold);
  color: var(--color-white);
  align-self: flex-end;
  border-radius: 16px 16px 3px 16px;
}
.chat-bubble.loading::after {
  content: '...';
  animation: dots 1.2s steps(3, end) infinite;
}
@keyframes dots {
  0%  { content: '.'; }
  33% { content: '..'; }
  66% { content: '...'; }
}
.chat-input-row { display: flex; border-top: 1px solid var(--color-border); }
.chat-input-row input {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 0.8125rem;
  outline: none;
  background: var(--color-white);
  font-family: var(--font-sans);
}
.chat-input-row button {
  background: var(--color-gold);
  border: none;
  color: var(--color-white);
  padding: 14px 18px;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition-base);
}
.chat-input-row button:hover { background: var(--color-dark); }

/* ── Footer ── */
.site-footer {
  background: var(--color-dark);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid #2a2520;
}
.footer-copy { font-family: var(--font-sans); font-size: 0.75rem; color: #555; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-family: var(--font-sans); font-size: 0.75rem; color: #555; transition: color var(--transition-base); }
.footer-links a:hover { color: var(--color-gold); }

/* ── Responsive ── */
@media (max-width: 900px) {
  /* Handy: Nav als eigener dunkler Balken im Fluss — liegt nicht mehr über dem Hero-Bild */
  .site-header {
    position: sticky;
    background: var(--color-dark);
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 12px 24px;
  }
  .site-header.scrolled { padding: 12px 24px; box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
  .header-nav {
    display: flex;
    order: 3;
    flex-basis: 100%;
    justify-content: center;
    gap: 28px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  /* Startseite bleibt wie vorher: Header transparent über dem Hero, ohne Nav-Zeile.
     .home-hero gibt es nur auf der Startseite. */
  body:has(.home-hero) .site-header {
    position: fixed;
    background: none;
    flex-wrap: nowrap;
    padding: 20px 24px;
    box-shadow: none;
  }
  body:has(.home-hero) .site-header.scrolled {
    background: var(--color-dark);
    padding: 14px 24px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  }
  body:has(.home-hero) .header-nav { display: none; }
  .split-section { grid-template-columns: 1fr; }
  /* Handy: ganzes Bild zeigen (Logo nicht abschneiden) */
  .split-img { height: auto; }
  .split-img img { height: auto; }
  .stats-bar { flex-wrap: wrap; }
  .stat-item { min-width: 50%; border-right: none; border-bottom: 1px solid #2a2520; }
  .chat-modal { width: calc(100vw - 32px); right: 16px; }
}

/* ── Foto-Lightbox (Mitarbeiter-Fotos vergrößern) ── */
.is-zoomable { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(26, 21, 16, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: scale(0.92);
  transition: transform var(--transition-base);
  cursor: zoom-out;
}
.lightbox.is-open .lightbox__figure { transform: scale(1); }

.lightbox__img {
  max-width: min(90vw, 720px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  border: 3px solid var(--color-gold);
}
.lightbox__caption {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
}
.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  width: 46px; height: 46px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base);
}
.lightbox__close:hover { border-color: var(--color-gold); color: var(--color-gold); }

@media (max-width: 900px) {
  .lightbox { padding: 16px; }
  .lightbox__img { max-width: 92vw; max-height: 78vh; }
}