/* ========== Header ========== */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
}
.site-header.solid {
  position: sticky;
  top: 0;
  background: rgba(10, 13, 18, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.brand-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.22);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text .name {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--white);
  text-transform: uppercase;
}
.brand-text .sub {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.site-nav a {
  position: relative;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--off);
  padding: 0.5rem 0;
  transition: color var(--t);
}
.site-nav a.active {
  color: var(--white);
}
.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--blue);
}
.site-nav a:hover {
  color: var(--white);
}

/* ========== Title Rule ========== */
.title-rule {
  width: 64px;
  height: 3px;
  background: var(--blue);
  margin: 1.4rem 0 1.5rem;
}
.title-rule.thin {
  height: 2px;
  width: 48px;
}
.title-rule.center {
  margin-left: auto;
  margin-right: auto;
}

/* ========== Page hero (inner pages) ========== */
.page-hero {
  position: relative;
  padding: 9rem 0 4rem;
  background:
    radial-gradient(
      ellipse at top right,
      rgba(59, 130, 246, 0.16),
      transparent 55%
    ),
    linear-gradient(180deg, #0a0d12 0%, #0f1318 100%);
  border-bottom: 1px solid var(--line-blue);
  overflow: hidden;
}
.page-hero .crumbs {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.page-hero .crumbs a {
  color: var(--blue);
}
.page-hero .crumbs .sep {
  margin: 0 0.6rem;
  color: var(--muted);
}
.page-hero h1 {
  font-size: clamp(2.8rem, 5.4vw, 4.6rem);
  line-height: 0.96;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 900;
  color: var(--white);
  max-width: 14ch;
}
.page-hero h1 .blue {
  color: var(--blue);
}
.page-hero .lede {
  margin-top: 1.5rem;
  max-width: 56ch;
  color: var(--off);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ========== Section base ========== */
.section {
  padding: 5.5rem 0;
}
.section.tight {
  padding: 4rem 0;
}
.section-dark {
  background: var(--ink);
}
.section-darker {
  background: var(--black);
}
.section-light {
  background: var(--light-bg);
  color: var(--light-ink);
}

.eyebrow {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.1rem;
}
.section-heading {
  max-width: 740px;
  margin-bottom: 2.6rem;
}
.section-heading.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.6rem;
}
.section-heading h2 {
  font-size: clamp(2rem, 2.8vw, 2.7rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-heading.center h2 {
  color: inherit;
}
.section-heading p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 60ch;
}
.section-heading.center p {
  margin-left: auto;
  margin-right: auto;
}
.section-light .section-heading p {
  color: var(--light-muted);
}

/* ========== Split ========== */
.split-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split-grid.reverse > :first-child {
  order: 2;
}
.image-card {
  position: relative;
  aspect-ratio: 4/3.4;
  background: var(--graphite);
  overflow: hidden;
  border: 1px solid var(--line);
}
.image-card.flat {
  aspect-ratio: 4/3;
}
.section-copy h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.6rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.section-copy .title-rule {
  margin: 0 0 1.6rem;
}
.section-copy p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 1.4rem;
  max-width: 56ch;
}
.section-copy p + p {
  margin-top: -0.2rem;
}
.section-copy ul {
  list-style: none;
  margin: 0.4rem 0 1.6rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.section-copy ul li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--off);
  font-size: 0.94rem;
}
.section-copy ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  background: var(--blue);
  transform: rotate(45deg);
}

/* ========== Responsive ========== */
@media (max-width: 1020px) {
  .site-nav {
    display: none;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-item:nth-child(2) {
    border-right: none;
  }
  .split-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }
  .split-grid.reverse > :first-child {
    order: 0;
  }
  .project-grid,
  .project-grid.three {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .capability-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-row .stat:nth-child(2) {
    border-right: none;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .cta-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .hero-content {
    padding: 7rem 0 4rem;
  }
  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }
  .page-hero {
    padding: 7rem 0 3rem;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .trust-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .project-grid,
  .project-grid.three,
  .service-grid,
  .capability-list,
  .stats-row,
  .steps {
    grid-template-columns: 1fr;
  }
  .stats-row .stat {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-cta {
    display: none;
  }
  .quote-form .row {
    grid-template-columns: 1fr;
  }
}

/* ========== Mobile drawer / hamburger rebuild ========== */
body.menu-open {
  overflow: hidden;
}

.site-header {
  transition:
    transform 320ms ease,
    opacity 320ms ease;
}

.site-header.is-scrolled {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  width: 48px;
  height: 48px;
  display: none;
  place-items: center;
  position: relative;
  z-index: 1001;
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: rgba(10, 13, 18, 0.18);
  cursor: pointer;
}

.nav-toggle span,
.floating-menu span {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
  transition:
    transform 280ms ease,
    opacity 220ms ease;
}

.nav-toggle span:nth-child(1),
.floating-menu span:nth-child(1) {
  transform: translateY(-7px);
}

.nav-toggle span:nth-child(2),
.floating-menu span:nth-child(2) {
  transform: translateY(0);
}

.nav-toggle span:nth-child(3),
.floating-menu span:nth-child(3) {
  transform: translateY(7px);
}

.nav-toggle.is-open span:nth-child(1),
.floating-menu.is-open span:nth-child(1) {
  transform: rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2),
.floating-menu.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3),
.floating-menu.is-open span:nth-child(3) {
  transform: rotate(-45deg);
}

.floating-menu {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 1001;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.55);
  background: rgba(10, 13, 18, 0.72);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 24px rgba(59, 130, 246, 0.18),
    inset 0 0 18px rgba(255, 255, 255, 0.035);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-14px) scale(0.9);
  cursor: pointer;
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    border-color var(--t),
    box-shadow var(--t);
}

