/* ============================================================
   WTS BYG — Mobile + Desktop Optimisation Layer v2
   Fixes: hero spacing, scroll cue overlap, card breathing,
   animations, tablet breakpoint, full mobile layout
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   1. HERO — Mobile: remove empty top space, fix scroll cue
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Push content to top instead of bottom */
  .hero {
    justify-content: flex-start !important;
  }

  /* Replace massive 6rem top padding with tight value */
  .hero__content {
    padding-top: clamp(1.25rem, 4vw, 2rem) !important;
    padding-bottom: 5.5rem !important; /* clearance for scroll cue */
  }

  .hero__left {
    gap: var(--space-5);
  }

  /* Scroll cue closer to bottom so it doesn't overlap */
  .hero__scroll-cue {
    bottom: 1rem;
  }

  /* CTA buttons: stack full-width */
  .hero__actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-3) !important;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__sub {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .hero__content {
    padding-top: 1rem !important;
    padding-bottom: 5rem !important;
  }

  .hero__heading {
    font-size: clamp(2.1rem, 10vw, 2.8rem) !important;
  }

  .hero__left {
    gap: var(--space-4);
  }
}

/* Hide scroll cue on very short screens (landscape mobile) */
@media (max-height: 600px) {
  .hero__scroll-cue { display: none; }
}

/* ══════════════════════════════════════════════════════════
   2. DESKTOP — hero centered, not bottom-heavy
   ══════════════════════════════════════════════════════════ */

@media (min-width: 769px) {
  .hero {
    justify-content: center;
  }

  .hero__content {
    padding-top: clamp(4rem, 8vw, 9rem);
    padding-bottom: clamp(4rem, 8vw, 9rem);
  }

  .hero__grid {
    align-items: center;
  }
}

/* ══════════════════════════════════════════════════════════
   3. TABLET (769–1024px)
   ══════════════════════════════════════════════════════════ */

@media (min-width: 769px) and (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__right {
    display: none;
  }

  .hero__content {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

/* ══════════════════════════════════════════════════════════
   4. MOBILE MENU
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .mobile-menu {
    padding: var(--space-6) var(--gutter) var(--space-10);
    gap: 0;
    overflow-y: auto;
  }

  .mobile-menu .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-5) 0;
  }

  /* CTA button inside mobile menu */
  .mobile-menu .btn-primary {
    margin-top: var(--space-6);
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════
   5. SERVICES GRID — show link arrow always on mobile
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: var(--space-6) var(--space-5);
  }

  /* No hover on mobile — always show arrow */
  .service-card__link {
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ══════════════════════════════════════════════════════════
   6. SPLIT SECTIONS
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .split { gap: var(--space-8); }
  .split__media { aspect-ratio: 16/9; border-radius: var(--radius-lg); }
  .split__text  { gap: var(--space-5); }
  .split__media-badge {
    bottom: var(--space-4); right: var(--space-4);
    padding: var(--space-3) var(--space-4);
    min-width: 110px;
  }
  .split__media-badge .num { font-size: var(--text-2xl); }
}

@media (min-width: 1025px) {
  .split { gap: clamp(4rem, 7vw, 7rem); }
}

/* ══════════════════════════════════════════════════════════
   7. CTA BANNER
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .cta-banner__content {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: var(--space-6);
  }
  .cta-banner__actions {
    justify-content: center;
    flex-direction: column;
    width: 100%;
    gap: var(--space-3);
  }
  .cta-banner__actions .btn,
  .cta-banner__actions .cta-phone {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════
   8. FOOTER
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .footer__legal { gap: var(--space-4); flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════════════════
   9. TRUST BAR
   ══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .trust-bar__inner { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .trust-item { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   10. FAQ
   ══════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .faq-trigger { padding: var(--space-4); }
  .faq-body__content { padding: 0 var(--space-4) var(--space-4) !important; }
}

/* ══════════════════════════════════════════════════════════
   11. SECTION + CONTAINER
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .section { padding-block: clamp(3rem, 7vw, 5rem); }
  .container { padding-inline: 1.1rem; }
  .section-header { margin-bottom: clamp(2rem, 5vw, 3rem); }
  .headline-xl { font-size: clamp(2rem, 9vw, 3.25rem); }
  .headline-lg { font-size: clamp(1.75rem, 8vw, 2.75rem); }
  .headline-md { font-size: clamp(1.5rem, 6vw, 2.25rem); }
  .headline-sm { font-size: clamp(1.25rem, 5vw, 1.75rem); }
  .feature-item { gap: var(--space-3); }
  .feature-item__text { font-size: var(--text-sm); }
}

/* Prevent overly long lines on wide screens */
.body-lg { max-width: 60ch; }
.section-header .body-lg { max-width: 52ch; margin-inline: auto; }
.section-header--left .body-lg { margin-inline: 0; }

/* ══════════════════════════════════════════════════════════
   12. FORMS — prevent iOS zoom on input focus
   ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    width: 100%;
    font-size: 16px !important;
  }
}

/* ══════════════════════════════════════════════════════════
   13. DESKTOP: card equal height + hover animations
   ══════════════════════════════════════════════════════════ */

@media (min-width: 769px) {
  .services-grid { align-items: stretch; }
  .card-glass.service-card { height: 100%; }
}

/* Refined card hover */
.card-glass {
  will-change: transform;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s cubic-bezier(0.16,1,0.3,1),
              background 0.3s ease,
              border-color 0.3s ease;
}
.card-glass:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
}

/* Project cards */
.project-card {
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.28s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(56,81,68,0.15);
}

/* City tags spring bounce */
.city-tag {
  transition: background 0.18s, color 0.18s, border-color 0.18s,
              transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.2s ease;
}
.city-tag:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(56,81,68,0.18);
}

/* Stat card hover */
.stat-card {
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease, background 0.3s ease;
}
.stat-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}

/* ══════════════════════════════════════════════════════════
   14. ENTRANCE ANIMATIONS — tuned timing
   ══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1),
              transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal--delay-1 { transition-delay: 80ms; }
.reveal--delay-2 { transition-delay: 160ms; }
.reveal--delay-3 { transition-delay: 240ms; }
.reveal--delay-4 { transition-delay: 330ms; }
.reveal--delay-5 { transition-delay: 420ms; }

.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1),
              transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1),
              transform 0.55s cubic-bezier(0.16,1,0.3,1);
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Hero badge pulse border */
.hero__badge { animation: badge-pulse 4s ease-in-out infinite; }
@keyframes badge-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,166,35,0); }
  50%      { box-shadow: 0 0 0 8px rgba(245,166,35,0.07); }
}

/* ══════════════════════════════════════════════════════════
   15. REDUCED MOTION
   ══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-scale {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .hero__badge { animation: none !important; }
  .hero__badge-dot { animation: none !important; }
  .scroll-line { animation: none !important; }
}

/* ══════════════════════════════════════════════════════════
   16. MISC
   ══════════════════════════════════════════════════════════ */

/* Tap highlight off on buttons */
.btn { -webkit-tap-highlight-color: transparent; }

/* Font smoothing */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Lazy image fade */
img[loading="lazy"] { opacity: 0; transition: opacity 0.4s ease; }
img[loading="lazy"].loaded { opacity: 1; }

/* Print */
@media print {
  .navbar, .mobile-menu, .hero__scroll-cue, .cta-banner { display: none !important; }
  .hero { min-height: auto; padding: 2rem 0; }
}
