/* --------------------------------------------------

	2025 日本ダービー

-------------------------------------------------- */


:root {

    /* - カラー
    ---------------------------- */
    --color-dark: #000000;
    --color-light: #ffffff;
    --unit-bg-light: rgb(from var(--color-light) r g b / 80%);

    /* - フォントサイズ
    ---------------------------- */

    --font-size-10: 0.625rem;
    --font-size-11: 0.6875rem;
    --font-size-12: 0.75rem;
    --font-size-14: 0.875rem;
    --font-size-16: 1rem;
    --font-size-18: 1.125rem;
    --font-size-20: calc(var(--font-size-10) * 2);
    --font-size-24: 1.5rem;
    --font-size-26: 1.625rem;
    --font-size-28: calc(var(--font-size-14) * 2);
    --font-size-30: 1.875rem;

    /* - フォント
    ---------------------------- */
    --font-regular: 400;
    --font-bold: 700;
    --font-black: 900;
    --font-serif: "Noto Serif JP", serif;

    /* - イージング
    ---------------------------- */
    --ease: 0.3s ease;
    --btn-ease: 0.2s ease;

    /* - アイコン類
    ---------------------------- */
    --slick_arrow: 34px;
    --filter-light: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(38%) hue-rotate(254deg) brightness(110%) contrast(110%);

    /* - 角丸
    ---------------------------- */
    --border-r: 12px;
}

html {
    font-size: 100%;
}

html:has(> .no_scroll) {
    padding-inline-end: var(--scrollbar-width, 0);
}

html,
body {
    height: 100%;
    font-family: "Noto Sans JP", sans-serif;
    letter-spacing: 0.06em;
    line-height: 1.6;
    font-feature-settings: "palt" 1;
}

body {
    margin: 0;
    overflow: hidden;
    overflow-y: scroll;
    background-color: #b70007;
}

body * {
    box-sizing: border-box;
}



body.no_scroll,
body:has(.loading:not(.loaded)) {
    left: 0;
    width: 100%;
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

a {
    text-decoration: none;
}

p {
    font-size: var(--font-size-16);
    font-weight: var(--font-regular);
}




/* - ローディング
---------------------------- */

.loading {
    /*ローディング画面の縦横幅を画面いっぱいになるように指定*/
    width: 100vw;
    height: 100vh;
    /*ローディング画面の表示位置を固定*/
    position: fixed;
    top: 0;
    left: 0;
    background: url(../img/bg.jpg);
    background-color: var(--color-dark);
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /*ローディング画面を0.3秒かけて非表示にする*/
    transition: all 0.3s linear;
    z-index: 3;
}

/*ローディング画面を非表示にする*/
.loading.loaded {
    /*0.3秒かけてopacityを0にする*/
    opacity: 0;
    visibility: hidden;
}

.loading-text {
    color: var(--color-light);
    font-size: var(--font-size-24);
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.spinner {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 4px solid var(--color-light);
    border-left-color: var(--color-dark);
    /* アニメーションを1秒かけて実行 */
    animation: spinner-rotation 1s linear infinite;
}

/* アニメーションの設定 */
@keyframes spinner-rotation {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* - ページコンテンツ
---------------------------- */

.content {
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;
    height: 100vh;
}

.content-text {
    color: #333;
}

.wrapper .contents {
    max-width: 480px;
    margin: 0 auto;
}

header .jra_logo {
    display: flex;
    justify-content: space-between;
    position: fixed;
    z-index: 2;
    padding: 15px 20px;
    width: calc(100% - 40px);
    width: 100%;
    max-width: 480px;
    height: 72px;
    transition: .4s;
}

.contents:not(.home):not(:has(.menu.show)) header .jra_logo,
.contents:not(.home):has(.menu.hide-animation) header .jra_logo {
    background: rgb(from var(--color-dark) r g b / 20%);
}

.jra_logo h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    animation-name: naviShowAnimation;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    opacity: 1;
}

.no_scroll .jra_logo h1 {
    animation-name: naviHideAnimation;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    opacity: 1;
}


.jra_logo img[src*="logo_jra"] {
    max-width: 96px;
    height: auto;
    vertical-align: middle;
    filter: var(--filter-light);
}



.list_item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-content: start;
    gap: 4px;
}


/* - メニュー
---------------------------------------------------------------------- */

/* - sp　メニューボタン
---------------------------- */

.sp_menu {
    display: block;
    position: relative;
    width: 44px;
    height: 42px;
    cursor: pointer;
}

.sp_menu span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

.sp_menu,
.sp_menu span {
    display: inline-block;
    box-sizing: border-box;
}

/* メニューボタン高さ */
:root {
    --line_pos: 20px;
}

.sp_menu span:nth-of-type(1) {
    top: calc(((100% - var(--line_pos)) / 2) - 1px);
}

.sp_menu span:nth-of-type(2) {
    top: calc(50% - 1px);
}

.sp_menu span:nth-of-type(3) {
    bottom: calc(((100% - var(--line_pos)) / 2) - 2px);
}

/* クローズ時　アニメーション */

#btn.disabled span:nth-of-type(1) {
    animation: btn-bar01 var(--ease) forwards;
}


