/* ========================================
   Christa Merolus Real Estate
   Classic & Elegant — Teal + Slate
   ======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ---------- Header ---------- */
#site-header {
  background: transparent;
}

#site-header.scrolled {
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

#site-header.scrolled .nav-link {
  color: rgba(255,255,255,0.85);
}

/* ---------- Hero ---------- */
.hero-bg {
  will-change: transform;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(2, 6, 23, 0.75) 0%,
    rgba(17, 94, 89, 0.55) 50%,
    rgba(2, 6, 23, 0.70) 100%
  );
}

.hero-content {
  padding-top: 80px;
}

.hero-subtitle {
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.3s;
}

.hero-headline {
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.5s;
}

.hero-desc {
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.7s;
}

.hero-buttons {
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.9s;
}

.hero-scroll {
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.5s;
}

/* ---------- Animations ---------- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }

  .reveal-up {
    animation: fadeSlideUp 0.7s ease forwards;
  }

  .reveal-left {
    animation: slideFromLeft 0.7s ease forwards;
  }

  .reveal-right {
    animation: slideFromRight 0.7s ease forwards;
  }

  .service-card {
    animation: fadeSlideUp 0.6s ease forwards;
  }
}

@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- Mobile Menu ---------- */
.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu:not(.active) {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu.active .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-link:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.active .mobile-link:nth-child(7) { transition-delay: 0.4s; }

/* ---------- Menu Button ---------- */
.menu-line {
  transition: all 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(3px, -3px);
}

/* ---------- Button Styles ---------- */
.btn-primary,
.btn-secondary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::after,
.btn-secondary:hover::after {
  opacity: 1;
}

/* ---------- Form Styles ---------- */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px currentColor;
}

/* ---------- Selection ---------- */
::selection {
  background: #115e59;
  color: #ccfbf1;
}

/* ---------- Utility ---------- */
.text-balance {
  text-wrap: balance;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .hero-content {
    padding-top: 60px;
  }

  .hero-headline {
    font-size: 2.25rem !important;
  }

  #about .reveal-left img,
  #about .reveal-right img {
    height: 400px !important;
  }

  .stats-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-top: 1.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-headline {
    font-size: 3.5rem !important;
  }
}
