/* ==========================================================================
   High Cliffs POA — layout.css
   Containers, top bar, header/nav, footer
   ========================================================================== */

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

.section { padding-block: var(--section-pad); }
.section--mist { background: var(--granite-mist); }
.section--evergreen {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(200, 155, 74, 0.12), transparent 60%),
    var(--evergreen);
  color: #E9EDE8;
}
.section--evergreen h2,
.section--evergreen h3 { color: #fff; }
.section--evergreen p { color: #CBD4CC; }

/* Topographic contour texture — the site's signature background */
.section--topo { position: relative; overflow: hidden; }
.section--topo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%2322382C' stroke-opacity='0.07' stroke-width='1.4'%3E%3Cpath d='M60 210c0-80 70-140 150-140s150 60 150 140-70 140-150 140S60 290 60 210z'/%3E%3Cpath d='M95 210c0-62 53-108 115-108s115 46 115 108-53 108-115 108S95 272 95 210z'/%3E%3Cpath d='M130 210c0-44 36-76 80-76s80 32 80 76-36 76-80 76-80-32-80-76z'/%3E%3Cpath d='M165 210c0-26 19-44 45-44s45 18 45 44-19 44-45 44-45-18-45-44z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 420px 420px;
  pointer-events: none;
}
.section--topo > * { position: relative; }

/* Ridgeline divider */
.ridge-divider {
  display: block;
  width: 100%;
  height: 42px;
  color: var(--granite-mist);
}
.ridge-divider--evergreen { color: var(--evergreen); }

/* --------------------------------------------------------------------------
   Top utility bar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--basalt);
  color: #C9CFC9;
  font-size: var(--fs-small);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
}
.topbar__tags {
  display: flex;
  gap: 1.4rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.topbar__tags li { display: flex; align-items: center; gap: 0.5rem; }
.topbar__tags li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ridgeline-gold);
}
.topbar__cta {
  color: var(--gold-soft);
  font-weight: 700;
  white-space: nowrap;
}
.topbar__cta:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--transition);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(27, 32, 29, 0.10); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 82px;
}

/* --- Brand: oversized logo hanging below the header --- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  align-self: flex-start;      /* pin to the top of the header bar */
  position: relative;
  z-index: 110;                /* float above the page content below */
}

.brand img {
  height: 110px;               /* ~2x bigger — adjust to taste */
  width: auto;
  margin-top: 8px;
  margin-bottom: -46px;        /* pulls the logo past the header's bottom edge */
  filter: drop-shadow(0 6px 14px rgba(27, 32, 29, 0.25));
  transition: height var(--transition), margin var(--transition);
}

/* Shrink the overhang once the user scrolls, so it doesn't cover content */
.site-header.is-scrolled .brand img {
  height: 72px;
  margin-bottom: -18px;
}

/* Smaller overhang on phones */
@media (max-width: 900px) {
  .brand img {
    height: 78px;
    margin-bottom: -26px;
  }
  .site-header.is-scrolled .brand img {
    height: 58px;
    margin-bottom: -8px;
  }
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.primary-nav a {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding-block: 0.4rem;
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--ridgeline-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav a[aria-current="page"] { color: var(--evergreen); }

.header-address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--evergreen);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .header-address { display: none; }
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
  }
  .primary-nav.is-open { max-height: 420px; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 0;
  }
  .primary-nav a {
    display: block;
    padding: 0.9rem 6%;
  }
  .primary-nav a::after { display: none; }
  .primary-nav a[aria-current="page"] {
    background: var(--granite-mist);
    border-left: 3px solid var(--ridgeline-gold);
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--basalt);
  color: #B9C1BA;
  padding-top: var(--section-pad);
  font-size: 0.95rem;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.site-footer a { color: #D7DDD6; }
.site-footer a:hover { color: var(--gold-soft); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand img { max-width: 250px; margin-bottom: 1.25rem; }
.footer-brand p { color: #9AA39B; }

.footer-list li { margin-bottom: 0.55rem; }

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.footer-social a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  transition: border-color var(--transition), background var(--transition);
}
.footer-social a:hover {
  border-color: var(--ridgeline-gold);
  background: rgba(200,155,74,0.12);
}
.footer-social svg { width: 17px; height: 17px; fill: currentColor; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-block: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: #8B948C;
}
.footer-bottom ul { display: flex; gap: 1.5rem; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.4rem; }
}
