/* ========================================
   CSS Reset
======================================== */
*,*::before,*::after{box-sizing:border-box}
body,h1,h2,h3,h4,p,figure,blockquote,dl,dd{margin:0}
ul[role="list"],ol[role="list"]{list-style:none}
html:focus-within{scroll-behavior:smooth}
body{min-height:100vh;text-rendering:optimizeSpeed;line-height:1.5}
a:not([class]){text-decoration-skip-ink:auto}
img,picture{max-width:100%;display:block}
input,button,textarea,select{font:inherit}
@media(prefers-reduced-motion:reduce){
    html:focus-within{scroll-behavior:auto}
    *,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}
}

/* ========================================
   基本設定
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    background-color: #fff;
    overflow-x: hidden;
    max-width: 100vw;
}

#wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ========================================
   セクション共通スタイル
======================================== */
section {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

section img {
    width: 100%;
    height: auto;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

/* 最初の画像だけpositionをrelativeに＆最初から表示 */
section img:first-child {
    position: relative;
    opacity: 1;
}

/* animateクラスがついたら表示 */
section img.animate {
    opacity: 1;
}

/* ========================================
   ファーストビュー
======================================== */

.fv {
    background-color: #fff;
}

/* ========================================
   problemセクション
======================================== */

.problem {
    background-color: #fff;
}

/* ========================================
   stepセクション
======================================== */

.step {
    background-color: #fff;
}

/* ========================================
   requirementsセクション
======================================== */

.requirements {
    background-color: #fff;
}

/* ========================================
   CTAセクション
======================================== */

.cta {
    background-color: #fff;
}


/* ========================================
   フッター
======================================== */

footer {
    width: 100%;
    max-width: 768px;
    margin: 0 auto;
    padding: 10px;
    text-align: center;
    background-color: #333;
    color: #fff;
    font-size: 12px;
}

/* ========================================
   pulseアニメーション（ボタン用）
======================================== */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
/* 共通ボタン */
.btn {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 100%;
    max-width: 768px;
}

.btn a {
    display: block;
    transition: transform 0.3s ease;
}

.btn a:hover img {
    opacity: 0.8;
}

.btn a:hover {
    transform: scale(1.05);
}

.btn img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 1 !important;
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   アニメーション定義
======================================== */

/* ハートビートアニメーション */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.05);
    }
    20%, 40% {
        transform: scale(0.98);
    }
}

/* バウンスアニメーション */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* ゴム伸縮アニメーション */
@keyframes rubberBand {
    0%, 100% {
        transform: scale(1, 1);
    }
    30% {
        transform: scale(1.25, 0.75);
    }
    40% {
        transform: scale(0.75, 1.25);
    }
    50% {
        transform: scale(1.15, 0.85);
    }
    65% {
        transform: scale(0.95, 1.05);
    }
    75% {
        transform: scale(1.05, 0.95);
    }
}

/* パッパッと点滅 */
@keyframes quickBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ========================================
   ファーストビューのアニメーション
======================================== */

/* fv_1 ハートビート（2番目の画像） */
.fv img:nth-of-type(2).animate {
    animation: heartbeat 1.5s ease-in-out forwards;
    animation-delay: 0.3s;
}

/* fv_2 バウンス（3番目の画像） */
.fv img:nth-of-type(3).animate {
    animation: bounce 1s ease-in-out forwards;
    animation-delay: 0.8s;
}

/* fv_3 ゴム伸縮（4番目の画像） */
.fv img:nth-of-type(4).animate {
    animation: rubberBand 0.8s ease-in-out forwards;
    animation-delay: 1.8s;
}

/* fv_4 2回点滅（5番目の画像） */
.fv img:nth-of-type(5).animate {
    animation: quickBlink 0.6s ease-in-out 2 forwards;
    animation-delay: 2.2s;
}

/* シンプルなフェードイン */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   problemセクションのアニメーション
======================================== */

/* pb_1、2、3は最初非表示 */
.problem img:nth-of-type(2),
.problem img:nth-of-type(3),
.problem img:nth-of-type(4) {
    opacity: 0;
}

/* pb_1、2、3を順番に表示 */
.problem img:nth-of-type(2).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

.problem img:nth-of-type(3).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.9s;
}

.problem img:nth-of-type(4).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1.5s;
}

/* くるくる回転しながらドン!と拡大（3回転版・修正） */
@keyframes spinDon {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(0.3);
    }
    70% {
        opacity: 1;
        transform: rotate(1080deg) scale(1.15);
    }
    85% {
        transform: rotate(1080deg) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: rotate(1080deg) scale(1); /* ←1080degを保持 */
    }
}

/* pb_4は最初非表示 */
.problem img:nth-of-type(5) {
    opacity: 0;
    z-index: 10;
}

/* pb_4 くるくるドン!（5番目の画像） */
.problem img:nth-of-type(5).animate {
    animation: spinDon 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-delay: 1.8s;
}
/* ========================================
   CTAセクションのアニメーション
======================================== */

/* cta_1 バウンス（2番目の画像） */
.cta img:nth-of-type(2).animate {
    animation: bounce 1s ease-in-out forwards;
    animation-delay: 0.3s;
}

/* cta_2 2回点滅（3番目の画像） */
.cta img:nth-of-type(3).animate {
    animation: quickBlink 0.6s ease-in-out 2 forwards;
    animation-delay: 1.0s;
}

/* cta_3、4は最初非表示 */
.cta img:nth-of-type(4),
.cta img:nth-of-type(5) {
    opacity: 0;
}

/* cta_3、4を順番に表示 */
.cta img:nth-of-type(4).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1.5s;
}

.cta img:nth-of-type(5).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1.9s;
}

/* ========================================
   stepセクションのアニメーション
======================================== */

/* step_1 バウンス（2番目の画像） */
.step img:nth-of-type(2).animate {
    animation: bounce 1s ease-in-out forwards;
    animation-delay: 0.3s;
}

/* step_2、3、4、5は最初非表示 */
.step img:nth-of-type(3),
.step img:nth-of-type(4),
.step img:nth-of-type(5),
.step img:nth-of-type(6) {
    opacity: 0;
}

/* step_2、3、4、5を順番に表示 */
.step img:nth-of-type(3).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.6s;
}

.step img:nth-of-type(4).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1.1s;
}

.step img:nth-of-type(5).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1.6s;
}

.step img:nth-of-type(6).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 2.1s;
}
/* ========================================
   requirementsセクションのアニメーション
======================================== */

/* req_1 バウンス（2番目の画像） */
.requirements img:nth-of-type(2).animate {
    animation: bounce 1s ease-in-out forwards;
    animation-delay: 0.3s;
}

/* req_2、3、4、5は最初非表示 */
.requirements img:nth-of-type(3),
.requirements img:nth-of-type(4),
.requirements img:nth-of-type(5),
.requirements img:nth-of-type(6) {
    opacity: 0;
}

/* req_2、3、4、5を0.5秒間隔で順番に表示 */
.requirements img:nth-of-type(3).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 0.5s;
}

.requirements img:nth-of-type(4).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1s;
}

.requirements img:nth-of-type(5).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 1.5s;
}

.requirements img:nth-of-type(6).animate {
    animation: fadeIn 0.8s ease-out forwards;
    animation-delay: 2s;
}

/* ========================================
   レスポンシブ対応
======================================== */

@media (max-width: 768px) {
    .btn {
        width: 100%;
        bottom: 0%;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        bottom: 0%;
    }
}