@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #0b0f1a;
  --bg-alt: #0e1422;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --primary: #4f46e5;
  --primary-700: #4338ca;
  --accent: #06b6d4;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --glow: 0 0 30px rgba(79, 70, 229, 0.4);
  /* Dynamic background defaults */
  --dyn-bg-a: #4f46e5;
  --dyn-bg-b: #06b6d4;
  --dyn-bg-c: #9333ea;
  --dyn-bg-opacity: 0.16;
  --dyn-bg-speed: 32s;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  color: var(--text);
  background: radial-gradient(1000px 500px at 10% 0%, #0b0f1a 0%, #0b1222 50%, #0a0f1a 100%);
  overflow-x: hidden;
}

/* Dynamic background layer */
.dynamic-bg {
  position: fixed;
  inset: 0;
  z-index: -3; /* stay behind all content and hero layers */
  pointer-events: none;
  mix-blend-mode: screen;
}
.theme-light .dynamic-bg { mix-blend-mode: multiply; }
.dynamic-bg::before,
.dynamic-bg::after {
  content: "";
  position: absolute;
  inset: -10%;
  opacity: var(--dyn-bg-opacity);
  will-change: transform, opacity;
}
/* Mesh pattern: drifting color blobs */
.dynamic-bg[data-pattern="mesh"]::before {
  filter: blur(48px);
  background: radial-gradient(600px 600px at 18% 28%, var(--dyn-bg-a), transparent 60%),
              radial-gradient(520px 520px at 82% 42%, var(--dyn-bg-b), transparent 62%);
  animation: bgMove var(--dyn-bg-speed) ease-in-out infinite;
}
.dynamic-bg[data-pattern="mesh"]::after {
  filter: blur(52px);
  background: radial-gradient(480px 480px at 60% 12%, var(--dyn-bg-c), transparent 65%);
  animation: bgDrift calc(var(--dyn-bg-speed) * 1.25) ease-in-out infinite;
}
@keyframes bgMove {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(2%, -2%, 0) scale(1.05); }
}
@keyframes bgDrift {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50%      { transform: translate3d(-1.5%, 2.5%, 0) scale(1.04); }
}
/* Waves pattern: gradient + subtle moving stripes */
.dynamic-bg[data-pattern="waves"]::before {
  filter: blur(24px);
  background: linear-gradient(135deg, color-mix(in oklab, var(--dyn-bg-a) 70%, transparent), color-mix(in oklab, var(--dyn-bg-b) 70%, transparent));
  opacity: calc(var(--dyn-bg-opacity) * 0.9);
}
.dynamic-bg[data-pattern="waves"]::after {
  filter: none;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 8px);
  opacity: 0.08;
  animation: waveShift var(--dyn-bg-speed) linear infinite;
}
@keyframes waveShift {
  0%   { background-position: 0 0; }
  100% { background-position: 420px 220px; }
}
/* Dots pattern: faint grid of dots drifting */
.dynamic-bg[data-pattern="dots"]::before {
  filter: blur(36px);
  background: radial-gradient(500px 500px at 28% 30%, var(--dyn-bg-a), transparent 65%);
  opacity: calc(var(--dyn-bg-opacity) * 0.8);
}
.dynamic-bg[data-pattern="dots"]::after {
  filter: none;
  background: repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.06) 0 1px, transparent 1px 6px);
  opacity: 0.06;
  animation: dotDrift var(--dyn-bg-speed) linear infinite;
}
@keyframes dotDrift {
  0%   { background-position: 0 0; }
  100% { background-position: -320px 180px; }
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(17,24,39,0.75), rgba(17,24,39,0.35));
  border-bottom: 1px solid rgba(79,70,229,0.15);
  z-index: 1000;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
}
.lang-switch { position: relative; }
.lang-btn {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(229,231,235,0.15);
  background: rgba(17,24,39,0.35); color: var(--text);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.lang-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(79,70,229,0.35); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: rgba(17,24,39,0.85); border: 1px solid rgba(79,70,229,0.2);
  border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  min-width: 140px; padding: 6px; backdrop-filter: blur(8px);
}
.lang-option {
  width: 100%; text-align: left; padding: 8px 10px; border: none; border-radius: 8px; cursor: pointer; color: var(--text);
  background: transparent; transition: background .2s ease;
}
.lang-option:hover { background: rgba(79,70,229,0.18); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo-img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; box-shadow: var(--glow); }
.logo-text { font-weight: 700; letter-spacing: 0.5px; }
.nav .nav-link {
  color: var(--muted);
  text-decoration: none;
  margin-left: 16px;
  transition: color .2s ease, transform .2s ease;
}
.nav .nav-link:hover { color: var(--text); transform: translateY(-1px); }

