/* ==========================================================================
   Layout — Container, grid, sections, header, footer
   ========================================================================== */

/* --- Container --- */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container--narrow {
  max-width: var(--content-max);
}

.container--form {
  max-width: 640px;
}

/* --- Grid --- */

.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-7-5 {
  grid-template-columns: 7fr 5fr;
  gap: var(--space-12);
}

@media (max-width: 1024px) {
  .grid-7-5 {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-7-5 {
    grid-template-columns: 1fr;
  }
}

/* --- Sections --- */

.section {
  padding: var(--space-20) 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--dark p {
  color: rgba(248, 250, 252, 0.7);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header p {
  margin: 0 auto;
  color: var(--text-secondary);
  max-width: 560px;
}

.section--dark .section-header p {
  color: rgba(248, 250, 252, 0.7);
}

@media (max-width: 640px) {
  .section {
    padding: var(--space-12) 0;
  }
  .section-header {
    margin-bottom: var(--space-8);
  }
}

/* --- Site Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease-normal);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-8);
}

.site-logo {
  flex-shrink: 0;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-logo a {
  border-bottom: none;
}

.site-nav,
.site-nav ul,
.site-nav li {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-inline-start: auto;
}

.site-nav > ul,
.site-nav .menu {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.site-nav a {
  font-size: 15px;
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  border-bottom: none;
  transition: color var(--ease-fast);
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav .nav-phone {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--text-secondary);
}

.nav-cta {
  margin-inline-start: var(--space-4);
}

.nav-cta .btn {
  padding: 10px 24px;
  font-size: var(--text-small);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--text-primary);
}

.hamburger svg {
  width: 24px;
  height: 24px;
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-mobile-nav);
  background: var(--bg);
  padding: var(--space-20) var(--space-6) var(--space-6);
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  border-bottom: none;
}

.mobile-nav .btn {
  width: 100%;
  max-width: 300px;
  margin-top: var(--space-4);
}

.mobile-nav-close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: var(--space-2);
}

.mobile-nav-close svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 1024px) {
  .site-nav {
    display: none;
  }
  .hamburger {
    display: block;
    margin-inline-start: auto;
  }
}

/* --- Mobile Bottom Bar --- */

.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: 56px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-bar .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100%;
}

.mobile-bottom-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  border-bottom: none;
  text-decoration: none;
}

.mobile-bottom-bar a:last-child {
  color: var(--accent);
}

.mobile-bottom-bar svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .mobile-bottom-bar {
    display: block;
  }
  body {
    padding-bottom: 56px;
  }
}

/* --- Site Footer --- */

.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  font-size: var(--text-small);
  color: rgba(248, 250, 252, 0.5);
  margin-bottom: var(--space-5);
  max-width: 240px;
}

.footer-contact {
  font-size: var(--text-small);
  color: rgba(248, 250, 252, 0.7);
  margin-bottom: var(--space-2);
}

.footer-contact a {
  color: rgba(248, 250, 252, 0.7);
  font-weight: var(--weight-regular);
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.footer-social a {
  color: rgba(248, 250, 252, 0.5);
  border-bottom: none;
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-col h4 {
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--text-on-dark);
  margin-bottom: var(--space-5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-col li {
  margin-bottom: var(--space-3);
}

.footer-col a {
  font-size: var(--text-small);
  color: rgba(248, 250, 252, 0.6);
  font-weight: var(--weight-regular);
  border-bottom: none;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(248, 250, 252, 0.4);
}

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

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }
}

/* --- Hero --- */

.hero {
  padding: var(--space-24) 0 var(--space-20);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-soft) 100%);
}

/* Large decorative accent circle — top right */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: var(--accent-light);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* Smaller accent ring — bottom left */
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 60px solid var(--accent-light);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
  max-width: 480px;
}

/* Accent bar left of hero heading */
.hero h1 {
  position: relative;
  padding-left: var(--space-6);
}

.hero h1::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.hero-checks {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}

.hero-check svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex-shrink: 0;
}

/* --- Trust Bar --- */

.trust-bar {
  padding: var(--space-5) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 640px) {
  .trust-bar .container {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* --- Breadcrumb spacing --- */

.breadcrumb {
  padding-top: var(--space-4);
}

/* --- Hero variant for inner pages --- */

.hero--page {
  padding: var(--space-12) 0 var(--space-10);
}

/* --- Quote Form Container --- */

.quote-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.quote-form-card h2 {
  font-size: var(--text-h3);
  margin-bottom: var(--space-6);
}

.quote-form-trust {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-5);
  font-size: var(--text-small);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .hero {
    padding: var(--space-12) 0;
  }
  .hero::before {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -80px;
  }
  .hero::after {
    display: none;
  }
  .hero h1 {
    padding-left: var(--space-5);
  }
  .quote-form-card {
    padding: var(--space-6);
  }
}

/* --- Content Area (articles, service pages) --- */

.content-area {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-16) var(--space-6);
}

.content-area h2 {
  margin-top: var(--space-10);
}

.content-area h2:first-child {
  margin-top: 0;
}

/* --- Scroll fade-in --- */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--ease-slow), transform var(--ease-slow);
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
