/* Shared responsive layout. Desktop Figma geometry remains above 1023px. */
.back-to-top {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border: 1px solid #fff;
  box-shadow: 0 3px 12px #20252230;
  font-size: 28px;
  line-height: 1;
}
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: var(--red); }
@media (max-width: 1023px) {
  body {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body dialog {
    max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}
/* Photographs must keep their intrinsic proportions at every viewport. */
.delivery-photo > img, .about-photo img,
.gallery-laboratory img, .gallery-silos img, .gallery-mixers img,
.delivery-fleet img { object-fit: cover; }
.product-card .text-link {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 12px 16px;
  line-height: 20px;
}
.product-card:hover .text-link { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu-toggle, .menu-toggle[hidden] { display: none; }
/* The full header needs more space than the page columns. */
@media (max-width: 1279px) {
  .header-main { height: auto; min-height: 76px; flex-wrap: wrap; gap: 0 12px; padding: 8px 0; }
  .header-main .logo { width: 125px; height: 60px; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; gap: 10px; min-height: 44px; padding: 10px 12px; background: #fff; border: 1px solid var(--border); font-weight: 700; color: var(--ink); }
  .header-main nav { width: 100%; flex-direction: column; gap: 0; order: 3; padding: 16px 0; font-size: 18px; }
  .header-main nav a { padding: 14px 0; border-top: 1px solid var(--border); }
  .header-contact { width: 100%; order: 4; padding: 4px 0 16px; flex-wrap: wrap; gap: 16px; }
  .header-main[data-menu-ready] nav, .header-main[data-menu-ready] .header-contact { display: none; }
  .header-main[data-menu-open] nav, .header-main[data-menu-open] .header-contact { display: flex; }
}
@media (min-width: 1280px) {
  .header-main nav a, .header-contact { white-space: nowrap; flex-shrink: 0; }
}
@media (max-width: 1023px) {
  body { min-width: 0; }
  .wrap { width: calc(100% - 40px); }
  main { overflow-wrap: break-word; }
  main *, footer * { min-width: 0; }
  main br { display: none; }
  main br::after { content: ' '; }
  h1, .hero h1, .contact-heading h1, .factory-intro h1, .documents-heading h1, .products-heading h1, .delivery-intro h1 { font-size: clamp(38px, 7vw, 64px); line-height: 1.05; letter-spacing: -.045em; }
  h2, .reviews h2, .contacts-page h2, .factory-page h2, .declarations h2, .passport h2, .products-page .section-heading h2, .mortar h2, .products-page .request h2, .delivery-page h2, .delivery-geography h2, .delivery-page .request h2, .accessible-document h2 { font-size: clamp(30px, 5.5vw, 44px); line-height: 1.1; letter-spacing: -.04em; }
  .eyebrow { line-height: 1.5; }
  .topbar-inner { height: auto; padding: 10px 0; font-size: 11px; line-height: 1.5; }
  .top-social { display: none; }
  .hero-grid, .product-grid, .delivery-grid, .request-grid, .about-grid, .reviews-grid, .contact-grid, .factory-story, .passport-grid, .mortar-grid, .products-lead, .delivery-lead, .delivery-geography-grid, .delivery-pump { grid-template-columns: minmax(0, 1fr); gap: 32px; min-height: 0; }
  .hero-grid { padding: 32px 0 48px; }
  .hero h1 { margin: 18px 0 22px; }
  .hero-description, .delivery-description, .request-description, .about p:not(.eyebrow) { white-space: normal; }
  .hero-description { font-size: 16px; line-height: 1.6; }
  .actions { height: auto; flex-wrap: wrap; }
  .button { white-space: normal; text-align: center; }
  .stats { gap: 20px; justify-content: space-between; margin-top: 28px; }
  .stats dt { font-size: 27px; letter-spacing: -1px; }
  .stats dd { line-height: 1.5; }
  .hero-photo { height: auto; aspect-ratio: 4 / 3; }
  .quick-form { margin: -24px 12px 0; padding: 24px 20px; }
  .products, .factory-gallery { height: auto; }
  .products, .delivery, .process, .request, .about, .reviews, .factory-intro, .factory-gallery, .factory-contact, .contact-details, .declarations, .passport, .aggregates, .catalog-custom, .mortar, .delivery-fleet, .delivery-geography, .delivery-pump, .products-page .request, .delivery-page .request, .accessible-document { padding-top: 48px; padding-bottom: 48px; }
  .product-grid { margin-top: 28px; }
  .product-card { height: 380px; padding: 22px; }
  .product-content { left: 22px; right: 22px; bottom: 24px; }
  .product-content h3 { font-size: 32px; line-height: 1.1; white-space: normal; letter-spacing: -1px; }
  .delivery-photo { height: auto; aspect-ratio: 1.2; }
  .delivery-photo > img, .about-photo img, .gallery-image img, .delivery-fleet img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .delivery-photo > img { object-position: center 80%; }
  .about-photo img { object-position: center 64%; }
  .delivery-photo .photo-label { left: 12px; right: 12px; top: 12px; font-size: 10px; line-height: 1.5; }
  .product-content { background: rgba(255, 255, 255, .96); padding: 20px; left: 12px; right: 12px; bottom: 12px; }
  .product-content .text-link, .product-content .button { margin-top: 20px; }
  .custom-mixes.product-card { height: 360px; }
  .custom-mixes > img { width: 100%; }
  .custom-mixes::after { display: none; }
  .custom-mixes .product-content { max-width: none; bottom: 12px; }
  .cities { width: 100%; }
  .steps { grid-template-columns: 1fr; margin-top: 28px; gap: 24px; }
  .request-social { flex-wrap: wrap; white-space: normal; margin-top: 24px; }
  .social { flex-wrap: wrap; gap: 10px; }
  .social a, .social.boxed a { min-height: 44px; }
  .full-form { grid-template-rows: none; gap: 20px 14px; }
  .full-form input:not([type=checkbox]), .full-form select, .full-form textarea { font-size: 16px; min-height: 50px; }
  .full-form label:not(.consent) { font-size: 14px; }
  .form-actions { flex-direction: column; align-items: stretch; gap: 20px; }
  .form-actions .consent { max-width: none; }
  .form-actions .button { order: 2; }
  .full-form textarea { min-height: 130px; }
  .about-photo, .about-grid > img { width: 100%; height: auto; aspect-ratio: 4 / 3; margin-top: 0; }
  .document-panel { padding: 24px; }
  .document-panel h3 { font-size: 28px; line-height: 1.15; }
  .rating strong { flex-shrink: 0; white-space: nowrap; }
  .reviews-widget { padding: 12px; }
  .widget-heading { gap: 12px; flex-wrap: wrap; }
  .external-widget-notice { padding: 24px 16px; }
  footer { padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .footer-grid > div:first-child { grid-column: 1/-1; }
  .footer-grid nav { gap: 0; }
  .footer-grid nav a { padding: 12px 0; }
  .footer-bottom { margin-top: 36px; line-height: 1.6; }
  dialog { padding: 44px 20px 24px; width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  dialog h2 { font-size: 32px; }
  .contact-heading, .documents-heading { padding: 40px 0; min-height: 0; }
  .contact-lead, .documents-heading h1 + p, .factory-lead, .products-lead > p, .delivery-lead > p { font-size: 19px; line-height: 1.55; }
  .address-panel { padding: 28px 24px; }
  .phone-entry.primary a { font-size: 29px; }
  .phone-entry.secondary a { font-size: 25px; }
  .contact-map iframe { width: 100%; }
  .factory-story { margin-top: 28px; }
  .factory-lead { margin-top: 0; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 28px 20px; }
  .gallery-grid figure, .gallery-silos .gallery-image { width: 100%; left: auto; margin-left: 0 !important; }
  .gallery-grid .gallery-image { height: auto; aspect-ratio: auto; }
  .gallery-image img { position: static; height: auto; }
  .factory-contact-grid, .documents-contact, .delivery-catalog, .section-heading { flex-direction: column; align-items: flex-start; gap: 24px; }
  .factory-phone { font-size: 28px; }
  .document-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .document-icon { width: 32px; }
  .document-description h3 { font-size: 21px; }
  .document-dates, .document-links { grid-column: 2; width: 100%; padding: 0; }
  .document-links { display: flex; flex-wrap: wrap; gap: 24px; }
  .document-links a, .passport-links a { padding: 12px 0; }
  .passport-card, .aggregate-card, .mortar-card { padding: 24px; }
  .passport-meta { gap: 12px; flex-wrap: wrap; }
  .passport-transcript > div { grid-template-columns: 1fr; gap: 8px; }
  .accessible-document-actions { flex-wrap: wrap; }
  .products-heading, .delivery-intro { padding-top: 40px; }
  .products-lead, .delivery-lead { margin-top: 24px; }
  .products-page .section-heading { align-items: flex-start; }
  .aggregate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aggregate-card { min-height: 0; }
  .aggregate-card h3 { min-height: 0; padding: 20px 0; font-size: 28px; }
  .grade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; min-height: 0; }
  .grade-chip { width: 100%; }
  .mortar-grades { width: 100%; flex-wrap: wrap; }
  .mortar-grades .grade-chip { width: calc(50% - 5px); height: 60px; }
  .custom-list article { grid-template-columns: 1fr; gap: 18px; }
  .custom-list .catalog-link { text-align: left; }
  .catalog-related { grid-template-columns: 1fr; padding-bottom: 48px; }
  .catalog-related article { height: auto; padding: 28px 24px; }
  .catalog-related .catalog-link { position: static; display: inline-block; margin-top: 24px; }
  .delivery-stats { gap: 18px; }
  .delivery-stats dt { font-size: 32px; line-height: 1.2; letter-spacing: -1px; }
  .delivery-stats dd { line-height: 1.5; }
  .delivery-fleet figure { height: auto; aspect-ratio: 1.5; }
  .delivery-directions { padding: 24px; min-height: 0; }
  .delivery-directions ul { grid-auto-rows: auto; gap: 0 16px; }
  .delivery-directions li { font-size: 16px; }
  .delivery-pump-stat { padding: 28px; min-height: 0; }
  .delivery-pump-stat strong { font-size: 80px; height: auto; padding-top: 0; }
  .delivery-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .delivery-steps li:nth-child(3) p { width: auto; }
  .delivery-steps h3 { min-height: 0; }
  .delivery-preparation { padding-bottom: 48px; }
}
@media (max-width: 599px) {
  .hero h1 { font-size: clamp(36px, 9.5vw, 54px); }
  .actions { flex-direction: column; }
  .actions .button { width: 100%; }
  .quick-fields, .full-form, .gallery-grid, .aggregate-grid, .delivery-steps { grid-template-columns: minmax(0, 1fr); }
  .quick-form { margin: 0; box-shadow: none; }
  .hero-photo { aspect-ratio: 1.2; }
  .stats { gap: 12px; }
  .stats dt { font-size: 24px; }
  .stats dd { font-size: 12px; }
  .request-social .social { gap: 8px; }
  .social.boxed a { width: auto; padding: 10px; font-size: 13px; }
  .request-social strong { width: 100%; }
  .delivery-stats { grid-template-columns: 1fr; padding: 24px 0; gap: 24px; }
  .delivery-stats dd { margin-top: 4px; }
  .delivery-directions ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-phone { font-size: 24px; }
  .product-card { height: 400px; }
  .documents-contact .button, .delivery-catalog .button { width: 100%; }
}