.hero {
  position: relative;
  min-height: 90vh;
  display: grid;
  place-items: center;
  padding: 120px 24px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(500px 400px at 80% 20%, rgba(79,70,229,0.2), transparent 60%),
              radial-gradient(600px 400px at 20% 10%, rgba(6,182,212,0.15), transparent 60%),
              linear-gradient(180deg, rgba(17,24,39,0.8), rgba(17,24,39,0.5));
  z-index: -2;
}
.hero-noise {
  position: absolute; inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'200\' height=\'200\'><filter id=\'n\'><feTurbulence type=\'fractalNoise\' baseFrequency=\'0.65\' numOctaves=\'1\' stitchTiles=\'stitch\'/></filter><rect width=\'100%\' height=\'100%\' filter=\'url(%23n)\'/></svg>');
  opacity: 0.03;
  mix-blend-mode: overlay;
  z-index: -1;
}
.hero-content { text-align: center; }
.hero-title {
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.1;
  margin: 0 0 12px 0;
}
.title-glow { color: var(--accent); text-shadow: 0 0 20px rgba(6,182,212,0.4); }
.hero-subtitle {
  color: var(--muted);
  max-width: 820px;
  margin: 0 auto 20px;
}
.hero-actions { display: inline-flex; gap: 12px; margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid rgba(229,231,235,0.15);
  color: var(--text);
  background: rgba(17,24,39,0.35);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(79,70,229,0.35); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: var(--glow); border: none; }
.btn-ghost { background: transparent; }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: rgba(79,70,229,0.15); color: #c7d2fe; margin: 8px 6px 0; border: 1px solid rgba(79,70,229,0.35);
  backdrop-filter: blur(4px);
}

.parallax { position: absolute; inset: 0; pointer-events: none; }
.parallax .dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: rgba(6,182,212,0.8); box-shadow: 0 0 12px rgba(6,182,212,0.8); animation: float 6s ease-in-out infinite; }
.parallax .d1 { top: 20%; left: 10%; animation-delay: 0s; }
.parallax .d2 { top: 30%; right: 20%; animation-delay: .6s; }
.parallax .d3 { bottom: 25%; left: 35%; animation-delay: 1.2s; }
.parallax .d4 { bottom: 10%; right: 15%; animation-delay: 1.8s; }
.parallax .d5 { top: 70%; left: 80%; animation-delay: 2.4s; }
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }

.section { padding: 80px 0; position: relative; }
.alt-section { background: linear-gradient(180deg, rgba(17,24,39,0.6), rgba(17,24,39,0.2)); }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(22px, 4vw, 32px); margin: 0 0 8px; }
.section-head .lead { color: var(--muted); max-width: 900px; margin: 0 auto; }

/* Content page card */
.content-card { background: rgba(17,24,39,0.45); border: 1px solid rgba(79,70,229,0.2); border-radius: 16px; box-shadow: 0 10px 24px rgba(0,0,0,0.35); }
.content-body { padding: 24px; line-height: 1.8; font-size: 16px; color: var(--text); }
.content-body p { margin: 0 0 12px; }
.theme-light .content-card { background: rgba(255,255,255,0.92); border-color: rgba(79,70,229,0.12); box-shadow: 0 8px 22px rgba(0,0,0,0.1); }
.theme-light .content-body { color: #111827; }

.about-grid {
  display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.about-card { background: rgba(17,24,39,0.45); border: 1px solid rgba(79,70,229,0.2); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 24px rgba(0,0,0,0.35); transform: translateY(8px); transition: transform .25s ease, box-shadow .25s ease; }
.about-card:hover { transform: translateY(0) scale(1.01); box-shadow: 0 16px 40px rgba(79,70,229,0.35); }
.about-card img { width: 100%; height: 180px; object-fit: cover; }
.about-card .card-body { padding: 14px 16px 18px; }
.about-card h3 { margin: 0 0 6px; font-size: 18px; }
.about-card p { margin: 0; color: var(--muted); }

.eco-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.eco-item { background: rgba(17,24,39,0.45); border: 1px solid rgba(79,70,229,0.2); border-radius: 14px; padding: 16px; transition: transform .2s ease, box-shadow .2s ease; }
.eco-item:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(6,182,212,0.35); }
.eco-icon { font-size: 24px; margin-bottom: 8px; }
.eco-visual { margin-top: 20px; }
.eco-visual img { width: 100%; border-radius: 12px; border: 1px solid rgba(79,70,229,0.2); }
/* Subtle animation for externally referenced SVGs */
img[src$='.svg'] { animation: svgPulse 8s ease-in-out infinite; }
@keyframes svgPulse { 0%, 100% { filter: brightness(1) saturate(1); } 50% { filter: brightness(1.06) saturate(1.05); } }
/* Slight shimmer for hero/product cards that contain SVG */
.about-card img[src$='.svg'], .eco-visual img[src$='.svg'] { animation: svgShimmer 12s ease-in-out infinite; }
@keyframes svgShimmer { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 24px rgba(79,70,229,0.12); } }

