:root {
  color-scheme: light;
  --deep-brown: #342d2d;
  --warm-ivory: #fcf9f2;
  --soft-taupe: #e8e1d8;
  --muted-brown: #625858;
  --pure-white: #ffffff;
  --ink: var(--deep-brown);
  --muted: var(--muted-brown);
  --paper: var(--warm-ivory);
  --white: var(--pure-white);
  --line: var(--soft-taupe);
  --content-width: 76rem;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-size: 1.333rem;
  line-height: 1.65;
}

img,
picture {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--muted-brown);
  text-underline-offset: 0.2em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--deep-brown);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.15;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1rem;
  font-size: 3rem;
  font-weight: 700;
}

.services-title {
  max-width: none;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: 2.333rem;
  font-weight: 500;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.667rem;
  font-weight: 500;
}

.site-header {
  display: flex;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem max(1.25rem, calc((100vw - var(--content-width)) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: block;
  width: 12.5rem;
  height: 4rem;
  overflow: hidden;
}

.logo img,
.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.footer-logo {
  display: inline-block;
  width: 12.5rem;
  height: 4rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
nav a.current-page {
  background: var(--soft-taupe);
  color: var(--ink);
}

main {
  width: min(100% - 2.5rem, var(--content-width));
  margin-inline: auto;
}

.hero {
  display: grid;
  width: 100vw;
  grid-template-columns: minmax(0, 1.05fr) minmax(19rem, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  margin-left: calc(50% - 50vw);
  padding: clamp(3.5rem, 7vw, 6.5rem) max(1.25rem, calc((100vw - var(--content-width)) / 2));
  background: var(--deep-brown);
  color: var(--white);
}

.hero-copy {
  width: min(100%, 38rem);
  justify-self: end;
}

.hero h1,
.hero h2 {
  color: var(--white);
}

.hero h1 {
  font-size: 3rem;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 39rem;
  margin-bottom: 1.75rem;
  color: var(--white);
  font-size: 1.1rem;
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--soft-taupe);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-image {
  width: min(100%, 37rem);
  justify-self: start;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 1.25;
  border: 5px solid rgb(255 255 255 / 35%);
  border-radius: 6px;
  object-fit: cover;
}

.cta-button,
button[type="submit"] {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 2px solid var(--deep-brown);
  border-radius: 4px;
  background: var(--deep-brown);
  color: var(--white);
  font-family: Poppins, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.cta-button:hover,
button[type="submit"]:hover {
  border-color: var(--soft-taupe);
  background: var(--soft-taupe);
  color: var(--ink);
}

.cta-button:active,
button[type="submit"]:active {
  transform: translateY(1px);
}

.hero .cta-button {
  color: var(--deep-brown);
  background: var(--warm-ivory);
  border-color: var(--warm-ivory);
  border-radius: 2px;
}

.hero .cta-button:hover {
  color: var(--deep-brown);
  background: var(--soft-taupe);
  border-color: var(--soft-taupe);
}

.content-section,
#founders,
#locations,
#enquiry-form,
#contact-form {
  margin-block: clamp(3rem, 6vw, 5.25rem);
}

.content-section > p,
#page-intro > p {
  max-width: 47rem;
  color: var(--muted);
}

#how-it-works,
#service-highlights,
#results,
#founders,
#locations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

#how-it-works > h2,
#service-highlights > h2,
#results > h2,
#founders > h2 {
  grid-column: 1 / -1;
}

.step,
.service-card,
.stat-card,
.founder-bio,
.service-detail,
.location-card {
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 1px 3px rgb(24 45 50 / 6%);
}

.step::before {
  display: block;
  width: 2rem;
  height: 0.25rem;
  margin-bottom: 1.1rem;
  background: var(--deep-brown);
  content: "";
}

.service-card {
  border-top: 3px solid var(--soft-taupe);
}

#service-highlights > a {
  grid-column: 1 / -1;
  justify-self: start;
  font-weight: 700;
}

#results {
  padding: 2rem;
  border-radius: 6px;
  background: var(--soft-taupe);
}

.stat-card {
  border-color: transparent;
  background: transparent;
}

.stat-number {
  margin-bottom: 0.25rem;
  color: var(--muted-brown);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

#why-qx-media {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-left: 5px solid var(--deep-brown);
  background: var(--white);
}

#page-intro {
  margin-block: 3rem 2rem;
  padding-block: 0.75rem;
}

#page-intro h1 {
  font-size: 3rem;
}

#founders {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.founder-bio {
  overflow: hidden;
  padding: 0;
}

