/* ==========================================================================
   AGRIM SOLAR — CINEMATIC TYPOGRAPHIC HERO WITH ANIMATED SOLAR CAPSULE
   Inspired by contemporary minimalist editorial design (e.g. WILD reference)
   Adapted natively for AGRIM SOLAR's engineering & clean-energy visual identity.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Section Root & Canvas Atmosphere
   -------------------------------------------------------------------------- */
.cinematic-hero-section {
  position: relative;
  width: 100%;
  background: #F8FAFC;
  background: linear-gradient(180deg, #F9FBFC 0%, #F5F7FA 50%, #EEF2F6 100%);
  color: #071724;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 75px 0 60px 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Mid-Page Dedicated Showcase Spacing & Subtle Border Accents */
.cinematic-midpage-showcase {
  min-height: auto;
  padding: 85px 0 65px 0;
  margin: 0;
  border-top: 1px solid rgba(10, 88, 152, 0.08);
  border-bottom: 1px solid rgba(10, 88, 152, 0.08);
}

/* Ambient Radial Lighting Glow */
.cinematic-hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 1400px;
  height: 480px;
  background: radial-gradient(ellipse 60% 45% at 50% 10%, rgba(16, 185, 129, 0.08) 0%, rgba(10, 88, 152, 0.05) 45%, transparent 75%);
  pointer-events: none;
  z-index: 1;
}

/* Subtle Architectural Solar Flow Lines (Faint Vector Background) */
.hero-vector-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: 
    radial-gradient(circle at 50% 45%, #0A5898 1px, transparent 1px),
    linear-gradient(to right, rgba(10, 88, 152, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 88, 152, 0.08) 1px, transparent 1px);
  background-size: 48px 48px, 96px 96px, 96px 96px;
  background-position: center center;
}

.cinematic-hero-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 48px);
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   2. Eyebrow Category Pill
   -------------------------------------------------------------------------- */
.hero-eyebrow-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(12px, 2vh, 24px);
}

.hero-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #065F46;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-eyebrow-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.hero-pill-live-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseLiveGreen 2.2s infinite ease-in-out;
}

@keyframes pulseLiveGreen {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08);
  }
}

/* --------------------------------------------------------------------------
   3. Core Typographic Stage: AGRIM [CAPSULE] SOLAR
   -------------------------------------------------------------------------- */
.cinematic-typo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 38px);
  width: 100%;
  margin: auto 0;
  padding: clamp(10px, 2vh, 32px) 0;
  position: relative;
  user-select: none;
}

/* Oversized 5-Letter Brand Typography */
.brand-word {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(3.8rem, 8.8vw, 10.2rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: #071724;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

.word-agrim {
  text-align: right;
}

.word-solar {
  text-align: left;
}

/* --------------------------------------------------------------------------
   4. The Center Animated Morphing Solar Capsule
   -------------------------------------------------------------------------- */
.capsule-container {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  cursor: pointer;
  background: #0A192F;
  box-shadow: 
    0 18px 45px -10px rgba(10, 88, 152, 0.25),
    0 8px 20px -6px rgba(7, 23, 36, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.8),
    0 0 0 4px rgba(10, 88, 152, 0.12);
  
  /* Smooth fluid morph transition */
  transition: 
    width 1.15s cubic-bezier(0.77, 0, 0.175, 1), 
    height 1.15s cubic-bezier(0.77, 0, 0.175, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

/* State 1: Wide Horizontal Capsule */
.capsule-container.morph-horizontal {
  width: clamp(210px, 21vw, 340px);
  height: clamp(86px, 8.4vw, 134px);
}

/* State 2: Tall Vertical Capsule (Punches through typographic centerline) */
.capsule-container.morph-vertical {
  width: clamp(118px, 11vw, 175px);
  height: clamp(200px, 19.5vw, 310px);
}

/* Interactive Hover Lift */
.capsule-container:hover {
  transform: scale(1.025);
  box-shadow: 
    0 24px 55px -8px rgba(10, 88, 152, 0.35),
    0 12px 28px -6px rgba(16, 185, 129, 0.25),
    0 0 0 2px rgba(255, 255, 255, 1),
    0 0 0 5px rgba(16, 185, 129, 0.35);
}

.capsule-container:active {
  transform: scale(0.985);
}

/* Inner Frame */
.capsule-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

/* Slide Items */
.capsule-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.08);
  transition: 
    opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    transform 1.15s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.capsule-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  pointer-events: auto;
}

/* High-Quality Image Display */
.capsule-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Clean Editorial Glass Sheen */
.capsule-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg, 
    rgba(255, 255, 255, 0.25) 0%, 
    rgba(255, 255, 255, 0.05) 40%, 
    transparent 60%, 
    rgba(10, 88, 152, 0.15) 100%
  );
  pointer-events: none;
  z-index: 5;
  mix-blend-mode: overlay;
}

