/* Terrel Construction — the site stylesheet.
 *
 * Strategy is ticket 13's: re-author in plain CSS with custom properties, no
 * build step, icon fonts replaced by inline SVG, Google Fonts self-hosted,
 * jQuery dropped. This is a PORT, not a redesign — every number below was
 * measured off live production at 1440px with tools/probe-live.mjs, not
 * eyeballed. When a value looks arbitrary it is because the Ratio theme's
 * compiled output said so.
 *
 * Breakpoints are 1024 / 900 / 777 (ticket 16). They are deliberately NOT the
 * parent theme's 1024/768/600/480 set, which is why the visual-diff widths
 * were chosen rather than swept: 1024 is the only boundary both share.
 */

/* ==========================================================================
   Fonts — self-hosted (ticket 13). Two variable woff2 files, latin subset,
   48 KB each, against the 198 KB of @font-face CSS the live site requests for
   3 families x every weight and italic (of which Roboto renders nowhere).
   ========================================================================== */

@font-face {
  font-family: 'Open Sans';
  src: url('/fonts/open-sans-latin.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Raleway';
  src: url('/fonts/raleway-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --accent:       #d6ab60;
  --accent-light: #e7bd74;
  --accent-dark:  #c0954b;
  --ink:          #313131;
  --body:         #757575;
  --muted:        #999;
  --rule:         #d7d7d7;
  --panel-grey:   #f5f5f5;
  --panel-grey-2: #f7f7f7;

  --font-body:    'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Raleway', 'Open Sans', Arial, sans-serif;

  /* The Ratio grid: a 1300px content column, centred. At 1440 that lands the
     content edges at x=70, which is what production measures. */
  --wrap:   1300px;
  --gutter: clamp(20px, 3vw, 40px);

  /* --header-h only exists in the <=1024 treatment, where the bar sits ABOVE
     the hero rather than over it, so the hero is 100vh - 60px there. */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 26px;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/* Every photograph is wrapped in a <picture> by the {% img %} shortcode
   (ticket 29). `display: contents` keeps the wrapper out of layout entirely,
   so every `.thing img` rule below goes on selecting and positioning the image
   exactly as it did before the wrapper existed. */
picture { display: contents; }
a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 40px;
  text-transform: uppercase;
}
h1 { font-size: 39px; line-height: 47.27px; }
h2 { font-size: 33px; }
h3 { font-size: 17px; font-weight: 400; line-height: 26.4444px; }

p { margin: 0 0 25px; }
p:last-child { margin-bottom: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* NOTE ON MULTI-COLUMN ROWS. The Ratio grid is Bootstrap-derived, so every
   row on this site is 30px WIDER than the 1300px content column and every cell
   carries 15px of side padding — cell content still lands on the 1300px
   column. That is why the rows below all read
   `padding-inline: calc(var(--gutter) - 15px)` with 15px back on the children
   rather than a plain `column-gap`. It is not decoration: it is the difference
   between the home intro heading wrapping to two lines, as production does,
   and not wrapping at all.

   The gold hairline under a heading: 50px of 1px accent-light, inline-block so
   it can be centred by its parent's text-align. */
.rule {
  display: inline-block;
  width: 50px;
  height: 0;
  margin: 16px 0 20px;
  border: 0;
  border-top: 1px solid var(--accent-light);
}
.rule-center { display: block; margin: 31px auto 60px; }

.section-subtitle {
  color: var(--muted);
  font-size: 16px;
  font-weight: 100;
  text-align: center;
  margin-bottom: 40px;
}

/* Ticket 28: the portfolio prev/next arrows are icon-only and their accessible
   names depend on this being a real definition, not display:none. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 17px 43px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 22.1px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 55px;
  cursor: pointer;
  transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}
.btn::after { content: '\00a0\00a0\2192'; }

.btn-outline {
  color: #000;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.btn-outline:hover { color: #fff; background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.btn-gradient {
  color: #fff;
  background-image: linear-gradient(to right, var(--accent-dark), var(--accent-light));
}
.btn-gradient:hover { background-image: linear-gradient(to right, var(--accent-light), var(--accent-light)); }

/* ==========================================================================
   Header — two treatments, not one (ticket 14).
   Above 1024px: transparent over the hero, white logo, nav right.
   At 1024px and below: a solid white bar sitting ABOVE the hero, hamburger
   left and colour logo centred.
   ========================================================================== */

.site-header { position: absolute; inset: 0 0 auto; z-index: 20; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
  max-width: none;
  padding-inline: 27px;
}
.logo { display: block; }
.logo img { width: 234px; height: 50px; }
.logo .logo-dark { display: none; }

.nav { display: flex; align-items: center; }
.nav a {
  position: relative;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 500;
  line-height: 80px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: color .15s ease-out;
}
/* A short divider between items, not a full-height rule. */
.nav a + a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 14px;
  border-left: 1px solid rgba(255, 255, 255, .4);
  translate: 0 -50%;
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--accent-light); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 1024px) {
  :root { --header-h: 60px; }

  .site-header { position: static; background: #fff; }
  .header-inner {
    min-height: var(--header-h);
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0;
    padding-inline: var(--gutter);
  }
  .logo { margin-inline: auto; }
  .logo img { width: 187px; height: 40px; }
  .logo .logo-light { display: none; }
  .logo .logo-dark { display: block; }

  .nav-toggle { display: block; color: var(--ink); }
  .nav {
    display: none;
    position: absolute;
    inset: var(--header-h) 0 auto;
    z-index: 20;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: 4px var(--gutter) 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
  }
  .nav[data-open] { display: flex; }
  .nav a { color: var(--ink); padding: 14px 0; line-height: 26px; }
  .nav a + a::before { content: none; }
}

/* ==========================================================================
   Banner — the shared hero component (ticket 14).
   One instance per page. A `.banner` with a single slide IS the inner-page
   banner and loads no JavaScript; add slides and `data-rotate` and it is the
   home carousel. The 8 portfolio galleries use it too, which is how one
   component covers all 13 pages and the site still ships no carousel library.
   ========================================================================== */

.banner {
  position: relative;
  height: calc(100vh - var(--header-h, 0px));
  min-height: 340px;
  overflow: hidden;
  background: #1f1f1f;

  /* Measured live values, not the configured ones: RevSlider's own scaling
     means the rendered title is ~100px at 1440, ~82px at 900, and the 55px
     floor below that. */
  --cap-left: 15%;
  --cap-top: 85%;
  --title-size: clamp(55px, 9vw, 100px);
  --sub-size: clamp(25px, 3.7vw, 40px);
}

/* The five inner-page banners render 20px shorter than the home hero on
   production and sit their caption higher up the frame. */
.banner:not([data-rotate]) {
  height: calc(100vh - 20px - var(--header-h, 0px));
  --cap-top: 78%;
}

/* Below RevSlider's 778px breakpoint the caption moves toward the left edge
   and the title is allowed to wrap — "Attention to Detail" does not fit. */
@media (max-width: 777px) {
  .banner { --cap-left: 7%; }
  .banner-title { white-space: normal; }
}

/* HARD REQUIREMENT from ticket 20: non-current slides are hidden with
   `display:none`, NOT opacity and NOT visibility. This is load-bearing for
   image bytes, not a style preference — with slides hidden by opacity they
   are all "in viewport" to the lazy-loading heuristic and all 18 Niwot Hills
   photographs load on arrival, putting ~5 MB back on the portfolio pages.
   `[data-enter]` and `[data-leaving]` are the two frames of the crossfade,
   which is the only reason a non-current slide is ever laid out at all. */
.banner-slide {
  position: absolute;
  inset: 0;
  display: none;
  opacity: 0;
  transition: opacity .9s ease, transform .9s cubic-bezier(.16, 1, .3, 1);
}
.banner-slide[data-current],
.banner-slide[data-enter],
.banner-slide[data-leaving] { display: block; }
.banner-slide[data-current] { opacity: 1; transform: none; z-index: 1; }
/* slideleft: the outgoing slide is pushed left as the incoming one fades up */
.banner-slide[data-leaving] { opacity: 0; transform: translateX(-12%); z-index: 0; }

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

/* The live slider has no scrim; the text carries a hard shadow instead. Kept
   faithful — adding a scrim would be a design change. */
.banner-caption {
  position: absolute;
  top: var(--cap-top);
  left: var(--cap-left);
  right: var(--gutter);
  z-index: 2;
  color: #fff;
  text-shadow: rgb(31, 31, 31) 1px 1px 2px;
  pointer-events: none;
}
.banner-slide[data-tc-left] { --cap-left: 55%; }
@media (max-width: 777px) { .banner-slide[data-tc-left] { --cap-left: 25%; } }

.banner-title {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--title-size);
  line-height: 1.06;
  font-weight: 100;
  letter-spacing: normal;
  text-transform: uppercase;
  white-space: nowrap;
}
.banner-sub {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--sub-size);
  line-height: 1.1;
  font-weight: 300;
}

