/* Progressive presentation layer. The original content and controls stay intact. */
body.home.rs-design {
  --rs-ease: cubic-bezier(.22, 1, .36, 1);
  --rs-progress: 0;
}

/* A composited reading line follows the document, without changing header height. */
body.home .rs-header {
  transition: background-color .3s ease, box-shadow .3s ease;
}
body.home .rs-header::after {
  content: '';
  position: absolute;
  z-index: 1;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rs-orange);
  transform: scaleX(var(--rs-progress));
  transform-origin: left center;
  pointer-events: none;
}
body.home .rs-header.rs-past-hero {
  background-color: rgba(17, 19, 17, .94);
  box-shadow: 0 10px 34px #0d160e14;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll(root block)) {
    body.home .rs-header::after {
      animation: rs-reading-progress 1s linear both;
      animation-timeline: scroll(root block);
    }
  }
}
@keyframes rs-reading-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Clear edges, quiet depth and consistent photographic treatment. */
body.home :is(.rs-direction-photo, .rs-project-photo, .rs-post-image) {
  isolation: isolate;
}
body.home .rs-about-image {
  overflow: hidden;
  isolation: isolate;
}
body.home :is(.rs-direction-photo, .rs-project-photo, .rs-post-image)::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid #111b1517;
  pointer-events: none;
}
body.home .rs-post-image { position: relative; }
body.home :is(.rs-project-photo, .rs-post-image) > img {
  transition: transform .85s var(--rs-ease);
}
body.home .rs-about-image > img {
  transition: transform 1s var(--rs-ease);
}
body.home .rs-direction-image-caption {
  text-shadow: 0 1px 8px #0008;
}
body.home .rs-project-meta h3 {
  transition: color .24s ease;
}
body.home .rs-circle-arrow {
  transition: background .25s ease, transform .4s var(--rs-ease);
}
body.home .rs-post-meta > svg {
  transition: transform .4s var(--rs-ease);
}
body.home .rs-project-open {
  transition: border-color .25s ease;
}

