/* © 2025 Spwig. All rights reserved. */

/**
 * Hero Element Styles
 *
 * Self-contained hero styles with hardcoded fallbacks.
 * Uses theme tokens when available but never resolves to nothing.
 */

/* ==========================================================================
   Core Hero Styles
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: var(--theme-element-hero-min-height, 400px);
    padding-top: var(--theme-element-hero-padding-y-mobile, var(--theme-space-12, 3rem));
    padding-bottom: var(--theme-element-hero-padding-y-mobile, var(--theme-space-12, 3rem));
    background-color: var(--theme-element-hero-bg, var(--theme-color-primary, #2563eb));
    color: var(--theme-element-hero-text-color, var(--theme-color-text-inverse, #ffffff));
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero {
        padding-top: var(--theme-element-hero-padding-y, var(--theme-space-16, 4rem));
        padding-bottom: var(--theme-element-hero-padding-y, var(--theme-space-16, 4rem));
    }
}

.hero--gradient {
    background: linear-gradient(135deg, var(--theme-color-primary, #2563eb) 0%, var(--theme-color-primary-hover, #1d4ed8) 100%);
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero__title {
    font-size: var(--theme-element-hero-title-size-mobile, var(--theme-font-size-3xl, 1.875rem));
    font-weight: var(--theme-font-weight-bold, 700);
    line-height: var(--theme-line-height-tight, 1.25);
    margin-bottom: var(--theme-space-4, 1rem);
    color: var(--theme-element-hero-text-color, var(--theme-color-text-inverse, #ffffff));
}

@media (min-width: 768px) {
    .hero__title {
        font-size: var(--theme-element-hero-title-size, var(--theme-font-size-5xl, 3rem));
    }
}

.hero__subtitle {
    font-size: var(--theme-element-hero-subtitle-size-mobile, var(--theme-font-size-lg, 1.125rem));
    color: var(--theme-element-hero-subtitle-color, var(--theme-element-hero-text-color, var(--theme-color-text-inverse, #ffffff)));
    line-height: var(--theme-line-height-relaxed, 1.625);
    margin-bottom: var(--theme-space-6, 1.5rem);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--theme-space-4, 1rem);
}

.hero__image {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    display: none;
}

@media (min-width: 1024px) {
    .hero__image {
        display: block;
    }
}

/* ==========================================================================
   Supplemental Styles
   ========================================================================== */

/* Hero description */
.hero__description {
    font-size: var(--theme-font-size-base, 1rem);
    opacity: 0.85;
    margin-bottom: var(--theme-space-6, 1.5rem);
    line-height: var(--theme-line-height-relaxed, 1.625);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--theme-space-8, 2rem);
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator__icon {
    width: 1.5rem;
    height: 1.5rem;
    color: currentColor;
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Hover background override */
.hero[data-hover-bg]:hover {
    background: var(--hover-bg) !important;
    transition: background var(--theme-transition-duration-slow, 300ms) var(--theme-transition-easing-default, ease);
}

/* Print styles */
@media print {
    .scroll-indicator {
        display: none !important;
    }
}

/* Mobile: Hide scroll indicator, reduce typography, adjust padding */
@media (max-width: 767px) {
  .hero__title {
    font-size: var(--element-hero-title-size-mobile, clamp(1.5rem, 5vw, 2.5rem));
  }

  .hero__subtitle {
    font-size: var(--element-hero-subtitle-size-mobile, clamp(1rem, 3vw, 1.25rem));
  }

  .hero__description {
    font-size: var(--theme-font-size-sm, 0.875rem);
  }

  .scroll-indicator {
    display: none; /* Prevent overlap with content */
  }

  .hero {
    padding-top: var(--element-hero-padding-y-mobile, var(--theme-space-8, 2rem));
    padding-bottom: var(--element-hero-padding-y-mobile, var(--theme-space-8, 2rem));
  }
}
