/* ========================================
   HSE Animation Service — hse-animation-service.html
   ======================================== */
/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: #000;
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  width: 100%;
}

.hero-title {
  color: #fff;
  font-size: clamp(1.85rem, 4.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-title-line {
  display: block;
}

@media (min-width: 1200px) {
  .hero-title-line {
    white-space: nowrap;
  }
}

.hero-text {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 500px;
}

@media (max-width: 767.98px) {
  .hero-content,
  .hero-text {
    max-width: none;
  }

  .hero-title-line {
    white-space: normal;
  }
}

/* ---------- Featured Video / Demo Reel ---------- */
.section-video {
  background: var(--bg-white);
}

.section-video .featured-video-wrap {
  position: relative;
  max-width: 920px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(10, 29, 55, 0.14);
  animation: demoReelEnter 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.15s;
}

.section-video .demo-reel-media {
  position: relative;
  overflow: hidden;
  transform-origin: center center;
  animation: demoReelKenBurns 18s ease-in-out infinite alternate;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  line-height: 0;
}

.section-video .featured-video-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  display: block;
  vertical-align: middle;
}

.section-video .demo-reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.18) 45%,
    rgba(0, 0, 0, 0.32) 100%
  );
  transition: background 0.45s ease;
  pointer-events: none;
}

.section-video .demo-reel-trigger {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  cursor: pointer;
  animation: demoReelEnter 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.35s;
}

.section-video .demo-reel-play-stack {
  position: relative;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-video .demo-reel-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section-video .demo-reel-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  opacity: 0;
  animation: demoReelRipple 3.2s ease-out infinite;
}

.section-video .demo-reel-ring:nth-child(2) {
  animation-delay: 1.05s;
}

.section-video .demo-reel-ring:nth-child(3) {
  animation-delay: 2.1s;
}

.section-video .demo-reel-play-core {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
  animation: demoReelPulse 2.8s ease-in-out infinite;
}

.section-video .play-btn-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
  transition: filter 0.45s ease;
}

.section-video .demo-reel-label {
  position: relative;
  z-index: 2;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
  transition: color 0.45s ease, opacity 0.45s ease, letter-spacing 0.45s ease;
  animation: demoReelLabel 4s ease-in-out infinite;
}

.section-video .featured-video-wrap:hover .demo-reel-media {
  transform: scale(1.04);
  animation-play-state: paused;
}

.section-video .featured-video-wrap:hover .demo-reel-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.14) 0%,
    rgba(0, 0, 0, 0.26) 45%,
    rgba(0, 0, 0, 0.42) 100%
  );
}

.section-video .featured-video-wrap:hover .demo-reel-play-core {
  animation: none;
  transform: scale(1.1);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.08), 0 0 40px rgba(61, 184, 255, 0.22);
}

.section-video .featured-video-wrap:hover .play-btn-icon {
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}

.section-video .featured-video-wrap:hover .demo-reel-ring {
  border-color: rgba(255, 255, 255, 0.55);
}

.section-video .featured-video-wrap:hover .demo-reel-label {
  color: #ffffff;
  opacity: 1;
  letter-spacing: 0.28em;
}

.section-video .demo-reel-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: -6px;
}

@keyframes demoReelEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes demoReelKenBurns {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.03);
  }
}

@keyframes demoReelPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.04);
  }
}

@keyframes demoReelRipple {
  0% {
    transform: scale(0.82);
    opacity: 0.42;
  }

  70% {
    opacity: 0.12;
  }

  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@keyframes demoReelLabel {
  0%,
  100% {
    letter-spacing: 0.18em;
    opacity: 0.72;
  }

  50% {
    letter-spacing: 0.26em;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-video .featured-video-wrap,
  .section-video .demo-reel-trigger,
  .section-video .demo-reel-media,
  .section-video .demo-reel-play-core,
  .section-video .demo-reel-ring,
  .section-video .demo-reel-label {
    animation: none !important;
  }

  .section-video .featured-video-wrap:hover .demo-reel-media,
  .section-video .featured-video-wrap:hover .demo-reel-play-core {
    transform: none;
  }
}

#videoModal .demo-reel-modal-dialog {
  max-width: min(1200px, 94vw);
  width: 100%;
}

#videoModal .modal-content {
  border-radius: 16px;
  overflow: hidden;
}

#videoModal .demo-reel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

#galleryVideoModal .gallery-modal-dialog {
  max-width: min(1200px, 94vw);
  width: 100%;
}

#galleryVideoModal .modal-content {
  border-radius: 16px;
  overflow: hidden;
}

#galleryVideoModal .gallery-modal-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

