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

body {
  overflow-x: hidden;
}

::selection {
  background: #98D4C0;
  color: #081D30;
}

/* ========== Scroll Animations ========== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  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; }

/* ========== Hero Animations ========== */
.hero-subtitle {
  animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.hero-headline {
  animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.35s both;
}

.hero-desc {
  animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
}

.hero-btn-primary,
.hero-btn-secondary {
  animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.65s both;
}

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

/* ========== Navigation ========== */
.nav-scrolled #nav {
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(12, 43, 75, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #98D4C0;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ========== Mobile Menu ========== */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

.menu-open .menu-line:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-line:last-child {
  width: 1.4rem;
  transform: rotate(-45deg) translate(3px, -3px);
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: #98D4C0;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 100%;
}

/* ========== 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, #98D4C0, #74C0A8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ========== Buttons ========== */
.hero-btn-primary {
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, transform 0.3s ease;
}

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

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

.hero-btn-secondary {
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.3s ease;
}

/* ========== Form ========== */
input:focus,
textarea:focus {
  border-color: #98D4C0 !important;
  box-shadow: 0 0 0 3px rgba(152, 212, 192, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: rgba(12, 43, 75, 0.2);
}

/* ========== Decorative Divider ========== */
.section-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, #98D4C0, transparent);
}

/* ========== Responsive ========== */
@media (max-width: 767px) {
  .hero-headline {
    font-size: 2.75rem !important;
  }

  @media (min-width: 768px) {
    .hero-headline {
      font-size: 3.5rem !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;
  }
}
