@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600;700&display=swap");

/* ========================
   Tokens
   ======================== */
:root{
  --ink-900:#111827;
  --ink-700:#374151;
  --muted-500:#6B7280;
  --border-200:#E5E7EB;
  --surface:#FFFFFF;
  --subsurface:#F6F8FB;
  --accent-600:#2563EB;
  --accent-700:#1D4ED8;

  --shadow-card:0 8px 24px rgba(17, 24, 39, 0.06);
  --shadow-card-hover:0 12px 32px rgba(17, 24, 39, 0.10);
}

/* ========================
   Base
   ======================== */
*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:var(--surface);
  color:var(--ink-900);
  font-family:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:24px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{ text-decoration:none; color:inherit; }
a:visited{ color:inherit; }

.container{
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}

*:focus-visible{
  outline:2px solid var(--accent-600);
  outline-offset:2px;
  border-radius:8px;
}

/* ========================
   Typography
   ======================== */
h1{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:40px;
  line-height:50px;
  letter-spacing:-0.02em;
  margin:0;
}
h2{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:26px;
  line-height:34px;
  letter-spacing:-0.01em;
  margin:0;
}
h3{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:16px;
  line-height:24px;
  margin:0;
}
h4{
  font-family:"Manrope",sans-serif;
  font-weight:600;
  font-size:14px;
  line-height:20px;
  margin:0;
}

@media (max-width:1024px){
  h1{ font-size:32px; line-height:40px; }
  h2{ font-size:22px; line-height:30px; }
}

/* ========================
   Header/Navbar (same as site)
   ======================== */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--surface);
  border-bottom:1px solid var(--border-200);
}
.header-inner{
  height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.site-brand{
  display:flex;
  align-items:center;
  gap:16px;
  transition:opacity .15s ease;
}
.site-brand:hover{ opacity:.85; }
.brand-text{
  font-family:"Manrope",sans-serif;
  font-weight:700;
  font-size:18px;
  line-height:24px;
  color:var(--ink-900);
}
.site-nav{
  display:flex;
  align-items:center;
  gap:22px;
}
.nav-link{
  position:relative;
  padding:8px 0;
  font-size:16px;
  font-weight:500;
  line-height:24px;
  letter-spacing:0.2px;
  color:#0B1220;
}
.nav-link::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:2px;
  width:24px;
  height:2px;
  background:transparent;
  border-radius:999px;
  transition:background .15s ease;
}
.nav-link:hover::after{ background:rgba(26,76,224,0.30); }
.nav-link.is-active{ color:#1A4CE0; }
.nav-link.is-active::after{ background:#1A4CE0; }

.btn.btn-header{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 20px;
  border-radius:12px;
  font-size:16px;
  font-weight:500;
  line-height:24px;
  background:#1A4CE0;
  color:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  white-space:nowrap;
}
.btn.btn-header:hover{ background:#1742C7; }

.nav-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:10px;
  border-radius:10px;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:2px;
  background:var(--ink-900);
  margin:5px 0;
  border-radius:2px;
}

/* Mobile Drawer */
.mobile-nav{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,0.35);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  z-index:99;
}
.mobile-nav.open{ opacity:1; pointer-events:auto; }
.mobile-panel{
  position:absolute;
  top:0;
  right:0;
  height:100%;
  width:min(360px, 90vw);
  background:var(--surface);
  border-left:1px solid var(--border-200);
  padding:18px;
  transform:translateX(100%);
  transition:transform .18s ease;
}
.mobile-nav.open .mobile-panel{ transform:translateX(0); }
.mobile-links{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}
.m-link{
  display:block;
  padding:12px 14px;
  border-radius:12px;
  font-weight:500;
  color:var(--ink-700);
}
.m-link:hover{ background:var(--subsurface); }
.m-link.is-active{ background:var(--subsurface); color:var(--accent-600); }
.btn.btn-mobile{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  height:48px;
  border-radius:12px;
  background:var(--accent-600);
  color:#fff;
  font-weight:600;
}
@media (max-width:1020px){
  .site-nav, .btn.btn-header{ display:none; }
  .nav-toggle{ display:block; }
}

/* ========================
   Case Study Page
   ======================== */
.cs-page{
  padding:26px 0 0;
}

.cs-back{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:var(--ink-700);
  font-weight:600;
  margin:10px 0 20px;
}
.cs-back:hover{ color:var(--ink-900); }
.cs-back-arrow{
  width:26px;
  height:26px;
  border:1px solid var(--border-200);
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--subsurface);
  color:var(--ink-900);
}

/* HERO */
.cs-hero{
  text-align:left;
  max-width:980px;
  margin:0 0 16px;
}

.cs-badge{
  display:inline-flex;
  align-items:center;
  height:30px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(37,99,235,0.12);
  border:1px solid rgba(37,99,235,0.25);
  color:var(--accent-600);
  font-weight:800;
  font-size:12px;
  letter-spacing:0.04em;
  text-transform:uppercase;
}

.cs-title{
  margin-top:12px;
}

.cs-subhead{
  margin:10px 0 0;
  color:var(--ink-700);
  font-size:16px;
  line-height:24px;
}

.cs-metric{
  margin:10px 0 0;
  color:var(--muted-500);
  font-size:14px;
  line-height:20px;
  font-weight:600;
}

/* Files Delivered chips row (optional) */
.cs-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}
.cs-chip{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:var(--subsurface);
  border:1px solid var(--border-200);
  color:var(--ink-700);
  font-size:12px;
  line-height:16px;
  font-weight:800;
}

