/* Let content columns shrink before long CMS text or form controls overflow. */
.hero > *, .section-heading > *, .approach-grid > *, .faq-section > *,
.platform-card > *, .studio-panel > *, .contact-grid > *, .form-row > *,
.dialog-inner > *, .footer-grid > * { min-width: 0; }
.service h3, .service p, .service-link, .dialog-content h2, .dialog-content p,
.platform-copy h3, .platform-copy p, .footer-column a { overflow-wrap: anywhere; }
.contact-form :is(input,select,textarea) { min-width: 0; max-width: 100%; }
.hero-actions { flex-wrap: wrap; }
.work-tag { max-width: calc(100% - 30px); overflow-wrap: anywhere; }
.contact-number > span { min-width: 0; }
.contact-number strong { overflow-wrap: anywhere; }
.dialog-inner { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }

/* Keep explanatory text readable without competing with the display headings. */
.hero-copy > p { font-size: 16px; }
.hero-copy > .hero-description { max-width: 460px; text-align: start; overflow-wrap: anywhere; }
.hero-description-lead { display: block; margin-bottom: 8px; color: var(--navy); font-size: 18px; font-weight: 600; line-height: 1.7; text-wrap: balance; }
.hero-description-detail { display: block; color: var(--muted); line-height: 1.9; text-wrap: pretty; }
.section-heading > p, .service p, .results-copy > p, .faq-list details p,
.platform-copy > p, .clients-heading p { font-size: 15px; line-height: 1.9; }
.faq-list summary { font-size: 15px; line-height: 1.8; }
.work-intro-description, .contact-copy > p { font-size: 15px; }
.hero-note, .results-copy > small, .work-gallery-count { font-size: 12px; line-height: 1.9; }
.service-link { font-size: 13px; }
.hero-actions .text-link { min-height: 44px; font-size: 14px; }
.work-show-all, .work-collapse, .is-expanded .work-show-all { font-size: 14px; }

.package .package-header p, .packages-grid .package .package-contents li,
.packages-grid .package > .button { font-size: 14px; }
.package .package-price-label, .package .package-header .package-overline { font-size: 12px; }
.package .package-contents h4 { font-size: 14px; }

.client-identity p, .client-stats dt, .client-note,
.client-feature-label > span, .client-feature-label > small { font-size: 12px; }
.client-feature-label { flex-wrap: wrap; gap: 6px 12px; }
.client-feature-body > strong { font-size: 13px; }

.contact-form > p { font-size: 14px; }
.contact-form label { font-size: 14px; }
.contact-form label > span[data-cms] { color: var(--navy); }
.contact-form label > small { font-size: 12px; }
.contact-form :is(input,select,textarea) { font-size: 16px; line-height: 1.6; }
.contact-form input::placeholder, .contact-form textarea::placeholder {
  font-size: inherit;
  color: var(--muted);
  opacity: 1;
}
.contact-form > .button { font-size: 14px; }
.contact-form > .privacy-note { font-size: 12px; color: var(--muted); }

.mada-footer .footer-about > p, .mada-footer .footer-column a { font-size: 14px; }
.mada-footer .footer-slogan, .mada-footer .footer-legal { font-size: 12px; }
.mada-footer .footer-column a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 6px; }
.mada-footer li + li { margin-top: 0; }
.mada-footer .footer-language { min-height: 44px; }
.mada-footer .footer-social { flex-wrap: wrap; }
.mada-footer .footer-social a { width: 44px; height: 44px; flex-shrink: 0; }

