:root {
  --site-motion-ease: cubic-bezier(.22, 1, .36, 1);
  --site-motion-accent: #008377;
  --site-motion-deep: #012849;
}

.site-transition-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(135deg, var(--site-motion-deep) 15%, var(--site-motion-accent));
  transform: scaleY(0);
  transform-origin: bottom;
}

.site-transition-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(6.25% - 1px),
    rgba(255, 255, 255, .16) calc(6.25% - 1px),
    rgba(255, 255, 255, .16) 6.25%
  );
  opacity: .65;
}

.site-transition-layer.is-covering {
  animation: site-cover 440ms cubic-bezier(.64, 0, .78, 0) both;
  will-change: transform;
}

.site-transition-layer.is-covering-back {
  transform-origin: top;
}

.site-transition-layer.is-revealing {
  transform: scaleY(1);
  transform-origin: top;
  animation: site-reveal 620ms var(--site-motion-ease) both;
  will-change: transform;
}

.site-transition-layer.is-revealing-back {
  transform-origin: bottom;
}

@keyframes site-cover { to { transform: scaleY(1); } }
@keyframes site-reveal { to { transform: scaleY(0); } }

body.site-is-leaving {
  pointer-events: none;
}

[data-motion-title] {
  clip-path: none !important;
  opacity: 1 !important;
  transform: none;
}

[data-motion-title].is-motion-visible {
  clip-path: none !important;
  opacity: 1 !important;
  transform: none;
}

/* Give Vietnamese diacritics enough vertical room in multi-line headings. */
h1,
h2,
h3,
h4,
h5,
h6,
.heading-two,
.heading-three,
.heading-four,
.heading-five,
.section-title,
.portfolio-title,
.process-title,
.solution-title,
.factory-title,
.swiss-contact-title {
  line-height: calc(1em + 5px) !important;
}

