/* ==========================================================
   ScoutRex -- Mobile / Phone Mode Stylesheet
   Breakpoints: 768px (tablet) | 560px (large phone) | 480px (phone) | 380px (small phone)
   ========================================================== */

/* -- GLOBAL ------------------------------------------------ */
@media (max-width: 768px) {
  .container { padding: 0 18px; }
  .section   { padding: 64px 0; }

  /* Shrink nav logo (inline style:72px needs !important) */
  .nav-logo img { height: 48px !important; }
  .nav-inner    { height: 64px; }

  /* Hero padding-top matches nav height */
  #hero { padding-top: 64px; }

  /* Footer bottom row -- stack */
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
    text-align: center;
  }
  .footer-bottom-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
  }

  .footer-brand p { max-width: 100%; }
  .stat-item { padding: 20px 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section   { padding: 52px 0; }

  .nav-logo img { height: 40px !important; }
  .nav-inner    { height: 56px; }
  #hero         { padding-top: 56px; }

  .btn    { padding: 11px 20px; font-size: 14px; gap: 6px; }
  .btn-lg { padding: 14px 28px; font-size: 15px; }

  .section-title { font-size: 1.65rem !important; }
  .section-sub   { font-size: 0.97rem; }
}

@media (max-width: 360px) {
  .container { padding: 0 12px; }
  .section   { padding: 44px 0; }
  .btn-lg    { padding: 13px 22px; font-size: 14px; }
}


