/* Behaviour that the Base44 React app used to provide, rebuilt for the static site.
   The original compiled design lives in site.css (only its Google Fonts import is removed). */

/* Inter, self-hosted (variable font, weights 300-800; SIL Open Font Licence). Same files Google Fonts serves. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Readability: the Base44 design used 9-10px labels and light greys that fail contrast guidelines (WCAG AA).
   These rules lift the smallest text to 11px and darken the faint greys, without changing the layout.
   " color:" (with a leading space) avoids matching background-color / border-color. */
[style*="font-size: 9px"], [style*="font-size: 10px"] { font-size: 11px !important; }
[style*=" color: rgb(170, 170, 170)"], [style^="color: rgb(170, 170, 170)"],
[style*=" color: rgb(153, 153, 153)"], [style^="color: rgb(153, 153, 153)"] { color: rgb(108, 108, 108) !important; }
[style*=" color: rgb(187, 187, 187)"], [style^="color: rgb(187, 187, 187)"],
[style*=" color: rgb(136, 136, 136)"], [style^="color: rgb(136, 136, 136)"] { color: rgb(112, 112, 112) !important; }
[style*=" color: rgb(204, 204, 204)"], [style^="color: rgb(204, 204, 204)"] { color: rgb(145, 145, 145) !important; }
[style*="color: rgba(255, 255, 255, 0.28)"], [style*="color: rgba(255, 255, 255, 0.3)"],
[style*="color: rgba(255, 255, 255, 0.35)"], [style*="color: rgba(255, 255, 255, 0.38)"],
[style*="color: rgba(255, 255, 255, 0.45)"] { color: rgba(255, 255, 255, 0.72) !important; }

.service-chip:hover { border-color: rgb(160, 40, 35) !important; color: rgb(160, 40, 35) !important; }

/* Scroll/load reveals: hidden until site.js plays the animation (only when JS runs). */
html.js [data-reveal]:not(.in-view) { opacity: 0; }

/* "Top 10 causes" bars on About grow from zero once their row is revealed. */
html.js .bar-fill { width: 0 !important; transition: width .6s cubic-bezier(0, 0, .58, 1) var(--bar-delay, 0s); }
html.js .in-view .bar-fill { width: var(--w) !important; }

/* Pop-ups (case studies, team profiles) */
.modal[hidden] { display: none !important; }
.modal { animation: modal-fade .2s ease-out; }
.modal .modal-panel { animation: modal-rise .25s ease-out; }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-rise { from { opacity: 0; transform: translateY(20px) scale(.98); } }

/* Case-study cards are links to their own pages (they were pop-up buttons on Base44). */
a.case-card { display: block; color: inherit; text-decoration: none; }
@media (max-width: 640px) { .case-body { padding: 28px 22px 34px !important; } }

/* News and article text: space between paragraphs, visible links. */
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.25em; }
.post-body > :last-child { margin-bottom: 0; }
.post-body h2, .post-body h3 { color: rgb(20, 20, 20); font-weight: 700; line-height: 1.3; margin: 1.6em 0 .6em; }
.post-body h2 { font-size: 1.35rem; }
.post-body h3 { font-size: 1.1rem; }
.post-body ul { list-style: disc; padding-left: 1.4em; }
.post-body ol { list-style: decimal; padding-left: 1.4em; }
.post-body a { color: rgb(160, 40, 35); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: rgb(126, 31, 27); }
.post-body h4 { color: rgb(20, 20, 20); font-weight: 700; font-size: 1rem; margin: 1.4em 0 .5em; }
.post-body blockquote { margin: 0 0 1.25em; padding: 4px 0 4px 20px; border-left: 3px solid rgb(160, 40, 35);
                        color: rgb(60, 60, 60); font-style: italic; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px solid rgb(226, 226, 224); margin: 2em 0; }
.post-body code { font-family: Consolas, monospace; font-size: .9em; background: rgb(247, 246, 244); padding: 1px 5px; }
.post-body img { max-width: 100%; height: auto; margin: .5em 0; }