.product-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
.product-card { background: rgba(17,24,39,0.45); border: 1px solid rgba(79,70,229,0.2); border-radius: 16px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.product-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 40px rgba(79,70,229,0.35); }
.product-media img { width: 100%; height: 160px; object-fit: cover; }
.product-body { padding: 14px 16px 18px; }
.product-body h3 { margin: 0 0 6px; font-size: 18px; }
.product-body p { margin: 0; color: var(--muted); }

.sus-grid { display: grid; gap: 16px; grid-template-columns: 1.2fr 1fr; align-items: center; margin-top: 14px; }
.sus-media img { width: 100%; border-radius: 14px; border: 1px solid rgba(79,70,229,0.2); }
.sus-content .bullet { color: var(--muted); margin: 0 0 12px 0; }
.sus-content .bullet li { margin-bottom: 8px; }

.site-footer { border-top: 1px solid rgba(79,70,229,0.15); padding: 24px 0; background: rgba(17,24,39,0.4); text-align: center; }
.foot-sub { color: var(--muted); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Floating Action Button */
.fab-top {
  position: fixed; right: 20px; bottom: 20px; width: 52px; height: 52px;
  border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; box-shadow: 0 12px 30px rgba(79,70,229,0.5);
  display: grid; place-items: center; z-index: 1200;
  transition: transform .2s ease, box-shadow .2s ease, opacity .25s ease;
}
.fab-top:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(79,70,229,0.6); }
.fab-top .arrow { font-size: 20px; font-weight: 700; }
.fab-top.hidden { opacity: 0; pointer-events: none; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Responsive */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .eco-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .sus-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .lang-switch { position: static; }
  .lang-menu { right: auto; left: 0; }
  .hero { padding-top: 110px; min-height: 78vh; }
  .about-card img { height: 140px; }
  .product-media img { height: 140px; }
  /* lighter dynamic background on mobile */
  .dynamic-bg::before, .dynamic-bg::after { opacity: calc(var(--dyn-bg-opacity) * 0.8); filter: blur(36px); }
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dynamic-bg::before, .dynamic-bg::after { animation: none; }
}
/* Light theme overrides and theme toggle styles */
.theme-light {
  --bg: #f7f9fc;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --primary: #4f46e5;
  --primary-700: #4338ca;
  --accent: #0ea5e9;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --glow: 0 0 24px rgba(79, 70, 229, 0.25);
}
.action-switches { display: inline-flex; align-items: center; gap: 10px; }
.theme-btn {
  height: 32px; width: 36px; border-radius: 999px; border: 1px solid rgba(229,231,235,0.15);
  background: rgba(17,24,39,0.35); color: var(--text);
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(79,70,229,0.35); }
.theme-light .theme-btn { background: rgba(255,255,255,0.7); border-color: rgba(17,24,39,0.1); }
.theme-icon { font-size: 14px; }
.theme-light body {
  background: radial-gradient(1000px 500px at 10% 0%, var(--bg) 0%, var(--bg-alt) 50%, var(--bg) 100%);
}
.theme-light .site-header { background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.65)); border-bottom-color: rgba(79,70,229,0.12); }
.theme-light .lang-menu { background: rgba(255,255,255,0.95); border-color: rgba(79,70,229,0.15); }
.theme-light .hero-bg {
  background: radial-gradient(500px 400px at 80% 20%, rgba(79,70,229,0.12), transparent 60%),
              radial-gradient(600px 400px at 20% 10%, rgba(14,165,233,0.10), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6));
}
.theme-light .alt-section { background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.6)); }
.theme-light .about-card { background: rgba(255,255,255,0.92); box-shadow: 0 8px 22px rgba(0,0,0,0.10); border-color: rgba(79,70,229,0.12); }
.theme-light .eco-item { background: rgba(255,255,255,0.92); box-shadow: 0 6px 18px rgba(0,0,0,0.08); border-color: rgba(79,70,229,0.12); }
.theme-light .product-card { background: rgba(255,255,255,0.92); box-shadow: 0 8px 22px rgba(0,0,0,0.10); border-color: rgba(79,70,229,0.12); }
.theme-light .site-footer { background: rgba(255,255,255,0.85); border-top-color: rgba(79,70,229,0.12); }
.theme-light .btn { border-color: rgba(17,24,39,0.12); background: rgba(255,255,255,0.7); color: #111827; }
.theme-light .btn-ghost { background: rgba(255,255,255,0.65); }
/* Light theme: chips and controls refinements */
.theme-light .chip {
  background: rgba(79,70,229,0.12);
  color: #4338ca;
  border-color: rgba(79,70,229,0.25);
}
.theme-light .lang-btn {
  background: rgba(255,255,255,0.8);
  border-color: rgba(17,24,39,0.12);
  color: #111827;
}
.theme-light .lang-option { color: #111827; }
.theme-light .lang-option:hover { background: rgba(79,70,229,0.12); }
.theme-light .sus-media img { border-color: rgba(79,70,229,0.15); }