/* Live Operational Tag Pill inside Capsule */
.capsule-tag {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 23, 36, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: clamp(0.6rem, 0.72vw, 0.72rem);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.capsule-tag-dot {
  width: 6px;
  height: 6px;
  background: #34D399;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.3);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   5. Lower Hero Content Bar (Supporting Copy, Scroll Cue & Dual CTAs)
   -------------------------------------------------------------------------- */
.cinematic-hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
  width: 100%;
  padding-top: clamp(16px, 2.5vh, 32px);
  border-top: 1px solid rgba(10, 88, 152, 0.08);
  box-sizing: border-box;
}

/* Left Subtext Block */
.hero-subtext-block {
  text-align: left;
}

.hero-subtext-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.02rem, 1.35vw, 1.25rem);
  font-weight: 700;
  color: #071724;
  line-height: 1.3;
  margin: 0 0 4px 0;
}

.hero-subtext-desc {
  font-size: clamp(0.85rem, 1.05vw, 0.94rem);
  color: #475569;
  line-height: 1.45;
  margin: 0;
  max-width: 420px;
}

/* Center Scroll Cue */
.hero-scroll-cue {
  display: flex;
  justify-content: center;
  align-items: center;
}

.scroll-cue-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #64748B;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.25s ease, transform 0.25s ease;
  padding: 6px 12px;
  border-radius: 20px;
}

.scroll-cue-link:hover {
  color: #0A5898;
  transform: translateY(2px);
}

.scroll-cue-icon {
  font-size: 0.82rem;
  animation: bounceCue 2s infinite ease-in-out;
}

@keyframes bounceCue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Right Action Buttons Block */
.hero-actions-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Primary CTA Button */
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #071724;
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.88rem, 1.05vw, 0.98rem);
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(7, 23, 36, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.hero-btn-primary:hover {
  background: #0A5898;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 88, 152, 0.28);
}

.hero-btn-primary i {
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}

.hero-btn-primary:hover i {
  transform: translateX(4px);
}

/* Secondary CTA Button */
.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  color: #071724 !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.88rem, 1.05vw, 0.98rem);
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid #CBD5E1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.hero-btn-secondary:hover {
  background: #F0FDF4;
  border-color: #10B981;
  color: #065F46 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.15);
}

/* --------------------------------------------------------------------------
   6. Responsive Layout Breakpoints
   -------------------------------------------------------------------------- */

/* Tablet (768px – 1024px) */
@media (max-width: 1024px) {
  .cinematic-typo-stage {
    gap: clamp(10px, 1.8vw, 22px);
  }

  .brand-word {
    font-size: clamp(3.2rem, 7.8vw, 6.5rem);
  }

  .capsule-container.morph-horizontal {
    width: clamp(170px, 18vw, 240px);
    height: clamp(74px, 7.5vw, 100px);
  }

  .capsule-container.morph-vertical {
    width: clamp(100px, 10vw, 135px);
    height: clamp(160px, 16.5vw, 220px);
  }

  .cinematic-hero-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .hero-scroll-cue {
    display: none;
  }
}

/* Mobile & Small Tablets (< 768px) */
@media (max-width: 767px) {
  .cinematic-hero-section {
    min-height: auto;
    padding: 24px 0 32px 0;
  }

  /* Redesigned Clean Stacked Composition on Mobile */
  .cinematic-typo-stage {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0 24px 0;
  }

  .brand-word {
    font-size: clamp(3.6rem, 16vw, 5.2rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-align: center;
  }

  /* Centered Morphing Capsule between AGRIM and SOLAR */
  .capsule-container.morph-horizontal {
    width: 220px;
    height: 96px;
  }

  .capsule-container.morph-vertical {
    width: 135px;
    height: 200px;
  }

  .cinematic-hero-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
    padding-top: 24px;
  }

  .hero-subtext-block {
    text-align: center;
  }

  .hero-subtext-desc {
    max-width: 100%;
  }

  .hero-scroll-cue {
    display: none;
  }

  .hero-actions-block {
    justify-content: center;
    width: 100%;
    gap: 10px;
  }

  .hero-btn-primary, 
  .hero-btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
  }
}

/* Extra small mobile (< 380px) */
@media (max-width: 380px) {
  .brand-word {
    font-size: 3.2rem;
  }

  .capsule-container.morph-horizontal {
    width: 190px;
    height: 85px;
  }

  .capsule-container.morph-vertical {
    width: 115px;
    height: 170px;
  }
}

/* --------------------------------------------------------------------------
   7. Accessibility: Prefers-Reduced-Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .capsule-container,
  .brand-word,
  .hero-eyebrow-pill,
  .hero-btn-primary,
  .hero-btn-secondary,
  .hero-pill-live-dot,
  .scroll-cue-icon {
    transition: none !important;
    animation: none !important;
  }

  .capsule-container.morph-horizontal,
  .capsule-container.morph-vertical {
    width: 240px !important;
    height: 105px !important;
  }

  .capsule-slide {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }
}
