/* ============================================================
   VINOVE — Navigation
   Adaptive bar · Companies mega-menu (feature rail + cards)
   Simple dropdowns · Page scrim · Mobile overlay
   ============================================================ */

/* ══════════════════════════════════════════
   BAR
══════════════════════════════════════════ */
#nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 800;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background .45s var(--ease), border-color .45s, box-shadow .45s, height .3s var(--ease);
}

#nav.is-dark {
  background: rgba(9, 12, 21, .55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: rgba(255,255,255,.07);
}
#nav.is-light {
  background: rgba(250, 249, 245, .80);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 1px 24px rgba(14,19,32,.05);
}
/* When any dropdown is open, solidify the bar */
#nav.nav-open.is-dark  { background: rgba(9,12,21,.92); }
#nav.nav-open.is-light { background: rgba(250,249,245,.98); }

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Logo ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  z-index: 2;
}
.nav-logo-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  transition: color .3s;
}
#nav.is-light .nav-logo-text { color: var(--ink); }

.nav-logo-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--terra);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .55s var(--ease-back), box-shadow .35s;
  box-shadow: 0 0 0 0 rgba(200,85,61,.45);
}
.nav-logo:hover .nav-logo-mark {
  transform: rotate(90deg) scale(1.06);
  box-shadow: 0 0 0 6px rgba(200,85,61,.12);
}
.nav-logo-mark svg { width: 12px; height: 12px; fill: #fff; }

/* ── Links wrapper ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-item { position: relative; }

/* ── Link / button ── */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.66);
  padding: 9px 15px;
  border-radius: var(--r-full);
  border: none;
  background: none;
  white-space: nowrap;
  line-height: 1;
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-link:hover,
.nav-link[aria-expanded="true"] {
  color: #fff;
  background: rgba(255,255,255,.08);
}
#nav.is-light .nav-link { color: var(--text-body); }
#nav.is-light .nav-link:hover,
#nav.is-light .nav-link[aria-expanded="true"] {
  color: var(--text-strong);
  background: rgba(14,19,32,.05);
}

/* Active page — terra dot under the link */
.nav-link.is-current::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--terra);
  transform: translateX(-50%);
}

/* Chevron */
.nav-chev {
  width: 11px; height: 11px;
  stroke: currentColor; stroke-width: 2.2; fill: none;
  flex-shrink: 0;
  transition: transform .3s var(--ease);
}
.nav-link[aria-expanded="true"] .nav-chev { transform: rotate(-180deg); }

/* ── CTA ── */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background: var(--terra);
  padding: 11px 20px;
  border-radius: var(--r-full);
  margin-left: 12px;
  white-space: nowrap;
  transition: background var(--dur-fast), transform var(--dur-base) var(--ease-back), box-shadow var(--dur-base);
}
.nav-cta:hover {
  background: var(--terra-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,85,61,.45);
}
.nav-cta svg {
  width: 13px; height: 13px;
  stroke: currentColor; stroke-width: 2.2; fill: none;
  transition: transform var(--dur-base) var(--ease);
}
.nav-cta:hover svg { transform: translateX(3px); }

