/* ============================================================
   Nepali Traveller v2 — CRITICAL stylesheet (above-the-fold).

   Loaded render-blocking before first paint so the header, hero
   banner and breadcrumb are styled the moment the page paints.
   Everything else (post grids, footer, contact block, page body
   prose, single-post, etc.) lives in theme-v2.css and is loaded
   non-blocking via the preload/swap pattern in inc/resources.php.

   Section order (matches the original theme-v2.css numbering):
     0. Tokens + body reset
     0. HEADER (fixed nav, scheme-aware solid state)
     1. HERO (full-bleed banner + dot rail)
     X. BREADCRUMB (sits above inner-page lists)
   ============================================================ */

body.nt-v2 {
  --v2-bg:        #0b0c0e;
  --v2-bg-2:      #15171a;
  --v2-bg-3:      #1d2025;
  --v2-line:      rgba(255, 255, 255, 0.08);
  --v2-line-2:    rgba(255, 255, 255, 0.14);
  --v2-ink:       #e9eaec;
  --v2-ink-2:     #b6b8bd;
  --v2-mute:      #7a7d83;
  /* Two accent tokens for proper contrast across surfaces:
     --v2-gold   = always-bright, for use on perpetually-dark contexts
                   (hero, card overlays, footer).
     --v2-accent = scheme-aware default; swapped to a darker amber in
                   light mode so it meets AA on the cream surface. */
  --v2-gold:      #e8b15c;
  --v2-accent:    #e8b15c;
  --v2-accent-2:  #f3c97e;
  --v2-hot:       #ff5a3c;
  --v2-radius:    14px;
  --v2-shadow:    0 30px 80px -20px rgba(0,0,0,.7);
  --v2-ease:      cubic-bezier(.2,.7,.2,1);
  --v2-font-display: "Mona Sans", ui-sans-serif, system-ui, sans-serif;
  --v2-font-body:    "ProximaNova", ui-sans-serif, system-ui, sans-serif;
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: var(--v2-font-body);
}

/* light scheme override for v2 — still bold, but airy */
body.nt-v2[data-theme="light"],
[data-theme="light"] body.nt-v2 {
  --v2-bg:    #f4f1ec;
  --v2-bg-2:  #ffffff;
  --v2-bg-3:  #e9e4dc;
  --v2-line:  rgba(0,0,0,.08);
  --v2-line-2:rgba(0,0,0,.14);
  --v2-ink:   #15171a;
  --v2-ink-2: #34373d;
  --v2-mute:  #5a5d63;
  /* darker amber for AA contrast on cream surfaces */
  --v2-accent:   #a7682e;
  --v2-accent-2: #c98643;
  --v2-shadow:0 30px 60px -28px rgba(15,17,20,.35);
}

/* ---- Reset a few base things from theme.css when on v2 ---- */
body.nt-v2 .site-main { background: var(--v2-bg); }

/* Drop v1's flow-sections gap so cinematic sections butt against each other. */
body.nt-v2 .flow-sections > * + * { margin-top: 0 !important; }

/* ============================================================
   0. HEADER — floats transparently over hero, solidifies on scroll
   ============================================================ */

body.nt-v2 .site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--v2-ease),
              backdrop-filter .35s var(--v2-ease),
              border-color .35s var(--v2-ease),
              padding .35s var(--v2-ease);
  padding-block: 18px;
}

/* Pages without an immersive hero need a top offset so content doesn't
   slide under the now-floating header. Only the front page keeps the
   immersive transparent header — every other page (single posts, blog,
   archives, regular Pages) renders the solid scheme-aware header from
   first paint, so the offset has to apply there too. */
body.nt-v2 .site-main { padding-top: 84px; }
body.nt-v2.home.page-template-front-page .site-main,
body.nt-v2.page-template-front-page .site-main { padding-top: 0; }

/* Condensed / solid state after the user scrolls. */
body.nt-v2.is-scrolled .site-header {
  background: rgba(15, 17, 20, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--v2-line);
  padding-block: 10px;
}
body.nt-v2.is-scrolled[data-theme="light"] .site-header,
[data-theme="light"] body.nt-v2.is-scrolled .site-header {
  background: rgba(255, 255, 255, 0.82);
}

/* Non-front pages: header is solid from first paint — no transparent
   overlay state, no waiting for is-scrolled. Inherits the same look as
   the scrolled state above. */
