/* =========================================================
   S3D Systems — Drone Videography Section
   File: css/drone.css
   ========================================================= */

.drone-section {
  position: relative;
  overflow: hidden;
}

.drone-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.drone-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 20% 8%, rgba(55, 139, 255, 0.16), transparent 34%),
    radial-gradient(circle at 88% 14%, rgba(255, 145, 58, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(6, 18, 38, 0.7), rgba(2, 8, 18, 0.2));
  pointer-events: none;
}

.drone-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(108, 178, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 178, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 78%, transparent);
  pointer-events: none;
}

.drone-orb {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
  animation: droneFloat 9s ease-in-out infinite;
}

.drone-orb-one {
  right: -80px;
  top: 60px;
  background: rgba(54, 137, 255, 0.48);
}

.drone-orb-two {
  left: -110px;
  bottom: 80px;
  background: rgba(255, 139, 46, 0.34);
  animation-delay: -4s;
}

.drone-head {
  align-items: end;
  gap: clamp(1.2rem, 3vw, 3rem);
}

.drone-head p {
  max-width: 520px;
}

.drone-intro-card {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: center;
  margin: clamp(1.4rem, 3vw, 2.2rem) 0 clamp(1.5rem, 4vw, 2.8rem);
  padding: 1rem 1.05rem;
  border: 1px solid rgba(120, 180, 255, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(12, 28, 55, 0.72), rgba(7, 12, 24, 0.62)),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.22);
}

.drone-intro-card p {
  max-width: 620px;
  margin: 0;
  color: rgba(232, 241, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.7;
}

.drone-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin: 0.2rem 0.35rem 0.2rem 0;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(110, 174, 255, 0.24);
  border-radius: 999px;
  color: rgba(222, 238, 255, 0.9);
  background: rgba(42, 124, 255, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drone-pill-alt {
  border-color: rgba(255, 157, 67, 0.28);
  background: rgba(255, 149, 40, 0.1);
}

.drone-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.25rem);
  align-items: stretch;
}

.drone-video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(128, 188, 255, 0.14);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(13, 28, 54, 0.84), rgba(5, 10, 22, 0.9)),
    rgba(255, 255, 255, 0.035);
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(0);
  transition:
    transform 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    background 260ms ease;
}

.drone-video-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at var(--drone-x, 50%) var(--drone-y, 20%), rgba(71, 156, 255, 0.2), transparent 38%);
  transition: opacity 260ms ease;
  pointer-events: none;
}

.drone-video-card:hover,
.drone-video-card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(92, 170, 255, 0.42);
  box-shadow:
    0 30px 110px rgba(0, 0, 0, 0.34),
    0 0 42px rgba(51, 132, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
}

.drone-video-card:hover::before,
.drone-video-card:focus-visible::before {
  opacity: 1;
}

.drone-feature-card {
  border-color: rgba(255, 159, 62, 0.18);
}

.drone-video-frame,
.drone-mystery-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.42);
}

.drone-video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(1.05) contrast(1.05) brightness(0.92);
  transition: transform 520ms ease, filter 520ms ease;
}

.drone-video-card:hover .drone-video-frame video,
.drone-video-card:focus-visible .drone-video-frame video {
  transform: scale(1.075);
  filter: saturate(1.14) contrast(1.1) brightness(1);
}

.drone-video-frame::after,
.drone-mystery-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.52), transparent 50%),
    linear-gradient(135deg, rgba(18, 89, 190, 0.16), rgba(255, 142, 38, 0.08));
  pointer-events: none;
}

.drone-video-shine {
  position: absolute;
  inset: -60% -30%;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.18), transparent 58%);
  transform: translateX(-42%) rotate(8deg);
  opacity: 0;
  transition: transform 720ms ease, opacity 280ms ease;
  pointer-events: none;
}

.drone-video-card:hover .drone-video-shine,
.drone-video-card:focus-visible .drone-video-shine {
  transform: translateX(42%) rotate(8deg);
  opacity: 1;
}

.drone-corner-tag {
  position: absolute;
  top: 0.72rem;
  left: 0.72rem;
  z-index: 2;
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(244, 249, 255, 0.92);
  background: rgba(3, 9, 20, 0.58);
  backdrop-filter: blur(14px);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drone-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.drone-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  color: rgba(133, 192, 255, 0.86);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drone-card-topline span:last-child {
  color: rgba(255, 171, 82, 0.94);
}

.drone-video-card h3 {
  margin: 0 0 0.55rem;
  color: rgba(248, 251, 255, 0.96);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.drone-video-card p {
  margin: 0 0 1rem;
  color: rgba(226, 238, 255, 0.68);
  font-size: 0.88rem;
  line-height: 1.62;
}

.drone-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: auto;
}

.drone-meta-row span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.35rem 0.52rem;
  border: 1px solid rgba(119, 181, 255, 0.16);
  border-radius: 999px;
  color: rgba(221, 237, 255, 0.78);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.72rem;
  font-weight: 650;
}

.drone-mystery-card {
  border-color: rgba(255, 169, 69, 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 142, 38, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(20, 28, 48, 0.9), rgba(7, 9, 18, 0.94));
}

.drone-mystery-frame {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 155, 54, 0.22), transparent 30%),
    radial-gradient(circle at 50% 46%, rgba(57, 142, 255, 0.18), transparent 52%),
    linear-gradient(135deg, rgba(9, 20, 42, 0.96), rgba(4, 7, 14, 0.98));
}

.drone-question-mark {
  position: relative;
  z-index: 2;
  color: rgba(255, 238, 211, 0.96);
  font-size: clamp(4rem, 8vw, 6.4rem);
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 0 18px rgba(255, 159, 56, 0.74),
    0 0 56px rgba(62, 145, 255, 0.38);
  animation: mysteryPulse 2.4s ease-in-out infinite;
}

.drone-question-mark::before {
  content: "";
  position: absolute;
  inset: -24px -34px;
  z-index: -1;
  border: 1px solid rgba(255, 167, 74, 0.24);
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(255, 139, 34, 0.15);
  animation: mysteryRing 3.4s ease-in-out infinite;
}

.drone-scan-line {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(91, 170, 255, 0.14), transparent);
  height: 42%;
  transform: translateY(-110%);
  animation: droneScan 3.6s linear infinite;
  pointer-events: none;
}

@keyframes droneFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.05); }
}

@keyframes mysteryPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.055); opacity: 1; }
}

@keyframes mysteryRing {
  0%, 100% { transform: scale(0.95); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 0.8; }
}

@keyframes droneScan {
  0% { transform: translateY(-110%); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(170%); opacity: 0; }
}

@media (max-width: 1180px) {
  .drone-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .drone-head {
    align-items: start;
  }

  .drone-intro-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .drone-video-grid {
    grid-template-columns: 1fr;
  }

  .drone-video-card {
    border-radius: 22px;
  }

  .drone-video-frame,
  .drone-mystery-frame {
    aspect-ratio: 16 / 9;
  }

  .drone-card-body {
    padding: 0.95rem;
  }

  .drone-card-topline {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drone-orb,
  .drone-question-mark,
  .drone-question-mark::before,
  .drone-scan-line {
    animation: none !important;
  }

  .drone-video-card,
  .drone-video-frame video,
  .drone-video-shine {
    transition: none !important;
  }
}
