/* ==========================================================================
   MASAK APA? - DESIGN SYSTEM & CORE STYLES
   Warm, Modern, Friendly Culinary Aesthetic
   ========================================================================== */

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

:root {
  /* Primary Warm Culinary Colors */
  --primary: #f06a25;
  --primary-hover: #d95311;
  --primary-light: #ff8c42;
  --primary-soft: #fff4ed;
  --primary-gradient: linear-gradient(135deg, #f06a25 0%, #ff8c42 100%);
  --primary-glow: 0 8px 24px rgba(240, 106, 37, 0.28);

  /* Secondary Fresh Herb Green */
  --secondary: #2b8a3e;
  --secondary-hover: #237032;
  --secondary-soft: #ebfbee;
  --secondary-gradient: linear-gradient(135deg, #2b8a3e 0%, #51cf66 100%);

  /* Accent Gold / Amber */
  --accent: #f59f00;
  --accent-soft: #fff9db;

  /* Neutral Surface & Backgrounds */
  --bg-page: #fdfbf7;
  --surface: #ffffff;
  --surface-alt: #fbf7f2;
  --surface-tint: #fff9f5;
  
  /* Text & Typography */
  --text-primary: #212529;
  --text-secondary: #5c554e;
  --text-muted: #8c8278;
  --text-light: #ffffff;

  /* Borders & Dividers */
  --border-color: #ede4db;
  --border-light: #f5ede4;
  --border-active: #f06a25;

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(60, 40, 20, 0.04);
  --shadow-md: 0 6px 18px rgba(60, 40, 20, 0.08);
  --shadow-lg: 0 16px 36px rgba(60, 40, 20, 0.12);
  --shadow-hover: 0 12px 28px rgba(240, 106, 37, 0.16);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

.app-main-layout {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-logo .logo-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 2px 4px rgba(240, 106, 37, 0.2));
  transform: rotate(-5deg);
  transition: transform var(--transition-fast);
}

.brand-logo:hover .logo-icon {
  transform: rotate(10deg) scale(1.1);
}

.brand-highlight {
  color: var(--primary);
}

.site-nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--primary-soft);
}

.nav-link.nav-link-active {
  color: var(--primary);
  background-color: var(--primary-soft);
  font-weight: 700;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background-color: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-badge.badge-green {
  background-color: var(--secondary);
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--primary-glow);
  transition: all var(--transition-normal);
}

.btn-header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(240, 106, 37, 0.38);
}

.mobile-nav-toggle {
  display: none;
  font-size: 1.5rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */
.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--primary-glow);
  transition: all var(--transition-normal);
  text-align: center;
  font-size: 0.95rem;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(240, 106, 37, 0.4);
}

.btn-primary-glow:active {
  transform: translateY(0);
}

.btn-primary-glow.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-primary-glow.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.btn-primary-glow.btn-block {
  width: 100%;
}

.btn-outline-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.btn-outline-primary:hover {
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.btn-outline-primary.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.btn-secondary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--secondary-gradient);
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 20px rgba(43, 138, 62, 0.25);
  transition: all var(--transition-fast);
}

.btn-secondary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(43, 138, 62, 0.35);
}

.btn-text-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
  transition: color var(--transition-fast);
}

.btn-text-primary:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.btn-text-danger {
  color: #e03131;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: #fff5f5;
  transition: all var(--transition-fast);
}

.btn-text-danger:hover {
  background-color: #ffe3e3;
}

/* ==========================================================================
   APP VIEWS WRAPPER
   ========================================================================== */
.app-view-panel {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.app-view-panel.active-view {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, #fff0e6 0%, #fffdf9 75%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.hero-decorative-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(50px);
  opacity: 0.5;
  z-index: 0;
}

.circle-1 {
  width: 320px;
  height: 320px;
  background: #ffd8a8;
  top: -80px;
  left: -60px;
}

.circle-2 {
  width: 360px;
  height: 360px;
  background: #d3f9d8;
  bottom: -90px;
  right: -80px;
}

.hero-inner-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
}

.hero-subheadline {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats-banner {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  gap: 1.5rem;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.hero-stat-item strong {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stat-item span {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-stat-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-color);
}

/* ==========================================================================
   PILLARS SECTION (3 FEATURE CARDS)
   ========================================================================== */
.pillars-section {
  padding: 4rem 0 3rem;
}

.section-heading-center {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}

.sub-pill {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.65rem;
}

.section-title-lg {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.section-subtitle-muted {
  font-size: 1rem;
  color: var(--text-secondary);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: background var(--transition-fast);
}

.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: #ffd8a8;
}

.pillar-card:hover::before {
  background: var(--primary-gradient);
}

.pillar-icon-box {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 1.35rem;
}

.pillar-icon-box.bg-orange {
  background: #fff4ed;
}

.pillar-icon-box.bg-purple {
  background: #f3f0ff;
}

.pillar-icon-box.bg-green {
  background: #ebfbee;
}

.pillar-title {
  font-family: var(--font-heading);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.pillar-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.4rem;
  flex: 1;
}

.pillar-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   HOME RECIPES SECTIONS
   ========================================================================== */
.home-recipes-section {
  padding: 3.5rem 0;
}

.home-recipes-section.bg-soft-amber {
  background-color: #fff9f2;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.home-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.6rem;
}

.section-badge-tag.gold {
  background-color: #fff3bf;
  color: #d97706;
}

.section-badge-tag.silver {
  background-color: #f1f3f5;
  color: #495057;
}

.section-badge-tag.green {
  background-color: #ebfbee;
  color: #2b8a3e;
}

.home-section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.home-section-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Grid Kartu Resep */
.recipes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.85rem;
}

/* Banner Tips */
.home-tips-banner {
  margin: 3.5rem 0 4.5rem;
}

.tips-banner-content {
  background: linear-gradient(135deg, #343a40 0%, #212529 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.2rem;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}

.tips-lamp-icon {
  font-size: 2.8rem;
  background: rgba(255, 255, 255, 0.1);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.tips-texts {
  flex: 1;
  min-width: 260px;
}

.tips-texts h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #ffd43b;
}

.tips-texts p {
  font-size: 0.92rem;
  color: #ced4da;
  line-height: 1.6;
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-outline-light:hover {
  background: #ffffff;
  color: #212529;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: 1.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   TOAST NOTIFICATION CONTAINER
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: #212529;
  color: #ffffff;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.92rem;
  font-weight: 600;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.toast-item.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-item.toast-exit {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
}

.toast-item.toast-success {
  border-left: 4px solid var(--secondary);
}

.toast-item.toast-warning {
  border-left: 4px solid var(--accent);
}

.toast-item.toast-info {
  border-left: 4px solid var(--primary);
}
