/* ============================================================
   mTech Idaho — landing page
   Palette: midnight navy #0E1219 · brigade orange #EE7623
            ledger gold #C9A24B · off-white #F8F9FA
   ============================================================ */

:root {
  --navy: #0E1219;
  --navy-2: #161C26;
  --navy-3: #1E2634;
  --orange: #EE7623;
  --orange-hover: #FF8A3D;
  --gold: #C9A24B;
  --bg-light: #F8F9FA;
  --bg-alt: #EFF1F4;
  --ink: #171B21;
  --ink-soft: #4A5261;
  --paper-ink: #E9ECF1;
  --paper-soft: #99A3B3;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 18, 25, .12);
  --shadow-dark: 0 12px 34px rgba(0, 0, 0, .45);
  --font: "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--orange); color: #fff; padding: 10px 18px;
  z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- header / nav ---------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14, 18, 25, .92);
  backdrop-filter: blur(10px);
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .35); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { color: var(--paper-ink); font-size: 1.25rem; letter-spacing: -.01em; }
.brand-text strong em { color: var(--orange); font-style: normal; }
.brand-text small { color: var(--paper-soft); font-size: .58rem; letter-spacing: .38em; font-weight: 600; }

.nav-links {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: var(--paper-ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--orange); }
.nav-links .nav-cta {
  background: var(--orange); color: #fff; margin-left: 6px;
}
.nav-links .nav-cta:hover { background: var(--orange-hover); color: #fff; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; border-radius: 2px;
  background: var(--paper-ink); transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------------- hero ---------------- */

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 55%, #131A26 100%);
  color: var(--paper-ink);
  padding: clamp(70px, 12vw, 130px) 0 clamp(60px, 10vw, 110px);
}
.hero-pattern {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.hero-inner { position: relative; }

.hero-badge {
  color: var(--gold); font-size: .78rem; font-weight: 700;
  letter-spacing: .22em; margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px;
}
.hero-sub {
  max-width: 560px; font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--paper-soft); margin: 0 0 32px;
}
.hero-trust {
  margin: 26px 0 0; color: var(--paper-soft);
  font-size: .85rem; letter-spacing: .05em; font-weight: 600;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block; padding: 13px 28px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 6px 20px rgba(238, 118, 35, .35);
}
.btn-primary:hover { background: var(--orange-hover); transform: translateY(-2px); }
.btn-lg { padding: 16px 38px; font-size: 1.1rem; }

/* ---------------- sections ---------------- */

.section { padding: clamp(60px, 9vw, 100px) 0; }
.section-light { background: var(--bg-light); }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--navy); color: var(--paper-ink);
}
.section-dark h2 { color: #fff; }
.section-sub { color: var(--paper-soft); margin-top: -6px; margin-bottom: 36px; }

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); }
.section-dark .lead { color: var(--paper-soft); }

/* ---------------- stats ---------------- */

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 44px;
}
.stat {
  background: #fff; border-radius: var(--radius); padding: 26px 20px;
  text-align: center; box-shadow: var(--shadow);
  border-top: 3px solid var(--orange);
}
.stat-num {
  display: block; font-size: 2.2rem; font-weight: 800;
  color: var(--navy); letter-spacing: -.02em;
}
.stat-label { color: var(--ink-soft); font-size: .9rem; font-weight: 600; }

/* ---------------- cards / services ---------------- */

.cards { display: grid; gap: 24px; }
.services-grid { grid-template-columns: repeat(4, 1fr); margin-top: 36px; }

.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .22s, box-shadow .22s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(14, 18, 25, .16); }

