/* Procoat — colours from the logo */
:root {
  --black: #000;
  --ink: #111417;
  --blue: #00a3da;
  --blue-dark: #0089b8;
  --white: #fff;
  --grey: #f4f6f7;
  --muted: #5f6870;
  --line: #e3e7ea;
  --display: "Montserrat", "Helvetica Neue", sans-serif;
  --body: "DM Sans", system-ui, sans-serif;
  --radius: 8px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 17px/1.6 var(--body); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 20px; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--blue); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .75em 1.3em; font: 600 .95rem/1 var(--body); text-decoration: none;
  border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.btn-lg { padding: 1em 1.7em; font-size: 1.02rem; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-outline-light { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn.full { width: 100%; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); color: var(--white); }
.header-inner { display: flex; align-items: center; gap: 32px; height: 76px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: rgba(255,255,255,.85); }
.nav a:hover { color: var(--blue); }
.header-actions { display: flex; gap: 10px; }

/* placeholder (until photos arrive) */
.ph {
  width: 100%; height: 100%; min-height: 100%; display: grid; place-items: center;
  background: var(--grey); border: 1px dashed #cdd4d9;
}
.ph span { font: 600 .72rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: #9aa4ab; }

/* hero — full-width photo */
.hero {
  position: relative; color: var(--white); background-color: #15191c;
  background-image: linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.35) 70%), var(--img);
  background-size: cover; background-position: center;
}
.hero-inner { min-height: min(78vh, 640px); display: flex; flex-direction: column; justify-content: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 15ch; margin-bottom: 18px; }
.hero p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.82); max-width: 44ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* sectors */
.sectors { padding: clamp(48px, 6vw, 80px) 0 0; }
.sectors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sector-card {
  position: relative; display: block; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--white); background: #15191c;
}
.sector-card img, .sector-card .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.sector-card .ph { background: #20262a; border: 0; place-items: start center; padding-top: 22%; }
.sector-card .ph span { color: #6b747b; }
.sector-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0,0,0,.85)); }
.sector-card:hover img { transform: scale(1.04); }
.sector-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(20px, 3vw, 32px); }
.sector-text h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 8px; }
.sector-text p { color: rgba(255,255,255,.85); max-width: 42ch; margin-bottom: 12px; font-size: .98rem; }
.sector-text .link { font-weight: 600; color: var(--blue); }

/* work gallery */
.work { padding: clamp(64px, 8vw, 100px) 0; }
.work-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.work-head h2 { margin: 0; }
.filters { display: flex; gap: 6px; }
.filters button {
  font: 600 .9rem/1 var(--body); border: 1px solid var(--line); background: var(--white); color: var(--ink);
  padding: .75em 1.2em; border-radius: 100px; cursor: pointer; transition: all .2s;
}
.filters button:hover { border-color: var(--blue); }
.filters button.active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery figure { margin: 0; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figure.hide { display: none; }
.empty-note { padding: 48px 0; text-align: center; color: var(--muted); background: var(--grey); border-radius: var(--radius); }
.hero { background-position: center 40%; }

/* services */
.services { background: var(--grey); padding: clamp(56px, 7vw, 88px) 0; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--blue);
  padding: .7em 1.1em; border-radius: 6px; font-weight: 600;
}

/* about */
.about { padding: clamp(64px, 8vw, 100px) 0; }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about p { color: #3a4248; max-width: 60ch; }
.about p.strong { color: var(--ink); font-weight: 600; }
.stats { margin: 0; display: grid; gap: 14px; }
.stats div { display: flex; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stats dt { font: 800 2.6rem/1 var(--display); color: var(--blue); min-width: 3.2ch; }
.stats dd { margin: 0; font-weight: 500; }

/* contact */
.contact { background: var(--black); color: var(--white); padding: clamp(64px, 8vw, 100px) 0; }
.contact .muted { color: rgba(255,255,255,.7); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; }
.contact-list li { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); }
.contact-list span { width: 64px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); padding-top: 4px; }
.contact-list b, .contact-list a { font: 700 1.15rem/1.3 var(--display); text-decoration: none; }
.contact-list a:hover { color: var(--blue); }

