/* Homepage-only responsive and interaction corrections.
   The approved hero study files remain the visual source of truth. */

/* Give each section a deliberate leading pause without stacking equally large
   padding on both sides of every boundary. Related content stays grouped while
   the next idea still receives a clear editorial break. */
main {
  --homepage-section-lead: clamp(72px, 5.6vw, 88px);
  --homepage-section-tail: clamp(44px, 3.6vw, 56px);
  --homepage-content-gap: clamp(52px, 4.7vw, 72px);
}

.section {
  padding-top: var(--homepage-section-lead);
  padding-bottom: var(--homepage-section-tail);
}

.section-header,
.capability-header {
  margin-bottom: var(--homepage-content-gap);
}

.work-section {
  padding-top: clamp(56px, 4.4vw, 68px);
  padding-bottom: var(--homepage-section-tail);
}

.clients-section {
  padding-top: var(--homepage-section-lead);
  padding-bottom: var(--homepage-section-tail);
}

.products-section {
  padding-bottom: var(--homepage-section-tail);
}

.about-top {
  margin-bottom: clamp(56px, 5.2vw, 80px);
}

.testimonials-block {
  margin-top: clamp(72px, 7.5vw, 112px);
}

.quote-section {
  padding-top: clamp(88px, 7.5vw, 112px);
  padding-bottom: clamp(88px, 7.5vw, 112px);
}

.main-footer {
  padding-top: clamp(36px, 3vw, 48px);
  padding-bottom: clamp(36px, 3vw, 48px);
}

/* The motion control is intentionally not part of the approved visible design.
   Removing it from layout also prevents keyboard focus from moving off-screen. */
.preview-motion-control {
  display: none !important;
}

/* Keep the visible progress rule unchanged while providing a 44px control area. */
.preview-progress-segments {
  inset: -22px 0;
}

.preview-progress-segment::after {
  top: 22px;
}

/* Keep one compact, content-driven hero across desktop viewport shapes. Browser
   sidebars and high-resolution monitors can change both CSS width and height;
   neither should switch the hero into a different vertical composition. */
@media (min-width: 1025px) {
  .header-inner {
    height: 72px;
  }

  .logo-lockup {
    width: 75px;
    height: 20px;
  }

  .main-nav {
    gap: 40px;
  }

  .nav-item {
    font-size: 13px;
    letter-spacing: 0.04em;
  }

  .preview-hero {
    height: auto;
    min-height: 0;
    padding: 82px 48px 0;
    grid-template-columns: minmax(360px, 450px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: clamp(42px, 3.5vw, 56px);
    align-items: start;
  }

  .preview-hero-copy {
    margin-top: 102px;
  }

  .preview-eyebrow {
    margin-bottom: 32px;
  }

  .preview-narrative {
    height: 221px;
  }

  .preview-narrative-final {
    width: min(450px, 100%);
    font-size: clamp(3.65rem, 4.25vw, 3.8125rem);
  }

  .preview-hero-note {
    margin-top: -7px;
    font-size: 16px;
  }

  .preview-visual-stage {
    margin-top: 42px;
  }

  .preview-image-stage {
    height: auto;
    aspect-ratio: 1.55 / 1;
  }

  .preview-selected-work {
    min-height: 32px;
    margin-top: 12px;
  }

  .preview-proof-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    height: 90px;
    margin: 32px -48px 0;
    padding-inline: 48px;
    grid-column: 1 / -1;
  }
}

/* Above the 2560px effective viewport used by a 4K display at 150% Windows
   scaling, grow the approved desktop composition fluidly. At a native 3840px
   viewport every dimension reaches 1.5x, matching the same physical scale. */
