/* =====================================================================
   BIM CRAFT HUB — Design System
   ===================================================================== */

:root {
  /* Colour system: deep engineering navy + steel + warm accent */
  --color-navy-950: #0a1628;
  --color-navy-900: #0f1f38;
  --color-navy-800: #16304f;
  --color-navy-700: #1e4270;
  --color-navy-600: #295690;
  --color-blue-500: #2f6fb8;
  --color-blue-100: #e7f0fb;
  --color-steel-100: #eef1f5;
  --color-steel-200: #dde3ea;
  --color-steel-400: #94a3b3;
  --color-ink-900: #10161f;
  --color-ink-700: #3c4654;
  --color-ink-500: #667085;
  --color-white: #ffffff;
  --color-accent: #d98324; /* warm construction-orange accent, used sparingly */
  --color-success: #1f8a5f;

  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 22, 40, 0.10);
  --shadow-lg: 0 24px 60px rgba(10, 22, 40, 0.16);

  --container-width: 1240px;
  --transition: 200ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink-900);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy-900);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-navy-950);
  margin: 0 0 16px;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 16px; color: var(--color-ink-700); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-blue-500);
  margin-bottom: 10px;
}

.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--color-steel-100); }
.section-dark { background: linear-gradient(160deg, var(--color-navy-900), var(--color-navy-700)); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #cbd8e8; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: #c1721e; }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-light { background: #fff; color: var(--color-navy-900); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; justify-content: center; }
.btn:focus-visible { outline: 3px solid var(--color-blue-500); outline-offset: 2px; }

/* ---------- Topbar / Header ---------- */
.topbar { background: var(--color-navy-950); color: #cbd8e8; font-size: 0.82rem; }
.topbar-inner { display: flex; justify-content: space-between; padding: 8px 24px; }
.topbar-contact a { margin-right: 20px; color: #cbd8e8; }
.topbar-social a { margin-left: 12px; color: #cbd8e8; }

.site-header { position: sticky; top: 0; z-index: 500; background: rgba(255,255,255,0.97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--color-steel-200); transition: box-shadow var(--transition); }
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--color-navy-900); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; letter-spacing: 0.02em; }
.brand-mark-light { background: rgba(255,255,255,0.1); }
.brand-text { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--color-navy-950); display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-family: var(--font-body); font-weight: 500; font-size: 0.66rem; color: var(--color-ink-500); text-transform: uppercase; letter-spacing: 0.06em; }

.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 6px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { display: flex; align-items: center; gap: 4px; padding: 10px 14px; font-weight: 600; font-size: 0.94rem; border-radius: var(--radius-sm); color: var(--color-navy-900); }
.main-nav > ul > li > a:hover { background: var(--color-blue-100); }
.chevron { font-size: 0.7rem; }

.has-mega .mega-panel {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 560px; background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 24px; opacity: 0; visibility: hidden; transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  border: 1px solid var(--color-steel-200);
}
.has-mega:hover .mega-panel, .has-mega:focus-within .mega-panel { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mega-grid-cats { grid-template-columns: 1fr 1fr 1fr; }
.mega-item { display: flex; flex-direction: column; padding: 12px; border-radius: var(--radius-sm); }
.mega-item:hover { background: var(--color-steel-100); }
.mega-item strong { font-size: 0.92rem; margin-bottom: 4px; }
.mega-item span { font-size: 0.8rem; color: var(--color-ink-500); }
.mega-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-steel-200); font-size: 0.85rem; font-weight: 700; color: var(--color-blue-500); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: 8px; border-radius: 50%; }
.icon-btn:hover { background: var(--color-steel-100); }
.mobile-only { display: none; }

