/* nav.css — the ONE shared source for the site header: logo, top nav, and the
 * Portfolio mega-menu. Loaded by every page (site.css @imports it; contact.html
 * links it directly) so the logo+nav is identical everywhere and edited once. */

/* ----- HEADER (top strip) ----- */
.tk-header {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 64px 0 64px;
  gap: 40px;
}

/* ===== STICKY NAV (scroll-activated, cloned to <body> by sticky-nav.js) ===== */
.tk-stickynav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9990;
  background: rgba(6,4,2,0.92);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid rgba(201,162,75,0.22);
  box-shadow: 0 14px 40px -12px rgba(0,0,0,0.7);
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
  will-change: opacity;
}
.tk-stickynav.is-visible { opacity: 1; visibility: visible; }
/* Compact the cloned header inside the bar */
.tk-stickynav .tk-header {
  padding: 14px 64px; gap: 40px;
}
.tk-stickynav .tk-brand .logo {
  height: 48px;
  filter: drop-shadow(0 1px 8px rgba(232,170,101,0.18));
}
.tk-stickynav .tk-nav a { font-size: 17px; }
/* Keep the sticky-clone mega menu compact (the clone renders at native 1:1,
   outside the scaled stage) so it matches the in-hero menu size. */
.tk-stickynav .tk-mega { width: min(1180px, 94vw); }
.tk-stickynav .tk-cat__card { height: 118px; }
.tk-stickynav .tk-cat__title { font-size: 15px; bottom: 11px; left: 14px; right: 14px; }
.tk-stickynav .tk-cat__desc { padding: 12px 14px 15px; font-size: 12px; line-height: 1.45; }
.tk-stickynav .tk-mega__foot { padding: 12px 20px; }
/* Dropdown bridge sits right under the compact bar */
.tk-stickynav .tk-dropdown::before { top: -28px; height: 30px; }
@media (max-width: 900px) {
  .tk-stickynav .tk-header { padding: 12px 20px; }
  .tk-stickynav .tk-brand .logo { height: 40px; }
}
.tk-brand {
  display: flex; align-items: center;
  text-decoration: none; cursor: pointer;
}
.tk-brand .logo {
  height: 80px; width: auto; display: block;
  filter: drop-shadow(0 1px 12px rgba(232,170,101,0.18));
}
.tk-nav {
  display: flex; gap: 72px; list-style: none; margin: 0; padding: 0;
}
.tk-nav a {
  font-family: var(--font-sans);
  font-weight: 400; font-size: 20px; line-height: 1;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: #fff;
  transition: opacity .25s ease;
}
.tk-nav a:hover { opacity: 0.6; }
.tk-nav a.is-active {
  background: var(--grad-bronze);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ===== NAV MEGA-MENU (Portfolio categories + subpages) =================== */
.tk-nav li { position: relative; }
.tk-nav .tk-has-sub { position: static; }   /* let the mega panel center on the header */
.tk-nav .tk-has-sub > a { display: inline-flex; align-items: center; gap: 9px; }
.tk-caret {
  color: #F0C57E; flex: none;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
  transition: transform .35s ease, color .25s ease;
}
.tk-nav .tk-has-sub:hover > a .tk-caret { transform: rotate(180deg); color: #FBE6B8; }

.tk-dropdown {
  position: absolute; top: 100%; z-index: 60;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
/* invisible hover bridge — spans the full gap from the trigger down into the
   panel so it never closes while the cursor travels there */
.tk-dropdown::before {
  content: ""; position: absolute; top: -54px; left: 0; right: 0; height: 56px;
}

/* mega panel — 4 category columns */
.tk-mega {
  left: 50%; transform: translate(-50%, 6px);
  width: min(1560px, 97vw);
  padding: 0;
  background: linear-gradient(180deg, rgba(18,12,7,0.985), rgba(7,4,2,0.985));
  border: 1px solid rgba(201,162,75,0.32);
  border-radius: 16px;
  box-shadow: 0 42px 90px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,236,184,0.10);
}
.tk-mega::after { content: none; }
/* Homepage header lives inside a transform:scale() stage, which blows the mega
   up on wide monitors. Counter-scale it back to 1:1 so it matches the other
   pages (work-with-ted etc. render the header at true scale). */
.tk-stage .tk-mega { transform-origin: top center; transform: translate(-50%, 6px) scale(calc(1 / var(--stage-scale, 1))); }
.tk-nav .tk-has-sub:hover .tk-dropdown,
.tk-dropdown:hover {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translate(-50%, 10px);
}
.tk-stage .tk-nav .tk-has-sub:hover .tk-mega,
.tk-stage .tk-mega:hover { transform: translate(-50%, 10px) scale(calc(1 / var(--stage-scale, 1))); }
/* 4 image-card categories, flush (no gaps); alternating column tones */
.tk-mega__grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 0; align-items: stretch;
  border-radius: 16px 16px 0 0; overflow: hidden;
}
.tk-cat { min-width: 0; display: flex; flex-direction: column; text-decoration: none; }
.tk-cat:nth-child(odd)  { background: #0b0805; }
.tk-cat:nth-child(even) { background: #130e09; }
.tk-cat:not(:last-child) { border-right: 1px solid rgba(201,162,75,0.16); }
.tk-cat__card {
  position: relative; display: block; height: 168px;
  border-radius: 0; overflow: hidden; text-decoration: none;
}
.tk-cat__card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 50%; transition: transform .7s cubic-bezier(.16,1,.3,1);
}
.tk-cat:nth-child(5) .tk-cat__card img { object-position: center 30%; }
.tk-cat__card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,3,1,0.05) 0%, rgba(5,3,1,0.42) 52%, rgba(5,3,1,0.92) 100%);
}
.tk-cat__card:hover img { transform: scale(1.07); }
.tk-cat__card:hover::after { background: linear-gradient(180deg, rgba(5,3,1,0) 0%, rgba(5,3,1,0.32) 52%, rgba(5,3,1,0.85) 100%); }
.tk-cat__title {
  position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2;
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  line-height: 1.04; letter-spacing: 0.02em; text-transform: uppercase;
  color: #FBE6B8; text-shadow: 0 2px 12px rgba(0,0,0,0.85);
}
/* category chevron — right-aligned on the card (matches the subpage chevrons) */
.tk-cat__title::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid currentColor; border-top: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.tk-cat__card:hover .tk-cat__title::after { right: -3px; }

