/* =========================================================================
   GlobalNepali — Design System
   Palette grounded in Nepali cultural material (flag red, marigold gold,
   Himalayan dusk) rather than a generic dark-mode default. See design
   notes: deep indigo-black background, sindoor red + marigold gold accents,
   warm off-white text, prayer-flag green reserved for "live" indicators.
   ========================================================================= */

/* Font loading moved to <link> tags in each page's <head> for parallel
   fetching instead of a serial @import chain — see design notes: @import
   here forced the browser through 3 sequential round-trips (style.css ->
   Google Fonts CSS -> font files) before text rendered correctly. */

:root {
  /* Color */
  --color-bg: #0b0e14;
  --color-bg-raised: #12161f;
  --color-bg-raised-2: #191f2b;
  --color-red: #c8102e;
  --color-red-bright: #e63946;
  --color-gold: #f4a300;
  --color-text: #f5f1eb;
  --color-text-muted: #8b93a7;
  --color-text-dim: #5b6274;
  --color-green: #4c9a6a;
  --color-border: #232939;

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

  /* Scale */
  --step-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.85rem);
  --step-sm: clamp(0.9rem, 0.87rem + 0.15vw, 1rem);
  --step-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-2xl: clamp(2.5rem, 2rem + 2.5vw, 4.25rem);
  --step-3xl: clamp(3rem, 2.2rem + 4vw, 6rem);

  /* Layout */
  --content-max: 1180px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 7rem;
  --radius: 10px;
  --radius-lg: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--step-3xl); font-weight: 900; }
h2 { font-size: var(--step-2xl); }
h3 { font-size: var(--step-xl); }

p { margin: 0 0 var(--space-2); color: var(--color-text-muted); }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Eyebrow / dispatch label — small structural signature used instead of
   generic category pills; reads "DISPATCH — LOCATION" or a section label. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red-bright);
  display: inline-block;
}

/* Route line — signature motif: a thin animated line with a traveling dot,
   evoking a flight path connecting global Nepali communities. */
.route-line {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border) 15%, var(--color-border) 85%, transparent);
  margin: var(--space-5) 0;
  overflow: visible;
}

.route-line::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red-bright);
  box-shadow: 0 0 12px 2px rgba(230, 57, 70, 0.6);
  transform: translateY(-50%);
  animation: route-travel 8s ease-in-out infinite;
}

@keyframes route-travel {
  0% { left: 0%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  position: relative;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-lg);
  display: flex;
  align-items: baseline;
  gap: 0.35em;
}

.brand-mark { color: var(--color-red-bright); }

/* Small Devanagari accent, used next to the wordmark and in the footer.
   Real script, not decoration-for-its-own-sake — Noto Sans Devanagari is
   loaded specifically so this renders correctly rather than as tofu boxes. */
.deva {
  font-family: 'Noto Sans Devanagari', sans-serif;
}

.brand-deva {
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--color-text-dim);
  margin-left: 0.7em;
  vertical-align: middle;
  letter-spacing: 0;
}

/* Dhaka-inspired trim — a thin woven-look strip under the header on every
   page. Not a reproduction of any specific real dhaka cloth pattern; an
   original geometric motif in the same spirit (the diamond crosshatch
   weave associated with dhaka topi fabric), tying the site's visual
   identity to the actual merchandise planned for the Shop page. */
.dhaka-trim {
  height: 5px;
  background-image:
    repeating-linear-gradient(45deg, var(--color-red) 0, var(--color-red) 2px, transparent 2px, transparent 7px),
    repeating-linear-gradient(-45deg, var(--color-gold) 0, var(--color-gold) 2px, transparent 2px, transparent 7px);
  background-color: var(--color-bg-raised);
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step-sm);
  font-weight: 500;
}

.nav-links a {
  color: var(--color-text-muted);
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--color-text);
}

.nav-links a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--color-red-bright);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  padding: 0.5rem 0.75rem;
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-raised);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: var(--space-2) var(--space-3);
    display: block;
    border-top: 1px solid var(--color-border);
  }
  .nav-toggle { display: block; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-sm);
  padding: 0.8em 1.5em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--color-red-bright); color: #fff; }
.btn-primary:hover { background: #ff4d5a; }

.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-gold); color: var(--color-gold); }

