@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@500;600&display=swap");

/* Ninth Fall — homepage hero video, premium nav, staircase journey */

:root {
  --nf-home-ink: #0c0c0c;
  --nf-home-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nf-deva: "Noto Sans Devanagari", "Noto Sans", sans-serif;
}

/* ---------- Premium home navbar ---------- */
html.nf-home header.nf-home-nav {
  transition:
    background-color 0.5s var(--nf-home-ease),
    backdrop-filter 0.5s var(--nf-home-ease),
    border-color 0.5s var(--nf-home-ease),
    box-shadow 0.5s var(--nf-home-ease),
    padding 0.45s var(--nf-home-ease);
}

html.nf-home header.nf-home-nav::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0.55;
  pointer-events: none;
}

html.nf-home header.nf-home-nav .nav-link {
  letter-spacing: 0.22em;
  font-size: 0.62rem;
  transition: color 0.35s var(--nf-home-ease), opacity 0.35s var(--nf-home-ease);
}

html.nf-home header.nf-home-nav .nav-link-line {
  height: 1px;
  transform-origin: left center;
  transition: transform 0.55s var(--nf-home-ease) !important;
}

html.nf-home header.nf-home-nav.nf-header-elevated {
  background: rgba(8, 8, 8, 0.78) !important;
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

html.nf-home header.nf-home-nav a[href="/"] {
  letter-spacing: 0.28em;
}

/* Collapse tagline + tighten padding on scroll */
html.nf-home header.nf-home-nav.nf-header-elevated > div {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

html.nf-home header.nf-home-nav > div > div.flex.flex-col > p,
html.nf-home header.nf-home-nav p.label,
html.nf-home header.nf-home-nav p[class*="tracking-[0.32em]"],
html.nf-home header.nf-home-nav p[class*="text-[0.58rem]"] {
  transition:
    opacity 0.4s var(--nf-home-ease),
    max-height 0.4s var(--nf-home-ease),
    margin 0.4s var(--nf-home-ease),
    transform 0.4s var(--nf-home-ease);
  max-height: 3rem;
  overflow: hidden;
}

html.nf-home header.nf-home-nav.nf-header-elevated > div > div.flex.flex-col > p,
html.nf-home header.nf-home-nav.nf-header-elevated p[class*="text-[0.58rem]"] {
  opacity: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  transform: translateY(-4px);
  pointer-events: none;
}

html.nf-home header.nf-home-nav.nf-header-elevated a[href="/"] {
  font-size: 1.35rem !important;
  letter-spacing: 0.26em !important;
}

html.nf-home header.nf-home-nav.nf-header-elevated nav.mt-5,
html.nf-home header.nf-home-nav.nf-header-elevated .mt-5.max-w-3xl {
  margin-top: 0.65rem !important;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

/* Hide tagline on narrow screens — keep brand lockup clean */
@media (max-width: 639px) {
  html.nf-home header.nf-home-nav > div > div.flex.flex-col > p,
  html.nf-home header.nf-home-nav p[class*="text-[0.58rem]"] {
    display: none !important;
  }

  html.nf-home header.nf-home-nav a[href="/"] {
    font-size: 1.05rem !important;
    letter-spacing: 0.16em !important;
    white-space: nowrap !important;
  }

  html.nf-home header.nf-home-nav .nf-brand-logo {
    width: 1.65rem;
    height: 1.65rem;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  html.nf-home header.nf-home-nav a[href="/"] {
    letter-spacing: 0.24em !important;
  }
}

/* Nav rail pipes — calmer separators */
html.nf-home header.nf-home-nav nav span.h-3.w-px,
html.nf-home header.nf-home-nav nav span[class*="h-3"][class*="w-px"] {
  height: 0.7rem !important;
  opacity: 0.55;
}

html.nf-home header.nf-home-nav .nav-link {
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
}

/* ---------- Cinematic home hero ---------- */
.nf-home-hero {
  isolation: isolate;
}

.nf-home-hero .grain {
  z-index: 0;
}

.nf-home-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.05) brightness(0.62);
  opacity: 0;
  transition: opacity 1.1s var(--nf-home-ease);
  z-index: 1;
  pointer-events: none;
  transform: scale(1.06);
  animation: nf-home-drift 26s ease-in-out infinite alternate;
}

.nf-home-hero-video.is-ready {
  opacity: 1;
}

.nf-home-hero.has-video .grain > div:not(.nf-home-veil):not(.nf-home-grain) {
  opacity: 0.15 !important;
}

.nf-home-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.12) 42%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 48%);
}

.nf-home-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.nf-home-hero > .relative.z-10 {
  z-index: 4;
}

.nf-home-hero .fade-in {
  max-width: 40rem;
}

.nf-home-hero .fade-in h1 {
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.06em;
}

