@import url('https://fonts.cdnfonts.com/css/montserrat-alternates');

/* ========================================
   KANJI ANIMATIONS
   ======================================== */
.kanji {
  transition:
    opacity 1.5s cubic-bezier(0.4,0,0.2,1),
    transform 1.5s cubic-bezier(0.4,0,0.2,1),
    filter 1.5s cubic-bezier(0.4,0,0.2,1);
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.kanji.dissolve {
  opacity: 0;
  transform: translateY(-40px);
  filter: blur(8px);
  pointer-events: none;
}

/* ========================================
   LOGO AND TITLE STYLES
   ======================================== */
.logo-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 60px;
}

.quality-panel .sei-logo {
  transition:
    top 2.0s cubic-bezier(0.4,0,0.2,1),
    width 1.5s cubic-bezier(0.4,0,0.2,1),
    left 1.5s cubic-bezier(0.4,0,0.2,1);
  position: absolute;
  left: 50%;
  top: 180px;
  width: 140px;
  transform: translateX(-20%);
}

.home-sei-logo.slide-up {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.3s cubic-bezier(0.4,0,0.2,1),
    visibility 0s 0.1s;
}

.main-title {
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 2.2rem;
  color: #361375;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ========================================
   TAG LINE ANIMATIONS
   ======================================== */
.tag-line1,
.tag-line2 {
  transition:
    opacity 1.5s cubic-bezier(0.4,0,0.2,1),
    transform 0.5s cubic-bezier(0.4,0,0.2,1);
  opacity: 1;
  transform: translateY(0);
}

.tag-line1.dissolve,
.tag-line2.dissolve {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
}

/* ========================================
   QUALITY PANEL MAIN CONTAINER
   ======================================== */
.quality-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: 
    opacity 3.5s cubic-bezier(0.4,0,0.2,1),
    filter 0.6s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  filter: blur(0px);
}

.quality-panel.active {
  opacity: 1;
  filter: blur(0px);
  pointer-events: auto;
}

.quality-panel.fast-out {
  transition: opacity 0s !important, filter 0.6s cubic-bezier(0.4,0,0.2,1) !important;
  filter: blur(12px);
}

/* ========================================
   STICKY HEADER
   ======================================== */
.quality-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 30vh;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
  padding-bottom: 40px;
}

.quality-sticky-logo {
  width: 110px;
  height: auto;
  animation: pulse-logo 2.2s infinite;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.4,0,0.2,1);
  opacity: 1;
  margin-bottom: 15px;
}

.quality-sticky-logo.fade-out {
  opacity: 0;
  pointer-events: none;
}

@keyframes pulse-logo {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

.quality-panel h3 {
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 2.4rem;
  color: #361375;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
  padding-bottom: 30px;
}

/* ========================================
   CONTENT AREA
   ======================================== */
.quality-content {
  position: fixed;
  top: 20vh;
  left: 0;
  width: 100vw;
  height: calc(100vh - 20vh - 15vh);
  z-index: 2000;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  pointer-events: auto;
}

/* Custom scrollbar styling */
.quality-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 255, 232, 0.79) transparent;
}

/* Webkit scrollbar styling for Chrome/Safari/Edge */
.quality-content::-webkit-scrollbar {
  width: 8px;
}

.quality-content::-webkit-scrollbar-track {
  background: transparent;
}

.quality-content::-webkit-scrollbar-thumb {
  background: rgba(148, 255, 232, 0.79);
  border-radius: 4px;
}

.quality-content::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 255, 232, 1);
}

.quality-content-inner {
  max-width: 650px;
  width: 100%;
  padding: 20px 24px;
  box-sizing: border-box;
  text-align: center;
}

.quality-panel p {
  font-family: 'Montserrat Alternates', sans-serif;
  color: #361375;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ========================================
   ICONS CONTAINERS
   ======================================== */
/* Desktop Icons - Single Row Layout */
.quality-icons-desktop {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 15vh;
  z-index: 2001;
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  background: transparent;
  pointer-events: none;
  padding-top: 40px;
}

/* Mobile Icons - Grid Layout */
.quality-icons-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 15vh;
  z-index: 2001;
  display: none;
  background: transparent;
  pointer-events: none;
  padding-top: 40px;
}

/* Hide legacy class to prevent conflicts */
.quality-icons {
  display: none !important;
}

/* Base icon styles */
.quality-icons img {
  width: auto;
  height: 35px;
  object-fit: contain;
}

/* ========================================
   BACKGROUND CONTAINER
   ======================================== */
.quality-panel-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #59baff, #7ee5f0, #94ffe8);
  z-index: -1;
}

/* ========================================
   MOBILE STYLES (≤600px)
   ======================================== */
