@charset "utf-8";

* {
    box-sizing: border-box;
}

a {
    display: block;
    margin-top: -2px;
}

/* スクロールバーの幅ぶんを常に確保しておく
   → メニュー展開時にスクロールバーが消えても画面が横にずれない */
html {
    scrollbar-gutter: stable;
    /* 別ページから「〇〇.html#id」で来たとき、固定ヘッダーの下に見出しが来るように
       （--header-h は main.js がヘッダーの高さを測ってセット） */
    scroll-padding-top: var(--header-h, 0px);
}

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

.inner {
    max-width: 605px;
    width: 80%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.img-box {
    width: 100%;
    height: auto;
}

img {
    width: 100%;
    height: 100%;
}

/* ヘッダー */
/* 常に画面上部に固定。sticky なので下のコンテンツが隠れず、余白の調整もいらない */
header {
    position: sticky;
    top: 0;
    z-index: 101;
    /* 全画面メニュー(.nav)より手前 */
    background-color: #ffffff;
    padding: 3% 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    width: 38.6%;
}

.hamburger-btn {
    width: 14%;
    height: auto;
    position: relative;
}

.btn-base {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-pos {
    width: 100%;
    height: 100%;
    position: relative;
}

.btn-pos span {
    width: 30px;
    height: 1px;
    display: block;
    background-color: #ffffff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.btn-pos span:first-child {
    top: 40%;
}

.btn-pos span:last-child {
    top: 50%;
}

/* ---------- hamburgerCSS：開閉で × に ----------
   中央寄せの translateX(-50%) と回転を transform にまとめて書く */
.hamburger-btn {
    cursor: pointer;
}

.btn-pos span {
    transition:
        top 0.3s ease,
        transform 0.3s ease 0s;
}

/* 開く：まず真ん中に集まる → 少し遅れて回転 */
.hamburger-btn.is-open .btn-pos span {
    top: 45%;
    transition:
        top 0.3s ease,
        transform 0.3s ease 0.25s;
}

.hamburger-btn.is-open .btn-pos span:first-child {
    transform: translateX(-50%) rotate(45deg);
}

.hamburger-btn.is-open .btn-pos span:last-child {
    transform: translateX(-50%) rotate(-45deg);
}

/* 閉じる：先に回転を戻す → 少し遅れて上下に分かれる */
.hamburger-btn:not(.is-open) .btn-pos span {
    transition:
        transform 0.3s ease,
        top 0.3s ease 0.25s;
}

.hamburger-btn:focus-visible {
    outline: 2px solid #0081cb;
    outline-offset: 2px;
}

/* キービジュアルムービー */
.kv {
    position: relative;
    overflow: hidden;
    /* はみ出させた動画の右端を切り落とす */
    --video-crop: 4px;
    /* 動画の右端に入っている黒い線を隠す幅。線が残るなら数字を増やす */
}

.kv video {
    display: block;
    /* 動画の下にできるすき間も消す */
    width: calc(100% + var(--video-crop));
    max-width: none;
}

.kv-title {
    width: 44.8%;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

video {
    max-width: 100%;
}

/* ナビゲーション */
/* ---------- navCSS：全画面ハンバーガーメニュー ----------
   画面いっぱいに重ねて表示。固定ヘッダー（ロゴ＋×ボタン）はメニューの上に残る */
.nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100%;
    max-width: 750px;
    /* .wrapper と同じ幅で中央に */
    margin: 0 auto;
    padding: calc(var(--header-h, 80px) + 5%) 0 5%;
    /* ヘッダーの下から並べる */
    background-color: #ffffff;
    overflow-y: auto;
    /* 画面が低い端末でもスクロールで全部見られる */
    overscroll-behavior: contain;

    opacity: 0;
    visibility: hidden;
    translate: 0 -20px;
    transition:
        opacity 0.4s ease,
        translate 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s linear 0.4s;
}

.nav.is-open {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
    transition:
        opacity 0.4s ease,
        translate 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0s;
}

.nav a {
    width: 67%;
    margin: 0 auto 5%;
    position: relative;
    isolation: isolate;
    /* 黄色い背景を画像の後ろに回すため */

    /* 開いたとき1つずつ出てくる */
    opacity: 0;
    translate: 0 -10px;
    transition:
        opacity 0.3s ease,
        translate 0.3s ease;
}

.nav.is-open a {
    opacity: 1;
    translate: 0 0;
}

.nav.is-open a:nth-of-type(1) {
    transition-delay: 0.15s;
}

.nav.is-open a:nth-of-type(2) {
    transition-delay: 0.23s;
}

.nav.is-open a:nth-of-type(3) {
    transition-delay: 0.31s;
}

/* ---------- navHoverCSS：ホバーで黄色が左→右に伸びる ----------
   メニュー内のリンク(.nav a)とページ内の .section-nav 共通 */
.section-nav {
    position: relative;
    isolation: isolate;
    /* 黄色い背景を画像の後ろに回すため */
}

.nav a::before,
.section-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: #d5e1f1;
    /* 通常のリンクは薄い水色（黄色は Special Event 専用） */
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Special Event へのリンクだけ、最初から黄ベタで目立たせる（メニュー・ページ内とも） */
.nav a[href*="event.html"]::before,
.section-nav[href*="event.html"]::before {
    background-color: #f5e67a;
    transform: scaleX(1);
}

@media (hover: hover) {

    .nav a:hover::before,
    .section-nav:hover::before {
        transform: scaleX(1);
    }
}

.nav a:focus-visible,
.section-nav:focus-visible {
    outline: none;
}

.nav a:focus-visible::before,
.section-nav:focus-visible::before {
    transform: scaleX(1);
}

/* トップセクション01 */

.top-bg01 {
    position: relative;
    background-color: #0081cb;
    margin-top: -2px;
    overflow-x: clip;
    /* 横から入ってくるオブジェで横スクロールが出ないように */
}

.top-img_obj {
    position: absolute;
    height: auto;
}

/* トップセクション02 */

.top-bg02 {
    position: relative;
    background-color: #ffffff;
    margin-top: -2px;
}

.page-navi {
    margin: 10% 0 5%;
}

.section-nav {
    width: 67%;
    margin: 0 auto 3%;
    display: block;
}

/* トップセクション03 日数カウンターベース */

.counter {
    width: 100%;
    height: auto;
    position: relative;
}

/* 枠は --frame-top、当日メッセージは --message-top が中心の縦位置 */
.counter-flame {
    width: 40%;
    object-fit: contain;
    top: var(--frame-top);
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
}

.last-message {
    width: 40%;
    object-fit: contain;
    top: var(--message-top);
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    display: none;
}


/* スペシャルイベントページ */
.event-bg {
    background-image: url(../images/sp-page_bg.webp);
    background-size: contain;
    background-repeat: no-repeat;
    padding: 0 0 5% 0;
}

.link-card {
    width: 80.5%;
    margin: 0 auto 5%;
}

/* スタッフメッセージページ */
.message-bg {
    background-image: url(../images/st-bg.webp);
    background-size: cover;
    background-repeat: no-repeat;
    padding: 15% 0 30% 0;
    position: relative;
    /* パララックスで動いた .parallax がセクションの外にはみ出さないように */
    overflow: hidden;
    overflow: clip;
}

/* .inner の後ろ・背景の上に1枚はさまる層 */
.parallax {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    z-index: 1;
}

.st-card {
    margin-bottom: 5%;
}

/* ---------- parallaxCSS ----------
   JS（animation.js）が transform で動かします。
   .fade-in は translate プロパティで動くので、パララックスとぶつかりません */
.js-parallax {
    will-change: transform;
}









/* ---------- sliderCSS：Historyスライダー（Splide） ----------
   サイズは750pxデザイン基準の vw 指定＋ min() で 750px 以上では止まる */
.slider {
    padding-bottom: min(4.4vw, 33px);
    /* ドット分の余白 */
    margin-bottom: 15%;
}

.slider .splide__slide img {
    display: block;
    width: 100%;
    height: auto;
}

/* ドット */
.slider .splide__pagination {
    bottom: 0;
    padding: 0;
    gap: min(3.6vw, 27px);
}

.slider .splide__pagination__page {
    width: min(2.2vw, 16px);
    height: min(2.2vw, 16px);
    margin: 0;
    background: #d5e1f1;
    opacity: 1;
    transition: background-color 0.3s ease;
}

.slider .splide__pagination__page.is-active {
    background: #0081cb;
    transform: none;
    /* Splide標準の拡大をオフ */
}

.slider .splide__pagination__page:focus-visible {
    outline: 2px solid #0081cb;
    outline-offset: 3px;
}


/* カウンター制御 */
/* ---------- counterCSS：日数カウンター ----------
   数字の位置・大きさ・色は下の変数で調整してください
   （サイズは .counter の横幅に対する割合 cqw なので、画面幅に合わせて縮みます） */
.counter {
    container-type: inline-size;
    --frame-top: 33.3%;
    /* 枠の中心の縦位置。デザインカンプに合わせた値 */
    --message-top: calc(var(--frame-top) + 5%);
    /* 当日メッセージの中心の縦位置（枠より少し下げている。数字を増やすほど下がる） */
    --num-top: calc(var(--frame-top) + 7.6%);
    /* 数字の中心の縦位置。枠の四角の中心に来るよう、枠の位置から自動計算 */
    --num-left: 49.7%;
    /* 数字の中心の横位置（枠の四角が画像内でわずかに左寄りなので合わせている） */
    --num-size: 9.6cqw;
    /* 数字の大きさ */
    --num-gap: 0.02em;
    /* 数字同士の間隔 */
    --num-color: #ffffff;
    --num-font: "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;
}

.counter-num {
    position: absolute;
    top: var(--num-top);
    left: var(--num-left);
    translate: -50% -50%;
    z-index: 1;
    margin: 0;
    font-family: var(--num-font);
    font-size: var(--num-size);
    font-weight: 700;
    line-height: 1;
    color: var(--num-color);
    font-variant-numeric: tabular-nums;
    /* 数字の幅をそろえて、日付が変わってもガタつかない */
}

.counter-digits {
    display: flex;
    gap: var(--num-gap);
}

.counter-digit {
    display: block;
    min-width: 0.56em;
    text-align: center;
}

/* 日付が変わって数字が切り替わるとき、上からストンと落ちてくる */
.counter-digit.is-changed {
    animation: digitDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes digitDrop {
    0% {
        opacity: 0;
        translate: 0 -40%;
    }

    100% {
        opacity: 1;
        translate: 0 0;
    }
}

/* 読み上げ用（画面には出さない） */
.counter-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* 当日（残り0日）：枠と数字を消してメッセージに差し替え */
.counter.is-closed .counter-flame,
.counter.is-closed .counter-num {
    display: none;
}

.counter.is-closed .last-message {
    display: block;
    animation: lastMessageIn 1.2s ease both;
}

/* 中央寄せの translate(-50%, -50%) と同じ transform の中で動かす。
   （scale プロパティを別に足すと中央寄せのズレまで縮んで、右下から斜めに出てくるため） */
@keyframes lastMessageIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(24px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}



/* =========================================================
   アニメーション
   ※ transform ではなく translate / rotate / scale プロパティで動かしています。
     HTMLのstyle属性に書いてある transform: translateX(-50%) を上書きせず、
     その上に“足し算”で動きが乗るので、位置がずれません。
   ========================================================= */

/* ---------- animFadeUpCSS：.fade-in 下からふわっと ---------- */
.fade-in {
    opacity: 0;
    translate: 0 40px;
    transition:
        opacity 1s ease,
        translate 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in.is-show {
    opacity: 1;
    translate: 0 0;
}



/* ---------- animScrollArrowCSS：スクロール矢印（ループ） ---------- */
.js-scroll-arrow {
    animation: scrollArrow 1.8s ease-in-out infinite;
}

@keyframes scrollArrow {
    0% {
        opacity: 0;
        translate: 0 -15%;
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        translate: 0 30%;
    }
}


/* ---------- animHopInCSS：オブジェ 横からぴょこぴょこ登場 ----------
   --dir : -1 = 左から / 1 = 右から（JSが位置を見て自動でセット）
   動き：くるっと傾きながらジャンプで入ってくる → 着地でむぎゅっと潰れる
        → 勢いあまって小ジャンプ → ぷるんと揺れて止まる               */
.js-hop {
    --dir: -1;
    opacity: 0;
    translate: calc(var(--dir) * 160%) 0;
}

.js-hop.is-show {
    animation: hopIn 1.1s linear both;
    animation-delay: var(--delay, 0s);
}

@keyframes hopIn {
    0% {
        opacity: 0;
        translate: calc(var(--dir) * 160%) 0;
        rotate: calc(var(--dir) * -30deg);
        scale: 1;
        animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
    }

    15% {
        opacity: 1;
    }

    /* 1回目のジャンプ頂点 */
    32% {
        translate: calc(var(--dir) * 70%) -45%;
        rotate: calc(var(--dir) * 15deg);
        scale: 1;
        animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
    }

    /* 着地：むぎゅっ */
    50% {
        translate: calc(var(--dir) * 10%) 0;
        rotate: 0deg;
        scale: 1.25 0.75;
        animation-timing-function: cubic-bezier(0, 0, 0.4, 1);
    }

    /* 勢いあまって小ジャンプ（ちょっと行き過ぎる） */
    66% {
        translate: calc(var(--dir) * -8%) -18%;
        rotate: calc(var(--dir) * -8deg);
        scale: 0.92 1.1;
        animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
    }

    /* 2回目の着地 */
    80% {
        translate: 0 0;
        rotate: 0deg;
        scale: 1.12 0.88;
    }

    /* ぷるん */
    90% {
        scale: 0.96 1.04;
    }

    100% {
        opacity: 1;
        translate: 0 0;
        rotate: 0deg;
        scale: 1;
    }
}


/* ---------- animRiseUpCSS：obj07 専用 下からせり上がり ----------
   .fade-in との違い：ぼかしから焦点が合う＋少し縮んだ状態から
   ふわっと行き過ぎて戻る（バネ感）。時間も長めでゆったり。          */
.js-rise {
    opacity: 0;
    translate: 0 50%;
    scale: 0.85;
    filter: blur(10px);
}

.js-rise.is-show {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    filter: blur(0);
    transition:
        opacity 1.2s ease,
        filter 1.2s ease,
        translate 1.6s cubic-bezier(0.34, 1.56, 0.64, 1),
        scale 1.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ---------- 動きを減らす設定の端末では全部止める ---------- */
@media (prefers-reduced-motion: reduce) {

    .fade-in,
    .js-hop,
    .js-rise {
        opacity: 1;
        translate: 0 0;
        scale: 1;
        rotate: 0deg;
        filter: none;
        transition: none;
        animation: none !important;
    }

    .js-parallax {
        transform: none !important;
    }

    .js-scroll-arrow,
    .counter-digit.is-changed,
    .counter.is-closed .last-message {
        animation: none;
    }

    .nav,
    .nav a,
    .nav a::before,
    .section-nav::before,
    .btn-pos span {
        transition: none !important;
    }
}