@media (min-width: 2561px) {
  main {
    --homepage-section-lead: clamp(88px, 3.4375vw, 132px);
    --homepage-section-tail: clamp(56px, 2.1875vw, 84px);
    --homepage-content-gap: clamp(72px, 2.8125vw, 108px);
  }

  .preview-hero,
  .section,
  .clients-section,
  .products-collage {
    max-width: clamp(1440px, 56.25vw, 2160px);
  }

  .section,
  .clients-section,
  .products-collage {
    padding-inline: clamp(80px, 3.125vw, 120px);
  }

  .preview-hero {
    padding: clamp(82px, 3.203125vw, 123px) clamp(48px, 1.875vw, 72px) 0;
    grid-template-columns: clamp(450px, 17.578125vw, 675px) minmax(0, 1fr);
    column-gap: clamp(56px, 2.1875vw, 84px);
  }

  .preview-hero-copy {
    margin-top: clamp(102px, 3.984375vw, 153px);
  }

  .preview-eyebrow {
    margin-bottom: clamp(32px, 1.25vw, 48px);
    font-size: clamp(11px, 0.4296875vw, 16.5px);
  }

  .preview-narrative {
    height: clamp(221px, 8.6328125vw, 331.5px);
  }

  .preview-narrative-final {
    width: min(clamp(450px, 17.578125vw, 675px), 100%);
    font-size: clamp(61px, 2.3828125vw, 91.5px);
  }

  .preview-hero-note {
    max-width: clamp(430px, 16.796875vw, 645px);
    margin-top: clamp(-10.5px, -0.2734375vw, -7px);
    font-size: clamp(16px, 0.625vw, 24px);
  }

  .preview-visual-stage {
    margin-top: clamp(42px, 1.640625vw, 63px);
  }

  .preview-stage-rule {
    top: clamp(-21px, -0.546875vw, -14px);
    right: clamp(-21px, -0.546875vw, -14px);
    width: clamp(62px, 2.421875vw, 93px);
    height: clamp(62px, 2.421875vw, 93px);
  }

  .preview-selected-work {
    min-height: clamp(32px, 1.25vw, 48px);
    margin-top: clamp(14px, 0.546875vw, 21px);
    gap: clamp(18px, 0.703125vw, 27px);
  }

  .preview-progress-count {
    font-size: clamp(12px, 0.46875vw, 18px);
  }

  .preview-project-meta {
    width: calc(100% - clamp(92px, 3.59375vw, 138px));
    margin-top: clamp(20px, 0.78125vw, 30px);
    gap: clamp(30px, 1.171875vw, 45px);
  }

  .preview-meta-group {
    gap: clamp(7px, 0.2734375vw, 10.5px);
  }

  .preview-meta-label {
    font-size: clamp(10px, 0.390625vw, 15px);
  }

  .preview-caption-title,
  .preview-caption-scope {
    font-size: clamp(16px, 0.625vw, 24px);
  }

  .preview-proof-strip {
    height: clamp(90px, 3.515625vw, 135px);
    margin: clamp(32px, 1.25vw, 48px) clamp(-72px, -1.875vw, -48px) 0;
    padding-inline: clamp(48px, 1.875vw, 72px);
    gap: clamp(36px, 1.40625vw, 54px);
  }

  .preview-proof-strip > p,
  .preview-proof-strip > a {
    font-size: clamp(10px, 0.390625vw, 15px);
  }

  .preview-proof-marks span {
    font-size: clamp(20px, 0.78125vw, 30px);
  }

  .preview-proof-marks span:nth-child(1) {
    font-size: clamp(18px, 0.703125vw, 27px);
  }

  .preview-proof-marks span:nth-child(2),
  .preview-proof-marks span:nth-child(3) {
    font-size: clamp(15px, 0.5859375vw, 22.5px);
  }

  .preview-proof-marks span:nth-child(4) {
    font-size: clamp(1.45rem, 0.90625vw, 2.175rem);
  }

  .section-heading {
    font-size: clamp(4rem, 2.5vw, 6rem);
  }

  .section-label {
    font-size: clamp(11px, 0.4296875vw, 16.5px);
  }
}

/* The 1280px study layout has fixed minimum columns totalling 1068px.
   Below 1025px, allow both columns to shrink intrinsically instead. */
