/* ==========================================================================
   CURWE — Responsive layer
   Breakpoints: >=1440 desktop-xl · 1200 laptop · 992 tablet-landscape
   768 tablet · 576 mobile-lg · 400 mobile-sm
   ========================================================================== */

/* --------------------------------------------------------------------------
   DESKTOP XL REFINEMENT (>=1440px handled by fluid clamp() already;
   this just widens the shell slightly on very large monitors)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  .container-curwe {
    max-width: 1760px;
  }
}

/* --------------------------------------------------------------------------
   DESKTOP LOGO SCALE (>=993px — full nav is visible, room for a larger mark)
   -------------------------------------------------------------------------- */
@media (min-width: 993px) {
  .nav-logo img {
    height: 74px;
  }

  .navbar-curwe.is-scrolled .nav-logo img {
    height: 58px;
  }

  .footer-logo img {
    height: 88px;
  }
}

/* --------------------------------------------------------------------------
   LAPTOP / SMALL DESKTOP  (<=1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .nav-links {
    gap: 1.5rem;
  }

  .mega-menu {
    padding: 6rem 2rem 3rem;
    grid-template-columns: 1fr 1fr;
  }

  .masonry-grid {
    gap: 1.25rem;
  }

  .footer-top {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   TABLET LANDSCAPE (<=992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Navigation: switch to drawer */
  .nav-links,
  .nav-actions .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mega-menu {
    display: none !important;
  }

  /* Product detail: stack gallery above info */
  .product-split {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    align-items: center;
    text-align: left;
  }

  .hero-scroll-cue {
    display: none;
  }

  /* Featured masonry collapses to 2-col */
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .masonry-grid .product-card:nth-child(1),
  .masonry-grid .product-card:nth-child(2),
  .masonry-grid .product-card:nth-child(3),
  .masonry-grid .product-card:nth-child(4) {
    grid-column: span 1;
  }

  .masonry-grid .product-card:nth-child(2) .product-card-media,
  .masonry-grid .product-card:nth-child(3) .product-card-media {
    aspect-ratio: 3/4;
  }

  /* Editorial split stacks */
  .editorial-split {
    grid-template-columns: 1fr;
  }

  .editorial-split .split-media {
    order: -1;
  }

  /* Process timeline: 2 columns, hide connector line */
  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 3rem;
  }

  .process-timeline::before {
    display: none;
  }

  /* Journey timeline (craftsmanship page): collapse alternating layout */
  .journey-timeline::before {
    left: 27px;
  }

  .journey-row {
    grid-template-columns: auto 1fr;
  }

  .journey-row .journey-spacer {
    display: none;
  }

  .journey-row .journey-content,
  .journey-row:nth-child(even) .journey-content {
    text-align: left;
    order: 2;
  }

  .journey-row .journey-content p,
  .journey-row:nth-child(even) .journey-content p {
    margin-left: 0;
    margin-right: 0;
  }

  .journey-row .journey-num,
  .journey-row:nth-child(even) .journey-num {
    order: 1;
  }

  /* Lifestyle gallery: simplify spans */
  .lifestyle-gallery .g-item:nth-child(1),
  .lifestyle-gallery .g-item:nth-child(4) {
    grid-column: span 12;
  }

  .lifestyle-gallery .g-item:nth-child(2),
  .lifestyle-gallery .g-item:nth-child(3) {
    grid-column: span 6;
  }

  /* Stats: 2 columns */
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2.5rem;
  }

  /* Global presence: 2 columns */
  .presence-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(3) {
    border-left: none;
  }

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

  .footer-logo {
    grid-column: span 2;
  }

  /* Cursor glow disabled below desktop */
  .cursor-glow,
  .cursor-dot {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   TABLET (<=768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --space-section: clamp(3.5rem, 3rem + 4vw, 6rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-curwe {
    width: 100%;
    justify-content: center;
  }

  .hero-actions .btn-curwe {
    width: auto;
  }

  /* Mega menu feature image hidden on tablet drawer context (menu itself hidden already) */

  .lifestyle-gallery .g-item:nth-child(2),
  .lifestyle-gallery .g-item:nth-child(3) {
    grid-column: span 12;
  }

  .process-timeline {
    grid-template-columns: 1fr 1fr;
  }

  .testimonial-card {
    padding: 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-logo {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   MOBILE LARGE (<=576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .container-curwe {
    padding-inline: 1.25rem;
  }

  .navbar-curwe {
    padding-block: 1.25rem;
  }

  .nav-logo img {
    height: 40px;
  }

  .hero-content {
    padding-bottom: 2.5rem;
  }

  .display-headline {
    font-size: clamp(2.5rem, 2rem + 8vw, 4rem);
  }

  /* Featured collection: single column stack */
  .masonry-grid {
    grid-template-columns: 1fr;
  }

  .collection-tile {
    aspect-ratio: 4/5;
  }

  /* Process steps single column */
  .process-timeline {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  /* Stats single column */
  .stat-row {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }

  /* Global presence single column */
  .presence-list {
    grid-template-columns: 1fr;
  }

  .award-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .stat-item {
    border-left: none;
    border-top: 1px solid var(--curwe-border);
    padding-top: 1.5rem;
  }

  .stat-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  /* Lifestyle gallery: all full width */
  .lifestyle-gallery .g-item {
    grid-column: span 12 !important;
  }

  .testimonial-card p {
    font-size: 1.1rem;
  }

  .cta-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
  }

  .faq-question {
    font-size: 1.1rem;
  }

  .nav-drawer a {
    font-size: 2.25rem;
  }
}

/* --------------------------------------------------------------------------
   MOBILE SMALL (<=400px)
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  .eyebrow {
    font-size: 0.68rem;
  }

  .eyebrow::before {
    width: 18px;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .btn-curwe {
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
  }

  .footer-social a {
    width: 36px;
    height: 36px;
  }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   TOUCH DEVICES — disable hover-dependent affordances
   -------------------------------------------------------------------------- */
@media (hover: none) {
  .cursor-glow,
  .cursor-dot {
    display: none !important;
  }

  .product-card-quickview {
    opacity: 1;
    transform: translate(-50%, 0);
    position: static;
    transform: none;
    margin-top: 0.75rem;
  }
}