/* The header gained a sixth link (Articles): tighten spacing between tablet and small-laptop widths so it fits on one line. */
header nav a { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 1150px) {
  header nav a { padding-left: 9px !important; padding-right: 9px !important; letter-spacing: 0.06em !important; }
  header nav a[href="/contact"] { margin-left: 8px !important; padding: 10px 14px !important; }
}
/* Below 900px the full menu no longer fits ("Extended Capabilities" is long): use the mobile menu button instead. */
@media (min-width: 768px) and (max-width: 899px) {
  header nav.md\:flex { display: none !important; }
  #menu-toggle { display: block !important; }
  #mobile-menu:not([hidden]) { display: block !important; }
}

#mobile-menu[hidden], [data-icon][hidden], .case-card[hidden] { display: none !important; }
[data-href] h2 a:focus-visible, .team-static-card:focus-visible { outline: 2px solid rgb(160, 40, 35); outline-offset: 2px; }

@media (max-width: 720px) { .team-modal-inner { text-align: left; } }

/* Scrolling services banner: pause when tapped/clicked or toggled from the keyboard (site.js), as well as on hover. */
.service-ticker-track { cursor: pointer; }
.service-ticker-track.is-paused { animation-play-state: paused !important; }
.service-ticker-track:focus-visible { outline: 2px solid rgb(160, 40, 35); outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  /* No scrolling: show the services once, wrapping onto extra lines if needed. */
  .service-ticker-track { animation: none !important; width: auto !important; flex-wrap: wrap; justify-content: center;
                          row-gap: 10px; padding-inline: 20px; white-space: normal !important; cursor: default; }
  .service-ticker-track [data-ticker-copy] { display: none !important; }
  html.js [data-reveal]:not(.in-view) { opacity: 1; }
  html.js .bar-fill { transition: none; }
  .modal, .modal .modal-panel { animation: none; }
}

/* ---------------------------------------------------------------- Content update (Oct 2026) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.text-link { color: rgb(160, 40, 35); text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: rgb(126, 31, 27); }
.tbc { background: rgb(255, 236, 153); color: rgb(90, 60, 0); padding: 0 3px; font-style: normal; }

/* Home: "We're not just a construction consultancy" - the paragraphs start level with the top of the photo
   (whatever the heading's height) and run to the same right-hand edge as the sections below. */
@media (min-width: 769px) {
  /* "section.home-who" outranks the page's own .home-who-* rules, which load after this file */
  section.home-who .home-who-inner { grid-template-rows: auto auto auto; row-gap: 0; }
  section.home-who .home-who-inner > div:first-child { display: contents; }
  section.home-who .home-who-inner > div:first-child > * { grid-column: 1; }
  section.home-who .home-who-inner > div:first-child > img { grid-row: 3; }
  section.home-who .home-who-copy { grid-column: 2; grid-row: 3; padding-top: 0; max-width: none; }
}

/* Home: Who We Help - the parties to a construction project, left to right in the order contracts flow */
.who-we-help { background: rgb(255, 255, 255); padding: 8px 48px 96px; }
.who-inner { max-width: 1280px; margin: 0 auto; }  /* same content width as the other home sections */
.who-bar { width: 32px; height: 2px; background: linear-gradient(90deg, rgb(160, 40, 35), transparent); margin-bottom: 20px; }
.who-we-help h2 { color: rgb(20, 20, 20); font-weight: 600; font-size: clamp(1.2rem, 2vw, 1.7rem); margin-bottom: 32px; }
/* Cards use subgrid so the heading, "Also known as" and description rows share heights across all three:
   the descriptions start on the same line even when one card's names wrap. */
.who-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; grid-template-rows: auto auto 1fr; column-gap: 16px; }
.who-card { grid-row: span 3; display: grid; grid-template-rows: subgrid; min-width: 0;
            background: rgb(249, 248, 246); border: 1px solid rgb(226, 226, 224);
            border-top: 3px solid rgb(160, 40, 35); padding: 26px 24px; scroll-margin-top: 100px; }
