/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --primary:        #3B6D11;
  --primary-light:  #EAF3DE;
  --primary-border: #C0DD97;
  --accent:         #EF9F27;
  --accent-light:   #FAEEDA;
  --cta:            #D85A30;
  --cta-light:      #FAECE7;
  --surface:        #F1EFE8;
  --card:           #FFFFFF;
  --border:         #D3D1C7;
  --text-primary:   #2C2C2A;
  --text-secondary: #888780;
  --text-muted:     #B4B2A9;
  --shimmer-base:       #E0DED7;
  --shimmer-highlight:  #F5F3EE;
  --nav-bg:     #FFFFFF;
  --nav-border: #E8E6DF;

  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(44,44,42,.08), 0 1px 2px rgba(44,44,42,.04);
  --shadow-md: 0 4px 6px  rgba(44,44,42,.07), 0 2px 4px rgba(44,44,42,.05);
  --shadow-lg: 0 10px 15px rgba(44,44,42,.08), 0 4px 6px rgba(44,44,42,.05);
  --shadow-xl: 0 20px 25px rgba(44,44,42,.10), 0 10px 10px rgba(44,44,42,.04);

  --ease: cubic-bezier(.4,0,.2,1);
  --t:    all .25s var(--ease);

  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1200px;
  --px:    clamp(1rem, 5vw, 2rem);
}

/* ============================================================
   Font Faces
   ============================================================ */
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-Thin.ttf')       format('truetype'); font-weight:100; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-ExtraLight.ttf') format('truetype'); font-weight:200; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-Light.ttf')      format('truetype'); font-weight:300; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-Regular.ttf')    format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-Medium.ttf')     format('truetype'); font-weight:500; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-SemiBold.ttf')   format('truetype'); font-weight:600; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-Bold.ttf')       format('truetype'); font-weight:700; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-ExtraBold.ttf')  format('truetype'); font-weight:800; font-display:swap; }
@font-face { font-family:'Vazirmatn'; src:url('../fonts/Vazirmatn-FD-Black.ttf')      format('truetype'); font-weight:900; font-display:swap; }

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

html { scroll-behavior:smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width:100%; height:auto; display:block; }
a   { text-decoration:none; color:inherit; }
ul  { list-style:none; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left:  var(--px);
  padding-right: var(--px);
}

/* ============================================================
   Navigation
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  transition: box-shadow .3s var(--ease);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  object-fit: cover;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--t);
}

.btn-sm { padding: 8px 18px; font-size:.85rem; }

.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { background: #c04e28; transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-download {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  padding: 12px 22px;
  border-radius: var(--r-lg);
  gap: 12px;
}
.btn-download:hover {
  background: rgba(255,255,255,.28);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.btn-download svg { width:26px; height:26px; flex-shrink:0; }
.btn-download-text { display:flex; flex-direction:column; text-align:right; }
.btn-download-text small { font-size:.7rem; font-weight:400; opacity:.85; line-height:1.2; }
.btn-download-text span  { font-size:.95rem; font-weight:700; line-height:1.3; }

.btn-download--dark {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}
.btn-download--dark:hover { background: #1a1a18; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(145deg, var(--primary) 0%, #4a8a16 55%, #5aa01e 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero-blob--1 {
  width: 400px; height: 400px;
  background: rgba(239,159,39,.18);
  top: -80px; left: -80px;
}
.hero-blob--2 {
  width: 300px; height: 300px;
  background: rgba(255,255,255,.07);
  bottom: 60px; right: 10%;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: 72px;
  padding-bottom: 64px;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  margin-bottom: 24px;
  object-fit: cover;
}

.hero-title {
  font-size: clamp(2rem,5vw,3.25rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(.9rem,2vw,1.05rem);
  color: rgba(255,255,255,.85);
  max-width: 540px;
  margin-bottom: 36px;
  line-height: 1.8;
  font-weight: 400;
}

.download-buttons { display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }

.hero-wave { flex-shrink:0; line-height:0; position:relative; z-index:1; }
.hero-wave svg { width:100%; height:60px; display:block; }

/* ============================================================
   Stats
   ============================================================ */
.stats-section {
  background: var(--card);
  padding: 28px 0;
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
  flex: 1;
  max-width: 220px;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: .875rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================================
   Section Headings
   ============================================================ */
.section-header { text-align:center; margin-bottom:48px; }

.section-title {
  font-size: clamp(1.5rem,3vw,2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

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

/* ============================================================
   Features
   ============================================================ */
.features-section { padding: 80px 0; background: var(--card); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--t);
  border: 1px solid var(--border);
}
.feature-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:var(--primary-border); }

.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items:center; justify-content:center;
  flex-shrink: 0;
}
.feature-icon svg { width:22px; height:22px; }

.feature-icon--primary { background:var(--primary-light); color:var(--primary); }
.feature-icon--accent  { background:var(--accent-light);  color:var(--accent);  }
.feature-icon--cta     { background:var(--cta-light);     color:var(--cta);     }

.feature-title { font-size:1.05rem; font-weight:700; color:var(--text-primary); }
.feature-desc  { font-size:.9rem;  font-weight:400; color:var(--text-secondary); line-height:1.7; }

/* ============================================================
   Recipes
   ============================================================ */
.recipes-section { padding: 80px 0; background: var(--surface); }

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 20px;
}

