/* ITS Roads CV2X: home page hero film (the looping intersection animation with captions and "Try me" hotspots). */
.hero-grid.film { align-items: start; }
@media (min-width: 900px) { .hero-grid.film { grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); align-items: center; } }
.hero-copy h1 { max-width: 18ch; }
.hero-film-col { min-width: 0; }
.hero-film { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 300px; max-height: 580px; border-radius: 10px; overflow: hidden; background: #28382c; box-shadow: 0 18px 44px rgba(0,0,0,.4); isolation: isolate; }
.hero-film canvas { display: block; width: 100%; height: 100%; }
.film-note { margin: 10px 2px 0; font-size: .88rem; color: #cfcec6; }
.film-note a { color: #8fd0f2; }
/* corner controls */
.film-ctl { position: absolute; left: 10px; top: 10px; z-index: 6; display: flex; gap: 6px; }
.film-btn { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(11,27,43,.82); color: #fff; font: 700 .78rem var(--font-display); text-decoration: none; cursor: pointer; line-height: 1.2; }
.film-btn:hover { border-color: var(--yellow); color: var(--yellow); }
/* "Try me" pills: anchors positioned over the canvas by home_hero.js (transform), the fixed ones by CSS */
.tryme { position: absolute; left: 0; top: 0; z-index: 7; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px; border-radius: 999px; background: var(--yellow); color: #0b1b2b; font: 700 .74rem var(--font-display); line-height: 1.25; text-decoration: none; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.35); will-change: transform; }
.hero a.tryme, .hero .tryme, .tryme { color: #0b1b2b; }   /* outranks the hero's light link color */
.hero a.tryme:hover, .tryme:hover, .tryme:focus-visible { background: #fff; color: #0b1b2b; }
.tryme:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.tryme i { position: relative; display: block; width: 8px; height: 8px; border-radius: 50%; background: #0b1b2b; flex: none; }
.tryme i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(11,27,43,.55); animation: tm-pulse 1.6s ease-out infinite; }
@keyframes tm-pulse { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.tryme.tm-build { left: auto; right: 10px; top: 10px; }
.tryme.tm-map { position: static; flex: none; }
.tryme.tm-card { left: auto; right: 8px; top: auto; bottom: 7px; pointer-events: auto; }
/* in-vehicle display card next to the followed vehicle */
.film-card { position: absolute; left: 0; top: 0; z-index: 5; width: min(280px, calc(100% - 20px)); padding: 8px 10px 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); border-left: 6px solid #7fa6c8; background: rgba(11,27,43,.92); color: #e9e8e2; font-size: .82rem; line-height: 1.3; box-shadow: 0 10px 28px rgba(0,0,0,.35); pointer-events: none; }
.film-card.lvl-warn { border-left-color: #f0c419; } .film-card.lvl-alert { border-left-color: #ff4b3e; }
.film-card.dock { transform: none !important; left: 10px; right: 10px; top: auto; bottom: 84px; width: auto; }
.fc-head { display: flex; align-items: center; gap: 8px; } .fc-head strong { flex: 1; font-family: var(--font-display); font-size: .86rem; color: #fff; }
.fc-pill { font: 700 .68rem var(--font-display); letter-spacing: .06em; padding: 1px 7px; border-radius: 999px; background: rgba(79,179,228,.22); color: #8fd0f2; }
.fc-speed { font-family: var(--font-display); margin: 2px 0 5px; } .fc-speed b { font-size: 1.35rem; }
.fc-msg { background: rgba(255,255,255,.08); border-radius: 6px; padding: 6px 8px; }
.fc-title { font: 800 .98rem var(--font-display); color: #fff; } .film-card.lvl-alert .fc-title { color: #ff8a7a; } .film-card.lvl-warn .fc-title { color: #ffd65a; }
.fc-detail { font-size: .76rem; color: #cfd6dc; max-height: 3.9em; overflow: hidden; margin-top: 2px; }
/* caption strip above the renderer's scale bar and watermark */
.film-caption { position: absolute; left: 10px; right: 10px; bottom: 36px; z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; border-radius: 8px; background: rgba(11,27,43,.86); color: #fff; font-size: .9rem; line-height: 1.3; }
.fcap-text { flex: 1 1 240px; min-width: 0; transition: opacity .32s ease; }
.fcap-text.fade { opacity: 0; }
.hero-film.is-static .film-caption, .hero-film.is-static .film-card { display: none; }
/* phones: shorter canvas, smaller text */
@media (max-width: 699px) {
  .hero-film { height: 64vw; min-height: 240px; aspect-ratio: auto; }
  .film-caption { font-size: .78rem; padding: 6px 9px; bottom: 32px; }
  .film-btn, .tryme { font-size: .7rem; }
  .film-card { font-size: .76rem; padding-bottom: 8px; }
  .film-card .fc-detail { display: none; }
  .film-card .fc-speed { margin-bottom: 3px; }
  .tryme.tm-card { position: static; margin-top: 6px; }
  .film-note { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tryme i::after { animation: none; }
  .fcap-text { transition: none; }
}
/* the live decoder demo moved under the hero: it keeps its dark styling on a navy strip */
.demo-strip { background: linear-gradient(135deg, #0b1b2b 0%, #14283c 100%); border-radius: var(--radius); padding: 8px; margin: 0 0 24px; box-shadow: var(--shadow); }
.demo-strip .demo-box { border-color: rgba(255,255,255,.1); }
