/* CONCRETTA V426 — shared inner-page responsive safety layer.
   Scope: non-home editorial/information pages only. Desktop >=1190px is untouched.
   Reference behaviour: V425 index mobile/tablet/iPhone stabilization. */

body.ct-home,
body.ct-concretta-page{
  overflow-x:hidden;
}
body.ct-home *,
body.ct-concretta-page *{
  box-sizing:border-box;
}
body.ct-home img,
body.ct-home video,
body.ct-home iframe,
body.ct-home svg,
body.ct-concretta-page img,
body.ct-concretta-page video,
body.ct-concretta-page iframe,
body.ct-concretta-page svg{
  max-width:100%;
}
body.ct-home :where(.row,[class*="grid"],[class*="shell"],[class*="wrap"],[class*="copy"],[class*="content"],[class*="panel"]),
body.ct-concretta-page :where(.row,[class*="grid"],[class*="shell"],[class*="wrap"],[class*="copy"],[class*="content"],[class*="panel"]){
  min-width:0;
}

/* Tablet portrait / compact tablets: use the same calm single-column hero logic as V425. */
@media (min-width:701px) and (max-width:991px){
  body.ct-home,
  body.ct-concretta-page{overflow-x:clip;}

  body.ct-home .ct281-shell{width:calc(100% - 56px);max-width:1180px;}
  body.ct-home .ct281-hero-grid{
    min-height:0;
    grid-template-columns:1fr;
    gap:24px;
    padding:108px 0 52px;
  }
  body.ct-home .ct281-hero-copy{max-width:720px;}
  body.ct-home .ct281-hero h1{
    max-width:720px;
    font-size:clamp(42px,5.8vw,52px);
    overflow-wrap:anywhere;
  }
  body.ct-home .ct281-hero-lead{max-width:680px;font-size:16px;}
  body.ct-home .ct281-hero-art{
    min-height:118px;
    justify-content:flex-start;
    padding:0;
  }
  body.ct-home .ct281-hero-mark{text-align:left;padding:26px 0 0 24px;}

  body.ct-concretta-page .cb119-hero{
    min-height:78svh;
    height:auto;
    padding-top:122px;
    padding-bottom:64px;
  }
  body.ct-concretta-page .cb119-hero-layout{grid-template-columns:1fr;gap:30px;}
  body.ct-concretta-page .cb119-hero-rail{display:none;}
  body.ct-concretta-page .cb119-hero h1{font-size:clamp(50px,7vw,64px);}
  body.ct-concretta-page .cb119-hero-copy{max-width:620px;}
}

/* Phones / large phones: iPhone + Android/Samsung safe-area and no horizontal collisions. */
@media (max-width:700px){
  body.ct-home,
  body.ct-concretta-page{overflow-x:hidden!important;}

  body.ct-home .ct281-shell{width:calc(100% - 32px);max-width:none;}
  body.ct-home .ct281-hero{overflow:hidden;}
  body.ct-home .ct281-hero-grid{
    min-height:0;
    grid-template-columns:1fr;
    gap:16px;
    padding-top:max(92px,calc(76px + env(safe-area-inset-top)));
    padding-bottom:max(36px,calc(28px + env(safe-area-inset-bottom)));
  }
  body.ct-home .ct281-hero-copy,
  body.ct-home .ct281-hero h1,
  body.ct-home .ct281-hero-lead{min-width:0;max-width:100%;}
  body.ct-home .ct281-hero h1{
    font-size:clamp(32px,9vw,38px);
    line-height:1.02;
    overflow-wrap:anywhere;
    word-break:normal;
  }
  body.ct-home .ct281-hero-lead{margin-top:18px;font-size:14.5px;line-height:1.62;}
  body.ct-home .ct281-hero-art{min-height:88px;padding:0;}
  body.ct-home .ct281-hero-mark{padding:23px 0 0 18px;}
  body.ct-home .ct281-hero-mark strong{font-size:20px;}

  body.ct-home :where(input,select,textarea,button){max-width:100%;}
  body.ct-home :where(input,select,textarea){font-size:16px;}

  body.ct-concretta-page .cb119-wrap{width:auto;max-width:none;margin-left:20px;margin-right:20px;}
  body.ct-concretta-page .cb119-hero{
    min-height:100svh;
    min-height:100dvh;
    height:auto;
    padding-top:max(112px,calc(88px + env(safe-area-inset-top)));
    padding-bottom:max(52px,calc(38px + env(safe-area-inset-bottom)));
  }
  body.ct-concretta-page .cb119-hero-layout{grid-template-columns:1fr;gap:24px;}
  body.ct-concretta-page .cb119-hero h1{
    max-width:100%;
    font-size:clamp(42px,12vw,54px);
    overflow-wrap:anywhere;
  }
  body.ct-concretta-page .cb119-hero-copy{max-width:100%;font-size:15px;line-height:1.62;}
  body.ct-concretta-page .cb119-hero-actions{align-items:flex-start;gap:18px;margin-top:26px;}
  body.ct-concretta-page .cb121-hero-signature{max-width:100%;}
  body.ct-concretta-page .cb119-story-media{min-height:520px;}
  body.ct-concretta-page .cb119-architecture-media{min-height:440px;}
}

/* iPhone Safari browser bars: prefer stable small viewport height. */
@supports (-webkit-touch-callout:none){
  @media (max-width:700px){
    body.ct-concretta-page .cb119-hero{min-height:100svh;}
    body.ct-home .ct281-hero-grid,
    body.ct-concretta-page .cb119-hero-layout{
      -webkit-transform:none;
      transform:none;
    }
  }
}

/* Phone landscape / short browser viewport: never force tall portrait compositions. */
@media (max-width:900px) and (max-height:520px) and (orientation:landscape){
  body.ct-home .ct281-hero-grid{
    padding-top:max(76px,calc(62px + env(safe-area-inset-top)));
    padding-bottom:max(24px,calc(18px + env(safe-area-inset-bottom)));
    gap:8px;
  }
  body.ct-home .ct281-hero h1{font-size:clamp(29px,5.2vw,38px);}
  body.ct-home .ct281-hero-lead{margin-top:12px;font-size:13px;line-height:1.5;}
  body.ct-home .ct281-hero-art{display:none;}

  body.ct-concretta-page .cb119-hero{
    min-height:0!important;
    height:auto!important;
    padding-top:max(84px,calc(66px + env(safe-area-inset-top)))!important;
    padding-bottom:max(30px,calc(22px + env(safe-area-inset-bottom)))!important;
  }
  body.ct-concretta-page .cb119-hero h1{font-size:clamp(36px,7vw,48px);}
  body.ct-concretta-page .cb119-hero-copy{margin-top:14px;font-size:13.5px;line-height:1.52;}
  body.ct-concretta-page .cb119-hero-actions{margin-top:18px;}
  body.ct-concretta-page .cb121-hero-signature{margin-top:18px;}
}

/* Touch landscape tablets: retain desktop structure but with safe gutters. */
@media (min-width:992px) and (max-width:1180px) and (hover:none) and (pointer:coarse){
  body.ct-home,
  body.ct-concretta-page{overflow-x:clip;}
  body.ct-home .ct281-shell{width:calc(100% - 64px);}
  body.ct-concretta-page .cb119-wrap{width:calc(100% - 64px);}
}
