/* ============================================================
   JSL Engineering Blog - Shared Article Stylesheet
   Used by all /blog/[slug].html pages
============================================================ */

:root {
  --black: #050505;
  --navy: #0d1f2d;
  --steel: #2F5878;
  --steel-light: #3d6e92;
  --slate: #6F8AA3;
  --blue-gray: #B7C7D6;
  --cool-gray: #EEF3F6;
  --mid-gray: #d4dde5;
  --text-gray: #4a5568;
  --muted: #8a939b;
  --white: #ffffff;
  --off-white: #f8fafc;
  --border: rgba(47,88,120,0.14);
  --border-md: rgba(47,88,120,0.22);
  --surface: #f4f7fa;
  --shadow-sm: 0 2px 12px rgba(5,5,5,0.07);
  --shadow-md: 0 6px 28px rgba(5,5,5,0.10);
  --nav-h: 68px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.18s;
  --t-mid: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-gray);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--steel);
  color: var(--white);
  padding: 10px 16px;
  z-index: 9999;
}
.skip-link:focus { left: 0; }

/* Navbar */
nav#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  height: var(--nav-h);
  transition: box-shadow var(--t-mid) var(--ease);
}
nav#navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo img {
  width: 148px;
  height: 42px;
  object-fit: contain;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-gray);
  transition: color var(--t-fast) var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--steel); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.nav-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--black);
}
.nav-phone:hover { color: var(--steel); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: 'Sora', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 6px;
  transition: all var(--t-mid) var(--ease);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--steel);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy);
  transform: translateY(-1px);
}
.btn-lg {
  padding: 14px 24px;
  font-size: 14px;
}
.btn-outline {
  background: transparent;
  color: var(--steel);
  border: 1.5px solid var(--steel);
}
.btn-outline:hover {
  background: var(--steel);
  color: var(--white);
}
.btn-white {
  background: var(--white);
  color: var(--navy);
}
.btn-white:hover { background: var(--cool-gray); }
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: all var(--t-fast) var(--ease);
}

.mobile-nav {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(100%);
  transition: transform var(--t-mid) var(--ease);
  z-index: 99;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-link {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.mobile-cta { margin-top: 20px; }
.mobile-phone {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--steel);
}

/* Article header */
.article-header {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 48px;
  background: linear-gradient(180deg, var(--cool-gray) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border);
}
.article-header-inner {
  max-width: 760px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.breadcrumb a {
  color: var(--steel);
  transition: color var(--t-fast) var(--ease);
}
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb-sep {
  margin: 0 8px;
  color: var(--mid-gray);
}

.article-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 12px;
}
.article-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 18px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.article-meta-sep { color: var(--mid-gray); }
.article-meta strong { color: var(--text-gray); font-weight: 600; }

/* Article body */
.article-body {
  padding: 56px 0 80px;
}
.article-body-inner {
  max-width: 720px;
  margin: 0 auto;
}
.article-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-gray);
  margin-bottom: 22px;
}
.article-body h2 {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 48px 0 18px;
  line-height: 1.25;
}
.article-body h3 {
  font-family: 'Sora', sans-serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 36px 0 14px;
  line-height: 1.3;
}
.article-body ul, .article-body ol {
  margin: 0 0 22px 24px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-gray);
}
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--black); font-weight: 600; }
.article-body a {
  color: var(--steel);
  text-decoration: underline;
  text-decoration-color: rgba(47,88,120,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-fast) var(--ease);
}
.article-body a:hover { text-decoration-color: var(--steel); }

.callout {
  background: var(--cool-gray);
  border-left: 3px solid var(--steel);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 6px 6px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--steel); }

.faq-block {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.faq-block h2 { margin-top: 0; }
.faq-q {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  margin: 28px 0 10px;
}
.faq-a {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-gray);
  margin-bottom: 0;
}

/* Article footer / related */
.article-footer {
  background: var(--cool-gray);
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.related-head {
  text-align: center;
  margin-bottom: 32px;
}
.related-head .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.related-head h2 {
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px;
  transition: all var(--t-mid) var(--ease);
}
.related-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--steel);
}
.related-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.related-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.35;
}

/* CTA section */
.article-cta {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0;
}
.article-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.article-cta h2 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.article-cta p {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 24px;
}
.article-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: #040c14;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.72);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.footer-tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.32);
  line-height: 1.4;
}
.footer-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.42);
}
.footer-contact a {
  color: rgba(255,255,255,0.55);
  transition: color var(--t-fast) var(--ease);
}
.footer-contact a:hover { color: var(--white); }
.footer-sep {
  color: rgba(255,255,255,0.18);
  font-size: 11px;
}
.footer-copy {
  font-size: 10.5px;
  color: rgba(255,255,255,0.28);
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .hamburger { display: flex; }
  .related-grid { grid-template-columns: 1fr; }
  .article-header { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 36px; }
  .article-body { padding: 40px 0 56px; }
  .article-body p { font-size: 16px; }
  .article-body h2 { font-size: 24px; margin: 36px 0 14px; }
  .article-body h3 { font-size: 19px; }
  .footer-row { flex-direction: column; text-align: center; gap: 10px; }
  .footer-brand { justify-content: center; }
  .footer-contact { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
}
