:root {
  --hero-photo-bleed: max(24px, calc((100vw - 1240px) / 2));
}

/* Shared hero photo treatment. Image pixels and the fade extend to the viewport
   edge; media wrappers retain their original geometry so overlaid UI stays put. */
.edge-photo {
  --hero-photo-blend-rgb: 255, 255, 255;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin-right: 0;
}

.edge-photo.edge-photo-viewport {
  --hero-photo-bleed: 0px;
}

.edge-photo > img,
.edge-photo img {
  right: auto !important;
  width: calc(100% + var(--hero-photo-bleed)) !important;
  max-width: none;
  border: 0 !important;
  border-radius: 0 !important;
}

.edge-photo::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 auto 0 0;
  width: calc(100% + var(--hero-photo-bleed));
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--hero-photo-blend-rgb), 1) 0%,
    rgba(var(--hero-photo-blend-rgb), .88) 19%,
    rgba(var(--hero-photo-blend-rgb), .48) 39%,
    rgba(var(--hero-photo-blend-rgb), .12) 62%,
    transparent 82%
  );
  pointer-events: none;
}

.edge-photo > figcaption,
.edge-photo > span {
  position: absolute;
  z-index: 2;
}

/* Keep the established dark AI Demo hero readable while sharing the same fade. */
.demo-hero-media.edge-photo {
  --hero-photo-blend-rgb: 255, 255, 255;
}

.demo-page-hero.edge-photo-hero {
  background: #FFFFFF;
  color: #0B0B0D;
}

.demo-page-hero.edge-photo-hero p:not(.eyebrow) {
  color: #595959;
}

/* These photographs already span the viewport and need no additional bleed. */
@media (max-width: 980px) and (min-width: 641px) {
  :root {
    --hero-photo-bleed: max(18px, calc((100vw - 760px) / 2));
  }
}

@media (max-width: 640px) {
  :root {
    --hero-photo-bleed: 14px;
  }
}

.about-team-placeholder.edge-photo,
.functions-hero-photo.edge-photo,
.auto-hero-photo.edge-photo,
.contact-hero-image.edge-photo {
  --hero-photo-blend-rgb: 244, 244, 244;
}

.blog-hero-placeholder.edge-photo {
  --hero-photo-blend-rgb: 246, 246, 246;
}

.how-photo-filled.edge-photo {
  --hero-photo-blend-rgb: 247, 247, 247;
}

.seo-map.edge-photo,
.webdev-hero-placeholder.edge-photo {
  --hero-photo-blend-rgb: 245, 245, 245;
}

/* Website Assistant's sample chat remains fixed in its current grid column;
   the image extends underneath it to carry photography to the viewport edge. */
.wa-site-placeholder.edge-photo {
  --hero-photo-bleed: calc(max(24px, (100vw - 1240px) / 2) + 51.5%);
}
@media (max-width: 980px) {
  .wa-site-placeholder.edge-photo {
    --hero-photo-bleed: max(18px, calc((100vw - 760px) / 2));
  }
}
@media (max-width: 640px) {
  .wa-site-placeholder.edge-photo {
    --hero-photo-bleed: 14px;
  }
}

/* Contain any legacy page-level wide mockups without clipping vertical overlays. */
main:has(.edge-photo) {
  overflow-x: clip;
}


/* Put the Website Assistant photograph in the right side of the hero on desktop.
   The sample chat keeps its existing grid column and coordinates. */
@media (min-width: 981px) {
  .wa-hero-screen {
    position: static;
  }

  .wa-site-placeholder.edge-photo {
    position: absolute;
    inset: 0 calc(-1 * var(--hero-photo-bleed)) 0 auto;
    width: 56vw;
    min-height: 0;
    --hero-photo-bleed: 0px;
  }

  .wa-chat {
    grid-column: 2;
  }
}

