/* ============================================================
   HEAT SMART LTD — responsive.css
   Breakpoints: 1200, 1024, 768, 480, 360
   ============================================================ */

/* ── LARGE DESKTOP ( > 1400px ) ─────────────────────────── */
@media (min-width: 1400px) {
  :root { --container: 1320px; }
  .hero-headline { font-size: 5.5rem; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── DESKTOP ( ≤ 1200px ) ───────────────────────────────── */
@media (max-width: 1200px) {
  .hero-container   { gap: 40px; }
  .hero-card-stack  { width: 340px; height: 420px; }
  .hero-card-front  { width: 300px; height: 360px; }
  .hero-card-mid    { width: 280px; height: 340px; }
  .hero-card-back   { width: 260px; height: 320px; }

  .tag-1 { right: -10px; }
  .tag-2 { right: -10px; }
  .tag-3 { right: -10px; }

  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .footer-grid   { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 32px; }
}

/* ── TABLET LANDSCAPE ( ≤ 1024px ) ─────────────────────── */
@media (max-width: 1024px) {
  :root { --section-pad: clamp(64px, 8vw, 100px); }

  /* Nav */
  .nav-phone { display: none; }
  .nav-links { gap: 0; }
  .nav-link  { padding: 8px 10px; font-size: 0.85rem; }

  /* Hero */
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .hero-content { max-width: 640px; }
  .hero-sub     { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats   { justify-content: center; }
  .hero-stat:first-child { padding-left: 28px; }
  .hero-visual  { display: none; }

  /* Solar split */
  .solar-split  { grid-template-columns: 1fr; gap: 56px; }
  .solar-right  { order: -1; }
  .solar-stats-grid { max-width: 480px; margin: 0 auto; }

  /* About */
  .about-split  { grid-template-columns: 1fr; gap: 48px; }
  .about-left   { display: none; }

  /* FAQ */
  .faq-split    { grid-template-columns: 1fr; gap: 48px; }
  .faq-left     { position: static; text-align: left; }

  /* Contact */
  .contact-split { grid-template-columns: 1fr; gap: 48px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }

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

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ── TABLET PORTRAIT ( ≤ 768px ) ────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  .nav-links { display: flex; }
  .hamburger { display: flex; }
  .btn-nav   { display: none; }
  .nav-logo .logo-text { display: block; }

  /* Nav overlay */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Hero */
  .hero-headline { font-size: clamp(2.4rem, 8vw, 3.5rem); }
  .hero-stats    { flex-wrap: wrap; gap: 24px; }
  .stat-divider  { display: none; }
  .hero-stat     { padding: 0 16px; }

  /* Trust bar */
  .trust-container  { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .trust-item       { flex-shrink: 0; }
  .trust-container::-webkit-scrollbar { height: 0; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); border-radius: var(--radius-lg); }

  /* Projects */
  .projects-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .project-item.tall-card { grid-row: span 1; }

  /* Testimonials */
  .testimonial-card { min-width: calc(100% - 0px); }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-bottom-left  { flex-direction: column; gap: 6px; align-items: flex-start; }
  .footer-bottom-right { gap: 16px; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 28px 20px; }

  /* CTA band */
  .cta-band-actions { flex-direction: column; align-items: stretch; }
  .cta-band-actions .btn-primary,
  .cta-band-actions .btn-outline { justify-content: center; }

  /* Back to top / whatsapp */
  #backToTop { bottom: 94px; right: 16px; }
  .whatsapp-float { right: 16px; bottom: 28px; }

  /* Cursor hide on touch */
  #cursor-dot, #cursor-spotlight { display: none; }
  body { cursor: auto; }
  button, a { cursor: pointer; }
}

/* ── MOBILE ( ≤ 480px ) ─────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --section-pad: 64px;
    --gutter: 20px;
  }

  /* Hero */
  .hero-headline { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-actions  { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-primary,
  .hero-actions .btn-ghost { justify-content: center; }
  .hero-badge    { font-size: 0.72rem; }

  /* Section titles */
  .section-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }

  /* Trust bar — hide on very small */
  .trust-divider { display: none; }
  .trust-item    { padding: 8px 16px; }

  /* Solar stats */
  .solar-stats-grid { grid-template-columns: 1fr 1fr; }
  .solar-stat-val   { font-size: 1.8rem; }

  /* Stats */
  .stats-grid     { grid-template-columns: 1fr 1fr; }
  .stat-item      { padding: 32px 20px; }
  .stat-big       { font-size: 2.2rem; }

  /* Projects — single column */
  .projects-masonry { grid-template-columns: 1fr; grid-auto-rows: 220px; }

  /* Filter bar */
  .filter-bar  { gap: 6px; }
  .filter-btn  { padding: 7px 14px; font-size: 0.78rem; }

  /* Services */
  .service-card { padding: 24px 20px; }

  /* Testimonials */
  .testimonial-card { padding: 24px 20px; }

  /* FAQ */
  .faq-split { gap: 36px; }
  .faq-question { font-size: 0.9rem; padding: 18px 0; }

  /* Section header */
  .section-header { margin-bottom: 40px; }

  /* Contact form */
  .contact-form-card h3 { font-size: 1.15rem; }

  /* Footer */
  .footer-body { padding-top: 40px; padding-bottom: 24px; }
  .footer-col h4 { margin-bottom: 12px; }

  /* Scroll indicator hide */
  .scroll-indicator { display: none; }
}

/* ── VERY SMALL ( ≤ 360px ) ─────────────────────────────── */
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .hero-headline { font-size: 1.9rem; }
  .nav-container { gap: 16px; }
  .nav-logo .logo-text { font-size: 0.95rem; }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
  #navbar,
  #cursor-dot,
  #cursor-spotlight,
  #scroll-progress,
  #backToTop,
  .whatsapp-float,
  .blob,
  #particles-canvas,
  .scroll-indicator,
  .hero-card-stack { display: none !important; }

  body   { background: white; color: black; cursor: auto; }
  a      { color: black; }
  #hero  { min-height: auto; padding: 40px 0; }
  .hero-container { grid-template-columns: 1fr; }
}

/* ── HIGH CONTRAST MODE ──────────────────────────────────── */
@media (forced-colors: active) {
  .btn-primary, .btn-ghost, .btn-outline, .btn-nav {
    border: 2px solid ButtonText;
  }
  .service-card, .testimonial-card, .contact-form-card {
    border: 1px solid ButtonText;
  }
}
