/* Homepage refinements requested for the 2026 design pass. */
.home-section-removed,
.home-remove,
.home-stats-remove,
.home-label-removed {
  display: none !important;
}

.home-manifesto,
.home-capabilities,
.home-app-section,
.home-process,
.home-clients,
.home-sustainability,
.home-final-cta {
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
}

.home-app-section {
  border-top: 1px solid rgba(35, 31, 27, 0.08);
}

.home-app-copy {
  align-self: center;
}

.home-app-grid {
  align-items: stretch !important;
}

.home-app-media-column {
  display: flex;
}

.home-app-body {
  line-height: 1.75;
  text-align: justify;
}

.home-app-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto !important;
  border-radius: 0.75rem;
  box-shadow: 0 1.5rem 4rem rgba(35, 31, 27, 0.16);
}

.home-app-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.home-app-media img {
  object-position: center;
  transition: transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.home-app-media:hover img {
  transform: scale(1.025);
}

@media (max-width: 767px) {
  .home-app-grid {
    display: flex !important;
    flex-direction: column;
  }

  .home-app-media-column {
    width: 100%;
  }

  .home-app-media {
    height: auto;
    aspect-ratio: 4 / 5 !important;
  }

  .home-app-body {
    text-align: left;
  }
}

.home-manifesto .home-manifesto-layout {
  display: flex !important;
  flex-direction: column;
  gap: 2rem;
}

.home-clients .home-clients-header {
  display: flex !important;
  flex-direction: column;
  gap: 1.5rem;
}

.home-manifesto .home-manifesto-layout > div {
  width: 100% !important;
  max-width: none !important;
}

.home-clients .home-clients-header > div {
  width: 100% !important;
  max-width: none !important;
}

.home-manifesto h2,
.home-capabilities h2,
.home-process h2,
.home-clients h2 {
  max-width: none !important;
  text-align: left !important;
}

.home-manifesto h2 em,
.home-capabilities h2 em,
.home-counters h2 em {
  color: #b8893d;
  font-style: italic;
  font-weight: inherit;
}

.home-counters h2 {
  translate: 0 -0.5rem;
}

/* The one-line heading spans wide enough to collide with the description in the second grid column,
   so stack the header: heading on top, "Numbers don't define our work…" directly beneath it. */
.home-counters .home-counters-header {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}
.home-counters .home-counters-header > div {
  width: 100% !important;
  max-width: none !important;
}
.home-counters .home-counters-description {
  max-width: none !important;
}

@media (min-width: 768px) {
  .home-counters .home-counters-header {
    margin-bottom: 3rem !important;
  }

  /* Keep the description on a single line on desktop; mobile wraps naturally. */
  .home-counters .home-counters-description {
    white-space: nowrap;
  }
}

/* Capabilities now sits directly above the manifesto; the two stacked section paddings left a big
   empty band, so tighten just that seam. */
.home-capabilities > .container-edge {
  padding-bottom: 4rem !important;
}
.home-manifesto > .container-edge {
  padding-top: 4rem !important;
}

.home-capabilities .home-capability-grid > div {
  display: flex;
}

.home-capabilities .home-capability-card {
  width: 100%;
  height: 100%;
}

.home-process-track {
  position: relative;
  isolation: isolate;
}

.home-process-track::before {
  display: none;
}

.home-process-panel {
  position: relative;
  z-index: auto;
  cursor: default !important;
}

.home-process-panel p {
  max-width: 100% !important;
  text-align: left;
  text-wrap: balance;
}

.home-process-panel .home-process-step {
  position: absolute !important;
  z-index: 3;
  top: 1rem !important;
  right: auto !important;
  left: 1.5rem !important;
  display: flex !important;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 137, 61, 0.48);
  border-radius: 999px;
  background: #f4eee6;
  color: #9a6b26 !important;
}

