/* =========================================================
   ND Lama — ndlama.com
   Warm & editorial style · mobile-first · accessible
   ========================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Palette */
  --cream:        #F9F5EE;
  --cream-2:      #F1ECE1;
  --ink:          #1E1A15;
  --ink-soft:     #3A2E23;
  --muted:        #6E6259;
  --line:         #E3DBCB;
  --terracotta:   #C65D3E;
  --terracotta-d: #A64828;
  --green:        #2D4A3E;
  --green-soft:   #3E6754;
  --gold:         #C9A24B;

  /* Type */
  --serif:  'Lora', 'Georgia', 'Times New Roman', serif;
  --sans:   'Inter', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  --deva:   'Noto Serif Devanagari', 'Lora', serif;

  /* Scale */
  --fs-xs: .82rem;
  --fs-sm: .92rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.35rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-4xl: clamp(2.2rem, 5.2vw, 3.8rem);
  --fs-5xl: clamp(2.8rem, 7vw, 5rem);

  /* Spacing / layout */
  --radius: 10px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 8px rgba(30, 26, 21, 0.06);
  --shadow-md: 0 8px 24px rgba(30, 26, 21, 0.08);
  --shadow-lg: 0 20px 50px rgba(30, 26, 21, 0.12);
  --container: 1180px;
  --header-h: 72px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--terracotta-d); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink); }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }

p { margin: 0 0 1.1em; }
.lede { font-size: var(--fs-lg); color: var(--ink-soft); }

