/* Circuit Express, Inc. — site styles
   Palette from the CE logo: navy C, teal swoosh, red E. Type: Archivo (variable width). */
:root {
  --navy: #0E1A4F;        /* logo C, softened for large areas */
  --navy-2: #15235F;
  --navy-3: #26397F;      /* copper under mask */
  --teal: #3FC1B6;        /* logo swoosh, brightened for dark backgrounds */
  --red: #B3261E;         /* logo E: action buttons */
  --red-2: #8E1D17;
  --teal-ink: #00706F;    /* teal dark enough for text on white */
  --paper: #F5F6FA;
  --white: #FFFFFF;
  --ink: #141A33;
  --muted: #5A6178;
  --line: #DADDE8;
  --silk: #F1F3F8;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r: 6px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
  font-variation-settings: "wdth" 100;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-3); }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; border-radius: 2px; }
.topbar :focus-visible, .hero :focus-visible, .page-hero :focus-visible, .section--board :focus-visible,
.cta :focus-visible, .site-footer :focus-visible { outline-color: var(--teal); }

h1, h2, h3 {
  margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.01em;
  font-weight: 700; font-stretch: 118%; font-variation-settings: "wdth" 118;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 5.2vw, 3.9rem); font-weight: 760; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; font-stretch: 108%; font-variation-settings: "wdth" 108; }
p { margin: 0 0 1em; }
p, li { max-width: 68ch; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; background: var(--teal); color: var(--ink); padding: .6em 1em; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em; border-radius: var(--r);
  font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-2); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--navy); background: transparent; }
.btn--ghost:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.link { font-weight: 650; color: var(--navy); }

/* Top bar & header */
.topbar { background: var(--navy); color: var(--silk); font-size: .875rem; }
.topbar__in { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.topbar p { margin: 0; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.topbar a { color: var(--silk); text-decoration: none; }
.topbar a:hover { color: var(--teal); }
@media (max-width: 720px) { .topbar__cert { display: none !important; } .topbar__in { justify-content: center; } }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy); }
.brand__name { font-weight: 760; font-size: 1.2rem; font-variation-settings: "wdth" 120; letter-spacing: -.01em; }
.brand__inc { font-weight: 500; }
.brand--light { color: var(--white); }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav ul { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 550; padding-block: .4rem; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover { color: var(--navy); border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--teal); }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .4rem .9rem;
    font: inherit; font-weight: 600; background: none; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--white);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem;
    border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(14, 26, 79, .12);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a:not(.btn) { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--teal); padding-left: .8rem; }
  .site-nav__cta { margin-top: 1rem; }
}

/* Hero */
.hero { background: var(--navy); color: var(--silk); overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(3rem, 7vw, 6rem); }
.hero__kicker { color: var(--teal); font-weight: 600; margin-bottom: 1.1rem; }
.hero__title { color: var(--white); }
.hero__lede { font-size: 1.2rem; color: #C9D0E6; max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero .btn--ghost, .cta .btn--ghost, .section--board .btn--ghost { color: var(--silk); }
.hero .btn--ghost:hover, .cta .btn--ghost:hover, .section--board .btn--ghost:hover { background: var(--silk); color: var(--navy); border-color: var(--silk); }
.hero__board { margin: 0; }
.hero__board svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .35)); }

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__board { max-width: 460px; width: 100%; margin-inline: auto; }
}

