/**
 * FCプランニングオフィス - ヒーローセクション専用CSS
 * 
 * @package FCプランニングオフィス
 * @author 株式会社Hackusha - 大硲 神
 * @version 1.0.1
 */

/* ==========================================================================
   ヒーローセクション - メインCSS
   ========================================================================== */

/* ==========================================================================
   ヒーローセクション - ベースレイアウト
   ========================================================================== */

.hero-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    /* 共通設定: ベース色とブレンドモード */
    background-color: rgba(59,63,60,0.5);
    background-image: url('../images/fv-bg@05x.webp'); /* デフォルト: モバイル用軽量版 */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 1; /* serviceセクションより下に配置 */
}

/* タブレット・デスクトップ: 標準版 */
@media (min-width: 769px) {
    .hero-section {
        background-image: url('../images/fv-bg.webp');
    }
}

/* 高解像度ディスプレイ: 2倍解像度版 */
@media (min-width: 769px) and (-webkit-min-device-pixel-ratio: 2),
       (min-width: 769px) and (min-resolution: 192dpi),
       (min-width: 769px) and (min-resolution: 2dppx) {
    .hero-section {
        background-image: url('../images/fv-bg@2x.webp');
    }
}

/* モバイル高解像度ディスプレイ用（必要に応じて） */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2),
       (max-width: 768px) and (min-resolution: 192dpi),
       (max-width: 768px) and (min-resolution: 2dppx) {
    .hero-section {
        background-image: url('../images/fv-bg.webp');
    }
}

.first-view {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-main {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* fv-bg.webp用のplaceholder */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8) 0%, rgba(45, 45, 45, 0.8) 100%);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.3s ease;
}

/* 画像が読み込めない場合のfallback */
.hero-section:not([style*="background-image"])::after {
    opacity: 1;
}

/* ==========================================================================
   レコード盤とライトエフェクト
   ========================================================================== */

.hero-vinyl-container {
    position: absolute;
    left: 50%;
    top: 35%;
    transform: translate(-50%, -50%);
    z-index: 1;  /* テキストの下になるように */
    opacity: 1;  /* 確実に表示 */
}

.vinyl-record {
    position: relative;
    width: clamp(350px, 200vw, 1200px);
    height: clamp(350px, 200vw, 1200px);
    opacity: 1;  /* 確実に表示 */
    border-radius: 50%;  /* 円形にクリップ */
    overflow: hidden;    /* はみ出し部分を隠す */
}

/* PCサイズ（768px以上）で大きなレコード盤 */
@media (min-width: 768px) {
    .vinyl-record {
        width: 120vw;
        height: 120vw;
    }
}

.vinyl-image {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* containからcoverに変更で円形に完全フィット */
    filter: sepia(0.2) contrast(1.1) saturate(0.9);
    border-radius: 50%; /* SVG画像も円形に */
}

/* Placeholder for missing vinyl image */
.vinyl-record::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #1a1a1a 30%, #333 100%);
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
}

.vinyl-record img[src*="vinyle-record.svg"]:not([src$=".svg"]):after,
.vinyl-record img[alt="Vinyl Record"]:not([src]) + ::after {
    opacity: 1;
}

.light-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(350px, 45vw, 600px);  /* レコード盤と同じサイズ */
    height: clamp(350px, 45vw, 600px);
    z-index: 1;
}

.light-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: blur(20px);
    opacity: 0.6;
}

/* PCサイズ（768px以上）でライトエフェクトもレコード盤に合わせて拡大 */
@media (min-width: 768px) {
    .light-effect {
        width: 120vw;
        height: 120vw;
    }
}

/* ==========================================================================
   メインコンテンツエリア
   ========================================================================== */

.hero-content {
    position: absolute;
    z-index: 3;
    opacity: 0;

    /* PC用レイアウト */
    @media (min-width: 769px) {
        right: 2%;
        bottom: 10px;
        width: clamp(320px, 50vw, 1600px);
    }

    /* モバイル用レイアウト */
    @media (max-width: 768px) {
        left: 5%;
        top: 40%;
        width: 90%;
        text-align: left;
    }
}

.hero-text {
    color: var(--color-white);
}

/* ==========================================================================
   メイン見出し
   ========================================================================== */

.hero-heading-container {
    position: relative;
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-white);  /* 下線を追加 */
    padding-bottom: var(--spacing-md);  /* 下線とタイトルの間に余白 */
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 10rem);   /* FC PLANNICがボックス幅100%近くを使用 */
    font-weight: normal;
    line-height: 1.2;  /* 120% */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-white);
    width: 100%;  /* ボックス幅をフル活用 */
    overflow: visible;  /* 文字の描画領域を確保 */
    word-break: keep-all;  /* 単語の分割を防ぐ */
}

.title-line {
    display: block;
}

