/* Agent sites — shared mobile layer. Loaded AFTER each design's CSS.
   Each design sets the --m-* colour tokens in its own :root; mechanics live here once.
   --m-bar-bg / --m-bar-fg   sticky contact bar surface
   --m-call-bg / --m-call-fg primary call button
   --m-menu-bg / --m-menu-fg full-screen menu
   --m-line                  hairlines on the menu */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
a, button, summary { -webkit-tap-highlight-color: transparent; }

/* ---------- sticky contact bar ---------- */
.mbar { display: none; }

@media (max-width: 900px) {
    body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    .mbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
        display: flex; gap: 10px; align-items: stretch;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: var(--m-bar-bg, rgba(255, 255, 255, .94));
        -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
        border-top: 1px solid var(--m-line, rgba(0, 0, 0, .08));
        box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .45);
        transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s;
    }
    .mbar.is-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
    .mbar a { display: flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 16px; min-height: 58px; }
    .mbar-call { flex: 1; gap: 12px; background: var(--m-call-bg, #1f6feb); color: var(--m-call-fg, #fff); font-weight: 700; font-size: 1.08rem; letter-spacing: .01em; line-height: 1.15; text-align: left; box-shadow: 0 10px 22px -12px var(--m-call-bg, #1f6feb); }
    .mbar-call .icon { width: 24px; height: 24px; }
    .mbar-call small { display: block; font-size: .82rem; font-weight: 500; opacity: .85; letter-spacing: .02em; }
    .mbar-mail { width: 58px; flex: none; color: var(--m-bar-fg, #13233a); border: 1px solid var(--m-line, rgba(0, 0, 0, .12)); }
    .mbar-mail .icon { width: 24px; height: 24px; }
    .mbar a:active { transform: scale(.98); }
}

/* ---------- full-screen menu ---------- */
@media (max-width: 1020px) {
    /* display stays with each design (breakpoints differ); this only sizes it to a 48px target */
    .nav-toggle { position: relative; z-index: 120; box-sizing: border-box; width: 48px; height: 48px; padding: 18px 11px; margin-right: -10px; }
    .nav-toggle span { display: block; width: 26px; height: 2px; margin: 0; border-radius: 2px; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
    .nav-toggle span + span { margin-top: 7px; }
    .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

    body.menu-open { overflow: hidden; }
    body.menu-open .header { -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 110; }
    body.menu-open .mbar { transform: none; opacity: 1; pointer-events: auto; }
    body.menu-open .brand { position: relative; z-index: 120; }

    .nav-links.open {
        position: fixed; inset: 0; z-index: 100;
        display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
        padding: calc(var(--m-top, 88px) + 18px) 28px calc(120px + env(safe-area-inset-bottom));
        background: var(--m-menu-bg, #fff); color: var(--m-menu-fg, #111);
        border: 0; box-shadow: none; overflow-y: auto;
        animation: m-menu-in .28s cubic-bezier(.2, .8, .2, 1);
    }
    .nav-links.open a:not(.btn):not(.nav-login) {
        display: flex; align-items: center; min-height: 60px; padding: 0;
        font-size: 1.45rem; color: var(--m-menu-fg, #111);
        border-bottom: 1px solid var(--m-line, rgba(0, 0, 0, .1));
    }
    .nav-links.open .btn, .nav-links.open .nav-login {
        display: flex; align-items: center; justify-content: center; min-height: 54px; margin-top: 22px; font-size: 1.05rem;
    }
    .nav-links.open > :nth-child(n) { opacity: 0; animation: m-item-in .35s cubic-bezier(.2, .8, .2, 1) forwards; }
    .nav-links.open > :nth-child(1) { animation-delay: .04s; }
    .nav-links.open > :nth-child(2) { animation-delay: .08s; }
    .nav-links.open > :nth-child(3) { animation-delay: .12s; }
    .nav-links.open > :nth-child(4) { animation-delay: .16s; }
    .nav-links.open > :nth-child(5) { animation-delay: .20s; }
    .nav-links.open > :nth-child(6) { animation-delay: .24s; }
    .nav-links.open > :nth-child(7) { animation-delay: .28s; }
    @keyframes m-menu-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes m-item-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- tap targets & legibility on phones ---------- */
@media (max-width: 620px) {
    .legal { font-size: 13.5px; line-height: 1.6; }
    .legal-links a { display: inline-block; padding: 12px 2px; margin: -8px 0; }
    main a[href^="mailto:"]:not(.btn), main a[href^="tel:"]:not(.btn):not(.big-phone):not(.phone):not(.btn-text) { display: inline-block; padding-block: 10px; }
    /* design eyebrows / labels: never below 13.5px */
    .kicker, .eyebrow, .overline, .overline-dark, .overline-light, .brand-sub, .sig-title, .cap-role,
    .facts dt, .contact-dl dt, .concierge dt, .tile small, .hero-facts dd, .stats span { font-size: 13.5px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .mbar, .nav-toggle span, .nav-links.open, .nav-links.open > * { transition: none !important; animation: none !important; opacity: 1 !important; }
}
