/* Global overrides for consistent spacing and responsive layout */

:root{
  --global-body-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --global-heading-font: 'Lato', 'Poppins', system-ui, sans-serif;
  --global-body-size: clamp(1rem, 0.95rem + 0.18vw, 1.08rem);
  --global-lead-size: clamp(1.04rem, 0.98rem + 0.32vw, 1.18rem);
  --global-body-line-height: 1.7;
  --global-h1-size: clamp(2.5rem, 2rem + 2vw, 4rem);
  --global-h2-size: clamp(2rem, 1.7rem + 1.1vw, 2.85rem);
  --global-h3-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.75rem);
  --global-h4-size: clamp(1.08rem, 1rem + 0.28vw, 1.28rem);
  --global-heading-weight: 800;
  --global-container-max: 1200px;
  --global-container-padding: 20px;
  --global-section-padding: 56px;
  --global-section-padding-mobile: 28px;
  --global-section-title-gap: 22px;
  --global-copy-gap: 12px;
}

*{box-sizing:border-box}

html{font-size:16px}

body,
input,
textarea,
select,
button{
  font-family:var(--global-body-font) !important;
  font-size:var(--global-body-size);
  line-height:var(--global-body-line-height);
}

body{
  padding-top:0 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title,
.section-header{
  font-family:var(--global-heading-font) !important;
  font-weight:var(--global-heading-weight) !important;
  letter-spacing:0.01em;
}

h1{
  font-size:var(--global-h1-size);
  line-height:1.15;
  margin-bottom:0.55em;
}

h2,
.section-title h2,
.section-header h2{
  font-size:var(--global-h2-size);
  line-height:1.2;
  margin-bottom:0.45em;
}

h3{
  font-size:var(--global-h3-size);
  line-height:1.25;
  margin-bottom:0.42em;
}

h4{
  font-size:var(--global-h4-size);
  line-height:1.3;
  margin-bottom:0.4em;
}

p,
li,
label,
input,
textarea,
select,
.section-title p,
.section-header p{
  font-size:var(--global-body-size);
  line-height:var(--global-body-line-height);
}

.lead,
.bio,
.role,
.vm-sub,
.vm-lead,
.hero p,
.hero-tagline,
.section-subtitle,
.tag,
.sub{
  font-size:var(--global-lead-size) !important;
  line-height:1.72 !important;
}

.role{
  font-size:calc(var(--global-body-size) * 0.98) !important;
  font-weight:600;
}

/* Base containers */
.container,
.nav-container{
  max-width:var(--global-container-max);
  margin:0 auto;
}

.container{
  padding:0 var(--global-container-padding);
}

/* Normalize section spacing across pages */
.section,
main > section:not(.hero):not(.contact-hero):not(.thankyou-section),
body > section:not(.hero):not(.contact-hero):not(.navbar):not(.mobile-nav){
  padding-top:var(--global-section-padding) !important;
  padding-bottom:var(--global-section-padding) !important;
}

.section-title,
.section-header{
  margin-bottom:var(--global-section-title-gap) !important;
  text-align:center;
}

.section-title h2,
.section-header h2{
  margin-bottom:8px;
}

.section-title p,
.section-header p{
  margin-top:0;
  margin-bottom:0;
  max-width:900px;
  margin-left:auto;
  margin-right:auto;
}

/* Reduce hero bottom spacing where hero-content exists */
.hero .hero-content{padding-bottom:16px !important;margin-bottom:0}

.hero p,
.hero-tagline{
  max-width:62ch;
}

/* Normalize common copy spacing */
p + p,
ul + p,
p + ul{
  margin-top:var(--global-copy-gap);
}

p{
  margin-bottom:0;
}

section:not(.hero):not(.contact-hero):not(.navbar):not(.mobile-nav) h2 + p,
section:not(.hero):not(.contact-hero):not(.navbar):not(.mobile-nav) h3 + p{
  margin-top:0.4rem;
}

/* Ensure images behave predictably */
img{max-width:100%;height:auto;display:block}
.card-img img, .service-img img, .background-img, .hero-video, .hero-video-bg{width:100%;height:100%;object-fit:cover;display:block}
video, canvas, svg, iframe, model-viewer{max-width:100%}

/* Keep long text from breaking narrow layouts */
h1, h2, h3, p, li, a, button, label{overflow-wrap:anywhere}

/* Prevent tiny background-image containers collapsing */
.card-img, .service-img{min-height:140px}

/* Process section specific (tighten spacing) */
.process-section{padding:40px 4% !important}
.process-section .section-header p{margin-bottom:24px !important}

/* Small screens adjustments */
@media (max-width:1024px){
  :root{
    --global-section-padding:46px;
    --global-container-padding:18px;
  }
}
@media (max-width:768px){
  :root{
    --global-section-padding:var(--global-section-padding-mobile);
    --global-container-padding:16px;
    --global-lead-size:clamp(1rem, 0.98rem + 0.22vw, 1.08rem);
  }
  .section,
  main > section:not(.hero):not(.contact-hero):not(.thankyou-section),
  body > section:not(.hero):not(.contact-hero):not(.navbar):not(.mobile-nav){
    padding-top:var(--global-section-padding-mobile) !important;
    padding-bottom:var(--global-section-padding-mobile) !important;
  }
  .section-title, .section-header{margin-bottom:1rem !important}
  .hero{padding-bottom:20px !important}
  .card-img, .service-img{min-height:160px}
  .container{padding-left:16px !important;padding-right:16px !important}
  .hero br{display:none}
}

/* Fixed backgrounds and full-height sections often misbehave on mobile/touch */
@media (max-width:1024px), (hover:none) and (pointer:coarse){
  .bg-fixed,
  .hero-bg,
  .background-fixed,
  .parallax,
  .hero,
  .contact-hero{
    background-attachment:scroll !important;
  }
}

/* Safety net for two-column sections that should stack on small screens */
@media (max-width:900px){
  .row,
  .show-item,
  .project-container,
  .svc,
  .cap-panel{
    max-width:100%;
  }
}

/* Small visual tweaks */
h1,h2,h3{margin-top:0}

/* Keep main first section from creating extra top gap */
main > section:first-child{scroll-margin-top:calc(var(--nav-height,90px) + 10px)}

/* ── Site Footer ─────────────────────────────────────────────── */
.site-footer{background:#0a1f3d;color:#fff;padding:60px 0 30px;margin-top:80px;font-family:'Inter',sans-serif}
.footer-container{max-width:1400px;margin:0 auto;padding:0 20px}
.footer-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:40px;margin-bottom:40px}
.footer-col{min-width:0}
.footer-title{color:#4fc3f7 !important;font-size:1.2rem !important;font-weight:700 !important;margin-bottom:16px;position:relative;padding-bottom:10px}
.footer-title::after{content:'';position:absolute;left:0;bottom:0;width:40px;height:3px;background:#4fc3f7;border-radius:2px}
.footer-desc{color:#fff !important;font-size:.95rem !important;line-height:1.7;margin-bottom:20px}
.footer-links{list-style:none !important;padding:0 !important;margin:0 !important}
.footer-links li{margin-bottom:8px;list-style:none !important}
.footer-links a,.footer-links a:link,.footer-links a:visited{color:#fff !important;font-size:.95rem !important;line-height:1.7;text-decoration:none;display:inline-block;transition:color .25s ease,transform .25s ease}
.footer-links a:hover{color:#4fc3f7 !important;transform:translateX(5px)}
.social-links{display:flex;gap:12px;margin-top:16px;flex-wrap:wrap}
.social-links a{width:42px;height:42px;background:rgba(79,195,247,.18);color:#4fc3f7;display:flex;align-items:center;justify-content:center;border-radius:50%;transition:background .3s,transform .3s;flex-shrink:0;text-decoration:none}
.social-links a svg{width:18px !important;height:18px !important;max-width:none !important;flex-shrink:0}
.social-links a:hover{background:#4fc3f7;color:#fff;transform:translateY(-3px)}
.contact-item{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px}
.ci-icon{width:18px !important;height:18px !important;max-width:none !important;flex-shrink:0;margin-top:3px}
.contact-item a,.contact-item a:link,.contact-item a:visited,.contact-item span{color:#fff !important;text-decoration:none;font-size:.95rem !important;line-height:1.6}
.footer-bottom{text-align:center;padding-top:20px;border-top:1px solid rgba(79,195,247,.2);font-size:.92rem}
.footer-bottom p{color:#fff !important;font-size:.92rem !important;line-height:1.7}
.footer-legal-links{margin-top:10px;display:flex;justify-content:center;gap:18px;flex-wrap:wrap}
.footer-legal-links a,.footer-legal-links a:link,.footer-legal-links a:visited{color:#c8e6ff !important;text-decoration:none;font-size:.9rem !important}
.footer-legal-links a:hover{color:#4fc3f7 !important}
@media(max-width:992px){.footer-grid{grid-template-columns:1fr 1fr;gap:32px}}
@media(max-width:640px){
  .footer-grid{grid-template-columns:1fr;gap:32px;text-align:center}
  .footer-title::after{left:50%;transform:translateX(-50%)}
  .social-links{justify-content:center}
  .contact-item{justify-content:center}
}
/* Cookie consent bar */
.cookie-bar{position:fixed;bottom:0;left:0;right:0;z-index:10030;background:#0d2240;border-top:1px solid rgba(49,157,207,.25);display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 28px;font-family:'Inter',sans-serif;font-size:.875rem;color:#c8dff0;transform:translateY(0);transition:transform .32s ease,opacity .32s ease;flex-wrap:wrap}
.cookie-bar.cookie-bar--hidden{transform:translateY(100%);opacity:0;pointer-events:none}
.cookie-bar__text{margin:0;line-height:1.5;flex:1;min-width:200px}
.cookie-bar__link{color:#319dcf;text-decoration:underline;text-underline-offset:2px}
.cookie-bar__actions{display:flex;gap:10px;flex-shrink:0}
.cookie-bar__btn{padding:8px 20px;border-radius:6px;font-size:.85rem;font-weight:600;font-family:inherit;cursor:pointer;border:none;transition:background .2s,color .2s;white-space:nowrap}
.cookie-bar__btn--primary{background:#319dcf;color:#fff}
.cookie-bar__btn--primary:hover{background:#2a8ab8}
.cookie-bar__btn--ghost{background:transparent;color:#8bb8d4;border:1px solid rgba(49,157,207,.35)}
.cookie-bar__btn--ghost:hover{background:rgba(49,157,207,.1);color:#c8dff0}
@media(max-width:540px){.cookie-bar{flex-direction:column;align-items:flex-start;padding:16px 20px;gap:14px}}

/* Shared motion polish */
.motion-reveal{
  opacity:0;
  transform:translateY(26px);
  transition:opacity .7s ease, transform .7s ease;
  will-change:opacity, transform;
}

.motion-reveal.motion-reveal--left{
  transform:translateX(-28px);
}

.motion-reveal.motion-reveal--right{
  transform:translateX(28px);
}

.motion-reveal.is-visible{
  opacity:1;
  transform:translate3d(0,0,0);
}

.motion-hover-soft{
  transition:transform .24s ease, box-shadow .24s ease, filter .24s ease;
}

.motion-hover-soft:hover{
  transform:translateY(-4px);
  filter:saturate(1.03);
}

/* ── Hero entrance tokens ──────────────────────────────────────── */
.js-enabled .motion-hero-item{
  opacity:0;
  transform:translateY(14px);
  transition:opacity 0.6s ease, transform 0.6s ease;
}

.js-enabled .motion-hero-item.active{
  opacity:1;
  transform:none;
}

.js-enabled .motion-hero-item.hero-slow{
  transition-duration:0.9s;
}

.js-enabled .motion-hero-item.hero-fast{
  transition-duration:0.45s;
}

@media (prefers-reduced-motion: reduce){
  .motion-hero-item{
    opacity:1 !important;
    transform:none !important;
    transition:none !important;
  }
}

.typing-text{
  position:relative;
}

.typing-text::after{
  content:"";
  display:inline-block;
  width:2px;
  height:0.95em;
  margin-left:8px;
  vertical-align:-0.08em;
  background:currentColor;
  animation:motionCaretBlink .85s steps(1,end) infinite;
}

@keyframes motionCaretBlink{
  50%{opacity:0}
}

@media (prefers-reduced-motion: reduce){
  .motion-reveal,
  .motion-reveal.motion-reveal--left,
  .motion-reveal.motion-reveal--right{
    opacity:1 !important;
    transform:none !important;
    transition:none !important;
  }

  .motion-hover-soft,
  .motion-hover-soft:hover,
  .typing-text::after{
    transition:none !important;
    animation:none !important;
    transform:none !important;
  }
}

/* ── Scroll progress indicator (injected by seo-global-loader.js) ── */
#mpro9-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #319dcf;
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  #mpro9-progress { display: none; }
}