@media (min-width: 769px) and (max-width: 1024px) {
  .preview-hero {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  }

  .preview-narrative-final {
    width: 100%;
    font-size: clamp(2.6rem, 5.2vw, 3.2rem);
  }

  .preview-image-stage {
    height: auto;
    aspect-ratio: 1.25 / 1;
  }

  .preview-selected-work {
    min-height: 40px;
  }

  .preview-hero-note {
    width: 100%;
    max-width: 100%;
  }

  /* Give each duplicated logo group its intrinsic width so names cannot collide. */
  .preview-proof-track {
    width: max-content;
  }

  .preview-proof-group {
    flex: 0 0 auto;
    min-width: max-content;
    justify-content: flex-start;
    padding-right: 32px;
  }
}

/* Preserve image height at short laptop/tablet heights and finish metadata before
   the absolutely positioned proof strip begins. */
@media (min-width: 769px) and (max-width: 1024px) and (min-height: 601px) and (max-height: 850px) {
  .preview-selected-work {
    min-height: 58px;
  }

  .preview-project-meta {
    margin-top: 0;
  }
}

/* A tall portrait tablet leaves the proof strip pinned to the viewport bottom,
   hundreds of pixels after the two-column hero content has ended. Keep the
   approved two-column composition, but let the strip follow that content. */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .preview-hero {
    height: auto;
    min-height: 0;
    padding-bottom: 0;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .preview-proof-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 32px -48px 0;
    grid-column: 1 / -1;
  }
}

@media (min-width: 769px) and (max-width: 900px) and (orientation: portrait) {
  .preview-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-hero-copy {
    margin-top: 16px;
  }

  .preview-narrative {
    height: 180px;
  }

  .preview-visual-stage {
    margin-top: 12px;
  }

  .preview-image-stage {
    aspect-ratio: 1.55 / 1;
  }
}

@media (max-width: 768px) {
  .preview-image-stage {
    aspect-ratio: 1.28 / 1;
  }
}

@media (max-width: 1024px) {
  main {
    --homepage-section-lead: clamp(60px, 7vw, 72px);
    --homepage-section-tail: clamp(28px, 4vw, 40px);
    --homepage-content-gap: clamp(48px, 6vw, 64px);
  }

  .about-top {
    margin-bottom: clamp(56px, 7vw, 72px);
  }

  .testimonials-block {
    margin-top: clamp(64px, 8vw, 80px);
  }

  .quote-section {
    padding-top: clamp(72px, 9vw, 92px);
    padding-bottom: clamp(72px, 9vw, 92px);
  }
}

/* Short landscape needs document flow because a complete hero cannot fit inside
   one 390–430px visual viewport. The composition remains two-column and scrolls. */
@media (min-width: 769px) and (max-width: 1024px) and (max-height: 600px) {
  .preview-hero {
    height: auto;
    min-height: 0;
    padding-bottom: 0;
    grid-template-rows: auto auto;
    align-items: start;
  }

  .preview-image-stage {
    height: clamp(240px, 38vw, 320px);
  }

  .preview-selected-work {
    min-height: 66px;
  }

  .preview-project-meta {
    margin-top: 0;
  }

  .preview-proof-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: auto;
    margin: 32px -48px 0;
    grid-column: 1 / -1;
  }
}

/* At the mobile/tablet boundary, the rendered headline is taller than its parent. */
@media (min-width: 600px) and (max-width: 768px) {
  .preview-narrative {
    height: 220px;
  }
}

@media (max-width: 480px) {
  main {
    --homepage-section-lead: 48px;
    --homepage-section-tail: 24px;
    --homepage-content-gap: 48px;
  }

  .about-top {
    margin-bottom: 56px;
  }

  .testimonials-block {
    margin-top: 64px;
  }

  .quote-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }
}

/* The compact desktop composition only needs ten pixels less metadata spacing. */
@media (min-width: 1281px) and (max-height: 800px) {
  .preview-project-meta {
    margin-top: 8px;
  }
}

