/* ═══════════════════════════════════════════════════════════
   NAV — ADO Legal · Full-screen elite overlay
   ═══════════════════════════════════════════════════════════ */

/* ─── BAR ─────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5rem;
  background: transparent;
  transition: background 0.5s ease, border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(245,240,232,0.97);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom-color: rgba(139,105,20,0.14);
  box-shadow: 0 1px 0 rgba(139,105,20,0.08), 0 8px 40px rgba(10,8,6,0.06);
}

/* On hero (dark bg) — white logo when transparent */
.nav:not(.scrolled) .nav-logo-text,
.nav:not(.scrolled) .nav-logo-text span {
  color: rgba(255,255,255,0.88);
}
.nav:not(.scrolled) .nav-logo-text span { color: rgba(255,255,255,0.45); }
.nav:not(.scrolled) .lang-switch a { color: rgba(255,255,255,0.7); }
.nav:not(.scrolled) .lang-switch span { color: rgba(255,255,255,0.28); }
.nav:not(.scrolled) .lang-switch a.is-active { color: rgba(255,255,255,1); }
.nav:not(.scrolled) .nav-toggle span { background: rgba(255,255,255,0.88); }

/* ─── LOGO ────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.nav-logo-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav:not(.scrolled) .nav-logo-img {
  filter: brightness(0) invert(1) opacity(0.9);
}

.nav-logo-text {
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.28;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.4s ease;
}

.nav-logo-text span {
  display: block;
  font-size: 0.52rem;
  letter-spacing: 0.17em;
  color: var(--light);
  font-family: var(--sans);
  font-weight: 400;
  margin-top: 0.15rem;
  transition: color 0.4s ease;
}

/* ─── CONTROLS ────────────────────────────────────────────── */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  position: relative;
  z-index: 10;
}

/* ─── LANG SWITCH ─────────────────────────────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: var(--sans);
  line-height: 1;
  white-space: nowrap;
}

.lang-switch span { color: var(--muted); opacity: 0.35; }

.lang-switch a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.42;
  transition: opacity 0.2s ease, color 0.4s ease;
}

.lang-switch a.is-active { opacity: 1; font-weight: 500; }
.lang-switch a:hover { opacity: 1; }

/* ─── TOGGLE ──────────────────────────────────────────────── */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--text);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.22,0.1,0.36,1),
              opacity 0.3s ease,
              width 0.3s ease;
  border-radius: 0;
}

.nav-toggle span:nth-child(1) { width: 100%; }
.nav-toggle span:nth-child(2) { width: 62%; }
.nav-toggle span:nth-child(3) { width: 80%; }

.nav-toggle:hover span:nth-child(2) { width: 100%; }

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
  width: 100%;
}
.nav-toggle.is-active span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 100%;
}

/* White toggle on dark hero */
.nav:not(.scrolled) .nav-toggle span { background: rgba(255,255,255,0.88); }
.nav:not(.scrolled).nav-toggle-open .nav-toggle span { background: var(--text); }

/* ─── FULL-SCREEN OVERLAY ─────────────────────────────────── */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.42s cubic-bezier(0.22,0.1,0.36,1),
              visibility 0.42s cubic-bezier(0.22,0.1,0.36,1);
  z-index: 50;
  overflow: hidden;
}

.menu-overlay::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(139,105,20,0.2) 30%,
    rgba(139,105,20,0.2) 70%,
    transparent 100%
  );
  right: 42%;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ─── MENU PANEL — centered full-screen ───────────────────── */
.menu-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 10vw 60px;
  overflow: hidden;
}

/* Left column: nav links */
.menu-panel > a,
.menu-panel > a[href] {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 4.8rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.038em;
  text-decoration: none;
  color: var(--hero);
  opacity: 0;
  display: block;
  padding: 0.4rem 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s cubic-bezier(0.22,0.1,0.36,1),
    transform 0.5s cubic-bezier(0.22,0.1,0.36,1),
    color 0.2s ease;
  position: relative;
  width: fit-content;
}

.menu-panel > a::after {
  content: '';
  position: absolute;
  bottom: 0.3rem;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.28s cubic-bezier(0.22,0.1,0.36,1);
}

.menu-panel > a:hover::after,
.menu-panel > a.active::after {
  width: 100%;
}

.menu-panel > a:hover,
.menu-panel > a.active {
  color: var(--accent);
}

.menu-overlay.active .menu-panel > a {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger entrance */
.menu-overlay.active .menu-panel > a:nth-child(1) { transition-delay: 60ms; }
.menu-overlay.active .menu-panel > a:nth-child(2) { transition-delay: 100ms; }
.menu-overlay.active .menu-panel > a:nth-child(3) { transition-delay: 140ms; }
.menu-overlay.active .menu-panel > a:nth-child(4) { transition-delay: 180ms; }
.menu-overlay.active .menu-panel > a:nth-child(5) { transition-delay: 220ms; }
.menu-overlay.active .menu-panel > a:nth-child(6) { transition-delay: 260ms; }
.menu-overlay.active .menu-panel > a:nth-child(7) { transition-delay: 300ms; }

/* ─── MENU META ───────────────────────────────────────────── */
.menu-panel-meta {
  margin-top: auto;
  padding-top: 3rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.36s, transform 0.4s ease 0.36s;
}

.menu-overlay.active .menu-panel-meta {
  opacity: 1;
  transform: translateY(0);
}

.admin-access-link {
  font-family: var(--sans) !important;
  font-size: 0.60rem !important;
  letter-spacing: 0.20em !important;
  text-transform: uppercase;
  opacity: 0.32 !important;
  color: var(--text) !important;
  text-decoration: none;
  transition: opacity 0.2s ease !important;
}

.admin-access-link:hover { opacity: 0.8 !important; }

/* ─── MENU CONTACT INFO (right side) ─────────────────────── */
.menu-panel-contact {
  position: absolute;
  right: 10vw;
  bottom: 60px;
  text-align: right;
  opacity: 0;
  transition: opacity 0.4s ease 0.4s;
}

.menu-overlay.active .menu-panel-contact {
  opacity: 1;
}

.menu-panel-contact a {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.4rem;
  transition: color 0.2s ease;
}

.menu-panel-contact a:hover { color: var(--accent); }

/* ─── FOOTER ADMIN ────────────────────────────────────────── */
.footer-admin-link {
  font-size: 0.60rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255,255,255,0.25);
  transition: color 0.2s ease;
  display: inline-block;
}
.footer-admin-link:hover { color: rgba(255,255,255,0.55); }

/* ─── SCROLL LOCK ─────────────────────────────────────────── */
body.nav-open {
  overflow: hidden;
  padding-right: var(--scrollbar-w, 0px);
}

/* ─── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { height: 72px; padding: 0 1.5rem; }
  .nav-logo-img { height: 38px; }
  .header-controls { gap: 0.8rem; }
  .nav-toggle { width: 30px; height: 30px; gap: 4px; }

  .menu-panel {
    padding: 100px 2rem 50px;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .menu-panel > a {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
    padding: 0.5rem 0;
  }

  .menu-panel-contact {
    position: static;
    text-align: left;
    margin-top: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-overlay,
  .menu-panel > a,
  .menu-panel-meta,
  .nav-toggle span {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .nav { transition: none; }
}

@media print { .nav, ado-nav { display: none; } }
