:root {
  --rice-green: #8BC34A;
  --rice-green-dark: #689F38;
  --rice-yellow: #EEFF41;
  --rice-yellow-bright: #FFFF00;
  --rice-white: #FFFFFF;
  --rice-gray: #616161;
  --rice-dark: #424242;
  --rice-bg: #FAFAFA;
  --nav-bg: #5f5f5d;
  --surface: #FFFFFF;
  --surface-soft: #f8f9f5;
  --card-bg: #FFFFFF;
  --card-gradient: linear-gradient(145deg, #ffffff, #f5f5f5);
  --border-soft: rgba(139,195,74,0.2);
  --text-main: #424242;
  --text-muted: #616161;
  --hero-gradient: linear-gradient(135deg, #424242 0%, #2E3B1F 50%, #689F38 100%);
  --section-gradient: linear-gradient(180deg, #f8f9f5 0%, #ffffff 100%);
  --shadow-soft: rgba(0,0,0,0.08);
}

body[data-theme="dark"] {
  --rice-bg: #11150f;
  --surface: #171c14;
  --surface-soft: #202719;
  --card-bg: #1b2118;
  --card-gradient: linear-gradient(145deg, #202719, #151a12);
  --border-soft: rgba(139,195,74,0.28);
  --text-main: #f3f7ec;
  --text-muted: #c1c9b7;
  --hero-gradient: linear-gradient(135deg, #0e120c 0%, #1e2b15 50%, #4f7f29 100%);
  --section-gradient: linear-gradient(180deg, #151a12 0%, #11150f 100%);
  --shadow-soft: rgba(0,0,0,0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--rice-bg); color: var(--text-main); line-height: 1.6; transition: background 0.3s, color 0.3s; }
section { scroll-margin-top: 88px; }

/* Navigation */
.navbar {
  position: fixed; top: 0; width: 100%; z-index: 1000;
  background: rgba(95,95,93,0.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(238,255,65,0.25);
  padding: 0.75rem 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.nav-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 0 2rem; }
.logo-link { display: inline-flex; align-items: center; text-decoration: none; }
.logo-img { height: 48px; width: auto; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25)); }
.logo-text { font-size: 1.5rem; font-weight: 900; color: var(--rice-green); }
.logo-text span { color: var(--rice-yellow-bright); text-shadow: 0 0 10px rgba(238,255,65,0.3); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { text-decoration: none; color: rgba(255,255,255,0.86); font-weight: 600; transition: color 0.3s; }
.nav-links a:hover { color: var(--rice-yellow); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.toggle-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  min-width: 82px; padding: 0.55rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(238,255,65,0.32); background: rgba(255,255,255,0.1);
  color: white; font-weight: 800; font-size: 0.8rem; cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.toggle-btn:hover { transform: translateY(-1px); background: rgba(139,195,74,0.22); border-color: var(--rice-yellow); }

/* Hero */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--hero-gradient);
  position: relative; overflow: hidden; padding-top: 80px;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(139,195,74,0.1) 0%, transparent 60%);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; padding: 0 2rem; }
.hero-badge {
  display: inline-block; background: rgba(139,195,74,0.2); border: 1px solid var(--rice-green);
  color: var(--rice-green); padding: 0.5rem 1.5rem; border-radius: 50px;
  font-size: 0.875rem; font-weight: 600; margin-bottom: 2rem; letter-spacing: 0.05em;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; color: var(--rice-white);
  line-height: 1.1; margin-bottom: 1.5rem;
}
.hero h1 .highlight { color: var(--rice-yellow); text-shadow: 0 0 30px rgba(238,255,65,0.4); }
.hero-subtitle {
  font-size: 1.25rem; color: rgba(255,255,255,0.8); max-width: 600px;
  margin: 0 auto 2.5rem; font-weight: 300;
}
.hero-cta {
  display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
.btn {
  padding: 1rem 2.5rem; border-radius: 12px; font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: all 0.3s; cursor: pointer; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--rice-green), var(--rice-green-dark));
  color: white; box-shadow: 0 4px 20px rgba(139,195,74,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(139,195,74,0.5); }
.btn-outline {
  background: transparent; color: var(--rice-yellow); border: 2px solid var(--rice-yellow);
}
.btn-outline:hover { background: var(--rice-yellow); color: var(--rice-dark); }

/* Floating rice particles */
.particle {
  position: absolute; border-radius: 50%; opacity: 0.3;
  animation: float 15s infinite ease-in-out;
}
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-30px) rotate(120deg); }
  66% { transform: translateY(15px) rotate(240deg); }
}

/* Story Section */
.story { padding: 6rem 2rem; background: var(--surface); }
.container { max-width: 1100px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  display: inline-block; color: var(--rice-green-dark); font-weight: 700;
  font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: var(--text-main); margin-bottom: 1rem; }
.section-desc { color: var(--text-muted); font-size: 1.125rem; max-width: 600px; margin: 0 auto; }

.story-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem;
}
.story-card {
  background: var(--card-gradient);
  border-radius: 20px; padding: 2.5rem; border: 1px solid var(--border-soft);
  transition: all 0.4s; position: relative; overflow: hidden;
}
.story-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--rice-green), var(--rice-yellow));
}
.story-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px var(--shadow-soft); }
.story-icon {
  width: 60px; height: 60px; border-radius: 16px;
  background: linear-gradient(135deg, var(--rice-green), var(--rice-green-dark));
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem;
  font-size: 1.5rem; color: white;
}
.story-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text-main); }
.story-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

