/* ========================================
   NearBear 尼贝熊猫 - Bootstrap 5 Custom Styles
   ======================================== */

/* CSS Variables */
:root {
  --brand-black: #0a0a0a;
  --brand-white: #ffffff;
  --brand-mint: #d3ffe0;
  --brand-sage: #a3b8a8;
  --brand-charcoal: #353535;
  --brand-navy: #003049;
  --canvas: #f9fafb;
  --surface: #e5e7eb;
  --hero-bg: #111111;
  --font-display: 'Cormorant Garamond', 'Noto Serif SC', serif;
  --font-body: 'Cormorant Garamond', 'Noto Serif SC', serif;
  --font-chinese: 'Noto Serif SC', serif;
  --font-chinese-util: 'Noto Sans SC', sans-serif;
}

/* Global - use native smooth scroll (no Lenis) */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--canvas);
  color: var(--brand-black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
  padding: 1.25rem 0;
  z-index: 1000;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
}

.nav-logo {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .nav-logo {
  transform: scale(1.1);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.05em;
}

.navbar-toggler {
  border-color: rgba(255,255,255,0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255,255,255,0.8) !important;
  letter-spacing: 0.03em;
  position: relative;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  width: 0;
  height: 1px;
  background: var(--brand-mint);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #fff !important;
}

.nav-link:hover::after {
  width: calc(100% - 2rem);
}

#langToggle {
  font-family: var(--font-chinese-util);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.9);
  transition: all 0.3s ease;
}

#langToggle:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  background: rgba(255,255,255,0.05);
}

@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.75rem;
  }
  
  .nav-link::after {
    left: 0;
  }
  
  .nav-link:hover::after {
    width: 100%;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background: var(--hero-bg);
  overflow: hidden;
}

#panda-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#panda-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 300;
  color: #fff;
  text-align: center;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.hero-subtitle {
  margin-top: 1.5rem;
  font-family: var(--font-chinese);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  text-align: center;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: color 0.3s ease;
}

.scroll-indicator:hover {
  color: rgba(255,255,255,0.9);
}

.scroll-text {
  font-family: var(--font-chinese-util);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(8px); }
  60% { transform: translateY(4px); }
}

/* ========================================
   Philosophy Section
   ======================================== */
.philosophy-section {
  padding: 9rem 0;
  background: var(--canvas);
}

.philosophy-h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300;
  color: var(--brand-black);
  line-height: 1;
  letter-spacing: -0.02em;
}

.philosophy-h1 .char {
  display: inline-block;
  will-change: transform, opacity;
}

.philosophy-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 400;
  color: var(--brand-charcoal);
  line-height: 1.7;
}

.philosophy-h2 .char {
  display: inline-block;
  will-change: transform, opacity;
}

.philosophy-zh {
  font-family: var(--font-chinese);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 400;
  color: var(--brand-charcoal);
  opacity: 0.7;
  line-height: 1.7;
}

.philosophy-zh .char {
  display: inline-block;
  will-change: transform, opacity;
}

/* ========================================
   Products Section
   ======================================== */
.products-section {
  padding: 6rem 0;
  background: var(--canvas);
}

.section-label {
  font-family: var(--font-chinese-util);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-sage);
}

.product-image-wrapper {
  overflow: hidden;
  border-radius: 0.5rem;
  position: relative;
}

/* Cover AI watermark at bottom-left */
.product-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 120px;
  height: 50px;
  background: linear-gradient(to top right, rgba(0,0,0,0.6), transparent);
  pointer-events: none;
  z-index: 2;
}

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

.parallax-container {
  cursor: pointer;
  overflow: hidden;
}

.parallax-container img {
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--brand-black);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.product-desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 400;
  color: var(--brand-charcoal);
  line-height: 1.7;
}

/* Product Categories Card */
.product-categories-card {
  background: var(--brand-mint);
  border-radius: 0.5rem;
  height: 100%;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.category-item h4 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
  color: var(--brand-black);
  margin-bottom: 0.5rem;
}