.who-card:target { box-shadow: 0 0 0 2px rgb(160, 40, 35); }
.who-card h3 { color: rgb(20, 20, 20); font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.who-card p { color: rgb(85, 85, 85); font-size: 14px; line-height: 1.75; }
.who-card .who-aka { color: rgb(20, 20, 20); font-size: 13px; font-weight: 500; margin-bottom: 14px; line-height: 1.5; }
.who-aka span { display: block; color: rgb(160, 40, 35); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.who-arrow { grid-row: span 3; flex: 0 0 auto; display: flex; align-items: center; color: rgb(160, 40, 35); }
@media (max-width: 768px) {
  .who-we-help { padding: 8px 20px 56px; }
  .who-flow { display: flex; flex-direction: column; gap: 16px; }
  .who-card { display: block; }
  .who-arrow { justify-content: center; transform: rotate(90deg); padding: 2px 0; }
}

/* Home: case-study rows are now links */
a.home-case-link:hover { background: rgb(249, 248, 246); }

/* Services page: under each service, a column for project sponsors and one for contractors / sub-contractors */
.party-panels { margin-top: 24px; }
.party-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.party-col { padding: 18px 20px; background: rgb(249, 248, 246); border: 1px solid rgb(226, 226, 224); border-top: 3px solid rgb(160, 40, 35); }
.party-col p { color: rgb(68, 68, 68); font-size: 14px; line-height: 1.7; }
.party-col .party-title, .service-col .party-title { color: rgb(160, 40, 35); font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
                                                     text-transform: uppercase; margin-bottom: 6px; }
@media (max-width: 720px) { .party-cols { grid-template-columns: 1fr; } }
.service-more { display: inline-block; margin-top: 14px; color: rgb(160, 40, 35); font-size: 13px; font-weight: 600; text-decoration: none; }
/* Services page: each service block is one link; a soft tint on hover (as on the home page service rows) */
a.services-block { margin: -20px; padding: 20px; transition: background 0.25s; }
a.services-block:hover { background: rgba(160, 40, 35, 0.04); }
a.services-block:hover .service-more { text-decoration: underline; }

/* Service pages (/services/<name>) */
.service-page { background: rgb(255, 255, 255); }
.service-wrap { max-width: 960px; margin: 0 auto; padding: clamp(96px, 9vw, 128px) clamp(20px, 4vw, 40px) clamp(48px, 6vw, 72px); }
.back-link { display: inline-block; color: rgb(160, 40, 35); font-size: 12px; font-weight: 500; text-decoration: none; margin-bottom: 24px; }
.service-eyebrow { color: rgb(160, 40, 35); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 10px; }
.service-page h1 { color: rgb(20, 20, 20); font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; margin-bottom: 10px; }
.service-tagline { color: rgb(160, 40, 35); font-size: 15px; font-weight: 500; margin-bottom: 22px; }
.service-intro { color: rgb(68, 68, 68); font-size: 16px; line-height: 1.85; max-width: 760px; }
.service-page h2 { color: rgb(20, 20, 20); font-weight: 700; font-size: 1.3rem; margin: 48px 0 18px; }
.service-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; }
.service-points li, .service-col li { position: relative; padding-left: 16px; color: rgb(20, 20, 20); font-size: 14px; line-height: 1.6; }
.service-points li::before, .service-col li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px;
                                                     border-radius: 50%; background: rgb(160, 40, 35); }
.service-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.service-col { background: rgb(249, 248, 246); border: 1px solid rgb(226, 226, 224); border-top: 3px solid rgb(160, 40, 35); padding: 24px; }
.service-col > p { color: rgb(68, 68, 68); font-size: 14px; line-height: 1.75; margin-bottom: 14px; }
.service-col ul { display: grid; gap: 8px; }
.service-col > p:last-child { margin-bottom: 0; }
/* "Need specialist support" band at the foot of each service page: heading left, button right, same width as the content above
   (its layout rules live inside the Services page's <main>, which service pages replace) */
.service-page ~ section .services-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
                                               max-width: 880px !important; }
.service-cases { display: grid; border-top: 1px solid rgba(160, 40, 35, 0.12); }
.service-case { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(160, 40, 35, 0.12);
                color: rgb(20, 20, 20); font-size: 15px; font-weight: 600; text-decoration: none; }
.service-case-meta { color: rgb(108, 108, 108); font-size: 12px; font-weight: 400; text-align: right; }
@media (max-width: 720px) {
  .service-cols { grid-template-columns: 1fr; }
  .service-case { flex-direction: column; gap: 4px; }
  .service-case-meta { text-align: left; }
  .service-page ~ section .services-cta-inner { flex-direction: column; align-items: flex-start; }
}
.party-cols.single, .service-cols.single { grid-template-columns: 1fr; }  /* service for one party only */

