/**
 * QUALIA Website Template CSS
 * Shared styles for all pages - single source of truth
 * Last Updated: 2026-01-18
 */

:root {
  --gold: #c9a227;
  --gold-light: #e6d490;
  --navy: #0a1628;
  --navy-light: #1a2d4a;
  --white: #ffffff;
  --gray: #86868b;
  --rose: #ec4899;
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--white);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Logo */
.site-logo {
  position: fixed;
  top: 20px;
  left: 30px;
  z-index: 1001;
  width: 120px;
  height: auto;
  transition: all 0.3s;
}

.site-logo img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.site-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* Navigation */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 50px;
  padding: 12px 28px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
}

nav.scrolled { 
  background: rgba(10, 22, 40, 0.95); 
  box-shadow: 0 10px 40px rgba(0,0,0,0.3); 
}

.nav-container { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 25px; 
}

.nav-logo { 
  color: var(--gold-light); 
  font-size: 18px; 
  font-weight: 600; 
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.nav-logo:hover {
  color: var(--gold);
  transform: scale(1.05);
}

.nav-links { 
  display: flex; 
  gap: 25px; 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}

.nav-links > li > a { 
  color: var(--white); 
  text-decoration: none; 
  font-size: 13px; 
  font-weight: 500; 
  opacity: 0.8; 
  transition: all 0.3s; 
}

.nav-links > li > a:hover, 
.nav-links > li > a.active { 
  opacity: 1; 
  color: var(--gold); 
}

/* Dropdown */
.nav-item { 
  position: relative; 
}

.dropdown { 
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(10, 22, 40, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  z-index: 1002;
  flex-direction: column;
  gap: 10px;
  /* Bridge the gap for smooth mouse movement */
  padding-top: 16px;
  margin-top: -4px;
}

/* Invisible bridge to keep dropdown open when moving mouse */
.dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}

.nav-item:hover .dropdown,
.nav-item.active .dropdown,
.dropdown:hover {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Keep dropdown open when hovering over the bridge or dropdown itself */
.nav-item:hover .dropdown::before,
.nav-item.active .dropdown::before,
.dropdown:hover::before {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px 25px;
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  position: relative;
  z-index: 10;
  pointer-events: all;
  cursor: pointer;
}

.dropdown a:hover {
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold-light);
  padding-left: 30px;
}

.dropdown-view-all {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  padding-bottom: 12px !important;
  font-weight: 700 !important;
  color: var(--gold) !important;
}

/* Animated Background - CRITICAL - Never Remove! */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient-1, .bg-gradient-2, .bg-gradient-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float1 20s ease-in-out infinite;
}

.bg-gradient-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  top: -200px;
  right: -200px;
}

.bg-gradient-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--gold-light) 0%, rgba(230, 212, 144, 0.5) 100%);
  bottom: -150px;
  left: -150px;
  animation: float2 25s ease-in-out infinite;
}

.bg-gradient-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.3) 0%, rgba(230, 212, 144, 0.2) 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-glow 8s ease-in-out infinite;
}

.bg-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(201, 162, 39, 0.6);
  border-radius: 50%;
  animation: particle-float 15s infinite ease-in-out;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(100px, 150px) scale(1.1); }
  66% { transform: translate(-50px, 100px) scale(0.9); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-150px, -100px) scale(1.2); }
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.6; }
}

@keyframes particle-float {
  0% { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) translateX(100px) rotate(360deg); opacity: 0; }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 80px;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 1000px;
  z-index: 1;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--gray);
  margin-bottom: 30px;
  font-weight: 400;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.product-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 20px 60px rgba(201, 162, 39, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.product-card-image {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.2) 0%, rgba(10, 22, 40, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover .product-card-image img {
  transform: scale(1.1);
}

.product-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(10, 22, 40, 0.3) 100%);
}

.product-card-content {
  padding: 30px;
}

.product-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 15px;
  font-weight: 600;
}

.product-card p {
  color: var(--gray);
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 20px;
}

.product-card a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.product-card a:hover {
  color: var(--gold-light);
  gap: 12px;
}

.product-card a::after {
  content: '→';
  transition: transform 0.3s;
}

.product-card a:hover::after {
  transform: translateX(4px);
}

/* Section Header */
.section-header {
  text-align: center;
  margin: 80px auto 60px;
  max-width: 800px;
  padding: 0 20px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--gold-light);
  margin-bottom: 20px;
  font-weight: 700;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--gray);
  line-height: 1.8;
}

/* Shop Button */
.shop-now-btn {
  display: inline-block;
  background: linear-gradient(135deg, #c9a227 0%, #e6d490 100%);
  color: #0a1628;
  padding: 15px 35px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 20px 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}

.shop-now-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}

