/* =========================================================
   AL WATIRA — Responsive rules and motion preferences
   Breakpoints follow Bootstrap 5: lg = 992px, md = 768px
   No section uses a fixed pixel height that could leave a gap
   when the viewport changes. Heights come from content or from
   viewport units.
   ========================================================= */

/* ---------- Large screens ---------- */
@media (min-width: 1600px) {
  :root { --header-h: 92px; }
  .container-fluid { max-width: 1760px; margin-inline: auto; }
}

/* ---------- Below lg: navigation overlay and stacked layouts ---------- */
@media (max-width: 991.98px) {
  :root { --header-h: 72px; }

  /* backdrop-filter would make fixed children (the menu) position
     against the header instead of the viewport, so it is removed here */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--color-white);
  }

  /* Full-height overlay menu */
  .navbar-collapse {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--color-white);
    padding: 1.5rem 1.5rem 2.5rem;
    overflow-y: auto;
    border-top: 1px solid var(--color-line);
  }
  .navbar-nav { gap: 0 !important; }
  .nav-link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid var(--color-line);
  }
  .nav-link::after { display: none; }
  .btn-nav-cta { width: 100%; justify-content: center; margin-top: 2rem; }

  /* Hero: the photograph still covers the whole hero; content flows on top */
  .hero { min-height: 100svh; }
  .hero-content { padding-top: 3rem; }
  .hero-credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* About: stacked, images before copy */
  .about-visual { min-height: 0; margin-bottom: 3rem; }
  .about-image-main { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .about-image-accent { width: 66%; right: 0; bottom: -2.5rem; }
  .about-copy { padding-inline-start: 0; margin-top: 2.5rem; }

  /* Activities: the native scroller stays horizontal, with wider panels */
  .activity-panel { flex-basis: min(72vw, 620px); height: clamp(420px, 70vh, 540px); }

  /* Experience: the ribbon is decorative and hidden here */
  .timeline-ribbon { display: none; }

  /* Network */
  .network-sticky { position: static; }

  /* Brands */
  .brand-stage { min-height: 360px; }
  .brand-copy { padding-block: 3.5rem !important; }

  /* Partnerships */
  .process-line { grid-template-columns: 1fr; gap: 2.25rem; }
  .process-line::before { display: none; }
  .process-line li { padding-top: 1.75rem; border-top: 1px solid rgba(138, 205, 240, 0.35); }
  .process-line li::before { top: -6px; }

  /* Why: cards stack in normal document flow */
  .stack-card { position: relative; top: auto; transform: none; }

  /* Footer */
  .footer-links { justify-content: flex-start; margin-top: 1.5rem; }
  .site-footer { padding-top: 3.5rem; }

  /* Contact ribbon */
  .contact-ribbon { opacity: 0.35; }
}

/* ---------- Tablet and phones ---------- */
@media (max-width: 767.98px) {
  body { font-size: 1rem; }

  .hero-title { font-size: clamp(3.2rem, 17vw, 4.8rem); }
  .hero-foot { gap: 1.5rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-actions .text-link { align-self: center; }
  .hero-credentials li { font-size: 0.68rem; letter-spacing: 0.1em; }

  .about-facts > div { grid-template-columns: 1fr; gap: 0.25rem; }

  .statement-text { font-size: clamp(2rem, 9vw, 2.8rem); }

  /* Activities: panels sized for a comfortable one-at-a-time swipe */
  .activities-head { align-items: flex-start; }
  .activities-controls { width: 100%; justify-content: flex-end; }
  .activity-panel { flex-basis: 84vw; height: clamp(400px, 66svh, 480px); }
  .activity-body { padding: 1.5rem; }
  .activity-body p { font-size: 0.92rem; }

  .facility-row { grid-template-columns: 1fr; }
  .facility-kicker { grid-row: auto; padding-top: 0; }
  .facility-place { grid-column: 1; }
  .facility-row:hover { padding-inline-start: 0; }

  .brand-logo { width: 74%; }

  .partnerships-title { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .partnerships-cta .btn { width: 100%; justify-content: center; }

  .stack-card { padding: 1.75rem; min-height: 0; }

  .contact-actions .btn,
  .contact-actions .text-link { width: 100%; justify-content: center; }
  .contact-title { font-size: clamp(3rem, 15vw, 5rem); }

  .footer-links { flex-direction: column; gap: 0.6rem; }
  .back-to-top { right: 1rem; bottom: 1rem; }
}

/* ---------- Touch devices: no magnetic pull ---------- */
@media (hover: none) {
  .magnetic { transform: none !important; }
  .activity-panel:hover .activity-media > img { transform: none; }
}

/* ---------- Reduced motion: final states, no movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .loader-ribbon .ribbon-path { animation: none; stroke-dashoffset: 0; }
  .scroll-cue-line { animation: none; }

  /* Frames stay at their resting position: no parallax offset */
  .parallax-frame > img,
  .hero-media > img,
  .brand-logo {
    transform: none !important;
  }

  .activity-media > img { transform: none !important; }
  .magnetic { transform: none !important; }

  .stack-card { position: relative; top: auto !important; transform: none !important; }
  .statement-line { opacity: 1 !important; }

  /* Ribbons are drawn in full, not animated */
  .ribbon-path { stroke-dashoffset: 0 !important; }
}
