/* ===== CSS Variables ===== */
:root {
  --bg-deep: #050810;
  --bg-dark: #0a0e1a;
  --bg-card: #0f172a;
  --bg-card-hover: #162032;
  --primary: #3b82f6;
  --primary-light: #60a5fa;
  --accent: #38bdf8;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.1);
  --gradient-start: #0a0e1a;
  --gradient-mid: #0f172a;
  --gradient-end: #1e293b;
  --font-serif-cn: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  --font-serif-en: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Ampersand Font Fix ===== */
/* Render the & character with a standard sans-serif font instead of
   the decorative Playfair Display ampersand in English text. */
@font-face {
  font-family: 'Playfair Display';
  font-weight: 100 900;
  font-style: normal;
  src: local('Segoe UI'), local('Arial'), local('Helvetica Neue'), local('Helvetica'), local('sans-serif');
  unicode-range: U+0026;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-serif-cn);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif-en);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Animated Gradient Background ===== */
.gradient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #020617 0%, #0f172a 25%, #1e293b 50%, #0f172a 75%, #020617 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

.gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(148, 163, 184, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
  padding: 0.75rem 0;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.nav-logo span {
  font-family: var(--font-serif-en);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary-light);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

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

.lang-switch {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}

.lang-switch button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-serif-cn);
  transition: var(--transition);
}

.lang-switch button:hover,
.lang-switch button.active {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.hero-content {
  max-width: 900px;
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-family: var(--font-serif-en);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
  display: block;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: var(--font-serif-cn);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.05);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
}

/* ===== Section Base ===== */
section {
  padding: 6rem 2rem;
  position: relative;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  font-family: var(--font-serif-en);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 1rem;
  display: block;
}

.section-header h2 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ===== About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.mvv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.mvv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: var(--transition);
}

.mvv-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
}

.mvv-card h4 {
  font-family: var(--font-serif-en);
  font-size: 1.1rem;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
}

.mvv-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.value-item svg {
  flex-shrink: 0;
  color: var(--primary-light);
  margin-top: 0.2rem;
}

.value-item div strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.value-item div span {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ===== Business Section ===== */
.business-section {
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
}

.business-category {
  margin-bottom: 5rem;
}

.business-category:last-child {
  margin-bottom: 0;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.category-number {
  font-family: var(--font-serif-en);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
}

.category-header h3 {
  color: var(--text-primary);
}

.category-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Product Card */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-dark);
}

.product-image-contain {
  object-fit: contain;
  padding: 1rem;
}

.product-content {
  padding: 1.5rem;
}

.product-content h4 {
  font-family: var(--font-serif-en);
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.product-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary-light);
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Product Row (for larger items) */
.product-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.product-row:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.product-row.reverse {
  direction: rtl;
}

.product-row.reverse > * {
  direction: ltr;
}

.product-row-image {
  border-radius: 12px;
  overflow: hidden;
}

.product-row-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

/* Cotton system images: shrink to show the full diagram and text */
.product-row-image.cotton-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-row-image.cotton-image img {
  max-width: 420px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(10, 14, 26, 0.5);
}

.product-row-content h4 {
  font-family: var(--font-serif-en);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.product-row-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.product-row-content ul {
  list-style: none;
  padding: 0;
}

.product-row-content ul li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.product-row-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  border-radius: 50%;
}

/* ===== Gallery Grid (for RF components) ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.gallery-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.gallery-item h5 {
  font-family: var(--font-serif-en);
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.gallery-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Contact Section ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-item svg {
  color: var(--primary-light);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.contact-item div strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.contact-item div span,
.contact-item div a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-item div a:hover {
  color: var(--primary-light);
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-serif-cn);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  background: rgba(5, 8, 16, 0.8);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  height: 32px;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.footer-brand span {
  font-family: var(--font-serif-en);
  font-size: 1.25rem;
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
}

.footer-copyright {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .about-grid,
  .contact-grid,
  .product-row {
    grid-template-columns: 1fr;
  }

  .product-row.reverse {
    direction: ltr;
  }

  .mvv-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-deep);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right 0.4s ease;
    border-left: 1px solid var(--border);
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  section {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.5rem;
  }
}