.shop-now-btn:active {
  transform: scale(0.98);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1002;
  background: rgba(10, 22, 40, 0.85);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 40, 0.98);
  z-index: 1001;
  padding: 100px 40px 40px;
  overflow-y: auto;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 15px 0;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu .dropdown-links {
  padding-left: 20px;
}

.mobile-menu .dropdown-links a {
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn { 
    display: flex !important; 
  }

  nav .nav-links { 
    display: none !important; 
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
    margin: 60px auto;
  }

  .product-card-image {
    height: 220px;
  }

  .site-logo {
    width: 100px;
    top: 15px;
    left: 20px;
  }
}

@media (min-width: 769px) {
  nav .nav-links { 
    display: flex !important; 
  }
}

/* ============================================
   PRODUCT PAGE SPECIFIC STYLES
   ============================================ */

/* Science Section */
.science-section {
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.science-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.science-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 35px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.science-card:hover {
  transform: translateY(-5px);
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.2);
}

.science-card h3 {
  font-size: 1.4rem;
  color: var(--gold-light);
  margin-bottom: 15px;
  font-weight: 600;
}

.science-card p {
  color: var(--gray);
  line-height: 1.8;
  font-size: 1rem;
}

/* Ingredients Section */
.ingredients-section {
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.ingredients-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.ingredient-item {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--gold);
  padding: 25px;
  border-radius: 10px;
}

.ingredient-item h4 {
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.ingredient-item .japanese-name {
  font-size: 0.9rem;
  color: var(--gray);
  font-style: italic;
  margin-bottom: 10px;
}

.ingredient-item p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Clinical Evidence */
.clinical-section {
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.clinical-evidence {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 50px;
  margin: 50px 0;
}

.clinical-evidence h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 30px;
  text-align: center;
}

.clinical-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(236, 72, 153, 0.1);
  border-radius: 15px;
}

.stat-item .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 5px;
}

.stat-item .label {
  font-size: 0.9rem;
  color: var(--gray);
}

/* How to Use */
.how-to-use {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(201, 162, 39, 0.05) 100%);
  border-radius: 20px;
  padding: 50px;
  text-align: center;
  margin: 50px auto;
  max-width: 1000px;
}

.how-to-use h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 25px;
}

.how-to-use p {
  font-size: 1.2rem;
  color: var(--white);
  line-height: 1.8;
  margin-bottom: 20px;
}

.how-to-use ol {
  text-align: left;
  max-width: 600px;
  margin: 30px auto;
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 2;
}

/* Pricing Section */
.pricing-section {
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.3);
  border-radius: 20px;
  padding: 50px;
  margin: 50px auto;
  text-align: center;
  max-width: 1000px;
}

.pricing-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 30px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 800px;
  margin: 30px auto 0;
}

.pricing-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  padding: 30px;
}

.pricing-card h4 {
  color: var(--gold);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.pricing-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.pricing-card .note {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Multi-Layer Section */
.multi-layer-section {
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.multi-layer {
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.3);
  border-radius: 20px;
  padding: 50px;
  margin: 50px 0;
}

.multi-layer h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 40px;
  text-align: center;
}

.layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.layer-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
}

.layer-item h4 {
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 15px;
}

.layer-item p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Synergy Section */
.synergy-section {
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.synergy-analogy {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: 50px;
  margin: 50px 0;
}

.synergy-analogy h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 40px;
  text-align: center;
}

.synergy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.synergy-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
}

.synergy-item .icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.synergy-item h4 {
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-bottom: 15px;
}

.synergy-item p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* System Section */
.system-section {
  max-width: 1400px;
  margin: 80px auto;
  padding: 0 40px;
}

.system-explanation {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 50px;
  margin: 50px 0;
}

.system-explanation h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 30px;
}

.system-explanation p {
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

/* Footer */
footer {
  background: rgba(10, 22, 40, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px 20px;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
  margin-top: 80px;
}

/* Content Section */
.content-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
}

.content-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 30px;
  text-align: center;
}

.content-section p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray);
  margin-bottom: 20px;
}

/* Specs Grid (for AQUA SEED+ONE) */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 800px;
  margin: 50px auto;
}

.spec-card {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
}

.spec-card h3 {
  color: #3b82f6;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.spec-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 5px;
}

.spec-card .label {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Responsive for product pages */
@media (max-width: 768px) {
  .science-section,
  .ingredients-section,
  .clinical-section,
  .multi-layer-section,
  .synergy-section,
  .system-section {
    padding: 0 20px;
  }

  .science-grid,
  .ingredients-list {
    grid-template-columns: 1fr;
  }

  .clinical-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
