/* Font declarations */
@font-face {
  font-family: "Factoria";
  src: url("../assets/fonts/FactoriaBold.woff2") format("woff2"),
    url("../assets/fonts/FactoriaBold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* Smooth scrolling for a polished feel */
html {
  scroll-behavior: smooth;
}

/* Font utility classes */
.font-factoria {
  font-family: "Factoria", Arial, sans-serif;
}

.font-playfair {
  font-family: "Playfair Display", Georgia, serif;
}

.font-montserrat {
  font-family: "Montserrat", Arial, sans-serif;
}

/* Base text styles */
body {
  font-family: "Montserrat", Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Factoria", Arial, sans-serif;
  font-weight: bold;
}

/* Navigation and button styles */
nav a,
.hero-cta,
.features .feature-content a {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
}

/* Modern button hover effects */
button,
a[class*="btn"],
a[class*="rounded-full"],
.hero-cta,
.features .feature-content a,
.store-showcase a {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Button hover - lift effect with shadow */
button:hover,
a[class*="rounded-full"]:hover,
.hero-cta:hover,
.features .feature-content a:hover,
.store-showcase a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Button active press effect */
button:active,
a[class*="rounded-full"]:active,
.hero-cta:active {
  transform: translateY(0);
}

/* Hero video overlay fade-out animation */
.hero-video-fade-out {
  transition: opacity 2.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0 !important;
  pointer-events: none;
}

/* Shop Now button attention animation */
@keyframes attention-jiggle {
  0%,
  100% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.08) rotate(-2deg);
  }
  20% {
    transform: scale(0.98) rotate(2deg);
  }
  30% {
    transform: scale(1.1) rotate(-3deg);
  }
  40% {
    transform: scale(0.97) rotate(2deg);
  }
  50% {
    transform: scale(1.08) rotate(-2deg);
  }
  60% {
    transform: scale(1.02) rotate(1deg);
  }
  70% {
    transform: scale(1.05) rotate(-1deg);
  }
  80% {
    transform: scale(1) rotate(0deg);
  }
}
.animate-attention-jiggle {
  animation: attention-jiggle 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

/* White button text visibility on hover */
.bg-white:hover {
  color: #000 !important;
}

.nav-shadow {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Styles */
#mobile-menu-btn span {
  display: block;
}

#mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

#mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

#mobile-menu {
  overflow: hidden;
}

.underline-hover:hover {
  text-decoration: underline;
  border-bottom: 2px solid #f7a600;
}
.carousel-item {
  height: 50vh;
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .carousel-item {
    height: 70vh;
  }
}

@media (min-width: 768px) {
  .carousel-item {
    height: 90vh;
  }
}
.hover-fill:hover svg {
  fill: #f7a600;
}

/* Manifesto / About section styles */
.about-manifesto {
  width: 100%;
  margin: 6rem 0;
  padding: 0;
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.6;
  text-align: center;
  display: flex;
  min-height: 12rem;
  align-items: center;
  justify-content: center;
}

.manifesto-content {
  width: 100%;
}

.about-manifesto .manifesto-title {
  font-weight: 900;
  text-transform: uppercase;
  margin: 0;
  font-size: 2.25rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center; /* Center the text spans horizontally */
  width: 100%; /* Take full width */
}

.about-manifesto .manifesto-body {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Scroll Reveal Animation */
.reveal-text {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
  display: block;
}

.reveal-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Show primary text immediately */
.reveal-text.primary {
  opacity: 1;
  transform: translateY(0);
}

/* Other parts remain hidden until scroll */
.reveal-text.secondary,
.reveal-text.tertiary {
  transition-delay: 0.2s;
}

/* Smooth animation keyframes for alive feel */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

/* Toast Notification Styles */
.toast {
  animation: slideInRight 0.3s ease forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.3s ease;
}

/* Smooth hover effects for buttons and links */
button,
a,
.hover-fill {
  transition: all 0.3s ease;
}

/* Make product cards animate on hover */
.about-manifesto .manifesto-title-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 2rem; /* Match divider padding */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* centralized paragraph spacing inside manifesto */
.about-manifesto .manifesto-body p {
  margin: 0 0 0.75rem 0;
}

/* Logo sizing in the nav (desktop larger, mobile smaller) */
.logo-img {
  height: 72px; /* slightly larger for better visibility */
  transition: height 200ms ease;
}
@media (max-width: 768px) {
  .logo-img {
    height: 52px;
  }
}

/* Navbar scrolled state: reduce padding and add a subtle shadow */
#site-nav {
  top: 0;
  transition: padding 180ms ease, box-shadow 180ms ease,
    background-color 180ms ease, transform 240ms ease;
  z-index: 40;
}
#site-nav.scrolled {
  padding-top: 6px;
  padding-bottom: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  background-color: rgba(255, 255, 255, 0.98);
}