@media (max-width: 980px) {
  .wa-hero-screen {
    position: relative;
  }

  .wa-site-placeholder.edge-photo {
    position: relative;
    inset: auto;
    width: auto;
    min-height: 190px;
    --hero-photo-bleed: max(18px, calc((100vw - 760px) / 2));
  }

  .wa-chat {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .wa-site-placeholder.edge-photo {
    --hero-photo-bleed: 14px;
  }
}
:root {
  --hero-page-gutter: max(24px, calc((100vw - 1240px) / 2));
}
@media (max-width: 980px) and (min-width: 641px) {
  :root {
    --hero-page-gutter: max(18px, calc((100vw - 760px) / 2));
  }
}
@media (max-width: 640px) {
  :root {
    --hero-page-gutter: 14px;
  }
}

@media (min-width: 981px) {
  .wa-hero .container > :not(.wa-hero-screen) {
    position: relative;
    z-index: 1;
  }

  .wa-site-placeholder.edge-photo {
    right: calc(-1 * var(--hero-page-gutter));
    z-index: 0;
  }
}
@media (max-width: 700px) {
  .legal-hero-placeholder.edge-photo.edge-photo-viewport {
    --hero-photo-bleed: 14px;
  }
}

/* AI Functions hero: full-height, viewport-edge photography like the homepage. */
.functions-hero {
  box-sizing: border-box;
  display: grid;
  align-items: center;
  min-height: clamp(600px, 44vw, 680px);
  padding: clamp(112px, 10vw, 144px) 0 clamp(48px, 5vw, 72px);
  background: #FFFFFF;
}

.functions-hero .container {
  position: static;
  z-index: auto;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  pointer-events: none;
}

.functions-hero .container > :not(.functions-hero-photo) {
  position: relative;
  z-index: 1;
  max-width: 590px;
}

.functions-hero h1 {
  max-width: 580px;
  margin: 16px 0 20px;
  font-size: clamp(54px, 6.1vw, 78px);
  line-height: .96;
}

.functions-hero > .container > p:not(.eyebrow) {
  max-width: 485px;
  margin: 0;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.5;
}

.functions-hero ul {
  max-width: 590px;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 26px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.functions-hero aside {
  margin-top: 12px;
  color: #595959;
  font-size: 11px;
  line-height: 1.45;
}

.functions-hero .functions-hero-photo.edge-photo {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 42%;
  width: auto;
  height: auto;
  min-height: 0;
  --hero-photo-bleed: 0px;
  --hero-photo-blend-rgb: 255, 255, 255;
  overflow: hidden !important;
  background: #E5E5E5;
}

.functions-hero .functions-hero-photo.edge-photo > img {
  object-position: 64% 47%;
}

.functions-hero .functions-hero-photo.edge-photo > figcaption {
  display: none;
}

@media (max-width: 900px) {
  .functions-hero {
    display: block;
    min-height: 0;
    padding: 112px 0 0;
  }

  .functions-hero .container {
    width: min(760px, calc(100% - 48px));
    min-height: 0;
    margin-inline: auto;
  }

  .functions-hero .container > :not(.functions-hero-photo) {
    max-width: 660px;
  }

  .functions-hero h1 {
    max-width: 650px;
    font-size: clamp(54px, 8vw, 72px);
  }

  .functions-hero .functions-hero-photo.edge-photo {
    position: relative;
    inset: auto;
    width: calc(100% + 48px);
    height: clamp(320px, 54vw, 440px);
    margin: 30px -24px 0;
  }

  .functions-hero .functions-hero-photo.edge-photo::after {
    background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.2) 24%, transparent 52%);
  }
}

@media (max-width: 640px) {
  .functions-hero {
    padding-top: 100px;
  }

  .functions-hero .container {
    width: calc(100% - 40px);
  }

  .functions-hero h1 {
    margin: 13px 0 16px;
    font-size: clamp(46px, 12.5vw, 58px);
    line-height: .97;
  }

  .functions-hero > .container > p:not(.eyebrow) {
    font-size: 17px;
    line-height: 1.48;
  }

  .functions-hero ul {
    gap: 9px 14px;
    margin-top: 20px;
    font-size: 11px;
  }

  .functions-hero .functions-hero-photo.edge-photo {
    width: calc(100% + 40px);
    height: clamp(285px, 78vw, 340px);
    margin: 24px -20px 0;
  }

  .functions-hero .functions-hero-photo.edge-photo > img {
    object-position: 65% 46%;
  }
}

/* Shared editorial photo-hero system for public marketing and service pages. */
.photo-hero {
  --photo-hero-bg: #FFFFFF;
  --photo-hero-rgb: 255, 255, 255;
  --photo-hero-position: 50% 50%;
  --photo-hero-copy-width: min(560px, calc(44vw - max(24px, calc((100vw - 1240px) / 2))));
  position: relative !important;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(680px, calc(72vh + 80px), 900px);
  padding: clamp(126px, 10vw, 150px) 0 clamp(58px, 6vw, 78px);
  overflow: hidden;
  background: var(--photo-hero-bg) !important;
  color: #0B0B0D;
}

