/* =========================================================
   Method Controls — Site Stylesheet
   Structure: 1) Tokens  2) Base  3) Layout  4) Components  5) Page-specific  6) Responsive
   Edit colors/fonts in the :root block below to restyle the whole site.
   ========================================================= */

/* 1) DESIGN TOKENS ---------------------------------------- */
:root {
  /* Colors — sourced from the Method Controls logo */
  --teal: #2FB6C2;
  --teal-dark: #22909A;
  --navy: #062A4D;
  --navy-mid: #133A63;
  --sky: #8CBCDB;
  --bg: #F6F9FA;
  --panel: #FFFFFF;
  --text: #1B2833;
  --text-muted: #5C6B77;
  --border: #DCE4E8;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 4px;
  --max-width: 1180px;
}

/* 2) BASE -------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 var(--space-2); color: var(--text); }

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal-dark);
  outline-offset: 2px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Signature element: circuit-trace divider — thin line with square "pads",
   echoing the PCB-trace motif in the logo. Used between major sections. */
.trace-divider {
  display: flex;
  align-items: center;
  gap: 0;
  height: 1px;
  background: var(--border);
  position: relative;
  margin: 0;
}
.trace-divider::before,
.trace-divider::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--teal);
  top: 50%;
  transform: translateY(-50%);
}
.trace-divider::before { left: 8%; }
.trace-divider::after { right: 8%; }

/* Eyebrow label — small mono caption used above headings */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-1);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--teal);
  display: inline-block;
}

/* 3) HEADER / NAV ------------------------------------------ */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy);
}
.brand img { height: 42px; width: 42px; }
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--navy);
  line-height: 1.1;
}
.brand-text span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.brand:hover { text-decoration: none; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--teal-dark); text-decoration: none; }
.main-nav a.active { color: var(--navy); border-bottom-color: var(--teal); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* 4) BUTTONS ------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-mid); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }

/* 5) HERO ----------------------------------------------------- */
.hero {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-4);
  align-items: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  position: relative;
  z-index: 1;
}
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--sky); }
.hero .eyebrow::before { background: var(--sky); }
.hero p.lead {
  color: #C7D6E2;
  font-size: 1.08rem;
  max-width: 46ch;
}
.hero-trace {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}
.hero-visual {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: rgba(255,255,255,0.04);
}
.hero-visual dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.hero-visual dt { color: var(--sky); }
.hero-visual dd { margin: 0; color: #E7EEF3; }

/* 6) CAPABILITY STRIP ------------------------------------------ */
.capabilities {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: var(--space-3) 0;
}
.capability-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: var(--bg);
}

/* 7) SECTIONS --------------------------------------------------- */
section.block { padding: var(--space-5) 0; }
.section-head { max-width: 62ch; margin-bottom: var(--space-4); }
.section-head p { color: var(--text-muted); }

/* 8) PRODUCT CARDS (datasheet style) ----------------------------- */
.product-grid {
  display: grid;
  gap: var(--space-3);
}
.product-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
}
.product-card .product-media {
  background: #EEF3F5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  border-right: 1px solid var(--border);
}
.product-card .product-media img { max-height: 260px; object-fit: contain; }
.product-card .product-body { padding: var(--space-3) var(--space-4); }
.model-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--teal-dark);
  background: rgba(47,182,194,0.1);
  border: 1px solid rgba(47,182,194,0.35);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
}
.product-card h3 { margin-bottom: 0.3rem; }
.product-tagline { color: var(--text-muted); margin-bottom: var(--space-2); }
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.spec-table tr { border-top: 1px solid var(--border); }
.spec-table tr:first-child { border-top: none; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.45rem 0;
  vertical-align: top;
}
.spec-table th {
  width: 38%;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Feature/value-prop cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.feature-card .feature-index {
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  display: block;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-muted); font-size: 0.94rem; margin: 0; }

/* Client logo strip */
.client-strip {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.client-strip .container { padding-top: var(--space-3); padding-bottom: var(--space-3); }
.client-strip .strip-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  text-align: center;
}
.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.logo-row img {
  max-height: 44px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.65;
}

/* CTA band */
.cta-band {
  background: var(--navy-mid);
  color: #fff;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #C7D6E2; max-width: 52ch; margin: 0 auto var(--space-2); }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.cta-band .btn-outline:hover { background: #fff; color: var(--navy); }

/* 9) FOOTER -------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  color: #C7D6E2;
  padding: var(--space-4) 0 var(--space-3);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-4);
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.footer-grid p, .footer-grid a { color: #C7D6E2; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.footer-brand img { height: 34px; width: 34px; }
.footer-brand span { font-family: var(--font-display); font-weight: 600; color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  font-size: 0.82rem;
  color: #93A9BC;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* 10) PAGE HEADER (for inner pages) --------------------------------- */
.page-header {
  background: var(--navy);
  color: #fff;
  padding: var(--space-4) 0;
}
.page-header h1 { color: #fff; margin-bottom: 0.4rem; }
.page-header p { color: #C7D6E2; max-width: 60ch; margin: 0; }

/* Coming-soon placeholder block */
.placeholder-block {
  text-align: center;
  padding: var(--space-6) 0;
  color: var(--text-muted);
}
.placeholder-block .eyebrow { justify-content: center; }

/* 11) RESPONSIVE ------------------------------------------------------ */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: var(--space-2) var(--space-3);
  }
  .main-nav.open ul { flex-direction: column; gap: 0.2rem; }

  .hero .container { grid-template-columns: 1fr; padding-top: var(--space-5); padding-bottom: var(--space-5); }
  .feature-grid { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 1fr; }
  .product-card .product-media { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

@media (max-width: 600px) {
  section.block { padding: var(--space-4) 0; }
  .hero { padding-bottom: var(--space-2); }
}
