:root {
  --color-brand: #BB1F22;
  --color-brand-deep: #8E1518;
  --color-brand-bright: #D4292D;
  --color-brand-black: #121416;
  --color-ink: #333333;
  --color-muted: #666666;
  --color-border: #D0D0D0;
  --color-paper: #FFFFFF;
  --color-soft: #FAFAFA;

  --font-ja: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
  --font-en: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-space: clamp(72px, 8vw, 112px);
  --header-height: 80px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-ja);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
  overflow: hidden;
}

::selection {
  background: var(--color-brand);
  color: #fff;
}

.l-container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 16px;
  background: #fff;
  color: var(--color-ink);
  border-radius: 3px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  color: #fff;
  transition: color .35s ease, background-color .35s ease, box-shadow .35s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 0 rgba(18, 20, 22, .1);
  opacity: 0;
  transition: opacity .35s ease;
  backdrop-filter: blur(12px);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  color: var(--color-ink);
}

.site-header.is-scrolled::before,
.site-header.is-menu-open::before {
  opacity: 1;
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: clamp(170px, 17vw, 230px);
  transition: opacity .25s ease;
}

.site-logo:hover,
.site-logo:focus-visible {
  opacity: .7;
}

.site-logo__image {
  width: 100%;
  height: auto;
  transition: opacity .3s ease;
}

.site-logo__image--red {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.site-header.is-scrolled .site-logo__image--white,
.site-header.is-menu-open .site-logo__image--white {
  opacity: 0;
}

.site-header.is-scrolled .site-logo__image--red,
.site-header.is-menu-open .site-logo__image--red {
  opacity: 1;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.global-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
}

.global-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
}

.global-nav__list a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}

.global-nav__list a:hover::after,
.global-nav__list a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.language-link {
  width: auto;
  height: auto;
  min-height: 44px;
  padding-left: 20px;
  border-left: 1px solid currentColor;
  border-radius: 0;
  font-family: var(--font-en);
  font-size: 12px !important;
  letter-spacing: .06em;
}

.global-nav > .language-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 7px;
  left: 20px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}

.global-nav > .language-link:hover::after,
.global-nav > .language-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-button {
  display: none;
}

.section {
  padding-block: var(--section-space);
}

.section-heading__title {
  color: var(--color-ink);
  font-family: var(--font-ja);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .02em;
}

.section-heading__en {
  margin-top: 8px;
  color: var(--color-brand);
  font-family: var(--font-en);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .08em;
}

.section-heading--standalone {
  margin-bottom: clamp(36px, 4vw, 52px);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  gap: clamp(32px, 5vw, 68px);
}

.text-link {
  display: inline;
  border-bottom: 1px solid currentColor;
  transition: color .25s ease, border-color .25s ease;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--color-brand);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  padding-block: 28px 16px;
  background: var(--color-brand-black);
  color: #fff;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(360px, 1.3fr);
  align-items: center;
  gap: 24px 48px;
}

.site-footer__brand img {
  width: min(200px, 58vw);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
}

.footer-nav a {
  color: rgba(255, 255, 255, .72);
  font-size: 14px;
  line-height: 1.5;
  transition: color .25s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.site-footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}

.site-footer__bottom small {
  color: rgba(255, 255, 255, .48);
  font-family: var(--font-en);
  font-size: 12px;
  line-height: 1.5;
}

.language-link--footer {
  min-height: auto;
  padding-left: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  font-size: 14px !important;
  transition: border-color .25s ease;
}

.language-link--footer:hover,
.language-link--footer:focus-visible {
  border-bottom-color: transparent;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  :root {
    --header-height: 72px;
  }

  .menu-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    cursor: pointer;
  }

  .menu-button__icon {
    position: relative;
    display: block;
    width: 28px;
    height: 18px;
  }

  .menu-button__icon i {
    position: absolute;
    right: 0;
    width: 100%;
    height: 1px;
    background: currentColor;
    transition: transform .3s ease, top .3s ease;
  }

  .menu-button__icon i:first-child { top: 4px; }
  .menu-button__icon i:last-child { top: 13px; }

  .menu-button[aria-expanded="true"] .menu-button__icon i:first-child {
    top: 9px;
    transform: rotate(45deg);
  }

  .menu-button[aria-expanded="true"] .menu-button__icon i:last-child {
    top: 9px;
    transform: rotate(-45deg);
  }

  .global-nav {
    position: fixed;
    inset: var(--header-height) 0 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 32px;
    background: rgba(255, 255, 255, .98);
    color: var(--color-ink);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
  }

  .global-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .global-nav__list {
    display: grid;
    gap: 12px;
    text-align: center;
  }

  .global-nav a {
    min-height: 48px;
    font-size: clamp(20px, 5vw, 30px);
  }

  .global-nav .language-link {
    min-height: auto;
    padding: 12px 0 0;
    border-top: 1px solid currentColor;
    border-left: 0;
    font-size: 13px !important;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .section-heading--sticky {
    position: static;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-nav ul {
    justify-content: flex-start;
    display: grid;
    gap: 8px;
  }

  .site-footer__bottom {
    grid-column: auto;
  }
}

/* English pages */
html[lang="en"] body {
  font-family: var(--font-en);
  line-height: 1.65;
  letter-spacing: 0;
}

html[lang="en"] .section-heading__title,
html[lang="en"] .page-hero__title,
html[lang="en"] .feature-item__title,
html[lang="en"] .policy-block__title {
  font-family: var(--font-en);
}

html[lang="en"] .section-heading__title {
  letter-spacing: 0;
}

html[lang="en"] .global-nav a,
html[lang="en"] .footer-nav a,
html[lang="en"] .site-footer__bottom small {
  font-family: var(--font-en);
}

html[lang="en"] .language-link[lang="ja"] {
  font-family: var(--font-ja);
  letter-spacing: .04em;
}
