/* HOME: PORTFOLIO TEASER (copy on the left, auto-cycling image panel on the right)
   Mobile first, two columns from 900px to match the map section above.
   Reference: docs/Option4-TeaserReel.dc.html. The eyebrow reuses .vgm-eyebrow
   from home-map.css and the button reuses .hero-cta-main from index.html. */

.vgr {
  font-family: 'DM Sans', sans-serif;
  color: #050505;
  background: #ffffff;
  padding: 48px 16px 56px;
  scroll-margin-top: 72px;
}
.vgr *, .vgr *::before, .vgr *::after { box-sizing: border-box; }
.vgr-inner { max-width: 600px; margin: 0 auto; }

.vgr-layout { display: flex; flex-direction: column; gap: 32px; }

/* Copy */
.vgr-title {
  margin: 0 0 20px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300;
  font-size: 40px; line-height: 1.1; color: #050505;
}
.vgr-title em { font-style: italic; color: #539e96; }
.vgr-body { margin: 0 0 28px; font-size: 16px; line-height: 1.6; color: #3a3a3a; max-width: 360px; }
.vgr .vgr-cta { display: inline-flex; align-items: center; justify-content: center; }
.vgr .vgr-cta:focus-visible { outline: 2px solid #2f6a62; outline-offset: 3px; }

/* Panel */
.vgr-panelwrap { display: flex; flex-direction: column; align-items: center; }
.vgr-panel {
  position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0; padding: 0; list-style: none;
  border-radius: 20px; overflow: hidden; background: #fffefb;
  box-shadow: 0 24px 60px rgba(5, 5, 5, 0.18);
}
.vgr-slide {
  position: absolute; inset: 0; opacity: 0;
  animation: vgrCycle 9.6s linear infinite;
}
.vgr-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.vgr-slide::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48%;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.78), rgba(5, 5, 5, 0));
}
.vgr-tag, .vgr-name { position: absolute; z-index: 1; opacity: 0; animation: vgrPop 9.6s linear infinite; }
.vgr-tag {
  top: 14px; left: 14px;
  background: #fffd9c; color: #050505;
  font-weight: 700; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.vgr-name {
  left: 18px; right: 18px; bottom: 16px;
  font-family: 'Anton', 'DM Sans', sans-serif; font-weight: 400; color: #ffffff;
  font-size: 24px; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.5px;
}

/* Timing from the reference: 8 slides, 1.2s apart, one 9.6s loop. */
.vgr-slide:nth-child(2), .vgr-slide:nth-child(2) .vgr-tag, .vgr-slide:nth-child(2) .vgr-name { animation-delay: 1.2s; }
.vgr-slide:nth-child(3), .vgr-slide:nth-child(3) .vgr-tag, .vgr-slide:nth-child(3) .vgr-name { animation-delay: 2.4s; }
.vgr-slide:nth-child(4), .vgr-slide:nth-child(4) .vgr-tag, .vgr-slide:nth-child(4) .vgr-name { animation-delay: 3.6s; }
.vgr-slide:nth-child(5), .vgr-slide:nth-child(5) .vgr-tag, .vgr-slide:nth-child(5) .vgr-name { animation-delay: 4.8s; }
.vgr-slide:nth-child(6), .vgr-slide:nth-child(6) .vgr-tag, .vgr-slide:nth-child(6) .vgr-name { animation-delay: 6.0s; }
.vgr-slide:nth-child(7), .vgr-slide:nth-child(7) .vgr-tag, .vgr-slide:nth-child(7) .vgr-name { animation-delay: 7.2s; }
.vgr-slide:nth-child(8), .vgr-slide:nth-child(8) .vgr-tag, .vgr-slide:nth-child(8) .vgr-name { animation-delay: 8.4s; }

@keyframes vgrCycle {
  0% { opacity: 0; }
  0.6% { opacity: 1; }
  9% { opacity: 1; }
  11.5% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes vgrPop {
  0% { opacity: 0; transform: translateY(14px); }
  0.6% { opacity: 1; transform: translateY(6px); }
  2.5% { transform: translateY(0); }
  9% { opacity: 1; transform: translateY(0); }
  11.5% { opacity: 0; transform: translateY(0); }
  100% { opacity: 0; }
}

/* Progress dots and pause control */
.vgr-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.vgr-dots { display: flex; gap: 8px; }
.vgr-dot { width: 28px; height: 4px; border-radius: 2px; background: rgba(5, 5, 5, 0.12); overflow: hidden; position: relative; }
.vgr-dot::after {
  content: ''; position: absolute; inset: 0; display: block;
  transform: scaleX(0); transform-origin: left;
  animation: vgrFill 9.6s linear infinite;
}
.vgr-dot:nth-child(1)::after { animation-delay: 0s; background: #539e96; }
.vgr-dot:nth-child(2)::after { animation-delay: 1.2s; background: #ffdfe8; }
.vgr-dot:nth-child(3)::after { animation-delay: 2.4s; background: #fffd9c; }
.vgr-dot:nth-child(4)::after { animation-delay: 3.6s; background: #539e96; }
.vgr-dot:nth-child(5)::after { animation-delay: 4.8s; background: #ffdfe8; }
.vgr-dot:nth-child(6)::after { animation-delay: 6.0s; background: #fffd9c; }
.vgr-dot:nth-child(7)::after { animation-delay: 7.2s; background: #539e96; }
.vgr-dot:nth-child(8)::after { animation-delay: 8.4s; background: #ffdfe8; }
@keyframes vgrFill {
  0% { transform: scaleX(0); }
  1% { transform: scaleX(1); }
  12.3% { transform: scaleX(1); }
  12.5% { transform: scaleX(0); }
  100% { transform: scaleX(0); }
}

.vgr-pause {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border-radius: 999px;
  border: 1px solid #d6e8e6; background: #ffffff; color: #050505; cursor: pointer;
}
.vgr-pause:hover { border-color: #539e96; }
.vgr-pause:focus-visible { outline: 2px solid #2f6a62; outline-offset: 3px; }
.vgr-pause svg { width: 14px; height: 14px; }
.vgr-pause .vgr-icon-play { display: none; }
.vgr.is-paused .vgr-pause .vgr-icon-play { display: block; }
.vgr.is-paused .vgr-pause .vgr-icon-pause { display: none; }
.vgr.is-paused .vgr-slide,
.vgr.is-paused .vgr-tag,
.vgr.is-paused .vgr-name,
.vgr.is-paused .vgr-dot::after { animation-play-state: paused; }

/* Desktop */
@media (min-width: 900px) {
  .vgr { padding: 88px 2rem 96px; }
  .vgr-inner { max-width: 1240px; }
  .vgr-layout { flex-direction: row; align-items: center; gap: 72px; }
  .vgr-copy { flex: 0 0 400px; }
  .vgr-title { font-size: 48px; }
  .vgr-panelwrap { flex: 1 1 auto; min-width: 0; }
  .vgr-panel { max-width: 620px; border-radius: 24px; }
  .vgr-tag { top: 18px; left: 18px; }
  .vgr-name { left: 24px; right: 24px; bottom: 20px; font-size: 30px; }
  .vgr-controls { margin-top: 8px; }
}

/* Reduced motion: no cycling. The first slide shows on its own, with no pause button. */
@media (prefers-reduced-motion: reduce) {
  .vgr-slide, .vgr-tag, .vgr-name, .vgr-dot::after { animation: none; }
  .vgr-slide:first-child, .vgr-slide:first-child .vgr-tag, .vgr-slide:first-child .vgr-name { opacity: 1; transform: none; }
  .vgr-dot:first-child::after { transform: scaleX(1); }
  .vgr-pause { display: none; }
  .vgr .vgr-cta { transition: none; }
}
