/* TrueView Film site styles. Layout lives inline in each page; this file holds shared behavior. */
html { scroll-behavior: smooth; }
body { margin: 0; background: #15122B; }
a { color: #F3EEE5; transition: color 300ms ease-out; }
a:hover { color: #E8934A; }
img, video { max-width: 100%; }
section[id], div[id] { scroll-margin-top: 24px; }
:focus-visible { outline: 2px solid #E8934A; outline-offset: 3px; }

/* Scrolling logo strip */
@keyframes tv-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tv-marquee { animation: tv-marquee 45s linear infinite; }
.tv-marquee:hover { animation-play-state: paused; }

/* Sections rise into place as they enter the screen; rows of cards follow one after another */
.tv-reveal { opacity: 0; transform: translateY(44px); transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1); }
.tv-reveal.tv-in { opacity: 1; transform: none; }
h2.tv-reveal, .tv-reveal > h2 { transform: translate(-28px, 20px); }
h2.tv-reveal.tv-in, .tv-reveal.tv-in > h2 { transform: none; }

/* Hero text arrives line by line on load */
@keyframes tv-rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
.tv-hero > div:last-of-type > * { animation: tv-rise 600ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.tv-hero > div:last-of-type > *:nth-child(1) { animation-delay: 150ms; }
.tv-hero > div:last-of-type > *:nth-child(2) { animation-delay: 270ms; }
.tv-hero > div:last-of-type > *:nth-child(3) { animation-delay: 390ms; }
.tv-hero > div:last-of-type > *:nth-child(4) { animation-delay: 510ms; }
.tv-hero > div:last-of-type > *:nth-child(5) { animation-delay: 630ms; }

/* Buttons lift, brighten and press */
a[style*="border-radius: 2px"], button { transition: transform 250ms ease-out, background-color 250ms ease-out, color 250ms ease-out, border-color 250ms ease-out; }
a[style*="background: #E8934A"]:hover { transform: translateY(-3px) scale(1.03); background: #F3A862 !important; color: #15122B !important; }
a[style*="border: 1px solid #F3EEE5"]:hover, a[style*="background: #F3EEE5"]:hover { transform: translateY(-3px) scale(1.03); background: #F3EEE5 !important; color: #15122B !important; }
a[style*="background: #F3EEE5"]:hover { background: #FFFFFF !important; }
a[style*="border-radius: 2px"]:active { transform: translateY(0) scale(0.97); transition-duration: 80ms; }
a[style*="border-radius: 9999px"] { transition: transform 300ms ease-out, background-color 300ms ease-out; }
a[style*="border-radius: 9999px"]:hover { transform: translate(-50%, -50%) scale(1.12) !important; background: #E8934A !important; color: #15122B !important; }

/* Menu links draw an underline from the left */
nav a:not([style*="background"]):not([aria-label]) { background-image: linear-gradient(#E8934A, #E8934A); background-repeat: no-repeat; background-position: 0 calc(100% - 6px); background-size: 0 1px; transition: background-size 300ms ease-out, color 300ms ease-out; }
nav a:not([style*="background"]):not([aria-label]):hover { background-size: 100% 1px; }

/* Stills push in on hover */
article img, a > img, a > div > img { transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1); }
article:hover img, a:hover > img { transform: scale(1.05); }
article, #services a { overflow: hidden; }
#services a { transition: transform 300ms ease-out, background-color 300ms ease-out; }
#services a:hover { transform: translateY(-6px); background: #3A2478 !important; }

/* Hero video eases in once it can play, and drifts slightly as the page scrolls */
.tv-hero video { opacity: 0; transition: opacity 600ms ease-out; will-change: transform; }
.tv-hero video.tv-ready { opacity: 1; }

/* Lightbox for the full reel */
.tv-lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(21, 18, 43, 0.94); opacity: 0; transition: opacity 300ms ease-out; }
.tv-lightbox.tv-in { opacity: 1; }
.tv-lightbox video { width: min(1280px, 100%); max-height: 86vh; background: #000; }
.tv-lightbox iframe { width: min(1280px, 100%); aspect-ratio: 16 / 9; max-height: 86vh; border: 0; background: #000; }

/* Vimeo players that load on click */
.tv-vimeo iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.tv-lightbox button { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; border: 1px solid #F3EEE5; border-radius: 2px; background: transparent; color: #F3EEE5; font: 500 16px 'DM Sans', system-ui, sans-serif; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tv-marquee { animation: none; }
  .tv-reveal, h2.tv-reveal, .tv-reveal > h2 { opacity: 1; transform: none; transition: none; }
  .tv-hero > div:last-of-type > * { animation: none; }
  article img, a > img, #services a, a[style*="border-radius"] { transition: none; }
  a[style*="border-radius: 2px"]:hover, #services a:hover, article:hover img, a:hover > img { transform: none; }
  .tv-hero video { opacity: 1; transition: none; }
}
