/* =====================================================================
   AdSource — real video clips (hero editor, showreel grid, lightbox)
   Clips live in /videos. Generated with Higgsfield (Kling 3.0 Turbo).
   ===================================================================== */

/* ---------- HERO: editor monitor with real footage ---------- */
.hv { display: grid; place-items: center; perspective: 1400px; }
.hv-monitor {
  position: relative; width: min(100%, 600px); border-radius: 22px; overflow: hidden;
  background: var(--ink); border: 2px solid var(--ink);
  box-shadow: 0 40px 80px -30px rgba(23, 21, 31, .65), 0 0 0 8px rgba(23, 21, 31, .06);
  transform: rotateY(-7deg) rotateX(3deg); transition: transform 1s var(--ease);
  animation: hvIn 1.1s .25s var(--ease) both;
}
.hv:hover .hv-monitor { transform: rotateY(0) rotateX(0); }
@keyframes hvIn { from { opacity: 0; transform: translateY(40px) rotateY(-14deg) rotateX(8deg) scale(.94); } }

.hv-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  font: 600 .72rem/1 var(--body); color: var(--muted-dark); letter-spacing: .04em;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.hv-dots { display: flex; gap: 6px; }
.hv-dots i { width: 9px; height: 9px; border-radius: 50%; background: #3d3a48; }
.hv-dots i:first-child { background: #ff5f57; } .hv-dots i:nth-child(2) { background: #febc2e; } .hv-dots i:nth-child(3) { background: var(--lime); }
.hv-file { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-tc { font-variant-numeric: tabular-nums; color: var(--lime); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }

.hv-screen { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.hv-vid {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06); transition: opacity .7s ease, transform 5.5s linear;
}
.hv-vid.is-on { opacity: 1; transform: scale(1); }
.hv-rec {
  position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  font: 700 .68rem/1 var(--body); letter-spacing: .12em; color: #fff;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); padding: 6px 9px; border-radius: 999px;
}
.hv-rec i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; animation: hvBlink 1.2s steps(2) infinite; }
@keyframes hvBlink { 50% { opacity: .2; } }
.hv-label {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  font: 700 .78rem/1 var(--body); color: var(--ink); background: var(--lime);
  padding: 8px 12px; border-radius: 10px; transition: transform .4s var(--ease), opacity .4s;
}
.hv-label.swap { opacity: 0; transform: translateY(8px); }
/* safe-area corner brackets */
.hv-safe { position: absolute; inset: 9%; z-index: 1; pointer-events: none; }
.hv-safe::before, .hv-safe::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid rgba(255, 255, 255, .55);
}
.hv-safe::before { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hv-safe::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* timeline */
.hv-tl { position: relative; padding: 12px 14px 14px; display: grid; gap: 6px; }
.hv-track { display: flex; gap: 4px; height: 26px; }
.hv-seg {
  flex: 1; border-radius: 6px; border: 0; padding: 0 8px; text-align: left; overflow: hidden;
  font: 700 .64rem/26px var(--body); color: var(--ink); white-space: nowrap; text-overflow: ellipsis;
  background: var(--c, var(--lilac)); opacity: .55; transition: opacity .3s, transform .3s var(--ease);
  background-image: linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 14px 100%;
}
.hv-seg:hover { opacity: .85; }
.hv-seg.is-on { opacity: 1; transform: translateY(-1px); }
.hv-audio { height: 18px; border-radius: 6px; background: rgba(184, 166, 255, .14); display: flex; align-items: center; gap: 2px; padding: 0 6px; overflow: hidden; }
.hv-audio i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--lilac); opacity: .7; height: var(--h, 50%); }
.hv-head {
  position: absolute; top: 6px; bottom: 6px; left: 14px; width: 2px; background: #fff; border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 255, 255, .7); pointer-events: none; will-change: transform;
}
.hv-head::before { content: ""; position: absolute; top: -4px; left: -5px; border: 6px solid transparent; border-top-color: #fff; }

/* floating phone with vertical UGC clip */
.hv-phone {
  position: absolute; left: -2%; bottom: 2%; z-index: 3; width: clamp(110px, 24%, 150px); aspect-ratio: 9 / 19;
  border-radius: 24px; overflow: hidden; background: #000; border: 5px solid var(--ink);
  box-shadow: 0 30px 50px -20px rgba(23, 21, 31, .7);
  transform: rotate(-7deg); animation: hvFloat 6s ease-in-out infinite, hvIn 1.1s .5s var(--ease) both;
}
.hv-phone video { width: 100%; height: 100%; object-fit: cover; }
.hv-phone::before { content: ""; position: absolute; top: 6px; left: 50%; width: 34%; height: 12px; transform: translateX(-50%); background: var(--ink); border-radius: 99px; z-index: 2; }
.hv-phone-cap {
  position: absolute; left: 8px; right: 8px; bottom: 26%; z-index: 2; text-align: center;
  font: 800 .7rem/1.15 var(--display); color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 12px rgba(0,0,0,.6);
}
.hv-phone-cap em { font-style: normal; color: var(--lime); }
@keyframes hvFloat { 50% { translate: 0 -10px; } }

.hv-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px;
  font: 700 .8rem/1 var(--body); background: var(--white); color: var(--ink);
  padding: 10px 14px; border-radius: 999px; border: 2px solid var(--ink);
  box-shadow: 0 14px 26px -14px rgba(23, 21, 31, .6); animation: hvFloat 5s ease-in-out infinite, hvIn 1s .8s var(--ease) both;
}
.hv-chip b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--lime); font-size: .7rem; }
.hv-chip-a { top: 6%; right: 0; animation-delay: -1.5s, .8s; }
.hv-chip-b { bottom: 10%; right: 2%; background: var(--ink); color: var(--lime); animation-delay: -3s, 1s; }
.hv-chip-b b { background: var(--lime); color: var(--ink); }

