/* ============================================================
   5ac.vn — Shared Navigation Styles (Nav.v2)
   Include AFTER base.css in ALL pages.
   ============================================================ */

/* Skip-link: hidden by default, visible on keyboard focus */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--ink, #141413);
  color: var(--paper, #faf9f5);
  font-family: var(--font-heading, 'Inter', system-ui, sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--orange, #d97757);
  outline-offset: 2px;
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--paper-warm);
  border-top: 1px solid var(--light-gray);
  padding: var(--s12) var(--s6) var(--s8);
  margin-top: var(--s16);
}
.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s8);
  margin-bottom: var(--s8);
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: var(--s3);
}
.footer-col h5 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--s3);
  font-family: var(--font-heading);
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: var(--s2); }
.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid var(--light-gray);
  padding-top: var(--s6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s3);
}
.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}
.footer-bottom .tag { color: var(--orange); }

/* ─── Nav Bar ────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  border-bottom: 1px solid var(--light-gray);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--s6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ─── Logo ───────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-logo svg {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.nav-logo-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
  vertical-align: middle;
  margin-left: 4px;
}
.nav-logo-line1 {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.1;
}
.nav-logo-line2 {
  font-size: .5rem;
  font-weight: 500;
  color: var(--orange);
  letter-spacing: .12em;
  line-height: 1.1;
}

/* ─── Nav Links ──────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s3);
  list-style: none;
}
.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-md);
  transition: color var(--dur) var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-active { color: var(--orange); }
.nav-links a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: var(--r-md);
}

/* ─── Nav Actions ────────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.nav-cta {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--orange);
  color: var(--paper);
  border: none;
  padding: var(--s1) var(--s4);
  border-radius: var(--r-full);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur) var(--ease-out);
}
.nav-cta:hover {
  background: var(--orange-deep);
  box-shadow: var(--sh-orange);
  text-decoration: none;
}
.nav-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.nav-cta-mobile {
  display: none;
}

/* ─── Theme Toggle ───────────────────────────────────── */
.theme-toggle,
.lang-toggle {
  background: none;
  border: 1px solid var(--light-gray);
  border-radius: var(--r-full);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.theme-toggle:hover,
.lang-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* ─── Lang Toggle ──────────────────────────────────────── */
.lang-toggle {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  width: 44px;
  text-transform: uppercase;
}

/* ─── Hamburger (Mobile) ─────────────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s1);
  color: var(--ink);
}
.nav-hamburger svg {
  width: 24px;
  height: 24px;
}

/* ─── Responsive Nav ─────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--s4) var(--s6);
    border-bottom: 1px solid var(--light-gray);
    box-shadow: var(--sh-lg);
    background: var(--paper);
    transition: opacity 180ms ease, transform 180ms ease, visibility 0s 180ms;
    pointer-events: none;
  }
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: auto;
  }
  .nav-hamburger { display: block; }
  .nav-cta { display: none; }
  .nav-cta-mobile {
    display: block;
    margin-top: var(--s4);
    padding-top: var(--s4);
    border-top: 1px solid var(--light-gray);
  }
  .nav-cta-mobile .nav-cta {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    padding: var(--s2) var(--s4);
  }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-logo svg {
    width: 42px;
    height: 42px;
  }
}