/* Products */
.products { padding: 6rem 2rem; background: var(--section-gradient); }
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem;
}
.product-card {
  background: var(--card-bg); border-radius: 24px; overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); transition: all 0.4s;
}
.product-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(0,0,0,0.1); }
.product-header {
  padding: 2rem 2rem 1rem; background: linear-gradient(135deg, var(--rice-dark), #2d3a1e);
  position: relative;
}
.product-chip {
  display: inline-block; background: rgba(139,195,74,0.2); color: var(--rice-green);
  padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
  margin-bottom: 0.75rem; border: 1px solid rgba(139,195,74,0.3);
}
.product-header h3 { color: white; font-size: 1.5rem; font-weight: 800; }
.product-header .soc { color: var(--rice-yellow); font-size: 0.9rem; font-weight: 600; margin-top: 0.25rem; }
.product-body { padding: 1.5rem 2rem 2rem; }
.spec-list { list-style: none; }
.spec-list li {
  padding: 0.75rem 0; border-bottom: 1px solid rgba(139,195,74,0.12);
  display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.9rem;
}
.spec-list li::before {
  content: '\2713'; width: 20px; height: 20px; border-radius: 50%;
  background: var(--rice-green); color: white; display: flex; align-items: center;
  justify-content: center; font-size: 0.7rem; flex-shrink: 0;
}
.product-footer {
  padding: 0 2rem 2rem; display: flex; gap: 1rem;
}
.btn-small {
  flex: 1; padding: 0.75rem; border-radius: 10px; font-weight: 700;
  font-size: 0.875rem; text-align: center; cursor: pointer; border: none; transition: all 0.3s;
}
.btn-green { background: var(--rice-green); color: white; }
.btn-green:hover { background: var(--rice-green-dark); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid rgba(139,195,74,0.25); }
.btn-ghost:hover { border-color: var(--rice-green); color: var(--rice-green); }
.future-products {
  margin-top: 2.5rem; text-align: center; color: var(--rice-green-dark);
  font-weight: 800; font-size: 1.1rem;
}
body[data-theme="dark"] .future-products { color: var(--rice-yellow); }

/* Vietnam Pride */
.pride {
  padding: 6rem 2rem; background: var(--rice-dark); position: relative; overflow: hidden;
}
.pride::after {
  content: ''; position: absolute; right: -10%; top: -20%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,195,74,0.15) 0%, transparent 70%);
}
.pride-content {
  position: relative; z-index: 2; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: start;
}
.pride-text { width: 590px; max-width: 100%; min-width: 0; justify-self: end; padding-top: 3.5rem; }
.pride-text .section-tag { color: var(--rice-green); }
.pride-text .section-title { color: white; }
.pride-text p { color: rgba(255,255,255,0.7); font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; }

