/* ============================================================
   RESPONSIVE — tablet and mobile rebuilds (not just shrinking)
   Breakpoints: 1024, 768, 480, 414, 390, 375, 320
   ============================================================ */

/* ---------- Tablet ---------- */
@media (max-width: 1024px){
  :root{ --section-pad: clamp(72px, 10vw, 140px); }
  .about__grid, .vision__grid, .why__interface, .contact__grid, .leadership__grid{
    grid-template-columns: 1fr;
  }
  .about__grid{ gap: 40px; }
  .about__media{ order: -1; }
  .why__interface{ min-height: auto; }
  .why__stage{ min-height: 360px; }
  .testimonial-grid{ grid-template-columns: 1fr 1fr; }
  .footer__top{ flex-direction:column; }
}

/* Mobile menu panel is hidden by default at every width. Its
   position/transform/etc. only exist inside the max-width:960px
   block below (they don't apply above that), so without this
   unconditional rule the panel falls back to a plain static block
   sitting in normal document flow at desktop widths — visible,
   unstyled, and overlapping the header. Keep this rule outside any
   media query. */
.mobile-menu{ display:none; }

/* ---------- Nav: switch to compact/burger mode earlier than the
   general content breakpoint. Six links + the brand lockup + a CTA
   button don't reliably fit a laptop-narrow window (900–1024px),
   which is what caused the header to feel crowded/overlapping. ---------- */
@media (max-width: 960px){
  .nav{ padding: 16px 20px; }
  .nav__links, .nav__cta .btn--ghost{ display:none; }
  .nav__brand{ gap: 10px; font-size: 0.92rem; }
  .brand-mark{ width: 34px; height: 34px; }
  /* Full legal suffix is unnecessary weight in a tight header —
     the wordmark alone is enough for brand recognition here. */
  .nav__brand small{ display:none; }
  .nav__burger{
    display:flex; align-items:center; justify-content:center;
    width: 40px; height: 40px; position: relative; z-index: 600;
  }
  .nav__burger span{
    display:block; width: 20px; height: 1px; background: var(--nav-fg);
    position:absolute; left:10px; transition: transform 0.35s var(--ease-premium), opacity 0.3s, background 0.3s;
  }
  .nav__burger span:first-child{ top: 17px; }
  .nav__burger span:last-child{ top: 23px; }
  .nav.is-open .nav__burger span:first-child{ transform: translateY(3px) rotate(45deg); }
  .nav.is-open .nav__burger span:last-child{ transform: translateY(-3px) rotate(-45deg); }
  /* The open menu panel is always light, regardless of scroll position —
     force the burger dark so it stays legible while open. */
  .nav.is-open .nav__burger span{ background: var(--text-primary); }

  /* Compact, corporate mobile menu: full-screen cream panel, content
     starts a modest distance below the fixed logo/X row (not vertically
     centered — avoids a big empty top gap), links centered, no
     separators, no oversized display-font typography. */
  .mobile-menu{
    position: fixed; inset:0; background: var(--bg-primary); z-index: 550;
    display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
    padding: 92px 28px 32px;
    overflow-y: auto;
    transform: translateY(-100%); transition: transform 0.55s var(--ease-premium);
  }
  .mobile-menu.is-open{ transform: translateY(0); }
  .mobile-menu a{
    font-family: var(--font-body); font-weight: 500;
    font-size: clamp(17px, 4vw, 20px);
    padding: 10px 0; color: var(--text-muted);
  }
  .mobile-menu a:hover{ color: var(--text-primary); }
  .mobile-menu .btn{
    margin-top: 20px;
    background: var(--accent); border-color: var(--accent); color: var(--bg-primary);
    padding: 13px 26px; font-size: 13px;
  }
}
 
/* ---------- Mobile (<=768) — content rebuilds ---------- */
@media (max-width: 768px){
  .hero__scroll{ display:none; }
  .hero__ctas{ flex-direction:column; align-items: stretch; }
  .hero__ctas .btn{ justify-content:center; }
  .hero__footer{ flex-direction:column; align-items:flex-start; gap: 16px; bottom: 20px; }
 
  .section{ padding: clamp(64px, 16vw, 100px) 0; }
  .about__grid, .vision__grid, .why__interface, .contact__grid, .project-panel, .leadership__grid{
    grid-template-columns: 1fr !important;
  }
  .project-panel__media{ order: -1 !important; }
  .why__nums{ flex-direction: row; overflow-x: auto; gap: 4px; }
  .why__num-item{ flex: 0 0 auto; border-top:none; border-bottom: 2px solid var(--line); padding: 10px 14px; }
  .why__num-item.is-active{ border-bottom-color: var(--accent); }
  .why__num-item .t{ display:none; }
  .why__interface{ min-height: auto; }
  .why__stage{ min-height: 320px; }
 
  .approach__track{ grid-template-columns: 1fr; }
  .approach__stage{ grid-template-columns: 1fr; gap: 10px; }
  .approach__rail{ display:none; }
  .approach__stages{ gap: 44px; }
 
  .testimonial-grid{ grid-template-columns: 1fr; }
 
  /* Leadership cards: tighter box + a centered profile-card header
     (square photo, name, role) instead of the left-flowing desktop
     layout — reads as a compact card on a narrow screen rather than
     a long column of running text. */
  .leadership__card{ padding: 26px 22px; gap: 18px; }
  .leadership__photo{ width: 96px; aspect-ratio: 1/1; margin: 0 auto; }
  .leadership__name{ text-align:center; }
  .leadership__role{ text-align:center; }
  .leadership__intro{ text-align:center; }
  .leadership__tags{ justify-content:center; }
 
  .footer__top{ flex-direction:column; gap: 30px; }
  .footer__cols{ flex-wrap: wrap; gap: 30px; }
 
  .trust__row{ gap: 24px 40px; }
  .cursor{ display:none; }
}
 
/* ---------- Small phones ---------- */
@media (max-width: 480px){
  .hero__headline{ font-size: clamp(2.1rem, 9vw, 2.8rem); }
  .section-head h2{ font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .philosophy blockquote{ font-size: clamp(1.4rem, 7vw, 1.9rem); }
  .btn{ padding: 15px 22px; font-size: 12px; }
  .container{ padding: 0 20px; }
}
 
/* ---------- Short viewports (landscape phones/tablets) ----------
   Prevents the vertical scroll indicator from overlapping the hero
   CTAs when there isn't much height to work with. */
@media (max-height: 640px){
  .hero__scroll{ display:none; }
  .hero{ min-height: 460px; }
}