.hero-cotton-icon {
    position: absolute;
    right: 0;      /* h1タイトルの余白に埋まるように */
    top: 65%;      /* h1タイトルの下部に配置 */
    transform: translateY(-50%);
    width: clamp(120px, 15vw, 450px);
    height: clamp(120px, 15vw, 450px);
}

.cotton-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================================================
   ボディコピー
   ========================================================================== */

.hero-description {
    margin-bottom: var(--spacing-lg);
}

.hero-text-content {
    font-family: var(--font-heading);  /* righteous */
    font-size: var(--font-hero-body);  /* 16px@1440px */
    line-height: 2;  /* 200% */
    margin: 0;
    opacity: 0.9;
}

.hero-accent {
    color: var(--color-accent);  /* グリーン色でアクセント */
    font-weight: var(--font-weight-bold);
}

/* ==========================================================================
   スクロールダウンアニメーション
   ========================================================================== */

.hero-scroll-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.hero-scroll-down:hover {
    opacity: 0.7;
}

.scroll-line {
    position: relative;
    width: 1px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
    border-radius: 3px;
}

.scroll-indicator {
    position: absolute;
    width: 10px;
    height: 20px;
    background-color: var(--color-white);
    border-radius: 3px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0% {
        top: 10px;
        opacity: 1;
    }
    50% {
        top: 20px;
        opacity: 0.7;
    }
    100% {
        top: 30px;
        opacity: 1;
    }
}

.scroll-text {
    font-family: var(--font-heading);  /* righteous */
    font-size: var(--font-hero-scroll);  /* 12px@1440px */
    font-weight: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}



/* ==========================================================================
   自己紹介セクション
   ========================================================================== */

.hero-intro-section {
    position: relative;
    width: 100%;
    padding: var(--spacing-xl) 0;
    margin-bottom: 40vh;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.8s ease, transform 0.8s ease;
    flex-shrink: 0;
    display: flex;                           /* フレックスコンテナに */
    justify-content: flex-end;               /* 右寄せ配置 */
    align-items: flex-start;                 /* 上揃え */
    padding-right: 2%;                       /* hero-contentと同じ右余白 */
}

.intro-container {
    width: clamp(320px, 50vw, 1600px);       /* hero-contentと同じ幅、大画面対応 */
    padding: 0;                              /* 余分なpaddingを削除 */
    text-align: left;                        /* hero-contentに合わせて左揃え */
    color: var(--color-white);
}

.intro-title {
    font-family: var(--font-heading);  /* righteous */
    font-size: var(--font-intro-title);  /* 70px@1440px */
    font-weight: normal;
    line-height: 1.3;  /* 130% */
    margin-bottom: var(--spacing-md);
    color: var(--color-main);  /* オレンジ色でアクセント */
    font-style: normal;
}

.intro-content {
    max-width: 50vw;
    margin: 0 auto;
}

.intro-text {
    font-family: var(--font-japanese);  /* noto sans jp */
    font-size: var(--font-intro-body);  /* 16px@1440px */
    font-weight: var(--font-weight-bold);  /* bold */
    line-height: 2;  /* 200% */
    margin: 0;
    opacity: 0.9;
}

/* ==========================================================================
   アニメーション用のクラス
   ========================================================================== */

.vinyl-moved {
    transform: translate(-80%, -50%) !important;
}

.vinyl-rotating {
    animation: vinylRotate 8s linear infinite;
}

@keyframes vinylRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* コンテンツフェードイン */
.hero-content.fade-in {
    opacity: 1;
    transition: opacity 1s ease 2.5s;
}

/* fade-inクラスは不要（ScrollTriggerで制御） */

/* ==========================================================================
   レスポンシブ対応（clamp()ベースで最小限）
   ========================================================================== */

/* 極小画面での調整 */
@media (max-width: 480px) {
    .hero-content {
        top: auto; /* モバイルでの位置を微調整 */
        bottom: 5%;
    }
    
    .hero-intro-section {
        padding: var(--spacing-lg) var(--spacing-lg);
    }
    
    .intro-container {
        width: calc(100vw - var(--spacing-md)); /* hero-contentのモバイル設定と同じ */
    }
    
    .hero-cotton-icon {
        display: none; /* 小画面では非表示 */
    }
    
    .vinyl-moved {
        /* GSAPで直接制御するため、このクラスは不要になる可能性 */
    }

    .intro-content {
        max-width: 100%;
        text-align: justify;
    }
}
@media (min-width: 769px) {
    .first-view {
        min-height: 768px;
    }
}
@media (min-width: 1500px) and (max-height: 860px) {
    .first-view {
        min-height: 860px;
    }
}
@media (min-width: 1700px) and (max-height: 930px) {
    .first-view {
        min-height: 930px;
    }
}
@media (min-width: 1900px) and (max-height: 1000px) {
    .first-view {
        min-height: 1000px;
    }
}
@media (min-width: 2100px) and (max-height: 1100px) {
    .first-view {
        min-height: 1100px;
    }
}
/* 極大画面での調整は clamp() で自動対応済み */