/* Mobile homepage refinements */
@media (max-width:640px){
  body.home{overflow-x:hidden}

  .home .site-header{height:78px}
  .home .header-row{min-height:78px}
  .home .brand-main{font-size:27px;line-height:.95}
  .home .brand-script{font-size:17px;margin-left:42px;margin-top:2px}

  .home .hero{
    min-height:auto;
    background-position:58% center;
    background-size:cover;
  }
  .home .hero:before{
    background:
      linear-gradient(180deg,
        rgba(251,247,242,.98) 0%,
        rgba(251,247,242,.96) 45%,
        rgba(251,247,242,.84) 68%,
        rgba(251,247,242,.60) 100%);
  }
  .home .hero-grid{
    width:min(100% - 36px,620px);
    min-height:auto;
    display:block;
  }
  .home .hero-copy{
    width:100%;
    max-width:none;
    padding:40px 0 30px;
    justify-content:flex-start;
  }
  .home .hero .eyebrow{
    font-size:10px;
    line-height:1.45;
    letter-spacing:.19em;
    margin-bottom:16px;
  }
  .home .hero h1{
    font-size:clamp(38px,11.2vw,45px);
    line-height:.95;
    letter-spacing:-.035em;
    max-width:100%;
    margin:0 0 20px;
  }
  .home .hero .lead{
    font-size:17px;
    line-height:1.5;
    max-width:100%;
    margin-bottom:24px;
  }
  .home .hero-buttons{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    width:100%;
  }
  .home .hero-buttons .btn{
    width:100%;
    min-height:48px;
    padding:12px 13px;
    justify-content:center;
    text-align:center;
    font-size:12px;
  }
  .home .hero-stats{
    margin-top:28px;
    padding:18px 16px 16px;
    max-width:none;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:0;
    background:rgba(255,250,246,.78);
    border:1px solid rgba(111,45,89,.10);
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
  }
  .home .hero-stats .stat{
    min-width:0;
    padding:13px 12px;
    border-right:1px solid rgba(111,45,89,.18);
    border-bottom:1px solid rgba(111,45,89,.14);
  }
  .home .hero-stats .stat:nth-child(2n){border-right:0}
  .home .hero-stats .stat:nth-child(n+3){border-bottom:0}
  .home .hero-stats .stat:nth-child(3){padding-left:12px}
  .home .hero-stats .stat strong{
    font-size:24px;
    line-height:1;
    margin-bottom:5px;
  }
  .home .hero-stats .stat span{
    display:block;
    font-size:10px;
    line-height:1.3;
  }
  .home .hero-quote-wrap{display:none}

  .home .quick-item{
    min-height:104px;
    padding:24px 14px;
  }
  .home .quick-item:first-child{padding-left:14px}
}

@media (max-width:390px){
  .home .hero-grid{width:calc(100% - 28px)}
  .home .hero h1{font-size:38px}
  .home .hero .lead{font-size:16px}
  .home .hero-buttons{grid-template-columns:1fr}
}


/* Mobile navigation visibility + panel */
@media (max-width:1000px){
  .site-header{position:relative;z-index:1000}
  .mobile-nav[hidden]{display:none!important}
  .mobile-nav:not([hidden]){
    display:block!important;
    position:absolute;
    left:0;
    right:0;
    top:100%;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:16px 24px 20px!important;
    background:#fffaf6;
    border-top:1px solid #eadfd8;
    border-bottom:1px solid #eadfd8;
    box-shadow:0 16px 28px rgba(52,16,45,.12);
    z-index:9999;
  }
  .mobile-nav .mobile-menu,
  .mobile-nav .menu{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:0!important;
    list-style:none!important;
    margin:0!important;
    padding:0!important;
  }
  .mobile-nav li{
    margin:0!important;
    border-bottom:1px solid #eadfd8;
  }
  .mobile-nav li:last-child{border-bottom:0}
  .mobile-nav a{
    display:flex!important;
    align-items:center;
    min-height:48px;
    padding:11px 4px!important;
    font:600 20px/1.1 var(--serif)!important;
    color:var(--ink)!important;
    text-decoration:none!important;
  }
  .mobile-nav a:active,
  .mobile-nav a:focus-visible{
    color:#7a2f63!important;
  }
  body.menu-open{overflow:hidden}
}

/* Sitewide heading type: switch the typeface only; preserve each heading's size, weight and spacing. */
body :is(h1,h2,h3,h4,h5,h6){font-family:Arial,Helvetica,sans-serif!important}
/* Keep higher-specificity component rules aligned with the sitewide heading family. */
body:not(.home) :is(h1,h2){font-family:Arial,Helvetica,sans-serif!important}
body :is(h1):not(#hero-title):not(.work-regular){font-family:Arial,Helvetica,sans-serif!important}
body.single-post .otc-article-hero h1{font-family:Arial,Helvetica,sans-serif!important}
body.single-post .otc-article-content h2.wp-block-heading.has-background{font-family:Arial,Helvetica,sans-serif!important}
.page-id-19 .about-v3-section h2{font-family:Arial,Helvetica,sans-serif!important}
.disclaimer-alert h2{font-family:Arial,Helvetica,sans-serif!important}
.topics-page .topics-page-hero h1,.topics-page .topics-page-note h2{font-family:Arial,Helvetica,sans-serif!important}
.page-id-21 .work-v2-section-head h2,.page-id-21 .work-v2-contact-copy h2,.page-id-21 .work-v2-card h3{font-family:Arial,Helvetica,sans-serif!important}
