:root {
  --ink: #151712;
  --muted: #5c6258;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --line: #ded8cb;
  --accent: #c8a84c;
  --accent-strong: #8b7030;
  --green: #253f32;
  --green-soft: #dfe8df;
  --brick: #9b4d34;
  --blue: #173f68;
  --shadow: 0 22px 70px rgba(36, 34, 29, 0.16);
  --logo-bg: #ffffff;
  --hero-image: url("/assets/images/background.webp");
  --hero-position: center 58%;
}

:root[data-theme="dark"] {
  --ink: #f4f0e7;
  --muted: #c5c1b8;
  --paper: #111511;
  --panel: #1d231d;
  --line: #394337;
  --accent: #d7b85b;
  --accent-strong: #efd176;
  --green: #0f1d18;
  --green-soft: #263429;
  --brick: #c66b48;
  --blue: #86b6df;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --logo-bg: #050505;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 10px clamp(16px, 4vw, 56px);
  background: linear-gradient(90deg, var(--green), #42513e);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 134px;
  min-height: 58px;
  padding: 8px 16px;
  background: var(--logo-bg);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.brand img {
  display: block;
  width: 98px;
  max-height: 42px;
  object-fit: contain;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
  font-size: 0.94rem;
}

.nav a,
.call-link,
.social-icon,
.contact-links a {
  text-decoration: none;
}

.nav a {
  color: #fff;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  width: 62px;
  height: 32px;
}

.theme-toggle input {
  position: absolute;
  opacity: 0;
}

.theme-toggle span {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: background 180ms ease;
}

.theme-toggle span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 180ms ease;
  z-index: 1;
}

.theme-toggle input:checked + span {
  background: #111;
}

.theme-toggle input:checked + span::after {
  transform: translateX(30px);
}

.theme-toggle svg {
  position: absolute;
  top: 8px;
  z-index: 2;
  width: 16px;
  height: 16px;
  color: #111;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.theme-toggle .theme-sun {
  left: 8px;
  opacity: 1;
}

.theme-toggle .theme-moon {
  right: 8px;
  opacity: 0.42;
}

.theme-toggle input:checked + span .theme-sun {
  color: rgba(255, 255, 255, 0.62);
  opacity: 0.5;
}

.theme-toggle input:checked + span .theme-moon {
  color: #111;
  opacity: 1;
}

.call-link,
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
}

.call-link {
  padding: 9px 15px;
  background: var(--accent);
  color: #151712;
}

.social-icon {
  width: 42px;
  height: 42px;
  color: #fff;
  border: 0;
  overflow: hidden;
}

.social-icon svg,
.contact-links svg,
.social-icon img,
.contact-links img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.social-icon svg,
.contact-links svg {
  fill: currentColor;
}

.social-icon.facebook,
.contact-links .facebook span {
  background: #1877f2;
}

.social-icon.checkatrade,
.contact-links .checkatrade span {
  background: #fff;
}

.social-icon.checkatrade img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.contact-links .maps span,
.contact-links a:nth-child(3) span {
  background: #34a853;
}

.contact-links a:nth-child(1) span {
  background: #1877f2;
}

.contact-links a:nth-child(2) span {
  background: #ff3f3f;
}

.hero {
  min-height: clamp(620px, 82vh, 780px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
  align-items: end;
  gap: clamp(28px, 5vw, 78px);
  padding: clamp(54px, 8vw, 110px) clamp(18px, 6vw, 96px) clamp(28px, 5vw, 64px);
  background:
    linear-gradient(120deg, rgba(21, 23, 18, 0.7), rgba(21, 23, 18, 0.22)),
    var(--hero-image) var(--hero-position) / cover;
  color: #fff;
}

.hero-copy {
  max-width: 820px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(430px, 88vw);
  min-height: clamp(150px, 24vw, 230px);
  margin-bottom: 26px;
  padding: clamp(24px, 5vw, 42px);
  background: var(--logo-bg);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.hero-logo {
  width: min(320px, 68vw);
  max-height: 150px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 650px;
  margin: 22px 0 0;
  font-size: clamp(1.08rem, 2vw, 1.36rem);
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: #151712;
}

.button.secondary {
  border-color: currentColor;
  color: inherit;
  background: transparent;
}

.hero-actions .button:first-child {
  background: #fff;
  color: var(--green);
}

.hero-panel {
  display: grid;
  gap: 4px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.94);
  color: #151712;
  box-shadow: var(--shadow);
  border-radius: 6px;
}

.score {
  font-size: 4rem;
  line-height: 1;
  font-weight: 900;
  color: var(--green);
}

.proof-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.proof-band div {
  padding: 22px clamp(18px, 4vw, 42px);
  border-right: 1px solid var(--line);
}

.proof-band strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
}

.proof-band span,
.hero-panel small,
.review-summary span,
.footer {
  color: var(--muted);
}

.section,
.work-section,
.contact-section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 6vw, 96px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: clamp(28px, 6vw, 96px);
}

.intro h2,
.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 1.03;
}

.intro-copy {
  font-size: 1.08rem;
  color: var(--muted);
}

