/* WEFORM V9 — silent MP4 hero + more balanced Selected Work.
   Only approved blue / cyan / mint / mist / white / navy brand values.
   Existing navigation, two services and contact flow remain unchanged. */

/* Hero: preserve the V8 stage geometry and moving 3D layers. */
.hero-media[data-ambient-only="true"] .weform-loop-media {
  position:absolute;inset:0;display:block;pointer-events:none;overflow:hidden;
}
.hero-media[data-ambient-only="true"] .weform-loop-poster,
.hero-media[data-ambient-only="true"] .weform-loop-video {
  position:absolute;inset:0;width:100%;height:100%;display:block!important;
  object-fit:cover;pointer-events:none;border:0;
}
.hero-media[data-ambient-only="true"] .weform-loop-poster {z-index:0;}
.hero-media[data-ambient-only="true"] .weform-loop-video {
  opacity:0;z-index:1;transition:opacity .26s ease;
}
.hero-media[data-ambient-only="true"] .weform-loop-card.weform-video-ready .weform-loop-video {opacity:1;}
.hero-media[data-ambient-only="true"] .weform-loop-card {cursor:default!important;}
.hero-media[data-ambient-only="true"] .weform-loop-card .poster-caption {z-index:5;}
@media(prefers-reduced-motion:reduce){
  .hero-media[data-ambient-only="true"] .weform-loop-video{display:none!important;}
}

/* Selected Work: enough room for outside panels but less wasted horizontal and
   vertical space. Videos are 16:9 and titles always remain readable. */
.weform-featured-work {padding:clamp(56px,5.4vw,78px) 0 clamp(62px,6vw,84px)!important;}
.weform-featured-work .weform-featured-head {margin-bottom:clamp(22px,2.4vw,34px)!important;}
.weform-featured-work .weform-featured-grid {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  max-width:min(1140px,calc(100vw - 398px))!important;
  column-gap:clamp(20px,2.3vw,30px)!important;
  row-gap:clamp(22px,2.6vw,36px)!important;
}
.weform-featured-work .weform-work-v8 .weform-case-poster {
  position:relative!important;
  aspect-ratio:16/9;
  isolation:isolate;
  overflow:hidden;
  box-shadow:0 18px 40px rgba(8,22,55,.105);
}
.weform-work-v8 .weform-case-poster > img {position:relative;z-index:0;}
.weform-work-v8 .weform-case-poster::after {
  content:'';position:absolute;inset:0;z-index:2;
  background:linear-gradient(180deg,transparent 58%,rgba(8,22,55,.20));
  pointer-events:none;transition:opacity .25s ease;
}
.weform-work-v8 .weform-gallery-video.weform-hover-playing .weform-case-poster::after {opacity:.32;}
.weform-work-v8 .weform-play-hint {
  position:absolute;z-index:5;right:14px;bottom:14px;
  display:inline-flex;align-items:center;gap:9px;
  padding:7px 12px 7px 7px;border-radius:999px;
  background:rgba(255,255,255,.91);color:var(--weform-navy);
  border:1px solid rgba(255,255,255,.83);
  box-shadow:0 6px 24px rgba(8,22,55,.14);
  backdrop-filter:blur(13px);-webkit-backdrop-filter:blur(13px);
  font:700 10px/1.2 'Sora',system-ui,sans-serif;
  letter-spacing:.035em;
  transition:transform .28s ease,background .28s ease,box-shadow .28s ease;
  pointer-events:none;
}
.weform-work-v8 .weform-play-hint-icon {
  display:grid;place-items:center;width:25px;height:25px;
  flex:0 0 25px;padding-left:2px;border-radius:999px;
  background:var(--weform-blue);color:var(--weform-white);
  font-size:10px;font-weight:700;
}
.weform-work-v8 .weform-gallery-video:hover .weform-play-hint,
.weform-work-v8 .weform-gallery-video:focus-visible .weform-play-hint {
  transform:translateY(-2px);box-shadow:0 12px 30px rgba(8,22,55,.20);
}
.weform-work-v8 .weform-work-hover-media {
  position:absolute;inset:0;z-index:1;width:100%;height:100%;
  display:block;border:0;object-fit:cover;pointer-events:none;
  opacity:0;transition:opacity .26s ease;
  background:transparent;
}
.weform-work-v8 .weform-gallery-video.weform-hover-playing .weform-work-hover-media {opacity:1;}
.weform-featured-work .weform-project-name-row {padding-top:11px!important;min-height:44px!important;}
.weform-featured-work .weform-project-name {font-size:clamp(16px,1.35vw,19px)!important;}

