/* MillCore static site — design tokens + components */
:root {
  --brand-navy: #1A2D4F;
  --brand-navy-deep: #0F1C33;
  --brand-orange: #E55A1F;
  --brand-orange-soft: #F4A26B;
  --surface-paper: #FFFFFF;
  --surface-mist: #F4F5F7;
  --surface-steel: #E5E7EB;
  --text-ink: #0F1C33;
  --text-body: #2A3344;
  --text-muted: #6B7280;
  --text-on-navy: #F4F5F7;
  --state-success: #2F8F5C;
  --state-warning: #C97A0F;
  --state-error: #B23A2E;

  --max-width: 1280px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 2px 6px rgba(15, 28, 51, 0.06);
  --shadow-card: 0 4px 20px rgba(15, 28, 51, 0.08);
  --shadow-card-hover: 0 8px 30px rgba(15, 28, 51, 0.12);
  --transition: 140ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-body);
  background: var(--surface-paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-orange); }
h1, h2, h3, h4 { color: var(--text-ink); line-height: 1.25; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 36px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.alt { background: var(--surface-mist); }
.section-sm { padding: 64px 0; }
.section-header { max-width: 720px; margin-bottom: 48px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 17px; margin: 0; }

/* Typography helpers */
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-body); line-height: 1.55; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Top bar */
.topbar {
  background: var(--brand-navy-deep);
  color: var(--text-on-navy);
  font-size: 13px;
  padding: 8px 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar a { color: var(--text-on-navy); opacity: 0.9; }
.topbar a:hover { opacity: 1; color: var(--brand-orange-soft); }
.topbar-contacts { display: flex; gap: 20px; align-items: center; }

/* Header + nav */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 45, 79, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { display: flex; align-items: center; color: #fff; }
.logo img { height: 40px; width: auto; }
.logo:hover { opacity: 0.92; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--text-on-navy); font-size: 15px; font-weight: 500; opacity: 0.9; }
.nav a:hover, .nav a.active { color: var(--brand-orange-soft); opacity: 1; }
.nav .dropdown { position: relative; }
.nav .dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}
.nav .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  background: #fff;
  border: 1px solid var(--surface-steel);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  min-width: 260px;
  padding: 8px 0;
}
.nav .dropdown:hover .dropdown-menu { display: block; }
.nav .dropdown-menu a { display: block; padding: 10px 20px; color: var(--text-body); font-size: 14px; font-weight: 500; }
.nav .dropdown-menu a:hover { background: var(--surface-mist); color: var(--brand-navy); }
.mobile-menu-btn { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 6px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.3;
}
.btn-primary { background: var(--brand-orange); color: #fff; }
.btn-primary:hover { background: var(--brand-orange-soft); color: var(--text-ink); border-color: var(--brand-orange-soft); }
.btn-secondary { background: transparent; color: var(--brand-navy); border-color: var(--brand-navy); }
.btn-secondary:hover { background: var(--brand-navy); color: #fff; }
.btn-on-dark { background: var(--brand-orange); color: #fff; }
.btn-on-dark:hover { background: var(--brand-orange-soft); color: var(--text-ink); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* Hero */
.hero {
  background: var(--brand-navy);
  color: var(--text-on-navy);
  padding: 0;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 640px;
}
.hero-content { padding: 80px 0; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero .lead { opacity: 0.9; margin-bottom: 32px; max-width: 540px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { position: relative; height: 100%; min-height: 400px; background: var(--brand-navy-deep); }
.hero-image img { width: 100%; height: 100%; min-height: 400px; object-fit: cover; }
.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--brand-navy) 0%, rgba(26,45,79,0.2) 40%, transparent 70%);
  pointer-events: none;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--surface-steel);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--surface-steel); transform: translateY(-3px); }
.card img {
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; flex-grow: 1; }
.card-footer { margin-top: auto; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

/* Tags / badges */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-mist);
  color: var(--text-body);
  border: 1px solid var(--surface-steel);
}
.tag-orange { background: rgba(229, 90, 31, 0.1); color: var(--brand-orange); border-color: rgba(229, 90, 31, 0.2); }
.tag-navy { background: rgba(26, 45, 79, 0.08); color: var(--brand-navy); border-color: rgba(26, 45, 79, 0.15); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pillar { text-align: left; }
.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--brand-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.pillar h3 { font-size: 18px; margin-bottom: 8px; }
.pillar p { font-size: 14px; color: var(--text-muted); margin: 0; }

/* Stats bar */
.stats-bar {
  background: var(--surface-mist);
  padding: 48px 0;
  border-top: 1px solid var(--surface-steel);
  border-bottom: 1px solid var(--surface-steel);
}
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; text-align: center; }
.stat-value { font-size: 32px; font-weight: 700; color: var(--brand-navy); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Tables */
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 24px; }
.spec-table caption { text-align: left; font-weight: 600; margin-bottom: 12px; color: var(--text-ink); font-size: 16px; }
.spec-table th, .spec-table td { padding: 12px 16px; border-bottom: 1px solid var(--surface-steel); text-align: left; }
.spec-table th { background: var(--brand-navy); color: #fff; font-weight: 600; position: sticky; top: 68px; white-space: nowrap; }
.spec-table tr:nth-child(even) { background: var(--surface-mist); }
.spec-table td { font-variant-numeric: tabular-nums; }
.spec-table .model { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--surface-steel); border-radius: var(--radius-md); }
.table-note { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* CTA banner */
.cta-banner { background: var(--brand-navy); color: #fff; padding: 72px 0; }
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { opacity: 0.9; margin-bottom: 24px; max-width: 640px; }

/* Split media sections */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius-md); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split ul { color: var(--text-muted); }
.split li strong { color: var(--text-ink); }

/* OEM process */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.process-step {
  background: #fff;
  border: 1px solid var(--surface-steel);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.process-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 20px;
  width: 28px;
  height: 28px;
  background: var(--brand-orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.process-step h4 { font-size: 16px; margin: 8px 0 8px; }
.process-step p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Capability matrix */
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.capability-item { background: #fff; border: 1px solid var(--surface-steel); border-radius: var(--radius-md); padding: 18px; }
.capability-item h4 { font-size: 15px; margin-bottom: 6px; }
.capability-item p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-card { background: var(--surface-mist); border: 1px solid var(--surface-steel); border-radius: var(--radius-md); padding: 32px; }
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { color: var(--text-muted); margin-bottom: 20px; }
.qr { max-width: 220px; border: 1px solid var(--surface-steel); border-radius: var(--radius-md); padding: 8px; background: #fff; }

/* Footer */
footer { background: var(--brand-navy-deep); color: var(--text-on-navy); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand p { opacity: 0.75; font-size: 14px; }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 16px; }
.footer-col a { display: block; color: var(--text-on-navy); opacity: 0.75; font-size: 14px; margin-bottom: 10px; }
.footer-col a:hover { opacity: 1; color: var(--brand-orange-soft); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  opacity: 0.7;
  flex-wrap: wrap;
}

/* Utilities */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }

/* Fade-in on scroll */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.35s ease-out, transform 0.35s ease-out; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split img { aspect-ratio: 16 / 9; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(3, 1fr); }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .hero .container { grid-template-columns: 1fr; min-height: auto; }
  .hero-content { padding: 64px 0 40px; }
  .hero-image { min-height: 280px; order: -1; }
  .hero-image::after { background: linear-gradient(180deg, transparent 40%, var(--brand-navy) 100%); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .capability-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }
  .pillars { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process-step + .process-step { margin-top: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .topbar-inner { justify-content: center; }
}
