/* ===== Custom Styles for Guideline Builders Inc. ===== */

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

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #fff;
}

/* ===== Navbar ===== */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(4, 11, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

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

#mobile-menu.active .mobile-link {
  animation: fadeDown 0.4s ease forwards;
}

#mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobile-menu.active .mobile-link:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menu Button Animation */
.menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ===== Service Cards ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0), transparent);
  transition: background 0.5s ease;
}

.service-card:hover::before {
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.6), transparent);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

.hero-content > * {
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }
.hero-content > *:nth-child(5) { animation-delay: 0.7s; }

@media (prefers-reduced-motion: reduce) {
  .hero-content > * {
    animation: none;
    opacity: 1;
  }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #040B18;
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.5);
}

/* ===== Form Focus States ===== */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* ===== Button Ripple Effect ===== */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* ===== Image Loading ===== */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* ===== Utility ===== */
.gold-gradient-text {
  background: linear-gradient(135deg, #C9A84C 0%, #EDCF6E 50%, #B08D2E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 767px) {
  .font-display {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .service-card {
    padding: 2rem;
  }
}

/* ===== Print Styles ===== */
@media print {
  #navbar, #mobile-menu, .reveal {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}
