/* ============================================
   Hero Section Styles
   Electric Products Landing Page
   ============================================ */

/* ==========================================
   Hero Section Container
   ========================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(33, 150, 243, 0.9) 0%,
    rgba(21, 101, 192, 0.95) 100%
  );
  z-index: 1;
}

/* ==========================================
   Hero Container Layout
   ========================================== */

.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
  padding-block: var(--space-20);
  position: relative;
  z-index: 1;
}

@media (width >= 768px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

@media (width >= 1024px) {
  .hero .container {
    gap: var(--space-20);
  }
}

/* ==========================================
   Hero Content Area
   ========================================== */

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 2rem;
  text-align: center;
  animation: fadeInUp 1s ease-out;
}

@media (width >= 768px) {
  .hero-content {
    gap: var(--space-8);
  }
}

/* ==========================================
   Hero Title
   ========================================== */

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  letter-spacing: -0.5px;
}

@media (width >= 640px) {
  .hero-title {
    font-size: var(--font-size-4xl);
  }
}

@media (width >= 1024px) {
  .hero-title {
    font-size: var(--font-size-5xl);
  }
}

/* Highlighted text in title */
.hero-title .highlight {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--color-primary-400) 0%,
    var(--color-accent-cyan) 50%,
    var(--color-primary-500) 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .highlight {
    animation: none;
    background-position: 0% 50%;
  }
}

/* ==========================================
   Hero Description
   ========================================== */

.hero-description {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-200);
  margin: 0;
  max-width: 36rem;
  text-wrap: pretty;
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  margin-bottom: 2.5rem;
  opacity: 0.95;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

@media (width >= 640px) {
  .hero-description {
    font-size: var(--font-size-md);
  }
}

@media (width >= 1024px) {
  .hero-description {
    font-size: var(--font-size-lg);
  }
}

/* ==========================================
   Hero Actions (CTA Buttons)
   ========================================== */

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

@media (width >= 640px) {
  .hero-cta {
    gap: var(--space-6);
    margin-top: var(--space-6);
  }
}

/* Primary CTA Button */
.hero-cta .btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  color: var(--color-white);
  background: #ffffff;
  color: #2196f3;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  overflow: hidden;
  isolation: isolate;
}

.hero-cta .btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--color-primary-500) 0%,
    var(--color-accent-cyan) 100%
  );
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  z-index: -1;
}

.hero-cta .btn-primary:hover {
  background: #f5f5f5;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta .btn-primary:hover::before {
  opacity: 1;
}

.hero-cta .btn-primary:active {
  transform: translateY(0);
}

.hero-cta .btn-primary:focus-visible {
  outline: 2px solid var(--color-primary-400);
  outline-offset: 2px;
}

@media (width >= 640px) {
  .hero-cta .btn-primary {
    padding: var(--space-5) var(--space-10);
    font-size: var(--font-size-md);
  }
}

/* Secondary CTA Button */
.hero-cta .btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  color: var(--color-white);
  background: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
  overflow: hidden;
  isolation: isolate;
}

.hero-cta .btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-white);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
  z-index: -1;
}

.hero-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero-cta .btn-secondary:hover::before {
  opacity: 1;
}

.hero-cta .btn-secondary:active {
  transform: translateY(0);
}

.hero-cta .btn-secondary:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

@media (width >= 640px) {
  .hero-cta .btn-secondary {
    padding: var(--space-5) var(--space-10);
    font-size: var(--font-size-md);
  }
}

/* ==========================================
   Hero Image Area
   ========================================== */

.hero-image {
  position: relative;
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

@media (width >= 768px) {
  .hero-image {
    max-width: none;
  }
}

/* Image styling */
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}

.hero-image:hover img {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .hero-image img {
    transition: none;
  }

  .hero-image:hover img {
    transform: none;
  }
}

/* Decorative glow effect */
.hero-image::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    var(--color-primary-500),
    var(--color-accent-cyan),
    var(--color-primary-600)
  );
  border-radius: var(--radius-2xl);
  opacity: 0.3;
  z-index: -1;
  filter: blur(20px);
}

/* ==========================================
   Responsive Adjustments
   ========================================== */

@media (width < 768px) {
  .hero {
    min-height: auto;
    padding-block: var(--space-16);
  }

  .hero-image {
    order: -1;
  }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
  .hero {
    min-height: auto;
    page-break-inside: avoid;
  }

  .hero::before,
  .hero::after {
    display: none;
  }

  .hero-cta {
    display: none;
  }

  .hero-title,
  .hero-description {
    color: black;
  }

  .hero-title .highlight {
    -webkit-text-fill-color: black;
    background: none;
  }
}

/* ==========================================
   High Contrast Mode
   ========================================== */

@media (prefers-contrast: high) {
  .hero::after {
    background: rgba(0, 0, 0, 0.9);
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    border-width: 3px;
  }
}

/* ==========================================
   Feature Flag Kill Switch
   ========================================== */

.hero[data-feature-flag="off"] {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 85vh;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 2rem;
  }

  .hero-cta .btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 75vh;
  }

  .hero-title {
    font-size: 1.75rem;
  }

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