/* Kootenay Materials Testing — static rebuild of kootenaytesting.com */
:root {
  --blue: #3863cc;
  --blue-dark: #2a4fb0;
  --blue-text: #1415e4;
  --ink: #2b2b2b;
  --muted: #6f6f6f;
  --line: #e6e6e6;
  --light: #f4f5f6;
  --nav: #8a8a8a;
  --nav-active: #c9956a;
  --team: #555555;
  --green: #6fbf40;
  --green-hover: #5aa832;
  --white: #ffffff;
  --max: 1080px;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 {
  font-family: "Lato", "Open Sans", sans-serif;
  font-weight: 300;
  color: #222;
  line-height: 1.25;
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem 1rem .75rem;
  position: relative;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
}
.logo {
  width: 220px;
  height: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.wordmark {
  font-family: "Open Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  color: var(--blue);
  letter-spacing: .01em;
  line-height: 1.1;
}
.nav-toggle {
  display: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  padding: 10px 9px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #333;
  margin: 5px 0;
  border-radius: 1px;
}
.site-nav {
  display: flex;
  justify-content: center;
  gap: 2.25rem;
  padding: .7rem 1rem .9rem;
}
.site-nav a {
  color: var(--nav);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  font-family: "Lato", "Open Sans", sans-serif;
  font-weight: 400;
  text-decoration: none;
}
.site-nav a:hover { color: var(--blue); }
.site-nav a.active { color: var(--nav-active); }

/* Hero photos */
.hero-photo { padding: 1.5rem 0 0; }
.hero-photo img {
  width: min(720px, 100%);
  margin: 0 auto;
  object-fit: cover;
}
.feature-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.75rem 0 2.5rem;
}
.feature-row .job-photo {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}
.feature-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.4rem;
}
.feature-item:last-child { margin-bottom: 0; }
.feature-item img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}
.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: "Open Sans", sans-serif;
  margin: 0 0 .25rem;
}
.feature-item p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

/* Membership */
.membership {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 1rem 0 2.75rem;
}
.membership-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.membership-logos img { width: min(260px, 100%); }
.membership h3 {
  font-size: 1.15rem;
  font-weight: 600;
  font-family: "Open Sans", sans-serif;
  margin: 0 0 .45rem;
}
.membership p { color: #444; margin: 0 0 1.4rem; }
.membership p:last-child { margin-bottom: 0; }

/* Bands */
.band { padding: 3rem 0; }
.band-light { background: var(--light); }
.band-white { background: var(--white); }
.band-team { background: var(--team); color: var(--white); }
.centered { text-align: center; }
.lede {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
}
h2.section-title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-bottom: .35em;
}
.subtitle {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

/* Service cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.service {
  text-align: center;
}
.service .num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6d6d6d;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  margin-bottom: .75rem;
}
.service h3 {
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 .65rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid #d5d5d5;
}
.service p {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

/* Septic */
.septic {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
  padding: 3rem 0;
}
.septic h2 {
  font-size: 2.2rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1rem;
}
.photos-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  margin-bottom: 1rem;
}
.photos-head h3 {
  font-size: 1.5rem;
  margin: 0;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card {
  background: var(--white);
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow);
}
.card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: center 18%;
}
.card h3 {
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: .9rem 0 .25rem;
}
.card p {
  color: var(--muted);
  font-size: .92rem;
  margin: 0 0 1.1rem;
}

/* Blueprint / closing */
.blueprint {
  min-height: 180px;
  background: #eee center/cover no-repeat;
}
.closing { padding: 3.5rem 0 4rem; text-align: center; }
.closing h2 { font-size: 2.2rem; margin-bottom: .4rem; }
.closing p { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 1rem 2.4rem;
  text-align: center;
  color: #888;
  font-size: .9rem;
}
.site-footer p { margin: 0; }

/* Page heroes */
.page-hero {
  min-height: 220px;
  background: #444 center/cover no-repeat;
}
.page-hero.about {
  background-image: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18)), url("../images/about-bg.jpg");
  min-height: 620px;
  background-position: center 45%;
}
.page-banner {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center 30%;
}
.page-hero.contact { background-image: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.15)), url("../images/contact-bg.jpg"); }

