/* =====================================================================
   AURA DESIGNS — Responsive rules
   Breakpoints (max-width): 1200 / 992 / 768 / 560 / 400
   Mobile-first base lives in style.css; these adapt down.
   ===================================================================== */

/* ---------- Large desktop tightening ---------- */
@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(2, 1fr); gap: 2.5rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-band .container--wide { grid-template-columns: repeat(2, 1fr); }
  .credentials { grid-template-columns: repeat(2, 1fr); }
  .credential:nth-child(odd) { border-left: 0; }
  .credential:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .section--dark .credential:nth-child(n + 3) { border-top-color: rgba(255, 255, 255, 0.14); }
  /* Seven nav items plus a CTA is a tight fit here — tighten, never wrap */
  .nav-link { padding-inline: 0.58rem; font-size: 0.855rem; }
  .nav-link::after { left: 0.58rem; right: 0.58rem; }
  .header-actions .btn { padding: 0.8rem 1.15rem; font-size: 0.85rem; }
  .brand-logo svg { height: 40px; }
}

/* ---------- Tablet / small laptop: collapse nav ---------- */
@media (max-width: 992px) {
  :root { --header-h: 68px; }

  .primary-nav,
  .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .header-actions { gap: 0.5rem; }

  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Stats become a 2-up plate; swap vertical rules for a grid of hairlines */
  .stats { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0 !important; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stats .stat:last-child { grid-column: 1 / -1; border-right: 0; }
  .section--dark .stat { border-color: rgba(255, 255, 255, 0.14); }

  .split { grid-template-columns: 1fr; gap: 2.75rem; }
  .split--reverse .split__media { order: 0; }
  .media-stack { max-width: 520px; }

  .footprint { grid-template-columns: 1fr; gap: 2.5rem; }
  .quote-split { grid-template-columns: 1fr; }
  .masonry { columns: 2; }

  /* Process: 2-up — recompute which edges carry a rule */
  .process { grid-template-columns: repeat(2, 1fr); }
  .process-step:nth-child(3n + 1), .process-step:nth-child(3n) {
    padding-inline: 1.75rem; border-left: 1px solid var(--line);
  }
  .process-step:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
  .process-step:nth-child(2n) { padding-right: 0; }
  .section--dark .process-step:nth-child(3n + 1),
  .section--dark .process-step:nth-child(3n) { border-left-color: rgba(255, 255, 255, 0.14); }

  .flow-arrow { display: none; }
  .flow-node { flex-basis: calc(50% - 0.75rem); }

  .mega, .dropdown { display: none; } /* dropdowns only on hover-capable desktop nav */
}

/* ---------- Tablet portrait / large phone ---------- */
@media (max-width: 768px) {
  :root { --section-y: clamp(3.25rem, 2rem + 5vw, 4.75rem); }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col-list { columns: 1; }

  .process { grid-template-columns: 1fr; }
  .process-step:nth-child(n) { padding: 1.75rem 0; border-left: 0; }

  .credentials { grid-template-columns: 1fr; }
  .credential { border-left: 0 !important; }
  .credential + .credential { border-top: 1px solid var(--line); }
  .section--dark .credential + .credential { border-top-color: rgba(255, 255, 255, 0.14); }

  .hero { min-height: 86vh; }
  .hero__media::after {
    background: linear-gradient(180deg, rgba(var(--scrim-rgb), 0.6) 0%, rgba(var(--scrim-rgb), 0.92) 100%);
  }
  .hero__card { grid-template-columns: repeat(3, 1fr); gap: 1rem; padding-top: 1.35rem; }
  .hero__card p { font-size: 0.76rem; }
  .hero__scroll { display: none; }
  .hero__blob--1 { opacity: 0.5; }

  .form-grid { grid-template-columns: 1fr; }
  .cta-band__actions { flex-direction: column; }
  .cta-band__actions .btn { width: 100%; }

  .faq-a p { padding-right: 1.25rem; }
  .footer-bottom .container--wide { flex-direction: column; text-align: center; }
  .flow-node { flex-basis: 100%; }
  .logo-wall { gap: 1.75rem 2.5rem; flex-wrap: wrap; justify-content: center; }
}

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  .stats, .split__media .stats { grid-auto-flow: row; grid-template-columns: 1fr; }
  .stat { border-right: 0 !important; }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .stats .stat:last-child { grid-column: auto; }

  .masonry { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-band .container--wide { grid-template-columns: 1fr; gap: 1.1rem; }

  /* No room for the overlap offsets at this width — square the stack up */
  .media-stack .media-stack__inset { right: 0; bottom: -1.25rem; width: 48%; }
  .media-stack__badge { left: 0; }
  .collection-card { min-height: 340px; }
  .collection-card__body p { max-height: 110px; opacity: 1; margin-bottom: 0.85rem; } /* always show on touch */
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav.prev { left: 0.5rem; }
  .lightbox__nav.next { right: 0.5rem; }

  .hero__actions .btn { width: 100%; }
  /* Arrows + three dots + counter will not fit a phone once the WhatsApp
     clearance is added — drop the counter and tighten the dots. */
  .hero__controls { gap: 0.55rem; margin-right: 3.5rem; }
  .hero__count { display: none; }
  .hero__dot { width: 24px; }
  .hero__nav { width: 40px; height: 40px; }
  .hero__nav svg { width: 16px; height: 16px; }
  .hero__card { grid-template-columns: 1fr; gap: 1.1rem; }
  .hero__card > div { display: flex; align-items: baseline; gap: 0.85rem; }
  .hero__card .k { font-size: 1.5rem; flex: none; }
  .hero__card p { margin-top: 0; }

  .spec-table th, .spec-table td { padding: 0.85rem 0.65rem; }
  .spec-table tbody th { width: 44%; }
}

/* ---------- Small phones ---------- */
@media (max-width: 400px) {
  .container, .container--wide { width: calc(100% - 1.75rem); }
  .brand-logo svg { height: 36px; }
  .btn { padding: 0.85rem 1.35rem; }
}

/* ---------- Short viewports: keep the hero CTAs above the fold ----------
   The hero's vertical budget is otherwise fixed, so on a 768px-tall laptop
   (~630px of viewport) or a short phone the buttons fell below the fold.
   These tiers compress the rhythm by height, independent of width.        */

/* Tier 1 — laptops at 1366x768 / 1440x900, tablets in landscape.
   Trims padding only, so the full-size headline survives. */
@media (max-height: 860px) {
  /* Fit the whole hero — headline, CTAs AND carousel controls — in the viewport */
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero__inner { padding-block: calc(var(--header-h) + clamp(1.35rem, 1rem + 1.75vw, 2.5rem)) 0; }
  .hero h1 { margin-block: 0.4rem 1rem; }
  .hero .lead { font-size: 1rem; line-height: 1.55; }
  .hero__actions { margin-top: 1.6rem; }
  /* The credential strip repeats the stats band immediately below it, so on a
     short screen it is the one thing worth giving up to keep the controls up. */
  .hero__card { display: none; }
  .hero__foot { justify-content: flex-end; padding-block: 1.4rem 1.6rem; }
  /* Clear the fixed WhatsApp button, which shares this corner */
  .hero__controls { margin-right: 4rem; }
  .hero__scroll { bottom: clamp(4.5rem, 7vh, 6rem); }

  /* Inner-page heroes carry the same CTAs and the same problem */
  .page-hero {
    padding-top: calc(var(--header-h) + clamp(2.25rem, 1.5rem + 2.75vw, 4rem));
    padding-bottom: clamp(2rem, 1.5rem + 2.5vw, 3.75rem);
  }
  .page-hero h1 { margin-block: 0.5rem 0.85rem; }
}

/* Tier 2 — type scales down too. Phones need this by 720px of height;
   laptops keep the big headline until the viewport is genuinely short. */
@media (max-height: 720px) and (max-width: 992px),
       (max-height: 600px) {
  /* Still fill the screen — content is bottom-aligned, so the CTAs stay up */
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero__inner { padding-block: calc(var(--header-h) + 1.4rem) 1rem; }
  .hero h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); margin-block: 0.35rem 0.9rem; }
  .hero .lead { font-size: 1rem; line-height: 1.55; }
  .hero .eyebrow { margin-bottom: 0.85rem; }
  .hero__actions { margin-top: 1.4rem; }
  .hero__card { display: none; }
  .hero__foot { justify-content: flex-end; padding-block: 0.7rem 0.85rem; }
  .hero__controls { margin-right: 3.75rem; }
  .hero__actions { margin-top: 1.25rem; }
  .hero__scroll { display: none; }

  .page-hero {
    padding-top: calc(var(--header-h) + 1.9rem);
    padding-bottom: 1.75rem;
  }
  .page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); margin-block: 0.4rem 0.75rem; }
  .page-hero p { font-size: 1rem; line-height: 1.55; }
  .page-hero .eyebrow { margin-bottom: 0.8rem; }
  .breadcrumb { margin-bottom: 0.35rem; }
}

