/* ===== CSS Variables (Design Tokens) ===== */
:root {
  --ink: #0E2A22;
  --aqua-deep: #0B4F6C;
  --leaf: #4FA82C;
  --leaf-light: #DCEFD1;
  --sand: #F6F3EC;
  --amber: #E3A23A;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Font Imports ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: all 0.4s var(--transition-smooth);
  padding: 1rem 0;
  background: transparent;
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--leaf);
  transition: width 0.3s var(--transition-smooth);
}

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

.navbar.scrolled {
  background: rgba(14, 42, 34, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-link,
.navbar.scrolled .nav-logo-text {
  color: var(--sand);
}

.navbar.scrolled .nav-link::after {
  background: var(--leaf);
}

.navbar-logo {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

/* ===== Shimmer Button ===== */
.shimmer-btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  background: linear-gradient(135deg, var(--leaf) 0%, #3d8a22 100%);
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(79, 168, 44, 0.35);
  text-decoration: none;
  text-align: center;
}

.shimmer-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -75%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.shimmer-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(79, 168, 44, 0.45);
}

.shimmer-btn:active {
  transform: translateY(-1px);
}

/* ===== Shimmer outline variant ===== */
.shimmer-btn-outline {
  background: transparent;
  border: 2px solid var(--leaf);
  color: var(--leaf);
  box-shadow: none;
}

.shimmer-btn-outline::before {
  background: linear-gradient(90deg, transparent, rgba(79, 168, 44, 0.1), transparent);
}

.shimmer-btn-outline:hover {
  background: var(--leaf);
  color: white;
  box-shadow: 0 8px 30px rgba(79, 168, 44, 0.45);
}

/* ===== Marquee ===== */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.marquee-track {
  display: flex;
  gap: 4rem;
  animation: marqueeScroll 25s linear infinite;
  width: max-content;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Liquid Divider ===== */
.liquid-divider {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
}

.liquid-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.liquid-divider.flipped svg {
  transform: rotate(180deg);
}

/* ===== Scroll Progress Indicator ===== */
.scroll-indicator {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.scroll-indicator.visible {
  opacity: 1;
}

.scroll-indicator-track {
  width: 3px;
  height: 120px;
  background: rgba(14, 42, 34, 0.1);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.scroll-indicator-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to top, var(--leaf), var(--aqua-deep));
  border-radius: 3px;
  transition: height 0.1s linear;
}

.scroll-indicator-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--ink);
  opacity: 0.5;
  letter-spacing: 0.5px;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s var(--transition-smooth);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger-1 { transition-delay: 0.1s; }
.reveal-stagger-2 { transition-delay: 0.2s; }
.reveal-stagger-3 { transition-delay: 0.3s; }
.reveal-stagger-4 { transition-delay: 0.4s; }
.reveal-stagger-5 { transition-delay: 0.5s; }
.reveal-stagger-6 { transition-delay: 0.6s; }

/* ===== Bento Grid ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.bento-item {
  background: white;
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: all 0.4s var(--transition-smooth);
  border: 1px solid rgba(14, 42, 34, 0.04);
  position: relative;
  overflow: hidden;
}

.bento-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(14, 42, 34, 0.08);
}

.bento-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--leaf), var(--aqua-deep));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.bento-item:hover::before {
  opacity: 1;
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-span-3 {
  grid-column: span 3;
}

.bento-full {
  grid-column: 1 / -1;
}

.bento-row-2 {
  grid-row: span 2;
}

/* ===== Product Card ===== */
.product-card {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
  border: 1px solid rgba(14, 42, 34, 0.04);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(14, 42, 34, 0.1);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 1.5rem;
  background: var(--sand);
  transition: transform 0.6s var(--transition-smooth);
}

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

/* ===== Animated Beam ===== */
.beam-container {
  position: relative;
  padding: 2rem 0 2rem 3rem;
}

.beam-line {
  position: absolute;
  top: 0;
  left: 1.5rem;
  width: 3px;
  height: 100%;
  background: var(--leaf-light);
  z-index: 0;
}

.beam-line-fill {
  position: absolute;
  top: 0;
  left: 1.5rem;
  width: 3px;
  height: 0%;
  background: linear-gradient(to bottom, var(--leaf), var(--aqua-deep));
  z-index: 1;
  transition: height 1s var(--transition-smooth);
}

.beam-line-fill.animated {
  height: 100%;
}

.beam-node {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.beam-node:last-child {
  margin-bottom: 0;
}

.beam-node-dot {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  border-radius: 50%;
  background: var(--leaf);
  border: 3px solid var(--sand);
  flex-shrink: 0;
  margin-top: 0.4rem;
  position: relative;
  z-index: 2;
  transition: all 0.6s var(--transition-smooth);
  box-shadow: 0 0 0 4px var(--leaf-light);
}

.beam-node-dot.active {
  background: var(--aqua-deep);
  box-shadow: 0 0 0 6px rgba(11, 79, 108, 0.15);
}

/* ===== Number Ticker ===== */
.ticker-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--leaf);
}

.ticker-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* ===== Tabs ===== */
.tab-btn {
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  border: 2px solid transparent;
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
}

.tab-btn:hover {
  border-color: var(--leaf);
  color: var(--leaf);
}

.tab-btn.active {
  background: var(--leaf);
  color: white;
  border-color: var(--leaf);
}

/* ===== Dialog / Modal ===== */
dialog {
  border: none;
  border-radius: 1.25rem;
  padding: 0;
  max-width: 600px;
  width: 90vw;
  box-shadow: 0 25px 80px rgba(14, 42, 34, 0.2);
  animation: dialogIn 0.3s var(--transition-smooth);
}

dialog::backdrop {
  background: rgba(14, 42, 34, 0.6);
  backdrop-filter: blur(4px);
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: var(--sand);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.dialog-close:hover {
  background: var(--leaf);
  color: white;
}

/* ===== Mobile Nav ===== */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 42, 34, 0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 80vw;
  height: 100vh;
  background: white;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s var(--transition-smooth);
  padding: 2rem;
  box-shadow: -10px 0 40px rgba(14, 42, 34, 0.1);
}

.mobile-nav-panel.open {
  transform: translateX(0);
}

/* ===== Carousel ===== */
.carousel {
  overflow: hidden;
  position: relative;
  padding: 0 2.5rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  min-width: 100%;
  padding: 0.5rem;
}

.carousel-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: var(--leaf);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition-smooth);
  font-size: 1.1rem;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  box-shadow: 0 4px 15px rgba(79, 168, 44, 0.3);
}

