/* ==========================================================================
   15-layered-depth | layout.css
   Architecture-specific LAYOUT ONLY — no colors, fonts, or visual decoration.
   Z-axis layered design with parallax depth planes and overlapping sections.
   ========================================================================== */

/* ---------- Header Layout (highest z-index, floating) ---------- */
.depth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.depth-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.depth-header .nav-list {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.depth-header .mobile-toggle {
  display: none;
}
/* Hamburger bars: the toggle uses bare <span>s (no .hamburger-line class),
   so style them here or the menu button is invisible on mobile. */
.depth-header .mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text, #1f2a2e);
  border-radius: 2px;
}
/* Header wordmark (replaces the photo-as-logo) */
.depth-header .logo { text-decoration: none; flex-shrink: 0; margin-right: 2.5rem; }
.depth-header .logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--color-primary, #2f5d50);
  white-space: nowrap;
}
/* Keep the phone/CTA on one line and clear of the nav links */
.depth-header .header-cta { flex-shrink: 0; margin-left: 1.5rem; }
.depth-header .phone-cta { white-space: nowrap; }

/* ---------- Depth Main ---------- */
.depth-main {
  padding-top: 80px; /* Account for fixed header */
  overflow-x: hidden;
}

/* ---------- Depth Section ---------- */
.depth-section {
  position: relative;
  overflow: visible;
}

.depth-section--hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.depth-section--page-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
}

.depth-section--cta {
  min-height: 40vh;
  display: flex;
  align-items: center;
}

/* Overlapping: sections pull up into the previous section */
.depth-section--overlap {
  /* overlap removed — add vertical breathing room so each section reads as
     a distinct block while scrolling */
  position: relative;
  padding-block: 3rem;
}

/* ---------- Depth Layers ---------- */
/* Depth layers — parallax disabled for clean vertical layout */
.depth-layer {
  position: relative;
}

.depth-layer--bg {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.depth-layer--bg img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.depth-layer--mid {
  position: relative;
}

.depth-layer--fg {
  position: relative;
}

/* ---------- Depth Planes (elevated content containers) ---------- */
.depth-plane {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  position: relative;
}

.depth-plane--elevated {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem;
}

.depth-plane--narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ---------- Depth Content ---------- */
.depth-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 10;
}

.depth-content--centered {
  text-align: center;
  max-width: 800px;
}

/* ---------- Depth Split (side by side) ---------- */
.depth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.depth-split__media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ---------- Depth Grid ---------- */
.depth-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.depth-grid--2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ---------- Depth Card ---------- */
.depth-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.depth-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.depth-card__body {
  padding: 1.5rem;
  flex: 1;
}

/* ---------- Depth Actions ---------- */
.depth-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.depth-content--centered .depth-actions {
  justify-content: center;
}

/* ---------- Section Title ---------- */
.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

/* ---------- Map ---------- */
.map-embed {
  width: 100%;
  min-height: 400px;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  position: relative;
  z-index: 20;
}

.breadcrumb ol {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------- Footer Layout ---------- */
.site-footer {
  position: relative;
  z-index: 50;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  align-items: start;
}

.footer-brand img {
  display: none;
}

.footer-brand p {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0;
}

.footer-nap h3,
.footer-links h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  white-space: nowrap;
}

.footer-nap address {
  font-style: normal;
  line-height: 1.7;
}

.footer-nap address p {
  margin: 0.25rem 0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin: 0.4rem 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.social-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
}

/* ---------- Skip Nav ---------- */
/* Defined in base.css — no override needed */

/* .sr-only — defined in base.css */

/* ---------- Responsive: Tablet ---------- */

/* ---------- Mobile Menu Toggle ---------- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span,
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 1024px) {
  .depth-split {
    grid-template-columns: 1fr;
  }

  .depth-grid--2col {
    grid-template-columns: 1fr;
  }

  .depth-section--overlap {
    /* overlap removed */
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Responsive: Mobile ---------- */
@media (max-width: 640px) {
  .depth-header .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
  }

  .depth-header .main-nav.is-open {
    display: block;
  }

  .depth-header .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
  }

  .depth-header .mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
  }

  .depth-main {
    padding-top: 60px;
  }

  .depth-section--hero {
    min-height: 70vh;
  }

  .depth-section--overlap {
    /* overlap removed */
  }

  .depth-plane,
  .depth-plane--elevated {
    padding: 2rem 1rem;
  }

  .depth-content {
    padding: 2rem 1rem;
  }

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

  .depth-actions {
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .depth-layer--bg,
  .depth-layer--mid {
    will-change: auto;
  }
}