/* Hero */
.hero { padding: var(--space-6) 0 var(--space-4); position: relative; overflow: hidden; }
.hero-eyebrow { margin-bottom: var(--space-2); }
.hero h1 { max-width: 14ch; }
.hero .lede {
  font-size: var(--step-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-3);
}
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Himalayan skyline silhouette — signature flourish reserved for the
   homepage hero only (see design notes: spend the boldness in one place).
   Pure CSS-positioned SVG, sits behind the hero text, low-opacity so it
   reads as atmosphere rather than competing with the headline. */
.hero-mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 160px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

/* Cards (video / article / event) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
}

.card {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--color-red); transform: translateY(-3px); }

.card-media {
  aspect-ratio: 16 / 9;
  background: var(--color-bg-raised-2);
  position: relative;
  overflow: hidden;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(11,14,20,0.5), transparent 50%);
}

.card-play svg { width: 52px; height: 52px; opacity: 0.9; }

.card-body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-body .eyebrow { margin-bottom: 0.25rem; }

.card-title {
  font-family: var(--font-display);
  font-size: var(--step-lg);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-text-dim);
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Section scaffolding */
.section { padding: var(--space-5) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.section-head h2 { margin-bottom: 0; }

/* Tabs (Events page category filtering) */
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tab {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab:hover { border-color: var(--color-gold); color: var(--color-text); }

.tab[aria-pressed='true'] {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #1a1305;
}

/* Forms */
.field-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

input[type='text'],
input[type='search'] {
  font-family: var(--font-body);
  font-size: var(--step-sm);
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.75em 1em;
  border-radius: 8px;
  min-width: 220px;
}

input[type='text']::placeholder { color: var(--color-text-dim); }

/* State messages (loading / empty / error) */
.state-message {
  font-family: var(--font-mono);
  font-size: var(--step-sm);
  color: var(--color-text-dim);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
}

.state-message.is-error { color: var(--color-red-bright); border-color: var(--color-red); }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding: var(--space-5) 0 var(--space-4); margin-top: var(--space-6); }

.footer-grid { display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }

.footer-links {
  display: flex;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
  font-size: var(--step-sm);
  color: var(--color-text-muted);
}

.footer-note {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-text-dim);
  margin-top: var(--space-4);
}

/* Embeds (Listen page) */
.embed-frame { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); }
.embed-frame iframe { width: 100%; border: none; display: block; }

/* Video modal (Watch page) */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--space-3);
}

.video-modal.open { display: flex; }

.video-modal-inner { width: 100%; max-width: 960px; position: relative; }
.video-modal-video { aspect-ratio: 16 / 9; position: relative; }
.video-modal-video iframe { width: 100%; height: 100%; border: none; border-radius: var(--radius); position: absolute; inset: 0; }
.video-modal-inner .share-row { justify-content: center; margin-top: var(--space-2); }

.video-modal-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Read page — article list + expandable article body */
.article-body {
  display: none;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
  margin-top: 0.75rem;
  color: var(--color-text);
  font-size: var(--step-sm);
  line-height: 1.7;
}

.article-body.open { display: block; }

.card-expand-btn {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Event card specifics */
.event-date-badge {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-gold);
}

/* Newsletter signup bar — shown near the bottom of every content page.
   Deliberately simple: no popup, no scroll-triggered modal, just an
   always-present, easy-to-ignore option for people who want to come back. */
.newsletter-bar {
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: 0 auto;
  max-width: var(--content-max);
}

.newsletter-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.newsletter-copy h3 {
  font-size: var(--step-lg);
  margin-bottom: 0.25rem;
}

.newsletter-copy p {
  margin: 0;
  font-size: var(--step-sm);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.newsletter-status {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  margin-top: 0.6rem;
  color: var(--color-gold);
}

.newsletter-status.is-error { color: var(--color-red-bright); }

/* Share row — used in the video modal, article cards, and event/business
   detail pages. Kept small and unobtrusive; WhatsApp listed first since
   that's how this audience actually shares things day to day. */
.share-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.share-label {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.share-btn {
  font-family: var(--font-mono);
  font-size: var(--step-xs);
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.35em 0.85em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.share-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

@media (max-width: 600px) {
  h1 { font-size: var(--step-2xl); }
  .hero { padding: var(--space-5) 0 var(--space-3); }
}
