/* ============================================================================
   SESA RESPONSIVE NORMALIZATION — 2026-09-11
   Last-loaded cross-page layer. One source of truth for viewport behavior.
   ============================================================================ */

:root{
  --sesa-safe-top:env(safe-area-inset-top);
  --sesa-safe-right:env(safe-area-inset-right);
  --sesa-safe-bottom:env(safe-area-inset-bottom);
  --sesa-safe-left:env(safe-area-inset-left);
  --sesa-mobile-gutter:clamp(16px,4vw,28px);
  --sesa-desktop-container:1440px;
}

html{max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:hidden}
*,*::before,*::after{min-width:0}
img,video,svg,canvas,iframe{max-width:100%}
img,video{height:auto}
iframe{width:100%;border:0}
.container{width:min(var(--sesa-desktop-container),calc(100% - (2 * var(--sesa-mobile-gutter))));max-width:100%;margin-inline:auto}
h1,h2,h3,h4,h5,h6,p,a,li,span,strong,small{overflow-wrap:break-word}

/* --------------------------------------------------------------------------
   COMMAND BAR
   -------------------------------------------------------------------------- */
@media (min-width:1200px){
  .command-bar__inner{grid-template-columns:minmax(160px,200px) minmax(260px,1fr) auto;gap:clamp(18px,1.8vw,30px)}
  .command-bar .nav__toggle{display:none!important}
  .command-bar .nav__menu{justify-content:flex-end;gap:clamp(2px,.35vw,8px)}
  .command-bar .nav__menu a{padding-inline:clamp(7px,.65vw,12px)}
  .command-bar__searchbox{width:100%;max-width:620px;margin-inline:auto}

  .solutions__grid,.services-list__grid,.projects-grid,.projects-gallery,
  .team__grid,.catalog__grid,.journal-grid,.footer__grid{column-gap:clamp(28px,3vw,52px)}
  .contact-grid,.sesa-route__grid,.service-big,.service-big--reverse{column-gap:clamp(44px,5vw,84px)}
}