@keyframes btn-bar01 {
    0% {
        transform: translateY(calc(50% + (var(--line_pos) / 2) - 1px)) rotate(25deg);
    }

    50% {
        transform: translateY(calc(50% + (var(--line_pos) / 2) - 1px)) rotate(0);
    }

    100% {
        transform: translateY(0) rotate(0);
    }
}

#btn.disabled span:nth-of-type(2) {
    transition: all var(--ease);
    opacity: 1;
}

#btn.disabled span:nth-of-type(3) {
    animation: btn-bar03 var(--ease) forwards;
}


@keyframes btn-bar03 {
    0% {
        transform: translateY(calc(50% - (var(--line_pos) / 2) - 1px)) rotate(-25deg);
    }

    50% {
        transform: translateY(calc(50% - (var(--line_pos) / 2) - 1px)) rotate(0);
    }

    100% {
        transform: translateY(0) rotate(0);
    }
}

/* オープン時　アニメーション */

#btn.active span:nth-of-type(1) {
    animation: active-btn-bar01 var(--ease) forwards;
}


@keyframes active-btn-bar01 {
    0% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(calc(50% + (var(--line_pos) / 2) - 1px)) rotate(0);
    }

    100% {
        transform: translateY(calc(50% + (var(--line_pos) / 2) - 1px)) rotate(25deg);
    }
}

#btn.active span:nth-of-type(2) {
    opacity: 0;
}

#btn.active span:nth-of-type(3) {
    animation: active-btn-bar03 var(--ease) forwards;
}


@keyframes active-btn-bar03 {
    0% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(calc(50% - (var(--line_pos) / 2) - 1px)) rotate(0);
    }

    100% {
        transform: translateY(calc(50% - (var(--line_pos) / 2) - 1px)) rotate(-25deg);
    }
}



/* - sp　メニュー
---------------------------- */

.menu .inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, auto) 1fr;
    justify-items: center;
    row-gap: 28px;
    /* padding-bottom: 32px; */
    max-width: 480px;
    height: calc(100vh - 80px);
    height: calc(100svh - 80px);
    min-height: 717px;
    margin: 80px auto 32px;
    text-align: center;
}

.menu .inner .title {
    width: 288px;
    height: auto;
}

.menu .inner .wrap {
    display: flex;
    flex-flow: column;
    justify-content: end;

    .jra_logo img[src*="logo_jra"] {
        max-width: 87px;
    }
}


.wrapper>.contents>div.menu {
    display: none;
    /*アニメーション*/
    z-index: 1;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    background-color: rgba(183, 0, 7, 0.85);
}

.wrapper>.contents>div.menu.hide-animation {
    display: block;
    animation-name: naviHideAnimation;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    opacity: 1;
}

.wrapper>.contents>div.menu.show:not(.hide-animation) {
    display: block;
    animation-name: naviShowAnimation;
    animation-duration: 0.4s;
    animation-fill-mode: forwards;
    opacity: 1;
    overflow-y: scroll;
}