.pride-visual {
  display: flex; align-items: flex-start; justify-content: flex-end; position: relative;
}
.board-mockup {
  width: min(100%, 420px); aspect-ratio: 4/3;
  background: linear-gradient(145deg, #5f5f5d, #2d2d2d);
  border-radius: 20px; border: 2px solid var(--rice-green);
  box-shadow: 0 0 60px rgba(139,195,74,0.2), inset 0 0 40px rgba(0,0,0,0.5);
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.board-mockup::before {
  content: ''; position: absolute; width: 80%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--rice-green), transparent);
  top: 30%; animation: scan 3s linear infinite;
}
.board-mockup::after {
  content: ''; position: absolute; inset: 12px; border-radius: 14px;
  border: 1px solid rgba(238,255,65,0.18); pointer-events: none;
}
@keyframes scan { 0% { opacity: 0; transform: translateX(-100%); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(100%); } }
.board-logo-wrap { position: relative; z-index: 2; text-align: center; padding: 2rem; }
.board-logo {
  width: min(78%, 280px); height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 0 24px rgba(238,255,65,0.24)) drop-shadow(0 10px 26px rgba(0,0,0,0.38));
}
.board-sublabel { font-size: 0.75rem; color: var(--rice-yellow); margin-top: 1.25rem; letter-spacing: 0.3em; font-weight: 800; }

/* Partners */
.partners { padding: 4rem 2rem; background: var(--surface); text-align: center; }
.partners-logos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem;
  max-width: 900px; margin: 2rem auto 0;
}
.partner-item {
  min-height: 82px; padding: 1rem 1.25rem; background: var(--surface-soft); border-radius: 16px;
  color: var(--text-muted); border: 1px dashed rgba(139,195,74,0.4);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 700; transition: all 0.3s;
}
.partner-item:hover { border-color: var(--rice-green); color: var(--rice-green-dark); transform: translateY(-2px); }

/* Cooperation Contact */
.cooperation {
  padding: 5rem 2rem; background: var(--section-gradient); text-align: center;
}
.cooperation-card {
  max-width: 900px; margin: 2rem auto 0; padding: 2rem;
  background: var(--card-bg); border: 1px solid var(--border-soft); border-radius: 24px;
  box-shadow: 0 16px 40px var(--shadow-soft);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.contact-item {
  padding: 1.5rem; border-radius: 18px; background: var(--surface-soft);
  border: 1px solid rgba(139,195,74,0.18); text-decoration: none;
  color: var(--text-main); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.contact-item:hover {
  transform: translateY(-4px); border-color: var(--rice-green);
  box-shadow: 0 12px 28px rgba(139,195,74,0.16);
}
.contact-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.contact-label { color: var(--text-muted); font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.contact-value { margin-top: 0.35rem; color: var(--rice-green-dark); font-size: 1.05rem; font-weight: 900; }
body[data-theme="dark"] .contact-value { color: var(--rice-yellow); }

/* Footer */
.footer {
  background: var(--rice-dark); color: rgba(255,255,255,0.6); padding: 3rem 2rem 2rem;
  text-align: center; border-top: 1px solid rgba(139,195,74,0.2);
}
.footer-logo { font-size: 1.5rem; font-weight: 900; color: var(--rice-green); margin-bottom: 1rem; }
.footer-logo span { color: var(--rice-yellow); }
.footer p { font-size: 0.9rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin: 1.5rem 0; list-style: none; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--rice-green); }
.copyright { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; }

/* Responsive */
@media (max-width: 768px) {
  .nav-container { padding: 0 1rem; gap: 1rem; }
  .logo-img { height: 40px; }
  .nav-links { display: none; }
  .nav-actions { gap: 0.5rem; }
  .toggle-btn { min-width: auto; padding: 0.5rem 0.7rem; font-size: 0.75rem; }
  .pride-content { grid-template-columns: 1fr; }
  .pride-text { margin-left: 0; padding-top: 0; }
  .pride-visual { justify-content: center; order: -1; }
  .cooperation-card { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.5rem; }
}

/* Fast hero motion layer */
.hero {
  isolation: isolate;
  --hero-mouse-x: 50%;
  --hero-mouse-y: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--hero-mouse-x) var(--hero-mouse-y), rgba(238,255,65,0.20), transparent 18rem),
    linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,0.06) 43%, transparent 48% 100%);
  mix-blend-mode: screen;
  animation: heroSweep 2.8s ease-in-out infinite;
}
.hero-content {
  transform-style: preserve-3d;
  animation: heroContentPop 0.72s cubic-bezier(.17,.84,.32,1.28) both;
  will-change: transform;
}
.hero-content > * {
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  animation: heroItemSnap 0.62s cubic-bezier(.18,.95,.28,1.18) both;
}
.hero-content .hero-badge { animation-delay: 0.04s; }
.hero-content h1 { animation-delay: 0.13s; }
.hero-content .hero-subtitle { animation-delay: 0.24s; }
.hero-content .hero-cta { animation-delay: 0.34s; }
.hero-badge {
  box-shadow: 0 0 0 rgba(139,195,74,0.0);
  animation-name: heroItemSnap, badgeGlow;
  animation-duration: 0.62s, 1.7s;
  animation-timing-function: cubic-bezier(.18,.95,.28,1.18), ease-in-out;
  animation-fill-mode: both, none;
  animation-iteration-count: 1, infinite;
  animation-delay: 0.04s, 0.75s;
}
.hero h1 .highlight {
  position: relative;
  display: inline-block;
  animation: highlightPulse 1.55s ease-in-out infinite;
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  left: -0.05em;
  right: -0.05em;
  bottom: 0.03em;
  height: 0.16em;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(238,255,65,0.55), transparent);
  transform-origin: left center;
  animation: underlineZip 1.1s cubic-bezier(.22,.85,.32,1) 0.52s both;
}
.hero-cta .btn {
  position: relative;
  overflow: hidden;
}
.hero-cta .btn::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -35%;
  width: 30%;
  height: 220%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.42), transparent);
  animation: buttonShine 2.1s ease-in-out infinite;
}
.particle-fast {
  animation-duration: 6.5s !important;
  filter: blur(0.2px) drop-shadow(0 0 16px rgba(238,255,65,0.2));
}
.hero-grain {
  position: absolute;
  z-index: 1;
  width: 9px;
  height: 18px;
  border-radius: 999px 999px 999px 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(238,255,65,0.72));
  box-shadow: 0 0 18px rgba(238,255,65,0.18);
  opacity: 0;
  pointer-events: none;
  animation: riceBurst var(--duration, 3s) cubic-bezier(.2,.8,.24,1) var(--delay, 0s) infinite;
}

