:root {
  --turquoise: #3dd6d0;
  --dark: #3b454b;
  --darkest: #172024;
  --mid: #65727a;
  --light: #e1e6ea;
  --white: #ffffff;
  --paper: #f7f9fa;
  --shadow: 0 20px 60px rgba(10, 20, 25, 0.18);
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--darkest);
  font-family:
    Aptos,
    "Aptos Display",
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.6;
  background: var(--paper);
  overflow-x: hidden;
}

body.no-scroll-jump {
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.image-lock {
  -webkit-touch-callout: none;
}

a {
  color: inherit;
  text-decoration-color: rgba(61, 214, 208, 0.55);
  text-underline-offset: 0.22em;
}

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

:focus-visible {
  outline: 3px solid var(--turquoise);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: var(--darkest);
  font-weight: 800;
  background: var(--white);
  border-radius: 4px;
  transform: translateY(-140%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
  padding: 1.25rem 0;
}

.site-header--static {
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: clamp(150px, 18vw, 245px);
  border-radius: 4px;
}

.brand img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.38));
}

.language-switch {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  background: rgba(13, 20, 23, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.language-switch__button {
  min-width: 2.45rem;
  padding: 0.35rem 0.55rem;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.language-switch__button[aria-pressed="true"] {
  color: var(--darkest);
  background: var(--turquoise);
}

.language-switch--dark {
  background: rgba(23, 32, 36, 0.82);
  border-color: rgba(23, 32, 36, 0.16);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 7.5rem 1rem 4rem;
  color: var(--white);
  background: url("assets/hero-britannia-bridge-dusk.webp") center / cover no-repeat;
}

.hero__content {
  width: min(calc(100vw - 2rem), var(--max-width));
  margin: 0 auto;
  padding-bottom: clamp(0rem, 6vh, 4rem);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--turquoise);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: #1aaea8;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 18ch;
  font-size: clamp(3rem, 7.7vw, 5.8rem);
  font-weight: 750;
}

h1 span {
  display: block;
}

h2 {
  max-width: 820px;
  color: var(--darkest);
  font-size: clamp(2rem, 4.8vw, 4rem);
  font-weight: 720;
}

h3 {
  color: var(--darkest);
  font-size: clamp(1.22rem, 2vw, 1.55rem);
}

.hero__lead {
  max-width: 680px;
  margin: 1.15rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.35;
  font-weight: 560;
}

.hero h1,
.hero__lead {
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.section {
  padding: clamp(3.25rem, 7vw, 5.5rem) 1rem;
}

.section__inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.coverage__grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(300px, 1fr);
  grid-template-areas: "map panel";
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

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

.services.section {
  padding: clamp(1.5rem, 3vw, 2.5rem) 0.5rem 0.5rem;
}

.services .section__inner {
  width: min(100%, 1720px);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(1rem, 2vw, 1.4rem);
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.55rem);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.service-card {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  color: var(--white);
  background: var(--darkest);
  border: 2px solid var(--white);
  border-radius: 6px;
  box-shadow: 0 18px 42px rgba(18, 28, 32, 0.13);
  isolation: isolate;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
  transition: background 180ms ease;
}

.service-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 180ms ease,
    opacity 180ms ease;
}

.service-card__content {
  width: 100%;
  min-height: clamp(108px, 6.6vw, 123px);
  margin: clamp(0.75rem, 1.3vw, 1rem);
  padding: clamp(0.72rem, 1vw, 0.88rem);
  background: rgba(13, 20, 23, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  backdrop-filter: blur(5px);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.service-card:hover .service-card__content {
  background: rgba(13, 20, 23, 0.72);
  border-color: rgba(61, 214, 208, 0.55);
  transform: translateY(-2px);
}

.service-card h3 {
  color: var(--white);
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
}

.service-card p {
  margin: 0.42rem 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.78rem, 0.9vw, 0.86rem);
  line-height: 1.32;
}

.coverage {
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(23, 32, 36, 0.45), rgba(23, 32, 36, 0.1)),
    url("assets/coverage-wales-forest-road.webp") center / cover no-repeat;
}

.coverage__grid {
  min-height: 320px;
  align-items: center;
}

.coverage__panel {
  grid-area: panel;
  align-self: center;
  max-width: 660px;
  padding: clamp(1.15rem, 2.4vw, 1.7rem);
  background: rgba(23, 32, 36, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.coverage__map {
  grid-area: map;
  align-self: center;
  justify-self: center;
  width: min(100%, 170px);
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 22px 38px rgba(0, 0, 0, 0.34));
}

.coverage h2,
.coverage p {
  color: var(--white);
}

.coverage__panel p {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.32;
}

.coverage p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

.contact {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--darkest);
  border-top: 4px solid var(--white);
  isolation: isolate;
}

.contact.section {
  padding: 0;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(13, 20, 23, 0.32), rgba(13, 20, 23, 0.16) 54%, rgba(13, 20, 23, 0.04)),
    linear-gradient(0deg, rgba(13, 20, 23, 0.18), rgba(13, 20, 23, 0.02));
}

.contact__media {
  grid-area: 1 / 1;
  z-index: 0;
  width: 100%;
  height: auto;
}

.contact__simple {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.8rem;
  width: min(calc(100% - 2rem), var(--max-width));
  max-width: var(--max-width);
  margin: 0 auto;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.contact__simple h2 {
  color: var(--white);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.62);
  transform: translateY(-16px);
}

.contact__simple p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  transform: translateY(13px);
}