/* Hide nav on scroll down, reveal on scroll up */
#site-nav {
  transition: transform 0.3s ease-in-out;
}

#site-nav.nav-hidden {
  transform: translateY(-120%);
}

/* Filter bar - sticky positioning with scroll hide behavior */
section[class*="sticky"] {
  transition: transform 0.3s ease-in-out;
  will-change: transform;
}

section[class*="sticky"].nav-hidden {
  transform: translateY(-100%);
}

/* Make media inside slides fill the carousel-item height */
.carousel-item .carousel-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Prefer showing the upper part of the image (faces often sit in top third) */
  object-position: center 18%;
}

/* Ensure videos play properly on all devices */
video.carousel-media {
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* Hero section text responsiveness */
section > div > div > div h1 {
  line-height: 1.2;
}

@media (max-width: 640px) {
  section > div > div > div h1 {
    font-size: 1.75rem;
    letter-spacing: 0.02em;
  }
}

/* Add consistent spacing between sections */
.carousel {
  margin-bottom: 6rem; /* increased space above first divider */
}

.about-manifesto {
  margin: 6rem 0; /* equal space above and below */
}

.features {
  margin-top: 6rem; /* equal space below second divider */
  padding-bottom: 6rem;
}

/* Scroll Reveal Base */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-in only effect - no movement, just opacity */
.scroll-reveal-reverse {
  opacity: 0;
  transform: none;
  transition: opacity 1.2s ease;
}

.scroll-reveal-reverse.visible {
  opacity: 1;
  transform: none;
}

/* Inspiration Section */
.inspiration-section {
  position: relative;
  background-color: #000;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 6rem 0;
  padding: 4rem 0;
}

.inspiration-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 45%;
  opacity: 0;
  /* use GPU compositing and 3D transform to avoid subpixel seam artifacts */
  transform: translateZ(0) translateX(50px);
  transition: opacity 1s ease, transform 1s ease;
  /* Layer a subtle dark gradient over the left edge of the image to mask any light halo/outline
     that may remain from anti-aliased PNG edges. The gradient sits on top of the image. */
  background-image: linear-gradient(
      to left,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0) 20%
    ),
    url("../assets/imgs/serena-bg.png");
  background-size: cover, cover;
  background-position: right center, center;
  background-repeat: no-repeat, no-repeat;
  background-clip: padding-box;
  will-change: transform, opacity;
  mix-blend-mode: normal;
}

.inspiration-bg.visible {
  opacity: 0.7;
  transform: translateX(0);
}

.inspiration-content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1rem; /* minimal gap between text and image */
}

.inspiration-text {
  flex: 0 1 auto;
  max-width: 600px;
  color: #fff;
  padding: 4rem 0;
}

.inspiration-text h2 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 2rem;
  font-weight: 600;
}

