/* iatro FINAL SITE CONSISTENCY / CLEANUP — v1
   Shared design tokens, navigation, footer, typography and responsive guardrails.
   Loaded last so legacy Vxx layers cannot override the locked site shell. */

:root{
  --iatro-navy:#0B2140;
  --iatro-navy-2:#153C62;
  --iatro-orange:#FF5A00;
  --iatro-blue:#1687E6;
  --iatro-green:#18A96B;
  --iatro-purple:#7A3FF2;
  --iatro-text:#0B2140;
  --iatro-muted:#5F7187;
  --iatro-line:#DCE5EE;
  --iatro-surface:#FFFFFF;
  --iatro-surface-soft:#F7F9FC;
  --iatro-shadow:0 24px 65px rgba(15,40,72,.12);
  --iatro-font-body:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --iatro-font-display:Manrope,Inter,system-ui,sans-serif;
  --iatro-nav-height:84px;
  --iatro-nav-height-mobile:72px;
  --iatro-logo-width:210px;
  --iatro-logo-width-mobile:165px;
  --iatro-shell-max:1500px;
  --iatro-shell-gutter:40px;
  --iatro-shell-gutter-mobile:24px;
  --iatro-title-hero:clamp(46px,4.9vw,78px);
  --iatro-title-detail:clamp(38px,4.2vw,62px);
  --iatro-title-section:clamp(34px,4vw,58px);

  /* Legacy variable bridge */
  --text:var(--iatro-text);
  --muted:var(--iatro-muted);
  --orange:var(--iatro-orange);
  --blue:var(--iatro-blue);
  --green:var(--iatro-green);
  --purple:var(--iatro-purple);
  --line:var(--iatro-line);
  --bg:#fff;
  --bg2:var(--iatro-surface-soft);
  --panel:#fff;
  --navy:var(--iatro-navy);
  --navy2:var(--iatro-navy-2);
  --paper:var(--iatro-surface-soft);
}

html{scroll-padding-top:calc(var(--iatro-nav-height) + 20px)}
body{
  font-family:var(--iatro-font-body);
  color:var(--iatro-text);
}
body.menu-open{overflow:hidden}
h1,h2,h3,h4,h5,h6{font-family:var(--iatro-font-display)}
:focus-visible{outline:2px solid var(--iatro-orange);outline-offset:4px}

/* ===== MASTER HEADER ===== */
#siteNav.site-nav{
  z-index:100!important;
  background:rgba(255,255,255,.96)!important;
  border-bottom:1px solid #E6EDF3!important;
  box-shadow:0 7px 24px rgba(12,36,64,.05)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  color:var(--iatro-navy);
}
body.site-home #siteNav.site-nav{position:fixed!important;inset:0 0 auto!important}
body:not(.site-home) #siteNav.site-nav{position:sticky!important;top:0!important}

#siteNav .nav-inner{
  width:min(var(--iatro-shell-max),calc(100% - var(--iatro-shell-gutter)))!important;
  height:var(--iatro-nav-height)!important;
  margin:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:28px!important;
}
#siteNav .brand,
#siteNav .brand-approved{
  display:inline-flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  gap:0!important;
}
#siteNav .brand:before{display:none!important}
#siteNav .brand-approved>.approved-iatro{
  display:block!important;
  width:var(--iatro-logo-width)!important;
  height:auto!important;
  max-width:none!important;
  object-fit:contain!important;
  object-position:left center!important;
}
#siteNav .nav-links{
  display:flex!important;
  align-items:center!important;
  gap:28px!important;
  color:#263C58!important;
  font:700 13px/1.2 var(--iatro-font-display)!important;
}
#siteNav .nav-links a{
  position:relative!important;
  color:#263C58!important;
  text-decoration:none!important;
  white-space:nowrap;
}
#siteNav .nav-links a:hover,
#siteNav .nav-links a.active{color:var(--iatro-orange)!important}
#siteNav .nav-links a:after{
  content:"";
  position:absolute;
  left:0;
  right:100%;
  bottom:-10px;
  height:2px;
  background:var(--iatro-orange)!important;
  transition:right .25s ease;
}
#siteNav .nav-links a:hover:after,
#siteNav .nav-links a.active:after{right:0}

