/* ===== Global Navigation — static HTML + CSS only ===== */

/* ── Hidden checkbox toggle ───────────────────────────────────────── */
.nav-toggle {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* ── Header bar ───────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  height: 78px;
  background: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  box-shadow: none;
  transition:
    background 0.4s ease,
    backdrop-filter 0.4s ease,
    -webkit-backdrop-filter 0.4s ease,
    box-shadow 0.4s ease;
}

body.is-scrolled .site-nav {
  background: rgba(247, 247, 247, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(16, 16, 16, 0.08);
}

/* Mobile: always visible */
@media (max-width: 768px) {
  .site-nav {
    background: rgba(247, 247, 247, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* ── Inner flex row ───────────────────────────────────────────────── */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 clamp(20px, 4vw, 60px);
  gap: 32px;
}

/* ── Logo / avatar ────────────────────────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  padding-top: 10px;
}

.nav-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover .nav-avatar {
  transform: scale(1.06);
}

.nav-avatar video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* ── Desktop text links ───────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 52px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #101010;
  text-decoration: none;
  opacity: 0.38;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: #101010;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  opacity: 1;
  color: #101010;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ── Right side: social + burger ─────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-shrink: 0;
}

/* ── Social icons ─────────────────────────────────────────────────── */
.nav-social {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.38;
  transition: opacity 0.2s ease;
}

.nav-social a:hover {
  opacity: 1;
}

.nav-social img {
  display: block;
  width: 20px;
  height: 20px;
}

/* ── Hamburger button ─────────────────────────────────────────────── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 9px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.burger-line {
  display: block;
  height: 2px;
  background: #101010;
  border-radius: 10px;
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.3s ease;
}

.burger-line:nth-child(1) { width: 24px; }
.burger-line:nth-child(2) { width: 16px; }

/* Burger → X when menu open (CSS :has) */
body:has(.nav-toggle:checked) .burger-line:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
  width: 24px;
}

body:has(.nav-toggle:checked) .burger-line:nth-child(2) {
  transform: translateY(-5.5px) rotate(-45deg);
  width: 24px;
}

/* ── Mobile panel ─────────────────────────────────────────────────── */
.nav-panel {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: #f7f7f7;
  max-height: 0;
  overflow: hidden;
  z-index: 8999;
  transition: max-height 0.48s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle:checked ~ .nav-panel {
  max-height: 520px;
}

.nav-panel-inner {
  padding: 28px clamp(20px, 4vw, 60px) 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(16, 16, 16, 0.07);
}

.nav-panel-link {
  font-size: clamp(36px, 9vw, 54px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: #101010;
  text-decoration: none;
  opacity: 0.15;
  padding: 6px 0;
  display: block;
  transition: opacity 0.2s ease;
}

.nav-panel-link:hover,
.nav-panel-link[aria-current="page"] {
  opacity: 1;
}

.nav-panel-social {
  display: flex;
  gap: 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(16, 16, 16, 0.08);
}

.nav-panel-social a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #101010;
  text-decoration: none;
  opacity: 0.38;
  transition: opacity 0.2s ease;
}

.nav-panel-social a:hover {
  opacity: 1;
}

/* ── Overlay (also acts as close trigger) ────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 16, 16, 0.42);
  z-index: 8990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
  cursor: pointer;
}

.nav-toggle:checked ~ .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ── Scroll container (needed for absolute lang-switcher) ─────────── */
#smooth-content {
  position: relative;
}

/* ── Language switcher ────────────────────────────────────────────── */
.lang-switcher {
  position: absolute;
  top: 28px;
  right: clamp(20px, 4vw, 60px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #101010;
  opacity: 0.3;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.lang-btn:hover {
  opacity: 0.7;
}

.lang-btn.is-active {
  opacity: 1;
}

.lang-sep {
  font-size: 11px;
  color: #101010;
  opacity: 0.2;
  user-select: none;
}

/* ── Case study back button ───────────────────────────────────────── */
.cs-back-btn {
  position: fixed;
  top: 28px;
  left: clamp(20px, 4vw, 60px);
  z-index: 9001;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #101010;
  text-decoration: none;
  opacity: 0.38;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs-back-btn:hover {
  opacity: 1;
  transform: translateX(-3px);
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (min-width: 769px) {
  /* Fixed nav hidden on desktop — hero-right handles navigation */
  .site-nav    { display: none; }

  /* Separator between links and social in hero-right */
  .nav-actions::before {
    content: '';
    width: 1px;
    height: 14px;
    background: rgba(16, 16, 16, 0.18);
    display: block;
    align-self: center;
    flex-shrink: 0;
  }
}

/* ── Hero-right as desktop nav ────────────────────────────────────── */
@media (min-width: 769px) {
  .hero-right {
    display: flex;
    align-items: center;
    gap: 0;
  }
}

/* ── Mobile: fixed nav only, hide hero-right and hero-sec-top ────── */
@media (max-width: 768px) {
  .hero-sec .hero-sec-top { display: none; }
  .nav-links  { display: none; }
  .nav-social { display: none; }
  .nav-burger { display: flex; }
  .nav-avatar { display: flex; width: 64px; height: 64px; }
  .nav-avatar video { width: 64px; height: 64px; }
}
