/* ==========================================================================
   Home Ledger — Clean & Human-Centered Design System (Default Light)
   ========================================================================== */

:root {
  --bg-body: #FFFFFF;
  --bg-subtle: #F6F6F9;
  --bg-card: #FFFFFF;
  --bg-card-alt: #F8F8FA;
  --bg-interactive: #ECECEE;

  --border-light: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.12);

  --text-main: #1C1C1E;
  --text-muted: #636366;
  --text-light: #8E8E93;

  --accent-gold: #B45309;
  --accent-gold-bg: rgba(245, 158, 11, 0.12);
  --accent-teal: #0F766E;
  --accent-teal-bg: rgba(15, 118, 110, 0.10);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 16px 40px rgba(0, 0, 0, 0.06);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-body: #0A0A0C;
  --bg-subtle: #121215;
  --bg-card: #161619;
  --bg-card-alt: #1D1D22;
  --bg-interactive: #2C2C32;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text-main: #F2F2F7;
  --text-muted: #98989D;
  --text-light: #636366;

  --accent-gold: #FBBF24;
  --accent-gold-bg: rgba(251, 191, 36, 0.15);
  --accent-teal: #2DD4BF;
  --accent-teal-bg: rgba(45, 212, 191, 0.14);

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 16px 40px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Hind Siliguri', 'Plus Jakarta Sans', -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

body[lang="en"] {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 58px;
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.nav-icon {
  border-radius: 8px;
  display: block;
}

.nav-titles {
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.nav-sub {
  font-size: 11px;
  color: var(--text-muted);
}

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

.pill-btn-subtle {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
}

.pill-btn-subtle:hover {
  border-color: var(--border-strong);
}

.pill-btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: var(--radius-pill);
}

.pill-btn-icon:hover {
  color: var(--text-main);
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--text-main);
  color: var(--bg-body);
  text-decoration: none;
  transition: opacity 0.15s;
}

.nav-cta:hover {
  opacity: 0.88;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon-box {
  margin-bottom: 20px;
}

.hero-logo {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hero-title {
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.hero-subtitle {
  max-width: 520px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 48px;
  width: 100%;
  max-width: 440px;
  justify-content: center;
}

.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.15s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-body);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
}

/* ==========================================================================
   App Frame Preview
   ========================================================================== */
.app-frame {
  width: 100%;
  max-width: 720px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  text-align: left;
}

.app-frame-header {
  height: 42px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.app-dots {
  display: flex;
  gap: 6px;
}

.app-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-light);
  opacity: 0.4;
}

.app-month-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.app-frame-body {
  padding: 24px;
}

.funds-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.f-card {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card-alt);
}

.f-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.f-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.f-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  background: var(--accent-gold-bg);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.f-active {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-teal);
}

.f-amount {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--text-main);
}

.f-amount .taka {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-muted);
}

.f-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

.quick-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
}

.q-item strong {
  color: var(--text-main);
  margin-right: 4px;
}

.q-dot {
  color: var(--border-strong);
}

/* ==========================================================================
   Sections Common
   ========================================================================== */
.section {
  padding: 64px 0;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 36px;
}

.section-heading {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.section-subheading {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 3 Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feat-box {
  padding: 28px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.feat-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: var(--text-main);
  color: var(--bg-body);
  margin-bottom: 14px;
}

.feat-box h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
}

.feat-box p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==========================================================================
   Interactive Calculator Card
   ========================================================================== */
.calc-card {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  align-items: center;
}

.calc-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.calc-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.calc-stat-box {
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.stat-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
}

.stat-num {
  font-size: 28px;
  font-weight: 700;
  margin: 4px 0;
  color: var(--text-main);
}

.stat-msg {
  font-size: 13px;
  color: var(--text-muted);
}

.calc-sliders {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}

.slider-bold {
  font-weight: 700;
  color: var(--text-main);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: var(--border-strong);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-main);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.calc-results-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}

.res-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.res-label {
  font-size: 12px;
  color: var(--text-muted);
}

.res-metric {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent-teal);
}

/* ==========================================================================
   Pantry Grid
   ========================================================================== */
.pantry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 18px;
}

.p-card {
  padding: 22px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.p-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.p-qty {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.p-tag {
  font-size: 12px;
  font-weight: 600;
}

.p-tag.in-stock {
  color: var(--accent-teal);
}

.p-tag.req-tag {
  color: var(--accent-gold);
}

.p-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.p-info {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.p-btn {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.p-btn:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
}

.p-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.p-req-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.p-req-meta strong {
  font-size: 13.5px;
  display: block;
}

.p-req-meta span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.p-buy {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--text-main);
  color: var(--bg-body);
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Download Section
   ========================================================================== */
.text-center {
  text-align: center;
}

.downloads-flex {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.dl-box {
  width: 320px;
  padding: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.15s var(--ease);
  text-align: left;
}

.dl-box:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.dl-box:active {
  transform: scale(0.98);
}

.dl-icon {
  color: var(--text-main);
}

.dl-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dl-details strong {
  font-size: 16px;
  color: var(--text-main);
}

.dl-details span {
  font-size: 13px;
  color: var(--text-muted);
}

.dl-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border-light);
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-copy {
  margin: 0;
  line-height: 1.6;
}

.footer-link {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
  font-weight: 500;
  transition: color 0.15s var(--ease), text-decoration-color 0.15s var(--ease);
}

.footer-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-title { font-size: 2.1rem; }
  .hero-subtitle { font-size: 16px; }
  .funds-row { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .calc-card { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .pantry-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .dl-box { width: 100%; }
}