.quote-form { background: var(--white); color: var(--ink); padding: clamp(22px, 3.5vw, 36px); border-radius: var(--radius); }
.quote-form label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 14px; }
.quote-form input:not([type=radio]), .quote-form textarea {
  display: block; width: 100%; margin-top: 6px; font: 400 1rem/1.4 var(--body); color: var(--ink);
  padding: .8em .9em; border: 1px solid #cfd6db; border-radius: 6px;
}
.quote-form input:focus, .quote-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,163,218,.2); }
.quote-form .invalid { border-color: #d9443a !important; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips label { margin: 0 !important; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: inline-block; padding: .55em 1.1em; border: 1px solid #cfd6db; border-radius: 100px; font-weight: 500; cursor: pointer; }
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0,163,218,.35); }
.form-note { margin: 12px 0 0; font-size: .9rem; min-height: 1.4em; }
.form-note.ok { color: #1a7f4b; font-weight: 600; }
.form-note.err { color: #d9443a; }

/* footer */
.site-footer { background: #111518; color: rgba(255,255,255,.7); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 48px; }
.footer-logo { height: 52px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 34ch; margin: 0; line-height: 1.65; }
.footer-col h4 { font: 700 .82rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin: 6px 0 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0 0 18px; }
.footer-col li { padding: 5px 0; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-col a { text-decoration: none; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--white); }
.footer-link { color: var(--blue); font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; font-size: .85rem; color: rgba(255,255,255,.5); }
.footer-bottom-inner p { margin: 0; }
.footer-bottom nav a { text-decoration: none; }
.footer-bottom nav a:hover { color: var(--white); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 56px 16px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 100%; max-width: min(1200px, 100%); object-fit: contain; border-radius: 4px; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--white); font-size: 2.6rem; line-height: 1; cursor: pointer; padding: 10px 16px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* mobile bar */
.mobile-bar { display: none; }

@media (max-width: 860px) {
  .nav, .header-actions { display: none; }
  .header-inner { justify-content: center; }
  .sectors-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--black); box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  }
  .mobile-bar .btn { padding: 14px; font-size: 1rem; }
  .site-footer { padding-bottom: 72px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .hero-actions .btn { flex: 1 1 100%; }
  .sector-card { aspect-ratio: 1; }
}

/* keep long email from widening the contact column on phones */
.contact-grid > * { min-width: 0; }
.contact-list a { overflow-wrap: anywhere; }
@media (max-width: 560px) { .contact-list b, .contact-list a { font-size: 1rem; } .contact-list span { width: 72px; flex: none; } }

/* spam trap for Netlify Forms — hidden from people */
.hp { position: absolute; left: -9999px; }
.quote-form button:disabled { opacity: .7; cursor: wait; }

/* before & after — slider, one project at a time */
.before-after { padding: 0 0 clamp(64px, 8vw, 100px); }
.ba-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.ba-head h2 { margin: 0; }
.ba-nav { display: flex; gap: 8px; }
.ba-nav button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white);
  font-size: 1.6rem; line-height: 1; color: var(--ink); cursor: pointer; transition: all .2s;
}
.ba-nav button:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); color: var(--white); }
.ba-nav button:disabled { opacity: .35; cursor: default; }
.ba-viewport { overflow: hidden; border-radius: var(--radius); touch-action: pan-y; }
.ba-grid { display: flex; transition: transform .45s cubic-bezier(.2, .7, .1, 1); }
.ba-pair { flex: 0 0 100%; margin: 0; }
.ba-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: var(--radius); overflow: hidden; }
.ba-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.ba-img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ba-tag {
  position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,.75); color: var(--white);
  font: 700 .75rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; padding: .6em .85em; border-radius: 4px;
}
.ba-tag.after { background: var(--blue); }
.ba-pair figcaption { padding-top: 14px; color: var(--muted); }
.ba-pair figcaption b { display: block; color: var(--ink); font: 700 1.1rem/1.3 var(--display); margin-bottom: 2px; }
.ba-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.ba-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: #cfd6db; cursor: pointer; transition: all .2s; }
.ba-dots button.active { background: var(--blue); width: 24px; border-radius: 5px; }
@media (max-width: 560px) { .ba-img { aspect-ratio: 3/4; } .ba-nav button { width: 40px; height: 40px; } }