/* Preserve visible control sizes while expanding touch hit areas. */
@media (hover: none), (pointer: coarse) {
  body,
  body a,
  body button,
  body input,
  body textarea,
  body [role="button"] {
    cursor: auto !important;
  }

  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  .nav-item::after {
    content: "";
    position: absolute;
    inset: -14px -10px;
  }

  .nav-item.nav-cta::after {
    inset: -3px -6px;
  }
}

.menu-toggle {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.modal-close-btn {
  min-height: 44px;
}

.modal-content-wrapper {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
}

.modal-scroll-container {
  min-height: 0;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .clients-marquee-track {
    animation: none !important;
    transform: none !important;
  }
}

/* Dark editorial testimonial carousel. The image treatment is shared by every
   slide, so changing clients never requires a separately edited dark asset. */
.testimonials-block {
  --testimonial-surface: #171716;
  --testimonial-ink: #fafaf9;
  --testimonial-muted: rgba(250, 250, 249, 0.58);
  --testimonial-rule: rgba(250, 250, 249, 0.18);
  margin-inline: clamp(-80px, -6vw, -20px);
  padding: clamp(46px, 4.2vw, 64px) clamp(40px, 5vw, 72px) clamp(36px, 3.6vw, 52px);
  overflow: hidden;
  background: var(--testimonial-surface);
  color: var(--testimonial-ink);
}

.testimonials-header {
  padding-bottom: clamp(20px, 2vw, 28px);
  border-bottom-color: var(--testimonial-rule);
}

.testimonials-eyebrow {
  color: #f21610;
}

.testimonials-stage {
  border-bottom: 0;
}

.testimonials-viewport {
  min-height: clamp(560px, 43vw, 650px);
}

.testimonial-slide {
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(26px, 2.8vw, 42px);
  min-height: clamp(560px, 43vw, 650px);
  padding: clamp(66px, 5.4vw, 84px) 48% clamp(118px, 9vw, 136px) 0;
}

.testimonial-slide blockquote {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 760px;
  max-height: clamp(240px, 34vh, 360px);
  margin: 0;
  overflow-y: visible;
  overscroll-behavior-y: contain;
  color: var(--testimonial-ink);
  text-align: left;
  font-size: clamp(2.8rem, 4.05vw, 4.55rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  scrollbar-color: rgba(250, 250, 249, 0.34) transparent;
  scrollbar-width: thin;
  text-wrap: balance;
  -webkit-overflow-scrolling: touch;
}

.testimonial-slide blockquote::-webkit-scrollbar {
  width: 4px;
}

.testimonial-slide blockquote::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(250, 250, 249, 0.34);
}

.testimonial-slide blockquote.is-scrollable {
  overflow-y: auto;
}

.testimonial-scroll-cue {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  height: 48px;
  padding: 0 10px 7px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(23, 23, 22, 0), var(--testimonial-surface) 78%);
  color: #f21610;
  font: 600 8px/1 var(--font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 1;
  transition: opacity 180ms ease;
}

.testimonial-scroll-cue.is-hidden {
  opacity: 0;
}

.testimonial-signature {
  position: static;
  z-index: 2;
  display: block;
  max-width: 600px;
}

.testimonial-signature img {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 100%;
  aspect-ratio: auto;
  border-left: 1px solid var(--testimonial-rule);
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.72) brightness(0.62) contrast(1.06);
  transform: scale(1.01);
  transition: filter 420ms ease, transform 700ms var(--ease-out);
}

.testimonial-slide.is-active .testimonial-signature img {
  filter: saturate(0.78) brightness(0.68) contrast(1.06);
  transform: scale(1);
}

.testimonial-attribution {
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid var(--testimonial-rule);
}

