/* Continuous layouts for phones, tablets and wide screens. No framework. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.hero,
.story-inner {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-copy,
.hero-visual,
.story-copy,
.contact-section > div,
.product-info > h3 {
  min-width: 0;
}

.product-name,
.contact-phone,
.modal-contact-phone {
  overflow-wrap: anywhere;
}

.contact-section h2 {
  text-wrap: balance;
}

.mobile-nav {
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.overlay {
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.modal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.modal-dismiss {
  position: sticky;
  top: 0;
  grid-column: 1 / -1;
  align-self: start;
  height: 0;
  z-index: 2;
}

.close-dialog {
  width: 44px;
  height: 44px;
  right: 10px;
  top: 10px;
  border-radius: 50%;
}

.modal-photo {
  min-height: 100%;
  height: 100%;
}

.modal-content .button {
  white-space: normal;
}

.modal-contact-phone {
  min-height: 44px;
  align-content: center;
}

@media (min-width: 901px) and (max-width: 1150px) {
  .catalog-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-products .product-info {
    flex-wrap: wrap;
    gap: 0 12px;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  .home-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .contact-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .contact-links {
    min-width: 0;
    width: min(100%, 360px);
    margin-top: 0;
  }

  .menu-toggle {
    width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    flex-shrink: 0;
  }

  .site-header {
    gap: 12px;
  }

  .header-actions {
    gap: 8px;
    flex-shrink: 0;
  }

  .contact-trigger,
  .filter,
  .sort-label select,
  .inquiry-link,
  .product-name,
  .text-link,
  .contact-phone,
  .modal-contact-phone,
  .site-footer a {
    min-height: 44px;
    align-content: center;
  }

  .filter {
    padding-inline: 12px;
  }

  .product-name {
    display: inline-flex;
    align-items: center;
  }

  .inquiry-link {
    font-size: 11px;
  }

  .site-footer > div {
    flex-wrap: wrap;
    column-gap: 25px;
    row-gap: 4px;
  }
}

@media (max-width: 700px) {
  .hero,
  .story-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    width: min(100% - 20px, 520px);
    justify-self: center;
    margin-left: 20px;
  }

  .hero-photo {
    height: clamp(290px, 80vw, 460px);
  }

  .hero h1 {
    font-size: clamp(35px, 9.8vw, 54px);
  }

  .hero-signature {
    display: none;
  }

  .story-logo img {
    width: min(100%, 300px);
  }

  .story-copy {
    max-width: 100%;
  }

  .modal {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-photo {
    width: 100%;
    min-height: 0;
    height: clamp(180px, 47vw, 300px);
  }
}

@media (max-width: 560px) {
  .announcement {
    min-height: 31px;
    height: auto;
    padding: 5px 12px;
    line-height: 1.5;
    font-size: 9px;
    letter-spacing: .7px;
  }

  .brand {
    flex-shrink: 1;
    min-width: 0;
  }

  .brand img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }

  .brand > span {
    font-size: clamp(17px, 5.2vw, 21px);
    letter-spacing: 2px;
  }

  .brand small {
    font-size: 8px;
    letter-spacing: .4px;
  }

  .contact-trigger span {
    display: none;
  }

  .contact-trigger {
    width: 44px;
    justify-content: center;
  }

  .contact-trigger svg {
    width: 20px;
    height: 20px;
  }

  .catalog-intro h1 {
    font-size: clamp(33px, 10.3vw, 43px);
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .filter {
    min-width: 0;
    font-size: 11px;
    padding-inline: 8px;
  }

  .sort-label {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }

  .catalog-meta {
    gap: 16px;
    flex-wrap: wrap;
  }

  .catalog-products .product-name {
    font-size: 21px;
  }

  .product-badge {
    max-width: calc(100% - 18px);
    white-space: normal;
  }

  .section-heading h2,
  .story-copy h2 {
    font-size: clamp(29px, 8.8vw, 39px);
  }

  .contact-section h2 {
    font-size: clamp(26px, 7.6vw, 31px);
  }

  .modal-content {
    padding: 24px 20px;
  }
}

@media (max-width: 360px) {
  .section-width {
    width: calc(100% - 32px);
  }

  .catalog-products {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .catalog-products .product-image-button img {
    aspect-ratio: 1.1 / 1;
  }

  .catalog-products .product-info {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .catalog-products .product-description {
    font-size: 11px;
  }

  .catalog-products .category {
    font-size: 9px;
  }
}

@media (max-height: 500px) and (min-width: 701px) {
  .modal-photo {
    min-height: 100%;
  }

  .modal-content {
    padding-block: 30px;
  }
}

@media (hover: none) {
  .button:hover {
    transform: none;
  }

  .product-image-button:hover img {
    transform: none;
  }
}

@media (pointer: coarse) {
  .filter,
  .sort-label select,
  .inquiry-link,
  .contact-trigger,
  .product-name,
  .text-link,
  .contact-phone {
    min-height: 44px;
    align-content: center;
  }
}
