/* Mobile-only FV: the photo belongs to the hero, not a fixed page backdrop. */
@media(max-width:768px){
  body.home .site-main{background:#fff}
  body.home .hero{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:flex-end;height:auto;min-height:max(680px,100svh,130vw);margin:0;padding:max(380px,55svh,71.5vw) 5% clamp(40px,6svh,64px);background-image:url('images/a2247474a1c44bf3.webp');background-size:auto 100%;background-position:72% top;background-repeat:no-repeat;background-attachment:scroll;overflow:hidden}
  body.home .hero:after{background:transparent}
  body.home .hero-copy{position:relative;inset:auto;flex-shrink:0;width:100%;max-width:none;padding:0;gap:18px;transform:translateY(-125px)}
  body.home .hero h1{font-size:clamp(44px,12vw,80px);line-height:1.18;white-space:normal}
  body.home .hero h1 span{display:block;white-space:nowrap}
  body.home .hero p{font-size:clamp(12px,3.2vw,18px);line-height:1.7;max-width:100%}
  body.home #about{height:auto;min-height:0;margin-top:0;padding:64px 5% 72px;background:#fff}
  body.home .about-grid{display:block}
  body.home .about-grid>div:first-child{padding-bottom:32px}
  body.home #about:before,body.home #about:after{content:none;display:none}
}
/* Bridge the original 760px header breakpoint to the mobile FV breakpoint. */
@media(min-width:761px) and (max-width:768px){
  body.home .header{top:12px;width:calc(100% - 24px);height:60px;padding:0 8px 0 20px}
  body.home .header .brand{width:119px;height:35px}
  body.home .nav{display:none}
  body.home .menu-toggle{display:block;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--teal);color:#fff;font-size:0}
  body.home .menu-toggle:before{content:"☰";font-size:20px}
  body.home.menu-open{overflow:hidden}
  body.home.menu-open .header{height:auto;min-height:60px;flex-wrap:wrap;padding-bottom:18px}
  body.home.menu-open .nav{display:flex;flex-basis:100%;flex-direction:column;align-items:stretch;gap:0;padding-top:16px;font-size:15px}
  body.home.menu-open .nav a{padding:10px 4px;border-top:1px solid #ddd}
  body.home.menu-open .nav-contact{width:auto;height:46px;margin:8px 0 0}
  body.home.menu-open .menu-toggle:before{content:"×"}
}

/* Mobile problem cards and consultation copy. */
body.home .problem .worry-phrase{display:contents}
@media(max-width:768px){
  body.home .problem{height:auto;padding-right:20px;padding-bottom:0;padding-left:20px}
  body.home .problem>.container{width:100%;max-width:none}
  body.home .problem>.container>.problem-title{height:auto;padding:28px 16px 0;border-radius:12px 12px 0 0;color:#fff;font-size:22px;font-weight:400;line-height:1.6;text-align:center;text-wrap:balance}
  body.home .problem .worry-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;gap:20px 12px;height:auto;padding:28px 16px 28px;border-radius:0 0 12px 12px;background:var(--teal)}
  body.home .problem .worry{display:block;align-content:center;min-width:0;height:auto;min-height:148px;padding:24px 8px 18px;background:#fff;box-shadow:none;color:#292929;font-size:15px;font-weight:400;line-height:1.75;text-align:center;text-wrap:balance;word-break:auto-phrase;overflow-wrap:normal}
  body.home .problem .worry br{display:none}
  body.home .problem .worry-phrase{display:inline-block;white-space:nowrap}
  body.home .problem .worry::before{top:2px;left:8px;font-size:36px;line-height:1}
  body.home .problem .problem-arrow{width:24px;height:36px;margin:20px auto 0;gap:5px}
  body.home .problem .problem-arrow span{border-top-width:10px;border-right-width:12px;border-left-width:12px}
  body.home .problem .answer{height:auto;margin-top:20px;padding:0}
  body.home .problem .answer h3{margin:0;color:#292929;font-size:28px;font-weight:400;line-height:1.6;white-space:nowrap;text-align:center}
  body.home .problem .answer h3 br{display:none}
  body.home .problem .answer h3 .consult-ending::before{content:"\A";white-space:pre}
  body.home .problem .answer h3 strong{color:var(--teal);font-weight:600}
  body.home .problem .answer h3 strong::before{content:"\A";white-space:pre}
  body.home .problem .answer p{width:100%;max-width:100%;margin:18px 0 0;color:#292929;font-size:16px;font-weight:400;line-height:1.8;text-align:center;text-wrap:balance}
  body.home .problem .answer p br{display:none}
  body.home .problem .answer .consult-copy-phrase{display:inline-block;max-width:100%;text-wrap:pretty}
}

/* Let the quote straddle the card edge at every viewport size. */
body.home .problem .worry::before{
  top:-.32em;
  left:18px;
  font-size:clamp(36px,3vw,42px);
  line-height:1;
  color:rgba(255,255,255,.75);
  pointer-events:none;
}

/* Restore the mobile Works header and visible carousel controls. */
@media(max-width:768px){
  body.home #works{height:auto;padding:98px 0 42px;background:var(--gray)}
  body.home #works>.container{width:calc(100% - 20px);max-width:none;margin-left:20px;margin-right:0}
  body.home #works .works-head{display:flex;align-items:center;justify-content:space-between;gap:16px;width:calc(100% - 20px);padding-bottom:32px}
  body.home #works .works-head .btn{position:relative;inset:auto;flex-shrink:0;gap:10px;height:42px;margin:0;--text-arrow-space:52px}
  body.home #works .works-head .btn::after{width:42px;height:42px;flex-shrink:0}
  body.home #works .works-scroll{width:100%;overflow-x:auto;overflow-y:hidden;padding-right:20px}
  body.home #works .works-grid{gap:24px}
  body.home #works .work{flex:0 0 280px;width:280px}
  body.home #works .work-image,body.home #works .work img{width:280px;height:280px}
  body.home #works .works-controls{position:static;display:flex;justify-content:flex-end;gap:12px;width:calc(100% - 40px);margin:28px 20px 0}
  body.home #works .works-arrow{width:42px;height:42px;border:1px solid var(--teal);color:var(--teal);background:transparent}
}