/* ---------- Header Contract — readable white header ----------
   The shared style layer paints every <nav> dark and sets `.site-header a`
   to the inverse color. This architecture uses a white header, so force the
   inner navs transparent and links dark for guaranteed contrast. These rules
   are unlayered, so they beat the style's @layer rules. */
.site-header {
  background: var(--color-bg, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-bottom: none;
}
.main-nav,
nav.breadcrumb {
  background: transparent;
  border-bottom: none;
}
.nav-item > a,
.nav-list a {
  color: var(--color-text);
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 600;
}
.nav-item > a:hover,
.nav-item.active > a,
.nav-list a:hover,
.nav-list a[aria-current="page"],
.nav-list a.active {
  color: var(--color-primary);
}
.phone-cta,
.header-phone {
  color: var(--color-primary);
}
.breadcrumb,
.breadcrumb a {
  color: var(--color-text-light);
}
.breadcrumb a:hover {
  color: var(--color-primary);
}

/* ---------- Blog listing — stacked, readable article cards ----------
   The .depth-grid (built for short program cards) would cram full articles
   into narrow columns. On the blog, stack them as full-width, image-left/
   text-right cards for a real magazine-style reading layout. */
.blog-list {
  display: flex !important;
  flex-direction: column;
  gap: 2rem;
  max-width: 940px;
  margin: 0 auto;
  width: 100%;
}
.blog-list .depth-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  align-items: stretch;
  text-align: left;
}
.blog-list .depth-card > img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  margin: 0;
}
.blog-list .depth-card__body { padding: 1.75rem; }
.blog-list .depth-card .blog-meta {
  display: block;
  color: var(--color-primary, #3a6b5e);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.blog-list .depth-card h3 { margin: 0 0 0.6rem; line-height: 1.25; }
.blog-list .depth-card p { margin: 0 0 0.85rem; }
@media (max-width: 768px) {
  .blog-list .depth-card { grid-template-columns: 1fr; }
  .blog-list .depth-card > img { min-height: 200px; }
}

/* ---------- Hero / CTA background image as a true cover ----------
   Parallax was disabled, leaving the .depth-layer--bg image as a relative
   flex item that rendered at full natural size (unnaturally large). Pin the
   background layer to cover the section behind the foreground content, with a
   dark overlay so the headline stays readable over the photo. */
.depth-section--hero,
.depth-section--cta,
.depth-section--page-hero:has(> .depth-layer--bg) {
  position: relative;
  overflow: hidden;
}
.depth-section--hero > .depth-layer--bg,
.depth-section--cta > .depth-layer--bg,
.depth-section--page-hero > .depth-layer--bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.depth-section--hero > .depth-layer--bg img,
.depth-section--cta > .depth-layer--bg img,
.depth-section--page-hero > .depth-layer--bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.depth-section--hero > .depth-layer--bg::after,
.depth-section--cta > .depth-layer--bg::after,
.depth-section--page-hero > .depth-layer--bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 38, 0.58);
}
.depth-section--hero > .depth-layer--fg,
.depth-section--cta > .depth-layer--fg,
.depth-section--page-hero > .depth-layer--fg {
  position: relative;
  z-index: 2;
  width: 100%;
}
.depth-section--hero h1, .depth-section--hero p,
.depth-section--cta:has(> .depth-layer--bg) h2,
.depth-section--cta:has(> .depth-layer--bg) p,
.depth-section--page-hero:has(> .depth-layer--bg) h1,
.depth-section--page-hero:has(> .depth-layer--bg) p {
  color: #ffffff !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Decorative background-image bands in overlap sections rendered at full
   natural height (too tall). Cap them to a consistent accent-strip height. */
.depth-section--overlap > .depth-layer--bg {
  max-height: 360px;
  overflow: hidden;
}
.depth-section--overlap > .depth-layer--bg img {
  height: 360px;
  object-fit: cover;
}
