/* === CUSTOM PROPERTIES (VARIABLES) === */
:root {
  --color-navy: #112A46;
  --color-magenta: #E40066;
  --color-white: #FFFFFF;
  --color-offwhite: #F8F9FB;
  --color-gray: #EFF1F5;
  --color-dark-surface: #0B192A;
  --color-text-body: #475467;
  --color-text-light: #98A2B3;
  
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(17, 42, 70, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(17, 42, 70, 0.1), 0 2px 4px -1px rgba(17, 42, 70, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(17, 42, 70, 0.1), 0 4px 6px -2px rgba(17, 42, 70, 0.05);
  --shadow-glass: 0 8px 32px 0 rgba(17, 42, 70, 0.08);

  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-body);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.2;
}

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

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* === LAYOUT UTILITIES === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-magenta { color: var(--color-magenta); }
.text-navy { color: var(--color-navy); }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-text-light); }
.center { text-align: center; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.d-block { display: block; }
.d-flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;}
.w-100 { width: 100%; }

.hero-text,
.hero-visual,
.glass-card,
.glass-card-dark,
.research-card,
.dash-card,
.recipe-ingredients,
.recipe-steps,
.lab-controls,
.lab-visual,
.footer-brand,
.footer-links {
  min-width: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--color-magenta);
  color: var(--color-white);
  box-shadow: 0 4px 14px 0 rgba(228, 0, 102, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #c20057;
  box-shadow: 0 6px 20px rgba(228, 0, 102, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}

.btn-outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

/* Glassmorphism Cards */
.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  padding: 32px;
}

.glass-card-dark {
  background: rgba(17, 42, 70, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--color-white);
}

.glass-card-dark h3, 
.glass-card-dark label, 
.glass-card-dark p {
  color: var(--color-white);
}

/* Animation Utilities */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-up { transform: translateY(40px); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-gray);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  height: 70px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  color: var(--color-navy);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0; height: 2px;
  bottom: -4px; left: 0;
  background-color: var(--color-magenta);
  transition: width 0.3s;
}

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

.hamburger-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px;
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block; width: 25px; height: 3px;
  background: var(--color-navy);
  transition: var(--transition);
}

/* === SECTION STYLES === */
section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 60px 0;
  }
}

.section-light { background-color: var(--color-white); }
.section-dark { background-color: var(--color-navy); color: var(--color-white); }
.section-dark h2 { color: var(--color-white); }

.section-header {
  margin-bottom: 60px;
  max-width: 700px;
}

.section-header.center {
  margin-left: auto; margin-right: auto;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  letter-spacing: 0;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-body);
}

.section-dark .section-header p { color: rgba(255,255,255,0.8); }

/* === BERANDA (HERO) === */
.section-hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--color-offwhite) 0%, var(--color-white) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-block;
  max-width: 100%;
  padding: 6px 14px;
  background: rgba(228, 0, 102, 0.1);
  color: var(--color-magenta);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
  white-space: normal;
}

.hero-text h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: 0;
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero-desc {
  font-size: 1.15rem;
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 16px;
}

/* Hero Visual & Mockup */
.hero-visual {
  position: relative;
  perspective: 1000px;
}

.hero-card {
  padding: 20px;
  position: relative;
  transform: rotateY(-5deg) rotateX(5deg);
  transition: transform 0.5s ease;
}

.hero-card:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

.mockup-img-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #f0f0f0;
  position: relative;
  aspect-ratio: 1/1;
}

.mockup-img-container img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.floating-stat {
  position: absolute;
  background: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glass);
  display: flex;
  flex-direction: column;
  z-index: 10;
  animation: float 4s ease-in-out infinite;
}

.floating-stat strong {
  color: var(--color-navy);
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.floating-stat span {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.stat-1 { top: -20px; right: -20px; animation-delay: 0s; }
.stat-2 { bottom: 40px; left: -30px; animation-delay: 2s; }

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

/* === PENELITIAN === */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.research-card {
  background: var(--color-offwhite);
  border: none;
  transition: var(--transition);
}

.research-card:hover {
  background: var(--color-white);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.research-card h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.ingredient-list li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
}

.ingredient-list li::before {
  content: '✓';
  color: var(--color-magenta);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* === KALKULATOR GIZI === */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-navy);
}

.glass-card-dark .form-group label {
  color: rgba(255,255,255,0.9);
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--color-text-body);
  font-size: 0.85rem;
}

.glass-card-dark .form-group small {
  color: rgba(255,255,255,0.6);
}

select, input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

select option {
  color: var(--color-navy);
}

select:focus, input:focus {
  outline: none;
  border-color: var(--color-magenta);
  background: rgba(255,255,255,0.1);
}

.result-view h3 {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
  font-weight: 500;
}

.result-number {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--color-magenta);
  line-height: 1;
  margin-bottom: 30px;
}

.result-number small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-white);
}