.nf-home-hero .fade-in p {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.nf-home-hero .absolute.right-4.bottom-6,
.nf-home-hero .absolute.right-4.bottom-6 * {
  opacity: 0.72;
}

.nf-home-hero.has-video .absolute.right-4.bottom-6 {
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.nf-home-hero.has-video .absolute.right-4.bottom-6:hover {
  opacity: 0.95;
}

.nf-home-hero aside[aria-label="The journey"],
.nf-home-hero .nf-home-journey-chips-legacy {
  display: none !important;
}

.nf-home-hero .lg\:grid-cols-\[1fr_auto\] {
  grid-template-columns: 1fr !important;
}

@keyframes nf-home-drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.2%, -0.6%, 0);
  }
}

/* ---------- Hero staircase journey (under CTAs) ---------- */
.nf-hero-stairs {
  margin-top: 2.25rem;
  max-width: 36rem;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.7s var(--nf-home-ease),
    transform 0.7s var(--nf-home-ease);
}

.nf-hero-stairs.is-ready {
  opacity: 1;
  transform: none;
}

.nf-stairs-label {
  margin: 0 0 1.1rem;
  font-size: 0.58rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.nf-stairs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: end;
  position: relative;
}

/* Ascending baseline */
.nf-stairs-list::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 4%;
  bottom: 1.15rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.55)
  );
  transform: rotate(-4.5deg);
  transform-origin: left center;
  pointer-events: none;
  opacity: 0.85;
}

.nf-stair {
  position: relative;
  margin: 0;
  /* Each step sits higher — success climb */
  transform: translateY(calc((3 - var(--nf-step, 0)) * 14px));
  opacity: 0;
}

.nf-hero-stairs.is-climbing .nf-stair {
  animation: nf-stair-rise 0.85s var(--nf-home-ease) both;
  animation-delay: calc(0.12s + var(--nf-step, 0) * 0.14s);
}

@keyframes nf-stair-rise {
  from {
    opacity: 0;
    transform: translateY(calc((3 - var(--nf-step, 0)) * 14px + 22px));
  }
  to {
    opacity: 1;
    transform: translateY(calc((3 - var(--nf-step, 0)) * 14px));
  }
}

.nf-stair-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.85rem 0.45rem 0.65rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  transition:
    color 0.35s var(--nf-home-ease),
    transform 0.4s var(--nf-home-ease);
}

.nf-stair-link:hover {
  color: #fff;
  transform: translateY(-3px);
}

.nf-stair-plate {
  position: absolute;
  left: 0;
  right: 0.35rem;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.22);
  transform: scaleX(0.55);
  transform-origin: left center;
  transition:
    transform 0.45s var(--nf-home-ease),
    background 0.35s ease;
}

.nf-stair-link:hover .nf-stair-plate,
.nf-stair.is-peak .nf-stair-plate {
  transform: scaleX(1);
  background: rgba(255, 255, 255, 0.7);
}

.nf-stair-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  margin-bottom: 0.15rem;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.nf-stair.is-peak .nf-stair-dot {
  background: #fff;
  border-color: #fff;
}

.nf-stair-num {
  font-family: var(--nf-deva);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.55);
}

.nf-stair-link:hover .nf-stair-num,
.nf-stair.is-peak .nf-stair-num {
  color: #fff;
}

.nf-stair-name {
  font-family: var(--font-cormorant-garamond), "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.15;
}

@media (max-width: 639px) {
  .nf-hero-stairs {
    margin-top: 1.75rem;
    max-width: 100%;
  }

  .nf-stairs-list {
    gap: 0.2rem;
  }

  .nf-stair {
    transform: translateY(calc((3 - var(--nf-step, 0)) * 10px));
  }

  .nf-hero-stairs.is-climbing .nf-stair {
    animation-name: nf-stair-rise-mobile;
  }

  @keyframes nf-stair-rise-mobile {
    from {
      opacity: 0;
      transform: translateY(calc((3 - var(--nf-step, 0)) * 10px + 16px));
    }
    to {
      opacity: 1;
      transform: translateY(calc((3 - var(--nf-step, 0)) * 10px));
    }
  }

  .nf-stair-link {
    padding: 0.65rem 0.2rem 0.5rem;
  }

  .nf-stair-name {
    letter-spacing: 0.08em;
    font-size: 0.78rem;
  }

  .nf-stairs-list::before {
    bottom: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nf-home-hero-video,
  .nf-hero-stairs,
  .nf-hero-stairs.is-climbing .nf-stair {
    animation: none !important;
    transition: none !important;
  }

  .nf-home-hero-video,
  .nf-hero-stairs,
  .nf-hero-stairs.is-climbing .nf-stair {
    opacity: 1;
  }

  .nf-hero-stairs.is-climbing .nf-stair {
    transform: translateY(calc((3 - var(--nf-step, 0)) * 14px));
  }
}