.deva { font-family: var(--deva); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--cream);
  padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- 3. Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(249, 245, 238, 0.92);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: .65rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green);
  color: var(--cream);
  display: inline-grid; place-items: center;
  font-family: var(--serif); font-weight: 600;
  letter-spacing: .02em;
}
.nav-list {
  list-style: none; display: flex; gap: 1.4rem;
  margin: 0; padding: 0;
}
.nav-list a {
  color: var(--ink-soft); font-weight: 500; font-size: var(--fs-sm);
  padding: .4rem 0; position: relative;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 2px; background: var(--terracotta);
  transition: width .25s ease;
}
.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after { width: 100%; }
.nav-list a[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .55rem;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  margin: 4px 0; transition: transform .25s, opacity .2s;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
  }
  .nav-list.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-list a { display: block; padding: .9rem 0; font-size: 1rem; }
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.3rem;
  border-radius: 999px;
  font-weight: 600; font-size: var(--fs-sm);
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  letter-spacing: .01em;
}
.btn-primary {
  background: var(--terracotta); color: #fff;
}
.btn-primary:hover { background: var(--terracotta-d); color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-ghost {
  background: transparent; color: var(--ink-soft); border-color: var(--line);
}
.btn-ghost:hover { background: var(--cream-2); color: var(--ink); }

/* ---------- 5. Hero ---------- */
.hero {
  padding: 4rem 0 3rem;
  background:
    radial-gradient(1100px 420px at 85% -10%, rgba(198, 93, 62, .14), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(45, 74, 62, .12), transparent 60%),
    var(--cream);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: 3rem; align-items: center;
}
.hero-eyebrow {
  font-family: var(--sans); font-size: var(--fs-sm);
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--green); font-weight: 600; margin-bottom: 1rem;
}
.hero h1 {
  font-size: var(--fs-5xl); margin: 0 0 1rem; line-height: 1.05;
}
.hero h1 em {
  font-style: italic; color: var(--terracotta-d); font-weight: 500;
}
.hero .tagline {
  font-family: var(--serif); font-style: italic; font-size: var(--fs-xl);
  color: var(--ink-soft); margin-bottom: 1.3rem;
}
.hero p { font-size: var(--fs-lg); color: var(--ink-soft); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.hero-portrait {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
  background: linear-gradient(155deg, var(--green) 0%, var(--green-soft) 55%, var(--gold) 120%);
}
.hero-portrait::after {
  content: "Your photo here";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,.8);
  font-family: var(--serif); font-style: italic; font-size: 1.1rem;
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.hero-portrait .badge {
  position: absolute; bottom: 1.2rem; left: 1.2rem; z-index: 2;
  background: var(--cream); color: var(--ink);
  padding: .55rem .9rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 820px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-portrait { max-width: 380px; margin: 0 auto; }
}

/* ---------- 6. Sections ---------- */
.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-alt { background: var(--cream-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head p { color: var(--muted); margin: 0; max-width: 52ch; }
.kicker {
  font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .2em;
  color: var(--terracotta-d); font-weight: 600; margin-bottom: .6rem;
}

/* ---------- 7. Featured strip ---------- */
.feature-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column; gap: .4rem;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .tag {
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .15em;
  color: var(--green); font-weight: 700;
}
.feature h3 { margin: .2rem 0 .5rem; font-size: 1.3rem; }
.feature p { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 1rem; }
.feature .feature-link { margin-top: auto; font-weight: 600; font-size: var(--fs-sm); }

/* ---------- 8. Books grid ---------- */
.books-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.book-card {
  background: #fff; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.book-cover {
  aspect-ratio: 2 / 3; background: var(--cream-2);
  display: grid; place-items: center;
  overflow: hidden; position: relative;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover.placeholder {
  background: linear-gradient(155deg, var(--green) 0%, var(--green-soft) 100%);
  color: var(--cream); padding: 1.2rem; text-align: center;
}
.book-cover.placeholder .ph-title {
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.2;
}
.book-cover.placeholder .ph-sub {
  font-size: var(--fs-xs); opacity: .85; margin-top: .5rem;
  letter-spacing: .12em; text-transform: uppercase;
}
.book-body { padding: 1rem 1.1rem 1.2rem; }
.book-body h3 {
  font-size: 1.15rem; margin: 0 0 .25rem;
}
.book-body .book-sub { color: var(--muted); font-size: var(--fs-sm); margin-bottom: .75rem; }
.book-status {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600;
  padding: .2rem .6rem; border-radius: 999px;
  background: var(--cream-2); color: var(--green);
  letter-spacing: .08em; text-transform: uppercase;
}
.book-status.coming { background: #FBEFE0; color: #8B5A1F; }

/* ---------- 9. Book detail ---------- */
.book-hero {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: start;
  padding: 3.5rem 0;
}
.book-hero .cover-wrap {
  aspect-ratio: 2/3; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--cream-2);
}
.book-hero .cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.book-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.book-meta span {
  background: var(--cream-2); color: var(--ink-soft);
  padding: .3rem .7rem; border-radius: 999px; font-size: var(--fs-xs);
}
.access-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .8rem; margin-top: 1.2rem;
}
.access-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; background: #fff; transition: border-color .2s;
}
.access-card:hover { border-color: var(--terracotta); }
.access-card .ico {
  font-family: var(--serif); font-weight: 700; color: var(--terracotta);
  font-size: 1.4rem;
}
.access-card strong { display: block; margin-top: .3rem; }
.access-card small { color: var(--muted); font-size: var(--fs-xs); }

@media (max-width: 820px) {
  .book-hero { grid-template-columns: 1fr; gap: 1.6rem; padding: 2rem 0; }
  .book-hero .cover-wrap { max-width: 280px; }
}

/* ---------- 10. Video / media ---------- */
.video-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.video-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.video-embed {
  aspect-ratio: 16 / 9; background: #0d0d0d;
  position: relative; overflow: hidden;
}
.video-embed iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, #242423, #3A2E23);
  color: var(--cream); font-family: var(--serif); font-style: italic;
}
.video-body { padding: 1rem 1.2rem 1.2rem; }
.video-body h3 { font-size: 1.15rem; margin: 0 0 .3rem; }
.video-body p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }

/* ---------- 11. Projects ---------- */
.project-block { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.project-block:last-child { border-bottom: 0; }
.project-block .project-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.project-block .project-head .emoji {
  font-size: 1.6rem; width: 48px; height: 48px;
  background: var(--cream-2); border-radius: 50%;
  display: grid; place-items: center;
}
.project-block .project-head h2 { margin: 0; }

/* ---------- 12. Blog ---------- */
.posts {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.post-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.4rem 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.post-card .meta {
  color: var(--muted); font-size: var(--fs-xs);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: .6rem;
}
.post-card h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.post-card p { color: var(--ink-soft); font-size: var(--fs-sm); margin: 0 0 1rem; }

/* ---------- 13. About page ---------- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem;
  align-items: start;
}
.about-portrait {
  aspect-ratio: 3/4; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--terracotta), var(--terracotta-d));
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.about-portrait::after {
  content: "Photo"; position: absolute; inset: 0;
  display: grid; place-items: center; color: rgba(255,255,255,.8);
  font-family: var(--serif); font-style: italic;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.roles {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 2rem;
}
.role-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.2rem;
}
.role-card h4 {
  font-family: var(--sans); font-size: var(--fs-xs); letter-spacing: .14em;
  text-transform: uppercase; color: var(--green); margin: 0 0 .3rem;
}
.role-card p { margin: 0; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }

@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- 14. Contact ---------- */
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  background: #fff; padding: 2.5rem; border-radius: var(--radius-lg);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.contact-wrap h2 { margin-top: 0; }
.socials {
  display: flex; flex-direction: column; gap: .8rem;
}
.socials a {
  display: flex; align-items: center; gap: .8rem;
  padding: .9rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink);
  font-weight: 500; transition: border-color .2s, background .2s;
}
.socials a:hover { border-color: var(--terracotta); background: var(--cream); }
.socials .s-ico {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream-2); display: grid; place-items: center;
  font-family: var(--serif); color: var(--green); font-weight: 700;
}