body.nt-v2:not(.page-template-front-page) .site-header {
  background: rgba(15, 17, 20, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--v2-line);
  padding-block: 10px;
}
body.nt-v2[data-theme="light"]:not(.page-template-front-page) .site-header,
[data-theme="light"] body.nt-v2:not(.page-template-front-page) .site-header {
  background: rgba(255, 255, 255, 0.92);
}

/* Re-skin existing header internals to the v2 palette. */
body.nt-v2 .site-header__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* Default header style = transparent overlay above the hero.
   Text/icons stay WHITE regardless of theme so they read against the
   hero's dark gradient. Scheme-aware colors kick in only when the
   header is scrolled into its solid state, or on pages with no hero. */
body.nt-v2 .site-nav__list a {
  color: rgba(255,255,255,.92);
  font-family: var(--v2-font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: transparent !important;
  border-radius: 6px;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
  transition: color .25s;
}
body.nt-v2 .site-nav__list a:hover,
body.nt-v2 .site-nav__list .current-menu-item > a,
body.nt-v2 .site-nav__list .current_page_item > a {
  color: var(--v2-gold) !important;
}
/* On scrolled/non-hero header (light surface), use the scheme accent so the
   active link meets AA contrast. */
body.nt-v2.is-scrolled .site-nav__list a:hover,
body.nt-v2.is-scrolled .site-nav__list .current-menu-item > a,
body.nt-v2.is-scrolled .site-nav__list .current_page_item > a,
body.nt-v2:not(.page-template-front-page) .site-nav__list a:hover,
body.nt-v2:not(.page-template-front-page) .site-nav__list .current-menu-item > a,
body.nt-v2:not(.page-template-front-page) .site-nav__list .current_page_item > a {
  color: var(--v2-accent) !important;
}

body.nt-v2 .icon-btn {
  color: #fff;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.32);
  width: 40px; height: 40px;
  border-radius: 999px;
  transition: border-color .25s, color .25s, background .25s;
}
body.nt-v2 .icon-btn:hover {
  color: var(--v2-gold);
  border-color: var(--v2-gold);
}
body.nt-v2.is-scrolled .icon-btn:hover,
body.nt-v2:not(.page-template-front-page) .icon-btn:hover {
  color: var(--v2-accent);
  border-color: var(--v2-accent);
}

body.nt-v2 .custom-logo,
body.nt-v2 .custom-logo-link img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 8px rgba(0,0,0,.35));
  transition: filter .25s;
}

/* ----- Scheme-aware header colors (scrolled OR pages without a hero) ----- */
body.nt-v2.is-scrolled .site-nav__list a,
body.nt-v2:not(.page-template-front-page) .site-nav__list a {
  text-shadow: none;
}
body.nt-v2.is-scrolled .site-nav__list a,
body.nt-v2:not(.page-template-front-page) .site-nav__list a {
  color: var(--v2-ink);
}

body.nt-v2.is-scrolled .icon-btn,
body.nt-v2:not(.page-template-front-page) .icon-btn {
  color: var(--v2-ink);
  border-color: var(--v2-line-2);
}

/* In light scheme, when solid/non-hero, restore dark logo. */
body.nt-v2[data-theme="light"].is-scrolled .custom-logo,
[data-theme="light"] body.nt-v2.is-scrolled .custom-logo,
body.nt-v2[data-theme="light"].is-scrolled .custom-logo-link img,
[data-theme="light"] body.nt-v2.is-scrolled .custom-logo-link img,
body.nt-v2[data-theme="light"]:not(.page-template-front-page) .custom-logo,
[data-theme="light"] body.nt-v2:not(.page-template-front-page) .custom-logo,
body.nt-v2[data-theme="light"]:not(.page-template-front-page) .custom-logo-link img,
[data-theme="light"] body.nt-v2:not(.page-template-front-page) .custom-logo-link img {
  filter: none;
}

