:root {
  --lekas-header-height: 72px;
  --lekas-header-mobile-height: 104px;
  --lekas-header-inline: clamp(28px, 5vw, 96px);
  --lekas-language-width: 98px;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Single geometry authority for the header on every page. */
.site-header.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: var(--lekas-header-height);
  min-height: var(--lekas-header-height);
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #000;
  background: #000;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  isolation: isolate;
}

.site-header .brand {
  position: absolute;
  top: 50%;
  left: var(--lekas-header-inline);
  display: inline-flex;
  align-items: center;
  justify-self: auto;
  width: 194px;
  height: 27px;
  margin: 0;
  padding: 0;
  line-height: 0;
  transform: translateY(-50%);
}

.site-header .brand img {
  display: block;
  width: 194px;
  min-width: 194px;
  max-width: none;
  height: 27px;
  aspect-ratio: 194 / 27;
  object-fit: contain;
}

.site-header .top-nav {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  justify-self: auto;
  gap: clamp(32px, 3vw, 48px);
  width: max-content;
  height: var(--lekas-header-height);
  margin: 0;
  padding: 0;
  overflow: visible;
  color: #fff;
  font-family: "Noto Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: clamp(14px, 1vw, 18px);
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  transform: translateX(-50%);
  font-synthesis: none;
}

.site-header .top-nav a {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: var(--lekas-header-height);
  margin: 0;
  padding: 0 20px;
  overflow: hidden;
  color: inherit;
  font: inherit;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.site-header .top-nav a:hover,
.site-header .top-nav a:focus-visible,
.site-header .top-nav a.is-active,
.site-header .top-nav a[aria-current="page"] {
  color: #c09968;
  outline: 0;
}

html[lang="en"] .site-header .top-nav {
  font-family: "Inter", "Noto Sans", "Source Sans 3", sans-serif;
  font-weight: 400;
}

.site-header .header-actions {
  position: absolute;
  top: 0;
  right: var(--lekas-header-inline);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: auto;
  gap: 0;
  width: var(--lekas-language-width);
  min-width: var(--lekas-language-width);
  height: var(--lekas-header-height);
  margin: 0;
  padding: 0;
  transform: none;
}

.site-header .lang-toggle {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, 46px);
  align-items: center;
  flex: 0 0 var(--lekas-language-width);
  width: var(--lekas-language-width);
  min-width: var(--lekas-language-width);
  height: 34px;
  margin: 0;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: "Noto Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-weight: 500;
  line-height: 1;
  font-synthesis: none;
}

.site-header .lang-toggle-indicator {
  position: absolute;
  z-index: -1;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 999px;
  background: #fff;
  transform: translateX(0);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header .lang-toggle[data-language="en"] .lang-toggle-indicator,
.site-header .lang-toggle[data-language-state="en"] .lang-toggle-indicator {
  transform: translateX(100%);
}

.site-header .lang-option {
  appearance: none;
  box-sizing: border-box;
  display: block;
  width: 46px;
  min-width: 46px;
  height: 28px;
  min-height: 0;
  margin: 0;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-family: inherit;
  font-size: clamp(12px, 0.82vw, 14px);
  font-weight: inherit;
  line-height: 28px;
  text-align: center;
  transition: color 0.3s ease;
}

.site-header .lang-option.is-active {
  background: transparent;
  color: #080808;
}

.site-header .lang-option:focus-visible {
  outline: 1px solid #c09968;
  outline-offset: 2px;
}

html[lang="en"] .site-header .lang-toggle,
html[lang="en"] .site-header .lang-option {
  font-family: "Inter", "Noto Sans", "Source Sans 3", sans-serif;
  font-weight: 400;
}

/* Hidden controls must never change header-actions width on one page. */
.services-menu-button,
.about-menu-button {
  display: none !important;
}

/* Native navigation is immediate; the shared layer never fades page content. */
main {
  animation: none;
  transition: none;
}

/* Tighten desktop navigation before the two-row mobile header takes over. */
@media (max-width: 1100px) {
  .site-header .top-nav {
    gap: clamp(12px, calc(10vw - 78px), 33px);
  }

  .site-header .top-nav a {
    padding-inline: clamp(12px, calc(4vw - 24px), 20px);
  }
}

@media (max-width: 900px) {
  .site-header.site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--lekas-language-width);
    grid-template-rows: 34px 36px;
    grid-template-areas:
      "brand lang"
      "nav nav";
    align-content: center;
    align-items: center;
    gap: 8px 18px;
    height: var(--lekas-header-mobile-height);
    min-height: var(--lekas-header-mobile-height);
    padding: 14px 18px 10px;
  }

  .site-header .brand {
    position: static;
    grid-area: brand;
    align-self: center;
    width: clamp(140px, 46vw, 194px);
    height: auto;
    transform: none;
  }

  .site-header .brand img {
    width: clamp(140px, 46vw, 194px);
    min-width: 0;
    height: auto;
    aspect-ratio: 194 / 27;
  }

  .site-header .top-nav {
    position: static;
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    justify-content: stretch;
    justify-self: stretch;
    gap: 0;
    width: 100%;
    height: 36px;
    overflow: hidden;
    padding: 0;
    font-size: clamp(10px, 2.7vw, 14px);
    transform: none;
    scrollbar-width: none;
  }

  .site-header .top-nav::-webkit-scrollbar {
    display: none;
  }

  .site-header .top-nav a {
    width: auto;
    min-width: 0;
    height: 36px;
    padding: 0;
    overflow: hidden;
    text-overflow: clip;
  }

  .site-header .header-actions {
    position: static;
    grid-area: lang;
    align-self: center;
    width: var(--lekas-language-width);
    min-width: var(--lekas-language-width);
    height: 34px;
    transform: none;
  }

  .hero {
    padding-top: var(--lekas-header-mobile-height);
  }

  .hero-video-placeholder {
    min-height: calc(100vh - var(--lekas-header-mobile-height));
  }

  .services-main,
  .about-main {
    padding-top: var(--lekas-header-mobile-height);
  }

  .contact-visual {
    min-height: var(--lekas-header-mobile-height);
  }
}

