/* Shared styles for the NCB service pages.
   Load this after styles.min.css and before each page-specific stylesheet.
   The header, logo, navigation, dropdown and mobile menu live in styles.min.css only. */

:root {
  --navy: #101943;
  --navy-mid: #16265a;
  --blueprint: #24377a;
  --ink: #162042;
  --muted: #66708c;
  --paper: #f7f8fb;
  --line: #dce1ec;
  --accent: #dceacb;
  --pale-sage: #eef3e6;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */

*::before,
*::after {
  box-sizing: border-box;
}

body {
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.container {
  width: min(1120px, calc(100% - 48px));
}

.section {
  padding: 110px 0;
}

.skip-link {
  left: -9999px;
  top: 12px;
  z-index: 200;
  padding: 10px 15px;
  background: #fff;
  color: #000;
}

/* ------------------------------------------------------------------
   Header
   Everything else (logo, nav, dropdown, mobile menu) is in styles.min.css.
------------------------------------------------------------------ */

/* Keeps the fixed header from covering the hero */
.service-hero {
  margin-top: 88px;
}

/* ------------------------------------------------------------------
   Typography and buttons
------------------------------------------------------------------ */

.eyebrow {
  margin: 0 0 16px;
  color: #344b9a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.eyebrow.light {
  color: var(--accent);
}

.section-heading {
  max-width: 800px;
  margin-bottom: 54px;
}

.section-heading h2,
.two-column h2,
.project-callout h2 {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.25rem, 4vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.light-heading h2 {
  color: var(--white);
}

.button {
  gap: 16px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
}

.button-light {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--navy);
}

/* ------------------------------------------------------------------
   Service hero (research, renovation, inspection)
   Each page sets its own background-image in its own stylesheet.
------------------------------------------------------------------ */

.research-hero-content,
.renovation-hero-content,
.inspection-hero {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  justify-items: start;
  width: 100%;
  max-width: none;
  min-height: 800px;
  margin: 0;
  padding: 0 0 90px 8%;
  color: #fff;
}

/* Background image: research and renovation use the hero itself,
   home inspection uses a separate element. */
.research-hero-content,
.renovation-hero-content,
.inspection-hero-image {
  background-color: #1f2d3d;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.inspection-hero-image {
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Dark gradient behind the text */
.research-hero-content::before,
.renovation-hero-content::before,
.inspection-hero-overlay {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: min(58%, 720px);
  background: linear-gradient(
    90deg,
    rgba(20, 34, 51, 0.9) 0%,
    rgba(20, 34, 51, 0.76) 72%,
    rgba(20, 34, 51, 0) 100%
  );
}

.research-hero-content > *,
.renovation-hero-content > *,
.inspection-hero-content > * {
  position: relative;
  z-index: 1;
}

/* The wrapper takes no part in layout, so its children become direct grid
   items of .inspection-hero and space out exactly like the other two pages. */
.inspection-hero-content {
  display: contents;
}

.research-hero-content h1,
.renovation-hero-content h1,
.inspection-hero-content h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.research-hero-content .hero-intro,
.renovation-hero-content .hero-intro,
.inspection-hero-content p:not(.eyebrow) {
  max-width: 480px;
  margin: 28px 0 36px;
  color: #d7def5;
  font-size: 1.06rem;
  line-height: 1.75;
}

.research-hero-content .eyebrow,
.renovation-hero-content .eyebrow,
.inspection-hero-content .eyebrow {
  margin-bottom: 18px;
  color: #d9ebdc;
  font-size: clamp(0.9rem, 1.4vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.research-hero-content .button-light,
.renovation-hero-content .button-light,
.inspection-hero-content .button-light {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.research-hero-content .button-light:hover,
.renovation-hero-content .button-light:hover,
.inspection-hero-content .button-light:hover {
  background: #fff;
  color: #293b86;
}

/* ------------------------------------------------------------------
   Service cards (project research and renovation)
------------------------------------------------------------------ */

.service-detail-section {
  background: #eef1f7;
}

.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

.service-detail-card > img {
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.service-card-content {
  padding: 30px;
}

.service-number {
  margin: 0 0 16px;
  color: #536daf;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.service-detail-card h3 {
  margin: 0 0 14px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.service-detail-card p:not(.service-number) {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.details-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: 26px;
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
}

.details-toggle span {
  font-size: 1.3rem;
  line-height: 0.8;
  transition: transform 0.2s ease;
}

.service-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.service-details ul {
  overflow: hidden;
  margin: 0;
  padding: 0;
  color: var(--muted);
  line-height: 1.7;
}

.service-details li {
  margin: 10px 0;
}

.service-detail-card.is-open .service-details {
  grid-template-rows: 1fr;
}

.service-detail-card.is-open .service-details ul {
  padding: 12px 0 0 18px;
}

.service-detail-card.is-open .details-toggle span {
  transform: rotate(45deg);
}

/* ------------------------------------------------------------------
   How we work (research and renovation)
   Photo height is set in each page stylesheet.
------------------------------------------------------------------ */

.work-process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10%;
  align-items: center;
}

.process-copy h2 {
  margin: 0 0 42px;
  font-size: clamp(36px, 4.3vw, 58px);
}

.steps {
  border-top: 1px solid var(--line);
}

.step {
  display: flex;
  gap: 20px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.step > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 7px;
  font-size: 22px;
}

.step p {
  margin: 0;
  font-size: 15px;
}

.process-photo {
  position: relative;
}

.process-photo img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.photo-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 17px 22px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
}

.photo-label span {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-label strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ------------------------------------------------------------------
   Why work with NCB (research and renovation)
------------------------------------------------------------------ */

.process-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(11, 20, 60, 0.18), rgba(11, 20, 60, 0.18)),
    url("../images/backgrounds/project-gallery-blueprint.webp") center / cover no-repeat;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(220, 234, 203, 0.25);
}

.process-grid article {
  min-height: 250px;
  padding: 32px 28px;
  background: rgba(16, 25, 67, 0.84);
}

.process-grid span {
  display: block;
  margin-bottom: 48px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.process-grid h3 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}

.process-grid p {
  margin: 0;
  color: #d3dbf0;
  line-height: 1.65;
}

/* ------------------------------------------------------------------
   Call to action (research and renovation)
------------------------------------------------------------------ */

.project-callout {
  background: var(--white);
}

.project-callout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 72px;
  align-items: end;
}

.project-callout-grid > div:last-child p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.7;
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */

@media (max-width: 850px) {
  .research-hero-content,
  .renovation-hero-content,
  .inspection-hero {
    min-height: 620px;
    padding: 80px 24px;
  }

  .research-hero-content,
  .renovation-hero-content,
  .inspection-hero-image {
    background-position: 35% top;
  }

  .research-hero-content::before,
  .renovation-hero-content::before,
  .inspection-hero-overlay {
    inset: 0;
    width: 100%;
    background: linear-gradient(
      90deg,
      rgba(20, 34, 51, 0.78),
      rgba(20, 34, 51, 0.42)
    );
  }

  .research-hero-content h1,
  .research-hero-content .hero-intro,
  .research-hero-content .eyebrow,
  .renovation-hero-content h1,
  .renovation-hero-content .hero-intro,
  .renovation-hero-content .eyebrow,
  .inspection-hero-content h1,
  .inspection-hero-content p:not(.eyebrow),
  .inspection-hero-content .eyebrow {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  }

  .work-process-grid,
  .project-callout-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 76px 0;
  }

  .container {
    width: min(100% - 36px, 1120px);
  }

  .service-detail-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .service-card-content {
    padding: 24px;
  }

  .photo-label {
    position: static;
    max-width: none;
    margin-top: -1px;
  }
}
