/* ==== HERO ==== */
.hero {
  position: relative;
  height: 90vh;
  overflow: hidden;
  padding-top: 70px; /* prevent nav overlap */
}

.hero video,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  object-fit: cover; /* default for video */
}

.hero img {
  object-fit: cover;
  width: 100%;
  height: auto;   /* keep aspect ratio */
  max-height: 100%;
}

/* Contact Button */
.contact-btn {
  z-index: 111;
  position: absolute;
  bottom: 40px;
  right: 40px;
  padding: 14px 34px;
  background: linear-gradient(45deg, #00faff, #00d4ff, #008cff);
  color: #000;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(0,255,255,0.8);
  animation: pulse 2s infinite;
  font-size: 1rem;
}
@keyframes pulse {
  50% { box-shadow: 0 0 30px rgba(0,255,255,1); }
}

/* ==== SCROLLY ==== */
.scrolly { padding: 80px 20px; }
.container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 120px;
}
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  transition: all .8s ease;
}
.step.show { opacity: 1; transform: translateY(0); }
.step:nth-child(even){ direction: rtl; }
.step:nth-child(even) .copy{ direction: ltr; }
.step video {
  width: 100%;
  height: 420px;
  border-radius: 12px;
  object-fit: cover;
}

/* ==== MODAL ==== */
.modal {
  position: fixed;
  bottom: -100%;
  right: 40px;
  width: 320px;
  max-width: 90%;
  background: #111;
  border-radius: 16px;
  transition: bottom .5s ease;
  z-index: 2000;
  padding: 25px 20px;
}
.modal.show { bottom: 100px; }
.modal h2 { color: var(--neon); margin-bottom: 15px; text-align: center; font-size: 1.2rem; }
.modal input,.modal textarea{
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  margin-bottom: 12px; background: #222; color: #fff;
  font-size: 0.9rem;
}
.submit-btn { background: var(--neon); border: none; padding: 12px; width: 100%; font-weight: bold; border-radius: 8px; cursor: pointer; }
.close-btn { position: absolute; top: 10px; right: 15px; font-size: 20px; cursor: pointer; color: var(--neon); }

/* ==== Comeback message ==== */
.comeback-message {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  z-index: 20;
  background-color: #000;
}
.comeback-message.show {
  opacity: 1;
  display: flex; /* Made it a flex container */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.hero video.hidden { opacity: 0; pointer-events: none; transition: opacity .6s; }

/* ========================= */
/* RESPONSIVE BREAKPOINTS    */
/* ========================= */

/* Tablets & foldable screens */
@media(max-width: 1200px) {
  .container { gap: 80px; }
  .step video { height: 360px; }
  .contact-btn { padding: 12px 28px; font-size: 0.95rem; }
}

/* iPads, small tablets */
@media(max-width: 768px) {
  .step { grid-template-columns: 1fr; gap: 25px; }
  .step:nth-child(even){ direction: ltr; }
  .step video { height: 300px; }
  .contact-btn {
    bottom: 25px; right: 25px;
    padding: 12px 26px; font-size: 0.9rem;
  }
  .modal { width: 280px; padding: 20px; }
}

/* iPhones & very small devices */
@media(max-width: 480px) {
  .hero { height: 80vh; }
  .step video { height: 220px; }
  .contact-btn {
    bottom: 20px; right: 20px;
    padding: 10px 22px;
    font-size: 0.85rem;
  }
  .modal { width: 90%; right: 5%; bottom: -100%; }
  .modal.show { bottom: 60px; }
  .modal h2 { font-size: 1rem; }
}

/* Hero image fallback */
.hero img {
  object-fit: cover;   /* desktop: fill nicely */
}

/* Mobile: show full image and fill the space */
@media (max-width: 768px) {
  .hero img {
    object-fit: cover; /* Changed from 'contain' to 'cover' */
  }
}

/* When comeback message is active, show image full screen */
.comeback-message.show .comeback-image {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Changed from 'contain' to 'cover' */
  z-index: 2;
}

/* Mobile: show full image but not too tiny */
@media (max-width: 768px) {
  .comeback-message.show .comeback-image {
    object-fit: cover;  /* Changed from 'contain' to 'cover' */
    background: #000;
  }
}

.comeback-text {
  display: inline-block; /* The text will always be displayed now */
  position: relative; /* This makes z-index work */
  z-index: 3;
  color: #fff;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.5vw, 3rem);
  letter-spacing: normal;
  text-shadow: none;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 10px 20px;
  border-radius: 10px;
}
.comeback-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Mobile only */
@media (max-width: 768px) {
  .comeback-text {
    display: block;
    font-size: 1.2rem;
  }
}