/* Landscape phones — very little height, plenty of width. Drop the credential
   strip, put the buttons side by side and pull the type right down. */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --header-h: 56px; }
  .hero__card { display: none; }
  .hero__actions { margin-top: 1.1rem; }
  .hero__actions .btn { width: auto; }
  .hero__inner { padding-block: calc(var(--header-h) + 0.6rem) 0.5rem; }
  .hero h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); margin-block: 0.25rem 0.7rem; }
  /* Width is the one thing landscape has — spend it to save lines */
  .hero .lead { font-size: 0.92rem; line-height: 1.5; max-width: 70ch; }
  .hero .eyebrow { margin-bottom: 0.6rem; }

  .page-hero {
    padding-top: calc(var(--header-h) + 0.9rem);
    padding-bottom: 1.1rem;
  }
  .page-hero h1 { font-size: clamp(1.55rem, 1.2rem + 1.8vw, 2.1rem); max-width: 30ch; margin-block: 0.25rem 0.55rem; }
  .page-hero p { font-size: 0.9rem; line-height: 1.45; max-width: 74ch; }
  .page-hero .eyebrow { margin-bottom: 0.5rem; }

  /* Float the controls over the slide so they cost the layout no height */
  .hero__foot {
    position: absolute; inset: auto clamp(1rem, 3vw, 2.5rem) 0.6rem auto;
    width: auto; padding: 0; margin: 0;
  }
  .hero__controls { margin-right: 3.5rem; }
  .hero__nav { width: 36px; height: 36px; }
  .hero__nav svg { width: 15px; height: 15px; }
  .hero__dot { width: 30px; }
  .hero__controls { gap: 0.7rem; }
  .hero__count { font-size: 0.7rem; }
}

/* Small, short phones (320x568 class) — the headline and lead are what
   push the CTAs under; nothing else fits otherwise. */
@media (max-height: 620px) and (max-width: 420px) {
  .hero h1, .page-hero h1 { font-size: 1.75rem; }
  .hero .lead, .page-hero p { font-size: 0.94rem; line-height: 1.5; }
  .hero__actions { margin-top: 1.2rem; gap: 0.65rem; }
}

/* ---------- Touch devices: reveal card copy without hover ---------- */
@media (hover: none) {
  .collection-card__body p { max-height: 110px; opacity: 1; margin-bottom: 0.85rem; }
  .masonry__cap { opacity: 1; transform: none; }
  .logo-mark { opacity: 1; }
}