/* Caption choreography: subtitle in at 600 ms, title at 800 ms, 900 ms each,
   sliding from +50px — the numbers RevSlider was configured with. */
.banner-slide[data-current] .banner-title,
.banner-slide[data-current] .banner-sub {
  animation: caption-in .9s cubic-bezier(.16, 1, .3, 1) backwards;
}
.banner-slide[data-current] .banner-sub { animation-delay: .6s; }
.banner-slide[data-current] .banner-title { animation-delay: .8s; }

@keyframes caption-in {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Banner controls ----------
   WCAG 2.2.2 requires a visible pause control of anything that autoplays. The
   live home slider has none, so on / these are real added pixels and the one
   entry in tests/screenshot.css (ticket 16). The live PORTFOLIO slider does
   have dots and arrows, so on those 8 pages the intended diff runs the other
   way — see the note in the ticket. */

.banner-controls {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 20px 22px;
}
.banner-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: rgba(255, 255, 255, .75);
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}
.banner-btn:hover { background: rgba(0, 0, 0, .6); color: #fff; }
.banner-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.banner-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.banner-btn .icon-play { display: none; }
.banner[data-paused] .banner-btn .icon-play { display: block; }
.banner[data-paused] .banner-btn .icon-pause { display: none; }

/* The live slider hides its arrows below 1025px and relies on swipe. */
@media (max-width: 1024px) { .banner-arrow { display: none; } }

.banner-dots { display: flex; gap: 8px; margin-right: 8px; }
.banner-dot {
  width: 10px; height: 10px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .3s ease;
}
.banner-dot[aria-current='true'] { background: #fff; }
.banner-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Scroll chevron (a separate WPBakery block on the live page) ---- */

.scrollarrow-wrapper {
  position: absolute;
  left: 50%;
  bottom: 1.5%;
  z-index: 3;
  width: 6%;
  min-width: 35px;
  translate: -50% 0;
  animation: bounce 10s infinite;
  transition: opacity .4s ease;
}
.scrollarrow { display: block; width: 100%; padding: 10% 10% 0; }
.scrollarrow polyline { stroke: rgba(255, 255, 255, .5); transition: stroke .4s ease; }
.scrollarrow-wrapper:hover polyline { stroke: #fff; }

@keyframes bounce {
  0%, 10%, 25%, 40%, 50%, 100% { transform: translateY(0); }
  20% { transform: translateY(-20px); }
  30% { transform: translateY(-10px); }
}

/* ==========================================================================
   Home
   ========================================================================== */

.intro { padding-block: 113px 110px; }
.intro .wrap {
  display: grid;
  grid-template-columns: 4fr 8fr;
  align-items: start;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  padding-inline: calc(var(--gutter) - 15px);
}
.intro .wrap > * { padding-inline: 15px; }
.intro h1 { grid-column: 1; grid-row: 1; }
.intro .rule { grid-column: 1; grid-row: 2; align-self: start; }
.intro .lead, .intro p:last-of-type { grid-column: 2; }
.intro .lead {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 35px;
  font-weight: 300;
  color: #7d7d7d;
  margin-bottom: 20px;
}
.intro p:last-of-type { margin: 20px 0 0; }

@media (max-width: 900px) {
  .intro { padding-block: 70px 66px; }
  .intro .wrap { grid-template-columns: 1fr; }
  .intro h1, .intro .rule, .intro .lead, .intro p:last-of-type { grid-column: 1; grid-row: auto; }
}

/* The two half-and-half panels. On production each side is a table-cell with a
   `cover` background at 50% 55% and an 11px inset border; here the photograph
   is a real <img> (so it can carry alt text and a srcset, ticket 19) and the
   decorative line-art panel behind the copy arrives as `--panel`. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 498px;
}
.split-media,
.split-copy {
  position: relative;
  margin: 0;
}
/* The photograph fills its half edge to edge and must NOT drive the row
   height — on production it is a `cover` background, so the copy side is what
   decides how tall the row is. Absolutely positioning it reproduces that. */
.split-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
/* The 11px inset hairline, which on production is the table-cell's padding
   plus `.edgtf-inside-border`. */
.split-media::after,
.split-copy::after {
  content: '';
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(242, 242, 242, .64);
  pointer-events: none;
  z-index: 1;
}
.split-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--panel-grey) var(--panel) center / cover no-repeat;
  padding: 99px 192px 99px 97px;
}
.split-copy::after { border-color: rgba(194, 196, 200, .6); }
.split-copy > * { max-width: 431px; }
.split-copy p { font-size: 18px; line-height: 26px; margin-bottom: 0; }
.split-copy h2 + .rule { margin: 24px 0 25px; }
.split-copy .btn { align-self: flex-start; margin-top: 50px; }

.split-reverse .split-copy { padding-inline: 152px 137px; }

@media (max-width: 900px) {
  .split, .split-reverse { grid-template-columns: 1fr; min-height: 0; }
  .split-media { order: -1; }
  .split-media img { height: 320px; }
  .split-copy, .split-reverse .split-copy { padding: 50px var(--gutter); }
}

/* ==========================================================================
   Company
   ========================================================================== */

/* The white card overlaps the banner above it by 110px. */
.two-up {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: -110px;
  padding: 50px 35px;
  background: #fff;
  max-width: 1360px;
}
.two-up-item { padding-inline: 15px; }
.two-up-item img {
  width: 550px;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0 auto 29px;
}
.two-up-item h2 { margin-bottom: 15px; }
/* On production the Residential/Commercial prose is accent-coloured — and it
   sits in divs, not <p>, which is how a source-parsing extractor lost it
   (ticket 19). */
.tc_company_description { color: var(--accent); }

@media (max-width: 900px) {
  .two-up { grid-template-columns: 1fr; row-gap: 40px; margin-top: -60px; padding: 40px var(--gutter); }
}

/* The gold "Why Terrel Construction?" band straddles the dark section below
   it, so it is pulled down out of its own flow. */
.why { position: relative; }
.why-banner {
  position: relative;
  z-index: 2;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin: 60px auto -33px;
  padding: 20px;
  background: var(--accent);
  border: 2px solid var(--accent-light);
  color: #fff;
  font-size: 19px;
  font-weight: 300;
  line-height: 26px;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
}

.why-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-block: 166px 76px;
  padding-inline: calc(var(--gutter) - 15px);
  background: #262626 url('/img/parallax-7.jpg') center / cover no-repeat;
  color: #b9b9b9;
  max-width: none;
}
.why-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 24, .86);
}
.why-item {
  position: relative;
  padding-inline: 15px;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-content: start;
  width: min(100%, 380px);
}
.why-icon { width: 24px; height: 24px; color: var(--accent-light); grid-row: 1; }
.why-item h3 { color: #fff; margin-bottom: 13px; align-self: center; }
.why-item p { grid-column: 2; font-size: 13px; line-height: 26px; color: #b9b9b9; }

@media (max-width: 900px) {
  .why-banner { margin-bottom: -30px; font-size: 17px; }
  .why-grid { grid-template-columns: 1fr; row-gap: 40px; padding-block: 100px 60px; }
}

.communities { padding-block: 104px 80px; }
.communities h2 { text-align: center; }

/* 11 photographs in rows of 4, 4 and 3 — the last row stretches to thirds on
   production because it is a table with three cells, not a four-column grid
   with an empty slot. A 12-track grid reproduces both widths exactly. */
.community-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.community { position: relative; grid-column: span 3; }
.community:nth-child(n + 9) { grid-column: span 4; }
.community img {
  width: 100%;
  aspect-ratio: 325 / 241;
  object-fit: cover;
}
.community-name {
  position: absolute;
  left: 32px;
  bottom: 26px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px #1f1f1f;
}

@media (max-width: 900px) {
  .communities { padding-block: 70px 50px; }
  .community, .community:nth-child(n + 9) { grid-column: span 6; }
}
@media (max-width: 777px) {
  .community, .community:nth-child(n + 9) { grid-column: span 12; }
}

/* ==========================================================================
   Experience
   ========================================================================== */

.story {
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: start;
  margin-block: 80px;
  padding-inline: calc(var(--gutter) - 15px);
}
.story > * { padding-inline: 15px; }
.story-alt { grid-template-columns: 7fr 5fr; }
.story-media { order: 2; margin: 0 29.7px; text-align: center; }
.story-alt .story-media { order: 0; }
.story-copy { order: 1; padding-inline: 42px 41px; }
.story-copy .rule { margin: 16px 0; }
.story-media img,
.milestones img {
  display: inline-block;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #ebebeb;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .08);
}
.story-media figcaption,
.milestones figcaption {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 300;
  line-height: 26px;
  color: var(--body);
  text-align: center;
}
.story-copy p { font-size: 16px; line-height: 32px; margin: 20px 0 0; }
.story-copy p + p { margin-top: 26px; }

.milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-block: 80px;
  padding-inline: calc(var(--gutter) - 15px);
}
.milestones figure { padding-inline: 15px; }
.milestones figure { margin: 0; }

@media (max-width: 900px) {
  .story, .story-alt { grid-template-columns: 1fr; row-gap: 30px; margin-block: 50px; }
  .story-media, .story-alt .story-media { order: -1; }
  .story-copy { padding-inline: 0; }
  .milestones { grid-template-columns: 1fr; row-gap: 30px; margin-block: 50px; }
}

/* ==========================================================================
   Gallery — two fixed sections, Residential then Commercial. There is no
   filter UI on the live site (both shortcodes carry filter="no"), so there is
   nothing to replace (ticket 19).
   ========================================================================== */

.projects { padding-block: 0 60px; }
.projects h2 { margin-top: -6px; }
.projects-shaded { background: var(--panel-grey); }
.projects h2 { text-align: center; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-block: 0;
  padding-inline: 8.3px;
  column-gap: 16.6px;
  row-gap: 27px;
  margin: 0;
  list-style: none;
}
.project-card a { display: block; text-decoration: none; }
.project-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.project-title {
  display: block;
  padding-top: 17px;
  color: var(--ink);
  font-size: 17px;
  line-height: 26.4444px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.project-categories {
  margin: 0;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
  line-height: 20px;
}

@media (max-width: 900px) {
  .projects { padding-block: 50px 40px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 777px) {
  .project-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Portfolio (a single /gallery/<slug>/ page)
   ========================================================================== */

/* The full-bleed carousel IS this page's content (ticket 24). Production
   gives it a fixed height rather than 100vh. */
.banner-portfolio {
  height: 780px;
  min-height: 0;
}

/* The title sits in a translucent plate over the bottom-left of the carousel,
   not in a heading below it. */
.portfolio-plate {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 4;
  width: 360px;
  max-width: 80%;
  min-height: 170px;
  padding: 44px 76px 44px 77px;
  background: rgba(255, 255, 255, .7);
}
.portfolio-plate h1 { font-size: 33px; line-height: 40px; padding-bottom: 13px; }
/* Photo credit is behind an expand control on production, so showing it is a
   deliberate small addition on the one page that has one (Goldbranch). */
.portfolio-credit { margin: 0; font-size: 13px; line-height: 20px; color: var(--body); }

.related { padding-block: 40px 60px; max-width: none; }
.related h2 { text-align: center; margin-bottom: 46px; }
.related .project-card img { aspect-ratio: 4 / 3; }

/* The bottom bar: previous project left, back-to-gallery centred, next right. */
.portfolio-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 39px max(var(--gutter), calc((100% - var(--wrap)) / 2));
  background: var(--panel-grey-2);
}
.portfolio-prev { grid-column: 1; justify-self: start; }
.portfolio-back { grid-column: 2; justify-self: center; margin: 0; }
.portfolio-next { grid-column: 3; justify-self: end; }
.portfolio-nav a { display: block; line-height: 22px; color: var(--body); text-decoration: none; }
.portfolio-nav a:hover { color: var(--accent); }
.portfolio-nav svg { width: 22px; height: 22px; }
.portfolio-back a { font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }

@media (max-width: 900px) {
  .banner-portfolio { height: 60vh; min-height: 360px; }
  .related { padding-block: 30px 40px; }
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-band { background: var(--panel-grey-2); }
.contact {
  display: grid;
  grid-template-columns: 4fr 8fr;
  align-items: start;
  padding-block: 30px 50px;
}
.contact-info { padding-inline: 28px 0; }
.contact-main { padding-inline: 73px 15px; }
/* Production spaces these blocks with WPBakery `vc_empty_space` rows; here it
   is plain margin. */
.contact-main .hours { margin-bottom: 35px; }
.contact-form { margin-top: 35px; }
.contact h2 { margin-top: 40px; }
.contact p { margin-block: 15px 25px; }

.phone { display: flex; align-items: center; gap: 14px; }
.phone-icon { width: 24px; height: 24px; flex: none; color: var(--accent); }
.phone a { font-size: 25px; text-decoration: none; }
.phone a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; row-gap: 20px; }
  .contact-info, .contact-main { padding-inline: 0; }
}

/* ---------- The form ---------- */

.contact-form { max-width: 773px; }
.contact-form .field { margin: 0 0 9px; }
.contact-form label {
  display: block;
  color: #aaa;
  font-size: 16px;
  line-height: 26px;
}
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 16.5px 15px;
  margin-bottom: 9px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 20px;
  color: var(--body);
}
.contact-form textarea { height: 150px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.contact-form .btn {
  padding: 0 25px;
  height: 50px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  line-height: 45px;
  text-align: center;
}
.contact-form .btn::after { content: none; }

/* A real field name a bot will want to fill, hidden from people and from
   assistive tech. Deliberately not `display:none` — some bots skip those. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cf-turnstile { margin-bottom: 20px; }

/* Nothing is stored (ticket 11), so a failed send is a lost lead unless the
   visitor acts — which is why the error state is loud and names the phone. */
.form-status { margin-top: 20px; padding: 14px 18px; font-size: 15px; line-height: 24px; }
.form-status[hidden] { display: none; }
.form-success { background: #eef6ee; color: #2f5d33; }
.form-error { background: #fbeeee; color: #8a2b2b; }
.form-error a { font-weight: 700; }

/* ==========================================================================
   Landing pages — dormant (ticket 09 builds zero of them today), but they
   share this stylesheet so a page re-enabled in 2029 inherits every
   intervening fix.
   ========================================================================== */

.landing {
  display: grid;
  grid-template-columns: 7fr 5fr;
  column-gap: 40px;
  align-items: start;
  padding-block: 80px;
}
.landing h2 { margin-block: 40px 15px; }
.landing h3 { margin-block: 30px 10px; }
.landing .phone a { font-size: 25px; }

@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; row-gap: 40px; padding-block: 50px; }
}

/* ==========================================================================
   Footer CTA — site-wide, on every page except /contact/.
   ========================================================================== */

.footer-cta-communities {
  margin: 0;
  /* Production holds this to an 852px measure, which is what puts it on three
     lines. The band itself stays full-bleed. */
  padding: 124px max(var(--gutter), calc((100% - 852px) / 2)) 127px;
  background: var(--accent) url('/img/home-10-background-image-small.jpg') center / cover no-repeat;
  color: #fff;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 35px;
  text-align: center;
}

.footer-cta-panel {
  position: relative;
  background: #262626 var(--cta-image) center / cover no-repeat;
  color: #fff;
}
.footer-cta-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, .9);
}
.footer-cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 8fr 4fr;
  align-items: start;
  padding-block: 60px;
  padding-inline: calc(var(--gutter) - 15px);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
}
.footer-cta-inner > * { padding-inline: 15px; }
.footer-cta-copy h2 { color: #fff; }
.footer-cta-copy .rule { margin: 25px 0 32px; }
.footer-cta-copy p { margin: 15px 0 0; font-size: 18px; line-height: 26px; }
.footer-cta-action { margin: 65px 0 0; }

@media (max-width: 900px) {
  .footer-cta-communities { padding-block: 70px; font-size: 19px; line-height: 30px; }
  .footer-cta-inner { grid-template-columns: 1fr; row-gap: 30px; padding-block: 50px; }
  .footer-cta-action { margin-top: 0; text-align: left; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: #000; }
.footer-inner { padding-block: 18px; }
.footer-inner .copyright {
  margin: 0 0 25px;
  color: var(--accent);
  font-size: 12px;
  line-height: 26px;
}

/* ==========================================================================
   Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .banner-slide,
  .banner-slide[data-current],
  .banner-slide[data-leaving] { transition: opacity .3s ease; transform: none; }
  .banner-slide[data-current] .banner-title,
  .banner-slide[data-current] .banner-sub { animation: none; }
  .scrollarrow-wrapper { animation: none; }
}
