/* Minimal, clean styling with site sections */
:root {
  --bg: #ffffff;
  --panel: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --brand: #2563eb;
  --nav-bg: #ffffff; /* white navbar */
  --nav-text: var(--text);
  --danger: #ef4444;
  --ok: #16a34a;
  --border: #e2e8f0;
  --topbar-h: 60px;
  --banner-h: 44px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding-top: calc(var(--banner-h) + var(--topbar-h));
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* Full-page snap scrolling (enable only on pages that add .page-snap to <body>) */
body.page-snap { scroll-snap-type: y mandatory; }
body.page-snap main > section { scroll-snap-align: start; scroll-margin-top: calc(var(--topbar-h) + var(--banner-h)); }

.container { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

/* Topbar */
.topbar { position: fixed; top: var(--banner-h); left: 0; right: 0; z-index: 90; background: var(--nav-bg); color: var(--nav-text); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; min-height: var(--topbar-h); }
.brand { display: flex; align-items: center; gap: .6rem; }
.logo-img { height: 36px; width: auto; display: block; }
.brand-name { font-weight: 600; letter-spacing: .3px; color: var(--nav-text); text-decoration: none; }
.brand-name:hover { text-decoration: none; }
.nav a { color: var(--nav-text); text-decoration: none; margin-left: 1rem; opacity: .9; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.nav .cta { padding: .45rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--nav-text); }

/* Services dropdown (compact) */
.nav { position: relative; }
.nav .has-mega { position: relative; display: inline-block; }
.mega { position: absolute; top: 100%; left: 0; display: none; background: #ffffff; color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.12); min-width: 240px; width: 280px; padding: 8px; z-index: 120; }
.has-mega:hover .mega, .has-mega:focus-within .mega, .mega:hover { display: block; }
.mega-inner { margin: 0; padding: 6px; display: block; }
.mega-left { display: none; }
.mega-card { display: none; }
.mega-cols { display: block; }
.mega-cols .col { margin: 0; }
.mega-cols .col h4 { display: none; }
.mega-cols .col a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.mega-cols .col a:hover { background: #f8fafc; }

@media (max-width: 900px){
  .mega { display: none !important; }
}

/* Hero split layout */
.hero { position: relative; min-height: calc(100vh - var(--topbar-h) - var(--banner-h) - 80px); color: #ffffff; background: #111827; }
.hero::before { content: none; }
.hero .hero-content { display: none; }
.hero-split { width: 100vw; max-width: none; margin: 0; padding: 0; height: 100%; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 2rem; align-items: center; }
.hero-media { background: #0b1220 url('Photos/CNC main landing page photo.png') center/cover no-repeat; border-radius: 0 12px 12px 0; height: calc(100vh - var(--topbar-h) - var(--banner-h) - 80px); min-height: 380px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.hero-copy { padding: 2rem clamp(16px, 5vw, 48px); }
.hero-copy h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4vw + 1rem, 3.25rem); line-height: 1.1; font-weight: 800; letter-spacing: .2px; }
.hero-copy .btn { margin-top: .25rem; }
.btn.btn-lg { padding: 1rem 1.25rem; font-size: 1rem; }
/* Segmented toggle */
.seg-toggle { margin: 1rem 0 .5rem; background: #1f2937; padding: 4px; border-radius: 999px; display: inline-flex; gap: 6px; border: 1px solid rgba(255,255,255,.1); }
.seg-toggle .seg { background: transparent; color: #e5e7eb; border: 0; padding: .45rem .9rem; border-radius: 999px; cursor: pointer; font-weight: 700; letter-spacing: .2px; }
.seg-toggle .seg.active { background: #ffffff; color: #111827; box-shadow: 0 1px 0 rgba(0,0,0,.2), 0 6px 16px rgba(0,0,0,.25); }

/* Panels, bullets, CTAs */
.hero-panels .panel { margin-top: .75rem; }
.hero-bullets { margin: .25rem 0 1rem 1.1rem; padding: 0; color: #d1d5db; }
.hero-bullets li { margin: .35rem 0; }
.hero-ctas { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.btn.btn-outline { background: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,.35); }
.btn.btn-outline:hover { background: rgba(255,255,255,.06); }

.hero-confidential { margin-top: .75rem; color: #9ca3af; font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.i-lock::before { content: "\1F512"; /* lock emoji */ }
@media (max-width: 900px){
  .hero-split { grid-template-columns: 1fr; width: 100%; }
  .hero-media { height: calc(50vh - var(--topbar-h) - var(--banner-h)); min-height: 260px; }
  .hero-copy { text-align: center; }
  }
.btn { display: inline-block; margin-top: .8rem; background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%); color: #ffffff; padding: .8rem 1.1rem; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.btn:hover { filter: brightness(1.05); }

/* Sections */
.section { padding: 3rem 0; min-height: calc(100vh - var(--topbar-h) - var(--banner-h)); display: grid; align-content: center; }
.section h2 { margin: 0 0 1rem; letter-spacing: .3px; }
.sub { color: var(--muted); margin-top: .25rem; }

/* Landing-only content bands (do not force full height) */
.band { padding: 3.5rem 0; scroll-snap-align: none; min-height: auto; background: #fff; }
.band-title { text-align: center; margin: 0 0 .5rem; font-size: clamp(1.6rem, 2.6vw + 1rem, 2.2rem); }
.band-sub { text-align: center; color: var(--muted); max-width: 900px; margin: 0 auto 1.6rem; }

/* Capabilities */
.capabilities .container { max-width: 1200px; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.cap-card { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; padding-bottom: .75rem; box-shadow: 0 6px 18px rgba(0,0,0,.08); transition: transform .22s ease, box-shadow .22s ease; }
.cap-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 16px 32px rgba(0,0,0,.15); }
.cap-card .cap-img { height: 150px; background: #0b1220 center/cover no-repeat; }
.cap-card h3 { margin: .9rem .9rem .35rem; }
.cap-card p { margin: 0 .9rem .5rem; color: var(--muted); }
.cap-card ul { margin: 0 .9rem .6rem 1.6rem; }
.cap-card li { margin: .2rem 0; }
.cap-card .cap-link { display: inline-block; margin-left: .9rem; color: #1d4ed8; text-decoration: none; font-weight: 600; }
.cap-card .cap-link:hover { text-decoration: underline; }

/* Quote intro */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; align-items: center; }
.quote-intro .quote-shot { height: 300px; border-radius: 14px; background: #0b1220 url('Photos/landing page.png') center/cover no-repeat; box-shadow: 0 10px 28px rgba(0,0,0,.15); }
.check-list { margin: .8rem 0 1.3rem 1.2rem; }
.check-list li { margin: .35rem 0; }

/* Process timeline */
.process .steps { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 12px; }
.process .steps li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 12px; }
.process .dot { width: 12px; height: 12px; border-radius: 999px; background: var(--brand); border: 2px solid #bfdbfe; margin-top: .35rem; }
.process .step-body strong { display: block; margin-bottom: .15rem; }

/* Sections with photo backgrounds */
.section--bg { position: relative; color: #f4f7fb; }
.section--bg::before { content: ""; position: absolute; inset: 0; background: rgba(10,16,28,.55); }
.section--bg > * { position: relative; z-index: 1; }
#about.section--bg { background: #0a101c url('Photos/about photo.png') center/cover no-repeat; }
#services.section--bg { background: #0a101c url('Photos/services.png') center/cover no-repeat; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Customers */
.logo-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.logo-card { display: grid; place-items: center; height: 120px; background: #ffffff; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; box-shadow: 0 8px 20px rgba(0,0,0,.06); }

/* Certifications */
.cert-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cert-card { display: grid; place-items: center; height: 140px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; color: var(--muted); font-weight: 500; box-shadow: 0 8px 20px rgba(0,0,0,.06); }

/* Gallery carousel */
.carousel { overflow: hidden; padding: 0 16px; }
.carousel-track { display: flex; gap: 16px; align-items: center; animation: carousel-scroll 40s linear infinite; will-change: transform; }
.carousel img { width: 420px; height: 300px; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); background: #0b1220; box-shadow: 0 10px 24px rgba(0,0,0,.15); }
.carousel:hover .carousel-track { animation-play-state: paused; }

@keyframes carousel-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { animation: none; }
}

/* Form */
.row { margin: 1rem 0; }
label { display:block; margin-bottom:.35rem; color:#c7d6e6; }
.req { color: var(--brand); }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea,
input[type="file"] {
  width: 100%;
  padding: .8rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  outline: none;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%), linear-gradient(135deg, var(--brand) 50%, transparent 50%); background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input::file-selector-button { border: 0; padding: .55rem .9rem; margin-right: .8rem; border-radius: 8px; background: #eaf2ff; color: #1e3a8a; cursor: pointer; }
textarea { resize: vertical; }

button { background: linear-gradient(180deg, #eaf2ff 0%, #dbeafe 100%); color: #1e3a8a; padding: .8rem 1.1rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: filter .15s ease; }
button:hover { filter: brightness(1.1); }
button[disabled] { opacity: .6; cursor: not-allowed; }

.hint { color: var(--muted); font-size: .85rem; margin-top:.35rem; }

.message { margin-top: 1rem; }
.message .ok { color: var(--ok); }
.message .err { color: var(--danger); white-space: pre-wrap; }

progress { width: 100%; height: 16px; appearance: none; }
progress::-webkit-progress-bar { background-color: #f1f5f9; border-radius: 8px; }
progress::-webkit-progress-value { background-color: var(--brand); border-radius: 8px; }
progress::-moz-progress-bar { background-color: var(--brand); border-radius: 8px; }

.hidden { display: none; }
.muted { color: var(--muted); font-size: .9rem; }

footer { margin: 2rem auto; text-align: center; color: var(--muted); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem;
  overflow-y: auto;
}
.modal.show { display: flex; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-width: 720px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  margin: 0 auto 4vh;
  max-height: none;
  overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.modal-title { margin: 0; font-size: 1.25rem; }
.modal-close { background: transparent; border: none; color: var(--text); font-size: 1.5rem; padding: .25rem .5rem; }

/* Toast */
.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 60;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Override phone icon glyph to ensure correct symbol across encodings */
body .announcement .i-phone::before { content: "\01F4DE"; display: inline-block; transform: translateY(1px); }

/* Announcement banner */
.announcement {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0 .75rem;
  background: #0b1220;
  color: #ffffff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  z-index: 100;
  font-size: .95rem;
}
.announcement a { color: #ffffff; text-underline-offset: 2px; }
.announcement a:hover { text-decoration: underline; }
.i-phone::before { content: "📞"; display: inline-block; transform: translateY(1px); }

.process .process-media { margin: 1.5rem auto 2.5rem; max-width: 1100px; width: min(95vw, 1100px); border-radius: 18px; background: #ffffff; border: 1px solid var(--border); padding: 12px; box-shadow: 0 10px 26px rgba(15,23,42,.08); overflow: hidden; }
.process .process-media img { display: block; width: 100%; height: clamp(220px, 32vw, 320px); object-fit: cover; border-radius: 12px; filter: saturate(.7) brightness(1.05); }