.category-item p {
  font-family: var(--font-chinese);
  font-size: 0.9rem;
  color: var(--brand-charcoal);
}

.category-divider {
  width: 60px;
  height: 1px;
  background: var(--brand-charcoal);
  opacity: 0.3;
  margin: 2rem 0;
}

/* Product Lines */
.product-lines {
  margin-top: 4rem;
}

.product-line-item {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(53, 53, 53, 0.2);
  cursor: pointer;
  transition: background 0.3s ease;
}

.product-line-item span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  color: var(--brand-black);
  transition: color 0.3s ease;
}

.product-line-item:hover {
  background: rgba(163, 184, 168, 0.1);
}

.product-line-item:hover span {
  color: var(--brand-sage);
}

/* ========================================
   Footprint Section
   ======================================== */
.footprint-section {
  padding: 6rem 0;
  background: var(--canvas);
}

.footprint-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--brand-black);
  line-height: 1.3;
}

.footprint-h2 .char {
  display: inline-block;
  will-change: transform, opacity;
}

.footprint-image-wrapper {
  overflow: hidden;
  border-radius: 0.5rem;
}

.footprint-img {
  width: 100%;
  height: 80vh;
  min-height: 500px;
  object-fit: cover;
  display: block;
}

@media (max-width: 991px) {
  .footprint-img {
    height: 60vh;
    min-height: 400px;
  }
}

/* ========================================
   Testimonials Section
   ======================================== */
.testimonials-section {
  padding: 6rem 0;
  background: var(--brand-black);
}

.testimonials-section .section-label {
  color: var(--brand-sage);
}

.testimonial-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 2.5rem;
  transition: background 0.5s ease;
}

.testimonial-card:hover {
  background: rgba(255,255,255,0.1);
}

.testimonial-card blockquote {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 1.8vw, 1.35rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.9);
  line-height: 1.7;
  margin-bottom: 2rem;
  border-left: none;
  padding: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(211, 255, 224, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar span {
  font-family: var(--font-chinese-util);
  font-size: 0.85rem;
  color: var(--brand-mint);
}

.author-info p {
  font-family: var(--font-chinese-util);
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 0;
}

.author-info span {
  font-family: var(--font-chinese-util);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

/* ========================================
   Footer Section
   ======================================== */
.footer-section {
  padding: 6rem 0 3rem;
  background: var(--brand-black);
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .carousel-container {
    height: 500px;
  }
}

.carousel-logo {
  position: absolute;
  z-index: 10;
  width: 80px;
  height: 80px;
}

@media (min-width: 768px) {
  .carousel-logo {
    width: 96px;
    height: 96px;
  }
}

.carousel-logo img {
  width: 100%;
  height: 100%;
}

.carousel-link {
  position: absolute;
  font-family: var(--font-chinese-util);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
  transform: translate(-50%, -50%);
}

.carousel-link:hover {
  color: var(--brand-mint);
}

.footer-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
}

.footer-copyright {
  font-family: var(--font-chinese-util);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.footer-icp {
  font-family: var(--font-chinese-util);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
}

/* Company info */
.footer-company-name {
  font-family: var(--font-chinese);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.05em;
}

.footer-about {
  font-family: var(--font-chinese);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}

.footer-heading {
  font-family: var(--font-chinese);
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.1em;
  margin-bottom: 0;
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: var(--font-chinese-util);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--brand-mint);
  opacity: 0.7;
}

.footer-slogan {
  font-family: var(--font-chinese);
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.2em;
}

.footer-legal {
  margin-top: 3rem;
}

@media (max-width: 767px) {
  .footer-info {
    text-align: center;
  }
  .footer-info .text-md-end {
    text-align: center !important;
  }
  .footer-contact-item {
    justify-content: center;
    text-align: left;
  }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
  .philosophy-section,
  .products-section,
  .footprint-section,
  .testimonials-section {
    padding: 4rem 0;
  }
  
  .carousel-container {
    height: 350px;
  }
  
  .product-categories-card {
    min-height: 300px;
  }
}
