/* ============================================================
   Topway Management Japan — 共通スタイル
   ============================================================ */

:root {
    --ink: #071b3c;
    --blue: #006bf1;
    --navy: #001b43;
    --gold: #c57900;
    --gold2: #ddae66;
    --soft: #f1f6ff;
    --container: 1360px;
    --header-h: 102px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: auto
}

body {
    margin: 0;
    color: #111;
    background: #fff;
    font-family: "Noto Sans JP", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden
}

img {
    max-width: 100%
}

a {
    color: inherit;
    text-decoration: none
}

button {
    font: inherit
}

.tw-container {
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto
}

/* ---------- ヘッダー ---------- */

.tw-header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 68px;
    background: #000;
    box-shadow: 0 4px 18px rgba(0, 22, 55, .05);
    transition: height .3s ease, box-shadow .3s ease, background-color .3s ease;
    will-change: transform, opacity
}

.tw-header.is-scrolled {
    height: 76px;
    box-shadow: 0 6px 24px rgba(0, 22, 55, .12)
}

.tw-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #071f49
}

.tw-header__nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 36px;
    white-space: nowrap;
    font-size: 14px
}

.tw-header__nav a {
    position: relative;
    padding: 12px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    color: #fff;
    gap: 4px;
}

.tw-header__nav a:after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 4px;
    height: 2px;
    background: var(--gold);
    transition: right .25s
}

.tw-header__nav a.active::after,
.tw-header__nav a:hover:after {
    right: 0
}

/* ---------- ヘッダー ドロップダウン ---------- */

.tw-header__dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* マウス移動時のヒットエリアを広げる透明ブリッジ */
.tw-header__dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.tw-header__dropdown-caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #fff;
    transition: transform .25s ease;
}

.tw-header__dropdown:hover .tw-header__dropdown-caret,
.tw-header__dropdown:focus-within .tw-header__dropdown-caret {
    transform: rotate(180deg);
}

.tw-header__dropdown:hover>a:after,
.tw-header__dropdown:focus-within>a:after {
    right: 0
}

.tw-header__dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    min-width: 208px;
    padding: 8px;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: opacity .22s ease, transform .3s cubic-bezier(.22, 1, .36, 1), visibility .22s;
    pointer-events: none;
}

.tw-header__dropdown:hover .tw-header__dropdown-menu,
.tw-header__dropdown:focus-within .tw-header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.tw-header__dropdown-menu a {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border-radius: 7px;
    font-size: 14px;
    white-space: nowrap;
    transition: color .2s, background .2s;
}

.tw-header__dropdown-menu a:after {
    content: none;
}

.tw-header__dropdown-menu a:hover,
.tw-header__dropdown-menu a:focus-visible {
    color: #f0c27b;
    background: rgba(255, 255, 255, .08);
    outline: none
}

.tw-header__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 22px
}

.tw-header__language,
.tw-header__menu {
    border: 0;
    background: none;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tw-header__language {
    padding-right: 20px;
    background: url(../img/arrowico.svg) right center no-repeat;
    background-size: 12px 12px;
    transition: color .25s, opacity .25s
}

.tw-language {
    position: relative
}

.tw-language__menu {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    width: 176px;
    padding: 8px;
    border-radius: 10px;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(.98);
    transform-origin: top right;
    transition: opacity .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1), visibility .25s;
    pointer-events: none
}

.tw-language.is-open .tw-language__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto
}

.tw-language__menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: transparent;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s
}

.tw-language__menu a:hover,
.tw-language__menu a:focus-visible,
.tw-language__menu a.active {
    color: #f0c27b;
    background: #000;
    outline: none
}

.tw-header__menu {
    display: none;
    width: 34px;
    padding: 4px
}

.tw-header__menu i {
    display: block;
    height: 2px;
    background: #fff;
    margin: 6px 0
}

/* ---------- ボタン ---------- */

.tw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    min-width: 182px;
    height: 56px;
    padding: 0 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: .25s
}

.tw-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06)
}

.tw-button--gold {
    color: #fff;
    background: linear-gradient(90deg, var(--gold), var(--gold2))
}

.tw-button--outline {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .9)
}

/* ---------- ページトップ ---------- */

.tw-page-top {
    position: fixed;
    z-index: 900;
    right: 0;
    bottom: 115px;
    width: 90px;
    height: 90px;
    border: 0;
    background: #aaa;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s, transform .4s cubic-bezier(.22, 1, .36, 1), background .25s, visibility .3s
}

.tw-page-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto
}

.tw-page-top:hover {
    background: #006bf1;
    transform: translateY(-4px)
}

.tw-page-top:focus-visible {
    outline: 3px solid rgba(0, 107, 241, .35);
    outline-offset: 4px
}

/* ---------- フッター ---------- */

.tw-footer {
    background: #fff
}

.tw-footer__main {
    display: grid;
    grid-template-columns: 210px 1fr 280px;
    gap: 60px;
    min-height: 480px;
    padding-top: 60px
}

.tw-footer__brand {
    display: flex;
    align-items: flex-start;
    color: #071f49
}

.tw-footer__brand>span {
    font-size: 50px;
    font-weight: 800;
    color: #bd7500;
    transform: skew(-8deg)
}

.tw-footer__brand b {
    padding-top: 10px;
    font-size: 21px
}

.tw-footer__brand small {
    display: block;
    font-size: 7px
}