/* Cookie banner (static/js/site.js) - Accept and Reject are deliberately the same size and style */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto;
                 display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 18px 22px;
                 background: rgb(255, 255, 255); border: 1px solid rgb(226, 226, 224); border-top: 3px solid rgb(160, 40, 35);
                 box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); font-family: Inter, sans-serif; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 320px; color: rgb(68, 68, 68); font-size: 13px; line-height: 1.6; margin: 0; }
.cookie-banner strong { color: rgb(20, 20, 20); }
.cookie-banner a { color: rgb(160, 40, 35); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { min-width: 104px; padding: 11px 20px; background: rgb(20, 20, 20); color: rgb(255, 255, 255); border: 0; cursor: pointer;
              font: 600 11px/1 Inter, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; }
.cookie-btn:hover, .cookie-btn:focus-visible { background: rgb(160, 40, 35); }
.cookie-settings-link { background: none; border: 0; padding: 0; margin-left: 12px; color: inherit; font: inherit; cursor: pointer;
                        text-decoration: underline; text-underline-offset: 2px; }

/* Banner photos: phones load the smaller copy (build.py adds --bg-small to each banner's inline style) */
@media (max-width: 768px) {
  [style*="--bg-small"] { background-image: var(--bg-small) !important; }
}

/* Post byline: team member's photo and a link to their profile on the About page */
.post-author { display: inline-flex; align-items: center; gap: 10px; }
.post-author-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgb(240, 238, 235); flex-shrink: 0; }
.post-author a { color: rgb(160, 40, 35); font-weight: 600; text-decoration: none; }
.post-author a:hover, .post-author a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.team-static-card { scroll-margin-top: 110px; }
.post-author-logo { object-fit: contain; padding: 7px; background: rgb(255, 255, 255); border: 1px solid rgb(226, 226, 224); box-sizing: border-box; }

/* Client testimonials: dark band in the style of the original (Case Studies page and related case study pages) */
.testimonials { background: rgb(20, 20, 20); color: rgb(255, 255, 255); border-top: 1px solid rgb(160, 40, 35);
                border-bottom: 1px solid rgb(160, 40, 35); padding: 56px clamp(20px, 4vw, 48px); }
.testimonials-inner { max-width: 1280px; margin: 0 auto; }
.testimonials-label { color: rgba(255, 255, 255, 0.58); font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
                      text-transform: uppercase; margin-bottom: 22px; }
.testimonials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.testimonials-grid.single { grid-template-columns: minmax(0, 860px); }
.testimonial-card { margin: 0; padding: 28px 34px; background: rgba(255, 255, 255, 0.043); border: 1px solid rgba(255, 255, 255, 0.1); }
.testimonial-card blockquote { margin: 0; }
.testimonial-card blockquote p { color: rgb(247, 246, 244); font-size: 15px; line-height: 1.75; margin-bottom: 18px; }
.testimonial-name { display: block; color: rgb(255, 255, 255); font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
                    text-transform: uppercase; margin-bottom: 4px; }
.testimonial-role { display: block; color: rgba(255, 255, 255, 0.62); font-size: 12px; }
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial-card { padding: 24px; }
}

/* Article footnotes */
.post-body .fn-ref { font-size: .75em; line-height: 0; margin-left: 1px; }
.post-body .fn-ref a { text-decoration: none; font-weight: 600; }
.post-body .footnotes { margin-top: 2.5em; padding-top: 1.2em; border-top: 1px solid rgb(226, 226, 224); font-size: .9em; color: rgb(68, 68, 68); }
.post-body .footnotes h2 { font-size: 1rem; margin: 0 0 .6em; }
.post-body .footnotes li { margin-bottom: .4em; }
.post-body .fn-back { text-decoration: none; }
/* Keep the footnote and the place it came from clear of the fixed header, and mark where you landed */
.post-body .fn-ref a, .post-body .footnotes li { scroll-margin-top: 160px; }
.post-body .fn-ref a:target, .post-body .footnotes li:target { background: rgba(160, 40, 35, .12); border-radius: 2px; }
