
:root{
  --bg-1:#0b0d10; --bg-2:#14171c; --text:#e9ecf1; --muted:#b6beca; --line:rgba(255,255,255,0.12);
  --accent:#5aa3ff; --shadow:0 10px 30px rgba(0,0,0,0.45); --radius:18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  --font-head: 'Space Grotesk', var(--font);
}
*{box-sizing:border-box} html,body{height:100%} body{margin:0;background:linear-gradient(180deg,var(--bg-1),var(--bg-2));color:var(--text);font:16px/1.6 var(--font)}
a{color:var(--text);text-decoration:none} .container{max-width:1160px;margin:0 auto;padding:0 24px}
.section{padding:64px 0}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,13,16,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

/* Replace old blue square with your logo image */
.brand-logo {
  height: 22px;         /* footer + default size */
  width: auto;
  display: block;
  object-fit: contain;
}

/* make header logo 1.5× larger (≈33px) */
header .brand-logo {
  height: 33px;
}


/* Old badge no longer used, but you can keep for reference
.brand-badge {
  width:26px;
  height:26px;
  border-radius:10px;
  background:var(--accent);
}
*/

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.nav-links a {
  color: #cfd6df;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

/* Only for the materials flowchart image */
.heroimg[src*="materials-flowchart"] {
  object-fit: contain;
  background-color: #0f1114; /* same as site background */
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Fix for the cost-volume chart image */
.heroimg[src="/blog/images/cost-volume-chart.jpg"] {
  object-fit: contain !important;
  background-color: #0f1114;
  padding-top: 8px;
  padding-bottom: 8px;
}


.btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border-radius:14px;font-weight:700;border:1px solid transparent;box-shadow:var(--shadow);transition:.2s}
.btn-primary{background:var(--accent);color:#0a0a0a}
.btn-ghost{border:1px solid var(--line);background:transparent;color:#e9ecf1}
.btn-primary:hover{filter:brightness(1.08)} .btn-ghost:hover{background:rgba(255,255,255,0.06)}
.btn-responsive{min-width:180px} @media(max-width:560px){.btn-responsive{width:100%}}

/* Headings */
.h1{font-family:var(--font-head);font-weight:700;letter-spacing:-0.02em;line-height:1.05;font-size:clamp(40px,6vw,64px)}
h2{font-family:var(--font-head);font-size:clamp(22px,3.2vw,34px);margin:0 0 8px}
.lead{color:var(--muted);font-size:18px;margin-top:16px} .eyebrow{text-transform:uppercase;letter-spacing:.18em;color:#9aa6b6;font-size:12px;margin-bottom:6px}
.sub{color:var(--muted);margin:8px 0 0}

/* Hero */
.hero{padding:96px 0 64px;border-bottom:1px solid var(--line)}
.grid{display:grid;gap:32px} @media(min-width:900px){.grid-2{grid-template-columns:1.2fr 1fr}}
.chiprow{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px} .chip{border:1px solid var(--line);padding:4px 10px;border-radius:999px;color:#c6cfdb;font-size:12px}
.panel{border:1px solid var(--line);background:rgba(255,255,255,0.04);border-radius:22px;padding:16px}
.panel-visual{aspect-ratio:4/3;border-radius:16px;position:relative;overflow:hidden;background:linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02))}

/* Cards */
.cards{display:grid;gap:16px} @media(min-width:720px){.cards-3{grid-template-columns:repeat(3,1fr)}}
.card{border:1px solid var(--line);border-radius:var(--radius);padding:20px;background:rgba(255,255,255,0.04)}
.card h3{margin:0 0 6px} .card p{margin:0;color:#cbd3de;font-size:14px}

/* Steps */
.steps{display:grid;gap:16px} @media(min-width:900px){.steps{grid-template-columns:repeat(5,1fr)}}
.step{border:1px solid var(--line);border-radius:var(--radius);padding:16px;background:rgba(255,255,255,0.03)}
.step .num{display:inline-flex;width:34px;height:34px;align-items:center;justify-content:center;border-radius:50%;background:rgba(255,255,255,0.08);margin-bottom:10px;font-weight:700}

/* Logos */
.logos{display:grid;gap:16px;grid-template-columns:repeat(2,1fr)} @media(min-width:720px){.logos{grid-template-columns:repeat(6,1fr)}}
.logo{height:96px;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.04);color:#aab5c3}
.logo-img{max-height:48px;max-width:170px;width:auto;height:auto;object-fit:contain;display:block}

/* Forms */
.form-card{max-width:760px;margin:0 auto;border:1px solid var(--line);background:rgba(255,255,255,0.04);border-radius:22px;padding:26px}
form{display:grid;gap:16px} label{font-size:14px;color:#d8dee6}
input,select,textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:#0f1317;color:#e9ecf1;outline:none;font-size:16px}
input::placeholder,textarea::placeholder{color:#95a2b3}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(90,163,255,0.25)}
textarea{min-height:140px;resize:vertical}
.row{display:grid;gap:16px} @media(min-width:720px){.row-2{grid-template-columns:1fr 1fr}}
.hint{font-size:12px;color:#9fb0c4;margin-top:6px} .button-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px}
@media(max-width:560px){.button-row .btn{width:100%}}

/* Capabilities v8 layout */
.cap-section { padding:80px 0; border-top:1px solid var(--line); }
.cap-section .container { display:grid; gap:32px; align-items:center; }
@media(min-width:900px){ .cap-section .container { grid-template-columns:1fr 1fr; } }
.cap-text h2{margin-top:0;margin-bottom:10px;font-family:var(--font-head);font-size:clamp(26px,3.5vw,38px)}
.cap-text p{color:#cfd4dd;line-height:1.6;margin-top:0;margin-bottom:10px}
.cap-text ul{margin:10px 0 0 18px;color:#b8c2ce} .cap-text li{margin-bottom:4px}
.cap-img img{width:100%;border-radius:16px;object-fit:cover;max-height:380px;background:#0f1317;border:1px solid var(--line)}
.fabshop { border-top:1px solid var(--line); padding:96px 0 56px; margin-top:56px; }
.fabshop h3 { margin:0 0 8px; font-family:var(--font-head); font-size:clamp(22px,3vw,30px); }
.fabshop p { color:#cfd4dd; margin:0 0 12px; }
.fabshop .cols { display:grid; gap:16px; } @media(min-width:900px){ .fabshop .cols { grid-template-columns: 1.4fr 1fr; } }
.fabshop .pill { display:inline-block; border:1px solid var(--line); border-radius:999px; padding:6px 10px; font-size:12px; color:#c6cfdb; margin:4px 6px 0 0; background:rgba(255,255,255,0.04); }
.fabshop .list { display:grid; gap:8px; margin-top:12px; }
.fabshop .card { border:1px solid var(--line); background:rgba(255,255,255,0.04); border-radius:16px; padding:14px 16px; color:#cbd3de; }

/* Footer */
footer{border-top:1px solid var(--line);padding:28px 0;color:#aab5c3} .muted{color:#9fb0c4;font-size:12px}

/* --- Mobile header: keep logo, tagline, tabs + chat, no overflow --- */
@media (max-width: 720px){

  /* allow two-row layout */
  .nav-inner{
    height:auto;
    padding:8px 0;
    flex-wrap:wrap;
    row-gap:8px;
  }

  /* brand stays left, slightly condensed */
  .brand{min-width:0; flex:1}
  .brand .muted{font-size:11px; opacity:.85; line-height:1.2}
  header .brand-logo{height:26px}

  /* chat/CTA button stays visible on first row */
  .nav .btn{
    padding:8px 10px;
    border-radius:12px;
    font-size:14px;
    flex:0 0 auto;
    order:2;
  }

  /* tabs go to a second row and become swipeable */
  .nav-links{
    order:3;
    display:flex;
    width:100%;
    overflow:auto;
    white-space:nowrap;
    gap:8px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    margin-top:2px;
    padding-bottom:4px;
  }
  .nav-links::-webkit-scrollbar{display:none}

  /* slightly tighter links on small screens */
  .nav-links a{
    padding:6px 10px;
    border-radius:10px;
    font-size:14px;
  }

  /* safety against side-scroll */
  html, body { overflow-x:hidden; }
}

/* --- Mobile footer fix --- */
@media (max-width: 720px) {

  /* Center the footer contents */
  footer .container {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Ensure footer text and links do not overflow */
  footer p, footer .links {
    text-align: center;
    font-size: 14px;
  }

  /* Stack footer links and small text for mobile */
  footer .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  /* Reduce size of footer links on mobile */
  footer .links a {
    font-size: 14px;
    padding: 6px 8px;
  }
}