#siteNav .nav-cta{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:44px!important;
  padding:12px 20px!important;
  border:1px solid var(--iatro-orange)!important;
  border-radius:8px!important;
  background:var(--iatro-orange)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(255,90,0,.19)!important;
  font:800 12px/1.2 var(--iatro-font-display)!important;
  white-space:nowrap;
}
#siteNav .mobile-menu-btn{
  display:none;
  width:44px;
  height:44px;
  padding:0;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  border:1px solid var(--iatro-line);
  border-radius:10px;
  background:#fff;
}
#siteNav .mobile-menu-btn span{
  width:19px;
  height:2px;
  border-radius:999px;
  background:var(--iatro-navy)!important;
  transition:transform .25s ease,opacity .25s ease;
}
#siteNav.menu-open .mobile-menu-btn span:nth-child(1){transform:translateY(7px) rotate(45deg)}
#siteNav.menu-open .mobile-menu-btn span:nth-child(2){opacity:0}
#siteNav.menu-open .mobile-menu-btn span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

#siteNav .mobile-drawer{display:none}

/* ===== LOCKED TYPE SCALE ===== */
.site-home .hero h1,
.site-about .about-hero h1{
  font-family:var(--iatro-font-display)!important;
  font-size:var(--iatro-title-hero)!important;
  line-height:.97!important;
  letter-spacing:-.055em!important;
}
.site-home .hero h1{max-width:700px!important}
.site-about .about-hero h1{max-width:700px!important;margin:22px 0!important}
.site-home .hero-sub,
.site-about .about-hero-copy>p:not(.eyebrow){
  font-family:var(--iatro-font-body)!important;
  font-size:clamp(16px,1.15vw,19px)!important;
  line-height:1.6!important;
}
.site-home .hero-sub{max-width:590px!important}
.site-about .about-hero-copy>p:not(.eyebrow){max-width:650px!important}

.site-solutions .sx-detail-hero h1,
.site-references .rf-page-header h1{
  font-family:var(--iatro-font-display)!important;
  font-size:var(--iatro-title-detail)!important;
  line-height:1.06!important;
  letter-spacing:-.045em!important;
}
.site-home :is(.section,.outputs,.integrations,.sustainability,.municipal,.sectors) h2,
.site-home :is(.showcase-copy,.editorial,.trust-copy) h2,
.site-about .section-head h2{
  font-family:var(--iatro-font-display)!important;
  font-size:var(--iatro-title-section);
  line-height:1.06;
  letter-spacing:-.04em;
}
.site-home .section-label,
.site-home .hero .eyebrow,
.site-about .eyebrow,
.site-solutions .sx-eyebrow,
.site-references .rf-page-header small{
  color:var(--iatro-orange)!important;
  font-family:var(--iatro-font-display)!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.10em!important;
}

/* Primary action color lock */
.site-about .btn.primary{
  background:var(--iatro-orange)!important;
  border-color:var(--iatro-orange)!important;
  color:#fff!important;
  box-shadow:0 12px 28px rgba(255,90,0,.18)!important;
}
.site-references .rf-page-header h1 span{color:var(--iatro-orange)!important}
.site-references .rf-filter[aria-pressed=true]{
  background:var(--iatro-navy)!important;
  border-color:var(--iatro-navy)!important;
  color:#fff!important;
}

/* ===== MASTER FOOTER ===== */
.site-footer{
  margin:0!important;
  padding:0!important;
  border-top:1px solid var(--iatro-line)!important;
  background:#fff!important;
  color:#65788D!important;
  font-family:var(--iatro-font-body)!important;
}
.site-footer .wrap{
  width:min(var(--iatro-shell-max),calc(100% - var(--iatro-shell-gutter)))!important;
  margin:auto!important;
}
.site-footer .footer-main{
  padding:58px 0 30px!important;
  background:#fff!important;
}
.site-footer .footer-grid{
  display:grid!important;
  grid-template-columns:1.3fr .8fr .8fr 1fr!important;
  gap:42px!important;
}
.site-footer .footer-approved-logo{
  display:flex!important;
  align-items:center!important;
}
.site-footer .footer-approved-logo img{
  display:block!important;
  width:190px!important;
  height:auto!important;
  max-width:none!important;
  object-fit:contain!important;
}
.site-footer .footer-tagline{
  max-width:340px!important;
  margin-top:13px!important;
  color:#718397!important;
  font-size:13px!important;
  line-height:1.65!important;
}
.site-footer .footer-col b{
  display:block!important;
  margin-bottom:15px!important;
  color:var(--iatro-navy)!important;
  font:800 11px/1.3 var(--iatro-font-display)!important;
  letter-spacing:.10em!important;
  text-transform:uppercase!important;
}
.site-footer .footer-col a{
  display:block!important;
  margin:9px 0!important;
  color:#65788D!important;
  font-size:13px!important;
  line-height:1.45!important;
  text-decoration:none!important;
}
.site-footer .footer-col a:hover{color:var(--iatro-orange)!important}
.site-footer .footer-bottom{
  border-top:1px solid #E7EDF2!important;
  padding:20px 0!important;
  color:#637A8C!important;
  font-size:11px!important;
}
.site-footer .footer-bottom .wrap{
  display:flex!important;
  justify-content:space-between!important;
  gap:16px!important;
  flex-wrap:wrap!important;
}