.service-card { padding: 28px 24px; }
.service-icon {
  width: 42px; height: 42px; color: var(--orange); margin-bottom: 16px;
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------------- portfolio ---------------- */

.work-grid { grid-template-columns: repeat(2, 1fr); }

.work-card {
  background: var(--navy-2); overflow: hidden;
  box-shadow: var(--shadow-dark);
  display: flex; flex-direction: column;
}
.work-card:hover { box-shadow: 0 20px 48px rgba(0, 0, 0, .55); }

.shot {
  position: relative; display: block; width: 100%;
  padding: 0; margin: 0; border: 0; cursor: pointer;
  background: var(--navy-3);
  aspect-ratio: 16 / 9; overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-static { cursor: default; }

.shot-hint {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(14, 18, 25, .85); color: var(--paper-ink);
  font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.shot:hover .shot-hint, .shot:focus-visible .shot-hint { opacity: 1; transform: none; }

.logo-feature {
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.logo-feature img { width: min(72%, 380px); height: auto; object-fit: contain; }

.circuit-feature {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--navy-3), var(--navy));
}
.circuit-feature svg { width: 100%; height: 100%; }

.work-body { padding: 22px 24px 26px; }
.work-title {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.work-title h3 { margin: 0; color: #fff; font-size: 1.25rem; }

.logo-chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 12px; background: #fff;
  padding: 6px; overflow: hidden;
}
.logo-chip img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logo-chip-dark { background: var(--navy-3); }

.badge {
  background: rgba(238, 118, 35, .16); color: var(--orange);
  border: 1px solid rgba(238, 118, 35, .4);
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.badge-muted {
  background: rgba(153, 163, 179, .12); color: var(--paper-soft);
  border-color: rgba(153, 163, 179, .35);
}

.work-card p { margin: 0; color: var(--paper-soft); font-size: .95rem; }

/* ---------------- capabilities strip ---------------- */

.capabilities {
  background: var(--navy-2); border-top: 1px solid var(--navy-3);
  padding: 26px 0;
}
.cap-list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 0; list-style: none; margin: 0; padding: 0;
}
.cap-list li {
  color: var(--paper-soft); font-weight: 600; font-size: .92rem;
  letter-spacing: .04em; white-space: nowrap;
}
.cap-list li + li::before {
  content: "·"; color: var(--orange); margin: 0 18px; font-weight: 800;
}

/* ---------------- contact ---------------- */

#contact .lead { margin-bottom: 34px; }
.contact-loc {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink-soft); font-weight: 600; margin-top: 30px;
}
.loc-icon { width: 20px; height: 20px; color: var(--orange); }
.contact-fallback { font-size: 1.05rem; color: var(--ink-soft); }

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--navy); color: var(--paper-soft);
  padding: 44px 0 40px; border-top: 1px solid var(--navy-3);
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center;
}
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px;
  list-style: none; margin: 0; padding: 0;
}
.footer-links a {
  color: var(--paper-soft); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.footer-links a:hover { color: var(--orange); }
.footer-note { margin: 0; font-size: .85rem; }

/* ---------------- lightbox ---------------- */

.lightbox { position: fixed; inset: 0; z-index: 300; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute; inset: 0; background: rgba(8, 10, 14, .88);
  cursor: zoom-out;
}
.lightbox-figure {
  position: absolute; inset: 0; margin: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 72px; pointer-events: none;
}
.lightbox-figure img {
  max-width: 100%; max-height: calc(100% - 48px);
  width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  pointer-events: auto;
}
.lightbox-figure figcaption {
  color: var(--paper-soft); font-size: .9rem; margin-top: 14px;
}
.lb-btn {
  position: absolute; pointer-events: auto;
  background: rgba(30, 38, 52, .85); color: var(--paper-ink);
  border: 1px solid rgba(153, 163, 179, .25); border-radius: 50%;
  width: 46px; height: 46px; font-size: 1.5rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lb-btn:hover { background: var(--orange); border-color: var(--orange); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------------- scroll reveal ---------------- */

.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .shot-hint { transition: none; }
}

/* ---------------- focus states ---------------- */

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px;
}

/* ---------------- responsive ---------------- */

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .work-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--navy); padding: 10px 18px 18px;
    box-shadow: 0 18px 30px rgba(0, 0, 0, .4);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; }
  .nav-links .nav-cta { margin-left: 0; text-align: center; }
  .cap-list { flex-direction: column; align-items: center; gap: 10px; }
  .cap-list li + li::before { content: none; }
  .lightbox-figure { padding: 64px 12px 32px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
}

@media (max-width: 540px) {
  .services-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
