/* ============================================================
   THRIFTRUPEE — Navigation
   ============================================================ */

/* ── Topbar ── */
.tr-topbar {
  background: var(--tr-ink);
  padding: 7px 0;
  font-family: var(--font-ui);
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
}
.tr-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.tr-topbar-left { display: flex; align-items: center; gap: var(--sp-4); }
.tr-topbar-right { display: flex; align-items: center; gap: var(--sp-5); }
.tr-topbar a {
  color: rgba(255,255,255,0.55);
  transition: color var(--dur-fast);
}
.tr-topbar a:hover { color: var(--tr-lime); }
.tr-topbar-pill {
  background: var(--tr-green);
  color: var(--tr-white);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

/* ── Main nav ── */
.tr-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(250,247,242,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.tr-nav.is-scrolled {
  border-color: var(--tr-sand);
  box-shadow: var(--shadow-sm);
  background: rgba(250,247,242,0.97);
}
.tr-nav-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: var(--sp-8);
}

/* ── Logo (text only) ── */
.tr-logo {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  line-height: 1;
}
.tr-logo-word {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--tr-ink);
  letter-spacing: -0.03em;
}
.tr-logo-word em {
  font-style: italic;
  color: var(--tr-green);
}
.tr-logo-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--tr-mint);
  margin-left: 1px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

/* ── Nav menu ── */
.tr-nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.tr-nav-item {
  position: relative;
}
.tr-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: var(--tr-body);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}
.tr-nav-link:hover,
.tr-nav-link.is-active {
  color: var(--tr-green);
  background: var(--tr-pale);
}
.tr-nav-link-chevron {
  width: 14px; height: 14px;
  transition: transform var(--dur-fast);
  flex-shrink: 0;
  opacity: 0.5;
}
.tr-nav-item:hover .tr-nav-link-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown ── */
.tr-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--tr-white);
  border: 1px solid var(--tr-sand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  padding: var(--sp-3);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  pointer-events: none;
}
.tr-nav-item:hover .tr-dropdown,
.tr-nav-item:focus-within .tr-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.tr-dropdown--wide {
  min-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
}
.tr-dropdown-group {
  display: flex;
  flex-direction: column;
}
.tr-dropdown-group-label {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tr-stone);
  padding: 6px 10px 4px;
}
.tr-dropdown-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--tr-body);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.tr-dropdown-link:hover {
  background: var(--tr-pale);
  color: var(--tr-green);
}
.tr-dropdown-link-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--tr-warm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: background var(--dur-fast);
}
.tr-dropdown-link:hover .tr-dropdown-link-icon {
  background: rgba(34,165,84,0.12);
}
.tr-dropdown-link-text { flex: 1; }
.tr-dropdown-link-title { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.tr-dropdown-link-sub { display: block; font-size: 11.5px; color: var(--tr-muted); margin-top: 1px; }

/* ── Nav CTA ── */
.tr-nav-cta {
  flex-shrink: 0;
  margin-left: var(--sp-2);
}

/* ── Hamburger (mobile) ── */
.tr-nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  margin-left: auto;
  flex-shrink: 0;
  transition: background var(--dur-fast);
}
.tr-nav-toggle:hover { background: var(--tr-warm); }
.tr-hamburger {
  width: 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tr-hamburger span {
  display: block;
  height: 1.5px;
  background: var(--tr-ink);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast);
}
.tr-nav.is-open .tr-hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.tr-nav.is-open .tr-hamburger span:nth-child(2) { opacity: 0; }
.tr-nav.is-open .tr-hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile drawer ── */
@media (max-width: 900px) {
  .tr-nav-menu,
  .tr-nav-cta { display: none; }
  .tr-nav-toggle { display: flex; }

  .tr-nav-menu.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--tr-white);
    border-top: 1px solid var(--tr-sand);
    padding: var(--sp-4);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .tr-nav-link { font-size: 16px; padding: 12px 14px; }
  .tr-dropdown {
    position: static;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 var(--sp-5);
    min-width: auto;
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
  }
  .tr-dropdown--wide {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }
  .tr-topbar-right { display: none; }
}

/* ── Footer ── */
.tr-footer {
  background: var(--tr-ink);
  color: rgba(255,255,255,0.65);
  padding: var(--sp-16) 0 var(--sp-8);
}
.tr-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-12);
}
.tr-footer-brand { }
.tr-footer-logo {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--tr-white);
  margin-bottom: var(--sp-4);
}
.tr-footer-logo em { color: var(--tr-lime); font-style: italic; }
.tr-footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  max-width: 260px;
  margin-bottom: var(--sp-5);
}
.tr-footer-social {
  display: flex;
  gap: var(--sp-3);
}
.tr-footer-social a {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.tr-footer-social a:hover {
  background: rgba(52,212,122,0.12);
  border-color: rgba(52,212,122,0.25);
}
.tr-footer-col-title {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--sp-5);
}
.tr-footer-links { display: flex; flex-direction: column; gap: var(--sp-3); }
.tr-footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color var(--dur-fast);
}
.tr-footer-links a:hover { color: var(--tr-lime); }
.tr-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}
.tr-footer-bottom a { color: rgba(255,255,255,0.4); }
.tr-footer-bottom a:hover { color: var(--tr-lime); }
.tr-footer-bottom-links { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.tr-footer-disclaimer {
  width: 100%;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  line-height: 1.6;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 900px) {
  .tr-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
  .tr-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .tr-footer-grid { grid-template-columns: 1fr; }
}