/* Mobile slide-out nav adopts v2 dark surface. */
@media (max-width: 1023px) {
  body.nt-v2 .site-nav {
    background: var(--v2-bg-2);
    border-left: 1px solid var(--v2-line);
  }
  body.nt-v2 .site-nav__list a { color: var(--v2-ink); }
  body.nt-v2 .nav-toggle__bar { background-color: #fff; }
  body.nt-v2[data-theme="light"] .nav-toggle__bar,
  [data-theme="light"] body.nt-v2 .nav-toggle__bar { background-color: #15171a; }
}

/* Site search dropdown — match the condensed header tint. */
body.nt-v2 .site-search {
  background: rgba(15, 17, 20, 0.92);
  backdrop-filter: blur(14px);
  border-top-color: var(--v2-line);
}
body.nt-v2[data-theme="light"] .site-search,
[data-theme="light"] body.nt-v2 .site-search {
  background: rgba(255,255,255,.95);
}

/* ============================================================
   1. HERO — full-bleed cinematic stage with parallax + scroll dots
   ============================================================ */
.v2-hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  width: 100%;
  overflow: hidden;
  background: var(--v2-bg);
  isolation: isolate;
}

.v2-hero__track {
  position: absolute; inset: 0;
  cursor: grab;
}
.v2-hero.is-dragging,
.v2-hero.is-dragging .v2-hero__track { cursor: grabbing; user-select: none; }

.v2-hero__slide {
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s var(--v2-ease);
}
.v2-hero__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.v2-hero__media {
  position: absolute; inset: -8% -2% -2% -2%;
  overflow: hidden;
  transform: scale(1.08);
  filter: brightness(.62) saturate(1.05);
  will-change: transform;
  transition: transform 6s linear;
}
.v2-hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.v2-hero__slide.is-active .v2-hero__media {
  transform: scale(1.18);
}

.v2-hero__media::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background:
    /* top scrim — keeps the header legible */
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%),
    radial-gradient(ellipse at 25% 80%, rgba(0,0,0,.55), transparent 60%),
    linear-gradient(180deg, rgba(11,12,14,0) 30%, rgba(11,12,14,.6) 70%, rgba(11,12,14,.95) 100%);
}

.v2-hero__inner {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.v2-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--v2-font-display);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  color: var(--v2-gold);
  margin-bottom: 18px;
}
.v2-hero__eyebrow::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--v2-gold);
}

.v2-hero__title {
  font-family: var(--v2-font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  line-height: .98;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 16ch;
  margin: 0 0 22px;
  text-wrap: balance;
  text-shadow: 0 8px 40px rgba(0,0,0,.45);
}

.v2-hero__desc {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255,255,255,.82);
  max-width: 52ch;
  margin: 0 0 32px;
}

.v2-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.v2-btn {
  --bg: var(--v2-accent);
  --fg: #15171a;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--v2-font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid transparent;
  transition: transform .35s var(--v2-ease), background .25s, color .25s;
}
.v2-btn:hover { transform: translateY(-2px); }
.v2-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.v2-btn--ghost {
  --bg: transparent;
  --fg: #fff;
  border-color: rgba(255,255,255,.4);
}
.v2-btn--ghost:hover { background: rgba(255,255,255,.08); }

/* hero footer rail: dots + counter + scroll hint */
.v2-hero__rail {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3vw, 32px) clamp(28px, 5vw, 64px);
  pointer-events: none;
}
.v2-hero__rail > * { pointer-events: auto; }

.v2-hero__dots {
  display: flex; gap: 14px;
  list-style: none; margin: 0; padding: 0;
}
.v2-hero__dot {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  width: 56px;
  height: 2px;
  background: rgba(255,255,255,.25);
  position: relative;
  overflow: hidden;
  transition: background .3s;
}
.v2-hero__dot::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--v2-gold);
  transition: width 0s linear;
}
.v2-hero__dot.is-active::after { width: 100%; transition: width 6s linear; }
.v2-hero__dot:hover { background: rgba(255,255,255,.5); }

.v2-hero__counter {
  font-family: var(--v2-font-display);
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  letter-spacing: .15em;
}
.v2-hero__counter b { color: #fff; font-weight: 700; }

.v2-hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.75);
  font-family: var(--v2-font-display);
  font-size: 11px;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.v2-hero__scroll-line {
  width: 1px; height: 36px;
  background: rgba(255,255,255,.4);
  position: relative;
  overflow: hidden;
}
.v2-hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -100%;
  height: 60%;
  background: var(--v2-gold);
  animation: v2-scroll 2.2s ease-in-out infinite;
}
@keyframes v2-scroll {
  0%   { top: -60%; }
  100% { top: 110%; }
}

@media (max-width: 720px) {
  .v2-hero__scroll { display: none; }
  .v2-hero__rail { padding: 18px 22px; }
}

/* ============================================================
   X. BREADCRUMB — sits above inner-page lists / hero
   ============================================================ */
body.nt-v2 .breadcrumb,
body.nt-v2 .nt-breadcrumb {
  color: var(--v2-mute);
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
body.nt-v2 .breadcrumb a,
body.nt-v2 .nt-breadcrumb a {
  color: var(--v2-ink-2);
  text-decoration: none;
}
body.nt-v2 .breadcrumb a:hover,
body.nt-v2 .nt-breadcrumb a:hover { color: var(--v2-accent); }