.search-panel { max-height: 0; overflow: hidden; transition: max-height var(--transition); background: var(--color-steel-100); }
.search-panel.open { max-height: 100px; }
.search-panel .container { display: flex; gap: 10px; padding: 16px 24px; }
.search-panel input { flex: 1; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--color-steel-200); font-size: 1rem; }
.search-panel button { border: none; background: var(--color-navy-900); color: #fff; border-radius: var(--radius-sm); padding: 0 18px; cursor: pointer; }

/* ---------- Mobile nav ---------- */
.mobile-nav { position: fixed; inset: 0; background: rgba(10,22,40,0.55); z-index: 600; display: none; }
.mobile-nav.open { display: block; }
.mobile-nav-inner { background: #fff; width: 85%; max-width: 340px; height: 100%; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-inner a { padding: 14px 4px; font-weight: 600; border-bottom: 1px solid var(--color-steel-200); }
.mobile-nav-inner details summary { padding: 14px 4px; font-weight: 600; cursor: pointer; border-bottom: 1px solid var(--color-steel-200); }
.mobile-nav-inner details a { padding-left: 16px; border-bottom: none; font-weight: 500; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; padding: 130px 0 110px; overflow: hidden; background: linear-gradient(135deg, var(--color-navy-950), var(--color-navy-700)); }
.hero::after { content:''; position:absolute; inset:0; background: radial-gradient(circle at 80% 20%, rgba(217,131,36,0.18), transparent 55%); pointer-events:none; }
.hero-inner { position: relative; max-width: 760px; }
.hero p.lead { font-size: 1.15rem; color: #d7e2f2; }
.hero-badges { display: flex; gap: 24px; margin-top: 40px; flex-wrap: wrap; }
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.hero-badge span { font-size: 0.8rem; color: #b7c6dc; text-transform: uppercase; letter-spacing: 0.04em; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; }

/* ---------- Stats bar ---------- */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -60px; position: relative; z-index: 10; }
.stat-card { background: var(--color-navy-900); color: #fff; border-radius: var(--radius-md); padding: 28px 20px; text-align: center; box-shadow: var(--shadow-lg); }
.stat-card strong { display: block; font-family: var(--font-display); font-size: 2.2rem; }
.stat-card span { font-size: 0.85rem; color: #b7c6dc; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--color-steel-200); border-radius: var(--radius-md); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 4/3; background: var(--color-steel-100); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--color-blue-500); letter-spacing: 0.05em; }
.card h3 { font-size: 1.05rem; margin: 8px 0; }
.card p { font-size: 0.9rem; }
.card-link { font-weight: 700; font-size: 0.85rem; color: var(--color-blue-500); }

.icon-card { text-align: center; padding: 28px 18px; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--color-steel-200); }
.icon-card .icon-circle { width: 60px; height: 60px; border-radius: 50%; background: var(--color-blue-100); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.4rem; color: var(--color-navy-700); }
.icon-card h3 { font-size: 0.95rem; margin: 0; }

/* ---------- Why choose ---------- */
.reason-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.reason-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-md); padding: 22px 18px; }
.reason-card h3 { color: #fff; font-size: 1rem; }
.reason-card p { font-size: 0.85rem; color: #c7d4e6; margin: 0; }

/* ---------- Software strip ---------- */
.software-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; align-items: center; }
.software-item { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--color-navy-800); font-size: 0.95rem; }
.software-item img { width: 28px; height: 28px; }

/* ---------- Industries grid ---------- */
.industry-card { text-align: center; padding: 26px 12px; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--color-steel-200); }
.industry-card .icon-circle { width: 54px; height: 54px; border-radius: 50%; background: var(--color-navy-900); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.industry-card h3 { font-size: 0.88rem; margin: 0; }

/* ---------- Testimonials slider ---------- */
.testimonial-slider { position: relative; }
.testimonial-track { display: flex; gap: 20px; overflow: hidden; }
.testimonial-card { flex: 0 0 calc(33.333% - 14px); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-md); padding: 24px; }
.testimonial-card .stars { color: var(--color-accent); margin-bottom: 8px; }
.testimonial-card h4 { color: #fff; margin: 0; font-size: 1rem; }
.testimonial-card span { font-size: 0.78rem; color: #b7c6dc; }
.testimonial-card p { color: #dbe5f2; font-size: 0.92rem; margin-top: 10px; }
.slider-controls { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.slider-controls button { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--color-steel-200); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 18px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--color-blue-500); outline-offset: 1px; border-color: var(--color-blue-500); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-message { font-size: 0.85rem; margin-top: 8px; }
.form-message.success { color: var(--color-success); }
.form-message.error { color: #b3261e; }

/* ---------- Footer ---------- */
.footer-cta { background: var(--color-accent); color: #fff; }
.footer-cta .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 48px 24px; }
.footer-cta h2 { color: #fff; margin-bottom: 6px; }
.footer-cta p { color: rgba(255,255,255,0.9); margin: 0; }

.site-footer { background: var(--color-navy-950); color: #b7c6dc; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-newsletter form { display: flex; gap: 8px; }
.footer-newsletter input { margin-bottom: 0; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: #fff; }
.footer-bottom { padding: 20px 0; font-size: 0.8rem; text-align: center; }

#backToTop { position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%; background: var(--color-navy-900); color: #fff; border: none; cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); z-index: 400; }
#backToTop.visible { opacity: 1; visibility: visible; }

/* ---------- Filters / pagination ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--color-steel-200); font-size: 0.85rem; font-weight: 600; cursor: pointer; background: #fff; }
.filter-chip.active { background: var(--color-navy-900); color: #fff; border-color: var(--color-navy-900); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.page-link { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-steel-200); font-size: 0.85rem; font-weight: 600; }
.page-link.active { background: var(--color-navy-900); color: #fff; border-color: var(--color-navy-900); }

/* ---------- Breadcrumb / inner hero ---------- */
.inner-hero { background: linear-gradient(135deg, var(--color-navy-950), var(--color-navy-700)); color: #fff; padding: 70px 0; }
.breadcrumb { font-size: 0.85rem; color: #b7c6dc; margin-bottom: 12px; }
.breadcrumb a { color: #b7c6dc; }
.breadcrumb a:hover { color: #fff; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--color-ink-500); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
