/* ============================================
   Right Direction CBD — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: #7B2D3B;
  color: #FAF7F6;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #FAF7F6;
}
::-webkit-scrollbar-thumb {
  background: #D4A0AB;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7B2D3B;
}

/* --- Navigation --- */
#navbar {
  background: rgba(250, 247, 246, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 160, 171, 0.2);
}

#navbar.scrolled {
  box-shadow: 0 1px 0 rgba(212, 160, 171, 0.15);
}

.nav-logo-mark {
  color: #7B2D3B;
  transition: color 0.3s ease;
}

.nav-logo-text {
  color: #7B2D3B;
  transition: color 0.3s ease;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #7B2D3B;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Mobile Menu --- */
.menu-line {
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

#mobile-menu.open .mobile-menu-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

/* --- Hero --- */
.hero-subtitle {
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.hero-title-line {
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(100%);
}

.hero-title-line:nth-child(1) { animation-delay: 0.1s; }
.hero-title-line:nth-child(2) { animation-delay: 0.2s; }
.hero-title-line:nth-child(3) { animation-delay: 0.3s; }
.hero-title-line:nth-child(4) { animation-delay: 0.4s; }
.hero-title-line:nth-child(5) { animation-delay: 0.5s; }

.hero-desc {
  animation: fadeIn 1s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta-primary {
  animation: fadeIn 1s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero-cta-secondary {
  animation: fadeIn 1s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.hero-image-wrapper {
  animation: slideInRight 1s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateX(40px);
}

.hero-image-frame {
  box-shadow: 24px 24px 0 rgba(123, 45, 59, 0.08);
  transition: box-shadow 0.5s ease;
}

.hero-image-frame:hover {
  box-shadow: 32px 32px 0 rgba(123, 45, 59, 0.12);
}

.hero-image {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-frame:hover .hero-image {
  transform: scale(1.03);
}

.hero-float-label {
  animation: floatUp 0.8s 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}

/* Scroll line animation */
.scroll-line-fill {
  animation: scrollDown 2s ease-in-out infinite;
}

/* --- Section Labels --- */
.section-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #D4A0AB;
  font-weight: 500;
}

/* --- Dividers --- */
.divider-line {
  transition: opacity 0.3s ease;
}

/* --- About Section --- */
.about-label { animation: fadeIn 0.8s ease forwards; }
.about-title { animation: fadeIn 0.8s 0.1s ease forwards; opacity: 0; }
.about-content { animation: fadeIn 0.8s 0.2s ease forwards; opacity: 0; }
.about-stats { animation: fadeIn 0.8s 0.3s ease forwards; opacity: 0; }
.about-images { animation: fadeIn 0.8s ease forwards; opacity: 0; }
.about-img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.about-img:hover {
  transform: scale(1.03);
}

/* --- Product Cards --- */
.product-card {
  position: relative;
  padding: 0;
  transition: transform 0.4s ease;
}

.product-card-img {
  position: relative;
  overflow: hidden;
}

.product-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(123, 45, 59, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.product-card-img-inner {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-card-arrow {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Philosophy --- */
.philosophy-label { animation: fadeIn 0.8s ease forwards; }
.philosophy-item {
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}
.philosophy-item:nth-child(1) { animation-delay: 0.1s; }
.philosophy-item:nth-child(2) { animation-delay: 0.2s; }
.philosophy-item:nth-child(3) { animation-delay: 0.3s; }

.philosophy-image {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.philosophy-image-wrapper:hover .philosophy-image {
  transform: scale(1.02);
}

/* --- Contact --- */
.contact-info-item {
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}
.contact-info-item:nth-child(1) { animation-delay: 0.1s; }
.contact-info-item:nth-child(2) { animation-delay: 0.15s; }
.contact-info-item:nth-child(3) { animation-delay: 0.2s; }

.contact-input {
  transition: border-color 0.3s ease;
}

.contact-input:focus {
  border-color: #7B2D3B !important;
}

.contact-submit {
  position: relative;
  overflow: hidden;
}

.contact-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.contact-submit:hover::before {
  left: 100%;
}

.contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Animations --- */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

@keyframes scrollDown {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* --- Responsive --- */
@media (max-width: 1023px) {
  .hero-title-line {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
}

@media (max-width: 767px) {
  .hero-image-frame {
    box-shadow: 12px 12px 0 rgba(123, 45, 59, 0.08);
  }
  
  .hero-float-label {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 1rem;
    display: inline-block;
  }
  
  .about-img-bottom {
    margin-top: 0 !important;
  }
}

@media (max-width: 639px) {
  .hero-title-line {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
}
