/* =====================================================================
   Digital Horsepower — shared stylesheet
   Identity: technical instrument / spec-plate.
   To rebrand: change the wordmark text in each page's <nav> + footer,
   and (optionally) the --copper accent below. Nothing else is hardcoded.
   ===================================================================== */

:root {
  /* surfaces */
  --graphite-900: #15171B;
  --graphite-800: #1D2127;
  --graphite-700: #272C34;
  --line-dark:    #353B45;

  /* light surfaces (cool / brushed-aluminum, deliberately NOT warm cream) */
  --paper:    #ECEEF1;
  --paper-2:  #E0E4E9;
  --card:     #FFFFFF;

  /* ink */
  --ink:        #14161A;
  --ink-soft:   #3E444D;
  --steel-300:  #AEB6C1;  /* muted text on dark */
  --steel-200:  #C9CFD7;
  --steel-100:  #E9ECF0;

  /* accents */
  --copper:        #C77B3C;
  --copper-bright: #E2964E;
  --signal:        #C4453A;  /* used sparingly: "discontinued" stamp */

  /* type */
  --display: "Archivo Expanded", "Archivo", system-ui, sans-serif;
  --body:    "Archivo", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* layout */
  --wrap: 1120px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 14px;
}
.eyebrow--steel { color: var(--steel-300); }

.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 56ch; }

/* PCB-trace divider — the signature motif (thin line + via dot) */
.trace { display: flex; align-items: center; gap: 0; margin: 0; }
.trace::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); flex: none; }
.trace::after  { content: ""; height: 1px; background: var(--line-dark); flex: 1; }
.trace--light::after { background: rgba(20,22,26,0.16); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 13px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; transition: all .16s ease;
}
.btn--primary { background: var(--copper); color: #1a1206; border-color: var(--copper); }
.btn--primary:hover { background: var(--copper-bright); border-color: var(--copper-bright); }
.btn--ghost { background: transparent; color: var(--steel-100); border-color: var(--line-dark); }
.btn--ghost:hover { border-color: var(--copper); color: #fff; }
.btn--dark { background: var(--ink); color: var(--steel-100); border-color: var(--ink); }
.btn--dark:hover { background: var(--graphite-700); }

/* =====================================================================
   HEADER / NAV  (top nav, hover-expand submenu on Products)
   ===================================================================== */
.site-header { background: var(--graphite-900); border-bottom: 1px solid var(--line-dark); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--steel-100); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.04rem; letter-spacing: 0.02em; line-height: 1; }
.brand-name span { color: var(--copper); }
.brand-sub { display: block; font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.2em; color: var(--steel-300); margin-top: 3px; text-transform: uppercase; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--steel-100); padding: 8px 10px; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; display: block; }

.menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; }
.menu > li > a {
  display: block; text-decoration: none; color: var(--steel-200);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 16px; border-radius: var(--radius);
  border-bottom: 2px solid transparent; transition: color .15s ease;
}
.menu > li > a:hover { color: #fff; }
.menu > li.is-current > a { color: #fff; border-bottom-color: var(--copper); }
.has-sub > a::after { content: "▾"; font-size: 0.7em; margin-left: 7px; color: var(--copper); }

/* dropdown */
.submenu {
  list-style: none; margin: 0; padding: 6px; position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 260px; background: var(--graphite-800); border: 1px solid var(--line-dark);
  border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .16s ease; z-index: 60;
}
.submenu::before { /* little copper edge marker */
  content: ""; position: absolute; top: -1px; left: 16px; width: 34px; height: 2px; background: var(--copper);
}
.has-sub:hover .submenu,
.has-sub:focus-within .submenu,
.has-sub.open .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a {
  display: block; text-decoration: none; color: var(--steel-200);
  padding: 11px 13px; border-radius: 3px; font-size: 0.92rem; line-height: 1.3;
}
.submenu a:hover { background: var(--graphite-700); color: #fff; }
.submenu .sub-tag { display: block; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--copper); text-transform: uppercase; margin-top: 3px; }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section { padding: 76px 0; }
.section--dark { background: var(--graphite-900); color: var(--steel-100); }
.section--graphite { background: var(--graphite-800); color: var(--steel-100); }
.section--tight { padding: 52px 0; }
.section h2 { color: inherit; }
.section--dark .lead, .section--graphite .lead { color: var(--steel-300); }

/* ---------- hero ---------- */
.hero { background: var(--graphite-900); color: var(--steel-100); padding: 84px 0 92px; position: relative; overflow: hidden; }
.hero::after { /* faint trace texture, decorative */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(199,123,60,0.06) 1px, transparent 1px),
    linear-gradient(rgba(199,123,60,0.05) 1px, transparent 1px);
  background-size: 46px 46px; opacity: 0.5; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 54px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { color: var(--copper); font-style: normal; }
.hero .lead { margin-top: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* ---------- data plate (signature card) ---------- */
.plate {
  background: var(--graphite-800); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 0; position: relative;
}
.plate::before, .plate::after { /* corner vias */
  content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--graphite-900); border: 1px solid var(--copper);
}
.plate::before { top: 10px; left: 10px; }
.plate::after  { bottom: 10px; right: 10px; }
.plate-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line-dark);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel-300);
}
.plate-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--copper); display: inline-block; }
.plate-body { padding: 20px; }
.plate-title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: #fff; margin: 0 0 16px; line-height: 1.2; }
.spec { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 0.82rem; }
.spec li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line-dark); }
.spec li:last-child { border-bottom: 0; }
.spec .k { color: var(--steel-300); letter-spacing: 0.04em; }
.spec .v { color: var(--steel-100); text-align: right; }
.spec .v.avail { color: var(--copper-bright); }
.stamp {
  display: inline-block; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--signal); border: 1px solid var(--signal);
  padding: 3px 8px; border-radius: 3px; transform: rotate(-2deg);
}

