/* Responsive standards layer - loaded last on every public page.
   Mobile-first safety net: it never changes the desktop design, it only removes overflow,
   enlarges touch targets, respects notches / reduced motion / text zoom, and keeps media fluid. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
body { overflow-x: clip; min-width: 320px; }
img, video, canvas, iframe, svg { max-width: 100%; }
img, video { height: auto; }
iframe { border: 0; }
table { max-width: 100%; }
p, li, dd, dt, h1, h2, h3, h4, td, th, a { overflow-wrap: break-word; }
pre, code { max-width: 100%; overflow-x: auto; }

/* notches and rounded corners */
@supports (padding: max(0px)) {
  nav, .navbar, header { padding-left: max(var(--nav-pad, 0px), env(safe-area-inset-left)); padding-right: max(var(--nav-pad, 0px), env(safe-area-inset-right)); }
  footer { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}

/* never let form controls trigger iOS zoom */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px; }
}

/* touch devices: 44 x 44 px targets (WCAG 2.5.5 / Apple HIG) */
@media (pointer: coarse) {
  .hamburger, .sound-btn, .fullscreen-btn, .social-link, .btn, input[type="submit"] { min-width: 44px; min-height: 44px; }
  .social-link { display: inline-flex; align-items: center; justify-content: center; }
  .service-link, .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-links li { margin: 0; }
  input:not([type="checkbox"]):not([type="radio"]), select { min-height: 44px; }
}

/* hover-only effects must not stick on touch screens */
@media (hover: none) {
  *:hover { transition-duration: 0s; }
}

/* very small phones */
@media (max-width: 360px) {
  html { font-size: 15px; }
  .container, section { padding-left: 14px; padding-right: 14px; }
}

/* short landscape phones: do not make the hero taller than the screen */
@media (max-height: 480px) and (orientation: landscape) {
  .hero, .page-hero, [class*="hero"] { min-height: auto; }
}

/* wide screens: stop line lengths growing without limit */
@media (min-width: 1800px) {
  html { font-size: 17px; }
}

/* users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .clients-track { animation: none !important; }
}

/* print */
@media print {
  nav, .hamburger, .sound-btn, .fullscreen-btn, video, .orb { display: none !important; }
  body { overflow: visible; }
}

/* definition lists (contact cards): label above value on phones, long e-mail addresses wrap */
dd, dt { min-width: 0; }
@media (max-width: 480px) {
  .contact-card dl { grid-template-columns: minmax(0, 1fr) !important; gap: 2px 0 !important; }
  .contact-card dd { margin-bottom: 10px; overflow-wrap: anywhere; }
}
