/* ============================================================
   THINKADS — Responsive Stylesheet
   Mobile-first breakpoints: Tablet (≤1199px), Mobile (≤767px)
   ============================================================ */

/* ── Tablet: 768px – 1199px ───────────────────────────────── */
@media (max-width: 1199px) {

  /* Typography */
  :root {
    --fs-hero: clamp(2.5rem, 7vw, 6rem);
  }

  /* Layout */
  .container { padding-inline: 2rem; }
  .section    { padding-block: 4rem; }
  .section--lg{ padding-block: 6rem; }

  /* Navbar */
  .navbar__nav,
  .navbar__cta {
    display: none;
  }
  .navbar__hamburger { display: flex; }
  .theme-toggle {
    margin-left: auto;
    margin-right: 0.5rem;
  }

  /* Hero */
  .hero__content { max-width: 100%; }

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

  /* About */
  .about__layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Services */
  .services__bento {
    grid-template-columns: repeat(4, 1fr);
  }
  .service-card:nth-child(1) { grid-column: 1 / 3; }
  .service-card:nth-child(2) { grid-column: 3 / 5; }
  .service-card:nth-child(3) { grid-column: 1 / 3; }
  .service-card:nth-child(4) { grid-column: 3 / 5; }
  .service-card:nth-child(5) { grid-column: 1 / 3; }
  .service-card:nth-child(6) { grid-column: 3 / 5; }

  /* Process */
  .process__steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .process__steps::before { display: none; }

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

  /* Contact */
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  /* Features / Pricing */
  .features-grid  { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid   { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

/* ── Mobile: ≤ 767px ──────────────────────────────────────── */
@media (max-width: 767px) {

  /* Typography */
  :root {
    --fs-hero: clamp(2.2rem, 10vw, 3.5rem);
    --fs-h1:   clamp(1.8rem, 7vw, 3rem);
    --fs-h2:   clamp(1.5rem, 5vw, 2.2rem);
  }

  /* Disable custom cursor on mobile */
  body { cursor: auto !important; }
  .cursor, .cursor-dot, .cursor-label { display: none !important; }
  button { cursor: pointer; }
  a      { cursor: pointer; }
  .btn   { cursor: pointer; }

  /* Reduce particle/blob animations for performance */
  .blob, .hero__glow { display: none; }
  #particle-canvas   { display: none; }

  /* Layout */
  .container   { padding-inline: 1.25rem; }
  .section     { padding-block: 3rem; }
  .section--lg { padding-block: 4rem; }

  /* Hero */
  .hero {
    padding-top: 5rem;
    min-height: 100svh;
    align-items: flex-end;
    padding-bottom: 5rem;
  }
  .hero__heading { letter-spacing: -0.03em; }
  .hero__sub     { max-width: 100%; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .hero__scroll  { display: none; }
  .hero__bg-image { opacity: 0.25; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item  { padding: 1.5rem 1rem; }
  .stat-item::before { display: none; }
  .stat-item + .stat-item::before {
    display: block;
    left: 0;
    top: 10%;
    height: 80%;
  }

  /* About */
  .about__layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about__image-wrapper { aspect-ratio: 16/9; }

  /* Services */
  .services__bento {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .service-card:nth-child(n) { grid-column: 1 / -1; }

  /* Process */
  .process__steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .process__steps::before { display: none; }
  .process-step { text-align: left; display: flex; gap: 1.25rem; align-items: flex-start; }
  .process-step__num { margin: 0; flex-shrink: 0; }

  /* Cases */
  .cases__grid { grid-template-columns: 1fr; }

  /* Testimonials */
  .testimonial-card { width: min(280px, 85vw); }

  /* FAQ */
  .faq-question { padding: 1.25rem 1.25rem; }
  .faq-answer-inner { padding: 0 1.25rem 1.25rem; }
  .faq__list { margin-inline: 0; }

  /* Footer */
  .footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .footer__newsletter-form { flex-direction: column; }
  .footer__newsletter-input { width: 100%; }

  /* Floating buttons — scale down on small screens and avoid browser UI */
  .float-btn--whatsapp { right: 1rem; bottom: calc(5rem + env(safe-area-inset-bottom, 1rem)); }
  .float-btn--call     { left: 1rem; bottom: calc(5rem + env(safe-area-inset-bottom, 1rem)); }
  .float-btn__link { width: 50px; height: 50px; }
  .float-btn__label { display: none; }

  /* Navbar */
  .navbar__hamburger { display: flex; cursor: pointer; }
  .navbar__nav, .navbar__cta { display: none; }
  .theme-toggle {
    margin-left: auto;
    margin-right: 0.5rem;
  }
  .navbar__logo-icon {
    width: 50px;
    height: 50px;
    padding-bottom: 4px;
  }
  .navbar__logo-text {
    font-size: 1.75rem;
  }
  .navbar__logo-sub {
    font-size: 0.6rem;
  }

  /* CTA Section */
  .cta-section__border { inset: 0.75rem; border-radius: var(--radius-lg); }

  /* Features */
  .features-grid { grid-template-columns: 1fr; }

  /* Pricing */
  .pricing-grid  { grid-template-columns: 1fr; max-width: 100%; }

  /* Page hero */
  .page-hero { padding-top: 7rem; min-height: auto; }

  /* Contact */
  .contact__grid { gap: 2rem; }

  /* Grid overrides */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  /* Buttons */
  .btn { width: 100%; justify-content: center; }
  .hero__actions .btn { width: auto; }

  /* Section headers */
  .section-header p { margin-inline: 0; }
}

/* ── Small Mobile: ≤ 380px ────────────────────────────────── */
@media (max-width: 380px) {
  :root {
    --fs-hero: clamp(1.9rem, 11vw, 2.8rem);
  }
  .hero__actions { gap: 0.75rem; }
  .stat-number { font-size: 2rem; }
  .navbar__logo-icon {
    width: 44px;
    height: 44px;
    padding-bottom: 3px;
  }
  .navbar__logo-text {
    font-size: 1.6rem;
  }
  .navbar__logo-sub {
    font-size: 0.55rem;
  }
}

/* ── Landscape Mobile ─────────────────────────────────────── */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-block: 6rem 3rem;
  }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .navbar,
  .mobile-menu,
  .cursor,
  .cursor-dot,
  .float-btn,
  #page-loader,
  #scroll-progress,
  #particle-canvas {
    display: none !important;
  }
  body { background: white; color: black; }
}

/* ── High DPI / Retina ────────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .cursor { border-width: 0.75px; }
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .marquee-track { animation: none !important; }
  .blob { animation: none !important; }
  .hero__glow { animation: none !important; }

  /* Restore reveal elements instantly */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ── Dark Mode (already dark by default) ──────────────────── */
@media (prefers-color-scheme: light) {
  /* Site is intentionally dark-only; no light mode overrides needed */
}
