/* ============================================================
   NAS-T Fab & Finish LLC : shared styles
   Palette keyed to the logo: electric blue + red on graphite.
   Edit colors here and every page updates.
   ============================================================ */

:root {
  --bg:        #10141b;
  --bg-2:      #161c26;
  --bg-3:      #1e2531;
  --ink:       #eef3fa;
  --muted:     #93a1b5;
  --line:      #28313f;
  --blue:      #0060d9;
  --blue-hi:   #2b7ff0;
  --red:       #ff0000;
  --maxw:      1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .nav-links a, .logo-text {
  font-family: "Arial Narrow", "Helvetica Neue Condensed", "Roboto Condensed", sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

/* ---------- BANNER / NAV ---------- */
.banner {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.banner::after {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(to right, var(--red) 0%, var(--red) 18%, var(--blue) 18%, var(--blue) 100%);
}
.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}
.logo { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.logo img { height: 42px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 0;
  position: relative;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width 0.2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* Contact / Order stands out as a red pill button */
.nav-links a.nav-cta {
  color: #ffffff;
  background: var(--red);
  padding: 9px 18px;
  border-radius: 4px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-links a.nav-cta:hover { color: #ffffff; background: #d40000; transform: translateY(-1px); }
.nav-links a.nav-cta.active { color: #ffffff; }
/* no underline bar on the pill button */
.nav-links a.nav-cta::after { display: none; }

.nav-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; cursor: pointer; }

/* ---------- SECTION SCAFFOLD ---------- */
section { padding: 72px 0; border-bottom: 1px solid var(--line); }
.eyebrow {
  color: var(--blue-hi);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.1; }
h3 { font-size: 1.35rem; font-weight: 700; }
p.lead { color: var(--muted); font-size: 1.05rem; margin-top: 14px; max-width: 62ch; }

/* ---------- HERO ---------- */
.hero { text-align: center; padding: 76px 0 64px; }
.hero-logo { width: min(520px, 82%); height: auto; margin: 0 auto 30px; display: block; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.1; }
.hero .lead { margin-left: auto; margin-right: auto; }
.location {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
}
.location .bar {
  display: inline-block;
  width: 2px;
  height: 15px;
  background: var(--red);
}

/* ---------- HOME PHOTO DUO ---------- */
.photo-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.photo-duo img {
  width: 100%;
  aspect-ratio: 3 / 4;          /* portrait: taller than wide */
  height: auto;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); display: block;
}

/* ---------- FEATURE BLOCKS ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature.reverse .feature-img { order: 2; }
.feature-img img {
  width: 100%; border-radius: 4px; border: 1px solid var(--line);
  display: block; background: var(--bg-2);
}
.feature-body h2 { margin-bottom: 6px; }

/* ---------- GALLERY ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;          /* portrait, matches the photos: no crop */
  height: auto;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg-2); display: block;
}

/* ---------- CALLOUT ---------- */
.callout {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  padding: 36px 40px;
}
.callout ul { list-style: none; margin: 18px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.callout li {
  background: var(--bg-3); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; font-size: 0.9rem; color: var(--ink);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 26px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--blue-hi); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); background: var(--bg-3); }

/* ---------- SERVICE CARDS (home) ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.svc-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  border-radius: 4px;
  padding: 26px 24px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: background 0.15s ease, transform 0.15s ease;
}
.svc-card:hover { background: var(--bg-3); transform: translateY(-3px); }
.svc-card h3 { margin-bottom: 8px; }
.svc-card p { color: var(--muted); font-size: 0.95rem; }
.svc-card .go { color: var(--blue-hi); font-weight: 700; font-size: 0.9rem; display: inline-block; margin-top: 14px; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info a { color: var(--blue-hi); text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  padding: 11px 13px;
  font-size: 1rem;
  font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.field textarea { resize: vertical; min-height: 130px; }

/* form submit status message */
.form-status { margin-top: 14px; font-size: 0.95rem; line-height: 1.4; }
.form-status:empty { display: none; }
.form-status.ok {
  color: #d7f5df;
  background: rgba(28, 120, 60, 0.18);
  border: 1px solid rgba(56, 190, 100, 0.4);
  border-radius: 4px;
  padding: 12px 14px;
}
.form-status.err {
  color: #ffd7d7;
  background: rgba(160, 30, 30, 0.18);
  border: 1px solid rgba(255, 70, 70, 0.4);
  border-radius: 4px;
  padding: 12px 14px;
}

/* ---------- PAGE HERO ---------- */
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.page-hero p { color: var(--muted); margin-top: 12px; max-width: 60ch; }

/* ---------- FOOTER ---------- */
footer { padding: 34px 0; text-align: center; color: var(--muted); font-size: 0.85rem; }
.footer-logo { width: 220px; height: auto; margin: 0 auto 16px; display: block; opacity: 0.92; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .svc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute; top: 84px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .feature, .contact-grid, .photo-duo { grid-template-columns: 1fr; gap: 28px; }
  .feature.reverse .feature-img { order: 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  section { padding: 52px 0; }
}


/* ---------- IMAGE RENDERING ----------
   Keeps downscaled photos as sharp as the browser allows. */
.photo-duo img, .gallery img, .feature-img img {
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
}

/* ============================================================
   LIGHTBOX (click a photo to view full resolution)
   ============================================================ */
.zoomable { cursor: zoom-in; transition: opacity 0.15s ease; }
.zoomable:hover { opacity: 0.9; }
.zoomable:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8, 11, 16, 0.96);
}
.lb.open { display: block; }

/* Scroll container: when the image is shown at true size and is bigger
   than the viewport, you can pan by scrolling. */
.lb-stage {
  position: absolute;
  inset: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

/* Default: fit the whole image on screen (quick overview). */
.lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 64px);
  width: auto;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: zoom-in;
}

/* Zoomed: show at real pixels. No browser scaling = no moire. */
.lb.zoomed .lb-stage { align-items: flex-start; justify-content: flex-start; }
.lb.zoomed .lb-img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  cursor: zoom-out;
}

.lb-cap {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 12px 20px;
  background: linear-gradient(to top, rgba(8,11,16,0.9), rgba(8,11,16,0));
  pointer-events: none;
}
.lb-hint {
  position: fixed;
  left: 0; right: 0; top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lb-close:hover { background: var(--blue); border-color: var(--blue); }

@media (max-width: 760px) {
  .lb-stage { padding: 16px; }
  .lb-img { max-height: calc(100vh - 48px); }
}

/* ============================================================
   HIGH-QUALITY IMAGE SCALING (cross-browser)
   Pushes Edge/Chrome onto the better resampling path.
   ============================================================ */
.photo-duo img,
.gallery img,
.feature-img img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  -ms-interpolation-mode: bicubic;
  transform: translateZ(0);        /* GPU compositing, smoother scaling */
  backface-visibility: hidden;
}
/* Lightbox image gets NO rendering hints: at true size we want the raw
   pixels with zero browser processing, which is what kills the moire. */
