/* YYC navigation active state — one source of truth.
   The active anchor class controls the only highlight; hover never imitates active. */

.desktop-nav > a.nav-link {
  position: relative !important;
  isolation: isolate;
}

/* Animated box surface: fades and settles into the selected item without a drifting
   shared indicator. Keep all text/icons above the decorative layer. */
.desktop-nav > a.nav-link::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 4px 2px 5px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid rgba(236,193,105,0);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(236,193,105,.105), rgba(236,193,105,.035) 78%, rgba(236,193,105,.012));
  box-shadow: inset 0 1px 0 rgba(255,239,195,0), 0 3px 12px rgba(0,0,0,0);
  opacity: 0;
  transform: translateY(3px) scale(.965);
  transform-origin: center;
  transition:
    opacity 260ms cubic-bezier(.2,.7,.2,1),
    transform 340ms cubic-bezier(.2,.7,.2,1),
    border-color 260ms ease,
    box-shadow 300ms ease;
}

/* Disable old underline layers; the active state now uses the animated box above. */
.desktop-nav > a.nav-link::after,
.desktop-nav > a.nav-link .nav-label::after {
  content: none !important;
  display: none !important;
}

.desktop-nav > a.nav-link .nav-icon,
.desktop-nav > a.nav-link .nav-label {
  position: relative;
  z-index: 1;
}

/* Idle and hovered non-active links stay neutral: hover never impersonates active. */
.desktop-nav > a.nav-link:not(.active),
.desktop-nav > a.nav-link:not(.active):hover,
.desktop-nav > a.nav-link:not(.active):focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: #ddd5c6 !important;
  transform: none !important;
}

.desktop-nav > a.nav-link:not(.active)::before {
  opacity: 0;
  transform: translateY(3px) scale(.965);
  border-color: rgba(236,193,105,0);
  box-shadow: inset 0 1px 0 rgba(255,239,195,0), 0 3px 12px rgba(0,0,0,0);
}

.desktop-nav > a.nav-link:not(.active):hover .nav-icon,
.desktop-nav > a.nav-link:not(.active):focus-visible .nav-icon {
  color: inherit !important;
  transform: none !important;
}

