/**
 * Bengal SSG Default Theme
 * Hero & Page Header Components
 *
 * Large, attention-grabbing headers for landing pages
 * and prominent page introductions.
 */

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  padding-block: 3rem 4rem;
  /* Reduced top from 4rem to 3rem for tighter spacing beneath navbar */
  text-align: center;
  background: linear-gradient(135deg,
      var(--color-bg-elevated) 0%,
      var(--color-bg-secondary) 100%);
  border-block-end: 1px solid var(--color-border-light);
  /* Changed from border-bottom */
  overflow: hidden;

}

/* Scroll-driven fade-in for hero content */
.hero.fade-in-on-scroll {
  /* Will be animated by scroll-animations.css */
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg,
      var(--color-bg-primary) 0%,
      rgba(33, 150, 243, 0.05) 100%);
}

.hero__container {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding-inline: var(--space-4);
  /* Changed from 1.5rem (24px) to --space-4 (16px) for tighter horizontal spacing */
}

.hero__content {
  max-width: 800px;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  margin: 0 0 1rem 0;
  padding: 0.375rem 0.875rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background-color: rgba(33, 150, 243, 0.1);
  border-radius: var(--border-radius-full);
}

.hero__title {
  margin: 0 0 1.5rem 0;
  font-size: var(--type-display);
  font-weight: var(--weight-extrabold);
  line-height: var(--type-leading-heading);
  letter-spacing: var(--letter-spacing-tighter);
  color: var(--color-text-primary);

}

/* Scroll-driven slide-up animation */
.hero__title.slide-up-on-scroll {
  /* Will be animated by scroll-animations.css */
}

.hero__subtitle {
  margin: 0 0 2rem 0;
  font-size: var(--type-ui-subtitle);
  line-height: var(--type-leading-body);
  color: var(--color-text-secondary);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: var(--type-ui-button);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  border-radius: var(--border-radius-medium);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.hero__button--primary {
  color: var(--color-text-inverse);
  background-color: var(--color-primary);
  box-shadow: var(--elevation-card);
}

.hero__button--primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: var(--elevation-card-hover);
  transform: translateY(-2px);
}

.hero__button--secondary {
  color: var(--color-text-primary);
  background-color: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
}

.hero__button--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--elevation-low);
}

.hero__button svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   HERO VARIANTS
   ============================================ */

/* Large Hero */
.hero--large {
  padding: 6rem 0;
}

.hero--large .hero__title {
  font-size: clamp(3rem, 5vw, 5rem);
}

/* Compact Hero */
.hero--compact {
  padding: 2rem 0;
}

.hero--compact .hero__title {
  font-size: var(--text-3xl);
}

/* Left-aligned Hero */
.hero--left {
  text-align: left;
}

.hero--left .hero__actions {
  justify-content: flex-start;
}

/* ============================================
   PAGE HEADER (Smaller version)
   ============================================ */

.page-header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 2rem;
}

.page-header__eyebrow {
  display: inline-block;
  margin: 0 0 0.5rem 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-tertiary);
}

.page-header__title {
  margin: 0 0 0.75rem 0;
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  line-height: 1.2;
  letter-spacing: var(--letter-spacing-tighter);
  color: var(--color-text-primary);
}

.page-header__subtitle {
  margin: 0;
  font-size: var(--text-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: var(--text-sm);
  color: var(--color-text-tertiary);
}

.page-header__meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.page-header__meta-item svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   SECTION HEADER (for content sections)
   ============================================ */

.section-header {
  text-align: center;
  margin: 4rem 0 3rem 0;
}

.section-header__eyebrow {
  display: inline-block;
  margin: 0 0 1rem 0;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.section-header__title {
  margin: 0 0 1rem 0;
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  color: var(--color-text-primary);
}

.section-header__subtitle {
  margin: 0 auto;
  max-width: 600px;
  font-size: var(--text-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

/* Left-aligned section header */
.section-header--left {
  text-align: left;
}

.section-header--left .section-header__subtitle {
  margin: 0;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

/* Optional background pattern */
.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.05;
  background-image:
    radial-gradient(circle at 25% 25%, var(--color-primary) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, var(--color-secondary) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

[data-theme="dark"] .hero__background {
  opacity: 0.03;
}

/* ============================================
   ORGANIC BLOB BACKGROUND ANIMATION
   ============================================ */

/* Blob background variant - peaceful organic shapes */
.hero--blob-background {
  position: relative;
  overflow: hidden;
}

.hero--blob-background .hero__blobs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.hero--blob-background .hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(var(--color-blob-blur));
  opacity: var(--color-blob-opacity);
  mix-blend-mode: screen;
  will-change: transform;
}

/* Ensure content stays above blobs */
.hero--blob-background .hero__container {
  position: relative;
  z-index: 1;
}

/* Blob 1 - Top left */
.hero--blob-background .hero__blob--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-blob-1) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: heroBlobFloat1 5s ease-in-out infinite;
}

/* Blob 2 - Top right */
.hero--blob-background .hero__blob--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--color-blob-2) 0%, transparent 70%);
  top: -50px;
  right: -50px;
  animation: heroBlobFloat2 6s ease-in-out infinite;
}

/* Blob 3 - Bottom left */
.hero--blob-background .hero__blob--3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--color-blob-3) 0%, transparent 70%);
  bottom: -80px;
  left: 20%;
  animation: heroBlobFloat3 7s ease-in-out infinite;
}

/* Blob 4 - Bottom right */
.hero--blob-background .hero__blob--4 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--color-blob-4) 0%, transparent 70%);
  bottom: -60px;
  right: 15%;
  animation: heroBlobFloat4 5.5s ease-in-out infinite;
}

