/* =====================================================
   THE GROWTH WAY — NAVBAR
   -----------------------------------------------------
   Ek hi navbar, saare pages pe.

   Pehle 4 alag markup patterns the:
     index.html      -> .site-header > .container.navbar > .nav-menu
     about/services  -> .site-header > .container.nav > .desktop + #mobile
     contact/folio   -> .site-header > .navbar > .nav-links
     about1.html     -> .navbar (site-header class hi nahi thi)

   Isliye har page pe navbar alag dikhta tha, aur mobile menu
   sirf kuch pages pe chalta tha.

   Ab sab jagah same markup + yahi file.

   NOTE: saare class names "tgw-nav" se start hote hain.
   Ye jaanbujh kar kiya hai — purani 6 stylesheets me .brand,
   .navbar, .nav-links, .desktop already defined hain. Naye
   naam use karne se koi collision nahi hoga aur purani CSS
   ko chhedne ki zarurat nahi padi.
===================================================== */

:root {
  --tgw-nav-h: 72px;
  --tgw-ink: #f7f8fa;
  --tgw-muted: #aeb5c3;
  --tgw-accent: #a6ff3f;
  --tgw-shell: rgba(6, 9, 13, 0.72);
  --tgw-shell-solid: rgba(5, 7, 11, 0.94);
  --tgw-line: rgba(255, 255, 255, 0.09);
  --tgw-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -----------------------------------------------------
   SHELL
----------------------------------------------------- */

.tgw-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--tgw-nav-h);
  background: var(--tgw-shell);
  border-bottom: 1px solid var(--tgw-line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition:
    background-color 260ms var(--tgw-ease),
    border-color 260ms var(--tgw-ease),
    box-shadow 260ms var(--tgw-ease);
}

/* Scroll hone pe thoda solid — content ke upar readable rahe */
.tgw-nav.is-scrolled {
  background: var(--tgw-shell-solid);
  border-bottom-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px -22px rgba(0, 0, 0, 0.95);
}

.tgw-nav__inner {
  width: min(calc(100% - 44px), 1450px);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* -----------------------------------------------------
   BRAND
----------------------------------------------------- */

.tgw-nav__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-right: auto;
  text-decoration: none;
  color: var(--tgw-ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.tgw-nav__brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform 300ms var(--tgw-ease);
}

.tgw-nav__brand:hover img {
  transform: rotate(-6deg) scale(1.05);
}

.tgw-nav__brand b {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

/* -----------------------------------------------------
   DESKTOP LINKS
----------------------------------------------------- */

.tgw-nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.tgw-nav__link {
  position: relative;
  padding: 6px 0;
  color: var(--tgw-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 200ms var(--tgw-ease);
}

.tgw-nav__link:hover,
.tgw-nav__link:focus-visible {
  color: var(--tgw-ink);
}

/* Underline indicator — center se bahar grow karti hai.
   Active state permanent, hover state temporary. */
.tgw-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--tgw-accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 260ms var(--tgw-ease);
}

.tgw-nav__link:hover::after {
  transform: scaleX(0.55);
}

.tgw-nav__link.is-active {
  color: var(--tgw-ink);
}

.tgw-nav__link.is-active::after {
  transform: scaleX(1);
}

/* -----------------------------------------------------
   CTA
----------------------------------------------------- */

.tgw-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--tgw-ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background-color 220ms var(--tgw-ease),
    border-color 220ms var(--tgw-ease),
    color 220ms var(--tgw-ease),
    transform 220ms var(--tgw-ease);
}

.tgw-nav__cta span {
  color: var(--tgw-accent);
  transition:
    transform 220ms var(--tgw-ease),
    color 220ms var(--tgw-ease);
}

.tgw-nav__cta:hover {
  background: var(--tgw-accent);
  border-color: var(--tgw-accent);
  color: #0b1006;
  transform: translateY(-2px);
}

.tgw-nav__cta:hover span {
  color: #0b1006;
  transform: translate(3px, -3px);
}

/* -----------------------------------------------------
   HAMBURGER
----------------------------------------------------- */

.tgw-nav__toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 220ms var(--tgw-ease);
}

.tgw-nav__toggle:hover {
  border-color: var(--tgw-accent);
}

.tgw-nav__toggle i {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--tgw-ink);
  border-radius: 2px;
  transition:
    transform 280ms var(--tgw-ease),
    opacity 180ms var(--tgw-ease);
}

/* Hamburger -> cross */
.tgw-nav__toggle.is-open i:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.tgw-nav__toggle.is-open i:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