.home-process-panel .home-process-step span {
  color: inherit !important;
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
  font-size: 0.68rem !important;
  font-style: normal !important;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.home-process-connector {
  position: absolute;
  z-index: 2;
  top: 2.25rem;
  right: 0;
  left: 0;
  display: block;
  height: 1px;
  background: rgba(184, 137, 61, 0.2);
  overflow: hidden;
  pointer-events: none;
}

.home-process-connector::after {
  position: absolute;
  top: -0.5px;
  bottom: auto;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #b8893d, #f1d397);
  box-shadow: 0 0 10px rgba(184, 137, 61, 0.72);
  content: "";
  opacity: 1;
  animation-duration: 5s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: width;
}

.home-process-panel--step-1 .home-process-connector::after {
  animation-name: home-process-draw-1;
}

.home-process-panel--step-2 .home-process-connector::after {
  animation-name: home-process-draw-2;
}

.home-process-panel--step-3 .home-process-connector::after {
  animation-name: home-process-draw-3;
}

.home-process-panel--step-4 .home-process-connector::after {
  animation-name: home-process-draw-4;
}

.home-process-panel--step-5 .home-process-connector::after {
  animation-name: home-process-draw-5;
}

@keyframes home-process-draw-1 {
  0% { width: 0; }
  20%, 99.99% { width: 100%; }
  100% { width: 0; }
}

@keyframes home-process-draw-2 {
  0%, 20% { width: 0; }
  40%, 99.99% { width: 100%; }
  100% { width: 0; }
}

@keyframes home-process-draw-3 {
  0%, 40% { width: 0; }
  60%, 99.99% { width: 100%; }
  100% { width: 0; }
}

@keyframes home-process-draw-4 {
  0%, 60% { width: 0; }
  80%, 99.99% { width: 100%; }
  100% { width: 0; }
}

@keyframes home-process-draw-5 {
  0%, 80% { width: 0; }
  99.99% { width: 100%; }
  100% { width: 0; }
}

.home-process-panel--first .home-process-connector {
  left: 2.75rem;
}

.home-process-panel--last .home-process-connector {
  right: calc(100% - 2.75rem);
}

@media (max-width: 767px) {
  .home-process-panel {
    padding-right: 1.5rem !important;
    padding-left: 5.5rem !important;
  }

  .home-process-panel .home-process-step {
    right: auto !important;
    left: 1.5rem !important;
  }

  .home-process-connector {
    top: 0;
    right: auto;
    bottom: 0;
    left: 2.75rem;
    width: 1px;
    height: auto;
  }

  .home-process-connector::after {
    top: 0;
    right: 0;
    bottom: auto;
    left: -0.5px;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, transparent, rgba(224, 177, 92, 0.95) 45%, #fff2cf 50%, rgba(224, 177, 92, 0.95) 55%, transparent);
    will-change: height;
  }

  .home-process-panel--step-1 .home-process-connector::after { animation-name: home-process-draw-mobile-1; }
  .home-process-panel--step-2 .home-process-connector::after { animation-name: home-process-draw-mobile-2; }
  .home-process-panel--step-3 .home-process-connector::after { animation-name: home-process-draw-mobile-3; }
  .home-process-panel--step-4 .home-process-connector::after { animation-name: home-process-draw-mobile-4; }
  .home-process-panel--step-5 .home-process-connector::after { animation-name: home-process-draw-mobile-5; }

  .home-process-panel--first .home-process-connector {
    top: 2.25rem;
    right: auto;
    left: 2.75rem;
  }

  .home-process-panel--last .home-process-connector {
    right: auto;
    left: 2.75rem;
    bottom: calc(100% - 2.25rem);
  }
}

@keyframes home-process-draw-mobile-1 {
  0% { height: 0; }
  20%, 99.99% { height: 100%; }
  100% { height: 0; }
}

@keyframes home-process-draw-mobile-2 {
  0%, 20% { height: 0; }
  40%, 99.99% { height: 100%; }
  100% { height: 0; }
}

@keyframes home-process-draw-mobile-3 {
  0%, 40% { height: 0; }
  60%, 99.99% { height: 100%; }
  100% { height: 0; }
}

@keyframes home-process-draw-mobile-4 {
  0%, 60% { height: 0; }
  80%, 99.99% { height: 100%; }
  100% { height: 0; }
}

@keyframes home-process-draw-mobile-5 {
  0%, 80% { height: 0; }
  99.99% { height: 100%; }
  100% { height: 0; }
}

.home-client-groups {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}

.home-client-group-title {
  margin-bottom: 1.5rem;
  color: #151310;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 500;
  line-height: 1;
}

.home-client-grid {
  display: grid;
  gap: 1px;
  background: rgba(21, 19, 16, 0.12);
  border: 1px solid rgba(21, 19, 16, 0.12);
}

.home-client-grid--residential {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-client-grid--commercial {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 60%;
  margin-inline: auto;
}

.home-project-card-hidden {
  display: none !important;
}

.home-projects .home-projects-header {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.home-projects .home-projects-header > div {
  width: 100% !important;
  max-width: none !important;
}

.home-projects .home-projects-description {
  max-width: 48rem !important;
}

.home-projects .home-project-grid {
  gap: 1rem !important;
  background: transparent !important;
}

.home-projects-button {
  height: 3.5rem;
  gap: 0.75rem !important;
  border-radius: 999px;
  background: #b8893d;
  padding: 0 0.5rem 0 1.75rem !important;
  color: #101010 !important;
  transition: background-color 220ms ease, color 220ms ease, box-shadow 220ms ease, transform 220ms ease !important;
}

.home-projects-button:hover,
.home-projects-button:focus-visible {
  background: #101010 !important;
  color: #d2a558 !important;
  box-shadow: 0 14px 50px -10px rgba(184, 137, 61, 0.6);
  outline: none;
  transform: translateY(-1px);
}

.home-projects-button svg {
  width: 2.5rem !important;
  height: 2.5rem !important;
  border-radius: 999px;
  background: #101010;
  padding: 0.72rem;
  color: #d2a558;
  transition: background-color 220ms ease, color 220ms ease;
}

.home-projects-button:hover svg,
.home-projects-button:focus-visible svg {
  background: #d2a558;
  color: #101010;
}

.home-reach .home-remove-border {
  border-top: 0 !important;
}

.home-reach {
  border-bottom: 0 !important;
}

.home-reach h2 > span + span {
  margin-top: clamp(4rem, 6vw, 6rem) !important;
}

.home-voices-no-divider {
  border-top: 0 !important;
}

.home-voices-no-divider > .home-boundary-divider-remove {
  border-top: 0 !important;
  box-shadow: none !important;
}

.home-voices-no-divider > .rule.home-boundary-divider-remove {
  display: none !important;
}

.home-client-logo {
  display: flex;
  aspect-ratio: 5 / 3;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f7f2e9;
  padding: clamp(1rem, 2vw, 2.25rem);
}

.home-client-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1);
}

.home-client-logo-placeholder {
  color: rgba(21, 19, 16, 0.36);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.home-environment {
  min-height: 0 !important;
  height: auto !important;
  overflow: hidden;
  background: #e8dfd0 !important;
  color: #171411 !important;
  border-bottom: 1px solid rgba(23, 20, 17, 0.12);
}

.home-environment-inner {
  padding-top: clamp(4.5rem, 8vw, 8.5rem) !important;
  padding-bottom: clamp(4.75rem, 9vw, 9.5rem) !important;
}

.home-environment-label {
  display: block;
  color: rgb(184, 137, 61);
  font-family: Inter, sans-serif;
  font-size: clamp(1rem, 1.6vw, 1.5rem);
}

.home-environment-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.5rem, 2.2vw, 2.25rem);
  margin-top: clamp(2.75rem, 4.5vw, 4.75rem);
}

