/* ===== Energo-Flow — Sharp & Corporate with Warm Rust ===== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }

:root {
  --primary: #c45a2d;
  --secondary: #1c1c1c;
  --accent: #d4963a;
  --dark: #0f0f0f;
  --light: #f7f5f2;
  --warm: #2a2420;
  --text: #2a2a2a;
  --text-light: #7a7a7a;
}

/* ===== LOADER ===== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.loader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}
#navbar .nav-link {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
  text-decoration: none;
}
#navbar .nav-link:hover { color: var(--primary); }
#navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
#navbar .nav-link:hover::after { width: 100%; }

/* Scrolled state — dark text */
#navbar.scrolled .nav-link { color: var(--text-light); }
#navbar.scrolled .nav-link:hover { color: var(--primary); }
#navbar.scrolled #nav-logo { color: var(--secondary) !important; }
#navbar.scrolled #mobile-menu-btn { color: var(--secondary); }

/* ===== MOBILE MENU ===== */
#mobile-menu {
  position: fixed;
  top: 76px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: #fff;
  overflow-y: auto;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15,15,15,0.5) 0%,
    rgba(15,15,15,0.65) 50%,
    rgba(15,15,15,0.8) 100%
  );
}

/* ===== SERVICE CARDS — BENTO ===== */
.service-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}
.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-card-img {
  transform: scale(1.06);
}
.service-card-img-wrap {
  overflow: hidden;
}
.service-card-body {
  padding: 24px;
}
.service-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(196, 90, 45, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 14px;
}

/* ===== ABOUT ===== */
.about-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 8px;
}
.about-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.about-feature:last-child { border-bottom: none; }
.about-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== CTA BANNER ===== */
.cta-section {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.cta-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.75);
}

/* ===== CONTACT ===== */
.contact-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  text-decoration: none;
  transition: all 0.3s ease;
}
.contact-info-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(196,90,45,0.08);
}
.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(196,90,45,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--secondary);
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196,90,45,0.08);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #aaa; }
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-form button {
  width: 100%;
  padding: 16px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.contact-form button:hover {
  background: #b04e24;
  transform: translateY(-1px);
}
.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Map */
.contact-map-wrap {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.4);
}
.footer-link {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-link:hover { color: var(--primary); }

/* ===== FLOATING PHONE ===== */
.phone-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(196,90,45,0.3);
  transition: all 0.3s ease;
}
.phone-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 28px rgba(196,90,45,0.4);
}

/* ===== SCROLL ANIMATIONS ===== */
.anim {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.anim.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SCROLL TOP ===== */
#scroll-top {
  position: fixed;
  bottom: 92px;
  right: 28px;
  z-index: 50;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
#scroll-top:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .about-img { height: 340px; }
}
@media (max-width: 768px) {
  .about-img { height: 260px; }
  .service-card-img { height: 160px; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