@media (max-width:1199px){
  .top-bar{display:none!important}
  .command-bar.nav,.header.scrolled .command-bar.nav{padding:10px 0!important}
  .command-bar__inner{grid-template-columns:minmax(130px,170px) minmax(220px,1fr) 48px!important;gap:12px!important;min-height:52px}
  .command-bar .nav__logo img{width:min(160px,100%)!important;max-height:44px}
  .command-bar .nav__toggle{display:flex!important;justify-self:end;z-index:1041!important;width:44px;height:44px;align-items:center;justify-content:center}
  .command-bar .nav__menu{
    position:fixed!important;
    top:0!important;right:0!important;bottom:0!important;left:auto!important;
    width:min(390px,92vw)!important;height:100dvh!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:0!important;
    padding:calc(86px + var(--sesa-safe-top)) max(22px,calc(18px + var(--sesa-safe-right))) calc(28px + var(--sesa-safe-bottom)) 24px!important;
    background:rgba(255,255,255,.99)!important;box-shadow:-24px 0 60px rgba(0,25,50,.16)!important;
    overflow-y:auto!important;overscroll-behavior:contain!important;
    transform:translate3d(110%,0,0)!important;transition:transform .32s cubic-bezier(.16,1,.3,1)!important;z-index:1040!important
  }
  .command-bar .nav__menu.active{transform:translate3d(0,0,0)!important}
  .command-bar .nav__menu li{width:100%!important;border-bottom:1px solid rgba(0,40,77,.08)!important}
  .command-bar .nav__menu a{display:flex!important;align-items:center!important;justify-content:flex-start!important;width:100%!important;min-height:52px;padding:14px 6px!important;color:var(--command-ink)!important;font-size:15px!important;border:0!important;border-radius:0!important;text-shadow:none!important}
  .command-bar .nav__menu a.active{font-weight:800!important;color:var(--command-primary)!important}
  .command-bar .nav__menu .command-bar__home{height:auto!important;gap:12px!important;background:transparent!important}
  .command-bar__home-label{display:inline!important}
  .command-bar .nav__menu .command-bar__sales{justify-content:center!important;margin:20px 0 0!important;min-height:48px!important;border-radius:12px!important;color:#fff!important;background:linear-gradient(135deg,#004db8,#0b67f0)!important}
  body.menu-open{overflow:hidden!important}
  .command-panel{width:min(720px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
}

@media (max-width:768px){
  .command-bar.nav,.header.scrolled .command-bar.nav{padding:8px 0!important}
  .command-bar__inner{grid-template-columns:minmax(82px,118px) minmax(0,1fr) 44px!important;justify-content:stretch;gap:8px!important;min-height:48px}
  .command-bar .nav__logo{display:flex;align-items:center}
  .command-bar .nav__logo img{width:min(112px,100%)!important;max-height:38px!important}
  .command-bar__search{position:relative;width:100%;justify-self:stretch;z-index:1042}
  .command-bar__searchbox{position:relative;width:100%;min-height:44px!important;padding:0 11px!important;display:grid!important;grid-template-columns:18px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;border-radius:12px!important}
  .command-bar__search-icon{pointer-events:none;position:relative;z-index:1;font-size:16px}
  .command-bar__search input{position:static!important;width:100%!important;height:100%!important;padding:0!important;opacity:1!important;font-size:16px!important;cursor:text}
  .command-bar__search input::placeholder{color:#8290a2!important}
  .command-bar__shortcut{display:none!important}
  .command-panel{position:fixed!important;top:calc(68px + var(--sesa-safe-top))!important;left:max(12px,var(--sesa-safe-left))!important;right:max(12px,var(--sesa-safe-right))!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 84px - var(--sesa-safe-top) - var(--sesa-safe-bottom))!important;overflow:auto!important;overscroll-behavior:contain;border-radius:16px!important;transform:none!important}
  .command-panel__default{grid-template-columns:1fr!important}
  .command-panel__section{padding:18px 14px 14px!important}
  .command-panel__section + .command-panel__section{border-left:0!important;border-top:1px solid var(--command-line)!important}
  .command-panel__brands{grid-template-columns:1fr!important}
  .command-panel__item,.command-brand,.command-result{min-height:48px}
  .command-panel__footer{align-items:flex-start!important;flex-direction:column!important;gap:6px!important}
  .command-bar .nav__menu{width:min(360px,94vw)!important;padding-top:calc(76px + var(--sesa-safe-top))!important}
  .command-bar .nav__toggle{width:44px!important;height:44px!important}

  input,select,textarea,button{font-size:16px}
  .form-group input,.form-group select,.form-group textarea,.command-bar__search input{font-size:16px!important}
  .form-row{grid-template-columns:1fr!important;gap:0!important}
}

@media (max-width:430px){
  :root{--sesa-mobile-gutter:16px}
  .command-bar__inner{grid-template-columns:minmax(82px,104px) minmax(0,1fr) 44px!important;gap:6px!important}
  .command-bar .nav__logo img{width:min(100px,100%)!important}
  .command-bar__searchbox{padding-inline:10px!important;gap:7px!important}
  .command-bar__search input{font-size:15px!important}
  .command-bar__search input::placeholder{font-size:13px;color:#8290a2!important}
  .command-bar .nav__menu{width:min(330px,96vw)!important;padding-inline:18px!important}
  .command-panel{left:max(8px,var(--sesa-safe-left))!important;right:max(8px,var(--sesa-safe-right))!important}
  .command-panel__section{padding:14px 10px!important}
  .command-panel__item{grid-template-columns:34px minmax(0,1fr) auto!important;padding-inline:8px!important}
}

/* --------------------------------------------------------------------------
   FLOATING CONTROLS + CHAT
   -------------------------------------------------------------------------- */
@media (max-width:768px){
  .botonera-wrapper{
    top:auto!important;right:max(8px,calc(8px + var(--sesa-safe-right)))!important;
    bottom:max(72px,calc(68px + env(safe-area-inset-bottom)))!important;
    transform:none!important
  }
  .botonera{gap:8px!important;padding:8px 6px!important}
  .botonera .btn{width:clamp(42px,11vw,50px)!important;height:clamp(42px,11vw,50px)!important;min-width:42px!important;min-height:42px!important}
  .botonera .tooltip{display:none!important}

  .scroll-top{
    right:max(10px,calc(8px + var(--sesa-safe-right)))!important;
    bottom:max(12px,calc(10px + env(safe-area-inset-bottom)))!important;
    width:42px!important;height:42px!important;
  }
  .location-quick-menu{top:auto!important;right:max(62px,calc(58px + var(--sesa-safe-right)))!important;bottom:max(72px,calc(68px + var(--sesa-safe-bottom)))!important;width:min(300px,calc(100vw - 82px - var(--sesa-safe-right) - var(--sesa-safe-left)))!important;max-height:min(520px,calc(100dvh - 92px - var(--sesa-safe-top) - var(--sesa-safe-bottom)))!important;overflow:auto!important;transform:none!important}
  .sesa-chat{right:max(12px,var(--sesa-safe-right))!important;left:auto!important;top:auto!important;bottom:max(12px,var(--sesa-safe-bottom))!important;width:min(420px,calc(100vw - 24px - var(--sesa-safe-left) - var(--sesa-safe-right)))!important;height:min(620px,calc(100dvh - 24px - var(--sesa-safe-top) - var(--sesa-safe-bottom)))!important;max-height:calc(100dvh - 24px - var(--sesa-safe-top) - var(--sesa-safe-bottom))!important;transform:none!important;border-radius:18px!important}
  .sesa-chat__messages{min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .sesa-chat__composer{position:relative!important;z-index:2!important;padding-bottom:max(12px,calc(10px + var(--sesa-safe-bottom)))!important}
  html.sesa-chat-open .botonera-wrapper{opacity:0!important;pointer-events:none!important;visibility:hidden!important}
  html.sesa-chat-open .scroll-top{opacity:0!important;pointer-events:none!important;visibility:hidden!important}
}

@media (max-width:560px){
  .sesa-chat{
    top:max(8px,var(--sesa-safe-top))!important;
    left:max(8px,var(--sesa-safe-left))!important;
    right:max(8px,var(--sesa-safe-right))!important;
    bottom:max(8px,var(--sesa-safe-bottom))!important;
    width:auto!important;
    height:auto!important;
    max-height:none!important;
    border-radius:16px!important;
  }
  .location-quick-menu{right:max(58px,calc(54px + var(--sesa-safe-right)))!important;bottom:max(72px,calc(68px + var(--sesa-safe-bottom)))!important;width:min(280px,calc(100vw - 72px - var(--sesa-safe-right) - var(--sesa-safe-left)))!important}
}

@media (max-width:430px){
  .sesa-chat.is-open{grid-template-rows:60px auto minmax(0,1fr) auto!important}
  .sesa-chat__header{height:60px!important;padding:9px 10px!important;gap:8px!important}
  .sesa-chat__mark{width:34px!important;height:34px!important}
  .sesa-chat__close,.sesa-chat__restart{width:30px!important;height:30px!important}
  .sesa-chat__messages{padding:12px 10px 14px!important}
  .sesa-chat__message{max-width:94%!important;padding:10px 11px!important}
  .sesa-chat__composer{padding:9px!important;padding-bottom:max(10px,calc(8px + var(--sesa-safe-bottom)))!important}
  .sesa-chat__input{font-size:16px!important}
}

@media (hover:none) and (pointer:coarse){
  .botonera .btn:hover{color:var(--dock-icon-color)!important;transform:none!important}
  .botonera .btn:active{transform:scale(.96)!important}
}

/* --------------------------------------------------------------------------
   CROSS-PAGE LAYOUTS
   -------------------------------------------------------------------------- */
@media (max-width:1199px){
  .footer__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:36px!important}
  .projects-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important}
  .project-card,.project-card--big,.project-card--wide{grid-column:auto!important;grid-row:auto!important;min-height:300px}
  .contact-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;gap:40px!important}
  .sesa-route__grid{grid-template-columns:minmax(0,1fr)!important}
  .sesa-route__map,.sesa-route__map-card{min-width:0!important}
  .journal-hero{grid-template-columns:120px minmax(0,1fr)!important}
  .journal-hero__mark{display:none!important}
}

@media (max-width:900px){
  .service-big,.service-big--reverse{grid-template-columns:1fr!important;gap:30px!important;direction:ltr!important}
  .service-big__img{height:clamp(260px,55vw,420px)!important}
  .contact-grid{grid-template-columns:1fr!important;gap:34px!important}
  .team__grid{grid-template-columns:1fr!important}
  .catalog__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .numbers__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .journal-featured{grid-template-columns:1fr!important}
  .journal-grid{grid-template-columns:1fr!important}
  .journal-newsletter{grid-template-columns:1fr!important}
}

@media (max-width:768px){
  section{scroll-margin-top:72px}
  .hero,.hero-catalog,.page-header,.journal-hero{min-height:auto!important}
  .hero{padding:clamp(100px,22vw,132px) 0 64px!important}
  .hero__content{width:100%!important;max-width:100%!important}
  .hero h1{font-size:clamp(2.4rem,12vw,4rem)!important;line-height:.98!important}
  .hero p{max-width:100%!important;font-size:clamp(.96rem,4vw,1.08rem)!important}
  .hero__buttons{display:grid!important;grid-template-columns:1fr!important;gap:12px!important;width:100%!important}
  .hero__buttons .btn{width:100%!important;justify-content:center!important}
  .hero__stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
  .hero__scroll{display:none!important}

  .page-header{padding-block:clamp(94px,20vw,130px) 54px!important}
  .page-header__content{max-width:100%!important}
  .page-header__content h1{font-size:clamp(2.2rem,11vw,3.6rem)!important}

  .hero-catalog{padding:clamp(100px,22vw,130px) 0 74px!important}
  .hero-catalog__title{font-size:clamp(2.5rem,13vw,4.5rem)!important}
  .hero-catalog__lead{max-width:100%!important}
  .hero-catalog__stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
  .hero-catalog__marquee{max-width:100vw!important;overflow:hidden!important}

  .solutions__grid,.services-list__grid,.projects-gallery,.team__grid,.catalog__grid,.journal-grid{min-width:0!important;max-width:100%!important}
  .solutions__grid{grid-template-columns:1fr!important;gap:18px!important}
  .services-list__grid{gap:54px!important}
  .projects-grid{grid-template-columns:1fr!important;gap:16px!important}
  .project-card,.project-card--big,.project-card--wide{min-height:280px!important}
  .project-card__body{padding:22px!important;transform:none!important}
  .footer{padding-top:56px!important}
  .footer__grid{grid-template-columns:1fr!important;gap:28px!important;margin-bottom:40px!important}
  .footer__bottom{gap:14px!important;flex-wrap:wrap!important}
  .numbers__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:22px!important}
  .numbers__num{font-size:clamp(44px,14vw,64px)!important}

  .contact-section{padding-block:56px!important}
  .contact-form-wrap,.contact-info{min-width:0!important;max-width:100%!important}
  .contact-info__list li{gap:12px!important}
  .contact-info__icon{flex:0 0 44px;width:44px;height:44px}
  .form-row{grid-template-columns:1fr!important}
  .contact-form .btn,.contact-form button[type="submit"]{width:100%!important;justify-content:center!important}
  .map-section,.sesa-route{min-width:0!important;max-width:100%!important}
  .sesa-route__grid{grid-template-columns:1fr!important;gap:18px!important}
  .sesa-route__map,.sesa-route__map-card{width:100%!important;min-height:320px!important;max-width:100%!important}
  .sesa-route__map-toolbar{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .sesa-route__map-toolbar>*{max-width:100%!important}

  .journal-hero{grid-template-columns:1fr!important;padding:clamp(92px,20vw,120px) var(--sesa-mobile-gutter) 48px!important}
  .journal-hero__issue{margin-bottom:32px!important}
  .journal-hero h1{font-size:clamp(3rem,17vw,5.5rem)!important}
  .journal-feed{padding-inline:var(--sesa-mobile-gutter)!important}
  .journal-feed>header{grid-template-columns:1fr!important;gap:18px!important;margin-bottom:42px!important}
  .journal-featured__image{min-height:clamp(260px,70vw,420px)!important}
  .journal-featured__copy{padding:28px 0!important;border-left:0!important;border-top:1px solid var(--line)!important}
  .journal-story{grid-template-columns:minmax(86px,120px) minmax(0,1fr)!important;gap:16px!important;padding:26px 0!important}
  .journal-story:nth-child(n){padding-inline:0!important;border-right:0!important}
  .journal-newsletter,.journal-manifesto{padding-inline:var(--sesa-mobile-gutter)!important}
  .journal-footer{padding-inline:var(--sesa-mobile-gutter)!important;flex-direction:column!important;align-items:flex-start!important}

  dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
  dialog[open]{display:block!important}
  .dialog-image{min-height:260px!important}

  .integrated-brands__ledger{min-width:0!important;max-width:100%!important}
  .integrated-brand{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
}

@media (max-width:430px){
  .hero__stats,.hero-catalog__stats,.numbers__grid{grid-template-columns:1fr 1fr!important;gap:12px!important}
  .solution-card__body{padding-inline:22px!important}
  .project-card,.project-card--big,.project-card--wide{min-height:250px!important}
  .catalog__grid{grid-template-columns:1fr!important}
  .journal-story{grid-template-columns:86px minmax(0,1fr)!important}
  .journal-story__image{height:112px!important}
  .journal-story p{display:none!important}
  .journal-manifesto p{font-size:clamp(2.25rem,12vw,3rem)!important}
  .contact-info__list li{align-items:flex-start!important}
}

@media (max-width:360px){
  :root{--sesa-mobile-gutter:14px}
  .command-bar__inner{grid-template-columns:82px minmax(0,1fr) 44px!important;gap:6px!important}
  .command-bar .nav__logo img{width:82px!important}
  .hero__stats,.hero-catalog__stats,.numbers__grid{grid-template-columns:1fr!important}
  .journal-story{grid-template-columns:76px minmax(0,1fr)!important;gap:12px!important}
  .journal-story__image{height:100px!important}
}

/* Videos and media keep coverage without forcing page width. */
[data-video-shell],[data-page-video],[data-video-fallback],.hero__bg,.page-header__bg,.hero-catalog__bg,.journal-hero__media{max-width:100%!important}
[data-page-video],[data-video-fallback]{width:100%!important;height:100%!important;object-fit:cover!important}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto!important}
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important}
}
