/* ========================================
   GLOBAL CSS — BX Precision Engineering
   Shared styles extracted from all pages
   ======================================== */

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

/* VARIABLES */
:root {
  --bg-dark: #141414;
  --bg-surface: #1e1e1e;
  --bg-card: #262626;
  --border: #333;
  --text: #d4d4d4;
  --text-muted: #999;
  --text-heading: #f0f0f0;
  --accent: #e07a18;
  --accent-hover: #f28a22;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.15rem; font-weight: 700; color: var(--text-heading);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-heading); }
.nav-links a.active { color: var(--accent); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

/* DROPDOWN */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 0.3rem; }
.nav-dropdown > a svg.chevron {
  width: 12px; height: 12px; stroke: currentColor; fill: none;
  transition: transform 0.2s;
}
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.98); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.5rem 0; min-width: 240px;
  list-style: none;
}
.dropdown-menu::before {
  content: ''; position: absolute; top: -0.75rem; left: 0; right: 0; height: 0.75rem;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown:hover > a svg.chevron { transform: rotate(180deg); }
.dropdown-menu a {
  display: block; padding: 0.6rem 1.25rem;
  color: var(--text-muted); font-size: 0.85rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.dropdown-menu a:hover { color: var(--text-heading); background: rgba(255,255,255,0.04); }

/* PAGE HEADER */
.page-header {
  padding: 8rem 1.5rem 3rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.page-header-inner { max-width: 1100px; margin: 0 auto; }
.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700;
  color: var(--text-heading); margin-bottom: 0.75rem;
}
.page-header p {
  font-size: 1.05rem; color: var(--text-muted); max-width: 600px;
}

/* SECTION */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-label {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.5rem;
}

/* SERVICE BLOCK */
.service-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: start;
}
.service-block.reverse .service-content { order: 2; }
.service-block.reverse .service-visual { order: 1; }
.service-content h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--text-heading);
  margin-bottom: 1rem;
}
.service-content p {
  color: var(--text-muted); margin-bottom: 1rem; font-size: 0.95rem;
}
.service-list {
  list-style: none; margin-top: 1.5rem;
}
.service-list li {
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.92rem; color: var(--text);
  display: flex; align-items: center; gap: 0.75rem;
}
.service-list li::before {
  content: '';
  width: 6px; height: 6px; background: var(--accent);
  border-radius: 50%; flex-shrink: 0;
}

/* SERVICE VISUAL */
.service-visual {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.service-visual svg {
  width: 80px; height: 80px; stroke: var(--accent); fill: none;
  opacity: 0.4;
}
.service-visual .grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
}

/* STATUS BADGE */
.status-badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.25rem 0.75rem; border-radius: 14px; margin-bottom: 0.75rem;
}
.status-badge.available { color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.status-badge.coming-soon { color: var(--accent); border: 1px solid rgba(224, 122, 24, 0.3); }

/* CTA BAND */
.cta-band {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-band h2 {
  font-size: 1.5rem; font-weight: 700; color: var(--text-heading);
  margin-bottom: 0.75rem;
}
.cta-band p {
  color: var(--text-muted); margin-bottom: 1.5rem; max-width: 480px;
  margin-left: auto; margin-right: auto;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #c96a10; color: #fff; font-weight: 600;
  padding: 0.85rem 1.75rem; border-radius: 4px; font-size: 0.95rem;
  transition: background 0.2s;
}
.hero-cta:hover { background: var(--accent-hover); color: #fff; }
.hero-cta svg { width: 18px; height: 18px; }

/* FOOTER */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.footer-brand .nav-logo { margin-bottom: 0.75rem; display: block; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); max-width: 280px; }
.footer h4 {
  font-size: 0.82rem; font-weight: 600; color: var(--text-heading);
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.4rem; }
.footer ul a { color: var(--text-muted); font-size: 0.9rem; }
.footer ul a:hover { color: var(--text-heading); }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  padding-top: 1.5rem; margin-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted);
  display: flex; justify-content: space-between; align-items: center;
}

/* MOBILE */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(20, 20, 20, 0.98);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open a {
    display: block; padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    min-height: 44px;
  }
  .nav-toggle {
    display: flex;
    min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
  }
  .nav-toggle span { width: 24px; height: 2px; }
  .nav-dropdown > a svg.chevron { display: inline-block; }
  .dropdown-menu {
    position: static; transform: none;
    background: none; border: none; border-radius: 0;
    padding: 0; margin: 0; min-width: 0;
  }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .dropdown-menu li { margin: 0; }
  .dropdown-menu a {
    padding: 0.85rem 1.5rem 0.85rem 2.5rem;
    border-top: 1px solid var(--border);
    min-height: 44px;
  }
  .service-block { grid-template-columns: 1fr; gap: 2rem; }
  .service-block.reverse .service-content { order: 1; }
  .service-block.reverse .service-visual { order: 2; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .blog-grid { grid-template-columns: 1fr; }
  .hero-cta, .btn-submit, .btn-add {
    min-height: 44px; padding: 0.9rem 1.5rem;
  }
  .post-nav-inner { grid-template-columns: 1fr; gap: 1rem; }
  .post-nav-link { min-height: 44px; }
  .post-nav-next { justify-content: flex-start; }
}

