
/* Treasure Home – global mobile hardening
   Loaded after all page-specific styles. */

html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
iframe { max-width: 100%; }
main { min-width: 0; }
.container { min-width: 0; }
table { max-width: 100%; }
h1,h2,h3,p,.lead,.card,.feature-line,.drop-link { overflow-wrap: break-word; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .hero-grid > *, .platform-hero > *, .final-home-grid > * { min-width:0; }

@media (max-width: 980px) {
  :root { --mobile-gutter: 18px; }

  html { scroll-padding-top: 84px; }
  body { padding-top: 68px !important; }

  .container {
    width: calc(100% - (var(--mobile-gutter) * 2)) !important;
    max-width: 100% !important;
  }

  header { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; }
  .nav { height: 68px !important; min-height:68px !important; gap: 10px !important; }
  .brand-logo { max-width: 155px !important; width: auto !important; height: auto !important; }
  .header-brand-picture { display:block; width:34px; height:34px; flex:0 0 34px; }
  .header-brand-picture .brand-logo { display:block; width:34px !important; height:34px !important; max-width:34px !important; object-fit:contain !important; }
  header .brand { min-width:0 !important; width:34px !important; height:34px !important; flex:0 0 34px !important; }
  .footer-brand-logo { max-width: 170px !important; width: auto !important; }

  .nav-links { display: none !important; }
  .nav-actions .btn { display: none !important; }
  .menu-btn { display: grid !important; place-items: center; flex: 0 0 auto; }

  .mobile-menu {
    position: fixed !important;
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    max-height: calc(100dvh - 68px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 14px 18px 22px !important;
    box-shadow: 0 22px 45px rgba(0,0,0,.12);
    z-index: 10000;
    gap:8px;
    background:#151b23!important;
  }
  .mobile-menu.open { display: grid !important; }
  .mobile-menu a { min-height: 46px; display:flex; align-items:center; }
  body.mobile-menu-open { overflow:hidden !important; }
  .mobile-nav-group { border:1px solid rgba(255,255,255,.12); border-radius:14px; overflow:hidden; }
  .mobile-nav-group summary { min-height:50px; padding:0 15px; display:flex; align-items:center; justify-content:space-between; color:#fff; font-weight:850; cursor:pointer; list-style:none; }
  .mobile-nav-group summary::-webkit-details-marker { display:none; }
  .mobile-nav-group[open] summary { background:rgba(255,255,255,.07); color:#d6c0a2; }
  .mobile-nav-group[open] summary span { transform:rotate(180deg); }
  .mobile-nav-submenu { display:grid; gap:5px; padding:7px; border-top:1px solid rgba(255,255,255,.09); }
  .mobile-nav-submenu a { min-height:42px!important; padding:9px 12px!important; font-size:14px; background:rgba(255,255,255,.055)!important; }
  .mobile-nav-direct { min-height:50px!important; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.07)!important; }

  .section { padding: 64px 0 !important; }
  .page-hero { padding: 58px 0 42px !important; }
  .hero { padding: 58px 0 50px !important; }

  h1 { font-size: clamp(40px, 11vw, 54px) !important; line-height: 1.01 !important; }
  h2 { font-size: clamp(31px, 8.5vw, 43px) !important; line-height: 1.06 !important; }
  h3 { line-height: 1.15; }
  .lead { font-size: 17px !important; line-height: 1.55 !important; }
  .section-head { margin-bottom: 30px !important; }

  .actions { width: 100%; }
  .actions .btn { min-height: 48px; }
  .cta-box .actions,
  .central-cta .actions { width: 100%; }

  .hero-grid,
  .grid-2,
  .analytics-hero-grid,
  .analytics-intro-grid,
  .analytics-proof,
  .checkin-hero-grid,
  .guest-hub-grid,
  .checkin-proof,
  .live-checkin-grid,
  .comm-hero-grid,
  .omni-grid,
  .unified-shell,
  .product-proof,
  .product-proof.reverse,
  .twilio-highlight,
  .timeline-shell,
  .upsell-journey-grid,
  .builder-wrap,
  .stats-grid,
  .fs-backoffice-grid,
  .portfolio-overview,
  .house-compare,
  .solution-grid,
  .mobile-key-clean-hero,
  .mobile-key-control,
  .mobile-key-lifestyle,
  .final-home-grid,
  .home-photo-grid {
    grid-template-columns: 1fr !important;
  }

  .image-text-grid,
  .location-card,
  .guest-outcome,
  .contact-shell,
  .butler-screen,
  .butler-flow,
  .fs-intro,
  .fs-dark,
  .fs-longstay,
  .fs-final-cta {
    grid-template-columns:1fr !important;
  }

  .grid-3,
  .grid-4,
  .kpi-strip,
  .journey-grid,
  .management-kpis,
  .analytics-module-grid,
  .analytics-benefits,
  .operator-benefits,
  .comm-benefits,
  .fs-tech-grid,
  .priority-kpis,
  .four-detail,
  .upsell-flow,
  .channel-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mockup,
  .solution-visual,
  .chain-visual,
  .comm-photo-card,
  .comm-gallery-main,
  .comm-gallery-side,
  .media-hero {
    min-height: 380px !important;
  }

  .phone {
    max-width: min(230px, 72vw);
    right: 18px !important;
  }

  .portal-window,
  .dashboard-frame-shell,
  .live-checkin-browser,
  .upsell-shot,
  .product-proof-shot,
  .checkin-proof-shot,
  .software-shot,
  .unified-image {
    border-radius: 20px !important;
  }

  .dashboard-frame { height: 720px !important; }
  .live-checkin-frame { height: 650px !important; }

  .comm-float {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 28px 20px !important;
  }
  footer { padding-top: 54px !important; }
  .footer-bottom {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .footer-legal { display:flex; gap:24px; flex-wrap:wrap; }
  .footer-legal a { color:#b9bcc0; text-decoration: underline; text-underline-offset: 3px; }

  .table-wrap,
  .table-scroll,
  .house-table,
  .package-table-wrap { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }

  .media-hero img,
  .platform-insight img,
  .analytics-real-shot img { height:auto !important; }

  .analytics-home-hero .final-dashboard-card { width:88% !important; }
  .platform-overview-mockup { min-width:0; }
  .platform-network { min-height:0!important; display:grid!important; grid-template-columns:1fr!important; gap:14px!important; padding:14px!important; }
  .platform-network .network-lines,.platform-network .pulse-dot { display:none!important; }
  .platform-network .network-node,.platform-network .network-core { position:relative!important; inset:auto!important; width:100%!important; max-width:none!important; transform:none!important; animation:none!important; margin:0!important; }
  .platform-network .network-core { order:-1!important; min-height:0!important; }
  .platform-overview-mockup { display:block!important; min-height:0!important; padding:22px!important; overflow:hidden!important; }
  .platform-overview-mockup .platform-mockup-copy h3 { font-size:24px!important; overflow-wrap:anywhere; }
  .platform-overview-mockup .phone { position:relative!important; inset:auto!important; width:min(220px,76vw)!important; height:390px!important; margin:26px auto -42px!important; transform:none!important; }
}

@media (max-width: 640px) {
  :root { --mobile-gutter: 14px; }

  .section { padding: 54px 0 !important; }
  .page-hero { padding: 48px 0 34px !important; }

  h1 { font-size: clamp(38px, 12vw, 48px) !important; }
  h2 { font-size: clamp(29px, 9vw, 39px) !important; }

  .eyebrow { font-size: 11px !important; padding: 6px 10px !important; }
  .breadcrumb { font-size: 12px !important; }

  .actions { display:grid !important; grid-template-columns:1fr !important; gap:10px !important; }
  .actions .btn { width:100% !important; }

  .grid-3,
  .grid-4,
  .kpi-strip,
  .journey-grid,
  .management-kpis,
  .analytics-module-grid,
  .analytics-benefits,
  .operator-benefits,
  .comm-benefits,
  .fs-tech-grid,
  .priority-kpis,
  .four-detail,
  .upsell-flow,
  .channel-strip,
  .hero-kpi-grid,
  .portal-two {
    grid-template-columns: 1fr !important;
  }

  .card { padding: 20px !important; }
  .cta { padding-bottom: 58px !important; }
  .cta-box, .central-cta { padding: 28px 20px !important; border-radius: 24px !important; }

  .portal-body { padding: 15px !important; }
  .portal-search { padding: 15px !important; }
  .portal-found { align-items:flex-start !important; flex-direction:column !important; }
  .portal-steps { grid-template-columns: repeat(2,1fr) !important; }

  .dashboard-frame { height: 680px !important; }
  .live-checkin-frame { height: 600px !important; }

  .timeline-guest, .timeline-feed { padding: 18px !important; }

  .fs-tech-card { min-height: 104px !important; }
  .fs-tech-logo strong { font-size: 13px !important; }

  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-grid > div:first-child { margin-bottom: 8px; }

  .solution-visual-copy,
  .comm-photo-copy { padding: 20px !important; }
  .solution-visual-copy h3 { font-size: 26px !important; }

  .chain-visual { display:block !important; padding:10px !important; }
  .chain-main { min-height:340px !important; }
  .chain-side-wrap { display:none !important; }

  .step { grid-template-columns: 44px 1fr !important; padding:14px !important; }
  .step-num { width:44px !important; height:44px !important; }

  .platform-insight figcaption { display:grid !important; gap:8px !important; }
  .pricing-card { padding:22px !important; }
  .plan-price { font-size:36px !important; }
  .butler-coming { padding:24px 20px !important; }
  .comm-flow,
  .fs-service-grid,
  .fs-tech-grid,
  .butler-benefits { grid-template-columns:1fr !important; }
  .final-home-copy .hero-runner { font-size:.54em !important; }
}

@media (max-width: 380px) {
  .container { width: calc(100% - 22px) !important; }
  h1 { font-size: 36px !important; }
  .header-brand-picture,.header-brand-picture .brand-logo,header .brand { width:30px!important; height:30px!important; max-width:30px!important; flex-basis:30px!important; }
}