.tw-footer__menus {
    display: grid;
    grid-template-columns: 180px 250px 180px;
    gap: 28px
}

.tw-footer__menus h3 {
    margin: 0 0 25px;
    font-size: 18px
}

.tw-footer__menus a {
    display: block;
    margin: 0 0 14px;
    padding-left: 16px;
    font-size: 14px;
    line-height: 1.5
}

.tw-footer__menus a:before {
    content: "›";
    margin-left: -14px;
    margin-right: 8px;
    font-size: 18px;
    color: #006bf1
}

.tw-footer__social {
    display: flex;
    gap: 34px;
    font-size: 28px
}

.tw-footer__bottom {
    background: #f3f5f7
}

.tw-footer__bottom .tw-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 77px;
    font-size: 12px
}


.tw-home-social {
    height: 340px;
    padding-top: 100px;
    background: #001b43;
    color: #fff;
    text-align: center
}

.tw-home-social__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr)
}

.tw-home-social__grid a {
    display: grid;
    justify-items: center;
    gap: 18px;
    border-right: 1px solid rgba(255, 255, 255, .2)
}

.tw-home-social__grid a:last-child {
    border: 0
}

.tw-home-social strong {
    font-size: 48px
}

.tw-home-social span {
    font-size: 15px
}

.tw-home-social__all {
    display: inline-block;
    margin-top: 72px;
    font-size: 15px
}

/* ---------- レスポンシブ ---------- */

@media(max-width:1500px) and (min-width:769px) {
    :root {
        --container: 1180px
    }

    .tw-header {
        padding: 0 30px
    }

    .tw-header__nav {
        gap: 18px;
        font-size: 12px
    }

    .tw-header__actions {
        gap: 10px
    }

    .tw-button {
        min-width: 164px;
        height: 48px;
        padding: 0 24px;
        font-size: 15px;
    }

    .tw-footer__main {
        grid-template-columns: 180px 1fr 220px;
        gap: 40px
    }

    .tw-home-social {
        height: 340px;
        padding-top: 60px;
    }
}

@media(max-width:768px) {
    :root {
        --header-h: 68px
    }

    .tw-container {
        width: calc(100% - 40px)
    }

    .tw-header,
    .tw-header.is-scrolled {
        height: 68px;
        padding: 0 18px
    }

    .tw-header__mark {
        font-size: 30px
    }

    .tw-header__wordmark {
        font-size: 14px
    }

    .tw-header__nav {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        transform: none;
        width: 100%;
        height: calc(100vh - 68px);
        padding: 32px 24px;
        background: #050f20;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        overflow: auto
    }

    .tw-header__nav.is-open {
        display: flex
    }

    .tw-header__nav a {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, .14);
        font-size: 16px
    }

    .tw-header__dropdown {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .tw-header__dropdown::after,
    .tw-header__dropdown-caret {
        display: none
    }

    .tw-header__dropdown-menu {
        position: static;
        transform: none;
        min-width: 0;
        padding: 0 0 0 16px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .tw-header__dropdown-menu a {
        padding: 14px 0;
        border-radius: 0;
        font-size: 15px
    }

    .tw-header__actions>.tw-button {
        display: none
    }

    .tw-header__brand img {
        width: 145px
    }

    .tw-header__actions {
        gap: 10px
    }

    .tw-header__language {
        display: flex;
        min-height: 40px;
        padding: 6px 20px 6px 8px;
        font-size: 12px
    }

    .tw-header__language img {
        width: 17px;
        height: 17px
    }

    .tw-language__menu {
        position: fixed;
        top: 60px;
        right: 54px;
        width: 164px
    }

    .tw-header__menu {
        display: block
    }

    .tw-button {
        min-width: 0;
        height: 50px;
        font-size: 14px
    }

    .tw-container {
        flex-direction: column;
    }

    .tw-page-top {
        width: 58px;
        height: 58px;
        right: 14px;
        bottom: 18px;
        border-radius: 50%;
        font-size: 9px;
        background: #0a3d73
    }

    .tw-footer__main {
        display: block;
        padding: 50px 0
    }

    .tw-footer__menus {
        grid-template-columns: 1fr;
        margin-top: 40px
    }

    .tw-footer__menus>div {
        border-top: 1px solid #e1e5eb;
        padding-top: 20px
    }

    .tw-footer__social {
        margin-top: 36px
    }

    .tw-footer__bottom .tw-container {
        display: block;
        height: auto;
        padding: 22px 0;
        font-size: 9px
    }

    .tw-home-social {
        height: auto;
        padding: 64px 0
    }

    .tw-home-social__grid {
        grid-template-columns: 1fr
    }

    .tw-home-social__grid a {
        padding: 28px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .2)
    }

    .tw-home-social strong {
        font-size: 36px
    }

    .tw-home-social__all {
        margin: 42px 20px 0;
        font-size: 12px
    }
}

@media(max-width:480px) {
    .tw-container {
        flex-direction: column;
        width: calc(100% - 28px)
    }

    .tw-header,
    .tw-header.is-scrolled {
        padding: 0 12px
    }

    .tw-header__brand img {
        width: 126px
    }

    .tw-header__language {
        width: 39px;
        padding: 7px 18px 7px 4px;
        gap: 0;
        overflow: hidden
    }

    .tw-header__language span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0)
    }

    .tw-language__menu {
        right: 48px
    }
}

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