/* ===== RESPONSIVE LOCK ===== */
@media(max-width:980px){
  #siteNav .nav-links,
  #siteNav .desktop-cta{display:none!important}
  #siteNav .mobile-menu-btn{display:flex!important}
  #siteNav .mobile-drawer{
    position:fixed!important;
    z-index:99!important;
    left:12px!important;
    right:12px!important;
    top:calc(var(--iatro-nav-height-mobile) + 8px)!important;
    max-height:calc(100svh - var(--iatro-nav-height-mobile) - 20px)!important;
    overflow:auto!important;
    flex-direction:column!important;
    padding:16px!important;
    border:1px solid var(--iatro-line)!important;
    border-radius:18px!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 28px 80px rgba(10,33,64,.18)!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(-10px) scale(.99)!important;
    transition:opacity .22s ease,visibility .22s ease,transform .22s ease!important;
  }
  #siteNav.menu-open .mobile-drawer{
    display:flex!important;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
  }
  #siteNav .mobile-drawer a{
    padding:14px!important;
    border-bottom:1px solid #E7EDF2!important;
    color:var(--iatro-navy)!important;
    font:700 17px/1.3 var(--iatro-font-display)!important;
    text-decoration:none!important;
  }
  #siteNav .mobile-drawer a.active{color:var(--iatro-orange)!important}
  #siteNav .mobile-drawer .mobile-drawer-cta{
    margin-top:10px!important;
    border:0!important;
    border-radius:10px!important;
    background:var(--iatro-orange)!important;
    color:#fff!important;
    text-align:center!important;
  }
  .site-footer .footer-grid{grid-template-columns:1fr 1fr!important}
}
@media(max-width:680px){
  :root{
    --iatro-shell-gutter:var(--iatro-shell-gutter-mobile);
    --iatro-title-hero:clamp(43px,13vw,62px);
    --iatro-title-detail:clamp(36px,10.5vw,48px);
    --iatro-title-section:clamp(32px,9vw,42px);
  }
  html{scroll-padding-top:calc(var(--iatro-nav-height-mobile) + 16px)}
  #siteNav .nav-inner{
    width:min(var(--iatro-shell-max),calc(100% - var(--iatro-shell-gutter-mobile)))!important;
    height:var(--iatro-nav-height-mobile)!important;
    gap:14px!important;
  }
  #siteNav .brand-approved>.approved-iatro{width:var(--iatro-logo-width-mobile)!important}
  .site-home .hero h1,
  .site-about .about-hero h1{line-height:.97!important}
  .site-home .hero-sub,
  .site-about .about-hero-copy>p:not(.eyebrow){font-size:16px!important}
  .site-footer .wrap{width:min(var(--iatro-shell-max),calc(100% - var(--iatro-shell-gutter-mobile)))!important}
  .site-footer .footer-main{padding:42px 0 24px!important}
  .site-footer .footer-grid{grid-template-columns:1fr!important;gap:28px!important}
  .site-footer .footer-approved-logo img{width:165px!important}
  .site-footer .footer-tagline,
  .site-footer .footer-col a{font-size:12.5px!important}
  .site-footer .footer-bottom{font-size:10.5px!important}
  .site-footer .footer-bottom .wrap{display:grid!important;gap:6px!important}
}

/* Phase 5 — language switch */
.lang-switch{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:34px;padding:0 10px;border:1px solid #dce5ee;border-radius:999px;background:#fff;color:#0b2140;font:800 10px/1 Inter,system-ui;letter-spacing:.08em;text-decoration:none;transition:border-color .2s ease,color .2s ease,background .2s ease}
.lang-switch:hover{border-color:#ff9a60;color:#c94c00;background:#fff8f3}
.mobile-drawer .lang-switch{display:flex;width:max-content;min-width:48px;margin-top:6px}
@media(max-width:980px){.desktop-lang{display:none!important}}