/* ---------- generic grids / cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }

.step { padding: 4px 0; }
.step .num { font-family: var(--mono); font-size: 0.78rem; color: var(--copper); letter-spacing: 0.1em; margin-bottom: 10px; }
.step h3 { color: inherit; margin-bottom: 8px; }
.step p { color: var(--steel-300); margin: 0; font-size: 0.97rem; }

/* product card (light) */
.prod-card {
  background: var(--card); border: 1px solid var(--paper-2); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.prod-card:hover { border-color: var(--copper); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,22,26,0.10); }
.prod-card .pc-visual { aspect-ratio: 16/10; background: var(--graphite-800); display: flex; align-items: center; justify-content: center; }
.prod-card .pc-body { padding: 20px 22px 24px; }
.prod-card .pc-tag { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--copper); }
.prod-card h3 { margin: 8px 0 8px; }
.prod-card .pc-desc { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 16px; }
.prod-card .pc-go { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.prod-card .pc-go span { color: var(--copper); }

.prod-card--soon { opacity: 0.72; }
.prod-card--soon:hover { transform: none; border-color: var(--paper-2); box-shadow: none; }

/* ---------- module glyph (used in product visuals) ---------- */
.module-glyph { width: 96px; height: 96px; color: var(--copper); }

/* =====================================================================
   PRODUCT DETAIL
   ===================================================================== */
.detail-head { background: var(--graphite-900); color: var(--steel-100); padding: 56px 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.crumbs { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel-300); margin-bottom: 22px; }
.crumbs a { color: var(--steel-300); text-decoration: none; }
.crumbs a:hover { color: var(--copper); }
.crumbs span { color: var(--copper); }

.detail-visual { background: var(--graphite-800); border: 1px solid var(--line-dark); border-radius: var(--radius); aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; }
.detail-visual .module-glyph { width: 160px; height: 160px; }

.prose h2 { margin: 38px 0 14px; font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); padding-left: 1.1rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 7px; }

.callout {
  border-left: 3px solid var(--copper); background: var(--paper-2);
  padding: 16px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 22px 0;
  font-size: 0.96rem;
}
.callout strong { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); display: block; margin-bottom: 5px; }

/* =====================================================================
   FORM
   ===================================================================== */
.form { display: grid; gap: 16px; max-width: 560px; }
.field { display: grid; gap: 7px; }
.field label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  font-family: var(--body); font-size: 0.98rem; color: var(--ink);
  padding: 12px 13px; border: 1px solid var(--paper-2); border-radius: var(--radius); background: var(--card); width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--copper); outline-offset: 1px; border-color: var(--copper); }
.field textarea { min-height: 130px; resize: vertical; }

.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-direct { font-family: var(--mono); font-size: 0.92rem; }
.contact-direct .row { padding: 14px 0; border-bottom: 1px dashed var(--paper-2); }
.contact-direct .row:last-child { border: 0; }
.contact-direct .k { display: block; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.contact-direct a { color: var(--copper); text-decoration: none; }
.contact-direct a:hover { text-decoration: underline; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--graphite-900); color: var(--steel-300); padding: 48px 0 30px; border-top: 1px solid var(--line-dark); }
.footer-top { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; align-items: flex-start; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: var(--steel-300); text-decoration: none; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-links a:hover { color: var(--copper); }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line-dark); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: #6b727c; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 860px) {
  .hero-grid, .detail-grid, .grid-2, .contact-cols { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero-grid { gap: 38px; }

  .nav-toggle { display: inline-flex; }
  .menu {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--graphite-800); border-bottom: 1px solid var(--line-dark); padding: 8px 16px 16px;
  }
  .menu.open { display: flex; }
  .menu > li > a { padding: 14px 8px; border-bottom: 1px solid var(--line-dark); border-radius: 0; }
  .menu > li.is-current > a { border-bottom-color: var(--copper); }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; min-width: 0; background: transparent; border: 0; padding: 0 0 8px 14px; }
  .submenu::before { display: none; }
  .has-sub > a::after { content: "+"; }
}

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

/* =====================================================================
   ADDITIONS — product photos, progression strip, badges
   ===================================================================== */

/* photos inside product cards + detail visual */
.pc-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-visual { overflow: hidden; padding: 0; }
.detail-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* "re-engineered" / status badge */
.badge-new {
  display: inline-block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: #1a1206; background: var(--copper);
  padding: 3px 8px; border-radius: 3px; margin-left: 8px; vertical-align: middle;
}

/* progression: reverse-engineered -> new design -> final */
.progression { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 6px; }
.pstep figure { margin: 0; }
.pstep .pimg {
  background: var(--graphite-800); border: 1px solid var(--paper-2);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
}
.pstep .pimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pstep figcaption { margin-top: 11px; }
.pstep .pnum { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper); }
.pstep .ptitle { font-family: var(--display); font-weight: 700; font-size: 1.02rem; margin-top: 3px; }
.pstep .pcap { font-size: 0.88rem; color: var(--ink-soft); margin: 5px 0 0; }

/* feature list (mono spec rows in prose) */
.featurelist { list-style: none; margin: 0 0 1rem; padding: 0; font-family: var(--mono); font-size: 0.86rem; }
.featurelist li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--paper-2); color: var(--ink-soft); }
.featurelist li::before { content: "—"; color: var(--copper); flex: none; }

@media (max-width: 860px) {
  .progression { grid-template-columns: 1fr; }
}

/* progression captions sit on dark bands — lift their contrast */
.section--graphite .pstep .pcap,
.section--dark .pstep .pcap { color: var(--steel-300); }
.section--graphite .pstep .pimg,
.section--dark .pstep .pimg { border-color: var(--line-dark); }