/* The one active tab reveals its box smoothly; keep the subtle lower gold edge. */
.desktop-nav > a.nav-link.active,
.desktop-nav > a.nav-link.active:hover,
.desktop-nav > a.nav-link.active:focus-visible {
  background: transparent !important;
  box-shadow: inset 0 -2px 0 var(--gold, #d7ae66) !important;
  color: #f5d58f !important;
  text-shadow: 0 0 18px rgba(239,202,123,.12) !important;
  transform: none !important;
}

.desktop-nav > a.nav-link.active::before {
  opacity: 1;
  transform: translateY(0) scale(1);
  border-color: rgba(236,193,105,.23);
  box-shadow: inset 0 1px 0 rgba(255,239,195,.08), 0 3px 12px rgba(0,0,0,.12);
}

.desktop-nav > a.nav-link.active .nav-icon {
  color: #f3d08b !important;
  transform: none !important;
}

/* Disable the former moving indicator; it could drift independently of .active. */
.desktop-nav > #yycNavHighlight,
.desktop-nav .yyc-nav-highlight {
  display: none !important;
}

/* Respect operating-system reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .desktop-nav > a.nav-link::before {
    transition: none !important;
    transform: none !important;
  }
}


/* ===== YYC HEADER + HERO VISIBILITY REFINEMENT =====
   Larger, readable navigation. Full tab row stays visible on desktop.
   The hamburger is reserved for mobile widths only.
*/
@media (min-width: 981px) {
  .topbar {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    max-width: none !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(8px, .8vw, 18px) !important;
    overflow: visible !important;
  }
  .topbar > .brand {
    box-sizing: border-box;
    flex: 0 0 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
    gap: clamp(7px, .55vw, 12px) !important;
    overflow: visible !important;
  }
  .topbar > .brand .brand-mark {
    flex: 0 0 auto !important;
    width: clamp(46px, 2.8vw, 56px) !important;
    height: clamp(46px, 2.8vw, 56px) !important;
  }
  .topbar > .brand .brand-mark img {
    width: calc(100% - 6px) !important;
    height: calc(100% - 6px) !important;
  }
  .topbar > .brand .brand-type { flex: 0 0 auto !important; min-width: 0 !important; }
  .topbar > .brand .brand-type b,
  .topbar > .brand .brand-type small { white-space: nowrap !important; }
  .topbar > .desktop-nav {
    display: flex !important;
    visibility: visible !important;
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: clamp(2px, .24vw, 6px) !important;
    overflow: visible !important;
    margin: 0 !important;
  }
  .topbar > .desktop-nav > a.nav-link {
    display: inline-flex !important;
    flex: 0 1 auto !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    white-space: nowrap !important;
    box-sizing: border-box;
    height: clamp(40px, 2.35vw, 46px) !important;
    padding: 0 clamp(4px, .38vw, 8px) !important;
    gap: clamp(3px, .28vw, 6px) !important;
    font-size: clamp(10px, .73vw, 13px) !important;
    letter-spacing: 0 !important;
  }
  .topbar > .desktop-nav > a.nav-link .nav-icon {
    display: inline-block !important;
    flex: 0 0 auto !important;
    font-size: clamp(11px, .82vw, 15px) !important;
  }
  .topbar > .desktop-nav > a.nav-link .nav-label {
    display: inline !important;
    white-space: nowrap !important;
  }
  .topbar > .desktop-nav > .nav-admin {
    display: inline-flex !important;
    flex: 0 1 auto !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    white-space: nowrap !important;
    box-sizing: border-box;
    height: clamp(40px, 2.35vw, 46px) !important;
    margin: 0 0 0 clamp(1px, .15vw, 4px) !important;
    padding: 0 clamp(8px, .58vw, 13px) !important;
    gap: clamp(3px, .25vw, 6px) !important;
    font-size: clamp(9px, .66vw, 12px) !important;
    letter-spacing: 0 !important;
  }
  .topbar > .menu-btn { display: none !important; }
}

/* A full-width desktop gets generous type without wasting the logo's space. */
@media (min-width: 1800px) {
  .topbar { height: 82px !important; padding: 0 clamp(22px, 1.6vw, 34px) !important; }
  .topbar > .brand { gap: 12px !important; }
  .topbar > .brand .brand-mark { width: 56px !important; height: 56px !important; }
  .topbar > .brand .brand-mark img { width: 50px !important; height: 50px !important; }
  .topbar > .brand .brand-type b {
    font-size: clamp(26px, 1.52vw, 31px) !important;
    letter-spacing: .09em !important;
    line-height: 1 !important;
  }
  .topbar > .brand .brand-type small {
    font-size: 9.5px !important;
    letter-spacing: .38em !important;
    margin-top: 6px !important;
  }
}

/* Mid/wide desktop: keep every item inline, but protect the whole row from collision. */
@media (min-width: 1441px) and (max-width: 1799px) {
  .topbar { height: 78px !important; padding: 0 20px !important; gap: 10px !important; }
  .topbar > .brand .brand-mark { width: 50px !important; height: 50px !important; }
  .topbar > .brand .brand-type b { font-size: 25px !important; letter-spacing: .075em !important; }
  .topbar > .brand .brand-type small { font-size: 8.5px !important; letter-spacing: .32em !important; }
  .topbar > .desktop-nav > a.nav-link { font-size: 11.3px !important; padding: 0 5px !important; }
  .topbar > .desktop-nav > a.nav-link .nav-icon { font-size: 12px !important; }
  .topbar > .desktop-nav > .nav-admin { font-size: 9.9px !important; padding: 0 8px !important; }
}

/* Compact desktop/laptop: small-but-readable type, icons retained, no hamburger. */
@media (min-width: 1201px) and (max-width: 1440px) {
  .topbar { height: 76px !important; padding: 0 12px !important; gap: 7px !important; }
  .topbar > .brand .brand-mark { width: 44px !important; height: 44px !important; }
  .topbar > .brand .brand-type b { font-size: 20px !important; letter-spacing: .04em !important; }
  .topbar > .brand .brand-type small { font-size: 7px !important; letter-spacing: .24em !important; }
  .topbar > .desktop-nav > a.nav-link { font-size: 9.7px !important; padding: 0 3px !important; gap: 2px !important; }
  .topbar > .desktop-nav > a.nav-link .nav-icon { font-size: 10px !important; }
  .topbar > .desktop-nav > .nav-admin { font-size: 8.7px !important; padding: 0 4px !important; gap: 2px !important; }
}

@media (min-width: 981px) and (max-width: 1200px) {
  .topbar { height: 72px !important; padding: 0 8px !important; gap: 5px !important; }
  .topbar > .brand { gap: 5px !important; }
  .topbar > .brand .brand-mark { width: 36px !important; height: 36px !important; }
  .topbar > .brand .brand-type b { font-size: 14px !important; letter-spacing: .015em !important; }
  .topbar > .brand .brand-type small { font-size: 5.5px !important; letter-spacing: .15em !important; margin-top: 3px !important; }
  .topbar > .desktop-nav > a.nav-link { font-size: 7.5px !important; padding: 0 2px !important; gap: 1px !important; }
  .topbar > .desktop-nav > a.nav-link .nav-icon { font-size: 8px !important; }
  .topbar > .desktop-nav > .nav-admin { font-size: 6.7px !important; padding: 0 2.5px !important; gap: 1px !important; }
}

@media (max-width: 980px) {
  .topbar > .desktop-nav { display: none !important; }
  .topbar > .menu-btn { display: block !important; }
}

/* ===== HERO: MAKE THE BACKDROP RELIABLY VISIBLE UNDER THE NAV ===== */
.hero {
  isolation: isolate !important;
  position: relative !important;
  background-color: #071015 !important;
  background-image:
    radial-gradient(ellipse at 24% 18%, rgba(204, 151, 55, .16), transparent 36%),
    linear-gradient(180deg, rgba(4, 9, 13, .08), rgba(4, 9, 13, .22)),
    url('../assets/hero-tulunad.webp') !important;
  background-position: center, center, center 42% !important;
  background-size: cover, cover, cover !important;
  background-repeat: no-repeat !important;
}
.hero-photo {
  z-index: 0 !important;
  opacity: 1 !important;
  background-color: #071015 !important;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(204, 151, 55, .12), transparent 42%),
    url('../assets/hero-tulunad.webp') !important;
  background-position: center, center 42% !important;
  background-size: cover, cover !important;
  background-repeat: no-repeat !important;
  /* Keep the original performance-aware filter from styles.css; no forced compositing here. */
}
.hero-vignette {
  z-index: 1 !important;
  opacity: 1 !important;
  background:
    linear-gradient(90deg, rgba(2, 4, 7, .45) 0%, rgba(3, 5, 8, .20) 42%, rgba(3, 5, 8, .16) 68%, rgba(3, 5, 8, .55) 100%),
    linear-gradient(180deg, rgba(2, 4, 7, .24) 0%, rgba(2, 4, 7, .04) 42%, rgba(2, 5, 8, .35) 100%) !important;
}
.hero-glow,
.hero-grid-line { z-index: 2 !important; pointer-events: none !important; }
.hero > .hero-main,
.hero > .culture-panel,
.hero > .hero-bottom {
  position: relative !important;
  z-index: 3 !important;
}

/* On ultra-wide but short windows, bring the main hero content up into view. */
@media (min-width: 981px) and (max-height: 720px) {
  .hero {
    min-height: calc(100svh - 82px) !important;
    padding: 38px 34px 44px !important;
    align-items: start !important;
    gap: 22px !important;
  }
  .hero-main { max-width: 720px !important; padding: 0 10px !important; }
  .hero-logo { width: clamp(76px, 12vh, 108px) !important; height: clamp(76px, 12vh, 108px) !important; margin-bottom: 8px !important; }
  .brand-lockup h1 { font-size: clamp(42px, 6.7vh, 66px) !important; line-height: .92 !important; }
  .lockup-line { margin-top: 9px !important; gap: 10px !important; }
  .lockup-line i { width: 48px !important; }
  .lockup-line span { font-size: 12px !important; letter-spacing: .28em !important; }
  .hero-establishment { font-size: 8px !important; margin-top: 8px !important; }
  .association-wrap { min-height: 28px !important; margin: 7px auto 0 !important; gap: 7px !important; }
  .association-wrap img { width: 29px !important; height: 29px !important; }
  .association-wrap span { font-size: 6.5px !important; }
  .association-wrap strong { font-size: 10px !important; margin-top: 2px !important; }
  .slogan { font-size: 17px !important; margin: 7px 0 3px !important; }
  .slogan span { font-size: 16px !important; }
  .gold-quote { font-size: 22px !important; margin-top: 2px !important; }
  .gold-quote strong { font-size: 25px !important; margin-top: 1px !important; }
  .social-row { min-height: 30px !important; gap: 6px !important; margin: 8px 0 7px !important; }
  .social-row a { width: 30px !important; height: 30px !important; }
  .social-row a img { width: 23px !important; height: 23px !important; }
  .hero-actions { gap: 7px !important; }
  .hero-actions .btn { min-height: 34px !important; padding: 0 12px !important; font-size: 9px !important; }
  .culture-panel { min-height: 0 !important; padding: 0 8px 12px !important; }
  .culture-overline em { font-size: clamp(22px, 4.5vh, 31px) !important; }
  .culture-copy { font-size: 10px !important; line-height: 1.45 !important; }
  .culture-orbs { gap: 7px !important; }
  .orb-image, .orb-dharma .orb-image, .orb-aati .orb-image, .orb-yak .orb-image { width: 70px !important; height: 70px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo { animation: none !important; transition: none !important; }
  .topbar > .desktop-nav > a.nav-link::before { transition: none !important; transform: none !important; }
}


/* ===== LOW-DATA / REDUCED-MOTION OVERRIDE ===== */
/* Preserve the site's adaptive performance safeguards over the cosmetic hero lift. */
body.yyc-low-data .hero-photo,
body.yyc-reduced-motion .hero-photo {
  filter: none !important;
  will-change: auto !important;
}


/* ===== FINAL TAB ICON + LABEL INLINE ALIGNMENT =====
   Prevent nav items from collapsing into icon-above-label stacks when the header
   flex row becomes tight. Each tab gets its content width, and its icon comes first.
*/
@media (min-width: 981px) {
  .topbar > .desktop-nav > a.nav-link {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    align-content: center !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    text-align: left !important;
    line-height: 1.1 !important;
    gap: clamp(3px, .28vw, 6px) !important;
  }
  .topbar > .desktop-nav > a.nav-link .nav-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    order: 0 !important;
  }
  .topbar > .desktop-nav > a.nav-link .nav-label {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    align-self: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: max-content !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 0 !important;
    order: 1 !important;
  }
  .topbar > .desktop-nav > .nav-admin {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }
  .topbar > .desktop-nav > .nav-admin > span {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    line-height: 1 !important;
  }
}

/* Keep the original compact sizing by available width, not by forcing labels to wrap. */
@media (min-width: 1441px) and (max-width: 1799px) {
  .topbar > .desktop-nav > a.nav-link { padding-left: 5px !important; padding-right: 5px !important; }
  .topbar > .desktop-nav > .nav-admin { padding-left: 7px !important; padding-right: 7px !important; }
}
@media (min-width: 1201px) and (max-width: 1440px) {
  .topbar > .desktop-nav > a.nav-link { padding-left: 3px !important; padding-right: 3px !important; }
  .topbar > .desktop-nav > .nav-admin { padding-left: 4px !important; padding-right: 4px !important; }
}
