/* CINEMATIC HERO FILM
   A looping, muted promo reel built from real Pure Gloss detailing photos:
   crossfading scenes with slow camera moves, light sweeps and kinetic captions. */

.film {
  --film-scene: 6.5s;
  --film-fade: 1.4s;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  max-height: 1100px;
  overflow: hidden;
  background: #05070b;
  isolation: isolate;
}

/* ---------- STAGE ---------- */
.film-stage { position: absolute; inset: 0; z-index: 0; }

.film-scene {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity var(--film-fade) cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.film-scene.is-active { opacity: 1; z-index: 2; }
.film-scene.is-leaving { opacity: 0; z-index: 1; }

.film-scene > img,
.film-scene .film-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);
  display: block;
  will-change: transform;
  transform: scale(var(--kb-from-s, 1.06)) translate3d(var(--kb-from-x, 0), var(--kb-from-y, 0), 0);
  filter: saturate(1.08) contrast(1.06) brightness(0.92);
}
.film-scene.is-active > img,
.film-scene.is-leaving > img {
  animation: film-kenburns calc(var(--film-scene) + var(--film-fade) * 2) linear both;
}
@keyframes film-kenburns {
  from { transform: scale(var(--kb-from-s, 1.06)) translate3d(var(--kb-from-x, 0), var(--kb-from-y, 0), 0); }
  to   { transform: scale(var(--kb-to-s, 1.18))   translate3d(var(--kb-to-x, 0),   var(--kb-to-y, 0),   0); }
}

/* Portrait-style scene: blurred backplate with a framed, sharp photo (desktop). */
.film-scene .film-backplate { display: none; }
@media (min-width: 901px) {
  .film-scene.is-framed > img { display: none; }
  .film-scene.is-framed .film-backplate {
    display: block;
    position: absolute; inset: -40px;
    background-size: cover;
    background-position: var(--pos, center);
    filter: blur(28px) brightness(0.45) saturate(1.2);
  }
  .film-scene.is-framed .film-frame {
    position: absolute;
    right: 9%; top: 50%;
    height: 72%;
    aspect-ratio: 679 / 869;
    transform: translateY(-46%);
    border: 1px solid rgba(59,130,246,0.55);
    box-shadow: 0 0 0 1px rgba(163,230,53,0.18), 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(37,99,200,0.35);
    overflow: hidden;
  }
  .film-scene.is-framed .film-frame img { transform: none; }
  .film-scene.is-framed.is-active .film-frame img,
  .film-scene.is-framed.is-leaving .film-frame img {
    animation: film-kenburns calc(var(--film-scene) + var(--film-fade) * 2) linear both;
  }
}
@media (max-width: 900px) {
  .film-scene .film-frame { display: none; }
}

/* Colour grade: black luxury falloff, electric blue cast, vignette. */
.film-grade {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,7,11,0.94) 0%, rgba(5,7,11,0.72) 32%, rgba(5,7,11,0.18) 62%, rgba(5,7,11,0.35) 100%),
    linear-gradient(0deg, rgba(5,7,11,0.95) 0%, rgba(5,7,11,0) 34%),
    linear-gradient(180deg, rgba(5,7,11,0.7) 0%, rgba(5,7,11,0) 22%),
    radial-gradient(ellipse 120% 90% at 60% 50%, transparent 55%, rgba(0,0,0,0.6) 100%);
}
.film-tint {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(125deg, rgba(37,99,200,0.32) 0%, rgba(10,12,16,0) 45%, rgba(163,230,53,0.08) 100%);
  mix-blend-mode: soft-light;
}

/* Light sweep that glides across the frame on every cut. */
.film-sweep {
  position: absolute; inset: -20% -40%; z-index: 4; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(120,170,255,0.0) 44%, rgba(160,200,255,0.22) 49%, rgba(200,255,140,0.12) 51%, transparent 56%);
  transform: translateX(-60%);
  opacity: 0;
  mix-blend-mode: screen;
}
.film-sweep.is-running { animation: film-sweep 1.9s cubic-bezier(.55,.05,.3,1) both; }
@keyframes film-sweep {
  0%   { transform: translateX(-60%); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(60%); opacity: 0; }
}

/* Faint scanlines for a subtle lens texture. */
.film-lines {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0.25;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
}

/* ---------- CONTENT ---------- */
.film-content {
  position: relative; z-index: 6;
  height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 48px 130px;
  max-width: 820px;
}

