/* ============================================================
   Microhard Technologies — global stylesheet
   Palette: industrial red + black (swap vars below for olive/cream)
   ============================================================ */

:root {
  /* --- Active palette: RED & BLACK --- */
  --ink:        #0c0c0e;   /* near-black */
  --ink-soft:   #1a1a1f;
  --paper:      #f6f5f2;   /* off-white */
  --paper-2:    #ecebe6;
  --line:       #d8d6cf;
  --accent:     #e11d2a;   /* industrial red */
  --accent-dk:  #b3121d;
  --muted:      #57575f;   /* darkened to clear WCAG AA 4.5:1 on cream */

  /* --- Alt palette (Everpure olive/cream). To use, comment the
         block above and uncomment this one ---
  --ink:        #20251e;
  --ink-soft:   #2e342a;
  --paper:      #f3f1e9;
  --paper-2:    #e7e4d8;
  --line:       #cfccbe;
  --accent:     #d2622b;
  --accent-dk:  #a94d1f;
  --muted:      #6c6f63;
  */

  --maxw: 1180px;
  --r: 14px;
  --shadow: 0 14px 40px -18px rgba(0,0,0,.35);
  /* Body: IBM Plex Sans — engineering heritage, on-brand for robotics.
     Display: Space Grotesk — geometric, technical, distinctive. */
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --display: "Space Grotesk", "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

/* Visible keyboard focus everywhere (never silently removed) */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

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

h1, h2, h3 { font-family: var(--display); line-height: 1.05; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.25rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--accent); color: #fff;
  padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--accent-dk); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,245,242,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: 1.5rem; }
.brand .mark { width: 44px; height: 44px; flex: 0 0 auto; margin-right: .55rem; }
.brand b { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; }
.nav-links a { font-weight: 600; font-size: .95rem; color: var(--ink); position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 78% 28%, rgba(225,29,42,.16), transparent 55%),
    var(--ink);
  color: var(--paper);
  position: relative; overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-top: 28px; padding-bottom: 56px; }
.hero h1 { color: var(--paper); }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: #c7c6c1; margin: 1.4rem 0 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-art { display: grid; place-items: center; }
.hero-art svg, .hero-art img { width: 100%; max-width: 400px; max-height: 360px; }
.grid-bg {
  position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image: linear-gradient(var(--accent) 1px, transparent 1px),
                    linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 50%, #000, transparent 72%);
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head h2 { margin-top: .5rem; }

.bg-soft { background: var(--paper-2); }
.bg-ink { background: var(--ink); color: var(--paper); }
.bg-ink h2, .bg-ink h3 { color: var(--paper); }
.bg-ink .lead { color: #c2c1bb; }

/* ---------- Cards / product grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--accent); }
.card .art { background: var(--paper-2); border-radius: 10px; padding: 22px; margin-bottom: 20px; }
.card .art svg, .card .art img { width: 100%; height: 150px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .96rem; flex: 1; }
.card .tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: .8rem; }
.card .more { margin-top: 16px; font-weight: 700; color: var(--accent); font-size: .9rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; text-align: center; }
.stat .num { font-family: var(--display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700; color: var(--accent); letter-spacing: -.03em; }
.stat .lbl { color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Feature split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.rev .art-col { order: 2; }
.art-col { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); padding: 40px; }
.art-col svg, .art-col img { width: 100%; max-height: 340px; }
.bg-ink .art-col { background: var(--ink-soft); border-color: #2c2c34; }

.feature-list { list-style: none; margin-top: 1.5rem; }
.feature-list li { padding: .55rem 0 .55rem 2rem; position: relative; color: var(--muted); }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: .95rem;
  width: 12px; height: 12px; border: 2px solid var(--accent); border-radius: 3px;
}
.bg-ink .feature-list li { color: #c2c1bb; }

/* spec table */
.spec { width: 100%; border-collapse: collapse; margin-top: 1.4rem; }
.spec td { padding: .7rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec td:first-child { color: var(--muted); width: 45%; }
.spec td:last-child { font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--accent), var(--accent-dk)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #ffe5e6; max-width: 50ch; margin: 1rem auto 2rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.info-row { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-row .ic { color: var(--accent); flex: 0 0 24px; }
.info-row .ic svg { width: 24px; height: 24px; display: block; }
.info-row b { display: block; }
.info-row span { color: var(--muted); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9b8b3; padding: 60px 0 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer a { display: block; padding: .25rem 0; font-size: .95rem; color: #b9b8b3; }
.site-footer a:hover { color: var(--accent); }
.foot-brand p { margin-top: 1rem; font-size: .92rem; max-width: 34ch; }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid #2a2a30; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #7d7d84; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { background: var(--ink); color: var(--paper); padding: 70px 0 64px; }
.page-hero h1 { color: var(--paper); font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero p { color: #c2c1bb; margin-top: 1rem; max-width: 62ch; }
.crumb { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; }

/* ---------- utility ---------- */
.center { text-align: center; }
.mt-s { margin-top: 1.5rem; }
.pill { display:inline-block; padding:.3rem .8rem; border:1px solid var(--line); border-radius:999px; font-size:.78rem; font-weight:600; color:var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero .wrap, .split, .contact-grid, .foot-grid { grid-template-columns: 1fr; }
  .split.rev .art-col { order: 0; }
  .hero .wrap { padding-top: 24px; padding-bottom: 56px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 10px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}