@keyframes heroContentPop {
  from { opacity: 0; transform: translateY(28px) scale(0.96) rotateX(5deg); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
}
@keyframes heroItemSnap {
  0% { opacity: 0; transform: translateY(26px) scale(0.96); filter: blur(6px); }
  70% { opacity: 1; transform: translateY(-4px) scale(1.015); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes heroSweep {
  0%, 100% { opacity: 0.55; transform: translateX(-2%); }
  50% { opacity: 0.95; transform: translateX(2%); }
}
@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(139,195,74,0.0), 0 0 18px rgba(139,195,74,0.12); }
  50% { box-shadow: 0 0 0 8px rgba(139,195,74,0.07), 0 0 30px rgba(238,255,65,0.25); }
}
@keyframes highlightPulse {
  0%, 100% { text-shadow: 0 0 24px rgba(238,255,65,0.36); transform: translateY(0); }
  50% { text-shadow: 0 0 44px rgba(238,255,65,0.72); transform: translateY(-2px); }
}
@keyframes underlineZip {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes buttonShine {
  0%, 35% { left: -45%; opacity: 0; }
  50% { opacity: 1; }
  80%, 100% { left: 120%; opacity: 0; }
}
@keyframes riceBurst {
  0% { opacity: 0; transform: translate3d(0, 24px, 0) rotate(0deg) scale(0.65); }
  12% { opacity: 0.85; }
  70% { opacity: 0.78; }
  100% { opacity: 0; transform: translate3d(var(--drift-x, 60px), -118vh, 0) rotate(240deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero::after, .hero-content, .hero-content > *, .hero-badge,
  .hero h1 .highlight, .hero h1 .highlight::after, .hero-cta .btn::after,
  .particle, .hero-grain {
    animation: none !important;
    transform: none !important;
  }
  .hero-content > * { opacity: 1; }
}