.testimonial-attribution strong {
  color: var(--testimonial-ink);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.testimonial-attribution span {
  max-width: 440px;
  color: var(--testimonial-muted);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.testimonials-controls {
  left: 0;
  right: 0;
  bottom: clamp(24px, 2.5vw, 36px);
  z-index: 3;
  grid-template-columns: minmax(220px, 340px) auto;
  gap: clamp(24px, 4vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--testimonial-rule);
}

.testimonials-progress {
  max-width: 340px;
  gap: 14px;
}

.testimonial-progress-step::after {
  background: rgba(250, 250, 249, 0.28);
}

.testimonial-progress-step.is-active::after {
  background: #f21610;
}

.testimonial-arrow,
.testimonial-autoplay-toggle,
.testimonial-count {
  color: var(--testimonial-ink);
}

.testimonial-arrow,
.testimonial-autoplay-toggle {
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.testimonial-autoplay-toggle {
  justify-self: center;
  width: max-content;
  min-width: 0;
  padding-inline: 8px;
  border: 0;
  border-radius: 0;
  color: var(--testimonial-muted);
}

.testimonial-arrow:hover,
.testimonial-autoplay-toggle:hover,
.testimonial-autoplay-toggle[aria-pressed="true"] {
  border-color: var(--testimonial-rule);
  background: rgba(250, 250, 249, 0.06);
  color: #f21610;
}

.testimonial-autoplay-toggle:hover,
.testimonial-autoplay-toggle[aria-pressed="true"] {
  border-color: transparent;
  background: transparent;
}

@media (min-width: 901px) and (max-width: 1200px) {
  .testimonial-slide {
    padding-right: 46%;
  }

  .testimonial-slide blockquote {
    font-size: clamp(2.45rem, 4.1vw, 3.25rem);
  }

  .testimonial-signature img {
    width: 40%;
  }
}

@media (max-width: 900px) {
  .testimonials-block {
    margin-inline: clamp(-61px, -6vw, -20px);
    padding: 40px clamp(24px, 6vw, 48px) 32px;
  }

  .testimonials-viewport {
    min-height: 0;
  }

  .testimonial-slide {
    grid-template-rows: auto auto;
    gap: clamp(28px, 5vw, 40px);
    min-height: 0;
    padding: clamp(42px, 7vw, 64px) 0 clamp(32px, 5vw, 44px);
  }

  .testimonial-slide blockquote {
    max-height: clamp(220px, 38vh, 340px);
    font-size: clamp(2.25rem, 6.2vw, 3.4rem);
    line-height: 1.08;
  }

  .testimonial-signature {
    display: grid;
    grid-template-columns: minmax(180px, 38vw) minmax(0, 1fr);
    align-items: end;
    gap: clamp(20px, 4vw, 36px);
    max-width: none;
  }

  .testimonial-signature img {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border: 0;
    object-position: center 30%;
  }

  .testimonial-attribution {
    align-self: end;
    padding-top: 18px;
  }

  .testimonials-controls {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 16px;
  }

  .testimonials-progress {
    width: 100%;
    max-width: none;
  }

  .testimonials-navigation {
    grid-template-columns: auto auto 1fr auto;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .testimonials-block {
    margin-inline: -20px;
  }
}

@media (max-width: 480px) {
  .testimonials-block {
    margin-inline: -16px;
    padding: 34px 16px 24px;
  }

  .testimonials-header {
    padding-bottom: 16px;
  }

  .testimonial-slide {
    gap: 28px;
    padding-top: 36px;
  }

  .testimonial-slide blockquote {
    max-height: min(40vh, 280px);
    font-size: clamp(1.9rem, 8.4vw, 2.45rem);
    line-height: 1.1;
  }

  .testimonial-signature {
    grid-template-columns: minmax(118px, 40vw) minmax(0, 1fr);
    gap: 16px;
  }

  .testimonial-attribution strong,
  .testimonial-attribution span {
    font-size: 8px;
    line-height: 1.45;
  }

  .testimonial-arrow,
  .testimonial-autoplay-toggle {
    min-width: 52px;
  }
}
