/* ==========================================================================
   Altium Developer — "The Layout Editor" design system
   A CLI Systems property. Layered on top of Bootstrap (grid + navbar collapse).
   Palette + motifs derived from the Altium Designer PCB layout view:
     near-black canvas · ENIG-gold accent · red/blue two-layer routing traces.
   ========================================================================== */

:root {
  /* Canvas / surfaces */
  --ink:      #0A0C11;   /* layout-editor black */
  --ink-2:    #0D1119;
  --panel:    #121826;
  --panel-2:  #161E2E;
  --edge:     #232D3E;
  --edge-2:   #313D50;

  /* Ink on dark */
  --text:     #EBEEF4;
  --muted:    #97A1B3;
  --muted-2:  #67728A;

  /* Accents */
  --gold:     #EAB44E;   /* ENIG gold — primary accent + CTA */
  --gold-hi:  #F6C86B;
  --gold-deep:#C08A25;
  --red:      #E5484D;   /* top copper */
  --blue:     #4C82F7;   /* bottom copper */
  --green:    #21B573;   /* soldermask / success */

  /* Type */
  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --f-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Rhythm */
  --maxw: 1180px;
  --radius: 4px;        /* boards have sharp-ish corners */
  --radius-lg: 8px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
body#page-top {
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Faint layout snap-grid, like the editor background */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 26px 26px;
  background-attachment: fixed;
}

::selection { background: var(--gold); color: #10131a; }

h1,h2,h3,h4,h5 { font-family: var(--f-display); color: var(--text); margin: 0; }

a { color: var(--gold); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold-hi); }

img { max-width: 100%; }

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

/* Section scaffolding */
.section { position: relative; padding: 120px 0; }
.section--tight { padding: 88px 0; }

/* Eyebrow: styled like a schematic net/designator label */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(234,180,78,.18);
  flex: none;
}

/* Section headings */
.h-kicker { /* small caps section title above big head */
}
.section-title {
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
.section-lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 58ch;
  margin-top: 20px;
}

.accent { color: var(--gold); }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
#mainNav {
  background: transparent;
  padding: 20px 0;
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
#mainNav.navbar-shrink {
  background: rgba(10,12,17,.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  border-bottom: 1px solid var(--edge);
}
#mainNav .container { max-width: var(--maxw); }

#mainNav .navbar-brand {
  font-family: var(--f-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
#mainNav .navbar-brand::before {
  content: "";
  width: 22px; height: 22px;
  border: 2px solid var(--gold);
  border-radius: 3px;
  background:
    linear-gradient(45deg, transparent 45%, var(--gold) 45%, var(--gold) 55%, transparent 55%);
  flex: none;
}
#mainNav .navbar-brand .brand-dim { color: var(--muted); }

#mainNav .nav-link {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted) !important;
  padding: 8px 16px !important;
  transition: color .18s ease;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active { color: var(--text) !important; }

#mainNav .nav-cta {
  color: var(--gold) !important;
  border: 1px solid var(--edge-2);
  border-radius: var(--radius);
  margin-left: 10px;
}
#mainNav .nav-cta:hover {
  border-color: var(--gold);
  background: rgba(234,180,78,.08);
}

.navbar-toggler {
  color: var(--text);
  border: 1px solid var(--edge-2);
  font-family: var(--f-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 6px 12px;
}
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(234,180,78,.25); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--edge);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(.9) brightness(.55);
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,12,17,.72) 0%, rgba(10,12,17,.55) 40%, rgba(10,12,17,.92) 100%),
    radial-gradient(1200px 600px at 15% 30%, rgba(76,130,247,.10), transparent 60%),
    radial-gradient(1000px 500px at 85% 70%, rgba(229,72,77,.08), transparent 60%);
}
.hero__grid {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 40%, transparent 90%);
}
.hero .wrap { position: relative; z-index: 2; }

.hero__eyebrow {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}
.hero__eyebrow .sep { color: var(--muted-2); margin: 0 10px; }

.hero h1 {
  font-weight: 900;
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 15ch;
  text-transform: none;
}
.hero h1 .layer-red  { color: var(--red); }
.hero h1 .layer-blue { color: var(--blue); }

