/* ONAC — shared stylesheet. Light theme by design: this site is aimed at
   OEMs and professional engineering audiences, distinct from the dark
   in-app theme of Network Studio / Diagnostic Studio. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --surface: #ffffff;
  --border: #e2e4f0;
  --text: #12172a;
  --text-muted: #5b6685;
  --accent: #7858c3;
  --accent-dark: #5c3fa0;
  --accent-soft: #f1ecfb;
  --accent-line: #d9cdf2;
  --code-bg: #12172a;
  --code-text: #e6eef8;
  --success: #0a9c58;
  --warning: #a67c00;
  --error: #d6362a;
  --max-width: 1120px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 23, 42, 0.04), 0 8px 24px rgba(18, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

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

/* --- Header --- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav .brand { display: flex; align-items: center; gap: 10px; }
.nav .brand img { height: 30px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.current { color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

/* --- Hero --- */
.hero {
  padding: 84px 0 64px;
  background:
    radial-gradient(700px 340px at 85% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.hero p.lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Sections --- */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
section.tight { padding: 48px 0; }

.section-head { max-width: 640px; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 14px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-muted); font-size: 17px; margin: 0; }

.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* --- Grids & cards --- */
.grid {
  display: grid;
  gap: 22px;
}
.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: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.card h3 { margin: 0 0 10px; font-size: 19px; }
.card p { margin: 0; color: var(--text-muted); font-size: 15px; }

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent-dark);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 600;
  font-size: 14.5px;
}

/* Product card */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.product-card h3 { font-size: 22px; margin: 0 0 10px; }
.product-card p.desc { color: var(--text-muted); margin: 0 0 18px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text); }
.feature-list li svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }

/* --- Pull quote / why block --- */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.why-list li { display: flex; gap: 16px; }
.why-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.why-list h4 { margin: 0 0 4px; font-size: 16.5px; }
.why-list p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* --- CTA band --- */
.cta-band {
  background: linear-gradient(135deg, #241a3d, #3a2764 55%, var(--accent));
  color: #fff;
  border-radius: 20px;
  padding: 56px;
  text-align: center;
}
.cta-band h2 { color: #fff; margin: 0 0 14px; font-size: 30px; }
.cta-band p { color: #d9d2ee; margin: 0 0 28px; font-size: 16.5px; }
.cta-band .btn-primary { background: #fff; color: var(--accent-dark); }
.cta-band .btn-primary:hover { background: #f1ecfb; }
.cta-band .btn-ghost { border-color: rgba(255,255,255,0.35); color: #fff; }
.cta-band .btn-ghost:hover { border-color: #fff; }

/* --- Footer --- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid img { height: 26px; margin-bottom: 12px; }
.footer-grid p { color: var(--text-muted); font-size: 14px; max-width: 32ch; }
.footer-grid h5 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0 0 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); font-size: 14.5px; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}

/* --- Page header (non-home pages) --- */
.page-header { padding: 56px 0 36px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.page-header .eyebrow { margin-bottom: 16px; }
.page-header h1 { font-size: clamp(30px, 4.4vw, 42px); max-width: 24ch; }
.page-header p.lead { font-size: 17px; }
.breadcrumb { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

/* --- Prose (training / about content) --- */
.prose { max-width: 760px; }
.prose h2 { font-size: 25px; margin: 44px 0 16px; letter-spacing: -0.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; }
.prose p { font-size: 16px; color: var(--text); margin: 0 0 16px; }
.prose p.muted { color: var(--text-muted); }
.prose ul, .prose ol { font-size: 16px; margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose code {
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
.prose pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
.prose pre code { background: none; color: inherit; padding: 0; }

.callout {
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 15px;
}
.callout strong { color: var(--accent-dark); }

.diagram-frame {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 24px;
  margin: 24px 0 32px;
  box-shadow: var(--shadow);
}
.diagram-frame svg { display: block; width: 100%; height: auto; }
.diagram-frame figcaption { margin-top: 14px; font-size: 13.5px; color: var(--text-muted); text-align: center; }

table.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0 0 24px; }
table.spec-table th, table.spec-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.spec-table th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }

/* --- Learn hub cards --- */
.module-card {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.module-card .num {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.module-card h3 { margin: 0 0 6px; font-size: 18.5px; }
.module-card p { margin: 0 0 10px; color: var(--text-muted); font-size: 14.5px; }
.status-pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.status-pill.available { background: #e3f6ec; color: var(--success); }
.status-pill.soon { background: #f4eede; color: var(--warning); }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-item .icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item h4 { margin: 0 0 4px; font-size: 15.5px; }
.contact-item p, .contact-item a { margin: 0; font-size: 14.5px; color: var(--text-muted); }

.placeholder-note {
  border: 1px dashed var(--accent-line);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--accent-dark);
  margin-bottom: 28px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* top/height set explicitly (not via "inset: 62px 0 0 0") because
     .site-header uses backdrop-filter, which makes it the containing
     block for this fixed-position element - "bottom: 0" would resolve
     against the header's own ~62px height instead of the viewport,
     collapsing this to its content height instead of a full-height
     panel. 100vh is always viewport-relative regardless of containing
     block, so it isn't affected by that. */
  .nav-links { position: fixed; top: 62px; left: 0; right: 0; height: calc(100vh - 62px); background: #fff; flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; border-top: 1px solid var(--border); transform: translateY(-110%); transition: transform 0.2s ease; }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: inline-flex; }
  .nav .btn-primary { display: none; }
  .nav-links .btn-primary { display: inline-flex; margin-top: 4px; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 36px 22px; }
}
