/* Hero Section */
.hero {
  position: relative;
  padding-top: calc(80px + var(--spacing-4xl)); /* Header height + spacing */
  padding-bottom: var(--spacing-4xl);
  margin: 0;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(233, 69, 96, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(243, 156, 18, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero__container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-3xl);
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  z-index: 1;
}

@media (min-width: 640px) {
  .hero__container {
    padding: 0 var(--spacing-lg);
  }
}

@media (min-width: 768px) {
  .hero__container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--spacing-4xl);
  }
}

@media (min-width: 1024px) {
  .hero__container {
    padding: 0 var(--spacing-xl);
  }
}

/* Content */
.hero__content {
  text-align: center;
  animation: slideInLeft 0.8s ease-out forwards;
  opacity: 0;
}

@media (min-width: 768px) {
  .hero__content {
    text-align: left;
  }
}

.hero__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  perspective: 1000px;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: var(--font-size-4xl);
  }
}

@media (min-width: 768px) {
  .hero__title {
    font-size: var(--font-size-5xl);
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: var(--font-size-6xl);
  }
}

/* Mobile line break for proper animation */
.mobile-break {
  display: inline;
}

@media (max-width: 768px) {
  .mobile-break {
    display: block;
  }
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
  max-width: 600px;
}

@media (min-width: 768px) {
  .hero__subtitle {
    font-size: var(--font-size-xl);
  }
}

/* CTA Buttons */
.hero__cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  align-items: center;
}

@media (min-width: 640px) {
  .hero__cta {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .hero__cta {
    justify-content: flex-start;
  }
}

.hero__btn {
  min-width: 200px;
  font-weight: var(--font-weight-semibold);
}

/* Visual */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: slideInRight 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero__image-placeholder {
  position: relative;
  width: 100%;
  max-width: 400px;
  /* height: 300px; */
  border-radius: 380px;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  transition: transform var(--transition-normal);
  background-color: #ffffff84;
}

.hero__image-placeholder:hover {
  transform: translateY(-10px) scale(1.02);
}

.hero__image-placeholder svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Floating Elements */
.hero__floating-element {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-accent-light),
    var(--color-accent)
  );
  opacity: 0.7;
  animation: float 6s ease-in-out infinite;
}

.hero__floating-element--1 {
  width: 60px;
  height: 60px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.hero__floating-element--2 {
  width: 40px;
  height: 40px;
  top: 70%;
  right: 15%;
  animation-delay: 2s;
}

.hero__floating-element--3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 5%;
  animation-delay: 4s;
}

@media (max-width: 767px) {
  .hero__floating-element {
    display: none;
  }
}

/* Stats or Features */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-3xl);
  padding-top: var(--spacing-2xl);
  border-top: 1px solid var(--border-primary);
}

.hero__stat {
  text-align: center;
  animation: fadeIn 1s ease-out 0.6s forwards;
  opacity: 0;
}

.hero__stat-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary);
  display: block;
  margin-bottom: var(--spacing-xs);
}

@media (min-width: 640px) {
  .hero__stat-number {
    font-size: var(--font-size-3xl);
  }
}

.hero__stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Scroll Indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
  animation: fadeIn 1s ease-out 1s forwards;
  opacity: 0;
}

.hero__scroll-indicator:hover {
  color: var(--color-secondary);
}

.hero__scroll-text {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-sm);
}

.hero__scroll-arrow {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
}

.hero__scroll-arrow::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}


@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  .hero {
    background: linear-gradient(
      135deg,
      var(--bg-dark) 0%,
      var(--bg-darker) 100%
    );
  }

  .hero__title {
    background: linear-gradient(
      135deg,
      var(--color-white) 0%,
      var(--color-accent) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .hero__content,
  .hero__visual,
  .hero__stat,
  .hero__scroll-indicator {
    animation: none;
    opacity: 1;
  }

  .hero__floating-element {
    animation: none;
  }

  .hero__scroll-arrow {
    animation: none;
  }

  .hero__image-placeholder:hover {
    transform: none;
  }
}

/* High Contrast */
@media (prefers-contrast: high) {
  .hero__title {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--text-primary);
  }

  .hero__floating-element {
    display: none;
  }
}

.hero__image {
  border-radius: 300px;
  filter: none;
}

.hero__image:hover {
  transform: scale(1.05);
  filter: invert(1);
}

/* Home page flip word - keep "Marketing" on one line */
.hero__flip-word {
  white-space: nowrap;
}

.hero__flip-word > .flip-container {
  margin-right: -2px;
}

/* Letter flip animation */
.flip-container {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  transition: width 0.3s ease-in-out;
}

.flip-container > .flip-letter {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-secondary) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  white-space: nowrap;
}

.flip-container > .flip-letter:first-child {
  opacity: 1;
  transform: scale(1);
}

.flip-container > .flip-letter:last-child {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: scale(0.8);
}

.flip-container.flipped > .flip-letter:first-child {
  opacity: 0;
  transform: scale(0.8);
}

.flip-container.flipped > .flip-letter:last-child {
  opacity: 1;
  transform: scale(1);
}