.founder-bio img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-trigger {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-trigger img {
  transition: transform 180ms ease;
}

.gallery-trigger:hover img {
  transform: scale(1.025);
}

.founder-bio h3,
.founder-bio p {
  margin: 0.75rem 1rem 0;
  text-align: center;
}

.founder-bio p {
  margin-top: 0.15rem;
  margin-bottom: 1rem;
}

.lightbox {
  width: min(90vw, 50rem);
  max-width: none;
  max-height: 90vh;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}

.lightbox::backdrop {
  background: rgb(20 16 16 / 78%);
}

.lightbox img {
  width: 100%;
  max-height: calc(90vh - 5rem);
  object-fit: contain;
}

.lightbox-close {
  display: block;
  min-height: 2.75rem;
  margin: 0 0 0.75rem auto;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

#mission-vision {
  padding: 2rem;
  border-radius: 6px;
  background: var(--soft-taupe);
}

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-block: 1rem;
}

.service-detail:nth-of-type(even) .service-image {
  order: 2;
}

.service-image {
  min-width: 0;
  margin: 0;
}

.service-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  object-fit: cover;
}

.service-copy {
  min-width: 0;
}

.service-detail h2,
.location-card h2 {
  font-size: 1.667rem;
}

.service-detail > a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 700;
}

.package-tiers {
  padding-left: 1.2rem;
  color: var(--muted);
}

.package-tiers li + li {
  margin-top: 0.7rem;
}

#locations {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.location-card address {
  color: var(--muted);
  font-style: normal;
}

.office-map {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 1.25rem;
  border: 0;
  border-radius: 4px;
}

.service-search {
  margin-block: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

.service-search h2 {
  margin-bottom: 0.75rem;
  font-size: 1.45rem;
}

.service-search label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.service-search input {
  width: min(100%, 34rem);
  min-height: 2.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #aab9b3;
  border-radius: 4px;
  font: inherit;
}

#serviceSearchStatus {
  margin-top: 0.65rem;
  color: var(--muted);
}

.service-detail[hidden] {
  display: none !important;
}

#enquiry-form,
#contact-form {
  max-width: 48rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
}

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

form label,
form input,
form select,
form textarea,
form button {
  min-width: 0;
  grid-column: 1 / -1;
}

form label {
  margin-top: 0.55rem;
  font-size: 0.94rem;
  font-weight: 700;
}

form input,
form select,
form textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #aab9b3;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

form textarea {
  min-height: 9rem;
  resize: vertical;
}

form button[type="submit"] {
  justify-self: start;
  margin-top: 0.75rem;
}

footer {
  margin-top: 4rem;
  padding: 2rem max(1.25rem, calc((100vw - var(--content-width)) / 2));
  background: var(--ink);
  color: #e6ece8;
  text-align: center;
}

footer nav ul {
  justify-content: center;
  margin-bottom: 1rem;
}

footer nav a {
  color: var(--white);
}

footer nav a:hover,
footer nav a:focus-visible {
  background: var(--muted-brown);
  color: var(--white);
}

footer p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

@media (max-width: 68rem) {
  h1 {
    font-size: 2.8rem;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  #how-it-works,
  #service-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
    padding-block: 1rem;
  }

  .site-header nav {
    width: 100%;
  }

  .logo,
  .footer-logo {
    width: 11rem;
    height: 3.5rem;
  }

  .site-header nav ul {
    gap: 0.15rem;
  }

  .site-header nav a {
    padding-inline: 0.6rem;
  }

    .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-inline: 1.25rem;
  }

  .hero-copy,
  .hero-image {
    width: min(100%, 42rem);
    justify-self: center;
  }

  .service-detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-detail:nth-of-type(even) .service-image {
    order: 0;
  }

    .service-image img {
    aspect-ratio: 16 / 9;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  #results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 1.25rem;
  }

  .stat-card {
    padding: 0.75rem 0.25rem;
  }

    .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 36rem) {
  body {
    font-size: 1.1rem;
  }

  main {
    width: min(100% - 2rem, var(--content-width));
  }

  h1,
  .hero h1,
  #page-intro h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .site-header {
    padding-inline: 1rem;
  }

    .site-header nav a {
    min-height: 2.5rem;
    padding-inline: 0.45rem;
    font-size: 0.88rem;
  }

  .hero {
    padding-inline: 1rem;
  }

  #how-it-works,
  #service-highlights,
  #results,
  #founders,
  #locations {
    grid-template-columns: minmax(0, 1fr);
  }

  #results {
    gap: 0.25rem;
  }

    .stat-card {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
  }

  .stat-card p:last-child {
    margin-bottom: 0;
  }

  #mission-vision {
    padding: 1.25rem;
  }

    #enquiry-form,
  #contact-form {
    padding: 1.1rem;
  }

  footer nav ul {
    gap: 0.1rem;
  }

  footer nav a {
    padding-inline: 0.45rem;
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

}
/* Branded missing-page layout */
.not-found {
  display: grid;
  min-height: min(60vh, 38rem);
  align-content: center;
  justify-items: start;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.not-found-code {
  margin-bottom: 0.75rem;
  color: var(--muted-brown);
  letter-spacing: 0.08em;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.not-found-actions a:not(.cta-button) {
  font-weight: 650;
}