@media (max-width: 560px) {
  .site-header.site-header {
    height: var(--lekas-header-mobile-height);
    min-height: var(--lekas-header-mobile-height);
    padding-inline: 16px;
  }

  .services-main,
  .about-main {
    padding-top: var(--lekas-header-mobile-height);
  }

  .contact-visual {
    min-height: var(--lekas-header-mobile-height);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .top-nav a,
  .site-header .lang-toggle-indicator,
  .site-header .lang-option {
    transition: none;
  }

}
/* Latest LEKAS EVENT brand artwork; preserve the established navigation box. */
.site-header .brand img { object-fit: contain; }

/* One geometry authority for the three secondary-page cover sections. Keep
   page-specific typography and overlays local, but make the wallpaper frame
   and crop identical across Services, About, and Contact. */
:root {
  --lekas-secondary-cover-height: clamp(500px, 27vw, 644px);
  --lekas-secondary-cover-mobile-height: 360px;
}

.secondary-cover,
.services-main .services-cover,
body.about-page .about-page-heading,
.contact-page .contact-intro {
  height: var(--lekas-secondary-cover-height) !important;
  min-height: var(--lekas-secondary-cover-height) !important;
  background-position: center center !important;
}

@media (max-width: 620px) {
  .secondary-cover,
  .services-main .services-cover,
  body.about-page .about-page-heading,
  .contact-page .contact-intro {
    height: var(--lekas-secondary-cover-mobile-height) !important;
    min-height: var(--lekas-secondary-cover-mobile-height) !important;
    background-position: center center !important;
  }
}

/* Phone/tablet geometry only; desktop navigation and covers stay unchanged. */
@media (max-width: 900px) {
  html {
    scrollbar-gutter: auto;
    scroll-padding-top: calc(var(--lekas-header-mobile-height) + 16px);
  }

  .site-header.site-header {
    grid-template-rows: 34px 44px;
    gap: 4px 18px;
    padding-block: 12px 10px;
  }

  .site-header .top-nav,
  .site-header .top-nav a {
    height: 44px;
  }

  .site-header .top-nav {
    font-size: clamp(12px, 3.2vw, 14px);
  }

  .hero {
    min-height: 100svh;
  }

  .hero-video-placeholder {
    min-height: calc(100svh - var(--lekas-header-mobile-height));
  }

  .secondary-cover,
  .services-main .services-cover,
  body.about-page .about-page-heading,
  .contact-page .contact-intro {
    height: clamp(280px, 64vw, 420px) !important;
    min-height: clamp(280px, 64vw, 420px) !important;
  }
}


/* Standalone-language navigation: visible text is 中文 | EN or CN | EN. */
.site-header .lang-toggle.language-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: var(--lekas-language-width);
  min-width: var(--lekas-language-width);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-header .language-switch .lang-option {
  display: inline;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1;
  text-decoration: none;
}

.site-header .language-switch .lang-option.is-active,
.site-header .language-switch .lang-option:hover,
.site-header .language-switch .lang-option:focus-visible {
  color: #c09968;
}

.site-header .language-switch .lang-separator {
  color: rgba(255, 255, 255, 0.36);
  font-size: 12px;
}