/* BREADCRUMB */
.breadcrumb-bar {
  padding: 5.5rem 1.5rem 0;
  background: var(--bg-surface);
}
.breadcrumb-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text-muted);
}
.breadcrumb-inner a { color: var(--text-muted); }
.breadcrumb-inner a:hover { color: var(--accent); }
.breadcrumb-inner svg {
  width: 12px; height: 12px; stroke: var(--text-muted); flex-shrink: 0;
}

/* POST HEADER */
.post-header {
  padding: 1.5rem 1.5rem 3rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.post-header-inner { max-width: 720px; margin: 0 auto; }
.post-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700;
  color: var(--text-heading); margin-bottom: 0.75rem;
  line-height: 1.3;
}
.post-meta {
  font-size: 0.85rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.post-meta-sep { color: var(--border); }

/* POST CONTENT — PROSE */
.post-content {
  max-width: 720px; margin: 0 auto;
}
.prose h2 {
  font-size: 1.4rem; font-weight: 700; color: var(--text-heading);
  margin: 2.5rem 0 1rem; line-height: 1.3;
}
.prose h3 {
  font-size: 1.15rem; font-weight: 600; color: var(--text-heading);
  margin: 2rem 0 0.75rem; line-height: 1.3;
}
.prose h4 {
  font-size: 1rem; font-weight: 600; color: var(--text-heading);
  margin: 1.5rem 0 0.5rem;
}
.prose p {
  margin-bottom: 1.25rem; color: var(--text); line-height: 1.75;
  font-size: 0.95rem;
}
.prose ul, .prose ol {
  margin-bottom: 1.25rem; padding-left: 1.5rem;
}
.prose li {
  margin-bottom: 0.4rem; color: var(--text); line-height: 1.7;
  font-size: 0.95rem;
}
.prose strong { color: var(--text-heading); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--accent); margin: 1.5rem 0;
  padding: 0.75rem 1.25rem; background: var(--bg-surface);
  border-radius: 0 4px 4px 0;
}
.prose blockquote p { margin-bottom: 0; color: var(--text-muted); }
.prose code {
  background: var(--bg-surface); border: 1px solid var(--border);
  padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.85em;
}
.prose pre {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.25rem; margin-bottom: 1.5rem;
  overflow-x: auto;
}
.prose pre code {
  background: none; border: none; padding: 0; font-size: 0.85rem;
}
.prose img {
  max-width: 100%; height: auto; border-radius: 6px;
  border: 1px solid var(--border); margin: 1.5rem 0;
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--accent-hover); }
.prose hr {
  border: none; border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* POST NAV */
.post-nav {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}
.post-nav-inner {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.post-nav-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-card); transition: border-color 0.2s;
  text-decoration: none;
}
.post-nav-link:hover { border-color: var(--accent); }
.post-nav-link svg { width: 18px; height: 18px; stroke: var(--text-muted); flex-shrink: 0; }
.post-nav-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.post-nav-title { display: block; font-size: 0.9rem; font-weight: 500; color: var(--text-heading); }
.post-nav-next { justify-content: flex-end; text-align: right; }

/* BLOG LISTING */
.blog-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.blog-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  transition: border-color 0.2s; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.blog-card:hover { border-color: var(--accent); }
.blog-card-body {
  padding: 1.5rem; flex: 1;
  display: flex; flex-direction: column;
}
.blog-card-body time {
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.5rem;
}
.blog-card-body h2 {
  font-size: 1.1rem; font-weight: 600; color: var(--text-heading);
  margin-bottom: 0.5rem; line-height: 1.4;
}
.blog-card-body p {
  font-size: 0.88rem; color: var(--text-muted); flex: 1;
  margin-bottom: 1rem; line-height: 1.6;
}
.blog-card-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.85rem; font-weight: 500; color: var(--accent);
}
.blog-card-link svg { width: 14px; height: 14px; }
.blog-card:hover .blog-card-link { color: var(--accent-hover); }
.empty-blog {
  grid-column: 1 / -1; text-align: center; padding: 4rem 2rem;
}
.empty-blog h3 {
  font-size: 1.1rem; font-weight: 600; color: var(--text-heading);
  margin-bottom: 0.5rem;
}
.empty-blog p { font-size: 0.9rem; color: var(--text-muted); }

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-body time { font-size: 0.85rem; }
  .blog-card-body h2 { font-size: 1.15rem; }
  .blog-card-body p { font-size: 1rem; }
}
