/* Semper Fi Inspections — site styles */
:root {
  --ink: #0A1630;
  --navy: #132A57;
  --navy-2: #1C3A73;
  --red: #B0232F;
  --red-deep: #7E1A23;
  --gold: #C9A34E;
  --steel: #AEB6C2;
  --paper: #EFF2F6;
  --text: #0E1A2E;
  --muted: #4A5568;
  --line: rgba(174, 182, 194, .28);

  --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.7rem, 6.4vw, 5.8rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
h3 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--steel); max-width: 52ch; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section--light { background: var(--paper); color: var(--text); }
.section--light .lede { color: var(--muted); }
.section--navy { background: var(--navy); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.6em; border: 1px solid transparent;
  font: 600 .95rem/1 var(--sans); letter-spacing: .02em; text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: #C82C39; }
.btn--ghost { border-color: rgba(239, 242, 246, .5); color: var(--paper); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.section--light .btn--ghost { border-color: var(--text); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: transform .45s var(--ease), background .35s var(--ease);
}
.site-header.is-scrolled { background: rgba(10, 22, 48, .88); backdrop-filter: blur(10px); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 84px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 120px; height: 60px; }
.brand-name { font: 600 1.25rem/1.1 var(--display); }
.brand-name small { display: block; font: 500 .72rem/1.3 var(--sans); color: var(--steel); letter-spacing: .02em; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: .93rem; color: var(--paper); opacity: .85; transition: opacity .2s, color .2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; color: var(--gold); }
.nav .btn { opacity: 1; padding: .8em 1.2em; }
.nav .btn:hover { color: #fff; }
.header-phone { font-weight: 600; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--paper); padding: 10px 14px; font: 600 .9rem var(--sans); }

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 84px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--ink); padding: 8px var(--gutter) 24px; border-top: 1px solid var(--line);
    transform: translateY(-120%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav .btn { margin-top: 16px; width: auto; border-bottom: 0; }
  .brand-name small { display: none; }
}

/* Intro: the Semper Fi mark loads large, then slides into the header as you scroll */
.intro { display: none; }
.js .intro { display: grid; place-items: center; position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.intro-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at center, #10224A 0%, var(--ink) 70%); }
.intro-logo { position: relative; width: min(94vw, 150vh, 1180px); aspect-ratio: 2; will-change: transform; }
.intro-logo svg { width: 100%; height: 100%; display: block; }
.intro-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); color: var(--steel); font-size: .85rem; letter-spacing: .04em; }
.intro-cue::after { content: ""; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(var(--gold), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

/* Hero: the street photo with an inspector's markup drawn over the house */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: left center; filter: saturate(.85) contrast(1.05); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 22, 48, .15) 0%, rgba(10, 22, 48, .35) 40%, rgba(10, 22, 48, .92) 68%),
    linear-gradient(0deg, rgba(10, 22, 48, .9) 0%, rgba(10, 22, 48, 0) 35%);
}
.hero-markup { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-markup .mk-line { fill: none; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.hero-markup .mk-dash { stroke-dasharray: 6 5; }
.hero-markup .mk-dot { fill: #fff; }
.hero-markup text { font: 600 9.5px var(--sans); fill: #fff; paint-order: stroke; stroke: rgba(10, 22, 48, .85); stroke-width: 4px; }
.hero-content { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(56px, 10vh, 120px); }
.hero-copy { margin-left: auto; max-width: 560px; }
.hero-copy .lede { color: #D6DBE3; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 2.2rem; color: var(--steel); font-size: .88rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; background: var(--red); transform: rotate(45deg); }

/* Phones: the photo alone fills the hero, copy sits on a frosted glass card over it */
@media (max-width: 760px) {
  .hero { padding-top: 84px; background: var(--ink); }
  .hero-media img { object-position: 25% center; }
  .hero-media::after { background: linear-gradient(0deg, rgba(10, 22, 48, .6) 0%, rgba(10, 22, 48, 0) 50%); }
  .hero-markup { display: none; }
  .hero-content { padding-bottom: 24px; }
  .hero-copy {
    margin-left: 0; padding: 22px 20px;
    background: rgba(10, 22, 48, .38); border: 1px solid rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  }
  .hero-meta { margin-top: 1.4rem; }
}

/* Credentials band */
.creds { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); }
.creds ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.creds li { padding: 26px 20px; border-left: 1px solid var(--line); }
.creds li:first-child { border-left: 0; }
.creds strong { display: block; font: 600 1.35rem/1.1 var(--display); color: var(--paper); }
.creds span { font-size: .85rem; color: var(--steel); }
@media (max-width: 560px) {
  .creds ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creds li { border-left: 0; border-top: 1px solid var(--line); padding: 20px 12px 20px 0; }
}

/* Services grid */
.showcase { background: var(--paper); color: var(--text); overflow: hidden; }
.showcase-head { padding-top: clamp(80px, 10vw, 140px); }
.showcase .lede { color: var(--muted); }
.showcase-track { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) clamp(80px, 10vw, 140px); }
.svc-panel {
  background: #fff; display: grid; grid-template-rows: 280px auto;
  border-top: 4px solid var(--navy);
}
.svc-panel:nth-child(3) { border-top-color: var(--red); }
.svc-panel figure { margin: 0; overflow: hidden; }
.svc-panel figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.svc-panel:hover figure img { transform: scale(1.04); }
.svc-body { padding: 28px 30px 32px; }
.svc-body h3 { color: var(--navy); }
.svc-body ul { margin: 0 0 1.4em; padding: 0; list-style: none; columns: 2; column-gap: 24px; font-size: .95rem; color: var(--muted); }
.svc-body li { break-inside: avoid; padding: 3px 0; }
.svc-body > a { font-weight: 600; color: var(--red); text-underline-offset: 4px; }
.svc-links li { position: relative; padding-left: 16px; }
.svc-links li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; background: var(--red); }
.svc-links a { color: var(--muted); text-decoration: none; }
.svc-links a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.svc-row { scroll-margin-top: 100px; }
@media (max-width: 760px) {
  .showcase-track { grid-template-columns: minmax(0, 1fr); }
  .svc-panel { grid-template-rows: 220px auto; }
  .svc-body ul { columns: 1; }
}

/* Photo placeholder: blueprint grid until the client's photos arrive */
.ph {
  width: 100%; height: 100%; min-height: 220px; display: grid; place-items: center; text-align: center;
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(174, 182, 194, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(174, 182, 194, .12) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--steel); font-size: .9rem; padding: 20px; border: 1px dashed rgba(174, 182, 194, .45);
}
.split .ph { aspect-ratio: 4 / 5; max-width: 440px; }
.ph svg { width: 40px; height: 40px; margin: 0 auto 10px; stroke: var(--gold); fill: none; stroke-width: 1.5; }

/* Split feature (CMI badge, about teaser) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }
.badge-tilt { perspective: 900px; max-width: 420px; margin: 0 auto; }
.badge-tilt img { transition: transform .5s var(--ease); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.shield-feature { width: 200px; height: auto; margin: 0 0 28px; filter: drop-shadow(0 14px 22px rgba(10, 22, 48, .25)); }
.checklist { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.checklist li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); position: relative; }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 10px; height: 6px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.section--light .checklist li { border-color: #D5DBE3; }
.section--light .checklist li::before { border-color: var(--red); }

/* Service area tile map */
.area-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
@media (max-width: 860px) { .area-grid { grid-template-columns: minmax(0, 1fr); } }
.regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; }
@media (max-width: 520px) { .regions { grid-template-columns: minmax(0, 1fr); } }
.region h3 { font-size: 1.05rem; font-weight: 600; color: var(--gold); margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); letter-spacing: .01em; }
.region ul { list-style: none; margin: 0; padding: 0; }
.region li { padding: 6px 0; color: #D6DBE3; font-size: .98rem; }
.region .home-base { color: #fff; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.region .home-base span { font-size: .72rem; font-weight: 600; background: var(--red); color: #fff; padding: 3px 8px; }

/* Page hero (inner pages) */
.page-hero { padding: 180px 0 90px; background: linear-gradient(180deg, var(--navy) 0%, var(--ink) 100%); border-bottom: 1px solid var(--line); }
.crumb { font-size: .9rem; color: var(--steel); margin-bottom: 1.2rem; }
.crumb a { color: var(--steel); }

/* Service detail rows */
.svc-list { border-top: 1px solid #D5DBE3; }
.svc-row { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: 20px 60px; padding: 34px 0; border-bottom: 1px solid #D5DBE3; }
.svc-row h3 { color: var(--navy); margin: 0; }
.svc-row p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .svc-row { grid-template-columns: 1fr; } }
.split .svc-row { grid-template-columns: 1fr; gap: 8px; }

/* Process steps (a real sequence, so numbered) */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.steps li { counter-increment: step; padding: 28px 26px 28px 0; border-top: 2px solid var(--gold); }
.steps li::before { content: counter(step); display: block; font: 600 2.6rem/1 var(--display); color: var(--gold); margin-bottom: 12px; }
.steps h3 { font-size: 1.35rem; }
.steps p { color: var(--steel); font-size: .95rem; }

.notice { border-left: 3px solid var(--red); padding: 16px 20px; background: #fff; color: var(--muted); font-size: .92rem; margin-top: 2rem; max-width: 70ch; }

/* Free estimate calculator */
.estimate { background: var(--paper); color: var(--text); padding-top: clamp(64px, 8vw, 110px); }
.estimate .lede { color: var(--muted); }
.estimate-frame { max-width: 980px; margin-top: 28px; }

/* Booking */
.book { background: var(--paper); color: var(--text); }
.book .lede { color: var(--muted); }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 90px); align-items: start; }
.book-grid > div { max-width: 640px; }
.contact-lines { list-style: none; padding: 0; margin: 1.8rem 0 0; }
.contact-lines li { padding: 14px 0; border-bottom: 1px solid #D5DBE3; }
.contact-lines b { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.contact-lines a { font-size: 1.15rem; font-weight: 600; text-decoration: none; color: var(--navy); }
.contact-lines a:hover { color: var(--red); }

/* Footer */
.site-footer { background: #07102A; padding: 70px 0 40px; font-size: .92rem; color: var(--steel); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font: 600 1.1rem var(--display); color: var(--paper); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-mark { width: 180px; height: auto; margin-bottom: 14px; }
.footer-base { border-top: 1px solid var(--line); margin-top: 50px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px 30px; justify-content: space-between; font-size: .82rem; }

/* Scroll reveal — only the elements marked for it */
.js .reveal { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Photos (added 2026-09-29) */
.photo-fill { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tall { width: 100%; max-width: 440px; aspect-ratio: 4 / 5; object-fit: cover; display: block; border-top: 4px solid var(--navy); box-shadow: 0 18px 40px rgba(10, 22, 48, .16); }
/* One consistent grade so photos from different sources read as a set */
.svc-panel figure img, .photo-gallery img, .photo-tall { filter: saturate(.88) contrast(1.03); }
.photo-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.photo-gallery figure { margin: 0; background: #fff; border-top: 4px solid var(--navy); overflow: hidden; }
.photo-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform 1.2s var(--ease), filter .6s var(--ease); }
.photo-gallery figure:hover img { transform: scale(1.04); filter: none; }
.photo-gallery figcaption { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; font-size: .9rem; font-weight: 600; color: var(--navy); }
.photo-gallery figcaption::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--red); transform: rotate(45deg); }
@media (max-width: 900px) { .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .photo-gallery figcaption { padding: 11px 12px; font-size: .82rem; } }
.book-grid--photo { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; }
@media (max-width: 860px) { .book-grid--photo { grid-template-columns: minmax(0, 1fr); } }
