/* R11 — Loom-measured Services entry and closing-footer reveal.
 *
 * The reference does not pin or lift the Services block. That block remains in
 * normal flow, its photograph travels a short parallax distance, and only the
 * title enters word by word. The perceived reveal belongs to the tall closing
 * footer, which sits behind the rounded page edge and rises as the page leaves.
 */

.site-footer__reveal {
  display: flex;
  min-height: inherit;
  flex-direction: column;
}

.site-footer--home-closing {
  padding: clamp(54px, 6.5vw, 88px) 0 0;
}

.site-footer--home-closing .site-footer__reveal {
  min-height: min(82svh, 780px);
}

.site-footer__closing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
  padding-bottom: clamp(36px, 4.4vw, 56px);
}

.site-footer__cta .b-eyebrow {
  margin-bottom: 18px;
  color: var(--p-accent-on-dark);
}

.site-footer__cta h2 {
  max-width: 18ch;
  margin: 0 0 22px;
  color: var(--b-text-inverse);
  font-family: var(--b-font-display);
  font-size: clamp(3.15rem, 4.8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: normal;
  line-height: .6;
  text-transform: uppercase;
}

.site-footer__cta h2 .b-word,
.site-footer__cta h2 .b-word__inner {
  line-height: .95;
}

.has-js .site-footer__cta .b-footer-hinge::after {
  content: none;
  background: none;
}

.site-footer__cta .b-footer-hinge .b-hinge__loop {
  position: absolute;
  z-index: -1;
  top: 0;
  left: -2.5%;
  display: flex;
  width: 105%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

.site-footer__cta .b-footer-hinge .b-hinge__loop--circle {
  align-items: center;
}

.site-footer__cta .b-footer-hinge .b-hinge__loop--underline {
  align-items: flex-end;
  transform: translateY(15%);
}

.site-footer__cta .b-footer-hinge .b-hinge__loop svg {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  overflow: visible;
}

.site-footer__cta .b-footer-hinge {
  color: var(--p-accent-on-dark);
  border-bottom: 4px solid var(--p-accent-on-dark);
}

.site-footer__cta .b-footer-hinge .b-hinge__loop path {
  fill: none;
  stroke: var(--p-accent-on-dark);
  stroke-width: calc(4px * var(--stroke, 1));
  stroke-miterlimit: 10;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: none;
}

.site-footer__cta .b-footer-hinge.is-drawn .b-hinge__loop path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s ease .2s;
}

@media (max-width: 767px) {
  .site-footer__cta .b-footer-hinge .b-hinge__loop path {
    stroke-width: calc(2.5px * var(--stroke, 1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__cta .b-footer-hinge .b-hinge__loop path,
  .site-footer__cta .b-footer-hinge.is-drawn .b-hinge__loop path {
    stroke-dashoffset: 0;
    transition: none;
  }
}

.site-footer__cta p:not(.b-eyebrow) {
  max-width: 54ch;
  margin: 0;
  color: var(--p-on-dark-muted);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.45;
}

.site-footer__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding-bottom: 7px;
}

.site-footer--home-closing .site-footer__inner {
  margin-top: auto;
  padding-top: clamp(30px, 3.4vw, 44px);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.b-services-parallax-ready .b-services-index__art {
  transform: translate3d(0, var(--b-services-parallax, 0px), 0) scale(1.12);
  transform-origin: center;
  will-change: transform;
}

.b-services-index__row {
  --b-services-link-pad: 34px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 10px var(--b-services-link-pad);
}

.b-services-index__label {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  transform: translateX(calc(var(--b-services-link-pad) * -1));
}

.b-services-index__label::before {
  content: "0" counter(vrb-svc);
  flex: 0 0 auto;
  font-family: var(--b-font-display);
  font-size: 0.85em;
  font-weight: 700;
  color: var(--p-on-pale-muted);
  opacity: 0.72;
  transition: color 0.22s ease, opacity 0.22s ease;
}

.b-services-index__row:hover .b-services-index__label::before,
.b-services-index__row:focus-visible .b-services-index__label::before {
  color: var(--p-focus);
  opacity: 1;
}

.b-services-index__arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 48px;
  height: 48px;
  transform-origin: center;
  pointer-events: none;
}

/* One circle only. The second (entrance) circle is gone: it was what stood over
   the counter and read as a stray button hanging below the row. The swap the
   animation needs happens INSIDE this one circle — the arrow leaves through its
   right edge and re-enters from its left edge (see b-services-arrow-next). */
.b-services-index__arrow--before {
  display: none;
}

.b-services-index__arrow--after {
  right: 0;
  transform: translateY(-50%) scale(1);
}

/* r10 ships `.b-services-index__row:hover .b-services-index__arrow { transform:
   translateX(3px) }` at specificity (0,3,0). Two things wrong with it: it strips
   the translateY(-50%) so the circle drops half its height below the row's
   centre ("leans toward the bottom"), and the 3px nudge is the only movement a
   touch user sees, because phones report pointer: coarse and never trigger the
   svg keyframes. The swap happens inside the circle instead, so the circle must
   not move at all. Same specificity, later stylesheet — this wins. */
.b-services-index__row:hover .b-services-index__arrow,
.b-services-index__row:focus-visible .b-services-index__arrow,
.b-services-index__row:active .b-services-index__arrow {
  transform: translateY(-50%) scale(1);
}

.b-services-index__arrow svg {
  width: 16px;
  height: 10px;
  fill: currentColor;
  stroke: none;
}

.b-services-index__all {
  display: flex;
  width: 100%;
  max-width: none;
  justify-content: center;
  margin: 30px auto 0;
}

@media (hover: hover) and (pointer: fine) {
  .b-services-index__row:hover {
    color: var(--p-focus);
  }
}

/* The label never moves. Shifting it right on hover made long titles ride over
   the arrow circle — "Ongoing SEO Strategy & Consulting" collided with it — and
   the shift was the only reason the circle ever needed repositioning. */
@media (prefers-reduced-motion: no-preference) {
  /* No (hover: hover) gate here. A phone tap produces a sticky :hover, which is
     the only chance a touch user gets to see the swap; on desktop the same rule
     fires on real hover. */
  .b-services-index__row:hover .b-services-index__arrow svg,
  .b-services-index__row:focus-visible .b-services-index__arrow svg,
  .b-services-index__row:active .b-services-index__arrow svg,
  /* The class route is the one that works on touch. A phone reports
     pointer: coarse, so :hover is only a momentary artifact of the tap and
     :active is gone by the time the browser starts navigating — the row is an
     <a>, so it leaves the page. r11-services-footer-parity.js adds this class on
     pointerdown, which fires before navigation and is not pointer-type gated. */
  .b-services-index__row.is-swapping .b-services-index__arrow svg {
    animation: b-services-arrow-next .55s cubic-bezier(.43, 1.71, .39, .92) forwards;
  }
}

@keyframes b-services-arrow-next {
  0% {
    transform: translateX(0);
    clip-path: polygon(100% 0, 0 0, 0 100%, 100% 100%);
  }
  50% {
    transform: translateX(10px);
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  }
  50.1% {
    transform: translateX(-10px);
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  100% {
    transform: translateX(0);
    clip-path: polygon(100% 0, 0 0, 0 100%, 100% 100%);
  }
}

.b-services-index__title[data-b-services-heading="waiting"] .b-word__inner {
  opacity: 0;
  transform: translateY(110%);
}

.b-services-index__title[data-b-services-heading="shown"] .b-word__inner {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 360ms cubic-bezier(.165, .84, .44, 1),
    transform 1s cubic-bezier(.165, .84, .44, 1);
  transition-delay: calc(var(--b-word-index, 0) * 100ms);
}

@media (min-width: 1280px) and (min-height: 760px) {
  .b-services-index__panel {
    height: calc(100svh - 80px);
    min-height: calc(100svh - 80px);
  }

  .b-services-index__content {
    width: min(100%, 1680px);
    padding: clamp(44px, 5.5vh, 72px) clamp(36px, 7vw, 136px);
  }

  .b-services-index__eyebrow,
  .b-services-index__title,
  .b-services-index__intro {
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .b-services-index__title {
    margin-bottom: 14px;
    font-size: clamp(4rem, 7vw, 7.5rem);
    line-height: .94;
  }

  .b-services-index__intro {
    margin-inline: auto;
  }

  .b-services-index__list {
    width: 100%;
    column-gap: clamp(48px, 6vw, 100px);
    row-gap: clamp(14px, 2vh, 22px);
    margin-top: clamp(32px, 4.8vh, 58px);
  }

  .b-services-index__row {
    min-height: clamp(76px, 9vh, 92px);
    font-size: clamp(1.25rem, 1.7vw, 1.9rem);
  }

  .b-services-index__arrow {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .b-services-index__all {
    display: flex;
    justify-content: center;
    margin-top: clamp(22px, 3.4vh, 36px);
  }
}

@media (min-width: 1100px) and (max-height: 860px) {
  .site-footer--home-closing {
    padding-top: 38px;
  }

  .site-footer--home-closing .site-footer__reveal {
    min-height: min(80svh, 720px);
  }

  .site-footer--home-closing .site-footer__closing {
    padding-bottom: 34px;
  }

  .site-footer--home-closing .site-footer__cta h2 {
    margin-bottom: 14px;
    font-size: clamp(2.6rem, 4vw, 3.6rem);
  }

  .site-footer--home-closing .site-footer__inner {
    padding-bottom: 32px;
  }

  .site-footer--home-closing .site-footer__bottom {
    min-height: 52px;
  }
}

@media (min-width: 1100px) and (min-height: 700px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.b-footer-reveal-enabled {
    padding-bottom: calc(var(--b-footer-height, 0px) - 30px);
    background: var(--p-paper);
  }

  body.b-footer-reveal-enabled .b-main.b-page--home {
    position: relative;
    z-index: 2;
    overflow: clip;
    border-radius: 0 0 30px 30px;
    background: var(--p-paper);
  }

  body.b-footer-reveal-enabled .site-footer--home-closing {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: var(--b-footer-height);
    visibility: hidden;
    pointer-events: none;
  }

  body.b-footer-reveal-enabled .site-footer--home-closing.is-revealing {
    visibility: visible;
    pointer-events: auto;
  }

  body.b-footer-reveal-enabled .site-footer--home-closing .site-footer__reveal {
    height: 100%;
    min-height: 0;
    transform: translate3d(
      0,
      calc(var(--b-footer-height, 0px) * .5 * (1 - var(--b-footer-progress, 0))),
      0
    );
    opacity: var(--b-footer-progress, 0);
    will-change: transform, opacity;
  }

  body.b-footer-reveal-starting {
    background: var(--p-dark);
  }
}

@media (max-width: 1099px) {
  .site-footer--home-closing .site-footer__reveal {
    min-height: 0;
  }

  .site-footer__closing {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-bottom: 54px;
  }

  .site-footer__cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .b-services-index__row {
    --b-services-link-pad: 28px;
    --b-services-arrow-gutter: 30px;
  }

  .b-services-index__arrow {
    width: 40px;
    height: 40px;
  }

  .site-footer--home-closing {
    padding-top: 46px;
  }

  .site-footer__closing {
    gap: 28px;
    padding-bottom: 44px;
  }

  .site-footer__cta h2 {
    margin-bottom: 18px;
  }

  .site-footer__cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer__cta-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b-services-parallax-ready .b-services-index__art {
    transform: none;
  }

  .b-services-index__title[data-b-services-heading] .b-word__inner {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Architectural 4-column footer, editorial utility bar & monumental watermark */
.site-footer {
  overflow: hidden;
}

.site-footer__inner {
  grid-template-columns: minmax(0, 1.55fr) minmax(135px, 0.72fr) minmax(115px, 0.65fr) minmax(220px, 1.08fr);
  gap: clamp(24px, 3.6vw, 56px);
  padding-bottom: 34px;
}

.footer-links__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links__list a::after {
  content: "→";
  font-size: 0.8em;
  color: var(--p-accent-on-dark);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-links__list a:hover,
.footer-links__list a:focus-visible {
  color: #FFFFFF;
  text-decoration: none;
}

.footer-links__list a:hover::after,
.footer-links__list a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.footer-direct {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-direct__email {
  width: fit-content;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-direct__email:hover,
.footer-direct__email:focus-visible {
  color: var(--p-accent-on-dark);
}

.footer-direct__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--p-on-dark-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.footer-direct__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

.footer-direct__review {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 2px;
  color: var(--p-accent-on-dark);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-direct__review span[aria-hidden="true"] {
  transition: transform 0.2s ease;
}

.footer-direct__review:hover,
.footer-direct__review:focus-visible {
  color: #FFFFFF;
}

.footer-direct__review:hover span[aria-hidden="true"],
.footer-direct__review:focus-visible span[aria-hidden="true"] {
  transform: translate(2px, -2px);
}

.site-footer__bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.site-footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-footer__tagline {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
}

.site-footer__top-btn {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--p-on-dark);
  font-family: var(--b-font-body);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.site-footer__top-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.site-footer__top-btn:hover,
.site-footer__top-btn:focus-visible {
  border-color: var(--p-accent-on-dark);
  background: rgba(255, 87, 51, 0.10);
  color: #FFFFFF;
}

.site-footer__top-btn:hover .site-footer__top-arrow,
.site-footer__top-btn:focus-visible .site-footer__top-arrow {
  transform: translateY(-2px);
}

.site-footer__watermark {
  width: 100%;
  overflow: hidden;
  padding: 14px 16px 20px;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.site-footer__watermark span {
  display: block;
  font-family: var(--b-font-display);
  font-size: clamp(2.35rem, 8.8vw, 8.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.06) 58%, rgba(255, 255, 255, 0.015) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .footer-direct {
    grid-column: 1 / -1;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-footer__bottom {
    grid-template-columns: 1fr auto;
  }

  .site-footer__tagline {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 14px 0;
  }
}
