/* ============================================
   Apple - City Center 2
   Custom Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #eef3f9;
}
::-webkit-scrollbar-thumb {
  background: #1a2744;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c8a45e;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.8s ease forwards;
  opacity: 0;
}

.animate-slide-up-delay {
  animation: slideUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.animate-slide-up-delay-2 {
  animation: slideUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

.animate-slide-up-delay-3 {
  animation: slideUp 0.8s ease 0.6s forwards;
  opacity: 0;
}

/* ---------- Intersection Observer Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c8a45e, #e4be38);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::after {
  transform: scaleX(1);
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c8a45e, #e4be38);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.testimonial-card:hover::before {
  opacity: 1;
}

/* ---------- Form Styles ---------- */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(200, 164, 94, 0.15);
}

/* ---------- Header Scroll State ---------- */
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(15, 33, 50, 0.06);
}

#site-header.scrolled .nav-link {
  color: #1a2744;
}

#site-header.scrolled .nav-link:hover {
  color: #0f2132;
  background: rgba(200, 164, 94, 0.1);
}

/* ---------- Mobile Menu ---------- */
#mobile-menu.open {
  translate: 0;
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  translate: 0 -10px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Back to Top ---------- */
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

#back-to-top:not(.visible) {
  transform: translateY(10px);
}

/* ---------- Selection ---------- */
::selection {
  background: #c8a45e;
  color: #0f2132;
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid #c8a45e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print ---------- */
@media print {
  #site-header,
  #back-to-top,
  .service-card::after,
  .testimonial-card::before {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
