/* Case-study additions. Shared sizing and navigation live in site-base.css. */
html { scroll-behavior: smooth; }
body { background: #11111f; overflow-wrap: break-word; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 5px; }
.site-nav__brand { color: inherit; text-decoration: none; }
.site-nav__brand img { object-fit: contain; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 200; padding: 1rem; background: var(--bg); }
.skip-link:focus { top: 1rem; }
header.case-intro { margin: 3rem auto 2.5rem; }
.back-link { display: inline-block; font-size: .85rem; text-decoration: none; opacity: .75; margin-bottom: 3rem; }
.eyebrow { font-size: .75rem; font-weight: 400; text-transform: uppercase; letter-spacing: .16em; opacity: .7; }
header.case-intro .eyebrow { margin-bottom: 1rem; }
header.case-intro h1 { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 500; letter-spacing: .015em; text-transform: none; line-height: 1.06; margin-bottom: 1.25rem; }
header.case-intro .intro-deck { font-size: clamp(1.15rem, 2vw, 1.6rem); max-width: 40rem; line-height: 1.4; }
.work-tile { margin: 0; min-width: 0; }
.work-grid { grid-auto-rows: minmax(490px, auto); }
.text-tile { padding: clamp(1.5rem, 3vw, 3rem); border-radius: var(--border-radius); background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.065); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.text-tile .eyebrow { margin: 0; }
.text-tile h2:not(.eyebrow) { font-size: clamp(1.6rem, 2.5vw, 2.6rem); line-height: 1.15; font-weight: 500; letter-spacing: -.02em; margin: 0 0 1.25rem; }
.text-tile p:not(.eyebrow) { font-size: .95rem; line-height: 1.65; color: rgba(244,244,244,.72); max-width: 37rem; margin: 0; }
.project-info { justify-content: flex-start; }
.project-info dl { margin: 0; }
.project-info dl div { padding: .8rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.project-info dt { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .5; margin-bottom: .35rem; }
.project-info dd { margin: 0; font-size: .9rem; line-height: 1.45; }
.case-image, img.tile-layer--thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-image { position: absolute; inset: 0; }
.work-tile__label-title { font-size: .95rem; font-weight: 500; }
.work-tile__label-meta { font-size: .75rem; }
.media-error { position: absolute; top: 1rem; left: 1rem; right: 1rem; z-index: 4; font-size: .8rem; background: #11111f; padding: .75rem; border-radius: 8px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 1.25rem; }
.section-heading h2 { margin: 0; text-transform: uppercase; font-size: .85rem; letter-spacing: .16em; font-weight: 400; opacity: .8; }
.section-heading p { margin: 0; font-size: .85rem; opacity: .5; }
.case-end { max-width: var(--grid-width); padding: 1rem 1.5rem 4rem; margin: auto; }
.case-end p { font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; opacity: .5; }
.case-end a { font-size: clamp(1.5rem, 3vw, 2.5rem); text-decoration: none; }
.case-end a:hover, .back-link:hover { text-decoration: underline; text-underline-offset: .25em; }
@media (min-width: 601px) and (max-width: 900px) {
  .work-grid { grid-auto-rows: minmax(420px, auto); }
  /* Keep the source reading order and avoid gaps beside the portrait tile. */
  .work-grid > .size-2x1 { grid-column: span 1; }
  .process-grid > .text-tile:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  header.case-intro { margin-top: 1.75rem; }
  .back-link { margin-bottom: 2rem; }
  .desktop-break { display: none; }
  .work-grid { grid-auto-rows: auto; }
  .text-tile { min-height: 300px; gap: 2.5rem; }
  .project-info { min-height: 0; }
  .section-heading { flex-direction: column; gap: .5rem; }
  .work-tile__label-title { font-size: .8rem; letter-spacing: .08em; }
  .work-tile__label-meta { font-size: .65rem; }
  .case-end { padding-bottom: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* The complete films use their own 16:9 player, outside the tile grid. */
.final-player { margin: 0; position: relative; }
.final-player video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; border-radius: var(--border-radius); }
.final-player figcaption { font-size: .85rem; opacity: .7; margin-top: 1rem; }
.film-choices { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.film-choices button { color: var(--fg); background: #11111f; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .75rem 1.1rem; min-height: 44px; cursor: pointer; }
.film-choices button[aria-pressed="true"] { background: var(--fg); color: #11111f; }
.storyboard-tile .work-tile__media { background: #fff; }
/* Restore a softer caption gradient only on the three family-of-flavours tiles. */
.family-of-flavours .work-tile__media::after {
  content: '';
  position: absolute;
  inset: 45% 0 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(transparent, rgba(0, 0, 0, .45));
}

/* Give the opening sentence room on desktop; retain natural mobile wrapping. */
header.case-intro .intro-deck { max-width: 58rem; }