.hero__sub {
  font-family: var(--f-body);
  font-weight: 400;
  color: var(--muted);
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  max-width: 52ch;
  margin: 28px 0 40px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.hero__tags {
  margin-top: 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
}
.hero__tags span {
  padding: 6px 12px;
  border: 1px solid var(--edge-2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(10,12,17,.4);
  backdrop-filter: blur(4px);
}

/* Scroll hint */
.hero__scroll {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero__scroll .line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollpulse 2.2s ease-in-out infinite;
}
@keyframes scrollpulse {
  0%,100% { opacity: .35; transform: scaleY(.6); transform-origin: top; }
  50%     { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-ad {
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.btn-ad--primary {
  background: var(--gold);
  color: #14100a;
  box-shadow: 0 6px 24px rgba(234,180,78,.22);
}
.btn-ad--primary:hover {
  background: var(--gold-hi);
  color: #14100a;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(234,180,78,.32);
}
.btn-ad--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--edge-2);
}
.btn-ad--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.btn-ad .arw { transition: transform .18s ease; }
.btn-ad:hover .arw { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Trace divider (signature) — a routed copper trace with 45° bends + via
   -------------------------------------------------------------------------- */
.trace-rule { display: block; width: 100%; height: 40px; overflow: visible; }
.trace-rule .t-red  { stroke: var(--red);  }
.trace-rule .t-blue { stroke: var(--blue); }
.trace-rule .t-gold { stroke: var(--gold); }
.trace-rule path { fill: none; stroke-width: 2; stroke-linecap: square; }
.trace-rule .via { fill: var(--ink); stroke-width: 3; }

/* --------------------------------------------------------------------------
   About / two-up intro
   -------------------------------------------------------------------------- */
.about {
  background:
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.about__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.about__body p { color: var(--muted); margin: 0 0 18px; }
.about__body p strong { color: var(--text); font-weight: 600; }

.about__figure {
  position: relative;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1a1a1c;
}
.about__figure img { display: block; width: 100%; }
.about__figure figcaption {
  position: absolute;
  left: 14px; bottom: 14px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--text);
  background: rgba(10,12,17,.78);
  border: 1px solid var(--edge-2);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

/* Mini spec chips under intro */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 44px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--edge);
}
.spec-strip .cell {
  background: var(--panel);
  padding: 24px 22px;
}
.spec-strip .num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--gold);
  line-height: 1;
}
.spec-strip .lbl {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--muted);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Capabilities grid
   -------------------------------------------------------------------------- */
.cap { background: var(--ink); }
.cap__head { max-width: var(--maxw); margin: 0 auto 56px; }
.cap__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cap-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 30px 28px 32px;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.cap-card::before { /* top-copper accent line that lights on hover */
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--edge-2);
  transition: background .25s ease;
}
.cap-card:hover {
  border-color: var(--edge-2);
  transform: translateY(-4px);
  background: var(--panel-2);
}
.cap-card:hover::before { background: var(--gold); }
.cap-card__ref {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted-2);
  margin-bottom: 18px;
}
.cap-card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--edge-2);
  border-radius: var(--radius);
  color: var(--gold);
  margin-bottom: 20px;
}
.cap-card__icon i { font-size: 20px; }
.cap-card h3 {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.cap-card p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* --------------------------------------------------------------------------
   Featured work
   -------------------------------------------------------------------------- */
.work { background: linear-gradient(180deg, var(--ink-2), var(--ink)); }
.work__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 24px;
  background: var(--panel);
}
.work__row:first-of-type { margin-top: 0; }
.work__media { position: relative; min-height: 340px; background: #111; }
.work__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work__media .tag {
  position: absolute; left: 16px; top: 16px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--text);
  background: rgba(10,12,17,.8);
  border: 1px solid var(--edge-2);
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.work__text { padding: 44px 44px; display: flex; flex-direction: column; justify-content: center; }
.work__text .ref {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 16px;
}
.work__text h3 {
  font-weight: 800;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 16px;
}
.work__text p { color: var(--muted); margin: 0 0 14px; font-size: 16px; }
.work__meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
}
.work__meta span {
  color: var(--muted);
  border: 1px solid var(--edge);
  border-radius: 999px;
  padding: 5px 11px;
}
.work__row--rev .work__media { order: 2; }

/* --------------------------------------------------------------------------
   Process (numbered — a real engagement sequence)
   -------------------------------------------------------------------------- */
.process { background: var(--ink); }
.process__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 56px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 34px 26px 34px 0;
  border-top: 2px solid var(--edge);
}
.step .no {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 18px;
}
.step h4 { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }
.step .via-dot {
  position: absolute;
  left: 0; top: -6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 5px var(--edge-2);
}