/* ---------- SHOWREEL GRID ---------- */
.reel { position: relative; overflow: hidden; }
.reel::before {
  content: ""; position: absolute; top: -200px; right: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(204, 241, 64, .16), transparent); pointer-events: none;
}
.reel h2 .hl-lime { color: var(--lime); }
.reel-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: -24px 0 32px; }
.reel-filters button {
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .18);
  color: var(--white); font-weight: 700; font-size: .9rem; transition: background .2s, color .2s, border-color .2s;
}
.reel-filters button:hover { border-color: var(--lime); }
.reel-filters button[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }

.reel-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 16px; }
.reel-tile {
  position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink-2);
  cursor: pointer; isolation: isolate; outline-offset: 4px;
  transition: opacity .4s, transform .5s var(--ease), filter .4s;
}
.reel-tile.wide { grid-column: span 2; }
.reel-tile.tall { grid-row: span 2; }
.reel-tile.big { grid-column: span 2; grid-row: span 2; }
.reel-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.reel-tile:hover video, .reel-tile:focus-visible video { transform: scale(1.05); }
.reel-tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(23,21,31,.35) 0%, transparent 30%, transparent 55%, rgba(23,21,31,.88) 100%);
}
.reel-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2; font: 700 .72rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase;
  background: rgba(23, 21, 31, .55); backdrop-filter: blur(8px); color: var(--white); padding: 7px 10px; border-radius: 999px;
}
.reel-tag::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); margin-right: 7px; vertical-align: 1px; }
.reel-ratio { position: absolute; top: 14px; right: 14px; z-index: 2; font: 700 .7rem/1 ui-monospace, Consolas, monospace; color: var(--lime); background: rgba(23,21,31,.55); padding: 7px 9px; border-radius: 8px; }
.reel-info { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; color: var(--white); }
.reel-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.reel-tile.big .reel-info h3 { font-size: clamp(1.2rem, 2vw, 1.7rem); }
.reel-info p { font-size: .85rem; color: var(--muted-dark); line-height: 1.4; }
.reel-play {
  position: absolute; top: 50%; left: 50%; z-index: 2; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; background: var(--lime); color: var(--ink);
  transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: transform .4s var(--ease), opacity .3s;
}
.reel-play svg { width: 22px; height: 22px; margin-left: 3px; }
.reel-tile:hover .reel-play, .reel-tile:focus-visible .reel-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
/* progress line along the bottom of each clip */
.reel-prog { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; z-index: 3; background: var(--lime); transform-origin: left; transform: scaleX(0); }
.reel-grid.filtering .reel-tile.is-out { opacity: .14; filter: grayscale(1); transform: scale(.97); pointer-events: none; }

.reel-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); }
.reel-cta p { color: var(--muted-dark); }

/* ---------- LIGHTBOX ---------- */
.lb { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(12, 11, 16, .86); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lb.open { opacity: 1; visibility: visible; }
.lb-box { position: relative; max-width: min(1100px, 100%); max-height: 100%; transform: scale(.94); transition: transform .4s var(--ease); }
.lb.open .lb-box { transform: none; }
.lb video { display: block; max-width: 100%; max-height: calc(100svh - 120px); border-radius: 18px; background: #000; box-shadow: 0 40px 80px -30px #000; }
.lb-cap { margin-top: 14px; color: var(--white); font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.lb-cap span { color: var(--muted-dark); font-weight: 500; }
.lb-close { position: absolute; top: -18px; right: -18px; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 1.4rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- Real footage inside existing animations ---------- */
video.fc-scene { object-fit: cover; }
.ads-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-visual.hv { height: auto; padding: 10px 0 30px; }
  .hv-monitor { transform: none; }
  .reel-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
}
@media (max-width: 560px) {
  .hv-phone { width: 96px; left: -6px; bottom: -4px; }
  .hv-chip-a { top: -6px; }
  .hv-chip-b { display: none; }
  .hv-file { display: none; }
  .reel-grid { grid-auto-rows: 150px; gap: 10px; }
  .reel-tile.wide, .reel-tile.big { grid-column: span 2; }
  .reel-info p { display: none; }
  .lb-close { top: -54px; right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hv-monitor, .hv-phone, .hv-chip { animation: none; transform: none; }
  .hv-vid { transition: opacity .3s; transform: none; }
}
