/* ================================================
HEADER
================================================ */
.ghead {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* 初期状態は非表示 */
    transform: translateY(-20px);
    opacity: 0;
}

/* data-show="true"を付与すると表示 */
.ghead[data-show="true"] {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--height-header);
    gap: 20px;
    margin: 0 auto;
    padding-inline: max(2.5vw, 20px) calc(max(2.5vw, 20px) - 15px);
}

.logo {
    width: 80px;
    aspect-ratio: 80 / 43;
    height: auto;
    margin-top: 8px;
}

.logo a {
    display: inline-block;
    width: 100%;
    height: 100%;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (width < 768px) {
    .header__inner {}
}

/* ----------------------------------------
HAMBURGER
---------------------------------------- */
#nav_btn_area {
    display: block;
}

.hamburger {
    display: block;
    position: relative;
    width: 60px;
    height: var(--height-header);
    margin-left: auto;
    border: none;
    background: none;
    z-index: 1001;
    cursor: pointer;
}

.hamburger__line {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background-color: var(--color-base, #333);
    transform: translateX(-50%);
    transition: 0.4s;
}

.hamburger__line::before,
.hamburger__line::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--color-base, #333);
    transition: inherit;
}

.hamburger__line::before {
    top: -8px;
}

.hamburger__line::after {
    top: 8px;
}

/* ナビゲーション開時のハンバーガーボタンを×に変更 */
body.nav-open .hamburger__line {
    background-color: transparent;
}

body.nav-open .hamburger__line::before {
    top: 0;
    transform: rotate(45deg);
}

body.nav-open .hamburger__line::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ナビゲーション開時にヘッダーの内容部分だけ隠す */
body.nav-open .header__inner {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* アクセシビリティ用隠しテキスト */
.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;
}

/* ----------------------------------------
DRAWER NAVIGATION
---------------------------------------- */
.gnav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(230, 228, 216, 0.98);
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gnav.active {
    opacity: 1;
    visibility: visible;
}

.nav__inner {
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 80%;
    position: relative;
}

.gnav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: min(2.5vw, 40px);
    width: fit-content;
    /* メニューを画面中央に配置するためのマージン調整 */
    margin-top: auto;
    margin-bottom: auto;
}

.gnav .menu>li>a {
    display: block;
    text-decoration: none;
    --min-size: 14;
    --max-size: 20;
    font-size: var(--clamp-size);
    text-align: center;
    writing-mode: vertical-lr;
    letter-spacing: 0.3em;
}

.gnav .menu__bottom {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    max-width: 670px;
}

.company_logo {
    width: clamp(80px, 14vw, 120px);
}

.company_logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.privacy__link {
    --min-size: 8;
    --max-size: 12;
    font-size: var(--clamp-size);
}

@media (width < 480px) {
    .nav__inner {
        padding: 1em;
        width: 90%;
        align-items: flex-start;
    }

    .gnav .menu {
        flex-direction: column;
        align-items: flex-start;
    }

    .gnav .menu>li>a {
        writing-mode: horizontal-tb;
    }
}

/* 閉じるボタン（右上） */
.nav-close-btn {
    position: fixed;
    top: 50%;
    right: calc(max(2.5vw, 20px) - 15px);
    transform: translateY(-50%);
    width: 60px;
    height: var(--height-header);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

body.nav-open .nav-close-btn {
    opacity: 1;
    pointer-events: all;
}

/* 閉じるボタンの×マーク */
.nav-close-btn .hamburger__line {
    display: block;
    position: absolute;
    left: 50%;
    width: 45%;
    height: 2px;
    background-color: transparent;
    transform: translateX(-50%);
    transition: 0.4s;
}

@media (width < 768px) {
    .nav-close-btn .hamburger__line {
        width: 40%;
        height: 2px;
    }
}

.nav-close-btn .hamburger__line::before,
.nav-close-btn .hamburger__line::after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--color-base, #333);
    transition: inherit;
}

.nav-close-btn .hamburger__line::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-close-btn .hamburger__line::after {
    top: 0;
    transform: rotate(-45deg);
}


/* ----------------------------------------
UTILITIES
---------------------------------------- */

/* ナビゲーション開時の背景固定 */
html.nav-open,
html.nav-open body {
    overflow: hidden;
}