/* Travel Himalaya Nepal — News (edge-rendered) theme.
   Self-contained, magazine-grade brand styles for the Cloudflare-Function news
   pages. Category color-coding, featured lead, image cards, rich article reading
   experience, share + related. Mobile-first. */

:root {
  --forest:        #0D1F16;
  --forest-deep:   #050c09;
  --forest-mid:    #102a1d;
  --amber:         #C47D35;
  --amber-dark:    #a6692a;
  --stone:         #f5f3ef;
  --stone-card:    #ffffff;
  --stone-border:  #e7e3dc;
  --ink:           #20342a;
  --ink-muted:     #5b6b61;
  --white:         #FDFAF5;
  --white-muted:   rgba(253,250,245,0.74);
  --white-faint:   rgba(253,250,245,0.5);
  --accent:        #C47D35;            /* overridden per category */
  --font-display:  'Barlow Condensed', system-ui, sans-serif;
  --font-sans:     'Figtree', system-ui, -apple-system, sans-serif;
  --font-serif:    'Playfair Display', Georgia, serif;
}

/* Category accent colours */
[data-cat="permits-rules"]     { --accent: #C47D35; }
[data-cat="trail-weather"]     { --accent: #3b6ea5; }
[data-cat="flights-access"]    { --accent: #2f8f83; }
[data-cat="festivals-events"]  { --accent: #9d5ba8; }
[data-cat="safety-advisories"] { --accent: #b3503e; }
[data-cat="records-people"]    { --accent: #4a7c4e; }
[data-cat="industry-tourism"]  { --accent: #5b6b7a; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); color: var(--ink); background: var(--stone); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; margin: 0 auto; padding: 0 20px; }

/* Header */
.nv-head { background: var(--forest); border-bottom: 2px solid var(--amber); position: sticky; top: 0; z-index: 20; }
.nv-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nv-brand { display: flex; align-items: baseline; gap: 10px; }
.nv-brand b { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--white); text-transform: uppercase; }
.nv-brand span { font-family: var(--font-sans); font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber); }
.nv-head nav { display: flex; gap: 18px; font-size: 0.82rem; font-weight: 600; }
.nv-head nav a { color: var(--white-muted); }
.nv-head nav a:hover { color: var(--white); text-decoration: none; }
@media (max-width: 640px) { .nv-head nav { display: none; } }

/* Hub hero */
.nv-hero { background: var(--forest); color: var(--white); padding: 40px 0 30px; position: relative; overflow: hidden; }
.nv-hero::after { content: ""; position: absolute; top: -40%; right: -10%; width: 420px; height: 420px; background: radial-gradient(circle, rgba(196,125,53,0.16) 0%, transparent 65%); pointer-events: none; }
.nv-hero .wrap { position: relative; z-index: 1; }
.nv-hero .eyebrow { color: var(--amber); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 10px; }
.nv-hero h1 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em; }
.nv-hero p { color: var(--white-muted); margin: 0; max-width: 640px; }

/* Category chips */
.nv-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 6px; }
.nv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-muted); background: var(--stone-card); border: 1px solid var(--stone-border); }
.nv-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nv-chip:hover { color: var(--forest); border-color: var(--accent); text-decoration: none; }
.nv-chip.on { background: var(--forest); color: var(--white); border-color: var(--forest); }
.nv-chip.all::before { display: none; }

/* Featured lead */
.nv-lead { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; margin: 18px 0 8px; background: var(--forest); overflow: hidden; }
.nv-lead .img { position: relative; min-height: 320px; }
.nv-lead .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nv-lead .body { padding: 28px; display: flex; flex-direction: column; justify-content: center; color: var(--white); }
.nv-lead .kicker { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--amber); margin: 0 0 12px; display: inline-flex; align-items: center; gap: 8px; }
.nv-lead h2 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.015em; }
.nv-lead h2 a { color: var(--white); }
.nv-lead p { color: var(--white-muted); margin: 0 0 16px; }
.nv-lead .meta { font-size: 0.76rem; color: var(--white-faint); }
@media (max-width: 760px) { .nv-lead { grid-template-columns: 1fr; } .nv-lead .img { min-height: 200px; aspect-ratio: 16/9; } .nv-lead .body { padding: 22px; } }

