/* ===========================================================
   home-hero.css
   Cinematic Full-Height Hero for Home Page
   -----------------------------------------------------------
   Matches the About page aesthetic: full viewport height,
   background image with vignette, content at bottom.
   =========================================================== */

.hero-home {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #050505;
}

.hero-home-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-home-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
  filter: brightness(0.75);
}

.hero-home:hover .hero-home-media img {
  transform: scale(1.01);
}

.hero-home-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.6) 70%, rgba(0,0,0,0.85) 100%);
}

.hero-home-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 6% 5rem;
  box-sizing: border-box;
  width: 100%;
}

.hero-home-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

.hero-home-title {
  font-size: clamp(2.35rem, 4.3vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  margin: 0 0 1.2rem;
  letter-spacing: -0.02em;
  width: fit-content;
  max-width: 100%;
  overflow: visible;
}

.hero-home-title .split-line {
  display: block;
  overflow: visible;
  white-space: nowrap;
  width: auto;
  max-width: 100%;
  margin-bottom: 0.15em;
  transform-origin: left center;
}

.hero-home-title .char {
  display: inline-block;
  opacity: 1;
  transform: translateY(0) rotate(0deg);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.9,.2,1);
}

.hero-home-title .char.space {
  width: 0.28em;
}

/* When JS is preparing the animation, hide chars immediately (no transition) */
.hero-home-title.animating .char {
  opacity: 0;
  transform: translateY(40px) rotate(4deg);
  transition: none !important;
}

/* When JS triggers the reveal, animate chars to visible */
.hero-home-title.revealed .char {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.9,.2,1);
}

.hero-home-title em {
  font-style: italic;
  color: #e8590c;
}

.hero-home-title em .char {
  color: #e8590c;
}

.hero-home-lead {
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  max-width: 62ch;
  margin-bottom: 1.4rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.4s forwards;
}

.hero-home-lead strong {
  color: rgba(255,255,255,0.95);
  font-weight: 700;
}

.hero-home-meta {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.6s forwards;
}

.hero-home-stat {
  display: flex;
  flex-direction: column;
}

.hero-home-stat strong {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hero-home-stat span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  margin-top: 0.25rem;
}

.hero-home-divider {
  width: 1px;
  height: 38px;
  background: rgba(255,255,255,0.18);
}

.hero-home-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.8s forwards;
}

.hero-home-scroll {
  position: absolute;
  right: 6%;
  bottom: 4rem;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.48);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-home-scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(232,89,12,0.25);
  position: relative;
  overflow: hidden;
}

.hero-home-scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #e8590c;
  animation: scrollLineDown 2s cubic-bezier(0.16,1,0.3,1) infinite;
}

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

@keyframes scrollLineDown {
  0% { transform: translateY(-100%); }
  70%, 100% { transform: translateY(100%); }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-home-tag,
  .hero-home-lead,
  .hero-home-meta,
  .hero-home-cta {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .hero-home-title .char {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .hero-home-scroll-line::after {
    animation: none;
  }
  
  .hero-home-media img {
    transition: none;
  }
}

@media (max-width: 900px) {
  .hero-home { height: 85vh; min-height: 580px; }
  .hero-home-content { padding: 0 5% 3.5rem; }
  .hero-home-title { margin-bottom: 1rem; line-height: 1.05; }
  .hero-home-lead { margin-bottom: 1.2rem; }
  .hero-home-meta { gap: 1.5rem; margin-bottom: 1.5rem; }
  .hero-home-scroll { display: none; }
}

@media (max-width: 768px) {
  .hero-home-content { padding: 0 4.5% 3.5rem; }
  .hero-home-title { font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.05; }
  .hero-home-meta { gap: 1.2rem; margin-top: 1rem; }
  .hero-home-stat strong { font-size: 1.5rem; }
}

@media (max-width: 640px) {
  .hero-home { height: auto; min-height: 100vh; }
  .hero-home-content { padding: 0 4% 3rem; }
  .hero-home-tag { margin-bottom: 1rem; font-size: 0.68rem; }
  .hero-home-title { margin-bottom: 1rem; line-height: 1.1; }
  .hero-home-title .split-line { margin-bottom: 0.12em; }
  .hero-home-lead { font-size: 0.92rem; margin-bottom: 1rem; line-height: 1.65; max-width: 100%; }
  .hero-home-meta { gap: 1.2rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
  .hero-home-stat strong { font-size: 1.6rem; }
  .hero-home-stat span { font-size: 0.64rem; }
  .hero-home-divider { height: 30px; }
  .hero-home-cta { flex-direction: column; align-items: stretch; gap: 0.8rem; }
  .hero-home-cta .btn-accent { width: 100%; justify-content: center; font-size: 0.9rem; padding: 0.85rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero-home-content { padding: 0 3.5% 2.5rem; }
  .hero-home-tag { font-size: 0.65rem; margin-bottom: 0.9rem; }
  .hero-home-title { margin-bottom: 0.9rem; line-height: 1.15; }
  .hero-home-title .split-line { margin-bottom: 0.1em; }
  .hero-home-lead { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.9rem; }
  .hero-home-meta { gap: 1rem; margin-bottom: 1rem; }
  .hero-home-stat strong { font-size: 1.5rem; }
  .hero-home-stat span { font-size: 0.62rem; letter-spacing: 0.08em; }
  .hero-home-divider { height: 28px; }
  .hero-home-cta { gap: 0.7rem; }
  .hero-home-cta .btn-accent { font-size: 0.88rem; padding: 0.8rem 1.2rem; }
}

@media (max-width: 380px) {
  .hero-home-content { padding: 0 3% 2.5rem; }
  .hero-home-title { line-height: 1.2; }
  .hero-home-meta { gap: 1rem; flex-direction: column; align-items: flex-start; }
  .hero-home-stat { flex-direction: row; align-items: baseline; gap: 0.4rem; }
  .hero-home-stat span { margin-top: 0; }
  .hero-home-divider { display: none; }
  .hero-home-lead { font-size: 0.85rem; }
}
