/* 西川瑞扇舞踊教室 デザイン・システム */

/* 0. グローバルフォント設定 */
h1, h2, h3, h4 {
    font-family: 'Noto Sans JP', sans-serif !important;
}

.en-font {
    font-family: 'Cormorant Garamond', serif !important;
    font-style: italic;
    font-weight: 500;
}

/* 1. リセット & ベース */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-size: 16px;
    /* 右クリック・テキストコピー制限が有効化されました */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* SPサイズ時の本文フォントサイズ調整（16pxから14pxへ） */
@media (max-width: 768px) {
    body, p, li, .text-base {
        font-size: 14px !important;
    }
}

/* Scroll Top Button Visibility */
#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-10px);
}

/* Mobile Menu Transition */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* 画像の扱い共通 */
img {
    vertical-align: bottom;
    object-fit: cover;
}

/* 本文タイトル（About, Service, Recommend などの見出しカード内）のカラー統一 */
h3:not(.signature-title):not(.section-title):not(.text-accent) {
    color: #6F4E37 !important; /* Elegant Bitter Brown */
}

/* カード内の見出しをビターブラウンに指定 */
#menu h3 {
    color: #6F4E37 !important;
}

/* 枠線描画アニメーション (Draw Border Frame) */
.frame-draw-container {
    position: relative;
    padding: 16px 20px;
    display: block;
    text-align: inherit;
    background: transparent;
    overflow: hidden;
}

.frame-draw-container::before,
.frame-draw-container::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 1px solid transparent;
    box-sizing: border-box;
}

/* 左上からスタート */
.frame-draw-container::before {
    top: 0;
    left: 0;
}

/* 右下からスタート */
.frame-draw-container::after {
    bottom: 0;
    right: 0;
}

/* スクロールイン (is-visible) 時のアニメーション発火（左側縦線と上下横線） */
.is-visible .frame-draw-container::before {
    width: 10%;
    height: 30%;
    border-top-color: #9a2e2e;
    border-left-color: #9a2e2e;
    transition: width 0.3s ease, height 0.3s ease 0.3s;
}

.is-visible .frame-draw-container::after {
    width: 90%;
    border-bottom-color: #9a2e2e;
    transition: width 0.6s ease 0.3s;
}

/* POINT 01〜03用（ブラウン枠・線） */
.is-visible .frame-draw-white::before {
    border-top-color: #6F4E37 !important;
    border-left-color: #6F4E37 !important;
}
.is-visible .frame-draw-white::after {
    border-bottom-color: #6F4E37 !important;
    border-right-color: #6F4E37 !important;
}

/* Slideshow Styles */
.fv-slideshow-container {
    position: relative;
}
.fv-slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}
.fv-slide-img.active {
    opacity: 1;
    z-index: 2;
}

/* -----------------------------------------
   index.html から移行した有効なスタイル
-------------------------------------------- */

/* SPサイズ時のヘッダー縦幅固定調整 (50px) */
@media (max-width: 768px) {
    #main-header,
    #main-header.h-20,
    #main-header.h-16 {
        height: 50px !important;
    }

    #main-header > div {
        height: 100% !important;
    }
}

/* CTAセクション 左右 of light overlay animations */
.cta-komorebi-beam-left {
    opacity: 0;
    transform: translate(-70px, -70px) scaleY(0.6) scaleX(0.8);
    transform-origin: top left;
    transition: transform 2.0s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.8s ease;
}

.cta-komorebi-beam-left.is-visible {
    opacity: 0.95;
    transform: translate(0, 0) scaleY(1) scaleX(1);
}

.cta-komorebi-beam-right {
    opacity: 0;
    transform: translate(70px, -70px) scaleY(0.6) scaleX(0.8);
    transform-origin: top right;
    transition: transform 2.0s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.8s ease;
}

.cta-komorebi-beam-right.is-visible {
    opacity: 0.95;
    transform: translate(0, 0) scaleY(1) scaleX(1);
}

/* ページロード時のスマートなFVアニメーション */
@keyframes fv-grid-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fv-item-slide-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.fv-grid-animate {
    animation: fv-grid-fade 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fv-item-animate-1 {
    opacity: 0;
    animation: fv-item-slide-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s;
}

.fv-item-animate-2 {
    opacity: 0;
    animation: fv-item-slide-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
}

.fv-item-animate-3 {
    opacity: 0;
    animation: fv-item-slide-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.65s;
}

.fv-item-animate-4 {
    opacity: 0;
    animation: fv-item-slide-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.9s;
}

/* サービスセクション 左右からのスライドインアニメーション */
html body .service-slide-in-left {
    opacity: 0 !important;
    transform: translateX(-80px) !important;
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: opacity, transform;
}

html body .service-slide-in-left.is-visible {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

html body .service-slide-in-right {
    opacity: 0 !important;
    transform: translateX(80px) !important;
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: 0.15s !important;
    will-change: opacity, transform;
}

html body .service-slide-in-right.is-visible {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* 見出し用のスマートなフェードアップ */
html body .scroll-trigger {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1), transform 1.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: opacity, transform;
}

html body .scroll-trigger.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* モバイル実機対応の固定背景（パララックス） */
.parallax-fixed-bg {
    position: relative;
    clip-path: inset(0);
    z-index: 1;
}

.parallax-fixed-bg::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--parallax-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
}

/* 家の線画アニメーション（SVG Line Drawing） */
@keyframes draw-house-path {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.house-line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-house-path 2.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.25s;
}

.house-line-delayed {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-house-path 2.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.8s;
}

/* スクロール時のグループ内時間差フェードイン定義（無料体験レッスン等で使用） */
.animate-group .animate-child-1 {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition-property: opacity, transform !important;
    transition-duration: 1.8s !important;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    will-change: opacity, transform;
}
.animate-group.is-visible .animate-child-1 {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.animate-group .animate-child-2 {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition-property: opacity, transform !important;
    transition-duration: 1.8s !important;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-delay: 300ms !important;
    will-change: opacity, transform;
}
.animate-group.is-visible .animate-child-2 {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

