:root {
    --font-main: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Zen Old Mincho", serif;
    --font-flavor: "Zen Old Mincho", "Yu Mincho", "YuMincho", serif;
    --site-width: 960px;
    --header-bg: #fff;
    --ink: #000;
    --paper: #fff;
    --site-theme-color: #000;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

body {
    position: relative;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-main);
    font-feature-settings: "palt";
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
    position: sticky;
    z-index: 1000;
    top: 0;
    width: 100%;
    background-image: url("../images/common/header-bg.webp");
    background-repeat: repeat-x;
    background-position: top center;
    background-size: auto 100%;
    isolation: isolate;
}

.site-header__frame {
    width: min(100%, var(--site-width));
    margin-inline: auto;
    container-type: inline-size;
    container-name: site-header;
}

.site-header__inner {
    display: grid;
    grid-template-columns: minmax(7.708333cqw, 17%) minmax(0, 1fr);
    width: 100%;
    height: 28cqw;
    padding: 1.8cqw 2.2cqw 0;
}

.site-header__logo {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: start center;
    min-width: 0;
    padding: 0 1cqw 2cqw 0;
    touch-action: manipulation;
    transition: opacity 120ms ease;
}

.site-header__logo-mask {
    display: block;
    width: 100%;
    height: 100%;
    background-color: var(--site-theme-color);
    mask-repeat: no-repeat;
    mask-position: center top;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center top;
    -webkit-mask-size: contain;
    transform-origin: 50% 35%;
    transition: background-color 280ms ease, transform 120ms ease;
}

.site-header__logo.is-pressing,
.site-header__logo.is-navigating {
    opacity: 0.52;
}

.site-header__logo.is-pressing .site-header__logo-mask {
    transform: scale(0.94);
}

.site-nav {
    position: relative;
    min-width: 0;
}

.site-nav__items {
    display: grid;
    grid-template-columns: repeat(var(--nav-count), minmax(0, 1fr));
    height: 70%;
}

.site-nav__item {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    text-decoration: none;
    touch-action: manipulation;
    transition: opacity 120ms ease;
}

.site-nav__icon {
    position: relative;
    display: block;
    width: min(75%, 13cqw);
    aspect-ratio: 1 / 1;
    transform-origin: 50% 72%;
    transition: transform 140ms ease, opacity 120ms ease;
}

.site-nav__item.is-current .site-nav__icon {
    transform: scale(1.4) translateY(-2%);
}

.site-nav__item.is-pressing,
.site-nav__item.is-navigating {
    opacity: 0.52;
}

.site-nav__item.is-pressing .site-nav__icon {
    transform: scale(0.9);
}

.site-nav__item.is-current.is-pressing .site-nav__icon {
    transform: scale(1.24) translateY(-2%);
}

.site-header__logo.is-navigating,
.site-nav__item.is-navigating {
    pointer-events: none;
}

.site-nav__icon-part {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--site-theme-color);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    transition: background-color 280ms ease;
}

.site-nav__underline {
    position: absolute;
    right: -1.5%;
    bottom: 42%;
    left: -1.5%;
    height: 0.55cqw;
    background: var(--site-theme-color);
    transition: background-color 280ms ease;
}

.site-nav__current {
    position: absolute;
    bottom: 24.5%;
    left: 0;
    width: 100%;
    height: 16%;
    color: var(--site-theme-contrast, #fff);
    background: var(--site-theme-color);
    transition: color 280ms ease, background-color 280ms ease;
}

.site-nav__current-label {
    position: absolute;
    top: 50%;
    left: calc(
        (100% / var(--nav-count)) * var(--active-index)
        + (100% / var(--nav-count) / 2)
    );
    display: inline-block;
    font-size: 3.9cqw;
    font-weight: 590;
    line-height: 1;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    transition: color 280ms ease;
}

.site-nav__current-label::after {
    position: absolute;
    top: calc(100% + 0.18em);
    right: -14%;
    left: -14%;
    height: 1.8px;
    content: "";
    background: var(--site-theme-color);
    transition: background-color 280ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .site-header__logo,
    .site-header__logo-mask,
    .site-nav__item,
    .site-nav__icon {
        transition: none !important;
    }
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    width: 100%;
}

.site-footer__frame {
    width: min(100%, var(--site-width));
    margin-inline: auto;
    container-type: inline-size;
    container-name: site-footer;
}

.site-footer__inner {
    position: relative;
    width: 100%;
    height: 37cqw;
    margin-top: 30cqw;
    overflow: hidden;
}

.site-footer__back,
.site-footer__front {
    position: absolute;
    inset: auto 0 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

.site-footer__back {
    z-index: 0;
}

.site-footer__front {
    z-index: 2;
}

.site-footer__copyright {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 7%;
    left: 0;
    margin: 0;
    color: #fff;
    font-size: 2.2cqw;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
