/* ==========================================================================
   layout.css — container, section scaffolding, grids, header/nav, footer
   ========================================================================== */

/* Container & sections ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding-block: var(--section-pad);
  scroll-margin-top: calc(var(--nav-h) + var(--subnav-h) + 8px);
}
.section--tight { padding-block: 2rem; }
.section--bordered { border-top: 1px solid var(--line); }

.section--surface { background: var(--surface); }
.section--white   { background: var(--white); }
.section--navy    { background: var(--navy); }
.section--navy-mid{ background: var(--navy-mid); }
.section--red     { background: var(--red); }

/* Section heading block ---------------------------------------------------- */
.section-head { margin-bottom: var(--gap); }
.section-head--center { text-align: center; }

.section-head__title {
  font-size: clamp(22px, 4.5vw, 32px);
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.section-head__title--lg { font-size: clamp(22px, 4.5vw, 34px); }
.section-head__title em,
.section-head__title span { font-style: normal; color: var(--blue); }

.section-head__text {
  font-size: clamp(14px, 2.5vw, 15px);
  line-height: 1.7;
  color: var(--muted);
  max-width: 48rem;
}
.section-head--center .section-head__text { margin-inline: auto; max-width: 640px; }

.section--navy .section-head__title,
.section--navy-mid .section-head__title { color: var(--white); }
.section--navy .section-head__title span,
.section--navy .section-head__title em,
.section--navy-mid .section-head__title span,
.section--navy-mid .section-head__title em { color: var(--amber); }
.section--navy-mid .section-head__text { color: rgba(255, 255, 255, 0.7); }

/* Grids -------------------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }

.grid--faults   { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.grid--process  { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid--tiles    { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
.grid--cards-2,
.grid--cards-3,
.grid--cards-4,
.grid--faq      { grid-template-columns: 1fr; }
.grid--faq      { gap: 0.75rem; align-items: start; }

@media (min-width: 640px) {
  .grid--faults  { grid-template-columns: repeat(3, 1fr); }
  .grid--tiles   { grid-template-columns: repeat(3, 1fr); }
  .grid--cards-2,
  .grid--cards-3,
  .grid--cards-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid--faults  { grid-template-columns: repeat(4, 1fr); }
  .grid--tiles   { grid-template-columns: repeat(4, 1fr); }
  .grid--process { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1024px) {
  .grid--cards-3 { grid-template-columns: repeat(3, 1fr); }
  .grid--cards-4 { grid-template-columns: repeat(4, 1fr); }
  .grid--tiles   { grid-template-columns: repeat(6, 1fr); }
  .grid--faq     { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .grid--faults  { grid-template-columns: repeat(6, 1fr); }
}

/* Header / primary navigation ---------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 4px solid var(--red);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.site-nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 5px;
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}
.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
}
.brand__name span { color: var(--amber); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-nav__actions .btn--nav { display: none; }

.site-nav__toggle {
  padding: 0.5rem;
  color: var(--white);
}
.site-nav__toggle .icon--close { display: none; }
.site-nav__toggle[aria-expanded="true"] .icon--open  { display: none; }
.site-nav__toggle[aria-expanded="true"] .icon--close { display: block; }

/* Menu: dropdown panel on mobile, inline list on desktop */
.site-nav__menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--navy-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.site-nav__menu.is-open { display: flex; }

.site-nav__links { display: flex; flex-direction: column; gap: 0.25rem; }
.site-nav__links a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  transition: color .15s, background-color .15s;
}
.site-nav__links a:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }

.site-nav__panel-cta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
  .site-nav__actions .btn--nav { display: inline-flex; }
}

@media (min-width: 1024px) {
  .site-nav__toggle { display: none; }
  .site-nav__panel-cta { display: none; }

  .site-nav__menu {
    display: flex;
    position: static;
    flex-direction: row;
    padding: 0;
    background: none;
    border: 0;
  }
  .site-nav__links { flex-direction: row; }
  .site-nav__links a { padding: 0.5rem 0.75rem; font-size: 13px; }
}

/* Sticky quick links (below hero) ------------------------------------------ */
.quick-links {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: var(--navy-mid);
  border-block: 1px solid rgba(255, 255, 255, 0.1);
}
.quick-links__list {
  display: flex;
  gap: 0.25rem;
  padding-block: 0.625rem;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.quick-links__list::-webkit-scrollbar { display: none; }
.quick-links__list a {
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  transition: color .15s, background-color .15s;
}
.quick-links__list a:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }

/* Footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--navy);
  padding-top: 3rem;
  padding-bottom: 100px; /* clearance for the floating call bar */
}

.site-footer__grid {
  display: grid;
  gap: var(--gap);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 768px) {
  .site-footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}

.site-footer__brand {
  margin-bottom: 0.5rem;
  font-size: 18px;
  font-weight: 900;
  color: var(--white);
}
.site-footer__brand span { color: var(--amber); }

.site-footer__about {
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__social { display: flex; gap: 0.5rem; margin-top: 1rem; }
.site-footer__social span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__callbox {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}
.site-footer__callbox-label {
  margin-bottom: 0.25rem;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}
.site-footer__callbox a { font-size: 17px; font-weight: 900; color: var(--white); }

.site-footer__heading {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}
.site-footer__heading--spaced { margin-top: 1.5rem; }

.site-footer__links a {
  display: block;
  margin-bottom: 0.625rem;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.45);
  transition: color .15s;
}
.site-footer__links a:hover { color: rgba(255, 255, 255, 0.9); }

.site-footer__contact {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.4);
}
.site-footer__contact a { color: rgba(255, 255, 255, 0.45); }
.site-footer__contact a:hover { color: var(--white); }

.site-footer__legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-block: 1.25rem;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}
.site-footer__legal ul { display: flex; gap: 0.75rem; }
.site-footer__legal li + li::before { content: "·"; margin-right: 0.75rem; }
@media (min-width: 768px) {
  .site-footer__legal { flex-direction: row; }
}