@media (max-width: 600px) { 
  .quality-panel {
    height: 100vh;
    height: 100dvh;
    height: calc(100vh - 120px);
  }
  
  .quality-sticky-header {
    height: 20vh; /* Reduced from 35vh to reduce header size */
    height: 20dvh;
    height: calc(30vh - 36px);
    padding-bottom: 2vh; /* Reduced padding */
    padding-top: 1vh; /* Reduced padding */
  }
  
  .quality-sticky-logo {
    width: 80px;
    margin-bottom: 5vh;
    margin-top: 0;
  }
  
  .quality-panel h3 {
    font-size: 1.6rem;
    text-align: left;
    padding-bottom: 1vh;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .quality-content {
    top: 22vh; /* Reduced from 30vh to bring content closer to header */
    top: 22dvh;
    height: calc(100vh - 22vh - 20vh); /* Adjusted height calculation */
    height: calc(100dvh - 22dvh - 20dvh);
    height: calc(100vh - 22vh - 20vh - 120px);
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    position: fixed;
  }
  
  .quality-content-inner {
    padding: 9px 20px 60px 20px; /* Reduced bottom padding to bring icons higher */
    box-sizing: border-box;
    min-height: 120vh;
  }
  
  .quality-panel p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-left: 55px;
    padding-right: 20px;
    text-align: left;
  }
  
  /* Show mobile icons, hide desktop icons */
  .quality-icons-mobile {
    display: grid !important;
    height: 15vh !important;
    height: 15dvh !important;
    height: calc(15vh - 18px) !important;
    padding-top: 5px !important;
    padding-bottom: 20px !important; /* Reduced bottom padding to move icons higher */
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 0.5fr 0.5fr !important;
    gap: 7px 10px !important;
    align-items: center !important;
    justify-items: center !important;
    padding-left: 50px !important;
    padding-right: 50px !important;
    overflow: hidden !important;
  }
  
  .quality-icons-desktop {
    display: none !important;
  }
  
  /* Grid layout helpers */
  .icon-row {
    display: contents !important;
  }
  
  .icon-row img {
    display: inline-block !important;
    flex-shrink: 0 !important;
  }
  
  /* Grid positioning */
  .quality-icons-mobile img:nth-child(1),
  .quality-icons-mobile img:nth-child(3) {
    justify-self: end !important;
    margin-right: 20px !important;
  }
  
  .quality-icons-mobile img:nth-child(2),
  .quality-icons-mobile img:nth-child(4) {
    justify-self: start !important;
    margin-left: 20px !important;
  }
  
  /* Mobile image replacements */
  .quality-icons-mobile img[src*="quality_cold pressed.png"] {
    content: url("../images/quality_cold-pressed-m.png") !important;
  }
  
  .quality-icons-mobile img[src*="quality_wildharvested.png"] {
    content: url("../images/quality_wildharvested-m.png") !important;
  }
  
  .quality-icons-mobile img {
    height: 35px !important;
    width: auto !important;
    object-fit: contain !important;
  }
  
  /* Background */
  .quality-panel-bg {
    height: 100vh;
    height: 100dvh;
    height: 100vh;
  }
}



/* ========================================
   DESKTOP STYLES (≥601px)
   ======================================== */
@media (min-width: 601px) {
  .quality-icons-desktop {
    display: flex !important;
  }
  
  .quality-icons-mobile {
    display: none !important;
  }
  
  .quality-icons-desktop img {
    height: 35px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }
  

}

/* ========================================
   LANDSCAPE STYLES (≤900px landscape)
   ======================================== */
@media (max-width: 900px) and (orientation: landscape) {
  .quality-sticky-header {
    height: 30vh;
    height: 30dvh;
    height: calc(30vh - 36px);
    padding-bottom: 6vh;
    padding-top: 6vh;
  }
  
  .quality-sticky-logo {
    width: 60px;
    margin-bottom: 3vh;
    margin-top: 0;
  }
  
  .quality-panel h3 {
    font-size: 1.4rem;
    padding-bottom: 2vh;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .quality-content {
    top: 25vh;
    top: 25dvh;
    height: calc(100vh - 25vh - 15vh);
    height: calc(100dvh - 25dvh - 15dvh);
    height: calc(100vh - 25vh - 15vh);
  }
  
  .quality-content-inner {
    padding: 10px 20px 60px 20px;
  }
  
  .quality-panel p {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    padding-left: 40px;
    padding-right: 15px;
  }
  
  .quality-icons-mobile {
    height: 15vh !important;
    height: 15dvh !important;
    height: calc(15vh - 18px) !important;
    padding-top: 8px !important;
    padding-bottom: 20px !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5rem !important;
    padding-left: 80px !important;
    padding-right: 80px !important;
  }
  
  .quality-icons-mobile img {
    height: 35px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }
  
  .quality-panel-bg {
    height: 100vh;
    height: 100dvh;
    height: 100vh;
  }
}