.tgw-nav__toggle.is-open i:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* -----------------------------------------------------
   MOBILE PANEL
----------------------------------------------------- */

.tgw-nav__panel {
  position: fixed;
  top: var(--tgw-nav-h);
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: 14px 22px 26px;
  background: var(--tgw-shell-solid);
  border-bottom: 1px solid var(--tgw-line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  max-height: calc(100dvh - var(--tgw-nav-h));
  overflow-y: auto;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 300ms var(--tgw-ease),
    opacity 220ms var(--tgw-ease);
}

.tgw-nav__panel.is-open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.tgw-nav__panel a {
  padding: 15px 2px;
  color: var(--tgw-muted);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 200ms var(--tgw-ease);
}

.tgw-nav__panel a:last-of-type {
  border-bottom: 0;
}

.tgw-nav__panel a.is-active {
  color: var(--tgw-accent);
}

.tgw-nav__panel a:hover {
  color: var(--tgw-ink);
}

.tgw-nav__panel .tgw-nav__panel-cta {
  margin-top: 16px;
  padding: 15px;
  border: 0;
  border-radius: 999px;
  background: var(--tgw-accent);
  color: #0b1006;
  text-align: center;
  font-weight: 700;
}

/* Panel khulne par links ek ek karke aate hain.
   Ye user-triggered motion hai — batata hai kya khula. */
.tgw-nav__panel.is-open a {
  animation: tgw-nav-item 320ms var(--tgw-ease) both;
}

.tgw-nav__panel.is-open a:nth-child(1) { animation-delay: 40ms; }
.tgw-nav__panel.is-open a:nth-child(2) { animation-delay: 80ms; }
.tgw-nav__panel.is-open a:nth-child(3) { animation-delay: 120ms; }
.tgw-nav__panel.is-open a:nth-child(4) { animation-delay: 160ms; }
.tgw-nav__panel.is-open a:nth-child(5) { animation-delay: 200ms; }
.tgw-nav__panel.is-open a:nth-child(6) { animation-delay: 240ms; }

@keyframes tgw-nav-item {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Menu khula ho to background scroll na ho */
body.tgw-nav-open {
  overflow: hidden;
}

/* -----------------------------------------------------
   RESPONSIVE
----------------------------------------------------- */

/* Tablet — gaps kam, wordmark chhota */
@media (max-width: 1080px) {
  .tgw-nav__inner {
    width: calc(100% - 36px);
    gap: 18px;
  }

  .tgw-nav__links {
    gap: 22px;
  }

  .tgw-nav__link {
    font-size: 14px;
  }
}

/* Chhote tablet — CTA hata do, jagah nahi bachti.
   Mobile panel me CTA already hai. */
@media (max-width: 940px) {
  .tgw-nav__links {
    gap: 16px;
  }

  .tgw-nav__cta {
    display: none;
  }
}

/* Mobile — hamburger on */
@media (max-width: 860px) {
  .tgw-nav__links {
    display: none;
  }

  .tgw-nav__toggle {
    display: block;
  }

  .tgw-nav__panel {
    display: flex;
    /* solid background: page text must not show through the open menu */
    background: #07090d;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .tgw-nav__inner {
    width: calc(100% - 30px);
  }
}

/* Chhota phone */
@media (max-width: 420px) {
  .tgw-nav__brand img {
    width: 36px;
    height: 36px;
  }

  .tgw-nav__brand b {
    font-size: 16px;
  }

  .tgw-nav__panel {
    padding: 12px 18px 22px;
  }

  .tgw-nav__panel a {
    font-size: 16px;
    padding: 13px 2px;
  }
}

/* Landscape phone — kam height me panel scroll ho */
@media (max-height: 460px) and (max-width: 860px) {
  .tgw-nav__panel a {
    padding: 10px 2px;
    font-size: 15px;
  }
}

/* -----------------------------------------------------
   ACCESSIBILITY
----------------------------------------------------- */

.tgw-nav a:focus-visible,
.tgw-nav button:focus-visible {
  outline: 2px solid var(--tgw-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link — keyboard users seedha content pe jaa sakein */
.tgw-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1100;
  padding: 12px 20px;
  background: var(--tgw-accent);
  color: #0b1006;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 10px 0;
}

.tgw-skip:focus {
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tgw-nav,
  .tgw-nav *,
  .tgw-nav__panel,
  .tgw-nav__panel a {
    animation: none !important;
    transition-duration: 0.001ms !important;
  }
}
