@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap");

html { scroll-padding-top: 72px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, #161311 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid #2d2825;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-sizing: border-box;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f0ebe3 !important;
}
.site-logo img {
  height: 28px;
  width: auto;
  display: block;
  filter: none;
}
.site-logo span {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f0ebe3;
}

body.menu-open { overflow: hidden; }
.menu-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #f0ebe3;
  transform-origin: center;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 1px solid #c07a45; outline-offset: 4px; }

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  background: color-mix(in srgb, #161311 94%, transparent);
  backdrop-filter: saturate(1.2) blur(18px);
  -webkit-backdrop-filter: saturate(1.2) blur(18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.site-menu[hidden] { display: none !important; }
.site-menu-inner {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 88px 32px 48px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.site-menu a {
  display: block;
  font-size: clamp(28px, 5.4vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-decoration: none;
  color: #f0ebe3 !important;
  padding: 12px 0;
  text-transform: none;
}
.site-menu a:hover,
.site-menu a:focus-visible { color: #c07a45 !important; }
.site-menu a:focus-visible { outline: none; }

.site-footer {
  background: #1a1614 !important;
  color: #f0ebe3;
  padding: 28px 0 16px !important;
  border-top: 0 !important;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.site-footer .footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px 32px;
  align-items: start;
  box-sizing: border-box;
}
.site-footer .footer-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.site-footer a.footer-home {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit !important;
  text-decoration: none !important;
}
.site-footer a.footer-home:hover,
.site-footer a.footer-home:focus {
  color: inherit !important;
  text-decoration: none !important;
}
.site-footer a.footer-home:focus-visible {
  outline: 1px solid color-mix(in srgb, #f0ebe3 45%, transparent);
  outline-offset: 4px;
}
.site-footer .footer-logo {
  height: 22px;
  width: auto;
  display: block;
}
.site-footer .footer-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.site-footer .footer-blurb {
  font-size: 13px;
  line-height: 1.45;
  color: color-mix(in srgb, #f0ebe3 60%, transparent);
  margin: 0;
  max-width: 42ch;
}
.site-footer .footer-k {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, #f0ebe3 45%, transparent);
  margin-bottom: 8px;
}
.site-footer .footer-links-col {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 20px;
  text-align: left;
}
.site-footer .footer-links-col a {
  display: inline;
  font-size: 13.5px;
  text-decoration: none;
  color: color-mix(in srgb, #f0ebe3 80%, transparent) !important;
  margin: 0;
}
.site-footer .footer-links-col a:hover { color: #f0ebe3 !important; }
.site-footer .footer-copy {
  max-width: 1240px;
  margin: 16px auto 0;
  padding: 12px 32px 0;
  border-top: 1px solid color-mix(in srgb, #f0ebe3 14%, transparent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: color-mix(in srgb, #f0ebe3 45%, transparent);
  text-align: left;
  box-sizing: border-box;
}
.site-footer .footer-business-reg,
.site-footer .footer-copy a,
.site-footer .footer-copy a:visited,
.site-footer .footer-copy a[x-apple-data-detectors] {
  color: color-mix(in srgb, #f0ebe3 45%, transparent) !important;
  -webkit-text-fill-color: currentColor !important;
  text-decoration: none !important;
}
.site-footer .footer-business-reg { white-space: nowrap; }

@media (max-width: 860px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-header-inner,
  .site-footer .footer-grid,
  .site-footer .footer-copy { padding-left: 18px; padding-right: 18px; }
  .site-menu-inner { padding: 80px 18px 40px; }
  .site-menu a { padding: 10px 0; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}

/* Image lightbox — click opens the largest file we have, a second click zooms
   it to 1:1 so plot axes and board silk-screen stay readable. */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 14, 0.985);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  cursor: zoom-out;
}
.lightbox.open { display: block; }
.lightbox-stage {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-in;
}
.lightbox.zoomed .lightbox-stage { display: block; }
.lightbox.zoomed img {
  max-width: none;
  max-height: none;
  border-radius: 0;
  cursor: grab;
  touch-action: pan-x pan-y pinch-zoom;
}
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  color: #888;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
}
.lightbox-hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1rem;
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(240, 235, 227, 0.55);
  pointer-events: none;
}