.home-environment-heading {
  max-width: none;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.25rem, 5.8vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.92;
  white-space: nowrap;
}

.home-environment-heading em {
  color: #a86f18;
  font-weight: 500;
}

.home-environment-body {
  width: 62%;
  max-width: 52rem;
  margin: 0;
  color: rgba(23, 20, 17, 0.72);
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1rem, 1.25vw, 1.24rem);
  line-height: 1.72;
}

@media (max-width: 760px) {
  .home-environment-inner {
    padding-top: 4rem !important;
    padding-bottom: 4.5rem !important;
  }

  .home-environment-grid {
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .home-environment-heading {
    max-width: 100%;
    font-size: clamp(3.25rem, 17vw, 5.4rem);
    white-space: normal;
  }

  .home-environment-body {
    width: 100%;
    font-size: 1rem;
    line-height: 1.68;
  }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .home-environment-body {
    width: 78%;
  }
}

.home-footer-container {
  padding-top: 0 !important;
}

.home-footer-shell {
  padding-top: 0 !important;
}

.home-footer-shell .stallion-footer-links-grid {
  padding-top: clamp(2.5rem, 4vw, 4rem) !important;
}

.home-footer-cta {
  display: none !important;
}

.home-final-cta > div > div:last-child {
  translate: 0 -2rem !important;
}

.home-final-cta .home-final-cta-actions {
  margin-top: clamp(1.75rem, 3vw, 2.5rem) !important;
}

.home-back-to-top {
  position: fixed;
  right: clamp(1rem, 2.2vw, 2rem);
  bottom: clamp(1rem, 2.2vw, 2rem);
  z-index: 80;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(184, 137, 61, 0.55);
  border-radius: 999px;
  background: rgba(16, 16, 16, 0.88);
  color: #d2a558;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 220ms ease, transform 220ms ease, background-color 220ms ease;
  backdrop-filter: blur(12px);
}

.home-back-to-top:hover,
.home-back-to-top:focus-visible {
  background: #b8893d;
  color: #101010;
  outline: none;
}

.home-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (min-width: 1000px) {
  .home-one-line {
    max-width: none !important;
    white-space: nowrap;
  }

  .home-sustainability h2 > span:nth-child(1),
  .home-sustainability h2 > span:nth-child(2) {
    white-space: nowrap;
  }

  .home-sustainability-line {
    white-space: nowrap;
  }

  .home-final-cta > div > div:last-child {
    translate: 0 -5.25rem !important;
  }
}

@media (max-width: 800px) {
  .home-project-grid {
    grid-template-columns: 1fr !important;
  }

  .home-client-grid--residential,
  .home-client-grid--commercial {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .home-client-groups {
    gap: 3rem;
  }
}

/* Project names render as "<first word> <rest in gold italic>". The gold italic is wanted on
   headline copy, but on a project NAME it makes the same string look like two different things
   from card to card, so every name is set flat in the inherited colour.
 *
 * Scoped to h3/h4 on purpose. The "Let's build something precise." CTA is an h2 and the
 * "Close enough to be on site." headline is a bare span -- both keep the gold italic. */
h3 > span.italic.text-gold-soft,
h4 > span.italic.text-gold-soft {
  font-style: normal;
  color: inherit;
}

/* Process steps: reveal the matching stage photo over the whole card. Desktop reveals on hover;
   touch devices reveal on tap (JS toggles .is-revealed) since :hover never fires there. */
.home-process-panel {
  position: relative;
  overflow: hidden;
}
.home-process-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.home-process-panel--step-1::after { background-image: url("/assets/process/1.png"); }
.home-process-panel--step-2::after { background-image: url("/assets/process/2.png"); }
.home-process-panel--step-3::after { background-image: url("/assets/process/3.png"); }
.home-process-panel--step-4::after { background-image: url("/assets/process/4.png"); }
.home-process-panel--step-5::after { background-image: url("/assets/process/5.png"); }
@media (hover: hover) {
  .home-process-panel:hover::after { opacity: 1; }
}
.home-process-panel.is-revealed::after { opacity: 1; }
/* Touch affordance: a small "Tap to view" pill, hidden once the image is showing. */
@media (hover: none) {
  .home-process-panel {
    cursor: pointer;
  }
  .home-process-panel::before {
    content: "Tap to view";
    position: absolute;
    z-index: 6;
    right: 1rem;
    bottom: 1rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(24, 22, 20, 0.72);
    color: #f4efe9;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  .home-process-panel.is-revealed::before { opacity: 0; }
}

/* "Close enough to be on site." — on phones the scaling headline (and its cities strip) peaked at
   ~1.6x the viewport and clipped both sides. Constrain each so the widest scaled state stays inside
   the screen: the headline wraps to two lines instead of overrunning, the strip wraps to a column. */
@media (max-width: 640px) {
  .home-reach h2 {
    max-width: 100% !important;
  }
  .home-reach h2 > span.block:first-of-type {
    font-size: clamp(1rem, 4.8vw, 1.6rem) !important;
    max-width: 54vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .home-reach h2 > span.block:last-of-type {
    max-width: 56vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