.about-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  margin-top: -16rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
  position: relative;
}
.about-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}
.about-copy { padding: 2rem 2rem 2.4rem; }
.about-copy h1 { font-size: 2.3rem; margin-bottom: 1.2rem; }
.about-copy p { color: var(--blue-text); }

.page-intro { padding: 2.75rem 0 1rem; text-align: center; }
.page-intro h1 { font-size: clamp(2.1rem, 4vw, 2.7rem); }

/* Contact */
.contact-stage {
  background: #5a5a5a center/cover no-repeat;
  background-image: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.18)), url("../images/contact-bg.jpg");
  padding: 2.5rem 1rem 3rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  max-width: 920px;
  margin: 0 auto;
  background: transparent;
}
.contact-col h2 {
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 400;
  text-align: center;
  margin: 0 0 1rem;
}
.contact-card {
  background: var(--white);
  padding: 2rem 1.6rem 1.8rem;
  min-height: 280px;
}
.visit-card { text-align: center; }
.visit-card address {
  font-style: normal;
  line-height: 1.8;
}
.visit-rule {
  border: 0;
  border-top: 1px dashed #bbb;
  margin: 1rem auto;
  width: 80%;
}
.visit-card a { color: inherit; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem 1rem;
}
label {
  display: block;
  font-size: .92rem;
  margin-bottom: .2rem;
}
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  border: 1px solid #cfcfcf;
  padding: .55rem .65rem;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus {
  outline: 2px solid var(--blue);
  border-color: var(--blue);
}
textarea { min-height: 148px; resize: vertical; }
.span-2 { grid-column: 1 / -1; }
.form-actions { text-align: center; margin-top: .4rem; }
.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 0;
  padding: .65rem 1.6rem;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 3px;
}
.btn:hover { background: var(--green-hover); text-decoration: none; color: #fff; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); }
.hidden { display: none !important; }
.form-success {
  background: #eef8e8;
  border: 1px solid #b7dd9d;
  color: #2a5a16;
  padding: .85rem 1rem;
  margin-bottom: 1rem;
}

.map-wrap {
  background: #d9d9d9;
  min-height: 320px;
}
.map-wrap iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

/* Pay */
.pay-page { padding: 3.5rem 0 5rem; }
.pay-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 2.4rem 2rem;
  text-align: center;
}
.pay-card h1 { font-size: 2.2rem; }
.pay-card p { color: #444; }
.pay-note {
  margin-top: 1.25rem;
  font-size: .85rem;
  color: #888;
}
/* Utilities */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 860px) {
  .logo { width: 160px; }
  .feature-row,
  .membership,
  .septic,
  .about-panel,
  .contact-grid { grid-template-columns: 1fr; }
  .services-grid,
  .team-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .page-hero.services { min-height: 220px; }
  .about-panel { margin-top: 0; }
  .contact-col h2 { color: #fff; margin-top: 1rem; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.1rem;
  }
  .site-nav.open { display: flex; }
  .services-grid,
  .team-grid,
  .form-grid { grid-template-columns: 1fr; }
  .brand { justify-content: flex-start; padding-right: 4rem; }
  .wordmark { font-size: 1.35rem; }
  .logo { width: 120px; }
  .feature-item { grid-template-columns: 70px 1fr; }
}

@media (min-width: 641px) {
  .contact-card .form-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name message"
      "phone message"
      "email message"
      "actions actions";
  }
  .contact-card .form-grid > div:nth-child(1) { grid-area: name; }
  .contact-card .form-grid > div:nth-child(2) { grid-area: message; }
  .contact-card .form-grid > div:nth-child(3) { grid-area: phone; }
  .contact-card .form-grid > div:nth-child(4) { grid-area: email; }
  .contact-card textarea { min-height: 198px; height: 100%; }
}
.form-actions { grid-column: 1 / -1; }

.map-caption {
  margin: 0;
  padding: .7rem 1rem 1.1rem;
  text-align: center;
  background: #ececec;
  font-size: .92rem;
}
.map-caption a { color: #333; }
@media (max-width: 640px) {
  .page-banner { height: 240px; }
  .page-hero.about { min-height: 280px; }
  .about-panel { margin-top: 0; }
}

.site-footer .photo-credits { margin-top: 0.45em; font-size: 0.82em; }
.site-footer .photo-credits a { color: inherit; text-decoration: underline; }