/* -- NAVBAR / MOBILE MENU ---------------------------------- */
@media (max-width: 768px) {
  .nav-cta   { display: none !important; }
  .nav-links { display: none !important; }
  .hamburger { display: flex !important; }

  /* Mobile menu: scroll-safe layout so Login/theme-toggle always reachable */
  .mobile-menu {
    overflow-y: auto !important;
    justify-content: flex-start !important;
    padding: 80px 20px 40px !important;
    gap: 14px !important;
  }
  .mobile-menu a {
    padding: 10px 20px;
    font-size: 1.1rem;
  }
  .mobile-menu button.theme-toggle {
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .mobile-menu {
    padding: 70px 16px 32px !important;
    gap: 10px !important;
  }
  .mobile-menu a { font-size: 1.05rem; }
}


/* -- INDEX -- HERO ----------------------------------------- */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr !important;
    padding: 56px 0 48px;
    gap: 36px;
  }

  .hero-title {
    font-size: clamp(2rem, 9vw, 3rem) !important;
    letter-spacing: -0.3px;
    margin-bottom: 18px;
  }

  .hero-sub {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-interface-body { padding: 18px; }
  .hi-score-val        { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .hero-content  { padding: 44px 0 36px; gap: 28px; }
  .hero-title    { font-size: 1.9rem !important; }
  .hero-badge    { font-size: 11px; padding: 5px 12px; }

  .hero-interface-body   { padding: 14px; }
  .hi-score-card         { padding: 14px; margin-bottom: 10px; }
  .hi-score-val          { font-size: 1.4rem; }
  .hi-score-label        { font-size: 10px; }
  .hi-match              { padding: 10px 12px; gap: 10px; }
  .hi-match-icon         { width: 28px; height: 28px; font-size: 12px; }
  .hi-match-name         { font-size: 12px; }
  .hi-match-role         { font-size: 10px; }
  .hi-match-pct          { font-size: 12px; }
}


/* -- INDEX -- VALUE PILLARS -------------------------------- */
@media (max-width: 768px) {
  .pillars-grid { margin-top: 36px; gap: 16px; }
  .pillar       { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .pillar       { padding: 24px 20px; border-radius: 18px; }
  .pillar-icon  { width: 44px; height: 44px; margin-bottom: 18px; }
  .pillar-title { font-size: 1rem; }
}


/* -- INDEX -- PLATFORMS ------------------------------------ */
@media (max-width: 768px) {
  .platforms-grid { margin-top: 36px; gap: 16px; }
  .platform-card  { padding: 36px 28px; border-radius: 22px; }
}

@media (max-width: 480px) {
  .platform-card { padding: 28px 20px; border-radius: 18px; }
  .pc-name       { font-size: 1.5rem; }
  .pc-desc       { font-size: 14px; }
  .pc-deco       { width: 150px; height: 150px; bottom: -30px; right: -30px; }
}


/* -- INDEX -- AI SECTION ----------------------------------- */
@media (max-width: 768px) {
  #ai-section   { padding: 64px 0; }
  .ai-grid      { margin-top: 36px; gap: 32px; }
  .ai-steps     { gap: 16px; }
  .ai-step      { padding: 20px 18px; }
}

@media (max-width: 480px) {
  .ai-step          { padding: 16px 14px; gap: 12px; border-radius: 12px; }
  .ai-step-num      { width: 30px; height: 30px; font-size: 12px; }
  .ai-step-content h4 { font-size: 0.92rem; }
  .ai-step-content p  { font-size: 13px; }

  .ai-card          { padding: 20px 16px; }
  .ai-bar-label     { width: 80px; font-size: 11px; }
  .ai-bar-pct       { font-size: 11px; width: 30px; }
}


/* -- INDEX -- STATS ---------------------------------------- */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stat-item {
    padding: 24px 12px;
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }
  .stat-item:nth-child(2n) { border-right: none !important; }
  .stat-item:nth-last-child(-n+2) { border-bottom: none !important; }
  .stat-num   { font-size: 2.4rem; }
}

@media (max-width: 400px) {
  .stat-num   { font-size: 2rem; }
  .stat-label { font-size: 12px; }
}


/* -- INDEX -- CTA SECTION ---------------------------------- */
@media (max-width: 768px) {
  .cta-inner .section-title { font-size: 1.8rem !important; }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .cta-actions .btn {
    width: 100%;
    max-width: 360px;
    justify-content: center;
  }
}


/* -- ABOUT PAGE -------------------------------------------- */
@media (max-width: 768px) {
  .mission-cards { gap: 16px; margin-top: 32px; }
  .values-grid   { gap: 16px; margin-top: 32px; }
  .mission-card  { padding: 24px 20px; border-radius: 14px; }
}

@media (max-width: 480px) {
  .mission-card h3 { font-size: 1rem; }
  .mission-card p  { font-size: 13.5px; }
  .story-content p { font-size: 0.97rem; }
}


/* -- TEAM PAGE --------------------------------------------- */
@media (max-width: 900px) {
  .team-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 560px) {
  .team-grid {
    grid-template-columns: 1fr !important;
    max-width: 380px;
    margin: 0 auto;
  }
  .team-section { padding: 56px 0; }
  .team-card    { padding: 32px 24px 28px; }
  .team-intro   { margin-bottom: 44px; }
  .team-intro h2 { font-size: 1.6rem !important; }
}


/* -- CONTACT PAGE ------------------------------------------ */
@media (max-width: 768px) {
  .contact-layout     { grid-template-columns: 1fr !important; gap: 32px; margin-top: 32px; }
  .contact-form-wrap  { padding: 28px 20px; border-radius: 14px; }
}

@media (max-width: 480px) {
  .contact-form-wrap  { padding: 22px 16px; }
  .contact-info h3    { margin-bottom: 20px; }
}


/* -- PRICING PAGE ------------------------------------------ */
@media (max-width: 640px) {
  .pricing-preview-grid {
    grid-template-columns: 1fr !important;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 32px;
  }
}

@media (max-width: 480px) {
  .pricing-preview-card { padding: 28px 20px !important; border-radius: 18px !important; }
}


/* -- LOGIN / AUTH PAGES ------------------------------------ */
@media (max-width: 900px) {
  .login-left { display: none !important; }
  .login-right { flex: 1 !important; padding: 40px 24px !important; }
}

@media (max-width: 480px) {
  .login-right     { padding: 28px 16px !important; }
  .login-form-wrap { max-width: 100%; }
  .type-toggle     { margin-bottom: 24px; }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
}


/* -- ACCOUNT / DASHBOARD PAGE ------------------------------ */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .grid-3 { grid-template-columns: 1fr 1fr !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
}


/* -- FOOTER (all pages) ------------------------------------ */
@media (max-width: 768px) {
  footer { padding: 56px 0 0; }
  .footer-top { gap: 28px; padding-bottom: 32px; }
}

@media (max-width: 480px) {
  .footer-top { gap: 24px; }
  .footer-col-title { font-size: 11px; }
  .footer-col ul li a { font-size: 13px; }
  .footer-bottom-left { font-size: 11px; }
  .footer-bottom-right a { font-size: 11px; }
}


/* -- HERO (all inner pages with .hero class) --------------- */
@media (max-width: 768px) {
  .hero          { min-height: 44vh; padding-top: 64px; }
  .hero h1       { font-size: clamp(1.8rem, 7vw, 2.5rem) !important; }
  .hero-cta      { flex-direction: column; align-items: center; gap: 10px; }
  .hero-cta .btn { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) {
  .hero          { min-height: 38vh; padding-top: 56px; }
  .hero h1       { font-size: 1.75rem !important; }
  .hero .section-sub { font-size: 0.95rem; }
}


/* -- REXI CHATBOT (all pages) ------------------------------ */
@media (max-width: 480px) {
  #rexi-bubble   { bottom: 16px; right: 16px; }
  .rexi-panel    { width: calc(100vw - 32px) !important; max-height: 420px; }
  .rexi-toggle   { width: 52px !important; height: 52px !important; }
  .rexi-toggle-icon img { width: 48px !important; height: 48px !important; }
  .rexi-suggestions { padding: 0 8px 8px; gap: 5px; }
  .rexi-chip        { font-size: 11px; padding: 5px 10px; }
}


/* -- PRODUCTS PAGE ----------------------------------------- */
@media (max-width: 480px) {
  .product-cell  { padding: 24px 16px !important; border-radius: 14px !important; }
  .products-stack { padding: 0 12px !important; }
}


/* -- SMALL PHONE SAFETY NET -------------------------------- */
@media (max-width: 360px) {
  img, video, iframe { max-width: 100%; }
  .hero-title   { font-size: 1.7rem !important; }
  .section-title { font-size: 1.5rem !important; }
  .btn { font-size: 13px; padding: 10px 18px; }
  .btn-lg { font-size: 14px; padding: 12px 22px; }
}