/* ══════════════════════════════════════════
   SCRIM (dims page behind open dropdown)
══════════════════════════════════════════ */
#nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 790;
  background: rgba(9,12,21,.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
#nav-scrim.show { opacity: 1; }

/* ══════════════════════════════════════════
   DROPDOWN BASE
══════════════════════════════════════════ */
.nav-drop {
  position: absolute;
  top: calc(100% + 14px);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(14,19,32,.07);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(14,19,32,.03),
    0 12px 28px rgba(14,19,32,.10),
    0 32px 72px rgba(14,19,32,.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.98);
  transform-origin: top center;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
  z-index: 800;
}
/* gap bridge so the mouse can cross from trigger to panel */
.nav-drop::before {
  content: '';
  position: absolute;
  bottom: 100%; left: 0; right: 0;
  height: 16px;
}
.nav-item[data-open] .nav-drop {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* ══════════════════════════════════════════
   MEGA DROPDOWN (Companies)
══════════════════════════════════════════ */
.drop-mega {
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(.98);
  width: min(740px, calc(100vw - var(--gutter) * 2));
  padding: 0;
  overflow: hidden;
}
.nav-item[data-open] .drop-mega {
  transform: translateX(-50%) translateY(0) scale(1);
}

.mega-grid-wrap {
  display: grid;
  grid-template-columns: 244px 1fr;
}

/* Feature rail */
.mega-rail {
  background: linear-gradient(165deg, var(--ink) 0%, #161d2e 100%);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.mega-rail::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,85,61,.20) 0%, transparent 65%);
  pointer-events: none;
}
.mega-rail-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 14px;
}
.mega-rail-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 12px;
}
.mega-rail-text {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,.6);
  margin-bottom: auto;
}
.mega-rail-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: gap .2s var(--ease);
}
.mega-rail-cta svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 2.2; fill: none;
  transition: transform .2s var(--ease);
}
.mega-rail-cta:hover { gap: 11px; }
.mega-rail-cta:hover svg { transform: translateX(2px); }

/* Company cards */
.mega-cards {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-co {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 13px;
  overflow: hidden;
  transition: background .2s var(--ease);
}
/* brand wash on hover */
.mega-co::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--co);
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.mega-co:hover { background: var(--surface-2); }
.mega-co:hover::before { opacity: .06; }

.mega-co-bar {
  position: relative;
  width: 4px;
  align-self: stretch;
  border-radius: var(--r-full);
  background: var(--co);
  flex-shrink: 0;
  transform: scaleY(.5);
  opacity: .55;
  transition: transform .28s var(--ease), opacity .25s;
}
.mega-co:hover .mega-co-bar { transform: scaleY(1); opacity: 1; }

.mega-co-text {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-co-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mega-co-flag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  color: #fff;
  background: var(--co);
  padding: 2px 6px;
  border-radius: var(--r-full);
}
.mega-co-tag {
  font-size: 12.5px;
  color: var(--text-body);
}
.mega-co-arr {
  position: relative;
  width: 13px; height: 13px;
  stroke: var(--text-muted);
  stroke-width: 1.6; fill: none;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), stroke .22s;
}
.mega-co:hover .mega-co-arr {
  opacity: 1;
  transform: translateX(0);
  stroke: var(--co);
}

/* ══════════════════════════════════════════
   SIMPLE DROPDOWN (About, Careers)
══════════════════════════════════════════ */
.drop-simple {
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(.98);
  min-width: 300px;
  padding: 10px;
}
.nav-item[data-open] .drop-simple {
  transform: translateX(-50%) translateY(0) scale(1);
}

.drop-row {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 11px 12px;
  border-radius: 14px;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.drop-row:hover { background: var(--surface-2); transform: translateX(3px); }

.drop-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.drop-row:hover .drop-icon {
  background: var(--terra-tint);
  border-color: rgba(200,85,61,.22);
}
.drop-icon svg {
  width: 16px; height: 16px;
  stroke: var(--text-body); stroke-width: 1.7; fill: none;
  transition: stroke var(--dur-fast);
}
.drop-row:hover .drop-icon svg { stroke: var(--terra-hover); }

.drop-row-text { display: flex; flex-direction: column; gap: 2px; }
.drop-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.25;
}
.drop-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.drop-sep {
  display: block;
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 8px;
}

.drop-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--terra-hover);
  border-radius: 12px;
  transition: background var(--dur-fast), gap .2s;
}
.drop-all:hover { background: var(--terra-tint); gap: 10px; }
.drop-all svg {
  width: 12px; height: 12px;
  stroke: currentColor; stroke-width: 2.4; fill: none;
}