.floating-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 92vw);
  height: 100%;
  padding: 2rem;
  background:
    radial-gradient(
      ellipse at top right,
      rgba(59, 130, 246, 0.12),
      transparent 50%
    ),
    linear-gradient(180deg, rgba(15, 19, 24, 0.985), rgba(8, 11, 16, 0.99));
  border-left: 1px solid rgba(59, 130, 246, 0.36);
  box-shadow:
    -22px 0 70px rgba(0, 0, 0, 0.58),
    inset 1px 0 18px rgba(59, 130, 246, 0.1);
  transform: translateX(100%);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.is-open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.menu-logo {
  width: 230px;
  height: auto;
  object-fit: contain;
}

.menu-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(59, 130, 246, 0.42);
  background: rgba(255, 255, 255, 0.03);
  color: var(--blue);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu-nav {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.mobile-menu-nav a {
  padding: 0.95rem 0;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--off);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateX(24px);
  transition:
    opacity 360ms ease,
    transform 360ms ease,
    color var(--t),
    padding-left var(--t);
}

.mobile-menu.is-open .mobile-menu-nav a {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu.is-open .mobile-menu-nav a:nth-child(1) {
  transition-delay: 0.06s;
}
.mobile-menu.is-open .mobile-menu-nav a:nth-child(2) {
  transition-delay: 0.1s;
}
.mobile-menu.is-open .mobile-menu-nav a:nth-child(3) {
  transition-delay: 0.14s;
}
.mobile-menu.is-open .mobile-menu-nav a:nth-child(4) {
  transition-delay: 0.18s;
}
.mobile-menu.is-open .mobile-menu-nav a:nth-child(5) {
  transition-delay: 0.22s;
}
.mobile-menu.is-open .mobile-menu-nav a:nth-child(6) {
  transition-delay: 0.26s;
}

.mobile-menu-nav a:hover {
  color: var(--blue-bright);
  padding-left: 0.7rem;
}

.menu-quote-btn {
  width: 100%;
  min-height: 52px;
}

@media (max-width: 1020px) {
  .nav-toggle {
    display: grid;
  }
}

/* ========== Landing page polish pass ========== */

/* Larger logo treatment in navbar and footer */
.site-header .brand-mark {
  width: 76px;
  height: 76px;
}

.site-header .brand-divider {
  height: 42px;
}

.site-header .brand-text .name {
  font-size: 0.9rem;
}

.site-header .brand-text .sub {
  font-size: 0.7rem;
}

.footer-brand .brand-mark {
  width: 150px;
  height: auto;
}

.footer-brand {
  max-width: 340px;
}

.footer-brand .brand-text {
  margin-top: 12px;
}

.footer-brand .brand-text .name {
  font-size: 1.4rem;
  letter-spacing: 0.08em;
}

.footer-brand .brand-text .sub {
  font-size: 0.95rem;
  letter-spacing: 0.14em;
}

.footer-brand .brand-divider {
  height: 48px;
}

.footer-brand .brand-text .name {
  font-size: 0.94rem;
}

.footer-brand .brand-text .sub {
  font-size: 0.72rem;
}

/* Clickable license lookup + custom trust icons */
.trust-link {
  transition:
    transform var(--t),
    filter var(--t),
    opacity var(--t);
}

.trust-link:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.28));
}

.trust-logo {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
}

.ca-gov-logo {
  width: 56px;
  height: auto;
}

.california-logo {
  width: 42px;
  height: auto;
}

@media (max-width: 600px) {
  .site-header .brand-mark {
    width: 58px;
    height: 58px;
  }

  .footer-brand .brand-mark {
    width: 72px;
    height: 72px;
  }

  .ca-gov-logo {
    width: 50px;
  }

  .california-logo {
    width: 38px;
  }
}
