@import url('variables.css');

/* New Hero Section Styles */

.hero-new {
  position: relative;
  color: var(--neutral-100);
  min-height: 75vh;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.45s ease-in-out;
  opacity: 0;
}

.hero-bg-image[x-cloak] {
  opacity: 0;
}

.hero-bg-image[x-show] {
  opacity: 1;
}

.hero-bg-web {
  background-image: linear-gradient(rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.8)), url('../images/carousel/02.jpg');
}

.hero-bg-cloud {
  background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.8)), url('../images/carousel/01.jpg');
}

.hero-bg-support {
  background-image: linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.8)), url('../images/carousel/03.jpg');
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.45), transparent 58%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.70));
  z-index: -1;
  pointer-events: none;
}

.min-vh-75 {
  min-height: 75vh;
}

/* Hero Content */
.hero-content {
  z-index: 1;
  position: relative;
  min-height: 450px;
}

.hero-panel {
  will-change: opacity;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.hero-tabs,
.hero-progress {
  position: relative;
  z-index: 10;
}

.hero-headline {
  font-weight: 700;
  line-height: 1.15;
  color: var(--neutral-100);
  text-shadow: 0 8px 30px rgba(11, 18, 31, 0.35);
}

.hero-subtext {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 38ch;
  opacity: 0;
  /* Start hidden, animations will reveal */
}

.hero-cta {
  font-weight: 600;
  padding: 0.9rem 2.1rem;
  border-radius: 0.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.3);
  opacity: 0;
  /* Start hidden, animations will reveal */
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.35);
}

.hero-word {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  opacity: 0;
  /* Start hidden, animations will reveal */
}

.hero-text {
  opacity: 0;
  /* Start hidden, animations will reveal */
}

.hero-covered {
  background: linear-gradient(90deg,
      #ffffff 0%,
      #ffffff 50%,
      var(--secondary-400) 50%,
      var(--secondary-400) 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-word-launch {
  color: var(--primary-300);
}

.hero-word-grow {
  color: var(--secondary-400);
  margin-left: 0;
}

.hero-word-evolve {
  color: var(--tertiary-500);
  margin-left: 0;
}

.hero-word-online {
  margin-left: 0;
}

/* Rotating Word Container - Block display for 3-line layout */
.hero-rotating-word-container {
  position: relative;
  min-height: 1.15em;
  /* Maintain height for line */
}

.hero-rotating-word {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
}

/* Tab Navigation */

.hero-tabs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-tab-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tab-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.hero-tab-btn.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.hero-tab-btn i {
  font-size: 1.1rem;
}

/* Progress Indicators */

.hero-progress {
  display: flex;
  justify-content: flex-start;
}

.progress-dots {
  display: flex;
  gap: 0.5rem;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: #ffffff;
  width: 24px;
  border-radius: 4px;
}

/* Play/Pause Button */

.hero-play-pause-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-play-pause-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.hero-play-pause-btn i {
  font-size: 12px;
  margin-left: 2px;
  /* Slight offset for play icon */
}

.hero-play-pause-btn i.fa-pause {
  margin-left: 0;
  /* Center pause icon */
}

/* Circular Progress Indicator */

.hero-timer-progress {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
  color: rgba(255, 255, 255, 0.3);
}

.progress-ring-circle {
  transition: stroke-dashoffset 1s linear;
  stroke: rgba(255, 255, 255, 0.8);
}

.progress-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 1;
  will-change: opacity;
  width: 100%;
}

.hero-graphic {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-panel {
  animation: fadeIn 0.5s ease-in-out;
}

.visual-panel img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Rocket Animation Styles */

.rocket-container {
  position: relative;
  width: 400px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rocket-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

/* Lottie Animation Containers */
.lottie-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.lottie-container-mobile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.lottie-container svg,
.lottie-container-mobile svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mobile Lottie Animation */
.hero-visual-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Smaller mobile screens */
@media (max-width: 575px) {
  .hero-new {
    padding: 1.5rem 0;
  }

  .lottie-container-mobile {
    width: 100%;
  }

  .hero-visual-mobile {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

.rocket-body,
.rocket-fins,
.rocket-flame,
.rocket-stars,
.rocket-glow {
  transform-origin: center;
  will-change: transform, opacity;
}

.rocket-flame {
  animation: flicker 0.15s infinite alternate;
}

/* Flame flicker animation - only affects inner flame opacity */
.rocket-flame path {
  animation: flicker 0.15s infinite alternate;
}

@keyframes flicker {
  0% {
    opacity: 0.8;
  }

  100% {
    opacity: 0.6;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* Alpine.js Transitions */
[x-cloak] {
  display: none !important;
}

/* Phone Responsiveness (xs/sm only) */
@media (max-width: 767px) {
  .hero-new {
    min-height: auto;
    padding: 2rem 0;
  }

  .min-vh-75 {
    min-height: auto;
    padding-top: 0 !important;
    padding-bottom: 2rem !important;
  }

  .hero-content {
    min-height: 280px;
  }

  .hero-headline {
    font-size: 2.55rem;
    line-height: 1.1;
    margin-top: 0;
    min-height: 8.4rem;
    /* Fixed height for 3 lines (2.55rem * 1.1 * 3) */
  }

  .hero-subtext {
    font-size: 1.1rem;
    margin-bottom: 1rem !important;
  }

  .hero-cta {
    margin-bottom: 0;
  }

  .hero-panel {
    padding-bottom: 0;
  }

  .hero-tabs {
    justify-content: center;
  }

  .hero-tab-btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
  }

  .hero-progress {
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .hero-headline {
    font-size: 2rem;
    line-height: 1.1;
    margin-top: 0;
    min-height: 6.6rem;
    /* Fixed height for 3 lines (2rem * 1.1 * 3) */
  }

  .hero-subtext {
    font-size: 1rem;
  }

  .hero-tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }

  .hero-tab-btn span {
    display: none;
  }

  .hero-tab-btn i {
    margin: 0;
    font-size: 1.25rem;
  }

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

/* Accessibility */
.hero-tab-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .hero-new {
    background: #1e293b;
    color: #000;
  }

  .hero-tabs,
  .hero-progress {
    display: none;
  }
}