.film-brand {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 30px;
}
.film-brand-mark {
  position: relative;
  width: clamp(84px, 8vw, 118px);
  line-height: 0;
}
.film-brand-mark::before {
  content: ''; position: absolute; inset: -30%;
  background: radial-gradient(circle, rgba(37,99,200,0.4) 0%, rgba(163,230,53,0.1) 45%, transparent 70%);
  filter: blur(14px);
  z-index: -1;
}
.film-brand-mark img { width: 100%; height: auto; display: block; filter: saturate(1.15) brightness(1.15); }
.film-brand-mark::after {
  /* metallic glint across the emblem */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.55) 50%, transparent 65%);
  -webkit-mask: url('/images/logo-mark.png') center / 100% auto no-repeat;
          mask: url('/images/logo-mark.png') center / 100% auto no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  animation: film-glint 6.5s ease-in-out 1.6s infinite;
}
@keyframes film-glint {
  0%, 70% { background-position: 150% 0; }
  100%    { background-position: -100% 0; }
}
.film-brand-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  letter-spacing: 4px;
  line-height: 1;
  color: var(--white);
}
.film-brand-name span {
  display: block;
  margin-top: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--lime);
}

.film-title {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 7.4vw, 7.6rem);
  line-height: 0.9;
  letter-spacing: 2px;
  margin-bottom: 26px;
  color: var(--white);
}
.film-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.04em;
}
.film-title .w > span {
  display: inline-block;
  transform: translateY(105%);
  animation: film-rise 1s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(0.35s + var(--i) * 0.12s);
}
.film-title .film-chrome > span {
  background: linear-gradient(100deg, #9cc2ff 0%, #3b82f6 28%, #e8f0ff 46%, #2563c8 62%, #7fb0ff 80%, #3b82f6 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: film-rise 1s cubic-bezier(.2,.8,.2,1) forwards, film-chrome 7s linear 1.6s infinite;
  animation-delay: calc(0.35s + var(--i) * 0.12s), 1.6s;
}
.film-title .film-dot { color: var(--lime); }
@keyframes film-rise { to { transform: translateY(0); } }
@keyframes film-chrome { from { background-position: 0% 0; } to { background-position: -220% 0; } }

.film-sub {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #c7d3ee;
  margin-bottom: 40px;
  max-width: 640px;
}
.film-sub span {
  display: inline-flex; align-items: center; gap: 18px;
  opacity: 0; transform: translateY(14px);
  animation: film-fade-in 0.8s ease forwards;
  animation-delay: calc(1.05s + var(--i) * 0.18s);
}
.film-sub span + span::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
@keyframes film-fade-in { to { opacity: 1; transform: none; } }

.film-actions {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  opacity: 0; transform: translateY(14px);
  animation: film-fade-in 0.8s ease 1.7s forwards;
}
.film-cta {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  padding: 20px 40px;
  background: linear-gradient(135deg, #3b82f6 0%, #1a4fa0 48%, #2563c8 100%);
  border: 1px solid rgba(163,230,53,0.7);
  box-shadow: 0 0 0 1px rgba(163,230,53,0.15), 0 12px 40px rgba(37,99,200,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.film-cta::before {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60%; left: -80%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  animation: film-cta-shine 4.5s ease-in-out 2.6s infinite;
}
@keyframes film-cta-shine { 0%, 65% { left: -80%; } 100% { left: 140%; } }
.film-cta-arrow { color: var(--lime); font-size: 1.25em; transition: transform 0.3s; }
.film-cta:hover, .film-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(163,230,53,0.45), 0 16px 50px rgba(37,99,200,0.75), 0 0 30px rgba(163,230,53,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
}
.film-cta:hover .film-cta-arrow { transform: translateX(4px); }
.film-cta:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.film-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.85rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: #c7d3ee; text-decoration: none;
  border-bottom: 1px solid rgba(163,230,53,0.5);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.film-link:hover { color: var(--lime); border-color: var(--lime); }

/* Kinetic scene caption */
.film-caption {
  position: absolute; z-index: 6;
  right: 48px; bottom: 112px;
  text-align: right;
  pointer-events: none;
}
.film-caption-label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 6px;
}
.film-caption-title {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  letter-spacing: 3px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240,244,255,0.85);
}
.film-caption > * { clip-path: inset(0 0 0 100%); }
.film-caption.is-in .film-caption-label { animation: film-wipe 0.9s cubic-bezier(.7,0,.2,1) 0.5s forwards; }
.film-caption.is-in .film-caption-title { animation: film-wipe 1.1s cubic-bezier(.7,0,.2,1) 0.65s forwards; }
.film-caption.is-out > * { clip-path: inset(0); animation: film-wipe-out 0.6s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes film-wipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes film-wipe-out { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 100% 0 0); } }

/* ---------- CONTROLS ---------- */
.film-controls {
  position: absolute; z-index: 7;
  left: 48px; right: 48px; bottom: 36px;
  display: flex; align-items: center; gap: 18px;
}
.film-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(59,130,246,0.6);
  background: rgba(5,7,11,0.55);
  backdrop-filter: blur(6px);
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.film-btn:hover { border-color: var(--lime); color: var(--lime); }
.film-btn:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.film-btn svg { width: 16px; height: 16px; fill: currentColor; }
.film-btn .icon-play { display: none; }
.film.is-paused .film-btn-toggle .icon-play { display: block; }
.film.is-paused .film-btn-toggle .icon-pause { display: none; }

.film-chapters {
  flex: 1;
  display: flex; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.film-chapters li { flex: 1; }
.film-chapter {
  display: block; width: 100%;
  padding: 14px 0;
  background: none; border: 0; cursor: pointer;
}
.film-chapter-track {
  display: block; height: 2px;
  background: rgba(240,244,255,0.2);
  overflow: hidden;
}
.film-chapter-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--blue-bright), var(--lime));
  transform-origin: left;
  transform: scaleX(0);
}
.film-chapter.is-done .film-chapter-fill { transform: scaleX(1); }
.film-chapter:hover .film-chapter-track { background: rgba(240,244,255,0.4); }
.film-chapter:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.film-counter {
  flex-shrink: 0;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 2px;
  font-size: 1.05rem;
  color: var(--gray);
  min-width: 56px; text-align: right;
}
.film-counter b { color: var(--white); font-weight: 400; }