/* HERO IMAGE */
.cs-hero-card{
  border:1px solid var(--border-200);
  border-radius:18px;
  background:var(--subsurface);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  height:360px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:18px 0 24px;
  position:relative;
}
.cs-hero-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.cs-hero-card.is-empty{
  background:var(--subsurface);
}
.cs-hero-card.is-empty::after{
  content:attr(data-placeholder);
  white-space:pre-line;
  color:var(--muted-500);
  font-weight:700;
}

/* GRID */
.cs-grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:22px;
  align-items:start;
  padding-bottom:40px;
}

/* DETAILS SIDEBAR */
.cs-details{
  border:1px solid var(--border-200);
  border-radius:18px;
  background:var(--surface);
  box-shadow:var(--shadow-card);
  padding:16px;
  position:sticky;
  top:96px;
}
.cs-details-title{
  margin-bottom:12px;
}

.cs-detail{
  padding:10px 0;
  border-bottom:1px solid var(--border-200);
}
.cs-detail:last-child{ border-bottom:none; }

.cs-label{
  color:var(--muted-500);
  font-size:12px;
  line-height:16px;
  font-weight:900;
  letter-spacing:0.06em;
  text-transform:uppercase;
  margin-bottom:6px;
}
.cs-value{
  color:var(--ink-900);
  font-size:14px;
  line-height:20px;
  font-weight:600;
}
.cs-preline{
  white-space:pre-line;
}

/* MAIN */
.cs-main{
  min-width:0;
}
.cs-h2{
  margin:0;
}
.cs-section-gap{
  margin-top:22px;
}
.cs-bodytext{
  margin-top:10px;
  color:var(--ink-700);
  font-size:14px;
  line-height:22px;
}

/* Sub-block headings for engineering tone */
.cs-subblock{
  margin-top:12px;
  border:1px solid var(--border-200);
  border-radius:16px;
  background:var(--surface);
  box-shadow:var(--shadow-card);
  padding:14px;
}
.cs-subtitle{
  color:var(--muted-500);
  font-size:12px;
  line-height:16px;
  font-weight:900;
  letter-spacing:0.06em;
  text-transform:uppercase;
  margin-bottom:8px;
}

/* Bullets */
.cs-bullets{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.cs-bullets li{
  position:relative;
  padding-left:18px;
  color:var(--ink-700);
  font-size:14px;
  line-height:20px;
  font-weight:600;
}
.cs-bullets li::before{
  content:"";
  position:absolute;
  left:0;
  top:9px;
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--accent-600);
}

/* PROCESS steps */
.cs-steps{
  margin-top:12px;
  display:grid;
  gap:10px;
}
.cs-step{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--border-200);
  border-radius:16px;
  background:var(--subsurface);
  padding:12px 14px;
}
.cs-step-num{
  width:28px;
  height:28px;
  border-radius:10px;
  background:rgba(37,99,235,0.12);
  border:1px solid rgba(37,99,235,0.25);
  color:var(--accent-600);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  flex:0 0 auto;
}
.cs-step-body{
  color:var(--ink-700);
  font-size:14px;
  line-height:20px;
  font-weight:600;
}

/* GALLERY (Top row 2 images) */
.cs-gallery-row{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.cs-img{
  border:1px solid var(--border-200);
  border-radius:16px;
  background:var(--subsurface);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  height:220px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.cs-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.cs-img.is-empty::after{
  content:attr(data-placeholder);
  white-space:pre-line;
  color:var(--muted-500);
  font-weight:700;
}

/* Bottom single */
.cs-gallery-single{
  margin-top:16px;
}

/* CTA */
.cs-cta{
  margin-top:22px;
  border-top:1px solid var(--border-200);
  padding-top:18px;
}
.cs-cta-text{
  margin:10px 0 14px;
  color:var(--ink-700);
}
.cs-cta-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:44px;
  padding:0 20px;
  border-radius:12px;
  background:var(--accent-600);
  color:#fff;
  font-weight:700;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}
.cs-cta-btn:hover{ background:var(--accent-700); }

/* Footer */
.site-footer{
  background:var(--surface);
  border-top:1px solid var(--border-200);
  padding:56px 24px 28px;
  color:var(--ink-700);
}
.footer-inner{
  max-width:1200px;
  margin:0 auto;
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr;
  gap:44px;
}
.footer-brand .brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  color:var(--ink-900);
  font-family:"Manrope",sans-serif;
  font-weight:700;
}
.footer-brand p{ margin:0; font-size:14px; line-height:20px; color:var(--ink-700); }
.footer-nav h4,
.footer-contact h4{
  margin:0 0 12px;
  color:var(--ink-900);
  font-family:"Manrope",sans-serif;
  font-weight:600;
}
.footer-nav a{
  display:block;
  margin:8px 0;
  color:var(--ink-700);
  font-size:14px;
  line-height:20px;
}
.footer-nav a:hover{ color:var(--ink-900); }
.footer-contact .email-link{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--ink-700);
}
.footer-contact img{ width:18px; height:18px; }
.socials{ display:flex; gap:12px; margin-top:12px; }
.socials img{ width:18px; height:18px; opacity:0.9; }
.footer-bottom{
  margin-top:28px;
  text-align:center;
  font-size:14px;
  line-height:20px;
  color:var(--muted-500);
}
@media (max-width:1024px){
  .footer-inner{ grid-template-columns:1fr; gap:22px; }
}

/* Responsive */
@media (max-width:1024px){
  .cs-grid{
    grid-template-columns: 1fr;
  }
  .cs-details{
    position:static;
    top:auto;
  }
  .cs-gallery-row{
    grid-template-columns: 1fr;
  }
  .cs-hero-card{
    height:260px;
  }
}

/* Visited hotfix */
a.btn.btn-header:visited,
a.btn.btn-mobile:visited,
a.cs-cta-btn:visited{
  color:#fff;
}