.section-heading {
  max-width: 790px;
  margin-bottom: 32px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.service-card,
.review-card,
.skill-card,
.contact-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.service-card {
  min-height: 112px;
  padding: 18px;
}

.service-card strong {
  display: block;
  margin-bottom: 8px;
}

.service-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

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

.show-more {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 34px);
}

.gallery-modal.open {
  display: flex;
}

.gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 10, 0.86);
  backdrop-filter: blur(6px);
}

.gallery-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(1500px, 100%);
  max-height: min(92vh, 960px);
  color: #fff;
}

.gallery-close {
  justify-self: end;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: min(76vh, 780px);
  overflow: hidden;
  background: #111;
  border-radius: 8px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.5);
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 58px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #111;
  font-size: 0;
  cursor: pointer;
}

.gallery-control::before {
  font-size: 2.4rem;
  line-height: 1;
}

.gallery-control.prev::before {
  content: "<";
}

.gallery-control.next::before {
  content: ">";
}

.gallery-control.prev {
  left: 12px;
}

.gallery-control.next {
  right: 12px;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.thumbnail-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(74px, 8vw, 124px);
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.thumbnail-rail button {
  padding: 0;
  border: 3px solid transparent;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.thumbnail-rail button.active {
  border-color: var(--accent);
}

.thumbnail-rail img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.gallery-item {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--brick));
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.78));
  opacity: 0.82;
  transition: opacity 220ms ease;
}

.project-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(18px, 3vw, 28px);
  transform: translateY(12px);
  transition: transform 220ms ease;
}

.project-overlay h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2.6rem);
  line-height: 1.02;
}

.project-overlay p {
  max-width: 420px;
  margin: 10px 0 18px;
  color: rgba(255, 255, 255, 0.84);
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-overlay button {
  align-self: flex-start;
  min-height: 42px;
  border: 1px solid #fff;
  border-radius: 4px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.gallery-item:hover::after,
.gallery-item:focus-within::after {
  opacity: 1;
}

.gallery-item:hover .project-overlay,
.gallery-item:focus-within .project-overlay {
  transform: translateY(0);
}

.gallery-item:hover .project-overlay p,
.gallery-item:hover .project-overlay button,
.gallery-item:focus-within .project-overlay p,
.gallery-item:focus-within .project-overlay button {
  opacity: 1;
  transform: translateY(0);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  padding: 18px;
}

.skill-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.skill-card h3 {
  margin: 0;
}

.skill-card header span {
  color: var(--muted);
  font-weight: 800;
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-list li {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.skill-list li span {
  color: var(--blue);
  font-weight: 900;
}

.skill-card .is-hidden {
  display: none;
}

.skill-card.expanded .is-hidden {
  display: flex;
}

.show-more {
  margin-top: 16px;
}

.review-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.review-summary div {
  padding: 18px;
  background: var(--green);
  color: #fff;
  border-radius: 6px;
}

.review-summary strong {
  display: block;
  font-size: 2rem;
}

.review-summary span {
  color: rgba(255, 255, 255, 0.76);
}

.reviews-panel {
  max-height: 680px;
  overflow-y: auto;
  padding: 14px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reviews-feed {
  display: grid;
  gap: 12px;
}

.review-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  padding: 16px;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 48px;
  border-radius: 10px;
  background: #c8ccff;
  color: #040154;
  font-size: 1.18rem;
  font-weight: 900;
}

.review-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.review-card h3 {
  margin: 0;
  font-size: 1rem;
}

.review-card header span,
.review-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.review-card p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.94rem;
}

.review-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.72fr);
  align-items: start;
  gap: clamp(26px, 6vw, 80px);
  background: var(--panel);
}

.contact-section p {
  color: var(--muted);
  font-size: 1.06rem;
}

.contact-links {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.contact-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.contact-links span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  overflow: hidden;
}

.contact-links .checkatrade span img,
.contact-links .maps span img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 12px;
  background: var(--paper);
  color: var(--ink);
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 6vw, 96px);
  border-top: 1px solid var(--line);
  background: var(--panel);
}

@media (max-width: 1050px) {
  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero,
  .intro,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

}

@media (max-width: 620px) {
  .site-header {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .brand {
    width: 118px;
    min-height: 52px;
    padding: 7px 14px;
  }

  .brand img {
    width: 82px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .call-link {
    flex: 1 1 120px;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .hero-logo-wrap {
    min-height: 136px;
    margin-bottom: 20px;
  }

  .hero-actions .button,
  .contact-form .button {
    width: 100%;
  }

  .proof-band,
  .service-grid,
  .review-summary,
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-modal {
    padding: 10px;
  }

  .gallery-dialog {
    max-height: 94vh;
  }

  .gallery-stage {
    aspect-ratio: 4 / 5;
    max-height: 74vh;
  }

  .gallery-control {
    width: 40px;
    height: 50px;
  }

  .review-card {
    grid-template-columns: 1fr;
  }

  .review-card header,
  .review-meta,
  .footer {
    flex-direction: column;
  }

  .skill-list {
    grid-template-columns: 1fr;
  }
}