.film-accent {
  position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue-bright), var(--lime) 50%, transparent);
  opacity: 0.8;
}

.film-scroll-hint {
  position: absolute; z-index: 7; left: 50%; bottom: 92px;
  width: 1px; height: 38px;
  background: linear-gradient(var(--lime), transparent);
  animation: film-hint 2.4s ease-in-out infinite;
  display: none;
}
@keyframes film-hint { 0%,100% { opacity: 0.2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(8px); } }

.film.is-paused .film-scene img { animation-play-state: paused !important; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .film { min-height: 600px; }
  .film-content {
    justify-content: flex-end;
    padding: 110px 20px 120px;
  }
  .film-grade {
    background:
      linear-gradient(0deg, rgba(5,7,11,0.97) 0%, rgba(5,7,11,0.8) 38%, rgba(5,7,11,0.15) 70%, rgba(5,7,11,0.55) 100%),
      radial-gradient(ellipse 130% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.55) 100%);
  }
  .film-brand { margin-bottom: 20px; gap: 12px; }
  .film-brand-mark { width: 72px; }
  .film-title { font-size: clamp(3rem, 14vw, 4.6rem); margin-bottom: 18px; }
  .film-sub { font-size: 0.92rem; letter-spacing: 1.8px; gap: 4px 12px; margin-bottom: 28px; }
  .film-sub span { gap: 12px; }
  .film-cta { width: 100%; justify-content: center; padding: 18px 24px; }
  .film-link { display: none; }
  .film-caption { right: 20px; left: auto; top: 112px; bottom: auto; }
  .film-caption-title { font-size: 1.7rem; }
  .film-controls { left: 20px; right: 20px; bottom: 26px; gap: 12px; }
  .film-btn { width: 40px; height: 40px; }
  .film-counter { min-width: 44px; font-size: 0.95rem; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .film-brand { display: none; }
}
@media (min-width: 901px) and (min-height: 820px) {
  .film-scroll-hint { display: block; }
}

/* Respect reduced-motion preferences: no camera moves or looping shimmer. */
@media (prefers-reduced-motion: reduce) {
  .film-scene > img, .film-scene .film-frame img { animation: none !important; transform: none; }
  .film-title .w > span, .film-sub span, .film-actions { animation: none !important; transform: none; opacity: 1; }
  .film-title .film-chrome > span { animation: none !important; }
  .film-brand-mark::after, .film-cta::before, .film-scroll-hint, .film-sweep { animation: none !important; display: none; }
  .film-scene { transition-duration: 0.4s; }
}

/* Short phones: keep the headline and booking button clear of the scene caption. */
@media (max-width: 900px) and (max-height: 780px) {
  .film-caption { display: none; }
}
