/* Fairfax Foster Ltd — one-page site
   Palette sampled from the logo (navy / blue) and the hero truck (orange). */
:root {
  --navy: #032d5b;
  --navy-rich: #083868;
  --navy-deep: #021a36;
  --blue: #0858a8;
  --blue-bright: #2a7ac8;
  --cta: #c44a32;
  --cta-hover: #a83b28;
  --ink: #1c2430;
  --muted: #4a5560;
  --line: #d7dee8;
  --paper: #f3f6fa;
  --white: #ffffff;
  --header-h: 5.5rem;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(3, 45, 91, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 72rem;
  --focus: 0 0 0 3px #ffffff, 0 0 0 6px var(--blue-bright);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--navy);
}

:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0 40%, var(--blue-bright) 40% 70%, var(--cta) 70% 100%);
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(3, 45, 91, 0.1);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo img {
  width: auto;
  height: 4.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--blue);
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--cta);
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  position: relative;
  margin: 0 auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 800px) {
  .logo img { height: 3.5rem; }
  :root { --header-h: 4.75rem; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.5rem 0 1rem;
  }

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

  .site-nav a,
  .site-nav .header-phone {
    padding: 0.85rem 1.25rem;
  }

  body.nav-open { overflow: hidden; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.btn-cta {
  background: var(--cta);
  color: var(--white);
  border-color: var(--cta);
}

.btn-cta:hover,
.btn-cta:focus-visible {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-navy:hover,
.btn-navy:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: max(32rem, calc(100svh - var(--header-h)));
  display: flex;
  align-items: flex-end;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 45%;
  z-index: -2;
}

.hero-media img { max-width: none; }

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 26, 54, 0.35) 0%, rgba(3, 45, 91, 0.45) 40%, rgba(2, 18, 40, 0.82) 100%),
    linear-gradient(90deg, rgba(2, 18, 40, 0.55) 0%, rgba(2, 18, 40, 0.1) 55%);
}

.hero-copy {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
  padding: 4.5rem 0 4rem;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.15rem, 5.2vw, 4.1rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  max-width: 14ch;
  font-weight: 800;
  text-wrap: balance;
}

.hero-copy p {
  margin: 0 0 1.6rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 34rem;
  color: #e7eef6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.kicker {
  display: inline-block;
  margin: 0 0 0.6rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 40rem;
  font-size: 1.1rem;
}

/* Services */
.services {
  background: var(--white);
}

.service-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: stretch;
}

.service-photo {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 100%;
}

.service-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 22rem;
}

.service-photo figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.service-cards {
  display: grid;
  gap: 1.1rem;
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.3rem;
  border: 1px solid #e6ebf2;
  border-left: 4px solid var(--blue);
}

.card h3 {
  margin: 0 0 0.45rem;
  color: var(--navy);
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.service-cta {
  margin-top: 0.4rem;
}

/* Why us */
.why {
  background: var(--paper);
}

.points {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.points li {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid #e8edf3;
}

.points strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.4rem;
  font-size: 1.08rem;
}

.points p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Gallery */
.gallery {
  padding: 0;
  background: var(--navy-deep);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.4rem;
  grid-auto-rows: 22rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  height: 100%;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gallery-grid figure:hover img {
    transform: scale(1.04);
  }
}

.gallery-grid figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Payments */
.payments {
  background: var(--white);
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--line);
}

.payments .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
}

.payments h2 {
  font-size: 1.15rem;
  margin: 0;
  letter-spacing: 0;
}

.pay-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pay-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  min-width: 7.75rem;
  height: 4.15rem;
  box-shadow: 0 1px 2px rgba(3, 45, 91, 0.04);
}

.pay-list img {
  height: 2.5rem;
  width: auto;
  max-width: 7.25rem;
}

/* Team */
.team {
  background: var(--paper);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.person {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.2rem 1.4rem;
  text-align: center;
  border: 1px solid #e8edf3;
  box-shadow: var(--shadow);
}

.avatar {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.avatar-db { background: var(--navy); }
.avatar-ls { background: var(--blue); }
.avatar-dp { background: var(--blue-bright); }
.avatar-ed { background: #0a4a7a; }

.person h3 {
  margin: 0 0 0.2rem;
  color: var(--navy);
  font-size: 1.1rem;
}

.person p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Contact */
.contact {
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.25rem;
  align-items: start;
}

.contact-aside h2 { margin-bottom: 0.5rem; }

.address {
  margin: 0 0 1rem;
  font-style: normal;
  color: var(--ink);
  line-height: 1.7;
}

.contact-meta {
  margin: 0 0 1rem;
  color: var(--muted);
}

.contact-meta a { font-weight: 650; }

.map {
  margin-top: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 16rem;
  background: var(--paper);
}

.map iframe {
  width: 100%;
  height: 16rem;
  border: 0;
  display: block;
}

.map-link {
  display: inline-block;
  margin-top: 0.7rem;
}

/* Form */
.form-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem;
  border: 1px solid #e6ebf2;
}

.form-card h2 { margin-bottom: 0.35rem; }

.field {
  margin: 0 0 1rem;
}

.field label {
  display: block;
  font-weight: 650;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.req { color: var(--cta); }

.hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #c9d3df;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 0;
  border-color: var(--blue);
}

textarea { min-height: 8.5rem; resize: vertical; }

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

.form-status.is-success {
  background: #e6f6ea;
  color: #14532d;
  border: 1px solid #b7e0c2;
}

.form-status.is-error {
  background: #fdecea;
  color: #7f1d1d;
  border: 1px solid #f5c2c0;
}

.form-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-card .btn { width: 100%; }

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #d5deea;
  padding: 2.75rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: start;
}

.footer-logo {
  background: var(--white);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  display: inline-block;
}

.footer-logo img {
  height: 3.6rem;
  width: auto;
}

.footer-grid address {
  font-style: normal;
  margin: 0;
}

.footer-links {
  margin: 0;
  text-align: right;
}

.footer-links a {
  color: #fff;
}

.site-footer small,
.copyright {
  display: block;
  margin-top: 1.75rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9aabc0;
  font-size: 0.9rem;
}

/* Dialog */
.privacy-dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(32rem, calc(100% - 2rem));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.privacy-dialog::backdrop {
  background: rgba(2, 18, 40, 0.6);
}

.dialog-body {
  padding: 1.5rem 1.5rem 1.35rem;
}

.dialog-body h2 {
  margin-bottom: 0.75rem;
}

.dialog-body p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.dialog-close {
  margin-top: 0.4rem;
}

/* 404 */
.page-simple {
  min-height: calc(100vh - 14rem);
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.page-simple h1 {
  color: var(--navy);
  margin: 0 0 0.6rem;
}

/* Responsive */
@media (max-width: 980px) {
  .service-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .points,
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .gallery-grid figure {
    aspect-ratio: 16 / 10;
    height: auto;
  }

  .footer-links { text-align: left; }
}

@media (max-width: 600px) {
  section { padding: 3.25rem 0; }

  .points,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy { padding: 3.25rem 0 2.75rem; }

  .form-card { padding: 1.25rem 1rem; }
}

@media (min-width: 981px) {
  .gallery-grid figure:first-child,
  .gallery-grid figure:first-child img {
    min-height: 22rem;
  }
}
