/* ==========================================================
   Scanex Inspections Inc. — shared look for every page
   Colours: navy from the logo, gold from the CPI badge.
   ========================================================== */

:root {
  --navy: #0e2241;
  --navy-dark: #091731;
  --navy-soft: #1d3459;
  --gold: #c9b37a;
  --gold-dark: #a8915a;
  --cream: #f7f4ec;
  --white: #ffffff;
  --text: #1f2a3a;
  --text-soft: #4d5868;
  --line: #e4ddcb;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(14, 34, 65, 0.08);
  --heading-font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --body-font: "Inter", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Keep linked sections from hiding under the sticky top bar */
[id] { scroll-margin-top: 90px; }

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

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

h1, h2, h3 {
  font-family: var(--heading-font);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

/* Wide paragraphs line up on both edges. Narrow columns (cards, feature
   points) and phone screens stay left-aligned, because justifying short
   lines leaves big gaps between words. */
@media (min-width: 761px) {
  .narrow p,
  .hero .lead,
  .page-banner p,
  .credential p,
  .two-col p { text-align: justify; }
}

a { color: var(--navy); }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 780px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { border-color: var(--gold); color: var(--white); }
.btn-outline:hover { background: var(--gold); color: var(--navy-dark); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-soft); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Top bar ---------- */

.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 20px;
}

/* Logo widths match the sharp logo files exactly (see images/logo-white-*.png) */
.logo img { width: 200px; height: auto; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.main-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  border-radius: 6px;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a.active { color: var(--gold); }

/* Phone-size menu: links fold into a "Menu" button */
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; min-height: 68px; }
  .logo img { width: 160px; }

  .nav-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    user-select: none;
  }
  .nav-toggle-label .bars,
  .nav-toggle-label .bars::before,
  .nav-toggle-label .bars::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    position: relative;
  }
  .nav-toggle-label .bars::before,
  .nav-toggle-label .bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-label .bars::before { top: -6px; }
  .nav-toggle-label .bars::after { top: 6px; }

  .main-nav { display: none; width: 100%; padding-bottom: 14px; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a { padding: 12px 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
}

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

.section { padding: 72px 0; }
.section-cream { background: var(--cream); }
.section-navy { background: var(--navy); color: #dfe5ee; }
.section-navy h2, .section-navy h3 { color: var(--white); }

.section-intro { max-width: 760px; margin-bottom: 40px; }
.section-intro.center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.section-navy .eyebrow, .hero .eyebrow, .page-banner .eyebrow { color: var(--gold); }

/* Home page: big top area */
.hero {
  background: var(--navy);
  color: #dfe5ee;
  padding: 64px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero .lead { font-size: 1.15rem; margin-bottom: 28px; }
.hero-image img {
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  width: 100%;
}

/* Inner pages: title band */
.page-banner {
  background: var(--navy);
  color: #dfe5ee;
  padding: 56px 0 50px;
}
.page-banner h1 { color: var(--white); margin-bottom: 0.3em; }
.page-banner p { max-width: 720px; margin: 0; font-size: 1.1rem; }

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card p { color: var(--text-soft); }
.card .card-link {
  margin-top: auto;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
}
.card .card-link:hover { text-decoration: underline; }

/* "What sets us apart" list */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
}
.feature h3 {
  font-size: 1.1rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.feature h3::before {
  content: "";
  flex: 0 0 10px;
  height: 10px;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--gold);
}
.feature p { margin-left: 20px; color: var(--text-soft); }
.section-navy .feature p { color: #c9d2df; }

/* Credential block */
.credential {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
}
.credential img { width: 200px; height: auto; }

/* Call-to-action band */
.cta {
  background: var(--navy);
  color: #dfe5ee;
  text-align: center;
  padding: 64px 0;
}
.cta h2 { color: var(--white); }
.cta p { max-width: 620px; margin: 0 auto 26px; }
.cta .btn-row { justify-content: center; }

/* Services page: "What we inspect" photo cards */
/* One wide row per area: big picture beside its checklist, sides alternate */
.inspect-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}
.inspect-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: center;
}
.inspect-card:nth-child(even) { grid-template-columns: 2fr 3fr; }
.inspect-card:nth-child(even) .photo-link { order: 2; }

/* Photos are labelled drawings: show them whole, as large as possible,
   and link to the full-size picture so the labels can be read */
.photo-link {
  display: block;
  position: relative;
  background: var(--cream);
  padding: 18px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-link img {
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: contain;
  border-radius: 6px;
}
.photo-link .enlarge {
  position: absolute;
  right: 26px;
  bottom: 26px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0.9;
}
.photo-link:hover .enlarge { background: var(--gold); color: var(--navy-dark); }
.inspect-card .inspect-body { padding: 28px 32px 20px; }
.inspect-card .number {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
}

.check-list {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
}
.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 6px;
  color: var(--text-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
  transform: rotate(-45deg);
}
.sub-heading {
  font-weight: 700;
  color: var(--navy);
  margin: 10px 0 6px;
}

/* Simple tag list (home types, service areas) */
.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag-list li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.95rem;
}
.section-cream .tag-list li { background: var(--white); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.highlight-box {
  background: var(--white);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

/* About page text blocks */
.text-block + .text-block { margin-top: 48px; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card .icon svg { width: 26px; height: 26px; fill: var(--gold); }
.contact-card .detail {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 18px;
  word-break: break-word;
}

/* ---------- Bottom bar ---------- */

.site-footer {
  background: var(--navy-dark);
  color: #b9c3d2;
  padding: 52px 0 24px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.site-footer img { width: 200px; height: auto; margin-bottom: 14px; }
.site-footer .slogan { font-style: italic; color: var(--gold); }
.site-footer h3 {
  font-family: var(--body-font);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #dfe5ee; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 36px;
  padding-top: 18px;
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Tablet and phone adjustments ---------- */

@media (max-width: 960px) {
  .card-grid, .feature-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .hero { padding: 40px 0 48px; }
  .hero-grid, .two-col, .credential { grid-template-columns: 1fr; gap: 28px; }
  .card-grid, .feature-grid, .inspect-grid, .contact-grid { grid-template-columns: 1fr; }
  .credential img { width: 160px; }
  .inspect-card,
  .inspect-card:nth-child(even) { grid-template-columns: 1fr; }
  .inspect-card:nth-child(even) .photo-link { order: 0; }
  .photo-link { padding: 10px; }
  .photo-link .enlarge { right: 16px; bottom: 16px; }
  .inspect-card .inspect-body { padding: 22px 22px 14px; }
  .btn-row .btn { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