/* ============================================
   BLOB SIZE VARIANTS
   ============================================ */

/* Compact blob background - for smaller sections, cards, etc. */
.hero--blob-background--compact .hero__blob--1 {
  width: 120px;
  height: 120px;
  top: -40px;
  left: -40px;
  animation: heroBlobFloat1Compact 5s ease-in-out infinite;
}

.hero--blob-background--compact .hero__blob--2 {
  width: 100px;
  height: 100px;
  top: -20px;
  right: -20px;
  animation: heroBlobFloat2Compact 6s ease-in-out infinite;
}

.hero--blob-background--compact .hero__blob--3 {
  width: 110px;
  height: 110px;
  bottom: -30px;
  left: 20%;
  animation: heroBlobFloat3Compact 7s ease-in-out infinite;
}

.hero--blob-background--compact .hero__blob--4 {
  width: 90px;
  height: 90px;
  bottom: -25px;
  right: 15%;
  animation: heroBlobFloat4Compact 5.5s ease-in-out infinite;
}

/* Small blob background - for very small elements */
.hero--blob-background--small .hero__blob--1 {
  width: 60px;
  height: 60px;
  top: -20px;
  left: -20px;
  animation: heroBlobFloat1Small 5s ease-in-out infinite;
}

.hero--blob-background--small .hero__blob--2 {
  width: 50px;
  height: 50px;
  top: -10px;
  right: -10px;
  animation: heroBlobFloat2Small 6s ease-in-out infinite;
}

.hero--blob-background--small .hero__blob--3 {
  width: 55px;
  height: 55px;
  bottom: -15px;
  left: 20%;
  animation: heroBlobFloat3Small 7s ease-in-out infinite;
}

.hero--blob-background--small .hero__blob--4 {
  width: 45px;
  height: 45px;
  bottom: -12px;
  right: 15%;
  animation: heroBlobFloat4Small 5.5s ease-in-out infinite;
}

/* Blob animations - peaceful floating movements (faster and more noticeable) */
@keyframes heroBlobFloat1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(80px, -50px) scale(1.15);
  }

  50% {
    transform: translate(-50px, 80px) scale(0.85);
  }

  75% {
    transform: translate(60px, 50px) scale(1.1);
  }
}

@keyframes heroBlobFloat2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-90px, -60px) scale(1.2);
  }

  66% {
    transform: translate(70px, -80px) scale(0.8);
  }
}

@keyframes heroBlobFloat3 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  20% {
    transform: translate(60px, -80px) scale(1.25);
  }

  40% {
    transform: translate(-80px, 40px) scale(0.75);
  }

  60% {
    transform: translate(90px, 60px) scale(1.15);
  }

  80% {
    transform: translate(-40px, -50px) scale(0.9);
  }
}

@keyframes heroBlobFloat4 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  30% {
    transform: translate(-70px, 80px) scale(1.15);
  }

  60% {
    transform: translate(80px, -50px) scale(0.85);
  }
}

/* Compact blob animations - smaller movements */
@keyframes heroBlobFloat1Compact {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -20px) scale(1.15);
  }

  50% {
    transform: translate(-20px, 30px) scale(0.85);
  }

  75% {
    transform: translate(25px, 20px) scale(1.1);
  }
}

@keyframes heroBlobFloat2Compact {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-35px, -25px) scale(1.2);
  }

  66% {
    transform: translate(30px, -35px) scale(0.8);
  }
}

@keyframes heroBlobFloat3Compact {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  20% {
    transform: translate(25px, -30px) scale(1.25);
  }

  40% {
    transform: translate(-30px, 15px) scale(0.75);
  }

  60% {
    transform: translate(35px, 25px) scale(1.15);
  }

  80% {
    transform: translate(-15px, -20px) scale(0.9);
  }
}

@keyframes heroBlobFloat4Compact {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  30% {
    transform: translate(-30px, 35px) scale(1.15);
  }

  60% {
    transform: translate(35px, -20px) scale(0.85);
  }
}

/* Small blob animations - very small movements */
@keyframes heroBlobFloat1Small {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(15px, -10px) scale(1.15);
  }

  50% {
    transform: translate(-10px, 15px) scale(0.85);
  }

  75% {
    transform: translate(12px, 10px) scale(1.1);
  }
}

@keyframes heroBlobFloat2Small {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-18px, -12px) scale(1.2);
  }

  66% {
    transform: translate(15px, -18px) scale(0.8);
  }
}

@keyframes heroBlobFloat3Small {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  20% {
    transform: translate(12px, -15px) scale(1.25);
  }

  40% {
    transform: translate(-15px, 8px) scale(0.75);
  }

  60% {
    transform: translate(18px, 12px) scale(1.15);
  }

  80% {
    transform: translate(-8px, -10px) scale(0.9);
  }
}

@keyframes heroBlobFloat4Small {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  30% {
    transform: translate(-15px, 18px) scale(1.15);
  }

  60% {
    transform: translate(18px, -10px) scale(0.85);
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero--blob-background .hero__blob {
    animation: none;
  }
}

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

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__subtitle {
    font-size: var(--text-body);
  }

  .hero--large {
    padding: 4rem 0;
  }

  .hero--large .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__button {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 1.5rem 0;
  }

  .page-header__title {
    font-size: var(--text-2xl);
  }

  .section-header {
    margin: 3rem 0 2rem 0;
  }

  .section-header__title {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2rem 0;
  }

  .hero__title {
    font-size: var(--text-2xl);
  }

  .page-header__meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   PRINT
   ============================================ */

@media print {
  .hero {
    padding: 1rem 0;
    background: none;
    border: none;
  }

  .hero__actions {
    display: none;
  }

  .hero__background {
    display: none;
  }
}
