/* =========================================================
   RESPONSIVE — how the page changes on smaller screens

   Three width breakpoints: 1024px, 768px and 560px, plus one
   height breakpoint at 600px for the popup on short windows.
   Above 1024px the layout is fluid, so no rule is needed.

   Everything in this file is an override of a rule that
   lives in base.css, components.css or sections.css.

   ------------------------------------------------------------
   1024px   two-column galleries, stacked story and visit
   768px    the popup stacks, the menu button stays
   560px    everything in one column
   600px    the popup photo shrinks on a short window
   Motion   the whole page calms down when the OS asks it to
   ========================================================= */

/* --- a tablet or a small laptop --- */
@media (max-width:1024px){
  .product-grid{grid-template-columns:repeat(2,1fr)}
  .steps,.feature-list{grid-template-columns:repeat(2,1fr);gap:2rem}
  .steps::before{display:none}
  .story-grid,.visit-grid,.order-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
}

/* --- a phone in landscape, or a small tablet --- */
@media (max-width:768px){
  #menu-button{display:flex}
  .modal-box{grid-template-columns:1fr;max-height:90vh}
  .modal-media{min-height:17.5rem}
}

/* --- a phone --- */
@media (max-width:560px){
  .section{padding:clamp(2.5rem,6vw,3.5rem) 0}
  .modal-info{padding:1.5rem 1.4rem 1.6rem}
  .modal-close{top:0.625rem;right:0.625rem}
  .product-grid,.visit-cards,.steps,.feature-list,.stats{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .spec div{grid-template-columns:1fr;gap:.15rem}
  .photo-prev{left:0.5rem}
  .photo-next{right:0.5rem}
}

/* --- a short window ---
   The popup is 90vh tall. On a window that is not very tall,
   the photo would take up most of it and the details would be
   pushed below the fold, so the photo shrinks to make room. */
@media (max-height:600px){
  .modal-media{min-height:9rem}
}

/* --- when the operating system asks for less motion --- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
  .js [data-reveal]{opacity:1;transform:none}
  .ticker-track{animation:none}
}
