/* ===== Navigation component (EKO-style) ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  /* Black type on a light glass bar — same reading as EKO's header.
     A pure transparent bar with black text vanished on dark video frames,
     so the bar carries a light veil while the footage still shows through. */
  color: #0a0a0a;
  background: rgba(255, 255, 255, .72);
  font-family: var(--font);
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, box-shadow .3s ease, color .3s ease;
  /* NOTE: height intentionally does NOT change on scroll (user requirement) */
}

/* ===== Bottom hairline =====
   The bar is light now, so a white line would vanish. A soft dark hairline
   reads as a natural edge and still holds up over bright video. */
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: rgba(14, 22, 32, .26);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  pointer-events: none;
  transition: background-color .3s ease, box-shadow .3s ease;
}
.nav.is-scrolled::after,
.nav--solid::after {
  background: rgba(14, 22, 32, .14);
  box-shadow: none;
}

/* Scrolled state: solid white bar, same height */
.nav.is-scrolled {
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: 0 6px 24px rgba(15, 30, 60, .10);
}
/* Pages without a hero video: same light bar */
.nav--solid { background: #ffffff; color: #0a0a0a; }

/* Left / right / center layout like EKO: brand left, actions right, menu dead-center.
   minmax(0,1fr) on both side tracks is what keeps the menu truly centered —
   plain 1fr has a min-content floor, so a wide right side would push it off-axis. */
.nav__inner {
  position: relative;
  /* Nav gets its own wider container (does NOT touch the global --maxw, so no
     other section on the page is affected): the equal side tracks need enough
     room for brand | menu | search+language+CTA without pushing the menu off-axis. */
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: inherit;
  min-width: 0;
  justify-self: start;
}
.nav__logo { height: 60px; width: auto; flex: none; }
.nav__brandname {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.05;
  white-space: nowrap;
}
.nav__brandname-main {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.8px;
}
.nav__brandname-sub {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 3.6px;
  margin-top: 3px;
  color: #55606d;
}

/* Desktop menu — centered by the equal side tracks above */
.nav__menu { justify-self: center; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 0;   /* EKO: no gap — each item carries 20px side padding */
  list-style: none;
  margin: 0; padding: 0;
}
.nav__item { position: relative; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Values copied from EKO's live stylesheet/computed styles:
     16px / 500 / uppercase / normal tracking / padding 5px 20px (=> 30px tall). */
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: uppercase;
  /* Reference site: resting items are grey, the current one reads black.
     Menu items never get a filled capsule — only the contact CTA is a pill. */
  color: #55606d;
  background: transparent;
  cursor: pointer;
  border: 0;
  line-height: 20px;
  transition: background-color .25s ease, color .25s ease;
}
/* Current page: the item owning the open route reads red (set by nav.js). */
.nav__link.is-active { color: var(--accent); font-weight: 600; }
/* Hover / open state: red TYPE, still no pill (reference: ALLRICH turns the
   hovered item red). Only the contact CTA would ever be a filled capsule. */
.nav__item:hover > .nav__link,
.nav__item.is-open > .nav__link,
.nav__item:focus-within > .nav__link {
  background: transparent;
  color: var(--nav-pill);
  text-shadow: none;
}
.nav.is-scrolled .nav__item:hover > .nav__link,
.nav.is-scrolled .nav__item.is-open > .nav__link,
.nav--solid .nav__item:hover > .nav__link,
.nav--solid .nav__item.is-open > .nav__link {
  background: transparent;
  color: var(--nav-pill);
}

.nav__link .caret {
  width: 9px; height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .25s ease;
  margin-top: -3px;
}
.nav__item:hover > .nav__link .caret,
.nav__item.is-open > .nav__link .caret { transform: rotate(225deg); }

/* Submenu / dropdown — grey pill panel, pill rows inside */
.nav__submenu {
  position: absolute;
  /* Drop below the bar itself, otherwise the bar's light backing covers the
     panel's rounded top and it reads as a square box again. */
  top: calc(100% + 30px);
  left: 0;
  min-width: 120px;
  width: max-content;
  max-width: 280px;
  list-style: none;
  margin: 0; padding: 7px;
  background: #e9ebee;                 /* grey, not white */
  color: #0a0a0a;
  border-radius: 34px;                 /* pill panel (single item = full capsule) */
  box-shadow: 0 18px 40px rgba(15, 30, 60, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
/* Transparent bridge so the pointer can travel from the pill to the panel
   without the dropdown closing in the 30px gap. */
.nav__submenu::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -32px; height: 32px;
}
.nav__item:hover > .nav__submenu,
.nav__item:focus-within > .nav__submenu,
.nav__item.is-open > .nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav__submenu li a {
  display: block;
  padding: 9px 16px;
  border-radius: 999px;              /* every row hover is a true capsule */
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: uppercase;
  white-space: nowrap;
  color: #0a0a0a;
  transition: background-color .2s, color .2s;
}
.nav__submenu li a:hover { background: #ffffff; color: #0a0a0a; }

/* Right-side actions (language + search + contact pill) */
.nav__actions { display: flex; align-items: center; gap: 14px; justify-self: end; }

/* ===== Red contact pill (reference-site CTA) ===== */
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--nav-pill);
  color: var(--nav-pill-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.nav__cta:hover {
  background: #c71e15;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(225, 37, 27, .28);
}

/* ===== Language switcher ===== */
.nav__lang { position: relative; }
.nav__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;              /* same 30px pill height as the menu items */
  padding: 0 16px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.nav__lang-btn .caret { margin-top: -3px; }

/* Single-language build: "EN" is just a label — no caret, no dropdown,
   nothing to click (there is no other language to switch to yet). */
.nav__lang--static { display: inline-flex; align-items: center; }
.nav__lang-label {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: uppercase;
  color: inherit;
  cursor: default;
  user-select: none;
}
.nav:not(.is-scrolled):not(.nav--solid) .nav__lang-btn:hover,
.nav.is-scrolled .nav__lang-btn:hover,
.nav--solid .nav__lang-btn:hover {
  background: transparent; color: var(--nav-pill); text-shadow: none;
}

.nav__lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  list-style: none;
  margin: 0; padding: 6px;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 30, 60, .18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.nav__lang:hover > .nav__lang-menu,
.nav__lang.is-open > .nav__lang-menu,
.nav__lang:focus-within > .nav__lang-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__lang-opt {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.nav__lang-opt:hover { background: rgba(21, 64, 122, .08); color: var(--brand); }
.nav__lang-opt.is-active { color: var(--brand); font-weight: 600; cursor: default; }
.nav__lang-opt.is-active:hover { background: transparent; }

/* ===== Search box =====
   Always-visible pill field with the magnifier at its right end, like the
   hanxi reference. The contact pill was removed, which frees the room this
   field needs. */
.nav__search {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  width: 232px;
  padding: 0 5px 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(10, 20, 30, .22);
  transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav__search:focus-within {
  background: #ffffff;
  border-color: rgba(225, 37, 27, .42);
  box-shadow: 0 0 0 3px rgba(225, 37, 27, .10);
}
.nav__search:hover { background: #ffffff; border-color: rgba(10, 20, 30, .34); }
.nav__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #0a0a0a;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: normal;
}
.nav__search-input::placeholder { color: rgba(10, 20, 30, .55); }
.nav__search-input::-webkit-search-cancel-button { opacity: .55; }
.nav__search-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s ease;
}
.nav__search-btn:hover { background: rgba(10, 20, 30, .08); }

/* On the solid white bar the field turns a plain light grey pill */
.nav.is-scrolled .nav__search,
.nav--solid .nav__search {
  background: #f2f5f9;
  border-color: rgba(22, 32, 44, .10);
}
.nav.is-scrolled .nav__search:hover,
.nav--solid .nav__search:hover { background: #e8edf4; }
.nav.is-scrolled .nav__search-input::placeholder,
.nav--solid .nav__search-input::placeholder { color: #7b8494; }
.nav.is-scrolled .nav__search-btn:hover,
.nav--solid .nav__search-btn:hover { background: rgba(22, 32, 44, .08); }

/* Hamburger */
.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  border: 0; background: transparent;
  cursor: pointer;
  position: relative;
  color: inherit;
}
.nav__toggle span {
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, top .3s ease;
}
.nav__toggle span:nth-child(1) { top: 14px; }
.nav__toggle span:nth-child(2) { top: 20px; }
.nav__toggle span:nth-child(3) { top: 26px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

/* Mobile panel */
.nav__mobile {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  background: #ffffff;
  color: var(--ink);
  overflow-y: auto;
  padding: 16px 20px 40px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .15);
}
.nav.is-scrolled .nav__mobile { top: var(--nav-h); }
.nav__mobile.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.nav__mobile .nav__list { display: block; }
.nav__mobile .nav__item { position: static; border-bottom: 1px solid #eef1f5; }
.nav__mobile .nav__link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 16px 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink);
  background: transparent;
  border-radius: 0;
}
.nav__mobile .nav__link:hover { background: transparent; color: var(--brand); }
.nav__mobile .nav__submenu {
  position: static;
  opacity: 1; visibility: visible; transform: none;
  box-shadow: none;
  background: transparent;
  padding: 0 0 8px 12px;
  display: none;
}
.nav__mobile .nav__item.is-open > .nav__submenu { display: block; }
.nav__mobile .nav__submenu li a {
  padding: 12px 8px;
  font-size: 12.5px;
  letter-spacing: .08em;
  color: #46505c;
}

/* Search + language inside the mobile panel */
.nav__mobile-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #eef1f5;
}
.nav__lang--mobile .nav__lang-btn { color: var(--ink); padding: 0 10px; }
.nav__lang--mobile .nav__lang-label { color: var(--ink); }
.nav__lang--mobile .nav__lang-menu { display: none; }
.nav__lang--mobile.is-open .nav__lang-menu { display: block; }
.nav__search--mobile {
  flex: 1;
  background: #f2f5f9;
  border-color: rgba(22, 32, 44, .10);
  color: var(--ink);
}
.nav__search--mobile .nav__search-input::placeholder { color: #8a94a2; }
.nav__search--mobile .nav__search-btn { color: var(--ink); }

/* Breakpoints */
@media (max-width: 900px) {
  .nav__inner { grid-template-columns: minmax(0, 1fr) auto; }
  .nav__menu { display: none; }
  .nav__toggle { display: block; }
  .nav__logo { height: 46px; }
  .nav__cta { height: 38px; padding: 0 16px; font-size: 13.5px; }
  .nav__actions { gap: 8px; }
  /* Search + language live inside the mobile panel instead */
  .nav__actions > .nav__search,
  .nav__actions > .nav__lang { display: none; }
}
/* Narrow desktop: tighten the gaps so the menu keeps its breathing room */
@media (min-width: 901px) and (max-width: 1399px) {
  .nav__inner { column-gap: 12px; padding: 0 16px; }
  .nav__link { padding: 5px 13px; font-size: 15px; }
  .nav__actions { gap: 10px; }
  .nav__search { width: 180px; padding-left: 13px; }
  .nav__brandname-sub { letter-spacing: 2.4px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  /* Single-language label is the first thing to go when the bar gets tight */
  .nav__actions > .nav__lang { display: none; }
  .nav__search { width: 168px; }
}
@media (min-width: 901px) and (max-width: 1050px) {
  .nav__link { font-size: 14px; padding: 5px 9px; }
  .nav__lang-btn { padding: 0 10px; }
  .nav__search { width: 150px; }
}
@media (min-width: 901px) {
  .nav__mobile { display: none; }
}