@media(min-width:851px) {
  .services-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media(max-width:850px) {
  .services-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .services-grid { grid-template-columns: minmax(0,1fr); }
  .service { padding: 24px; }
  .service h3, html[lang="en"] .service h3 { font-size: 22px; }
  .service h3, .service p, html[lang="en"] .service p { min-height: 0; }
  .dialog-inner { grid-template-columns: minmax(0,1fr); }
  .contact-copy h2 { font-size: clamp(42px,12vw,66px); }
  html[lang="en"] .contact-copy h2 { font-size: clamp(38px,10vw,53px); }
  .contact-copy h2 > svg { width: 1em; height: 1em; }
  .client-controls button { width: 44px; height: 44px; }
  .contact-form :is(input,select,textarea) { font-size: 16px; }
}

/* Phone polish (650px and below): readable small labels, nothing decorative over text,
   carousel arrows under the cards instead of on top of them, and smaller floating buttons. */
@media (max-width: 650px) {
  /* Decorative hero icons drift over the heading and the promise line on narrow screens. */
  .hero-atmosphere .hero-float { display: none; }
  /* Section labels and captions were 10-11px. */
  main .eyebrow, main .eyebrow > span { font-size: 12px; }
  .result-metric .metric-label, .contact-copy .location, .contact-copy small, .contact-copy small > span { font-size: 12px; }
  .art-caption-link .caption-label, .art-caption-link .caption-label > span { font-size: 11px; }
  .art-caption-link { min-height: 32px; align-items: center; }
  .results-copy .text-link { min-height: 44px; display: inline-flex; align-items: center; }
  /* Clients: arrows sit side by side under the cards; swiping still works. */
  .clients-section > .container > .client-controls:not([hidden]) ~ .clients-track { grid-column: 1 / -1; grid-row: 2; }
  .clients-section .client-controls:not([hidden]) > button { grid-column: 1 / -1; grid-row: 3; justify-self: center; width: 44px; height: 44px; margin: 6px 0 0; box-shadow: none; }
  .clients-section .client-controls:not([hidden]) > .client-previous { margin-inline: 0 56px; }
  .clients-section .client-controls:not([hidden]) > .client-next { margin-inline: 56px 0; }
  /* While a form is on screen (class set in app.js) they would cover its fields. */
  .floating-social, .floating-whatsapp { transition: opacity .2s ease, visibility .2s; }
  html.form-in-view :is(.floating-social, .floating-whatsapp) { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* Floating contact buttons: one stack at mid-height on every screen, the social links right above
   WhatsApp, all the same size, with a light glow. The rail has 6px padding, so its bottom sits 1px
   below the middle line and WhatsApp starts 5px below it: a 10px gap between the buttons. */
.floating-social { top: auto; bottom: calc(50% - 1px); transform: none; left: calc(10px + env(safe-area-inset-left, 0px)); max-height: calc(50vh - 24px); max-height: calc(50svh - 24px); }
.floating-whatsapp { top: calc(50% + 5px); bottom: auto; left: calc(16px + env(safe-area-inset-left, 0px)); }
.floating-social .floating-social-link { flex-basis: 52px; width: 52px; height: 52px; }
.floating-social .floating-social-link svg { width: 22px; height: 22px; }
.mada-footer .footer-legal { padding-bottom: 20px; }
@media (max-width: 650px) {
  .floating-social { left: calc(4px + env(safe-area-inset-left, 0px)); }
  .floating-whatsapp { left: calc(10px + env(safe-area-inset-left, 0px)); }
  .floating-social .floating-social-link { flex-basis: 48px; width: 48px; height: 48px; }
  .floating-social .floating-social-link svg { width: 21px; height: 21px; }
}
/* Light glow: a soft colored shadow, and a faint ring that breathes slowly. */
.floating-social-link, .floating-whatsapp { box-shadow: 0 6px 18px -8px var(--contact-halo), 0 0 0 1px color-mix(in srgb, var(--contact-halo) 18%, transparent); }
@keyframes contact-glow-soft {
  0%, 100% { opacity: .18; transform: scale(1); }
  50% { opacity: .42; transform: scale(1.07); }
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-disabled) :is(.floating-social-link, .floating-whatsapp)::after {
    border: 1px solid var(--contact-halo); box-shadow: 0 0 10px color-mix(in srgb, var(--contact-halo) 45%, transparent);
    animation: contact-glow-soft 3.6s ease-in-out infinite;
  }
  html:not(.motion-disabled) .floating-whatsapp::after { border-color: #25d366; box-shadow: 0 0 10px #25d36666; animation-delay: 1.8s; }
  html.motion-paused :is(.floating-social-link, .floating-whatsapp)::after { animation-play-state: paused; }
}

/* Pinterest in the floating stack: a red circle with a white "P", like the other buttons. */
.floating-pinterest { background: #e60023; --contact-halo: #e60023; }