.recipe-card {
  background: var(--card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--t);
  cursor: default;
}
.recipe-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-xl); }

.recipe-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--shimmer-base);
}
.recipe-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}
.recipe-card:hover .recipe-image-wrap img { transform: scale(1.06); }

.recipe-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  display: flex; align-items:center; justify-content:center;
  font-size: 3rem;
}

.recipe-badge {
  position: absolute; bottom:10px; right:10px;
  background: rgba(44,44,42,.72);
  color: #fff; font-size:.72rem; font-weight:600;
  padding: 4px 10px; border-radius:var(--r-full);
  backdrop-filter: blur(6px);
  display: flex; align-items:center; gap:4px;
}

.recipe-body { padding: 14px 16px 16px; }

.recipe-category {
  display: inline-block;
  font-size: .72rem; font-weight:600;
  color: var(--primary); background:var(--primary-light);
  padding: 3px 10px; border-radius:var(--r-full);
  margin-bottom: 8px;
}

.recipe-name {
  font-size: .98rem; font-weight:700;
  color: var(--text-primary); line-height:1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Videos
   ============================================================ */
.videos-section { padding: 80px 0; background: var(--card); }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
  gap: 20px;
}

.video-card {
  background: var(--card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--t);
  cursor: default;
}
.video-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-xl); }

.video-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--text-primary);
}
.video-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .8;
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.video-card:hover .video-thumb-wrap img { opacity:1; transform:scale(1.05); }

.video-thumb-placeholder {
  width:100%; height:100%;
  background: linear-gradient(135deg, var(--primary), #2d5209);
}

.play-btn {
  position: absolute; top:50%; left:50%;
  transform: translate(-50%,-50%);
  width: 52px; height:52px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  transition: var(--t);
}
.play-btn svg { width:18px; height:18px; color:var(--primary); margin-right:-2px; }
.video-card:hover .play-btn { background:#fff; transform:translate(-50%,-50%) scale(1.12); box-shadow:0 4px 16px rgba(0,0,0,.22); }

.video-count {
  position: absolute; bottom:10px; left:10px;
  background: rgba(44,44,42,.72);
  color:#fff; font-size:.72rem; font-weight:600;
  padding:4px 10px; border-radius:var(--r-full);
  backdrop-filter: blur(6px);
}

.video-body { padding:14px 16px 16px; }

.video-title {
  font-size:.98rem; font-weight:700;
  color:var(--text-primary); line-height:1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-desc {
  font-size:.85rem; color:var(--text-secondary); margin-top:6px; line-height:1.5;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* ============================================================
   Skeleton Shimmer
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.recipe-skeleton,
.video-skeleton {
  background: linear-gradient(90deg, var(--shimmer-base) 0%, var(--shimmer-highlight) 50%, var(--shimmer-base) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-xl);
}
.recipe-skeleton { aspect-ratio:3/4; min-height:260px; }
.video-skeleton  { aspect-ratio:4/3; min-height:200px; }

/* ============================================================
   Empty / Error State
   ============================================================ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 48px 16px;
  font-size: .95rem;
}

/* ============================================================
   Download CTA
   ============================================================ */
.download-section {
  padding: 88px 0;
  background: linear-gradient(145deg, var(--primary) 0%, #4a8a16 100%);
  position: relative;
  overflow: hidden;
}

.download-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.download-blob--1 { width:350px; height:350px; background:rgba(239,159,39,.18); top:-60px; right:-60px; }
.download-blob--2 { width:280px; height:280px; background:rgba(255,255,255,.07); bottom:-40px; left:5%; }

.download-content {
  position: relative; z-index:1;
  display: flex; flex-direction:column;
  align-items: center; text-align:center;
}

.download-icon {
  width:80px; height:80px; border-radius:18px;
  box-shadow:0 8px 24px rgba(0,0,0,.2);
  margin-bottom:24px; object-fit:cover;
}

.download-title {
  font-size: clamp(1.75rem,4vw,2.5rem);
  font-weight:800; color:#fff; margin-bottom:12px;
}

.download-subtitle { font-size:1.05rem; color:rgba(255,255,255,.8); margin-bottom:36px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background:var(--text-primary); padding:32px 0; }

.footer-content {
  display: flex; align-items:center;
  justify-content:space-between; gap:16px; flex-wrap:wrap;
}

.logo--light .logo-text { color:#fff; }

.footer-copy { font-size:.85rem; color:var(--text-muted); }

/* ============================================================
   Scroll Animations
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.fade-up.visible { opacity:1; transform:translateY(0); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .stat-item { padding: 0 18px; }
  .stat-number { font-size:1.4rem; }
  .features-grid { grid-template-columns:1fr 1fr; gap:14px; }
  .recipes-grid  { grid-template-columns:repeat(2,1fr); gap:14px; }
  .videos-grid   { grid-template-columns:1fr; }
  .footer-content { flex-direction:column; align-items:center; text-align:center; }
}

@media (max-width: 480px) {
  .hero-subtitle br { display:none; }
  .features-grid { grid-template-columns:1fr; }
  .recipes-grid  { grid-template-columns:1fr; }
  .stat-item     { padding:0 10px; }
  .download-buttons { flex-direction:column; align-items:center; }
  .btn-download  { width:210px; justify-content:center; }
}
