/* ===============================
   Strategic 3D Cards — Strong Rebuild v2
   Arial-based, industrial authority layout
   =============================== */

:root{
  --brand:#3f526f;
  --text:#1a1a1a;
  --muted:#f4f6f8;
  --border:#e5e5e5;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--text);
  background:#ffffff;
  line-height:1.5;
}

/* Prevent header/footer flash before components load */
#header,
#footer {
  visibility: hidden;
}

.container{
  width:92%;
  max-width:1200px;
  margin:0 auto;
}

/* ===============================
   Header
   =============================== */

.site-header{
  background:var(--brand);
  height:72px;
  display:flex;
  align-items:center;
}

.header-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}

.brand img{
  height:30px;
  display:block;
}

.site-nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.site-nav a{
  color:rgba(255,255,255,0.86);
  text-decoration:none;
  margin-left:26px;
  font-weight:600;
  font-size:14px;
  letter-spacing:0.02em;
  white-space:nowrap;
}

.site-nav a:hover,
.site-nav a.active{
  color:#ffffff;
}

/* ===============================
   Typography
   =============================== */

h1,h2,h3{
  font-weight:600;
  line-height:1.2;
}

h1{ font-size:40px; margin:0 0 18px 0; }
h2{ font-size:28px; margin:0 0 14px 0; }
h3{ font-size:18px; margin:0 0 10px 0; }

p{ margin:0 0 14px 0; }

.lead{
  font-size:18px;
  max-width:860px;
}

/* ===============================
   Buttons
   =============================== */

.hero-ctas{
  margin-top:18px;
  display:flex;
  justify-content:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

.btn-primary,
.btn-secondary{
  display:inline-block;
  padding:14px 26px;
  text-decoration:none;
  font-weight:600;
  letter-spacing:0.02em;
  border:1px solid transparent;
}

.btn-primary{
  background:var(--brand);
  color:#ffffff;
}

.btn-secondary{
  background:transparent;
  color:var(--brand);
  border-color:var(--brand);
}

/* ===============================
   Sections + spacing rhythm
   =============================== */

.hero{
  padding:98px 0 56px 0;  /* tightened bottom spacing */
  text-align:center;
}

.hero p{
  max-width:780px;
  margin:0 auto 0 auto;
  font-size:18px;
}

.section{
  padding:70px 0; /* restored global spacing */
}

.section-muted{
  background:var(--muted);
}

.section-tight-top{
  padding-top:44px; /* used when stacking directly after hero */
}

.section-tight-bottom{
  padding-bottom:44px;
}

/* ===============================
   Grids / cards
   =============================== */

.grid-3{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
  margin-top:22px; /* reduced to avoid over-spacing */
}

.card{
  border:1px solid var(--border);
  background:#ffffff;
  padding:22px;
}

.card p{ margin:0; }

/* ===============================
   Video
   =============================== */

.video-wrapper{
  max-width:600px; /* requested */
  margin:28px auto 0 auto; /* reduced top margin */
}

.video-wrapper video{
  width:100%;
  height:auto;
  aspect-ratio: 1025 / 529;
  display:block;
}

/* ===============================
   Page hero (interior pages)
   =============================== */

.page-hero{
  padding:56px 0 40px 0;
  background:var(--muted);
}

.page-hero .lead{
  margin-top:10px;
}

/* ===============================
   Process steps
   =============================== */

.steps{
  display:grid;
  gap:14px;
  margin-top:18px;
}

.step{
  border:1px solid var(--border);
  background:#ffffff;
  padding:22px;
}

.step p{ margin:0; }

/* ===============================
   Use case cards
   =============================== */

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:18px;
  margin-top:18px;
}

/* ===============================
   FAQ
   =============================== */

.faq{
  margin-top:12px;
}

.faq details{
  border-bottom:1px solid var(--border);
  padding:14px 0;
}

.faq summary{
  cursor:pointer;
  font-weight:600;
}

.faq p{
  margin:10px 0 0 0;
}

/* ===============================
   Gallery grid + lightbox
   =============================== */

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  column-gap:16px;
  row-gap:64px;
  margin-top:18px;
}

.gallery-item{
  margin:0;
  border:1px solid var(--border);
  background:#ffffff;
}

/* Lightbox */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.75);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  z-index:9999;
}

.lightbox.open{ display:flex; }

.lightbox-content{
  max-width:min(1100px, 96vw);
  max-height:90vh;
  background:#0b0b0b;
  border:1px solid rgba(255,255,255,0.12);
  position:relative;
}

.lightbox-content img{
  display:block;
  max-width:100%;
  max-height:90vh;
}

.lightbox-close{
  position:absolute;
  top:10px;
  right:10px;
  border:1px solid rgba(255,255,255,0.25);
  background:rgba(0,0,0,0.35);
  color:#ffffff;
  font-weight:600;
  padding:10px 12px;
  cursor:pointer;
}

/* ===============================
   Contact embed wrapper (fix iframe sizing)
   =============================== */

