/* Shared language controls for the Japanese and English corporate homepages. */
.site-localized .site-header {
  z-index: 20;
}

.site-localized:lang(en) .hero h1 {
  letter-spacing: -0.045em;
}

.site-localized:lang(en) .section-heading h2 {
  letter-spacing: -0.035em;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 20px;
}

.language-switch {
  position: relative;
  color: var(--ink);
  font-size: 12px;
  font-weight: 570;
  white-space: nowrap;
}

.language-switch summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--white);
  cursor: pointer;
  list-style: none;
}

.language-switch summary::-webkit-details-marker {
  display: none;
}

.language-switch summary:hover,
.language-switch[open] summary {
  background: var(--soft);
}

.language-switch svg {
  flex-shrink: 0;
}

.language-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
}

.language-label {
  color: var(--muted);
}

.language-current {
  border-left: 1px solid var(--line);
  padding-left: 8px;
  font-weight: 650;
}

.language-chevron {
  transition: transform 160ms ease;
}

.language-switch[open] .language-chevron {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 180px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  background: var(--white);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.language-switch:not([open]) .language-options {
  display: none;
}

.language-options a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 14px;
}

.language-options a:hover,
.language-options a[aria-current="page"] {
  background: var(--soft);
}

.language-option-check {
  color: var(--red);
}

.site-localized .footer-nav {
  align-items: center;
  padding-top: 0;
}

.language-switch-footer .language-options {
  top: auto;
  bottom: calc(100% + 8px);
}

@media (max-width: 980px) {
  .site-localized .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 12px;
  }

  .site-localized .mobile-menu {
    position: relative;
    display: block;
    justify-self: end;
  }

  .site-localized .mobile-menu summary {
    display: grid;
    width: 42px;
    height: 42px;
    cursor: pointer;
    list-style: none;
    place-content: center;
    gap: 7px;
  }

  .site-localized .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .site-localized .mobile-menu summary span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 180ms ease;
  }

  .site-localized .mobile-menu[open] summary span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .site-localized .mobile-menu[open] summary span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .site-localized .mobile-menu nav {
    position: absolute;
    top: 51px;
    right: 0;
    display: grid;
    width: 180px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
  }

  .site-localized .mobile-menu nav a {
    border-bottom: 1px solid var(--line);
    padding: 13px 17px;
    font-size: 13px;
    font-weight: 620;
  }

  .site-localized .mobile-menu nav a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .site-localized .header-inner {
    gap: 10px;
  }

  .header-actions {
    gap: 0;
  }

  .language-switch summary {
    gap: 6px;
    padding-inline: 4px;
  }

  .language-copy {
    display: grid;
    gap: 1px;
  }

  .language-label {
    font-size: 10px;
    line-height: 1.15;
  }

  .language-current {
    border-left: 0;
    padding-left: 0;
    line-height: 1.2;
  }

  .site-localized .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-localized .footer-nav {
    flex-wrap: wrap;
  }

  .site-localized .copyright {
    grid-column: auto;
    margin-top: 0;
  }
}

@media (max-width: 360px) {
  .site-localized .site-header .brand {
    gap: 9px;
    font-size: 16px;
  }

  .site-localized .header-inner {
    gap: 6px;
  }

  .site-localized .mobile-menu summary {
    width: 34px;
  }
}