/* ---------- Services cards ---------- */
.service-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-card-img {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card-img img {
  transform: scale(1.04);
}

.service-card-body {
  padding: 1.35rem 1.4rem 1.5rem;
}

.service-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--text-dark);
}

.service-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ---------- Gallery mosaic (HSE) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
  grid-template-rows: repeat(2, minmax(210px, 240px));
  gap: 1.15rem;
  width: 100%;
  max-width: 100%;
}

.gallery-item-1 { grid-column: 1; grid-row: 1; }
.gallery-item-2 { grid-column: 2; grid-row: 1; }
.gallery-item-3 { grid-column: 3; grid-row: 1; }
.gallery-item-4 { grid-column: 1; grid-row: 2; }
.gallery-item-5 { grid-column: 2; grid-row: 2; }
.gallery-item-6 { grid-column: 3; grid-row: 2; }
.gallery-item-7 {
  grid-column: 4;
  grid-row: 1 / 3;
}

.gallery-item-7 .gallery-play {
  top: 40%;
  width: 64px;
  height: 64px;
}

.btn-view-more {
  padding: 0.8rem 2.5rem;
  font-size: 0.95rem;
}

.gallery-item-7 .gallery-caption {
  height: 28%;
  min-height: 100px;
  padding: 1.25rem 1.35rem;
}

/* ---------- Gallery ---------- */
.section-gallery {
  background: var(--bg-light);
}

/* ---------- Industries ---------- */
.section-industries {
  background: var(--bg-light);
}

.industry-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.75rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 18px rgba(15, 35, 70, 0.04);
  transition: transform var(--transition), box-shadow var(--transition);
}

.industry-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

/* Full designed CTA artwork (navy + team in one image) */
.cta-banner-designed {
  position: relative;
  min-height: 340px;
  background: transparent;
}

.cta-banner-designed .cta-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center right;
  z-index: 0;
}

.cta-banner-designed .row {
  position: relative;
  z-index: 1;
  min-height: 340px;
}

.cta-banner-designed .cta-content {
  background: transparent;
}

@media (max-width: 991.98px) {
  .cta-banner-designed {
    min-height: 0;
  }

  .cta-banner-designed .row {
    min-height: 0;
  }

  .cta-banner-designed .cta-banner-bg {
    object-position: 72% center;
  }

  .cta-banner-designed .cta-content {
    background: linear-gradient(
      180deg,
      rgba(10, 29, 55, 0.88) 0%,
      rgba(10, 29, 55, 0.72) 55%,
      rgba(10, 29, 55, 0.45) 100%
    );
  }
}

@media (max-width: 1199.98px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.1fr);
    grid-template-rows: repeat(2, minmax(180px, 200px));
  }

  .gallery-item-7 .gallery-play {
    width: 58px;
    height: 58px;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: 85vh;
    padding: 100px 0 80px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(180px, 200px));
  }

  .gallery-item-1 { grid-column: 1; grid-row: 1; }
  .gallery-item-2 { grid-column: 2; grid-row: 1; }
  .gallery-item-3 { grid-column: 1; grid-row: 2; }
  .gallery-item-4 { grid-column: 2; grid-row: 2; }
  .gallery-item-5 { grid-column: 1; grid-row: 3; }
  .gallery-item-6 { grid-column: 2; grid-row: 3; }
  .gallery-item-7 {
    grid-column: 1 / 3;
    grid-row: 4;
  }

  .gallery-item-7 .gallery-play {
    top: 38%;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: auto;
    padding: 80px 0 70px;
    text-align: left;
  }

  .hero-title {
    font-size: clamp(1.7rem, 7vw, 1.95rem);
    line-height: 1.2;
  }

  .hero-text {
    font-size: 0.98rem;
  }

  .cta-banner-designed {
    min-height: 0;
  }

  .cta-banner-designed .row {
    min-height: 0;
  }
}

@media (max-width: 767.98px) {
  .section-video .demo-reel-play-core {
    width: 72px;
    height: 72px;
  }

  .section-video .demo-reel-play-stack {
    width: 80px;
    height: 80px;
  }

  .section-video .demo-reel-label {
    font-size: 0.65rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .gallery-item-1,
  .gallery-item-2,
  .gallery-item-3,
  .gallery-item-4,
  .gallery-item-5,
  .gallery-item-6,
  .gallery-item-7 {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-item-7 {
    grid-column: 1 / 3;
    min-height: 280px;
  }
}

@media (max-width: 575.98px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    text-align: center;
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item-7 {
    grid-column: auto;
  }

  .industry-card {
    padding: 1.75rem 1.35rem;
  }
}