form .field { margin-bottom: 1rem; }
form label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: .35rem; }
form input, form textarea {
  width: 100%; padding: .75rem .9rem; font: inherit; color: inherit;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); transition: border-color .2s, background .2s;
}
form input:focus, form textarea:focus {
  outline: none; border-color: var(--terracotta); background: #fff;
}
form textarea { min-height: 140px; resize: vertical; }

@media (max-width: 820px) {
  .contact-wrap { grid-template-columns: 1fr; padding: 1.5rem; }
}

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--ink); color: #D7CFBF;
  padding: 3rem 0 1.5rem; margin-top: 3rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  margin-bottom: 2rem;
}
.footer-grid h4 {
  font-family: var(--sans); font-size: var(--fs-xs); letter-spacing: .16em;
  text-transform: uppercase; color: var(--cream); margin: 0 0 .8rem;
}
.footer-grid p, .footer-grid li { color: #C5BCA8; font-size: var(--fs-sm); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-grid a { color: #C5BCA8; }
.footer-grid a:hover { color: var(--cream); }
.footer-brand {
  font-family: var(--serif); color: var(--cream); font-size: 1.4rem; margin-bottom: .5rem;
}
.footer-bottom {
  border-top: 1px solid #2E2922;
  padding-top: 1.2rem; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem;
  color: #8E8576; font-size: var(--fs-xs);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 16. Utilities ---------- */
.center { text-align: center; }
.prose { max-width: 68ch; }
.prose p { font-size: var(--fs-lg); line-height: 1.75; color: var(--ink-soft); }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; }
.divider { height: 1px; background: var(--line); margin: 2.5rem 0; border: 0; }

.badge-nepal {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--cream-2); color: var(--ink-soft);
  padding: .35rem .7rem; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--terracotta); outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 17. Article / blog post body ---------- */
.article-hero { padding: 3.5rem 0 1.5rem; border-bottom: 1px solid var(--line); }
.article-hero .meta {
  color: var(--terracotta-d); font-size: var(--fs-xs);
  letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  margin-bottom: .8rem;
}
.article-hero h1 { margin-bottom: .6rem; }
.article-hero .byline { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.article-hero .byline strong { color: var(--ink); font-weight: 600; }

.prose ul, .prose ol {
  padding-left: 1.4rem; font-size: var(--fs-lg);
  line-height: 1.75; color: var(--ink-soft);
  margin: 1rem 0 1.4rem;
}
.prose li { margin-bottom: .45rem; }
.prose h2, .prose h3 { color: var(--ink); }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.3rem; }

.prose blockquote {
  margin: 2rem 0; padding: 1rem 1.4rem;
  border-left: 4px solid var(--terracotta);
  background: var(--cream-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}
.prose blockquote p { font-size: var(--fs-lg); margin: 0; font-style: italic; }

.prose .callout {
  margin: 2rem 0; padding: 1.2rem 1.4rem;
  background: var(--cream-2); border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose .callout p:last-child { margin-bottom: 0; }

.prose .pullquote {
  font-family: var(--serif);
  font-size: 1.45rem; font-style: italic; line-height: 1.5;
  color: var(--terracotta-d);
  text-align: center; margin: 2.5rem auto; max-width: 50ch;
  padding: 0 1rem;
}

.prose.deva p,
.prose .deva { font-family: var(--deva); line-height: 1.9; }

.post-nav {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 520px) {
  .post-nav { flex-direction: column; align-items: stretch; }
}
