:root { --ease-soft: cubic-bezier(.22,1,.36,1); }
html { scrollbar-gutter: stable; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.button, .language-toggle, .menu-toggle { touch-action: manipulation; }
.button { max-width: 100%; white-space: normal; text-align: center; }
.card, .team-grid > *, .footer__top > * { min-width: 0; }
.footer__links a, .footer__brand a, .field__hint { overflow-wrap: anywhere; }
.field :is(input,select,textarea) { max-width: 100%; min-width: 0; }
.button, .language-toggle, .menu-toggle {
  transition: transform 220ms var(--ease-soft), background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.nav__links { transition: opacity 240ms ease, transform 280ms var(--ease-soft), visibility 280ms; }
.nav__link::after { transition: transform 240ms var(--ease-soft); }
.card { transition: transform 280ms var(--ease-soft), box-shadow 280ms ease; }
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease var(--reveal-delay,0ms), transform 600ms var(--ease-soft) var(--reveal-delay,0ms), box-shadow 240ms ease;
  will-change: auto;
}
.reveal.reveal-complete { opacity: 1; transform: none; }
.reveal:focus-within { opacity: 1; transform: none; transition-delay: 0ms; }
.hero__content > * { animation: hero-content-in 650ms var(--ease-soft) both; }
.hero__content > *:nth-child(2) { animation-delay: 45ms; }
.hero__content > *:nth-child(3) { animation-delay: 90ms; }
.hero__content > *:nth-child(4), .hero__content > *:nth-child(5) { animation-delay: 135ms; }
@keyframes hero-content-in { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@media (hover:hover) and (pointer:fine) {
  .card:hover, .card.reveal-complete:hover { transform: translateY(-3px); }
  .button:hover { transform: translateY(-2px); }
}
@media (hover:none), (pointer:coarse) {
  .card:hover, .card.reveal-complete:hover, .button:hover { transform: none; box-shadow: var(--shadow-sm); }
  .button:active { transform: scale(.985); }
}
/* Intermediate widths keep cards readable before changing to one column. */
@media (min-width:641px) and (max-width:1100px) {
  .grid--3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer__top { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width:641px) and (max-width:900px) {
  .hero--clinic .hero__image { max-height: 32rem; object-position: center 55%; }
  .hero--clinic .hero__content { max-width: 42rem; margin-inline: auto; }
}
@media (max-width:900px) {
  .nav__links { max-height: calc(100dvh - var(--header-height) - 1.5rem); overscroll-behavior: contain; }
  .menu-toggle, .language-toggle { min-width: 44px; min-height: 44px; }
  .nav__link { min-height: 48px; }
  .hero--clinic .hero__content { width: 100%; }
}
@media (max-width:640px) {
  .grid--2, .grid--3, .form-grid { grid-template-columns: minmax(0,1fr); }
  .grid--4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid--4 .card { padding: 1rem; }
  .grid--4 .card h3 { font-size: 1rem; }
  .cluster { align-items: stretch; }
  .cluster .button { flex: 1 1 100%; min-height: 48px; }
  .hero--clinic .hero__content .button { flex-basis: 8rem; }
  .footer__top { gap: 1.75rem 1rem; }
  .team-grid { gap: 1.25rem; }
  .hero__content > * { animation-duration: 520ms; }
  .reveal { transform: translateY(10px); }
}
@media (max-width:360px) {
  :root { --page-gutter: 1rem; }
  .hero--clinic .hero__content .button { flex-basis: 100%; }
  .footer__top { grid-template-columns: minmax(0,1fr); }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .reveal.reveal-complete { opacity: 1; transform: none; }
  .card:hover, .card.reveal-complete:hover, .button:hover, .button:active { transform: none; }
}