/* Card grid */
.nv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 18px 0 50px; }
@media (max-width: 900px) { .nv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .nv-grid { grid-template-columns: 1fr; } }
.nv-card { background: var(--stone-card); border: 1px solid var(--stone-border); border-top: 3px solid var(--accent); display: flex; flex-direction: column; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.nv-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(13,31,22,0.1); }
.nv-card .img { aspect-ratio: 16/9; overflow: hidden; background: var(--forest-mid); }
.nv-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.nv-card:hover .img img { transform: scale(1.04); }
.nv-card .img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--forest); color: var(--amber); font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.1em; }
.nv-card .pad { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.nv-card .kicker { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin: 0 0 8px; }
.nv-card h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; line-height: 1.22; margin: 0 0 8px; letter-spacing: -0.01em; }
.nv-card h3 a { color: var(--forest); }
.nv-card p { margin: 0 0 12px; color: var(--ink-muted); font-size: 0.9rem; flex: 1; }
.nv-card .meta { font-size: 0.72rem; color: var(--ink-muted); border-top: 1px solid var(--stone-border); padding-top: 10px; }
.breaking { color: #b3261e; font-weight: 800; }
.breaking-dot::before { content: "● "; }

/* Article */
.nv-article { background: var(--stone-card); }
.nv-article .head { padding: 30px 0 6px; }
.nv-article .kicker { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin: 0 0 12px; }
.nv-article .kicker a { color: var(--accent); }
.nv-article h1 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.02em; color: var(--forest); }
.nv-article .dek { font-size: 1.18rem; color: var(--ink-muted); margin: 0 0 18px; line-height: 1.5; }
.nv-byline { display: flex; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--ink-muted); padding: 14px 0; border-top: 1px solid var(--stone-border); border-bottom: 1px solid var(--stone-border); }
.nv-ava { width: 38px; height: 38px; border-radius: 50%; background: var(--forest); color: var(--amber); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 0.9rem; flex-shrink: 0; }
.nv-byline b { color: var(--forest); }
.nv-byline .sep { opacity: 0.4; }
.nv-cover { margin: 22px 0; aspect-ratio: 16/9; overflow: hidden; background: var(--stone); }
.nv-cover img { width: 100%; height: 100%; object-fit: cover; }
.nv-cover figcaption { font-size: 0.72rem; color: var(--ink-muted); padding: 6px 2px; }

/* Key facts box */
.nv-keyfacts { background: var(--stone); border-left: 4px solid var(--accent); padding: 16px 18px; margin: 24px 0; }
.nv-keyfacts .lbl { margin: 0 0 8px; font-weight: 800; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.nv-keyfacts ul { margin: 0; padding-left: 18px; }
.nv-keyfacts li { margin: 0 0 5px; font-size: 0.95rem; }

/* Body */
.nv-body { font-size: 1.07rem; line-height: 1.78; color: var(--ink); }
.nv-body p { margin: 0 0 1.1em; }
.nv-body h2 { font-family: var(--font-serif); font-size: 1.55rem; color: var(--forest); margin: 1.6em 0 0.5em; }
.nv-body h3 { font-size: 1.22rem; color: var(--forest); margin: 1.4em 0 0.4em; }
.nv-body ul, .nv-body ol { margin: 0 0 1.1em; padding-left: 1.35em; }
.nv-body li { margin: 0 0 0.45em; }
.nv-body img { margin: 1.3em 0; }
.nv-body blockquote { margin: 1.3em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-style: italic; color: var(--forest); }
.nv-body a { color: var(--amber-dark); text-decoration: underline; }
.nv-source { font-size: 0.85rem; color: var(--ink-muted); margin: 20px 0; padding: 12px 16px; background: var(--stone); border: 1px solid var(--stone-border); }

/* Share row */
.nv-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 22px 0; padding: 14px 0; border-top: 1px solid var(--stone-border); border-bottom: 1px solid var(--stone-border); }
.nv-share span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-right: 4px; }
.nv-share a { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; font-size: 0.74rem; font-weight: 700; background: var(--stone); border: 1px solid var(--stone-border); color: var(--ink); }
.nv-share a:hover { background: var(--forest); color: var(--white); border-color: var(--forest); text-decoration: none; }

/* Conversion CTA + related tours */
.nv-cta { background: var(--forest); color: var(--white); padding: 28px; margin: 30px 0; }
.nv-cta .eyebrow { color: var(--amber); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; margin: 0 0 8px; }
.nv-cta h3 { font-family: var(--font-serif); font-size: 1.5rem; margin: 0 0 8px; color: var(--white); }
.nv-cta p { color: var(--white-muted); margin: 0 0 16px; }
.nv-tours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
@media (max-width: 640px) { .nv-tours { grid-template-columns: 1fr; } }
.nv-tour { display: block; background: var(--forest-mid); border: 1px solid rgba(253,250,245,0.12); overflow: hidden; }
.nv-tour .img { aspect-ratio: 16/10; overflow: hidden; }
.nv-tour .img img { width: 100%; height: 100%; object-fit: cover; }
.nv-tour .pad { padding: 12px 14px; }
.nv-tour b { display: block; color: var(--white); font-family: var(--font-sans); font-weight: 700; font-size: 0.92rem; line-height: 1.25; }
.nv-tour span { color: var(--amber); font-size: 0.8rem; font-weight: 700; }
.nv-btn { display: inline-block; padding: 12px 20px; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--amber); color: #fff; }
.nv-btn:hover { background: var(--amber-dark); text-decoration: none; }
.nv-btn.ghost { background: transparent; color: var(--white); border: 1px solid var(--white-faint); }

/* Related news */
.nv-related { padding: 8px 0 40px; }
.nv-related h2 { font-family: var(--font-serif); color: var(--forest); font-size: 1.5rem; margin: 0 0 16px; }

/* Footer */
.nv-foot { background: var(--forest-deep); color: var(--white-faint); padding: 30px 0; font-size: 0.82rem; }
.nv-foot a { color: var(--white-muted); }
.nv-foot .row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.nv-foot nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* Misc */
.nv-empty { text-align: center; padding: 60px 20px; color: var(--ink-muted); }
.nv-empty h1 { font-family: var(--font-serif); color: var(--forest); }
.nv-back { display: inline-block; margin: 18px 0; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber-dark); }