.form-wrapper{
  max-width:900px;
  margin:0 auto;
  min-height:1600px; /* aligns to form height */
}

.form-wrapper iframe{
  width:100%;
  border:none;
  display:block;
}

/* ===============================
   Footer
   =============================== */

.site-footer{
  border-top:1px solid var(--border);
  padding:44px 0;
  text-align:center;
  font-size:14px;
}

.footer-inner p{ margin:6px 0; }

.footer-sep{
  margin:0 10px;
  opacity:0.6;
}

.site-footer a{
  color:var(--brand);
  text-decoration:none;
}

.site-footer a:hover{ text-decoration:underline; }

/* ===============================
   Gallery — normalize tile heights + vertical centering
   =============================== */

/* ===============================
   Gallery — normalize tile heights + vertical centering
   =============================== */

.gallery-item img{
  width:100%;
  height:auto;           /* allow natural image height */
  display:block;
}

.gallery-title{
  padding:14px 16px 22px 16px;  /* extra bottom breathing room */
  line-height:1.4;
}

/* ===============================
   Responsive
   =============================== */

@media (max-width: 900px){
  .site-nav a{ margin-left:16px; }
  h1{ font-size:34px; }
  .hero{ padding:84px 0 50px 0; }
  .section{ padding:60px 0; }
}

/* ===============================
   Validated deployments (Hybrid Specialist layer)
   =============================== */

.grid-2{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap:22px;
  align-items:start;
  margin-top:18px;
}

@media (max-width: 900px){
  .grid-2{ grid-template-columns:1fr; }
}

.evidence-block{
  border:1px solid var(--border);
  background:#ffffff;
  padding:22px;
}

.evidence-kicker{
  font-size:12px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:rgba(26,26,26,0.70);
  margin:0 0 10px 0;
}

.evidence-list{
  margin:12px 0 0 18px;
  padding:0;
}

.evidence-list li{
  margin:8px 0;
}

.evidence-card{
  border:1px solid var(--border);
  background:#ffffff;
  padding:14px;
}

.evidence-card img{
  width:100%;
  height:auto;
  display:block;
}

.caption{
  font-size:13px;
  color:rgba(26,26,26,0.75);
  margin:10px 0 0 0;
}

/* Specialist positioning block */
.specialist{
  max-width:920px;
}

.specialist h3{
  margin:0 0 10px 0;
}

/* ===============================
   Strategic Authority Interior Layer
   =============================== */

.authority-section{
  padding:80px 0;
}

.authority-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:40px;
  align-items:center;
}

@media (max-width:900px){
  .authority-grid{
    grid-template-columns:1fr;
    gap:28px;
  }
}

.authority-image{
  border:1px solid var(--border);
  background:#ffffff;
  padding:18px;
}

.authority-image img{
  width:100%;
  height:auto;
  display:block;
}

.authority-content h3{
  font-size:22px;
  margin-bottom:14px;
}

.authority-content p{
  font-size:16px;
  line-height:1.6;
}

.authority-divider{
  height:1px;
  background:var(--border);
  margin:60px 0;
}

/* ===============================
   Portfolio titles (figcaption)
   =============================== */

.gallery-title{
  display:block;
  text-align:center;
  font-size:14px;
  font-weight:600;
  color:rgba(26,26,26,0.78);
  padding:12px 12px 16px 12px; /* keeps text outside the image tile */
}

/* Ensure figure captions never overlap the image tile */
.gallery-item figcaption{
  border-top:1px solid var(--border);
}

/* ===============================
   FAQ accordion (if used)
   =============================== */

.faq-item{
  border-bottom:1px solid var(--border);
  padding:14px 0;
}

.faq-question{
  cursor:pointer;
  font-weight:600;
}

.faq-answer{
  display:none;
  margin:10px 0 0 0;
}

.faq-item.active .faq-answer{
  display:block;
}

/* ===============================
   FAQ — clickable indicator arrows (override)
   =============================== */

.faq-question{
  position:relative;
  padding-right:26px;
}

.faq-question::after{
  content:"▾" !important;
  position:absolute;
  right:0;
  top:0;
  line-height:1.2;
  font-size:14px;
  transform:rotate(0deg);
  transition:transform 0.2s ease;
  opacity:0.85;
}

.faq-item.active .faq-question::after{
  transform:rotate(180deg);
}

/* ===============================
   Gallery — extra vertical separation lines
   =============================== */

.gallery-item{
  padding-top:18px;
  border-top:1px solid var(--border);
}

.gallery-grid{
  padding-top:18px; /* prevents first row from touching top */
}



/* ===============================
   Contact — Equal Grid Override
   =============================== */

.contact-grid.grid-2{
  grid-template-columns: 1fr 1fr;
}

.contact-criteria h3{
  text-align: center;
  margin-top: 0;
}


/* ===============================
   FAQ — Equal Grid + Title Alignment Patch
   =============================== */

.faq-equal .grid-2{
  grid-template-columns:1fr 1fr;
}

