/* header */
/* ── Header shell ────────────────────────────────────────────── */
.nsx-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
  width: 100%;
}

/* ── Inner bar ────────────────────────────────────────────────── */
.nsx-header-inner {
  height: 68px;
  gap: 1rem;
}

/* ── Logo link ───────────────────────────────────────────────── */
.nsx-logo-link {
  text-decoration: none;
  outline-offset: 4px;
  border-radius: 4px;
}

/* ── Desktop nav: hidden on mobile, visible on desktop ─────── */
.nsx-desktop-nav {
  display: none;
  justify-content: center;
}

/* ── Phone link ──────────────────────────────────────────────── */
.nsx-phone-link {
  color: var(--color-text-inverse);
  text-decoration: none;
  gap: 0.4rem;
  white-space: nowrap;
  opacity: 0.88;
  border-radius: 4px;
  padding: 4px 6px;
  transition: opacity 0.2s ease;
}

.nsx-phone-icon {
  flex-shrink: 0;
}

.nsx-phone-text {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ── Header actions group ────────────────────────────────────── */
.nsx-header-actions {
  display: none;
  gap: 1.25rem;
  align-items: center;
}

/* ── CTA button spacing tweak ─────────────────────────────────── */
.nsx-cta-btn {
  white-space: nowrap;
}

/* ── Hamburger button ────────────────────────────────────────── */
.nsx-hamburger {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  color: var(--color-text-inverse);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.nsx-hamburger:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
}

.nsx-hamburger-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  width: 24px;
  height: 20px;
  gap: 0;
  position: relative;
}

.nsx-bar {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.25s ease;
}

.nsx-bar-top { width: 24px; top: 0; }
.nsx-bar-mid { width: 18px; top: 9px; right: 0; }
.nsx-bar-bot { width: 24px; top: 18px; }

/* Hamburger → X when open */
.nsx-site-header.nsx-menu--open .nsx-bar-top {
  transform: translateY(9px) rotate(45deg);
}
.nsx-site-header.nsx-menu--open .nsx-bar-mid {
  opacity: 0;
  transform: scaleX(0);
}
.nsx-site-header.nsx-menu--open .nsx-bar-bot {
  transform: translateY(-9px) rotate(-45deg);
}

/* ── Drawer overlay ──────────────────────────────────────────── */
.nsx-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nsx-site-header.nsx-menu--open ~ .nsx-drawer-overlay,
.nsx-drawer-overlay.nsx-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Mobile drawer ───────────────────────────────────────────── */
.nsx-mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 90vw);
  height: 100dvh;
  background: linear-gradient(160deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -4px 0 32px rgba(0,0,0,0.22);
}

.nsx-mobile-drawer.nsx-drawer--open {
  transform: translateX(0);
}

/* ── Drawer header ───────────────────────────────────────────── */
.nsx-drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* ── Drawer close button ─────────────────────────────────────── */
.nsx-drawer-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-inverse);
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.nsx-drawer-close:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
}

/* ── Drawer nav area ─────────────────────────────────────────── */
.nsx-drawer-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

/* ── Drawer footer actions ───────────────────────────────────── */
.nsx-drawer-actions {
  padding: 1.25rem;
  gap: 0.875rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.nsx-phone-drawer {
  justify-content: center;
  padding: 0.5rem 0;
}

/* ── Responsive: show desktop nav + actions, hide hamburger ─── */
@media (min-width: 1024px) {
  .nsx-desktop-nav {
    display: flex;
  }

  .nsx-header-actions {
    display: flex;
  }

  .nsx-hamburger {
    display: none;
  }
}
/* footer */
/* ============================================================
   PACIFIC HOMES — SITE FOOTER
   All colours via brand tokens; nsx-* prefix throughout.
   Background lives on <footer>; inner divs are transparent.
   ============================================================ */

/* --- Footer shell --- */
.nsx-footer {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-text-inverse);
}

/* --- Column area: breathing room top + bottom --- */
.nsx-footer-cols {
  padding-top: var(--space-2xl, 3.5rem);
  padding-bottom: var(--space-xl, 2.5rem);
}

/* --- Individual column: no extra width tricks,
       the grid handles everything --- */
.nsx-footer-col {
  display: flex;
  flex-direction: column;
}

/* --- Tagline beneath logo --- */
.nsx-footer-tagline {
  margin-top: var(--space-md, 1rem);
  margin-bottom: var(--space-md, 1rem);
  opacity: 0.8;
  line-height: 1.6;
}

/* --- Section headings inside footer ---
       h2 styled small + uppercase but ALWAYS has gap below. --- */
.nsx-footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 0;
  margin-bottom: var(--space-md, 1rem);
  padding-bottom: var(--space-xs, 0.4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Give the logo column its heading a proper top gap
   so it doesn't sit immediately after the tagline paragraph */
.nsx-footer-col:first-child .nsx-footer-heading {
  margin-top: var(--space-sm, 0.5rem);
}

/* --- Address block --- */
.nsx-footer-address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 0.4rem);
  line-height: 1.7;
}

.nsx-footer-address-line {
  opacity: 0.85;
}

/* --- Generic footer link (phone, etc.) --- */
.nsx-footer-link {
  color: var(--color-text-inverse);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.nsx-footer-link:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Body paragraphs inside columns --- */
.nsx-footer-body {
  opacity: 0.8;
  line-height: 1.7;
  margin-top: 0;
  margin-bottom: var(--space-sm, 0.75rem);
}

/* --- Service area list --- */
.nsx-footer-area-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 0.4rem);
}

.nsx-footer-area-list li {
  opacity: 0.8;
  padding-left: 0.9rem;
  position: relative;
  line-height: 1.5;
}

.nsx-footer-area-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-text-inverse);
  opacity: 0.5;
}

/* --- Social links list --- */
.nsx-footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 0.4rem);
}

/* --- Individual social link --- */
.nsx-footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs, 0.5rem);
  color: var(--color-text-inverse);
  text-decoration: none;
  font-size: 0.875rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 0.25rem 0;
}

.nsx-footer-social-link:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
  border-radius: 2px;
  opacity: 1;
}

.nsx-footer-social-link svg {
  flex-shrink: 0;
}

/* --- Divider between columns and bottom bar --- */
.nsx-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-md, 1.25rem);
  padding-bottom: var(--space-lg, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm, 0.75rem);
}

/* --- Copyright text --- */
.nsx-footer-copy {
  margin: 0;
  opacity: 0.65;
  line-height: 1.5;
}

/* --- Legal nav (platform fills this menu) --- */
.nsx-footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm, 0.75rem);
}

/* ============================================================
   RESPONSIVE TWEAKS
   The ns-grid-cols-4 already stacks to 1 col on mobile and
   expands at 1024px. These rules only fine-tune spacing.
   ============================================================ */

/* On mobile (< 1024px) the logo column heading gets extra breathing room */
@media (max-width: 1023px) {
  .nsx-footer-cols {
    padding-top: var(--space-xl, 2.5rem);
    padding-bottom: var(--space-lg, 2rem);
  }

  .nsx-footer-col + .nsx-footer-col {
    padding-top: var(--space-md, 1rem);
  }

  .nsx-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