@media (prefers-reduced-motion: reduce) { .ba-grid { transition: none; } }

/* Our Work — show more */
.more-wrap { text-align: center; margin-top: 24px; }
.more-wrap[hidden] { display: none; }
.btn-ghost-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost-dark:hover { background: var(--ink); color: var(--white); }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr 1fr; gap: 8px; } }

/* Our Work page */
.nav a[aria-current="page"] { color: var(--blue); }
.page-head { background: var(--black); color: var(--white); padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 10px; }
.page-head p { color: rgba(255,255,255,.75); margin: 0; font-size: 1.1rem; }
.work .filters { margin-bottom: 24px; }
.cta-band { background: var(--black); color: var(--white); padding: clamp(48px, 6vw, 72px) 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0; }
.before-after { padding-top: clamp(64px, 8vw, 100px); }
.before-after .center-cta { margin-top: 28px; }
.center-cta { text-align: center; }

/* What we do — grouped services */
.services-head { max-width: 640px; margin-bottom: 32px; }
.services-head h2 { margin-bottom: 10px; }
.services-head p { color: var(--muted); margin: 0; font-size: 1.08rem; }
.service-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.service-group { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.service-group > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.sg-body { padding: 22px 24px 8px; }
.sg-body h3 { font: 800 1.3rem/1.2 var(--display); margin: 0 0 6px; padding-bottom: 12px; border-bottom: 3px solid var(--blue); display: inline-block; }
.sg-body ul { list-style: none; padding: 0; margin: 0; }
.sg-body li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .95rem; line-height: 1.5; }
.sg-body li:last-child { border-bottom: 0; }
.sg-body li b { display: block; color: var(--ink); font-weight: 600; font-size: 1rem; margin-bottom: 2px; }
.services-cta { text-align: center; margin: 32px 0 0; font-size: 1.05rem; }
.services-cta a { color: var(--blue); font-weight: 600; }
@media (max-width: 960px) { .service-groups { grid-template-columns: 1fr; max-width: 560px; } }

/* Our Work — project cards at their real photo shape (masonry columns) */
.projects { columns: 3; column-gap: 16px; }
.project { break-inside: avoid; margin: 0 0 16px; }
.project.hide { display: none; }
.project-open {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; text-align: left; color: var(--white);
}
.project-open img { width: 100%; height: auto; transition: transform .5s ease; }
.project-open:hover img { transform: scale(1.03); }
.project-open::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.78)); }
.project-open .project-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 20px; }
.project-open .project-cap b { display: block; font: 700 1.15rem/1.25 var(--display); }
.project-open .project-cap span { font-size: .85rem; color: rgba(255,255,255,.8); }
.project-open:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (max-width: 960px) { .projects { columns: 2; } }
@media (max-width: 560px) { .projects { columns: 1; } }

/* lightbox caption */
.lightbox { grid-template-rows: 1fr auto; padding: 56px 16px 20px; }
.lightbox img { max-height: calc(100vh - 170px); }
.lightbox button[hidden] { display: none; }
.lb-caption { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; color: var(--white); padding-top: 14px; text-align: center; }
.lb-title { font: 700 1.05rem/1.3 var(--display); }
.lb-title:empty, .lb-count:empty { display: none; }
.lb-count { color: rgba(255,255,255,.6); font-size: .9rem; }
.lb-quote[hidden] { display: none; }
.lb-before { background: rgba(255,255,255,.15); color: var(--white); font: 700 .72rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; padding: .55em .8em; border-radius: 4px; }
.lb-before[hidden] { display: none; }

/* header: keep menu items on one line; drop the text links on mid-size screens before they squash */
.nav a, .header-actions .btn { white-space: nowrap; }
@media (max-width: 1080px) and (min-width: 861px) {
  .header-inner { gap: 20px; }
  .nav { gap: 16px; }
  .nav a { font-size: .9rem; }
  .header-actions .btn { padding: .7em 1em; }
}