/* Keep the desktop contact section compact instead of filling the viewport. */
@media (min-width: 821px) {
  .contact-scroll,
  .swiss-contact-scroll {
    min-height: 0 !important;
  }

  .contact-panel,
  .swiss-contact-panel {
    position: relative !important;
    min-height: 0 !important;
  }

  .contact-inner,
  .swiss-contact-inner {
    min-height: 0 !important;
    padding-top: 30px !important;
    padding-bottom: 26px !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .contact-content,
  .swiss-contact-content {
    padding-top: clamp(42px, 5vw, 72px) !important;
    padding-bottom: clamp(34px, 4vw, 58px) !important;
  }

  .contact-copy h1,
  .swiss-contact-title {
    margin-bottom: 24px !important;
    font-size: clamp(52px, 5vw, 88px) !important;
  }

  .contact-details,
  .swiss-details {
    margin-top: 28px !important;
  }
}

.language-toggle {
  display: inline-flex;
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  background: rgba(128, 158, 196, .18);
  border: 1px solid rgba(205, 226, 255, .18);
  border-radius: 999px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.language-toggle img {
  display: block;
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.language-toggle:hover {
  background: rgba(121, 213, 239, .16);
  border-color: rgba(121, 213, 239, .46);
  transform: translateY(-1px);
}

.language-toggle:focus-visible {
  outline: 2px solid rgba(183, 255, 241, .95);
  outline-offset: 3px;
}

.nav-right .language-toggle {
  flex: 0 0 auto;
  margin-left: 0;
  margin-right: 0;
}

.language-picker {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 96px;
  padding: 6px;
  background: rgba(1, 40, 73, .96);
  border: 1px solid rgba(205, 226, 255, .2);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 7, 16, .28);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -6px, 0);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.language-picker.is-open .language-menu {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.language-option {
  min-height: 36px;
  padding: 0 12px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: 600 12px/1 var(--font-body, "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif);
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.language-option:hover,
.language-option[aria-selected="true"] {
  background: rgba(121, 213, 239, .16);
  color: #b7fff1;
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-actions .language-toggle {
  min-height: 56px;
  min-width: 56px;
}

.nav-right {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  white-space: nowrap;
}

.nav-right .btn-nav,
.nav-actions .nav-cta {
  flex: 0 0 auto;
}

.nav-right .btn-secondary,
.nav-actions .nav-cta {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav > .language-toggle {
  justify-self: end;
  margin-left: 10px;
}

.nav-links .language-toggle {
  min-width: 46px;
  width: 46px;
  min-height: 46px;
  margin-left: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .site-transition-layer {
    animation: none !important;
  }

  [data-motion-title] {
    clip-path: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Shared footer across all public pages. */
.global-footer {
  --global-footer-line: rgba(255, 255, 255, .28);
  --global-footer-muted: rgba(255, 255, 255, .72);
  --global-footer-accent: #b7fff1;
  position: relative;
  z-index: 4;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #00616b 0%, #008377 62%, #006e68 100%);
  border-top: 1px solid var(--global-footer-line);
  font-family: "Libre Franklin", system-ui, sans-serif;
}

.global-footer__inner {
  display: grid;
  min-height: 0;
  padding: 24px clamp(20px, 4vw, 76px) 20px;
  grid-template-rows: auto auto auto;
}

.global-footer__top,
.global-footer__bottom {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 20px);
}

.global-footer__top {
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--global-footer-line);
}

.global-footer__brand,
.global-footer__year,
.global-footer__copyright {
  font-family: "Fahkwang", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.global-footer__brand { grid-column: 1 / span 4; color: var(--global-footer-accent); }
.global-footer__location { grid-column: 10 / span 4; margin: 0; color: var(--global-footer-muted); font-size: 13px; line-height: 1.55; }
.global-footer__year { grid-column: 16; justify-self: end; color: var(--global-footer-muted); }
.global-footer__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); align-items: center; gap: clamp(40px, 8vw, 140px); padding: 28px 0; }
.global-footer__nav { width: min(100%, 440px); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--global-footer-line); }
.global-footer__nav a { display: flex; min-height: 44px; align-items: center; justify-content: space-between; color: #fff; border-bottom: 1px solid var(--global-footer-line); font-family: "Fahkwang", system-ui, sans-serif; font-size: 14px; letter-spacing: .04em; text-decoration: none; }
.global-footer__nav a::after { width: 12px; height: 12px; content: ""; background: linear-gradient(45deg, transparent 43%, var(--global-footer-accent) 44% 53%, transparent 54%); border-top: 1.5px solid var(--global-footer-accent); border-right: 1.5px solid var(--global-footer-accent); transition: transform 180ms ease; }
.global-footer__nav a:hover::after { transform: translate(2px, -2px); }
.global-footer__bottom { display: flex; align-items: center; justify-content: center; padding-top: 18px; border-top: 1px solid var(--global-footer-line); }
.global-footer__logo { width: min(100%, 520px); max-height: 92px; object-fit: contain; object-position: left center; }
.global-footer__copyright { margin: 0; color: var(--global-footer-muted); text-align: center; }

@media (max-width: 1024px) {
  .global-footer__inner { padding-top: 28px; padding-bottom: 24px; }
  .global-footer__main { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 44px; padding: 38px 0; }
  .global-footer__nav a { min-height: 48px; font-size: 15px; }
  .global-footer__logo { max-height: 96px; }
}

@media (max-width: 820px) {
  .global-footer,
  .global-footer__inner { min-height: auto; }
  .global-footer__inner { display: block; padding: 24px 20px 30px; }
  .global-footer__top { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 28px; }
  .global-footer__location { max-width: 200px; text-align: right; }
  .global-footer__year { display: none; }
  .global-footer__main { display: flex; flex-direction: column; align-items: stretch; gap: 48px; padding: 48px 0 58px; }
  .global-footer__nav { width: 100%; }
  .global-footer__nav a { min-height: 58px; font-size: 17px; }
  .global-footer__logo { order: 1; width: min(100%, 560px); max-height: none; }
  .global-footer__nav { order: 2; }
  .global-footer__bottom { display: flex; justify-content: center; padding-top: 22px; }
  .global-footer__copyright { text-align: center; }
}