.photo-hero .container,
.photo-hero .solutions-hero-inner {
  position: static !important;
  z-index: auto !important;
  display: block !important;
  width: min(1240px, calc(100% - 48px)) !important;
  max-width: none;
  margin-inline: auto !important;
  pointer-events: auto !important;
}

.photo-hero .photo-hero-media.edge-photo {
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 0 0 44% !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: none !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  background: var(--photo-hero-bg) !important;
  pointer-events: none;
}

.photo-hero .photo-hero-media.edge-photo > img {
  position: absolute !important;
  z-index: 0;
  inset: 0 !important;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: var(--photo-hero-position) !important;
  opacity: 1 !important;
}

.photo-hero .photo-hero-media.edge-photo::before {
  content: none !important;
}

.photo-hero .photo-hero-media.edge-photo::after {
  content: "" !important;
  position: absolute;
  z-index: 1;
  inset: 0 !important;
  display: block;
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--photo-hero-rgb), 1) 0%,
    rgba(var(--photo-hero-rgb), .82) 8%,
    rgba(var(--photo-hero-rgb), .36) 17%,
    transparent 29%
  );
  pointer-events: none;
}

.photo-hero .container > :not(.photo-hero-media) {
  position: relative;
  z-index: 2;
  max-width: var(--photo-hero-copy-width);
}

.photo-hero :is(h1, p, ul, form, .button-row, .solutions-hero-actions) {
  position: relative;
  z-index: 2;
}

.photo-hero .container > h1 {
  max-width: var(--photo-hero-copy-width);
  margin-top: 14px;
  margin-bottom: 20px;
}

