/* ==========================================================================
   Hero Section Styles
   ========================================================================== 
   
   Features:
   - Side-by-side layout (avatar left, quote right)
   - 260px blob-animated avatar with hover morph
   - 2rem italic EB Garamond quote
   - Status badge with semantic colors
   - Morph-fade animations for title/subtitle
   - Primary CTA buttons on 8px grid
   - Fully responsive
   
   ========================================================================== */

/* ==========================================================================
   HERO SECTION CONTAINER
   ========================================================================== */

.hero {
  min-height: calc(100vh - var(--nav-height, 80px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-8)) var(--space-4)
    var(--space-16);
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   HERO VISUALS WRAPPER (Avatar + Quote)
   ========================================================================== */

.hero__visuals {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-24);
  position: relative;
  z-index: 2;
}

.hero__initial {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  width: 100%;
  max-width: 900px;
}

/* ==========================================================================
   AVATAR WITH BLOB ANIMATION
   ========================================================================== */

.hero__avatar-wrapper {
  width: 320px; /* Increased from 260px */
  height: 320px;
  flex-shrink: 0;
  cursor: pointer;
  perspective: 1000px;
  position: relative;

  /* Reveal animation */
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 1s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero__avatar-wrapper.revealed {
  opacity: 1;
  transform: scale(1);
}

.hero__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid var(--color-tertiary);
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: hero-blob-morph 8s ease-in-out infinite;
  transition:
    border-radius 0.4s var(--ease-out),
    transform 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
  will-change: border-radius, transform;
  background: var(--color-surface);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.hero__avatar:hover {
  border-radius: 50%;
  transform: scale(1.01) rotate(1deg); /* Extremely subtle */
  border-color: var(--color-secondary);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
  animation-play-state: paused;
}

@keyframes hero-blob-morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    border-radius: 40% 60% 50% 50% / 40% 50% 60% 50%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  75% {
    border-radius: 50% 40% 60% 50% / 60% 40% 50% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

/* ==========================================================================
   QUOTE - EB Garamond Italic
   ========================================================================== */

.hero__quote {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  max-width: 500px;
  color: var(--color-text-secondary);
  line-height: 1.4;
  text-align: left;
  word-break: break-word;
  hyphens: auto;

  /* Reveal animation */
  opacity: 0;
  transform: translateX(20px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
  transition-delay: 0.3s;
}

.hero__quote.revealed {
  opacity: 1;
  transform: translateX(0);
}

.hero__quote::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-primary);
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: var(--space-1);
}

.hero__quote::after {
  content: '"';
  font-size: 3rem;
  color: var(--color-primary);
  line-height: 0;
  vertical-align: -0.4em;
  margin-left: var(--space-1);
}

/* ==========================================================================
   SCROLL HINT
   ========================================================================== */

.hero__scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  animation: hero-bounce 2s infinite;
}

.hero__scroll-hint.visible {
  opacity: 1;
}

.hero__scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero__scroll-hint svg {
  width: 20px;
  height: 20px;
}

@keyframes hero-bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(-3px);
  }
}

/* ==========================================================================
   HERO CONTENT (Badge, Title, Subtitle, CTAs)
   ========================================================================== */

.hero__content {
  max-width: 800px;
  width: 100%;
}

/* Morph-fade animation for content */
.hero__content > * {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}

.hero__content.visible > * {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Staggered animation delays */
.hero__content.visible .hero__badge {
  transition-delay: 0.1s;
}
.hero__content.visible .hero__title {
  transition-delay: 0.2s;
}
.hero__content.visible .hero__subtitle {
  transition-delay: 0.35s;
}
.hero__content.visible .hero__cta {
  transition-delay: 0.5s;
}

/* ==========================================================================
   STATUS BADGE
   ========================================================================== */

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-success-subtle);
  color: var(--color-secondary);
  border-radius: 9999px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6);
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  animation: hero-pulse 2s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* ==========================================================================
   HERO TITLE
   ========================================================================== */

.hero__title {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero__title-accent {
  color: var(--color-primary);
}

.hero__title-italic {
  font-style: italic;
  text-decoration: underline;
  text-decoration-color: var(--color-secondary);
  text-underline-offset: 4px;
}

.hero__title-dot {
  color: var(--color-tertiary);
  font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   HERO SUBTITLE
   ========================================================================== */

.hero__subtitle {
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  font-style: italic;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

.hero__subtitle strong {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   CTA BUTTONS
   ========================================================================== */

.hero__cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__cta .btn {
  padding: var(--space-3) var(--space-6);
  min-height: 48px; /* Touch target */
}

.hero__cta .btn svg {
  width: 18px;
  height: 18px;
}

/* Dark/Primary CTA */
.btn--hero-primary {
  background: var(--color-text);
  color: var(--color-bg);
  border: 2px solid var(--color-text);
}

.btn--hero-primary:hover:not(:disabled) {
  background: transparent;
  color: var(--color-text);
  transform: translateY(-2px);
}

/* Outline CTA */
.btn--hero-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--hero-secondary:hover:not(:disabled) {
  border-color: var(--color-text);
  background: var(--color-surface-secondary);
  transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 768px) {
  .hero {
    padding: var(--space-20) var(--space-4) var(--space-12);
    min-height: 0;
  }

  .hero__initial {
    flex-direction: column;
    gap: var(--space-6);
  }

  .hero__avatar-wrapper {
    width: 180px;
    height: 180px;
  }

  .hero__quote {
    text-align: center;
    font-size: 1.4rem;
    max-width: 100%;
  }

  .hero__quote::before,
  .hero__quote::after {
    font-size: 2rem;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero__subtitle {
    font-size: var(--font-size-sm);
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .hero__cta .btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .hero__avatar-wrapper {
    width: 140px;
    height: 140px;
  }

  .hero__title {
    font-size: 2.5rem; /* Fallback */
    font-size: clamp(2rem, 10vw, 2.5rem);
  }
}

@media (max-width: 360px) {
  .hero {
    padding: var(--space-12) var(--space-3) var(--space-8);
  }

  .hero__avatar-wrapper {
    width: 120px;
    height: 120px;
  }

  .hero__quote {
    font-size: 1.1rem;
  }

  .hero__quote::before,
  .hero__quote::after {
    font-size: 1.5rem;
  }

  .hero__title {
    font-size: clamp(1.5rem, 10vw, 2rem);
  }

  .hero__subtitle {
    font-size: var(--font-size-xs);
  }

  .hero__cta .btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-sm);
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .hero__avatar {
    animation: none;
  }

  .hero__scroll-hint {
    animation: none;
  }

  .hero__badge-dot {
    animation: none;
  }

  .hero__content > *,
  .hero__avatar-wrapper,
  .hero__quote {
    transition: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