.email-inline {
  color: var(--turquoise);
  font-weight: 800;
  text-decoration-thickness: 2px;
}

.site-footer {
  padding: 2.5rem 1rem;
  color: rgba(255, 255, 255, 0.76);
  background: var(--darkest);
  border-top: 4px solid var(--white);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(280px, 1fr);
  gap: 2rem;
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.site-footer img {
  width: min(220px, 70vw);
  height: auto;
  margin-bottom: 1rem;
}

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

.site-footer strong {
  color: var(--white);
}

.footer__legal {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer__legal p {
  max-width: 920px;
  margin: 0;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.footer__links button {
  padding: 0;
  color: var(--white);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(61, 214, 208, 0.55);
  text-underline-offset: 0.22em;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.footer__links button:hover {
  color: var(--turquoise);
}

.policy-dialog {
  width: min(calc(100% - 2rem), 760px);
  max-height: min(86vh, 760px);
  padding: 0;
  color: var(--darkest);
  background: var(--white);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(10, 20, 25, 0.35);
}

.policy-dialog::backdrop {
  background: rgba(13, 20, 23, 0.62);
  backdrop-filter: blur(5px);
}

.policy-dialog__body {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.policy-dialog__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.policy-dialog h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.policy-dialog__close {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  color: var(--darkest);
  font: inherit;
  font-weight: 800;
  background: var(--light);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.policy-dialog__close:hover {
  background: var(--turquoise);
}

.policy-dialog__content {
  display: grid;
  gap: 0.85rem;
}

.policy-dialog__content h1,
.policy-dialog__content h2,
.policy-dialog__content h3,
.policy-dialog__content p,
.policy-dialog__content ul,
.policy-dialog__content ol {
  margin: 0;
}

.policy-dialog__content h1,
.policy-dialog__content h2,
.policy-dialog__content h3 {
  max-width: none;
  color: var(--darkest);
  line-height: 1.18;
}

.policy-dialog__content h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.policy-dialog__content h2 {
  margin-top: 0.45rem;
  font-size: clamp(1.18rem, 2.4vw, 1.45rem);
}

.policy-dialog__content h3 {
  margin-top: 0.35rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.policy-dialog__content ul,
.policy-dialog__content ol {
  padding-left: 1.35rem;
}

.policy-dialog__content li + li {
  margin-top: 0.35rem;
}

.not-found-page {
  min-height: 100svh;
}

.not-found {
  display: grid;
  align-items: center;
  min-height: calc(100svh - 112px);
  padding: clamp(3rem, 8vw, 6rem) 1rem;
}

.not-found__content {
  width: min(100%, 760px);
  margin: 0 auto;
}

.not-found__content h1 {
  max-width: 11ch;
  color: var(--darkest);
  font-size: clamp(3rem, 8vw, 5.5rem);
}

.not-found__content p {
  max-width: 580px;
  margin: 1rem 0 1.4rem;
  color: var(--mid);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.not-found__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 1rem;
  color: var(--darkest);
  font-weight: 800;
  text-decoration: none;
  background: var(--turquoise);
  border-radius: 4px;
}

.not-found__link:hover {
  color: var(--darkest);
  background: #86e8e4;
}

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    justify-content: space-between;
  }

  .site-header--static {
    position: relative;
  }

  .hero {
    min-height: 760px;
    padding-top: 9.25rem;
    background-position: 62% center;
  }

  .coverage__grid,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .coverage__grid {
    grid-template-areas:
      "map"
      "panel";
  }

  .coverage__map {
    justify-self: start;
    width: min(50vw, 170px);
  }

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

@media (max-width: 520px) {
  .site-header {
    width: min(100% - 1.25rem, var(--max-width));
  }

  .brand {
    width: min(190px, 58vw);
  }

  .language-switch__button {
    min-width: 2.2rem;
    padding-inline: 0.45rem;
    font-size: 0.72rem;
  }

  .hero {
    min-height: 700px;
    padding: 8.5rem 1rem 2.5rem;
    background-position: 70% center;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.9rem, 7.4vw, 2.55rem);
    line-height: 1.06;
  }

  h2 {
    font-size: clamp(1.85rem, 9vw, 2.7rem);
  }

  .hero__lead {
    font-size: 1.03rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .service-card__content {
    min-height: 0;
  }

  .policy-dialog__header {
    display: grid;
  }

  .footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
