/* ==========================================================================
   NanoKhata Blog
   Static, text-first guides for small shops in Nepal.
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Noto Sans Devanagari", "Mangal", "Nirmala UI", Arial, sans-serif;
  --canvas: #f4f6f8;
  --surface: #ffffff;
  --subtle: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border: #e2e8f0;
  --hairline: #eef2f6;
  --primary: #368098;
  --primary-dark: #2b677a;
  --primary-soft: #eaf2f5;
  --primary-border: #a9c8d2;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--canvas);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.blog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.blog-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

.blog-brand img {
  height: 28px;
  width: auto;
}

.blog-brand span {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.blog-nav a {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.blog-nav a:hover {
  color: var(--text-primary);
}

.blog-nav .nav-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-xs);
  color: #ffffff;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.blog-nav .nav-start:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
}

/* Index */
.blog-main {
  padding: 52px 0 76px;
}

.blog-hero {
  max-width: 720px;
  padding-bottom: 36px;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.blog-hero h1 {
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.blog-hero p {
  margin-top: 14px;
  max-width: 620px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.post-grid {
  display: grid;
  gap: 14px;
  max-width: 900px;
}

.post-card {
  display: block;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.post-card:hover {
  border-color: var(--primary-border);
  background: #fbfdfe;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.post-card-meta .category {
  color: var(--primary-dark);
}

.post-card h2 {
  margin: 10px 0 7px;
  font-size: 1.16rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.post-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.read-link svg {
  width: 14px;
  height: 14px;
}

/* Article */
.article {
  padding: 36px 0 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.article-header {
  max-width: 760px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.article-header .eyebrow {
  margin-bottom: 8px;
}

.article-title {
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.post-dek {
  margin-top: 14px;
  max-width: 680px;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 18px;
  font-size: 0.78rem;
  color: var(--text-faint);
}

.byline span + span {
  position: relative;
  padding-left: 16px;
}

.byline span + span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  transform: translateY(-50%);
}

.post-body {
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text-secondary);
}

.post-body > * + * {
  margin-top: 15px;
}

.post-body h2 {
  margin-top: 34px;
  font-size: 1.32rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.post-body h3 {
  margin-top: 24px;
  font-size: 1.06rem;
  color: var(--text-primary);
}

.post-body ul,
.post-body ol {
  padding-left: 22px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body strong {
  color: var(--text-primary);
}

.post-body a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-decoration-color: var(--primary-border);
  text-underline-offset: 3px;
}

.post-body a:hover {
  text-decoration-color: var(--primary-dark);
}

.post-body blockquote {
  padding: 14px 18px;
  background: var(--subtle);
  border-left: 3px solid var(--primary-border);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 8px;
  padding: 22px 24px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
}

.post-cta p {
  margin: 0;
  max-width: 430px;
}

.post-cta .cta-title {
  display: block;
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-primary);
}

.post-cta .cta-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.post-cta .cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-xs);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.post-cta .cta-button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.post-related {
  max-width: 700px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.post-related h2 {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.related-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.related-list a {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-primary);
}

.related-list a:hover {
  color: var(--primary-dark);
}

.article-footer {
  max-width: 700px;
  margin-top: 34px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.back-link svg {
  width: 14px;
  height: 14px;
}

/* Footer */
.site-footer {
  margin-top: 56px;
  padding: 26px 0;
  background: var(--surface);
  border-top: 1px solid var(--hairline);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

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

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .blog-header-inner {
    height: 58px;
  }

  .blog-nav a:not(.nav-start) {
    display: none;
  }

  .blog-main {
    padding: 36px 0 56px;
  }

  .post-card {
    padding: 20px;
  }

  .article {
    padding-top: 26px;
  }

  .article-title {
    font-size: 1.85rem;
  }

  .post-body {
    font-size: 0.98rem;
  }

  .post-cta {
    padding: 18px;
  }
}
