/* ==========================================================================
   RESPONSIVE — 10 breakpoints
   Mobile-first. Targets: 320 / 375 / 480 / 640 / 768 / 1024 / 1280 / 1366 / 1600 / 1920
   ========================================================================== */

/* Hide Astra site title (keep only logo, cleaner header on all sizes) */
.site-title,
body .site-title,
.ast-site-identity .site-title,
.ast-header-builder-wrap .site-title,
.site-logo-img + .ast-site-title-wrap,
.ast-site-title-wrap,
.site-description,
.ast-site-title-wrap { display: none !important; }

/* Smartphone S (320–374) ------------------------------------------------- */
@media (max-width: 374px) {
  :root { --space-md: 16px; --space-lg: 24px; --space-xl: 40px; }
  .ca-container { padding-inline: var(--space-sm); }
  .ca-hero__title { font-size: clamp(2rem, 8vw, 2.5rem); }
  .ca-hero__sub   { font-size: var(--fs-sm); }
  .ca-hero__actions { flex-direction: column; width: 100%; }
  .ca-hero__actions .ca-btn { width: 100%; }
  .ca-hero__stats { grid-template-columns: 1fr; gap: var(--space-xs); }
  .ca-service-card { min-height: auto; padding: var(--space-md); }
  .ca-footer__grid { gap: var(--space-lg); }
  .ca-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* Smartphone (375–479) --------------------------------------------------- */
@media (min-width: 375px) and (max-width: 479px) {
  .ca-hero__stats { grid-template-columns: repeat(3, 1fr); }
  .ca-hero__actions { flex-direction: column; width: 100%; }
  .ca-hero__actions .ca-btn { width: 100%; justify-content: center; }
}

/* Smartphone / all portrait (≤ 639) -------------------------------------- */
@media (max-width: 639px) {
  .ca-hero { min-height: 88vh; }
  .ca-hero__visual { display: none; }       /* hide mockup on small devices */
  .ca-hero__content { max-width: 100%; text-align: left; }

  .ca-tech-stack__track { animation-duration: 28s; }

  .ca-plan--featured { transform: none; }
  .ca-testimonial { padding: var(--space-md); }
  .ca-cta { padding: var(--space-lg); border-radius: var(--radius-md); }

  /* FAQ tighter */
  .ca-faq__item summary { font-size: var(--fs-base); }

  /* Tables with horizontal scroll indicator */
  .ca-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .ca-table-scroll > * { scroll-snap-align: start; min-width: 260px; }

  /* Swiss map simplify */
  .ca-swiss-map svg text { display: none; }
  .ca-swiss-map .canton { stroke-width: 0.8; }
}

/* Tablette portrait (640–767) -------------------------------------------- */
@media (min-width: 640px) and (max-width: 767px) {
  .ca-container { padding-inline: var(--space-md); }
  .ca-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ca-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ca-hero__visual { display: block; margin-top: var(--space-lg); }
  .ca-hero__content { max-width: 100%; }
}

/* Tablette paysage / 10" (768–1023) -------------------------------------- */
@media (min-width: 768px) and (max-width: 1023px) {
  .ca-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ca-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ca-hero { min-height: auto; padding-block: var(--space-xl); }
  .ca-hero__title { font-size: clamp(2.25rem, 5vw, 3rem); }
  /* Force stacked layout 768-1023 — side-by-side with tiny visual looks cramped */
  .ca-hero__inner { grid-template-columns: 1fr !important; }
  .ca-hero__content { max-width: 100%; }
  .ca-hero__visual { max-width: 600px; margin: var(--space-lg) auto 0; }
  /* Hide floating cards (they overlap with mockup at narrow widths) */
  .ca-hero__float-card--1, .ca-hero__float-card--2 { display: none; }
  /* Hero tech badges reposition */
  .ca-hero__tech-badge--1 { top: 0; left: 5%; }
  .ca-hero__tech-badge--2 { top: 15%; right: 0; }
  .ca-hero__tech-badge--3 { bottom: 20%; left: 0; }
  .ca-hero__tech-badge--4 { bottom: 5%; right: 10%; }
}

/* Hero side-by-side from 768+ */
@media (min-width: 768px) {
  .ca-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
  }
}

/* Laptop 13" (1024–1279) ------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ca-container { max-width: 960px; }
  .ca-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .ca-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .ca-hero__title { font-size: clamp(3rem, 4.5vw, 3.75rem); }
}

/* Laptop 14" (1280–1365) ------------------------------------------------- */
@media (min-width: 1280px) and (max-width: 1365px) {
  .ca-container { max-width: 1140px; }
  .ca-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

/* Laptop 15.6" / Desktop HD (1366–1599) ---------------------------------- */
@media (min-width: 1366px) and (max-width: 1599px) {
  .ca-container { max-width: 1280px; }
  .ca-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Desktop (1600–1919) ---------------------------------------------------- */
@media (min-width: 1600px) and (max-width: 1919px) {
  .ca-container { max-width: 1440px; }
  .ca-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Desktop QHD+ (≥1920) --------------------------------------------------- */
@media (min-width: 1920px) {
  .ca-container { max-width: 1520px; }
  .ca-hero__title { font-size: 6rem; }
  .ca-section { padding-block: var(--space-3xl); }
}

/* Orientation-specific ---------------------------------------------------- */
@media (max-width: 1023px) and (orientation: landscape) {
  .ca-hero { min-height: 100vh; }
}

/* Ultra-small height (landscape phone) ----------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .ca-hero { min-height: 100vh; padding-block: var(--space-lg); }
  .ca-hero__stats { display: none; }
}

/* Touch vs pointer ------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  .ca-service-card:hover { transform: translateY(-6px); }
}
@media (hover: none) {
  .ca-service-card:hover { transform: none; }  /* disable hover lifts on touch */
}

/* Print styles ----------------------------------------------------------- */
@media print {
  .ca-hero, .ca-cta, .main-header-bar, .ca-footer, .ca-hero__orb { display: none !important; }
  body { color: #000; background: #fff; }
}
