/* ============================================================
   nav.css v6 — vibrant, flat 12-link nav
   Desktop >= 1080px: horizontal. Mobile < 1080px: hamburger.
   ============================================================ */

#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  padding: 0 24px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: space-between; justify-content: space-between;
  gap: 12px;
  background: transparent;
  transition: background .4s, box-shadow .4s;
}
#mainNav.scrolled {
  background: rgba(10,13,15,.96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(249,115,22,.15), 0 4px 28px rgba(0,0,0,.6);
}

/* ── Logo ─────────────────────────────────────────── */
.nav-logo {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 10px; text-decoration: none; flex-shrink: 0;
}
.nav-logo-img {
  width: 42px; height: 42px; flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(249,115,22,.4));
  transition: transform .35s ease;
}
.nav-logo:hover .nav-logo-img { transform: rotate(6deg) scale(1.08); }
.nav-logo-text {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  gap: 1px; min-width: 0;
}
.nl-name {
  font-family: var(--serif); font-size: .92rem; font-weight: 400;
  color: var(--orange-l); line-height: 1; white-space: nowrap;
}
.nl-sub {
  font-size: .5rem; font-weight: 400;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--tx-dim); white-space: nowrap;
}

/* ── Desktop horizontal list ──────────────────────── */
.nav-desktop {
  display: -webkit-flex !important; display: flex !important;
  -webkit-flex-direction: row !important; flex-direction: row !important;
  -webkit-align-items: center; align-items: center;
  -webkit-flex-wrap: nowrap; flex-wrap: nowrap;
  gap: 2px; list-style: none; margin: 0; padding: 0;
  overflow: hidden;
}
.nav-desktop > li { flex-shrink: 0; }

.nav-desktop a {
  display: block;
  font-size: .63rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(226,232,240,.7);
  text-decoration: none; padding: 7px 8px;
  white-space: nowrap;
  position: relative;
  transition: color .25s;
}
.nav-desktop a::after {
  content: ''; position: absolute;
  bottom: 3px; left: 8px; right: 8px;
  height: 1.5px; background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
  border-radius: 1px;
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--orange-l); }
.nav-desktop a:hover::after,
.nav-desktop a.active::after { transform: scaleX(1); }

/* Contact = accent pill */
.nav-desktop > li:last-child a {
  background: var(--orange); color: #000 !important;
  border-radius: 8px; padding: 7px 14px;
  font-weight: 700; margin-left: 4px;
}
.nav-desktop > li:last-child a::after { display: none !important; }
.nav-desktop > li:last-child a:hover { background: var(--orange-l); transform: translateY(-1px); }

/* ── Hamburger ─────────────────────────────────────── */
.nav-ham {
  display: none !important;
  -webkit-flex-direction: column; flex-direction: column;
  gap: 5px; padding: 8px; background: none; border: none;
  cursor: pointer; flex-shrink: 0;
  min-width: 44px; min-height: 44px;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
}
.nav-ham span {
  display: block; width: 22px; height: 2px;
  background: var(--orange-l); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
#navHam[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#navHam[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#navHam[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile overlay ────────────────────────────────── */
#mobileOverlay {
  display: none;
  position: fixed; inset: 0; z-index: 700;
  background: rgba(10,13,15,.99);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: flex-start; justify-content: flex-start;
  padding: 80px 28px 40px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#mobileOverlay.open { display: -webkit-flex; display: flex; }

#mobileClose {
  position: fixed; top: 18px; right: 18px;
  color: var(--tx-mid); cursor: pointer; padding: 12px;
  transition: color .25s; background: none; border: none; z-index: 701;
  min-width: 44px; min-height: 44px;
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
}
#mobileClose:hover { color: var(--orange-l); }

.mob-logo-wrap {
  margin-bottom: 24px;
  animation: fadeIn .5s ease;
}
.mob-logo { width: 68px; height: 68px; filter: drop-shadow(0 4px 16px rgba(249,115,22,.5)); }

#mobileOverlay nav {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  -webkit-align-items: center; align-items: center;
  width: 100%; gap: 0;
}
.mob-link {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 5vw, 2.1rem); font-weight: 300;
  color: var(--tx-bright); text-decoration: none;
  padding: 9px 0; text-align: center; width: 100%;
  border-bottom: 1px solid rgba(249,115,22,.08);
  transition: color .25s;
  opacity: 0; transform: translateY(14px);
  display: block;
}
.mob-link:last-child { border-bottom: none; }
#mobileOverlay.open .mob-link {
  animation: mobIn .4s ease forwards;
  animation-delay: calc(var(--i) * .04s);
}
@keyframes mobIn { to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.mob-link:hover, .mob-link.active { color: var(--orange-l); }

.mob-social {
  display: -webkit-flex; display: flex;
  gap: 16px; margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(249,115,22,.15);
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tx-dim);
}
.mob-social a { color: var(--tx-dim); transition: color .25s; }
.mob-social a:hover { color: var(--orange-l); }

/* ── BREAKPOINTS ───────────────────────────────────── */
@media (min-width: 1400px) {
  #mainNav { padding: 0 36px; }
  .nav-desktop a { padding: 7px 10px; font-size: .66rem; }
}
@media (max-width: 1399px) and (min-width: 1081px) {
  .nav-desktop a { padding: 6px 6px; font-size: .6rem; letter-spacing: .08em; }
  .nl-sub { display: none; }
}
@media (max-width: 1080px) {
  .nav-desktop { display: none !important; }
  .nav-ham     { display: -webkit-flex !important; display: flex !important; }
  #mainNav { padding: 0 18px; }
}
@media (max-width: 400px) {
  .nav-logo-img { width: 34px; height: 34px; }
  .nl-name      { font-size: .8rem; }
  .mob-link     { font-size: 1.2rem; }
}
