/* ==========================================================================
   Homepage Styles - Hero Animations
   HSM Group Static Site
   ========================================================================== */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  height: var(--hero-height);
  min-height: 350px;
  background-color: var(--color-primary);
  display: flex;
  align-items: center;
  overflow: visible;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-primary);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  position: relative;
}

/* Hero Text */
.hero-text {
  flex: 0 0 50%;
  z-index: 2;
}

.hero-title {
  color: var(--color-white);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 0.95;
  margin: 0;
  text-transform: none;
  opacity: 1;
  transform: translateX(-100%);
  animation: slideTextIn 1s var(--easing-power3) 0.3s forwards;
}

.hero-line-1 {
  display: block;
}

.hero-line-2 {
  display: block;
  padding-left: 1.5em;
}

/* Hero Images - Layered Stack */
.hero-images {
  flex: 0 0 50%;
  position: relative;
  height: 350px;
  z-index: 250;
  overflow: visible;
}

.hero-img {
  position: absolute;
  width: auto;
  opacity: 0;
}

/* Back book 1 - New Jersey (left back) */
.hero-img-back-1 {
  height: 450px;
  left: -5%;
  top: -30px;
  z-index: 1;
  animation: riseFromBottom 0.7s var(--easing-power3) 1.3s forwards;
  --final-rotate: -5deg;
}

/* Back book 2 - Sarasota (right back) */
.hero-img-back-2 {
  height: 420px;
  right: -5%;
  top: -25px;
  z-index: 2;
  animation: riseFromBottom 0.7s var(--easing-power3) 1.4s forwards;
  --final-rotate: 8deg;
}

/* Front books - Palm Desert, Reno, Jupiter */
.hero-img-front {
  height: 320px;
  left: 45%;
  top: 30px;
  z-index: 3;
  animation: slideFromRight 1s var(--easing-power3) 0.3s forwards;
}

/* ==========================================================================
   Hero Animations
   ========================================================================== */

/* Text slides from left to right - starts off-screen, ends in final position */
@keyframes slideTextIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Front books slide in from right */
@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(50%);
  }
  to {
    opacity: 1;
    transform: translateX(-45%);
  }
}

/* Back books rise from bottom with rotation */
@keyframes riseFromBottom {
  from {
    opacity: 0;
    transform: translateY(150px) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--final-rotate, 0deg));
  }
}


/* ==========================================================================
   About Section
   ========================================================================== */

.about-section {
  background-color: var(--color-bg);
  position: relative;
  z-index: 300;
  text-align: center;
}

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

.about-heading {
  font-size: var(--font-size-3xl);
  color: var(--color-text);
  margin-bottom: var(--spacing-xl);
}

.about-text {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--spacing-md);
}

.about-badge {
  max-width: 180px;
  height: auto;
  margin: var(--spacing-xl) auto 0;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
  padding: var(--spacing-3xl) 0;
  background-color: var(--color-text);
  text-align: center;
}

.services-heading {
  font-size: var(--font-size-3xl);
  color: var(--color-white);
  margin-bottom: var(--spacing-2xl);
}

.services-section .services-grid {
  margin-bottom: var(--spacing-2xl);
}

.services-section .service-card {
  background-color: transparent;
  padding: var(--spacing-lg);
}

.services-section .service-card:hover {
  transform: none;
}

.services-section .service-icon {
  width: 100px;
  height: 100px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
}

.services-section .service-icon .fa {
  font-size: 40px;
  color: var(--color-primary);
}

.services-section .service-title {
  color: var(--color-white);
  font-size: var(--font-size-base);
  margin-bottom: 0;
}

.services-description {
  color: var(--color-white);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

/* Icon unicode values */
.fa-paint-brush::before { content: '\f1fc'; }
.fa-print::before { content: '\f02f'; }
.fa-desktop::before { content: '\f108'; }
.fa-bullhorn::before { content: '\f0a1'; }

/* ==========================================================================
   Staff Section
   ========================================================================== */

.staff-section {
  position: relative;
  min-height: 500px;
  padding: 140px 0 100px;
  background-image: url('../../images/office-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.staff-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.staff-section .container {
  position: relative;
  z-index: 1;
}

.staff-content {
  max-width: 100%;
}

.staff-heading {
  font-size: var(--font-size-3xl);
  color: var(--color-white);
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.staff-text {
  font-size: var(--font-size-base);
  line-height: 1.8;
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  background-color: var(--color-primary);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  overflow: hidden;
}

.cta-link {
  display: block;
  text-decoration: none;
  position: relative;
  height: 75px;
  overflow: hidden;
}

.cta-text {
  font-family: var(--font-heading-italic);
  font-style: italic;
  font-size: var(--font-size-4xl);
  color: var(--color-white);
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.cta-graphic {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(calc(-50% - 300px), -50%);
  transition: transform 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

.cta-graphic .fa {
  font-size: 60px;
  color: var(--color-white);
}

/* Animated state - triggered by hover */
.cta-link:hover .cta-text {
  transform: translate(calc(-50% + 300px), -50%);
  opacity: 0;
}

.cta-link:hover .cta-graphic {
  transform: translate(-50%, -50%);
  opacity: 1;
}

/* ==========================================================================
   Responsive Hero
   ========================================================================== */

@media (max-width: 1200px) {
  .hero-images {
    width: 480px;
    height: 320px;
  }

  .hero-img-back-1 {
    height: 420px;
  }

  .hero-img-back-2 {
    height: 390px;
  }

  .hero-img-front {
    height: 240px;
  }
}

@media (max-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }

  .hero-images {
    width: 400px;
    height: 280px;
  }

  .hero-img-back-1 {
    height: 330px;
  }

  .hero-img-back-2 {
    height: 300px;
  }

  .hero-img-front {
    height: 180px;
  }
}

@media (max-width: 979px) {
  .hero {
    height: auto;
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    margin-bottom: var(--spacing-xl);
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-images {
    width: 340px;
    height: 240px;
    margin: var(--spacing-lg) auto 0;
  }

  .hero-img-back-1 {
    height: 270px;
  }

  .hero-img-back-2 {
    height: 240px;
  }

  .hero-img-front {
    height: 140px;
    top: 40px;
  }

  /* About Section */
  .about-heading {
    font-size: var(--font-size-2xl);
  }

  /* Services Section */
  .services-heading {
    font-size: var(--font-size-2xl);
  }

  /* Staff Section */
  .staff-heading {
    font-size: var(--font-size-2xl);
  }

  .staff-content {
    max-width: 100%;
    text-align: center;
  }

  /* CTA Section */
  .cta-text {
    font-size: var(--font-size-3xl);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 28px;
  }

  .hero-images {
    width: 280px;
    height: 200px;
  }

  .hero-img-back-1 {
    height: 225px;
  }

  .hero-img-back-2 {
    height: 210px;
  }

  .hero-img-front {
    height: 120px;
    top: 35px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .hero-images {
    width: 240px;
    height: 170px;
  }

  .hero-img-back-1 {
    height: 180px;
  }

  .hero-img-back-2 {
    height: 165px;
  }

  .hero-img-front {
    height: 95px;
    top: 30px;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .hero-title {
    animation: none;
    opacity: 1;
    transform: translateX(0);
  }

  .hero-img-back-1 {
    animation: none;
    opacity: 1;
    transform: rotate(-12deg);
  }

  .hero-img-back-2 {
    animation: none;
    opacity: 1;
    transform: rotate(12deg);
  }

  .hero-img-front {
    animation: none;
    opacity: 1;
    transform: translateX(-55%);
  }
}