/* Tab panels remain regular document content, including in older browsers. */
body.home .rs-service-tab {
  overflow: hidden;
}
body.home .rs-service-tab > svg,
body.home .rs-detail-tab i {
  transition: transform .4s var(--rs-ease), background .25s ease;
}
body.home .rs-service-tab::after {
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .45s var(--rs-ease), background .22s ease;
}
body.home .rs-service-tab.is-active::after {
  transform: scaleX(1);
}
body.home .rs-direction-panel:focus-visible {
  outline-offset: 5px;
}
body.home .rs-detail-visual {
  box-shadow: 0 1px 0 #fff9 inset, 0 14px 38px -30px #202b1c4d;
}
body.home .rs-detail-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  background: radial-gradient(260px circle at var(--rs-pointer-x, 50%) var(--rs-pointer-y, 40%), #ffffff4d, transparent 80%);
  transition: opacity .45s ease;
}
body.home .rs-detail-visual.rs-pointer-active::after {
  opacity: 1;
}
body.home .rs-floor-diagram {
  transform-origin: 50% 70%;
}
body.home .rs-details-list,
body.home .rs-detail-panels {
  font-variant-numeric: tabular-nums;
}
body.home :is(.rs-section-head h2, .rs-about-home h2) {
  text-wrap: balance;
}
body.home .rs-section-head .rs-kicker > span {
  transition: box-shadow .5s ease;
}
body.home .rs-section-active .rs-section-head .rs-kicker > span {
  box-shadow: 0 0 0 5px #ff8b2414;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.home .rs-project:hover .rs-project-photo > img,
  body.home .rs-post-card a:hover .rs-post-image > img {
    transform: scale(1.045);
  }
  body.home .rs-about-image:hover > img { transform: scale(1.025); }
  body.home .rs-project:hover .rs-circle-arrow {
    transform: translate(2px, -2px);
  }
  body.home .rs-project:hover .rs-project-open { border-color: #b5510d; }
  body.home .rs-project:hover .rs-project-meta h3 { color: #a74608; }
  body.home .rs-post-card a:hover .rs-post-meta > svg {
    transform: translate(2px, -2px);
  }
  body.home .rs-service-tab:hover > svg,
  body.home .rs-detail-tab:hover i {
    transform: translate(2px, -2px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Added on intersection. Nothing is hidden while JavaScript loads or fails. */
  body.home .rs-entered {
    animation: rs-section-arrive .75s var(--rs-ease) both;
    animation-delay: var(--rs-enter-delay, 0ms);
  }
  body.home .rs-direction-panel:not([hidden]) .rs-direction-copy {
    animation: rs-panel-arrive .55s var(--rs-ease) both;
  }
  body.home .rs-direction-panel:not([hidden]) .rs-direction-photo > img {
    animation: rs-photo-arrive .85s var(--rs-ease) both;
  }
  body.home .rs-detail-panels > [role=tabpanel]:not([hidden]) {
    animation: rs-panel-arrive .4s var(--rs-ease) both;
  }
  body.home .rs-floor-diagram.rs-diagram-feedback {
    animation: rs-diagram-select .5s var(--rs-ease);
  }
}
@keyframes rs-section-arrive {
  from { opacity: .55; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rs-panel-arrive {
  from { opacity: .65; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rs-photo-arrive {
  from { opacity: .75; transform: scale(1.035); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes rs-diagram-select {
  from { transform: translateY(4px); }
  to { transform: translateY(0); }
}

@media (max-width: 700px) {
  body.home .rs-header::after { height: 2px; }
  body.home .rs-entered { animation-duration: .55s; }
}

@media (prefers-reduced-motion: reduce) {
  body.home .rs-header::after,
  body.home .rs-detail-visual::after { display: none; }
  body.home .rs-project:hover img,
  body.home .rs-post-card a:hover img,
  body.home .rs-about-image:hover img { transform: none; }
  body.home .rs-entered { opacity: 1; transform: none; }
}

@media print {
  body.home .rs-header::after,
  body.home .rs-detail-visual::after { display: none; }
  body.home .rs-entered { animation: none; opacity: 1; transform: none; }
}

/* The eight original trust statements: quiet line icons and an architectural grid. */
.rs-trust.rs-section { padding-block: 74px 80px; background: #171b18; }
.rs-trust .rs-section-head { margin-bottom: 32px; }
.rs-trust .rs-section-head h2 { font-size: clamp(32px,3.3vw,48px); line-height: 1.15; }
.rs-trust .rs-trust-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #dae2d31f;
  border-left: 1px solid #dae2d31f;
}
.rs-trust .rs-trust-item {
  display: block;
  min-width: 0;
  padding: 28px;
  border: 0;
  border-right: 1px solid #dae2d31f;
  border-bottom: 1px solid #dae2d31f;
}
.rs-trust .rs-trust-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffab61;
  background: #ff9a3e09;
  border: 1px solid #eaa46b30;
}
.rs-trust-icon svg { display: block; width: 28px; height: 28px; }
.rs-trust .rs-trust-item > h3 {
  grid-column: auto;
  grid-row: auto;
  min-height: 2.8em;
  margin: 22px 0 12px !important;
  color: #f3f3ec;
  font-size: 18px !important;
  font-weight: 600;
  line-height: 1.4 !important;
  letter-spacing: -.025em;
}
.rs-trust .rs-trust-item > p {
  grid-column: auto;
  grid-row: auto;
  margin: 0 !important;
  color: #bec7b6;
  font-size: 13px;
  line-height: 1.85;
}
@media(max-width:1180px) {
  .rs-trust .rs-trust-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rs-trust .rs-trust-item { padding: 26px; }
  .rs-trust .rs-trust-item > h3 { min-height: 0; }
}
@media(max-width:640px) {
  .rs-trust.rs-section { padding-block: 48px 52px; }
  .rs-trust .rs-section-head { margin-bottom: 25px; }
  .rs-trust .rs-trust-grid { grid-template-columns: minmax(0,1fr); border-left: 0; }
  .rs-trust .rs-trust-item {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 8px 17px;
    padding: 23px 0;
    border-right: 0;
  }
  .rs-trust .rs-trust-icon { grid-column: 1; grid-row: 1 / 3; width: 42px; height: 42px; }
  .rs-trust-icon svg { width: 26px; height: 26px; }
  .rs-trust .rs-trust-item > h3 { grid-column: 2; margin: 0 !important; font-size: 17px !important; }
  .rs-trust .rs-trust-item > p { grid-column: 2; font-size: 13px; line-height: 1.8; }
}

/* Phone hero: compact copy, then the original video in its natural wide frame. */
@media(max-width:700px), (max-width:950px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse) {
  body.home .rs-hero {
    --rs-hero-gutter: 20px;
    display: grid;
    grid-template-columns: var(--rs-hero-gutter) minmax(0,1fr) var(--rs-hero-gutter);
    min-height: 0;
    background: #171b18;
  }
  body.home .rs-hero .rs-hero-inner {
    position: static;
    grid-column: 2;
    grid-row: 1;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 32px 0 25px;
  }
  body.home .rs-hero .rs-hero-copy { width: 100%; max-width: none; }
  body.home .rs-hero .rs-kicker { font-size: 9px !important; margin-bottom: 18px !important; }
  body.home .rs-hero h1 { font-size: clamp(36px,11.2vw,60px); line-height: 1.08; letter-spacing: -.055em; }
  body.home .rs-hero-copy > p:not(.rs-kicker) { margin-top: 18px !important; font-size: 14px; line-height: 1.7; }
  body.home .rs-hero-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 15px; margin-top: 24px; }
  body.home .rs-hero-actions > .rs-btn { display: flex; justify-content: space-between; width: 100%; min-height: 52px; padding: 15px 18px; gap: 16px; font-size: 12px; }
  body.home .rs-hero-actions > .rs-text-link { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-block: 2px; font-size: 12px; }
  body.home .rs-hero-actions > .rs-text-link span { margin: 0; }
  body.home .rs-hero .rs-hero-bottom { position: static; display: contents; margin: 0; padding: 0; }
  body.home .rs-hero .rs-scroll { display: none; }
  body.home .rs-hero > .rs-hero-picture,
  body.home .rs-hero > .rs-hero-video {
    position: relative;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    inset: auto;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    margin-bottom: 24px;
  }
  body.home .rs-hero > .rs-hero-picture { z-index: 0; overflow: hidden; outline: 1px solid #e2e9da26; }
  body.home .rs-hero > .rs-hero-picture::before { display: none; }
  body.home .rs-hero > .rs-hero-video { z-index: 1; object-fit: contain; object-position: center; background: #111311; pointer-events: none; }
  body.home .rs-hero .rs-hero-shade { display: none; }
  body.home .rs-hero::after { width: 48px; height: 2px; }
  body.home .rs-proof p span,
  body.home .rs-proof-inner > div span { font-size: 9px; line-height: 1.7; }
}
@media(max-width:359px) {
  body.home .rs-hero { --rs-hero-gutter: 16px; }
}
@media(max-width:950px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse) {
  body.home .rs-hero {
    --rs-landscape-media-height: calc((100vw - 84px) * .28125);
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    column-gap: 28px;
    padding: 18px 28px;
  }
  body.home .rs-hero .rs-hero-inner { grid-column: 1; grid-row: 1; padding: 0; }
  body.home .rs-hero .rs-kicker { font-size: 8px !important; margin-bottom: 10px !important; }
  body.home .rs-hero h1 { font-size: clamp(28px,4.05vw,36px); line-height: 1.08; }
  body.home .rs-hero-copy > p:not(.rs-kicker) { margin-top: 11px !important; font-size: 12px; line-height: 1.5; }
  body.home .rs-hero-actions { gap: 9px; margin-top: 14px; }
  body.home .rs-hero-actions > .rs-btn { min-height: 44px; padding: 11px 12px; gap: 10px; font-size: 11px; }
  body.home .rs-hero-actions > .rs-btn svg { width: 18px; height: 18px; }
  body.home .rs-hero-actions > .rs-text-link { padding: 0; font-size: 11px; line-height: 22px; }
  body.home .rs-hero-actions > .rs-text-link span { font-size: 18px; line-height: 22px; }
  body.home .rs-hero > .rs-hero-picture,
  body.home .rs-hero > .rs-hero-video { grid-column: 2; grid-row: 1; align-self: center; margin-bottom: 0; }
}
