/* Our Story Section Component Styles */

.our-story-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: var(--Tertiary-40, #FBF3F2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Grid mouse effect canvas - behind content */
.our-story-section-grid {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.our-story-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 70% at 50% 45%, rgba(104, 1, 68, 0.08), rgba(251, 243, 242, 0) 70%);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.our-story-section.is-visible::before {
  opacity: 1;
  transform: scale(1);
}

.our-story-section-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.our-story-section-content {
  width: 684px;
  max-width: 100%;
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2rem;
  opacity: 0.3;
  transform: translateY(var(--story-y, 16px)) scale(var(--story-scale, 0.95));
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.our-story-section-content.revealed {
  opacity: 1;
  --story-y: 0px;
  --story-scale: 1;
}

/* Title Styles */
.our-story-section-title {
  width: 100%;
  text-align: left;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%; /* 25.2px */
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.our-story-section-title::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: 0.6rem;
  background: linear-gradient(90deg, rgba(104, 1, 68, 0.9), rgba(104, 1, 68, 0));
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Word-by-word reveal animation for title */
.our-story-section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.our-story-section-content.revealed .our-story-section-title {
  opacity: 1;
  transform: translateY(0);
}

.our-story-section-content.revealed .our-story-section-title::after {
  width: 90%;
}

.our-story-section-title .letter-title {
  display: inline-block;
  position: relative;
  transform: translateY(6px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.our-story-section-title .letter-title.revealed {
  transform: translateY(0);
  opacity: 1;
}

/* Description Styles */
.our-story-section-description {
  width: 100%;
  text-align: left;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%; /* 48px */
  letter-spacing: 0px;
}

/* Word-by-word reveal animation for description */
.our-story-section-description {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.our-story-section-content.revealed .our-story-section-description {
  opacity: 1;
  transform: translateY(0);
}

.our-story-section-description .letter-desc {
  display: inline-block;
  position: relative;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.our-story-section-description .letter-desc.revealed {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .our-story-section *,
  .our-story-section *::before,
  .our-story-section *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .our-story-section-content {
    width: 90%;
    max-width: 600px;
    gap: 1.5rem;
  }

  .our-story-section-title {
    font-size: 16px;
    letter-spacing: 0.8px;
  }

  .our-story-section-description {
    font-size: 32px;
    line-height: 120%; /* 38.4px */
    letter-spacing: -1.6px;
  }
}

@media (max-width: 768px) {
  .our-story-section-content {
    width: 90%;
    max-width: 100%;
    gap: 1.25rem;
    padding: 0 1rem;
  }

  .our-story-section-title {
    font-size: 14px;
    letter-spacing: 0.7px;
    line-height: 140%; /* 19.6px */
  }

  .our-story-section-description {
    font-size: 24px;
    line-height: 120%; /* 28.8px */
    letter-spacing: -1.2px;
  }
}

@media (max-width: 480px) {
  .our-story-section-container {
    padding: 1rem;
  }

  .our-story-section-content {
    width: 100%;
    gap: 1rem;
    padding: 0;
  }

  .our-story-section-title {
    font-size: 12px;
    letter-spacing: 0.6px;
    line-height: 140%; /* 16.8px */
  }

  .our-story-section-description {
    font-size: 20px;
    line-height: 120%; /* 24px */
    letter-spacing: -1px;
  }
}