/* category description — replaces the old sub-page list */
.tk-cat__desc {
  display: block; flex: 1 1 auto;
  padding: 16px 18px 20px;
  font-family: var(--font-body); font-size: 13.5px; line-height: 1.5;
  color: rgba(255,245,230,0.6);
  transition: color .2s ease;
}
.tk-cat:hover .tk-cat__desc { color: rgba(255,245,230,0.84); }

/* panel footer — note + View Portfolio button */
.tk-mega__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px 26px;
  border-top: 1px solid rgba(201,162,75,0.2);
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, rgba(22,15,8,0.7), rgba(8,5,2,0.7));
}
.tk-mega__foot-note {
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,245,230,0.48);
}
.tk-mega__btn {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  color: #1A1206; padding: 13px 28px; border-radius: 3px;
  background: linear-gradient(180deg, #F4D58E 0%, #C9913F 100%);
  box-shadow: 0 12px 26px -12px rgba(244,213,142,0.6);
  transition: filter .2s ease, transform .2s ease, gap .2s ease;
}
.tk-mega__btn:hover { filter: brightness(1.05); transform: translateY(-1px); gap: 14px; }
.tk-mega__btn svg { transition: transform .2s ease; }
.tk-mega__btn:hover svg { transform: translateX(3px); }
.tk-cat__toggle {
  margin-top: 10px; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(201,162,75,0.08);
  border: 1px solid rgba(201,162,75,0.24); border-radius: 9px;
  padding: 11px 14px; cursor: pointer;
  font-family: var(--font-sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,245,230,0.82);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.tk-cat__toggle:hover {
  background: rgba(201,162,75,0.16); border-color: rgba(201,162,75,0.55); color: #FBE6B8;
}
.tk-cat__chev { flex: none; color: #F0C57E; transition: transform .3s ease; }
.tk-cat.is-open .tk-cat__chev { transform: rotate(180deg); }
.tk-cat__list {
  display: flex; flex-direction: column; gap: 1px; margin-top: 0;
  padding: 16px 18px 20px;
}
.tk-cat__list a {
  position: relative; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 400; line-height: 1.35;
  letter-spacing: 0.01em; text-transform: none; color: rgba(255,245,230,0.8);
  padding: 8px 4px 8px 8px; border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.tk-cat__list a::after {
  content: ""; flex: none; margin-left: auto;
  width: 5px; height: 5px;
  border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor;
  transform: rotate(45deg); opacity: 0.45;
  transition: opacity .2s ease, transform .2s ease;
}
.tk-cat__list a:hover { background: rgba(201,162,75,0.10); color: #FBE6B8; }
.tk-cat__list a:hover::after { opacity: 0.95; transform: translateX(2px) rotate(45deg); }

/* ----- MOBILE: Portfolio categories + sub-items ----- */
.tk-mobile-sub {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 4px 0 10px;
}
.tk-mobile-menu .tk-mobile-sub a.tk-mobile-cat {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  letter-spacing: 0.04em; color: #FBE6B8; margin-top: 12px;
}
.tk-mobile-menu .tk-mobile-sub a.tk-mobile-subitem {
  font-size: 14px; letter-spacing: 0.08em; font-weight: 400;
  color: rgba(255,234,202,0.6);
}
.tk-mobile-menu .tk-mobile-sub .tk-mobile-catdesc {
  font-family: var(--font-body); font-size: 13px; line-height: 1.45;
  color: rgba(255,234,202,0.5); max-width: 320px; text-align: center;
}
.tk-mobile-menu .tk-mobile-sub a.tk-mobile-viewport {
  margin-top: 18px;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #1A1206; padding: 13px 30px; border-radius: 3px;
  background: linear-gradient(180deg, #F4D58E 0%, #C9913F 100%);
}

/* ----- MOBILE TOGGLE + OVERLAY (self-contained, media-query driven) -----
   Desktop: hamburger + overlay hidden, desktop nav shown.
   On site.css pages this is @imported first, so those pages' own
   .tk-stage.is-mobile rules (loaded later) still take precedence. */
.tk-menu-toggle { display: none; }
.tk-mobile-menu { display: none; }
.tk-mobile-menu a {
  font-family: var(--font-sans); font-size: 24px; font-weight: 400;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; text-decoration: none;
}
.tk-mobile-menu a.is-active {
  background: var(--grad-bronze);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tk-mobile-menu .close {
  position: absolute; top: 20px; right: 20px;
  background: transparent; border: 0; cursor: pointer; color: #fff; padding: 8px;
}
.tk-mobile-menu .close svg { width: 28px; height: 28px; }
@media (max-width: 900px) {
  .tk-nav { display: none; }
  .tk-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; cursor: pointer;
    color: #fff; padding: 8px; margin-left: auto;
  }
  .tk-menu-toggle svg { width: 28px; height: 28px; }
  .tk-mobile-menu {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(0,0,0,0.97);
    transform: translateY(-100%);
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; padding: 80px 24px;
  }
  .tk-mobile-menu.is-open { transform: translateY(0); }
}