.progress-container {
  margin-bottom: 20px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #34D399; /* Green for AKG */
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.pb-magenta .progress-fill {
  background: var(--color-magenta);
}

.klaim-status {
  margin-top: 24px;
  padding: 12px;
  background: rgba(52, 211, 153, 0.15);
  border-left: 4px solid #34D399;
  border-radius: 4px;
  font-size: 0.9rem;
}

/* === DASHBOARD === */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.dash-card h3 {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

.cost-analysis {
  background: var(--color-offwhite);
  text-align: center;
}

.cost-analysis h3 {
  margin-bottom: 24px;
}

.cost-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cost-item {
  padding: 16px 24px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.cost-label {
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cost-value {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  color: var(--color-navy);
}

.highlight-cost { border-bottom: 4px solid var(--color-navy); }
.highlight-sell { border-bottom: 4px solid var(--color-magenta); }

/* === RESEP === */
.recipe-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.multiplier-control {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.1);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.multiplier-control button {
  background: var(--color-magenta);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; justify-content: center; align-items: center;
  font-weight: bold; cursor: pointer;
  transition: transform 0.2s;
}

.multiplier-control button:hover { transform: scale(1.1); }
#recipe-multiplier { font-size: 0.9rem; font-weight: 500; width: 65px; text-align: center;}

.ing-list {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 12px;
}

.ing-list li {
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(255,255,255,0.2);
}

.ing-qty {
  font-weight: 700;
  color: var(--color-magenta);
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.step-list {
  padding-left: 20px;
}

.step-list li {
  margin-bottom: 16px;
  padding-left: 8px;
}

.step-list li strong {
  display: block;
  color: var(--color-magenta);
  margin-bottom: 4px;
}

/* === EDUKASI === */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.edu-card {
  text-align: center;
}

.edu-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

/* === FOOTER === */
footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.8);
  padding: 80px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  color: var(--color-white);
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.footer-links h4 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.7);
}

.footer-links a:hover {
  color: var(--color-magenta);
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* === V2 VIRTUAL LAB === */
.lab-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 20px; }
.dough-ball { width: 180px; height: 180px; border-radius: 50%; margin: 0 auto; background-color: rgb(220, 210, 195); border: 6px solid var(--color-white); transition: background-color 0.3s; box-shadow: inset -10px -10px 20px rgba(0,0,0,0.2), 0 10px 20px rgba(0,0,0,0.1); }

/* === V2 FLIP CARDS === */
.flip-card { background-color: transparent; min-height: 280px; perspective: 1000px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.6s; transform-style: preserve-3d; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; border-radius: var(--radius-lg); }
.flip-card-back { transform: rotateY(180deg); }

/* === MEDIA QUERIES === */
@media (max-width: 992px) {
  .hero-text h1 { font-size: 3rem; }
  .calc-container, .dashboard-grid, .recipe-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .container,
  .nav-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .navbar,
  .navbar.scrolled {
    height: 72px;
  }

  .logo {
    font-size: 1.25rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: auto;
    width: 100%;
    height: calc(100dvh - 72px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    overflow-y: auto;
  }
  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-links a { font-size: 1rem; }
  .hamburger-btn { display: flex; z-index: 1001; }
  .hamburger-btn.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger-btn.active span:nth-child(2) { opacity: 0; }
  .hamburger-btn.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .section-header {
    margin-bottom: 36px;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header p,
  .hero-desc {
    font-size: 1rem;
  }

  .section-hero {
    min-height: auto;
    padding: 104px 0 56px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

  .hero-desc {
    margin: 0 auto 28px;
    max-width: 100%;
  }

  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; }

  .hero-visual {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    perspective: none;
  }

  .hero-card,
  .hero-card:hover {
    transform: none;
  }

  .hero-card {
    padding: 14px;
  }

  .floating-stat {
    position: relative;
    top: 0 !important;
    left: 0 !important;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 280px;
    margin: 12px auto 0;
    align-items: center;
    text-align: center;
    animation: none;
  }

  .glass-card,
  .glass-card-dark {
    padding: 20px;
  }

  .research-grid,
  .edu-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .calc-container,
  .dashboard-grid,
  .recipe-container,
  .lab-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .lab-container {
    text-align: left;
  }

  .dough-ball {
    width: 150px;
    height: 150px;
  }

  .result-number {
    font-size: 2.4rem;
  }

  .progress-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .chart-container {
    height: 260px;
  }

  .cost-inputs {
    align-items: stretch;
  }

  .cost-inputs .form-group {
    width: 100% !important;
    min-width: 0 !important;
  }

  .cost-grid {
    gap: 14px;
  }

  .cost-item {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
  }

  .recipe-container.glass-card-dark {
    padding: 20px;
  }

  .recipe-ingredients .d-flex-between {
    align-items: flex-start;
  }

  .multiplier-control {
    width: 100%;
    justify-content: space-between;
    margin-top: 12px;
    border-radius: var(--radius-md);
  }

  .flip-card {
    min-height: 300px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .container,
  .nav-container {
    padding-left: 16px;
    padding-right: 16px;
  }

  section {
    padding: 48px 0;
  }

  .section-hero {
    padding: 96px 0 48px;
  }

  .badge {
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 6px 10px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-cta {
    gap: 12px;
  }

  .btn {
    min-height: 46px;
    padding: 12px 16px;
    font-size: 0.95rem;
    text-align: center;
  }

  .glass-card,
  .glass-card-dark {
    padding: 16px;
  }

  .mockup-img-container {
    border-radius: 8px;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .research-card h3 {
    font-size: 1.25rem;
  }

  select,
  input {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .result-number {
    font-size: 2rem;
  }

  .chart-container {
    height: 230px;
  }

  .dough-ball {
    width: 140px;
    height: 140px;
    border-width: 4px;
  }

  .edu-icon {
    font-size: 2.4rem;
  }

  .flip-card {
    min-height: 320px;
  }

  footer {
    padding: 56px 0 20px;
  }

  .footer-brand h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 360px) {
  .logo {
    font-size: 1.15rem;
  }

  .hero-text h1 {
    font-size: 1.65rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }
}