/* Glassy, art-directed side information. The popover is OUTSIDE the picture;
   left-column projects open LEFT and right-column projects open RIGHT. */
.weform-work-v8 .weform-hover-panel,
.weform-work-v8:nth-child(n+4) .weform-hover-panel {
  top:clamp(22px,13%,62px)!important;
  padding:17px 14px 17px 17px!important;
  width:163px!important;min-height:124px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(234,248,255,.96))!important;
  border:1px solid rgba(47,141,254,.25)!important;
  border-radius:17px!important;
  box-shadow:0 18px 48px rgba(8,22,55,.135),0 3px 9px rgba(29,85,230,.07)!important;
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
.weform-work-v8 .weform-hover-panel::before {
  top:13px!important;bottom:13px!important;left:0!important;
  width:3px!important;background:linear-gradient(var(--weform-blue),var(--weform-cyan),var(--weform-mint))!important;
}
.weform-work-v8 .weform-hover-kicker {
  display:block;font:700 8px/1.6 'Sora',system-ui,sans-serif;
  color:var(--weform-blue);letter-spacing:.12em;
  max-width:calc(100% - 24px);margin-bottom:9px;
}
.weform-work-v8 .weform-hover-flourish {
  display:grid;place-items:center;position:absolute;
  top:10px;right:10px;width:25px;height:25px;
  border-radius:50%;background:var(--weform-mist);color:var(--weform-blue);
  font-size:13px;border:1px solid rgba(29,85,230,.10);
}
.weform-work-v8 .weform-hover-client {
  font-size:14px!important;font-weight:800!important;
  color:var(--weform-navy);letter-spacing:-.045em;line-height:1.25;margin-bottom:8px;
}
.weform-work-v8 .weform-hover-description {
  color:rgba(8,22,55,.76);font-size:10px!important;line-height:1.6!important;
  -webkit-line-clamp:4!important;
}
.weform-work-v8 .weform-hover-customer {font-size:9px!important;margin:0 0 6px!important;}
.weform-work-v8:nth-child(odd) .weform-hover-panel {right:calc(100% + 13px)!important;left:auto!important;}
.weform-work-v8:nth-child(even) .weform-hover-panel {left:calc(100% + 13px)!important;right:auto!important;}

@media(min-width:1000px) and (max-width:1199px){
  .weform-featured-work .weform-featured-grid {
    max-width:calc(100vw - 364px)!important;
    row-gap:30px!important;
  }
  .weform-work-v8 .weform-hover-panel,
  .weform-work-v8:nth-child(n+4) .weform-hover-panel {
    top:12%!important;bottom:auto!important;
    width:148px!important;padding:13px 11px 13px 14px!important;
    min-height:100px!important;
  }
  .weform-work-v8:nth-child(odd) .weform-hover-panel {
    left:auto!important;right:calc(100% + 10px)!important;
    transform:translateX(8px) scale(.982)!important;
  }
  .weform-work-v8:nth-child(even) .weform-hover-panel {
    right:auto!important;left:calc(100% + 10px)!important;
    transform:translateX(-8px) scale(.982)!important;
  }
  .weform-work-v8:is(:hover,:focus-within) .weform-hover-panel {
    transform:translateX(0) scale(1)!important;
  }
}
/* Tablet and phones use an appropriately larger film and the full project
   modal for information; no tooltip can be clipped over a neighboring video. */
@media(max-width:999px){
  .weform-featured-work .weform-featured-grid {
    grid-template-columns:1fr!important;max-width:min(100%,690px)!important;
    row-gap:clamp(18px,3vw,30px)!important;
  }
  .weform-work-v8 .weform-hover-panel {display:none!important;}
}
@media(max-width:500px){
  .weform-featured-work {padding:51px 0 62px!important;}
  .weform-work-v8 .weform-play-hint-label {display:none;}
  .weform-work-v8 .weform-play-hint {padding:6px!important;right:11px;bottom:11px;}
  .weform-work-v8 .weform-project-name {font-size:16px!important;}
}
@media(prefers-reduced-motion:reduce){
  .weform-work-v8 .weform-play-hint,.weform-work-v8 .weform-work-hover-media,
  .hero-media .weform-loop-video {transition:none!important;}
}