/* PCB illustration */
.b-board { fill: var(--navy-2); stroke: #2A3B85; stroke-width: 2; }
.b-holes circle { fill: var(--navy); stroke: var(--teal); stroke-width: 5; }
.b-copper path { fill: none; stroke: var(--navy-3); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.b-traces path {
  fill: none; stroke: var(--teal); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: route 1.1s cubic-bezier(.6, 0, .3, 1) forwards; animation-delay: var(--d, 0s);
}
.b-pads > * { fill: var(--teal); }
.b-pads .b-header { fill: none; stroke: var(--silk); stroke-width: 1.5; opacity: .6; }
.b-chip { fill: #080F2E; stroke: #2A3566; }
.b-pins path { fill: #C9CDD8; }
.b-silk { fill: var(--silk); opacity: .8; font: 600 16px var(--font); letter-spacing: .08em; }
.b-silk .sm { font-size: 13px; }
@keyframes route { to { stroke-dashoffset: 0; } }

/* Credentials */
.creds { background: var(--white); border-bottom: 1px solid var(--line); }
.creds__list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.creds__list li { padding: 1.4rem 1rem; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.creds__list li:first-child { border-left: 0; padding-left: 0; }
.creds__list strong { font-variation-settings: "wdth" 115; font-size: 1.05rem; color: var(--navy); }
.creds__list span { font-size: .875rem; color: var(--muted); }
@media (max-width: 860px) {
  .creds__list { grid-template-columns: repeat(2, 1fr); }
  .creds__list li { border-left: 0; padding: 1rem 0; border-top: 1px solid var(--line); }
  .creds__list li:nth-child(-n+2) { border-top: 0; }
}

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tint { background: var(--white); border-block: 1px solid var(--line); }
.section--board { background: var(--navy); color: var(--silk); }
.section--board h2 { color: var(--white); }
.section--board p { color: #C9D0E6; }
.section__head { max-width: 720px; margin-bottom: 2.75rem; }
.section__head p { color: var(--muted); font-size: 1.125rem; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.service { border-top: 3px solid var(--navy); padding-top: 1.5rem; }
.service__icon { width: 48px; height: 48px; margin-bottom: 1rem; fill: none; stroke: var(--teal-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.service p { color: var(--muted); }
@media (max-width: 860px) { .services { grid-template-columns: 1fr; } }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split__text { position: sticky; top: 110px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split__text { position: static; } }

/* Spec sheet */
.spec { margin: 0; border-top: 1px solid rgba(241, 243, 248, .25); }
.spec > div { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid rgba(241, 243, 248, .25); align-items: baseline; }
.spec dt { color: #AEB7D3; }
.spec dd { margin: 0; color: var(--white); font-weight: 700; font-size: 1.35rem; font-variation-settings: "wdth" 120; }
.spec small { display: block; font-size: .85rem; font-weight: 400; color: var(--teal); font-variation-settings: "wdth" 100; }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.checklist li { position: relative; padding: 1.1rem 0 1.1rem 3.25rem; border-bottom: 1px solid var(--line); max-width: none; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  border: 2px solid var(--teal); background: radial-gradient(circle, var(--navy) 0 5px, transparent 6px);
}
.checklist strong { display: block; font-size: 1.1rem; }
.checklist span { color: var(--muted); }

/* Industries */
.industries { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.industries li { padding-left: 1.1rem; border-left: 3px solid var(--teal); }
.industries p { color: var(--muted); font-size: 1rem; margin: 0; }
@media (max-width: 960px) { .industries { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .industries { grid-template-columns: 1fr; } }

/* About teaser */
.about-teaser { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 6vw, 5rem); }
.about-teaser__body p { color: var(--muted); font-size: 1.1rem; }
@media (max-width: 860px) { .about-teaser { grid-template-columns: 1fr; } }

/* CTA band */
.cta { background: var(--navy); color: var(--silk); padding-block: clamp(3rem, 6vw, 4.5rem);}
.cta__in { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cta h2 { color: var(--white); margin-bottom: .3em; }
.cta p { margin: 0; color: #C9D0E6; }
.cta__actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* Inner pages */
.page-hero { background: var(--navy); color: var(--silk); padding-block: clamp(2.75rem, 6vw, 4.5rem); border-bottom: 4px solid var(--teal); }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .35em; }
.page-hero p { color: #C9D0E6; font-size: 1.15rem; margin: 0; max-width: 60ch; }
.crumbs { font-size: .9rem; margin-bottom: 1rem; }
.crumbs ol { list-style: none; display: flex; gap: .5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: #8790B3; }
.crumbs a { color: var(--teal); }
.crumbs [aria-current] { color: #AEB7D3; }

.prose { max-width: 72ch; }
.prose p, .prose li { font-size: 1.1rem; }
.prose h2 { margin-top: 2em; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.prose blockquote { margin: 2rem 0; padding: .5rem 0 .5rem 1.5rem; border-left: 4px solid var(--teal); font-size: 1.3rem; font-weight: 600; color: var(--navy); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--teal-ink); }

.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.aside { position: sticky; top: 110px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--r); padding: 1.5rem; }
.aside h2 { font-size: 1.2rem; }
.aside p { color: var(--muted); font-size: 1rem; }
.aside .btn { width: 100%; }
.aside ul { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.aside li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
@media (max-width: 900px) { .page-grid { grid-template-columns: 1fr; } .aside { position: static; } }

/* Capability sheet */
.capsheet { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 3rem; align-items: start; }
.capsheet__toc { position: sticky; top: 110px; font-size: .95rem; }
.capsheet__toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.capsheet__toc a { display: block; padding: .35rem 0 .35rem 1rem; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.capsheet__toc a:hover { color: var(--navy); border-left-color: var(--teal); }
.capgroup { padding: 1.75rem 0; border-top: 1px solid var(--line); scroll-margin-top: 100px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; }
.capgroup:first-child { border-top: 0; padding-top: 0; }
.capgroup h2 { font-size: 1.25rem; margin: 0; color: var(--navy); }
.capgroup ul { margin: 0; padding: 0; list-style: none; }
.capgroup li { padding: .4rem 0 .4rem 1.1rem; position: relative; max-width: none; }
.capgroup li::before { content: ""; position: absolute; left: 0; top: .95em; width: 6px; height: 6px; background: var(--teal); border-radius: 50%; }
.lead-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; }
.lead-times div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.lead-times dt { color: var(--muted); font-size: .95rem; }
.lead-times dd { margin: 0; font-weight: 700; font-size: 1.4rem; color: var(--navy); font-variation-settings: "wdth" 120; }
@media (max-width: 960px) { .capsheet { grid-template-columns: 1fr; } .capsheet__toc { display: none; } }
@media (max-width: 700px) { .capgroup { grid-template-columns: 1fr; gap: .75rem; } .lead-times { grid-template-columns: 1fr; } }

.lede-muted { color: var(--muted); font-size: 1.1rem; margin-bottom: 2rem; }
.aside__more { margin: 1rem 0 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Process steps (fabrication) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 2rem 4rem; max-width: 68ch; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -.1rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--navy); color: var(--teal); font-weight: 700;
}
.steps li::after { content: ""; position: absolute; left: calc(1.25rem - 1px); top: 2.6rem; bottom: .2rem; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { margin-bottom: .25em; }
.steps p { color: var(--muted); margin: 0; }

/* Forms */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .875rem; font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; padding: .75rem .85rem; min-height: 48px;
  border: 1px solid #B8BDD0; border-radius: var(--r); background: var(--white); color: var(--ink);
}
.field select {
  -webkit-appearance: none; appearance: none; width: 100%; line-height: 1.4; cursor: pointer;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%230E1A4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px;
}
.field select:invalid { color: var(--muted); }
.field select option { color: var(--ink); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(63, 193, 182, .55); outline-offset: 0; border-color: var(--navy); }
.field input[type="file"] { padding: .55rem; }
.form__note { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; margin: 0; }
.form .btn { justify-self: start; }
.form-status { grid-column: 1 / -1; padding: .9rem 1rem; border-radius: var(--r); margin: 0; }
.form-status[hidden] { display: none; }
.form-status.is-ok { background: #E2F4F2; color: #0B5E58; }
.form-status.is-err { background: #FBE9E7; color: #8A1F11; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

.contact-cards { display: grid; gap: 1.5rem; }
.contact-cards h2 { font-size: 1.05rem; margin-bottom: .25rem; }
.contact-cards p { margin: 0; }
.map { border: 0; width: 100%; height: 260px; border-radius: var(--r); margin-top: 1rem; }

/* Footer */
.site-footer { background: #091340; color: #AEB7D3; padding-top: 3.5rem; font-size: .975rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer__about p { margin-top: 1rem; max-width: 36ch; }
.site-footer__h { font-size: 1rem; color: var(--white); margin-bottom: .9rem; font-variation-settings: "wdth" 110; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .25rem 0; }
.site-footer a { color: #DDE2F2; text-decoration: none; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.site-footer address { font-style: normal; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 1.25rem; font-size: .875rem; }
.site-footer__legal p { margin: 0; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .b-traces path { animation: none; stroke-dashoffset: 0; }
  * { transition: none !important; }
}
@media print {
  .topbar, .site-header, .cta, .site-footer, .hero__board { display: none; }
  body { background: #fff; }
}

.brand img { height: 60px; width: auto; }
.site-header__in { min-height: 80px; }
@media (max-width: 420px) { .site-header .brand img { height: 48px; } }

/* Web3Forms spam trap: hidden from people, bots fill it in */
.botcheck { display: none !important; }