.photo-hero.about-ref-hero { --photo-hero-bg: #F4F4F4; --photo-hero-rgb: 244, 244, 244; --photo-hero-position: 52% 48%; }
.photo-hero.demo-page-hero { --photo-hero-bg: #FFFFFF; --photo-hero-rgb: 255, 255, 255; --photo-hero-position: 62% 45%; }
.photo-hero.functions-hero { --photo-hero-bg: #F4F4F4; --photo-hero-rgb: 244, 244, 244; --photo-hero-position: 64% 47%; }
.photo-hero.auto-hero { --photo-hero-bg: #F4F4F4; --photo-hero-rgb: 244, 244, 244; --photo-hero-position: 68% 48%; }
.photo-hero.blog-rebuild-hero { --photo-hero-bg: #F6F6F6; --photo-hero-rgb: 246, 246, 246; --photo-hero-position: 67% 47%; }
.photo-hero.contact-hero { --photo-hero-bg: #F4F4F4; --photo-hero-rgb: 244, 244, 244; --photo-hero-position: 62% 44%; }
.photo-hero.faq-page-hero { --photo-hero-bg: #F4F4F4; --photo-hero-rgb: 244, 244, 244; --photo-hero-position: 58% 40%; }
.photo-hero.how-rebuild-hero { --photo-hero-bg: #F7F7F7; --photo-hero-rgb: 247, 247, 247; --photo-hero-position: 62% 46%; }
.photo-hero.how-rebuild-hero .photo-hero-media.edge-photo::after {
  background: linear-gradient(
    90deg,
    rgba(247, 247, 247, .96) 0%,
    rgba(247, 247, 247, .72) 9%,
    rgba(247, 247, 247, .3) 22%,
    rgba(247, 247, 247, .06) 36%,
    transparent 46%
  );
}
@media (min-width: 981px) {
  .photo-hero.how-rebuild-hero .photo-hero-media.edge-photo {
    left: 50% !important;
  }
}
.photo-hero.industry-page-hero { --photo-hero-bg: #FFFFFF; --photo-hero-rgb: 255, 255, 255; --photo-hero-position: 68% 48%; }
.photo-hero.seo-hero { --photo-hero-bg: #F5F5F5; --photo-hero-rgb: 245, 245, 245; --photo-hero-position: 66% 52%; }
.photo-hero.solutions-hero { --photo-hero-bg: #FFFFFF; --photo-hero-rgb: 255, 255, 255; --photo-hero-position: 52% 43%; }
.photo-hero.wa-hero { --photo-hero-bg: #F4F4F4; --photo-hero-rgb: 244, 244, 244; --photo-hero-position: 62% 48%; }
.photo-hero.webdev-hero { --photo-hero-bg: #F5F5F5; --photo-hero-rgb: 245, 245, 245; --photo-hero-position: 64% 49%; }

.photo-hero.demo-page-hero .demo-hero-grid,
.photo-hero.faq-page-hero .faq-hero-grid {
  position: static !important;
  display: block;
  max-width: none;
}
.photo-hero .demo-hero-copy,
.photo-hero .faq-hero-copy,
.photo-hero .how-hero-grid > div:first-child,
.photo-hero .industry-hero-content,
.photo-hero .solutions-hero-copy,
.photo-hero .wa-hero-copy {
  position: relative;
  z-index: 2;
  width: var(--photo-hero-copy-width);
  max-width: var(--photo-hero-copy-width);
}
.photo-hero .demo-hero-copy h1,
.photo-hero .faq-hero-copy h1,
.photo-hero .how-hero-grid h1,
.photo-hero .industry-hero-content h1,
.photo-hero .solutions-hero-copy h1,
.photo-hero .wa-hero-copy h1 {
  max-width: 100%;
  margin-top: 14px;
}
.photo-hero .how-hero-grid,
.photo-hero .solutions-hero-inner,
.photo-hero .wa-hero-layout {
  position: static !important;
  display: block;
  min-height: 0;
}
.photo-hero.demo-page-hero .demo-hero-copy p:not(.eyebrow) { color: #595959; }
.photo-hero .solutions-hero-copy { padding: 10px 0; }
.photo-hero .solutions-hero-visual { isolation: isolate; }

/* AI Subscriptions uses the shared full-height right-edge photo hero treatment. */
.subs-hero.photo-hero {
  display: grid;
  align-items: center;
  min-height: clamp(680px, calc(72vh + 80px), 900px);
  padding: clamp(112px, 10vw, 144px) 0 clamp(48px, 5vw, 72px);
}
.subs-hero.photo-hero .container {
  position: static;
  z-index: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}
.subs-hero.photo-hero .container > :not(.subs-hero-photo) {
  position: relative;
  z-index: 1;
  max-width: 540px;
}
.subs-hero-photo.edge-photo {
  position: absolute;
  inset: 0 0 0 50%;
  z-index: 0;
  overflow: hidden;
  margin: 0;
  --hero-photo-blend-rgb: 244, 244, 244;
}
.subs-hero-photo.edge-photo > img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

@media (max-width: 980px) {
  .subs-hero.photo-hero { display: block; min-height: 0; padding: 108px 0 clamp(230px, 60vw, 320px); }
  .photo-hero {
    display: block;
    min-height: 0;
    padding: 108px 0 clamp(230px, 60vw, 320px);
  }
  .photo-hero .container,
  .photo-hero .solutions-hero-inner {
    width: min(760px, calc(100% - 40px)) !important;
    margin-inline: auto !important;
  }
  .photo-hero.wa-hero .wa-hero-layout { padding-bottom: 0; }
  .photo-hero .container > :not(.photo-hero-media),
  .photo-hero .demo-hero-copy,
  .photo-hero .faq-hero-copy,
  .photo-hero .how-hero-grid > div:first-child,
  .photo-hero .industry-hero-content,
  .photo-hero .solutions-hero-copy,
  .photo-hero .wa-hero-copy {
    width: auto;
    max-width: min(680px, 100%);
  }
  .photo-hero .photo-hero-media.edge-photo {
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: clamp(230px, 60vw, 320px) !important;
    margin: 0 !important;
  }
  .photo-hero .photo-hero-media.edge-photo::after {
    background: linear-gradient(
      180deg,
      rgba(var(--photo-hero-rgb), 1) 0%,
      rgba(var(--photo-hero-rgb), .5) 9%,
      rgba(var(--photo-hero-rgb), .08) 22%,
      transparent 30%
    );
  }
  .photo-hero.how-rebuild-hero .photo-hero-media.edge-photo::after {
    background: linear-gradient(
      180deg,
      rgba(247, 247, 247, 1) 0%,
      rgba(247, 247, 247, .72) 14%,
      rgba(247, 247, 247, .12) 36%,
      transparent 54%
    );
  }
  .photo-hero .container > :not(.photo-hero-media) { position: relative; z-index: 2; }
  .photo-hero .industry-benefits { flex-wrap: wrap; }
  .photo-hero.about-ref-hero ul { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .photo-hero { padding-top: 100px; padding-bottom: clamp(230px, 60vw, 320px); }
  .photo-hero .container,
  .photo-hero .solutions-hero-inner { width: calc(100% - 40px) !important; }
  .photo-hero .photo-hero-media.edge-photo { height: clamp(230px, 60vw, 320px) !important; }
  .photo-hero .container > h1,
  .photo-hero .demo-hero-copy h1,
  .photo-hero .faq-hero-copy h1,
  .photo-hero .how-hero-grid h1,
  .photo-hero .industry-hero-content h1,
  .photo-hero .solutions-hero-copy h1,
  .photo-hero .wa-hero-copy h1 { font-size: clamp(40px, 11vw, 58px); line-height: .98; }
  .photo-hero .solutions-hero-copy h1 { font-size: clamp(38px, 10vw, 54px); }
  .photo-hero .solutions-hero-actions { align-items: flex-start; }
  .photo-hero .industry-benefits { gap: 12px 18px; font-size: 11px; }
}

/* Keep the Industries hero copy on the site's shared content grid. */
.photo-hero.industry-page-hero .industry-hero-content{width:100%;max-width:var(--photo-hero-copy-width)}
.photo-hero.industry-page-hero .industry-hero-content h1{max-width:100%;font-size:clamp(48px,5.4vw,72px)}
@media(max-width:980px){
  .photo-hero.industry-page-hero{display:block;min-height:0;padding:108px 0 clamp(230px,60vw,320px)}
  .photo-hero.industry-page-hero .industry-hero-content{width:auto;max-width:100%}
}
@media(max-width:640px){
  .photo-hero.industry-page-hero .industry-hero-content h1{font-size:clamp(44px,12vw,60px)}
}

/* AI Demo: full-height, cleaner photo transition without an image caption. */
.photo-hero.demo-page-hero .demo-hero-media.edge-photo{
  inset:0 0 0 48% !important;
  aspect-ratio:auto !important;
}
.photo-hero.demo-page-hero .demo-hero-media.edge-photo::after{
  background:linear-gradient(
    90deg,
    rgba(255,255,255,.96) 0%,
    rgba(255,255,255,.76) 9%,
    rgba(255,255,255,.38) 22%,
    rgba(255,255,255,.08) 36%,
    transparent 46%
  );
}

/* FAQ hero: extend the photograph through the full desktop hero and shorten
   the fade so more of the original image remains visible. */
.photo-hero.faq-page-hero .faq-hero-media.edge-photo {
  inset: 0 0 0 46% !important;
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto !important;
}
.photo-hero.faq-page-hero .faq-hero-media.edge-photo > img {
  object-position: 64% 43% !important;
}
.photo-hero.faq-page-hero .faq-hero-media.edge-photo::after {
  background: linear-gradient(
    90deg,
    rgba(244, 244, 244, 1) 0%,
    rgba(244, 244, 244, .78) 10%,
    rgba(244, 244, 244, .34) 26%,
    rgba(244, 244, 244, .06) 40%,
    transparent 48%
  );
}
@media(max-width:980px){
  .photo-hero.demo-page-hero .demo-hero-media.edge-photo{
    inset:auto 0 0 0 !important;
  }
  .photo-hero.demo-page-hero .demo-hero-media.edge-photo::after{
    background:linear-gradient(
      180deg,
      rgba(255,255,255,.96) 0%,
      rgba(255,255,255,.62) 12%,
      rgba(255,255,255,.18) 29%,
      rgba(255,255,255,.04) 40%,
      transparent 54%
    );
  }
  .photo-hero.faq-page-hero .faq-hero-media.edge-photo {
    inset: auto 0 0 0 !important;
    width: 100% !important;
    height: clamp(230px, 60vw, 320px) !important;
    aspect-ratio: auto !important;
  }
  .photo-hero.faq-page-hero .faq-hero-media.edge-photo > img {
    object-position: 62% 43% !important;
  }
  .photo-hero.faq-page-hero .faq-hero-media.edge-photo::after {
    background: linear-gradient(
      180deg,
      rgba(244, 244, 244, .92) 0%,
      rgba(244, 244, 244, .58) 12%,
      rgba(244, 244, 244, .16) 27%,
      transparent 40%
    );
  }
}