.inspiration-text p {
  font-size: 1.5rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* Inspiration image sits on the right next to text */
.inspiration-img {
  flex: 0 1 auto;
  width: auto;
  height: 100%;
  max-height: 60vh;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(0) translateX(20px);
  transition: opacity 900ms ease, transform 900ms ease;
}

.inspiration-img.visible {
  opacity: 0.98;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .inspiration-section::before {
    width: 100%;
    opacity: 0.3;
  }

  .inspiration-content {
    flex-direction: column;
    gap: 1rem;
  }

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

  .inspiration-text h2 {
    font-size: 2.5rem;
  }

  .inspiration-text p {
    font-size: 1.25rem;
  }

  .inspiration-img {
    width: 100%;
    max-height: none;
  }
}

/* Section Dividers */
.section-divider {
  padding: 0 2rem; /* removed vertical padding, using margins for spacing */
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider-line {
  position: relative;
  width: 100%;
  height: 3px;
  background-color: #000;
}

.divider-line::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: #000;
  border-radius: 50%;
}

/* carousel dots styling */
.carousel-dots span {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background-color: #e5e7eb; /* gray-200 */
  cursor: pointer;
  transition: background-color 160ms ease;
}
.carousel-dots span.active {
  background-color: #f97316; /* orange-500 */
}

/* Carousel controls: prev/next buttons */
.carousel-prev,
.carousel-next {
  z-index: 30;
}

@media (max-width: 640px) {
  .carousel-prev,
  .carousel-next {
    left: auto;
    right: auto;
    width: 40px;
    height: 40px;
    padding: 8px !important;
  }

  .carousel-prev {
    left: 4px;
  }

  .carousel-next {
    right: 4px;
  }

  .carousel-prev svg,
  .carousel-next svg {
    width: 24px;
    height: 24px;
  }
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(249, 115, 22, 0.95) !important;
}

.carousel-prev:hover svg,
.carousel-next:hover svg {
  color: white;
  fill: white;
}

/* Hero CTA primary buttons on slides */
.hero-cta {
  position: relative;
  z-index: 25; /* above overlay but below controls */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  border: 2px solid transparent;
}
.hero-cta:hover,
.hero-cta:focus {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

/* Pulsating animation for feature images */
@keyframes imagePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
}

/* Features: alternating image/text rows */
.feature-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  animation: imagePulse 3s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.feature-img:hover {
  transform: scale(1.02);
  animation: none;
}

.features .feature-content h3 {
  font-family: "Factoria", Arial, sans-serif;
  font-weight: bold;
}

.features .feature-content p {
  max-width: 28rem;
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.7;
}

/* Right-aligned feature content */
.md\:text-right .scroll-reveal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.md\:text-right .scroll-reveal h3,
.md\:text-right .scroll-reveal p {
  text-align: right;
  margin-left: auto;
  width: 100%;
}

/* Feature scroll reveal animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .md\:text-right .scroll-reveal {
    transform: translateX(30px);
  }
  .md\:text-left .scroll-reveal {
    transform: translateX(-30px);
  }
  .scroll-reveal.visible {
    transform: translateX(0);
  }
}

/* Store Showcase Section */
.store-showcase {
  background: #fff;
  padding: 0;
  margin: 6rem 0;
}

/* Carousel wrapper with controls */
.store-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Carousel container with hidden overflow */
.store-carousel {
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
}

/* Grid that scrolls horizontally */
.store-grid {
  display: flex;
  gap: 1.5rem;
  scroll-behavior: smooth;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0; /* extra space for scroll thumb if visible */
}

/* Hide scrollbar but keep scrolling functional */
.store-grid::-webkit-scrollbar {
  display: none;
}
.store-grid {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Product card in carousel - shows 3 at a time on desktop */
.product-card {
  flex: 0 0 calc(33.333% - 1rem);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
  transition: transform 280ms ease;
}

.product-card:hover {
  transform: scale(1.02);
}

.product-media {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #e5e5e5;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

/* Product label overlay at bottom */
.product-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem 1.5rem 1.5rem;
  color: #fff;
}

.product-title {
  font-family: "Factoria", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  color: #fff;
}

/* Carousel controls */
.store-carousel-control {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
  z-index: 10;
}

.store-carousel-control:hover {
  background: #000;
  color: #fff;
  border-color: #000;
  transform: scale(1.1);
}

.store-carousel-control svg {
  width: 20px;
  height: 20px;
}

.store-carousel-control.prev {
  order: -1;
}

/* Responsive: 2 columns on tablet */
@media (max-width: 1024px) {
  .product-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* Responsive: 1 column on mobile, full width */
@media (max-width: 768px) {
  .store-carousel-wrapper {
    gap: 0.75rem;
  }

  .store-grid {
    gap: 1rem;
  }

  .product-card {
    flex: 0 0 100%;
  }

  .store-carousel-control {
    width: 36px;
    height: 36px;
  }

  .store-carousel-control svg {
    width: 18px;
    height: 18px;
  }

  .product-label {
    padding: 1.5rem 1rem 1rem;
  }

  .product-title {
    font-size: 0.95rem;
  }
}

/* Product Grid Container */
.grid {
  align-items: stretch;
}

/* Product Card Container - Consistent sizing */
.group {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* Product Image Container */
.group > div:first-child {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 1;
}

/* Product Info Container */
.group > .space-y-2 {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.75rem 0;
}

/* Product Title */
.group h4 {
  line-height: 1.3;
  min-height: 2.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Description */
.group p {
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product Image Handling - Consistent display regardless of source aspect ratio */
.group img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  backface-visibility: hidden;
}

/* Keyframe for an attention-grabbing jiggle animation */
@keyframes attention-jiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Class to apply the jiggle animation */
.animate-attention-jiggle {
  animation: attention-jiggle 0.8s ease-in-out forwards;
}