/* ══════════════════════════════════════════
   BURGER (animated)
══════════════════════════════════════════ */
.nav-burger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 2;
}
.nav-burger-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px; height: 18px;
}
.nav-burger-box span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: #fff;
  transition: transform .3s var(--ease), opacity .2s, background .3s;
}
#nav.is-light .nav-burger-box span { background: var(--ink); }
.nav-burger-box span:nth-child(2) { width: 70%; }
.nav-burger:hover .nav-burger-box span:nth-child(2) { width: 100%; }

/* ══════════════════════════════════════════
   STAGGERED ENTRANCE
══════════════════════════════════════════ */
@keyframes drop-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.nav-item[data-open] .mega-co,
.nav-item[data-open] .drop-row,
.nav-item[data-open] .drop-all {
  opacity: 0;
  animation: drop-in .28s var(--ease) forwards;
}
.nav-item[data-open] .mega-co:nth-child(1),
.nav-item[data-open] .drop-row:nth-child(1) { animation-delay: 40ms; }
.nav-item[data-open] .mega-co:nth-child(2),
.nav-item[data-open] .drop-row:nth-child(2) { animation-delay: 75ms; }
.nav-item[data-open] .mega-co:nth-child(3),
.nav-item[data-open] .drop-row:nth-child(3) { animation-delay: 110ms; }
.nav-item[data-open] .mega-co:nth-child(4) { animation-delay: 145ms; }
.nav-item[data-open] .mega-co:nth-child(5) { animation-delay: 180ms; }
.nav-item[data-open] .drop-all { animation-delay: 150ms; }
.nav-item[data-open] .mega-rail {
  opacity: 0;
  animation: drop-in .3s var(--ease) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .nav-drop, .mega-co, .drop-row, .drop-all, .mega-rail { transition: opacity .15s; animation: none !important; }
}

/* ══════════════════════════════════════════
   MOBILE OVERLAY
══════════════════════════════════════════ */
#mob {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 850;
  background: var(--ink);
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#mob.open { display: flex; }

.mob-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  border-bottom: 1px solid var(--ink-border);
  flex-shrink: 0;
}
.mob-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 800; letter-spacing: -.03em;
  color: #fff;
}
.mob-x {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast); cursor: pointer; flex-shrink: 0;
}
.mob-x:hover { background: rgba(255,255,255,.12); }
.mob-x svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }

.mob-body { flex: 1; padding: 1.75rem var(--gutter) 3rem; }
.mob-label {
  font-size: 10px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.22);
  margin: 1.75rem 0 .5rem;
}
.mob-label:first-child { margin-top: 0; }

.mob-link {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; font-weight: 500; color: rgba(255,255,255,.65);
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color var(--dur-fast);
}
.mob-link:hover { color: #fff; }
.mob-link svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; opacity: .28; flex-shrink: 0; }

.mob-acc-btn {
  width: 100%; background: none; border: none;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 18px; font-weight: 500; color: rgba(255,255,255,.65);
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  transition: color var(--dur-fast); cursor: pointer;
}
.mob-acc-btn:hover,
.mob-acc-btn[aria-expanded="true"] { color: #fff; }
.mob-acc-chev { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; opacity: .28; flex-shrink: 0; transition: transform .25s var(--ease); }
.mob-acc-btn[aria-expanded="true"] .mob-acc-chev { transform: rotate(-180deg); opacity: .6; }

.mob-acc-body { display: none; padding: 8px 0 2px; }
.mob-acc-body.open { display: block; }

.mob-co {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  transition: background var(--dur-fast);
}
.mob-co:hover { background: rgba(255,255,255,.05); }
.mob-co-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.mob-co-name { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.68); flex: 1; }
.mob-co-cat { font-size: 11px; color: rgba(255,255,255,.4); letter-spacing: .04em; }

.mob-cta {
  display: block; text-align: center;
  background: var(--terra); color: #fff;
  border-radius: var(--r-full); padding: 15px;
  font-size: 15px; font-weight: 700; margin-top: 2rem;
  transition: background var(--dur-fast);
}
.mob-cta:hover { background: var(--terra-hover); }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 940px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
}
