/* CASE.CSS – FTI (scopad via body.case-detail) */

body.case-detail .case-hero-video {
    position: relative;
    height: 58vh;
    min-height: 420px;
    max-height: 640px;
    overflow: hidden;
    background: #000;
}
body.case-detail .case-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
body.case-detail .case-hero-video::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}
body.case-detail .case-hero-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}
body.case-detail .case-hero-kicker {
    font-size: 40px;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
body.case-detail .case-hero-title {
    font-size: clamp(42px, 5vw, 82px);
    line-height: 0.95;
    margin: 0;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

body.case-detail .case-page {
    background: var(--gryt-orange);
    padding: 60px 40px 70px;
}
body.case-detail .case-inner {
    max-width: 1100px;
    margin: 0 auto;
}
body.case-detail .case-layout {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 60px;
    align-items: start;
}
body.case-detail .case-block + .case-block {
    margin-top: 28px;
}
body.case-detail .case-left p {
    font-size: 18px;
    line-height: 1.65;
    max-width: 62ch;
    opacity: 0.95;
}
body.case-detail .marked-title {
    font-size: 22px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
}
body.case-detail .marked-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 86px;
    height: 3px;
    background: var(--gryt-accent);
    border-radius: 3px;
}

body.case-detail .case-we-do {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 28px;
    align-items: start;
}
body.case-detail .we-do-title {
    font-size: 72px;
    line-height: 0.85;
    margin: 0;
    white-space: nowrap;
}
body.case-detail .we-do-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.7;
}
body.case-detail .we-do-list li {
    font-weight: 700;
}
body.case-detail .case-award {
    grid-column: 1 / span 2;
    display: flex;
    justify-content: center;
    margin-top: 32px;
}
body.case-detail .case-award img {
    width: 190px;
    height: auto;
    display: block;
}

body.case-detail .case-media {
    background: var(--gryt-orange);
    padding: 0 40px 90px;
}
body.case-detail .case-media-grid {
    max-width: 1100px;
    margin: 0 auto;
}
body.case-detail .case-media-feature video {
    width: 100%;
    border-radius: 18px;
    display: block;
    background: #000;
}
body.case-detail .case-media-items {
    margin-top: 26px;
    column-count: 3;
    column-gap: 18px;
}
body.case-detail .case-media-item {
    break-inside: avoid;
    margin-bottom: 18px;
}
body.case-detail .case-media-item img,
body.case-detail .case-media-item video {
    width: 100%;
    height: auto;
    border-radius: 18px;
    display: block;
}

/* NAV underline FIX (no double) */
body.case-detail .top-nav a::after {
    display: none !important;
}
body.case-detail .top-nav a {
    border-bottom: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
}
body.case-detail .top-nav a:hover,
body.case-detail .top-nav a:focus-visible,
body.case-detail .top-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 var(--gryt-accent) !important;
}

@media (max-width: 900px) {
    body.case-detail .case-layout {
        grid-template-columns: 1fr;
    }
    body.case-detail .we-do-title {
        font-size: 56px;
    }
    body.case-detail .case-media-items {
        column-count: 2;
    }
}
@media (max-width: 640px) {
    body.case-detail .case-media-items {
        column-count: 1;
    }
}

/* =========================================================
   Safari poster fix: remove native 'dim' poster overlay by using a custom poster layer
   ========================================================= */
body.safari-poster-fix .qs-video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

body.safari-poster-fix .qs-video-shell video {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: #0a0a0a;
}

body.safari-poster-fix .qs-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 18px;
}

body.safari-poster-fix .qs-poster::after {
  content: "";
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: saturate(120%) blur(2px);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  position: relative;
}

body.safari-poster-fix .qs-poster::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  transform: translateX(4px);
  z-index: 2;
}

body.safari-poster-fix .qs-video-shell.is-playing .qs-poster {
  display: none;
}

/* --- Video clipping + avoid accidental dim overlays --- */
.q-media,
.qs-video-shell {
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #000;
}

.q-media video,
.qs-video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  background: #000;
}

/* kill any accidental dimming overlays */
.q-media::before,
.q-media::after,
.qs-video-shell::before,
.qs-video-shell::after {
  background: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
  filter: none !important;
}

/* =========================================================
   CASE GALLERY STABILITY (hover-play thumbnails)
   Works with CSS columns/masonry and prevents layout shift.
   Only affects /case.html (body[data-page="case"]).
   ========================================================= */
body[data-page="case"] .video-tile{
  position: relative;
  overflow: hidden;
  background: #000;
}

body[data-page="case"] .video-tile::before{
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

body[data-page="case"] .video-tile video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="case"] .video-overlay{
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  font-size: 18px;
  padding: 18px;
}

@media (hover: hover){
  body[data-page="case"] .video-overlay{
    opacity: 0.95;
    transition: opacity 0.25s ease;
  }
  body[data-page="case"] .video-tile:hover .video-overlay{
    opacity: 1;
  }
}


/* Case heading render fix – removes double/dark ghost text only on case detail pages */
body.case-detail .case-hero-kicker,
body.case-detail .case-hero-title,
body.case-detail .marked-title,
body.case-detail .we-do-title {
    text-shadow: none !important;
    -webkit-text-stroke: 0 transparent !important;
    -webkit-text-stroke-width: 0 !important;
    font-synthesis: none !important;
}
