/* ============================================
   MODEL MALAY — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #1B4332;
  color: #F0F4F0;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F5F0E8;
}
::-webkit-scrollbar-thumb {
  background: #8FBB8F;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1B4332;
}

/* --- Section Labels --- */
.section-label {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5FA05F;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: #1B4332;
  letter-spacing: -0.02em;
}

.section-desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #5FA05F;
}

/* --- Hero Animations --- */
.hero-elem {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- CTA Buttons --- */
.cta-primary {
  position: relative;
  overflow: hidden;
}

.cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.cta-primary:hover::before {
  left: 100%;
}

.cta-secondary {
  position: relative;
  overflow: hidden;
}

/* --- Service Cards --- */
.service-card {
  position: relative;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #5FA05F;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::after {
  width: 100%;
}

.service-card-title {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card-desc {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Pillar Cards --- */
.pillar {
  position: relative;
  padding-top: 2rem;
}

.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #1B4332, #5FA05F);
  border-radius: 2px;
}

.pillar-number {
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pillar-title {
  transition: all 0.3s ease;
}

.pillar:hover .pillar-title {
  transform: translateY(-4px);
}

/* --- Testimonial Cards --- */
.testimonial-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(27, 67, 50, 0.12);
}

/* --- Form Inputs --- */
.form-input {
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: #1B4332;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

.form-input::placeholder {
  color: #BDD4BD;
}

/* --- Header Scroll State --- */
#header.scrolled {
  background: rgba(251, 249, 246, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#header.scrolled .font-serif {
  color: #1B4332 !important;
}

/* --- Navigation Links --- */
.nav-link {
  position: relative;
}

/* --- Mobile Menu --- */
.mobile-nav-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Intersection Observer Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }

/* --- Mobile Menu Active State --- */
body.menu-open {
  overflow: hidden;
}

body.menu-open #mobile-menu {
  opacity: 1;
  pointer-events: all;
}

body.menu-open #mobile-menu .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open #mobile-menu .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
body.menu-open #mobile-menu .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
body.menu-open #mobile-menu .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
body.menu-open #mobile-menu .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
body.menu-open #mobile-menu .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* --- Menu Button Animations --- */
body.menu-open .menu-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.menu-open .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
body.menu-open .menu-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 1.5rem;
}

/* --- Image Hover --- */
img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  #hero h1 {
    font-size: clamp(2.25rem, 8vw, 3.5rem);
  }

  .service-card {
    padding: 2rem !important;
  }

  .floating-accent {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    margin-top: 2rem;
    max-width: 100% !important;
  }
}

/* --- 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;
  }

  .hero-elem {
    opacity: 1;
    transform: none;
  }
}