@keyframes naviHideAnimation {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes naviShowAnimation {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.menu>img {
    width: 192px;
    max-width: calc(100% - 180px);
    height: auto;
}

.show.menu .list {
    display: block;
}

.menu .list li:not(.list_icon) a {
    display: inline-block;
    padding-block: 14px;
    font-size: var(--font-size-18);
    font-weight: var(--font-bold);
    color: var(--color-light);
    line-height: 1;
    letter-spacing: 0.06em;
}

.menu .list li>a[href^="/"] {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: .4em;

    .text {
        display: flex;
        align-items: center;
        gap: .3em;
    }

    .sm {
        font-size: var(--font-size-12);
    }

    &::before {
        content: "";
        display: inline-block;
        background-image: url('../img/icon_link.svg');
        background-repeat: no-repeat;
        background-size: contain;
        width: var(--font-size-18);
        aspect-ratio: 15 / 13;
    }
    & span {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    & span img{
        width: .7em;
    }
}

/* 未公開 */
.menu .list li .disabled {
    pointer-events: none;
    filter: brightness(70%) opacity(95%);
}

.menu .list li a.current::before {
    transform: scale(1, 1);
}

.menu .list li:has(.current)::before {
    color: var(--color-secondary);
}



/* メニュー4つ並びアイコン */

.list_icon {
    display: grid;
    grid-template-columns: repeat(2,auto);
    grid-auto-flow: column;
    gap: 8px;
    margin-top: 1.5em;
}

.list_icon_item {
    text-align: center;
    line-height: 1.2;
}

.list_icon_item p {
    font-size: var(--font-size-10);
}

.list_icon_item a {
    display: block;
    color: #fff;
}

.list_icon_item p {
    letter-spacing: -.02em;
}

.list_icon_item img {
    width: 50px;
    background-color: #ffffff;
    border-radius: 10px;
    margin-bottom: 10px;
}



/* - メインコンテンツ
---------------------------------------------------------------------- */

.wrapper>.contents>div.main {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    box-shadow: 0px 0px 100px 11px rgb(from var(--color-dark) r g b / 100%);
}

.wrapper .main_bg{
    position: fixed;
    z-index: 0;
    width: 100%;
    height: 100vh;
    background-image: url(../img/pic_main_bg.png);
    background-size: cover;
    background-repeat: no-repeat;
    max-width: 480px;
}



/* - 共通
---------------------------- */
@keyframes firstview {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeup {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contents_wrap .heading_wrap {
    text-align: center;
}

.contents_wrap>div {
    padding-block: 70px 40px;
}

.contents_wrap .heading_wrap {
    margin-block: 28px;
}

.fadeIn {
    opacity: 0;
}

.fade {
    /* アニメーション */
    animation-name: fadeup;
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    opacity: 0;
}

/* 画像エリア余白なしパターン */
.contents_wrap .unit:has(.txt_wrap) {
    padding: 0;
    background: none;
    overflow: hidden;
}

.contents_wrap .unit .cancel {
    display: grid;
    place-content: center;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: rgb(from var(--color-dark) r g b / 60%);
    color: #fff;

    & p {
        font-size: var(--font-size-16);
    }

    & p.txt {
        font-size: var(--font-size-18);
        font-weight: bold;
        text-align: center;
        line-height: 1.3;
        letter-spacing: 0.4em;
    }
}

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

.bottom {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    justify-items: center;
    row-gap: 18px;

    .copyright {
        grid-column: 1 / -1;
    }
}


/* ----- SPメニュー内 ----- */
.menu.show .bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
}

.footer .anchor {
    position: static;
}

.footer .event {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
    margin-inline: 20px;

    & a {
        display: block;
    }

    & li {
        transition: var(--btn-ease);
    }
}

.footer .event li:only-child {
    grid-column: 1 / -1;
}

@media (hover: hover) {
    .footer .event li:has(a:hover) {
        filter: brightness(120%);
    }
}

.footer .bottom {
    padding: 40px 20px 30px;
    background: linear-gradient(transparent, var(--color-dark) 28%);
    color: var(--color-light);
    font-size: clamp(0.6875rem, 0.0179rem + 2.8571vw, 0.875rem);
    text-align: center;
}

.footer .sns_area {
    display: flex;
    justify-content: space-between;
    justify-self: end;
}


.footer .jra_logo {
    justify-self: start;
}

.footer .jra_logo img[src*="logo_jra"] {
    width: 78px;
}

.sns_list {
    display: flex;
    gap: 20px;

    & li {
        display: flex;
        align-items: center;
        width: 25px;
    }
}

.copyright {
    line-height: 1;
}

.copyright img {
    width: 280px;
    max-width: 100%;
}

.pc_right {
    display: none;
}


/*------------------------------------------------------
	SP 480px以上
------------------------------------------------------*/
@media screen and (width >=480px) {
    .wrapper .bg::before {
        content: "";
        display: block;
        position: fixed;
        left: 0;
        z-index: 1;
        height: 100vh;
        width: 100%;
        aspect-ratio: 1731 / 169;
        background-image: url(../img/white.svg);
        background-size: 100vw;
        background-repeat: repeat-x;
        animation: bg-slider 20s linear infinite;
    }

    @keyframes bg-slider {
        from {
            background-position: left 0% bottom 13%;
        }

        to {
            background-position: left -100vw bottom 13%;
        }
    }

    .wrapper .bg {
        background-image: url(../img/bg.jpg);
        background-size: cover;
        background-repeat: no-repeat;
        background-position: left 0 bottom 0;
        position: fixed;
        width: 100%;
        height: 100vh;
        left: 0;
        bottom: 0;
        z-index: 0;
    }

    /* ハンバーガーメニューの位置 */
    .menubtn_wrap:has(.active) {
        right: calc((100% - 480px) / 2);
    }

}

/*------------------------------------------------------
	PC 960px以上
------------------------------------------------------*/
@media screen and (width >=960px) {

    .wrapper {
        overflow: visible;
    }


    .wrapper>.contents {
        width: 1340px;
        max-width: calc(100% - 4rem);
        display: grid;
        grid-template-rows: auto auto 80px;
        grid-template-columns: 1fr minmax(375px, 35.8%) 1fr;
        margin: 0 auto;
    }

    .wrapper>.contents>div.footer {
        grid-area: 3 / 2;
    }

    .wrapper>.contents>div.main {
        display: grid;
        grid-area: 1 / 2/ -1/-2;
        box-shadow: 0px 0px 100px 11px rgb(from var(--color-dark) r g b / 100%);
        z-index: 0;
    }

    .contents_wrap>div {
        padding-top: 20px;
    }

    .wrapper .main_bg {
        grid-area: 1 / 2/ -1/-2;
        position: sticky;
        top: 0;
    }


    /* - PC 右側　ロゴ
    ---------------------------------------------------------------------- */


    .wrapper>.contents>div.pc_right {
        display: block;
        grid-area: 1 / 3;
    }


    /* - PC　メニュー
    ---------------------------------------------------------------------- */

    html {
        scroll-behavior: smooth;
    }

    header .jra_logo {
        top: 0;
        padding-inline: 0;

    }

    .contents:not(.home):not(:has(.menu.show)) header .jra_logo {
        background: none;
    }

    .menubtn_wrap {
        display: none;
    }

    .wrapper>.contents>div.menu {
        display: block;
        width: auto;
    }

    .menu .inner {
        display: block;
        max-width: 300px;
        height: auto;
        min-height: auto;
        margin: 0;
        padding-bottom: 0;

        .jra_logo {
            display: none;
        }
    }

    .menu .inner .title {
        display: none;
    }

    .wrapper>.contents>div.menu {
        grid-area: 1 / 1;
        position: sticky;
        z-index: 0;
        top: 0;
        background-color: transparent;
    }

    .menu .wrap {
        margin-top: min(12vh, 220px);
    }

    .menu .list {
        min-width: 180px;
        text-align: left;
    }

    .menu .list li:not(.list_icon) a {
        font-size: 15px;
    }

    .menu .list_icon {
        justify-content: start;
    }

    .menu .bottom {
        grid-template-columns: 1fr;
        justify-items: start;
        position: fixed;
        bottom: 20px;
        width: 100%;
        max-width: 300px;
    }

    .menu .bottom .copyright {
        justify-content: left;
    }

}


@media print {

    html,
    body {
        height: auto;
    }
}