/* --------------------------------------------------------------------------
   Contact / signup
   -------------------------------------------------------------------------- */
.contact {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(234,180,78,.08), transparent 60%),
    var(--ink-2);
  border-top: 1px solid var(--edge);
}
.contact__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.contact__head .eyebrow { justify-content: center; display: inline-flex; }
.contact__head .section-title { max-width: none; margin: 0 auto; }
.contact__head .section-lede { margin-left: auto; margin-right: auto; text-align: center; }

/* Form (overrides css/form.css; preserves the same fields/markup) */
.form-style-6 {
  max-width: 640px;
  margin: 0 auto;
  padding: 34px 34px 30px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
}
.form-style-6 input[type="text"],
.form-style-6 input[type="email"],
.form-style-6 textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--edge-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  margin-bottom: 16px;
  transition: border-color .18s ease, box-shadow .18s ease;
  box-sizing: border-box;
}
.form-style-6 textarea { resize: vertical; min-height: 150px; }
.form-style-6 ::placeholder { color: var(--muted-2); }
.form-style-6 .captcha-q {
  display: block;
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: .02em;
  color: var(--muted);
  margin: 4px 0 10px;
}
.form-style-6 .captcha-q strong { color: var(--gold); font-weight: 600; }
.form-style-6 .captcha-img {
  display: block;
  border: 1px solid var(--edge-2);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
/* Cloudflare Turnstile widget spacing */
.form-style-6 .cf-turnstile { margin-bottom: 16px; }
.form-style-6 input:focus,
.form-style-6 textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(234,180,78,.18);
}
.form-style-6 img { /* captcha image */
  display: block;
  border: 1px solid var(--edge-2) !important;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.form-style-6 input[type="submit"] {
  width: 100%;
  padding: 15px;
  background: var(--gold);
  color: #14100a;
  border: none;
  border-radius: var(--radius);
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.form-style-6 input[type="submit"]:hover {
  background: var(--gold-hi);
  transform: translateY(-2px);
}

/* Alerts */
.form-style-6 .alert,
.contact .alert {
  border-radius: var(--radius);
  border: 1px solid var(--edge-2);
  font-family: var(--f-mono);
  font-size: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.contact .alert-danger  { background: rgba(229,72,77,.12);  border-color: rgba(229,72,77,.4);  color: #ffb4b6; }
.contact .alert-success { background: rgba(33,181,115,.12); border-color: rgba(33,181,115,.4); color: #86e8bd; }

/* --------------------------------------------------------------------------
   Contact info + footer
   -------------------------------------------------------------------------- */
.info { background: var(--ink); border-top: 1px solid var(--edge); }
.info__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.info-card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 34px;
  text-align: center;
}
.info-card i { color: var(--gold); font-size: 26px; margin-bottom: 14px; }
.info-card h4 {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.info-card .val { color: var(--text); font-size: 15px; line-height: 1.7; }
.info-card .val a { color: var(--gold); }
.info-card .val .dim { color: var(--muted); }

.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--edge);
  padding: 34px 0;
}
.site-footer .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--muted-2);
}
.site-footer .wrap a { color: var(--muted); }
.site-footer .wrap a:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  #mainNav.navbar-shrink,
  #mainNav { background: rgba(10,12,17,.92); backdrop-filter: blur(12px); }
  #mainNav .navbar-collapse {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
    background: var(--panel);
  }
  #mainNav .nav-cta { margin-left: 0; margin-top: 6px; display: inline-block; }

  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .cap__grid { grid-template-columns: repeat(2, 1fr); }
  .process__grid { grid-template-columns: repeat(2, 1fr); }
  .work__row, .work__row--rev { grid-template-columns: 1fr; }
  .work__row--rev .work__media { order: 0; }
  .work__media { min-height: 260px; }
}

@media (max-width: 640px) {
  body#page-top { font-size: 16px; }
  .section { padding: 84px 0; }
  .wrap { padding: 0 18px; }
  .cap__grid { grid-template-columns: 1fr; }
  .process__grid { grid-template-columns: 1fr; }
  .spec-strip { grid-template-columns: repeat(2, 1fr); }
  .work__text { padding: 30px 24px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn-ad { justify-content: center; }
  .hero__tags { gap: 8px; }
}

/* Motion off */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll .line { animation: none; }
  * { transition-duration: .001ms !important; }
}