.carousel-btn:hover {
  background: var(--aqua-deep);
  box-shadow: 0 6px 20px rgba(11, 79, 108, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(14, 42, 34, 0.15);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  padding: 0;
}

.carousel-dot.active {
  width: 1.5rem;
  border-radius: 9999px;
  background: var(--leaf);
}

@media (max-width: 640px) {
  .carousel {
    padding: 0 2rem;
  }

  .carousel-btn {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }
}

/* ===== Form Styles ===== */
.form-input {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 2px solid rgba(14, 42, 34, 0.1);
  border-radius: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: white;
  transition: all 0.3s var(--transition-smooth);
  outline: none;
}

.form-input:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(79, 168, 44, 0.1);
}

.form-input::placeholder {
  color: rgba(14, 42, 34, 0.35);
}

.form-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.form-error-msg {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

/* ===== Hero Float Animation ===== */
.float-anim {
  animation: float 4s ease-in-out infinite;
}

.float-anim-delay-1 { animation-delay: 0s; }
.float-anim-delay-2 { animation-delay: 1.3s; }
.float-anim-delay-3 { animation-delay: 2.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* ===== Badge Float ===== */
.badge-float {
  animation: badgeFloat 5s ease-in-out infinite;
}

.badge-float-delay-1 { animation-delay: 0.5s; }
.badge-float-delay-2 { animation-delay: 2s; }
.badge-float-delay-3 { animation-delay: 3.5s; }

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  .marquee-track {
    animation: none;
  }

  .shimmer-btn::before {
    animation: none;
    display: none;
  }
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .liquid-divider {
    height: 50px;
  }

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

  .bento-span-2,
  .bento-span-3 {
    grid-column: span 1;
  }

  .ticker-number {
    font-size: 2.5rem;
  }

  .scroll-indicator {
    display: none;
  }

  .beam-container {
    padding-left: 2.5rem;
  }

  .beam-line,
  .beam-line-fill {
    left: 1.25rem;
  }

  .beam-line {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .ticker-number {
    font-size: 2rem;
  }
}

/* ===== Misc Utilities ===== */
.section-alt {
  background-color: var(--leaf-light);
}

.dark .section-alt {
  background-color: rgba(26, 58, 48, 0.8);
}

.sand-bg {
  background-color: var(--sand);
}

.text-balance {
  text-wrap: balance;
}

/* Animasi beam node bertahap */
.beam-node .beam-node-dot {
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--sand);
}

::-webkit-scrollbar-thumb {
  background: var(--leaf);
  border-radius: 3px;
}

.dark ::-webkit-scrollbar-track {
  background: var(--ink);
}
