/* =====================================================================
   Concrete Designs — responsive layer (v18)
   Loaded LAST on index.html and about.html, so it safely overrides the
   inline styles. Desktop (>=1200px) look is untouched.
   Breakpoints used:  <=560 phone · 561–699 large phone · 700–899 tablet
                      portrait (iPad Mini/Air) · 900–1199 tablet landscape
   ===================================================================== */

/* ---------- 0. Safe defaults ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,video,svg{max-width:100%}
img{height:auto}                       /* attribute width/height must never distort an image */
.slide img,.apr-vid,.wwd-img img,.prj-img img,.prj-th img,.svs-frame img,.svs-m-fig img,
.gl-img img,.fd-fig img{height:100%}   /* ...except the cropped "cover" frames below */

/* notch / rounded-corner safety in landscape phones */
header{padding-left:max(var(--pad),env(safe-area-inset-left));padding-right:max(var(--pad),env(safe-area-inset-right))}

/* older iOS / browsers without the svh unit */
.stage{min-height:100vh}
.apr{min-height:100vh}
@supports (height:100svh){.stage{min-height:100svh}.apr{min-height:100svh}}

/* ---------- 1. THE PRACTICE portrait (Home section 07 + About page) ----------
   Old rule stretched the 1115×1700 portrait with object-fit:fill and a
   container-query offset. That is what zoomed the face on iPad and left a
   grey gap under the photo between ~900–1200px. A plain "cover" crop always
   fills the frame, never distorts, and keeps the head in view at every size. */
.fd-fig{container-type:normal;background:#b3aea2}
.fd-fig img{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;
  object-position:50% 12%;
}
@media (max-width:599px){
  .fd-fig{aspect-ratio:1/1.02;max-height:none}
  .fd-fig img{object-position:50% 8%}
}

/* Large phone / tablet portrait (600–899: iPad Mini 768, iPad Air 820…): photo LEFT, text RIGHT,
   same editorial composition as desktop instead of a giant full-width face. */
@media (min-width:600px) and (max-width:899px){
  .fd{--fpadx:clamp(24px,4vw,40px)}
  .fd .fd-grid,.fd--page .fd-grid{
    grid-template-columns:minmax(0,4fr) minmax(0,6fr);
    grid-template-rows:minmax(28px,1fr) auto auto minmax(28px,1fr);
    grid-template-areas:"fig ." "fig head" "fig info" "fig .";
    padding-top:0;
    min-height:clamp(540px,calc(100svh - var(--hh) - 40px),680px);
  }
  .fd-head,.fd-info{padding:0 var(--pad) 0 var(--fpadx)}
  .fd-info{padding-top:0;padding-bottom:0}
  .fd-fig{aspect-ratio:auto;max-height:none;width:auto;margin-top:0}
  .fd h2,.fd--page h1{font-size:clamp(1.6rem,4.2vw,2.15rem)}
  .fd-cred,.fd-copy{max-width:none}
  .fd-cred{margin-top:18px}
  .fd-cred li{padding:11px 0;font-size:1.02rem}
  .fd-copy{margin-top:18px}
  .fd-copy p{font-size:.95rem;line-height:1.55}
  .fd-copy p+p{margin-top:10px}
  .fd-act{margin-top:20px}
}

/* About page: 900–1199 used a 1fr/1fr split which made the portrait panel
   very wide — go back to the narrower photo column so the face isn't huge. */
@media (min-width:900px) and (max-width:1199px){
  .fd--page .fd-grid{grid-template-columns:minmax(0,4.4fr) minmax(0,5.6fr)}
}

/* ---------- 2. HERO ---------- */
/* Tablet + phone, portrait: the old hero was 100svh tall PLUS stats PLUS
   clients strip (1225px on iPad Mini) and a 16:9 photo got stretched over it.
   Keep it to roughly one screen so the photo isn't over-zoomed. */
@media (max-width:1100px) and (orientation:portrait){
  .stage{min-height:clamp(540px,64svh,760px)}
}
@media (max-width:640px){
  .stage{min-height:clamp(500px,70svh,680px)}
}
/* short landscape screens (phones turned sideways, small laptops) */
@media (max-height:520px){
  .stage{min-height:0;padding-top:calc(var(--hh) + 16px);padding-bottom:36px}
  h1{font-size:clamp(1.7rem,6vh,2.4rem)}
  .sub{margin-top:12px}
  .cta{margin-top:16px}
}

/* Stats: tablets have room for all four across */
@media (min-width:641px) and (max-width:980px){
  .stats{grid-template-columns:repeat(4,1fr)}
  .stat:nth-child(3){padding-left:clamp(14px,2.4vw,36px);border-left:1px solid rgba(242,240,232,.16)}
  .stat:nth-child(n+3){border-top:0}
  .stat{padding-left:clamp(14px,2.4vw,36px)}
  .stat:first-child{padding-left:0}
}
/* never let the long hero heading push sideways on tiny phones */
@media (max-width:380px){
  h1{font-size:clamp(1.75rem,9.4vw,2.2rem)}
  .btn{padding:0 18px}
}

/* ---------- 3. Mobile menu on short / landscape screens ---------- */
.mmenu{overflow-y:auto;-webkit-overflow-scrolling:touch}
@media (max-height:560px){
  .mmenu{padding-top:calc(var(--hh) + 8px);gap:0}
  .mmenu a:not(.btn){font-size:clamp(20px,5.5vh,28px);padding:4px 0}
  .mmenu .btn{margin-top:14px;min-height:44px}
}

/* ---------- 4. Section 03 Approach: video frame ---------- */
/* between 821–1100 the left video column became a tall narrow sliver */
@media (min-width:821px) and (max-width:1100px){
  .apr-media{min-height:360px}
  .apr-vid{object-position:50% 50%}
}

/* ---------- 5. About page ---------- */
/* three lists side by side on iPad portrait instead of one very long column */
@media (min-width:700px) and (max-width:900px){
  .ab-cols{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:22px;row-gap:0}
  .ab-col li{grid-template-columns:2rem minmax(0,1fr);font-size:1.02rem}
}
@media (min-width:521px) and (max-width:700px){
  .ab-foot-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .ab-foot-grid>div:first-child{grid-column:1/-1}
}