.faq-title{
  text-align:center;
  margin-top:0;
}


/* ===============================
   Centered Narrow Content (Homepage Fix)
   =============================== */

.content-narrow{
  max-width:800px;
  margin-left:auto;
  margin-right:auto;
}


/* ===============================
   Homepage Bottom Spacing Control
   =============================== */

.section.section-tight-top,
.section.section-tight-bottom{
  padding-bottom:50px;
}


/* ===============================
   Project Inquiry Page Top Spacing
   =============================== */

.page-hero{
  padding-top:70px;
}


/* ===============================
   Homepage Final Block Tightening
   =============================== */

.section.section-tight-bottom{
  padding-top:20px;   /* reduces gap above final block */
  padding-bottom:40px;
}


/* ===============================
   Project Inquiry Page Text Block Padding
   Adds space INSIDE the criteria block above the existing text
   =============================== */

.contact-criteria{
  padding-top:25px;
}


/* ===============================
   Project Inquiry Section Override
   =============================== */

.section-inquiry{
  padding-top:50px;
}


/* ===============================
   Inquiry Page Margin Override
   =============================== */

.section.section-inquiry .contact-criteria{
  margin-top:0;
}

/* ===============================
   Mobile Navigation (Hamburger)
   =============================== */

.menu-toggle{
  display:none;
  background:none;
  border:none;
  padding:10px;
  margin:-10px -10px -10px 0;
  cursor:pointer;
  color:#ffffff;
}

.menu-toggle .bar{
  display:block;
  width:24px;
  height:2px;
  background:currentColor;
  margin:5px 0;
  transition:transform 180ms ease, opacity 180ms ease;
}

@media (max-width: 900px){

  .site-header{
    position:relative;
    z-index:1000;
  }

  .menu-toggle{
    display:block;
  }

  /* Off-canvas nav panel */
  .site-nav{
    position:fixed;
    top:72px;
    right:0;
    height:calc(100vh - 72px);
    width:min(320px, 80vw);
    background:var(--brand);
    padding:18px 20px;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:6px;
    transform:translateX(105%);
    transition:transform 220ms ease;
    z-index:999;
  }

  .site-nav a{
    margin:10px 0;
  }

  .site-nav.nav-open{
    transform:translateX(0);
  }

  /* Page overlay + scroll lock */
  body.nav-lock{
    overflow:hidden;
  }

  body.nav-lock::before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    z-index:998;
  }

  /* Animate hamburger to X */
  .menu-toggle.is-open .bar:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }

  .menu-toggle.is-open .bar:nth-child(2){
    opacity:0;
  }

  .menu-toggle.is-open .bar:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }
}

/* ===============================
   Strategic Use Cases (Entry Layer)
   =============================== */

.use-cases{
  max-width:820px;
  margin:40px auto 0 auto;
  text-align:center;
}

.use-cases p{
  color:rgba(26,26,26,0.78);
}

.use-cases-list{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-top:14px;
}

.use-cases-list span{
  border:1px solid var(--border);
  padding:8px 12px;
  font-size:13px;
  background:#ffffff;
}



/* ===============================
   HERO IMAGE FRAME + CAPTION
   =============================== */

.hero-visual{
background:#ffffff;
padding:10px;
border:1px solid var(--border);
}

.hero-visual img{
width:100%;
height:auto;
display:block;
}

.hero-caption{
font-size:13px;
color:rgba(26,26,26,0.75);
margin-top:10px;
text-align:center;
}


/* ===============================
   Hero Grid Layout
   =============================== */

.hero-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:48px;
  align-items:center;
}

@media (max-width:900px){
  .hero-grid{
    grid-template-columns:1fr;
  }
}


/* Portfolio hierarchy */
.portfolio-item{
border-bottom:1px solid #e5e5e5;
padding-bottom:50px;
margin-bottom:50px;
}

/* Portfolio caption */
.portfolio-caption{
font-size:0.85rem;
color:#666;
margin-top:8px;
}

/* Case study navigation */
.case-nav{
margin-top:60px;
display:flex;
gap:25px;
flex-wrap:wrap;
}

.case-nav a{
font-weight:600;
}


/* ===============================
   Engineering model frame
   =============================== */

.model-frame{
background:#ffffff;
border:1px solid var(--border);
padding:14px;
}

.model-frame img{
display:block;
width:100%;
height:auto;
}


/* ===============================
   Homepage Case Study Portfolio Grid Improvements
   =============================== */

.proof-grid{
display:grid;
grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
gap:28px;
margin-top:30px;
}

.proof-item{
display:flex;
flex-direction:column;
padding:22px;
border:1px solid var(--border);
background:#fafafa;
box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

.proof-image{
display:block;
margin-bottom:14px;
}

.proof-image img{
max-width:260px;
width:100%;
height:auto;
border:1px solid #d0d0d0;
background:#ffffff;
padding:10px;
}

.proof-item a:last-child{
margin-top:auto;
}


.hero-text{
  text-align:left;
  max-width:540px;
}
