/* ==========================================================================
   風水害BCP対策ソリューション LP  —  カスタムスタイル
   1. ベース
   2. スクロールアニメーション（reveal）
   3. 雨の背景（ヒーロー）
   4. ヒーロービジュアル（クラウドバックアップ画像／平行四辺形カット）
   5. パーツ（グラスモーフィズム／パララックス）
   ========================================================================== */

/* ---------- 1. ベース ---------- */
html { scroll-behavior: smooth; }

a { color: #0d4a5e; }
a:hover { color: #e08a2c; }


/* ---------- 2. スクロールアニメーション ---------- */
/* JS が有効なときだけ初期状態を隠す（スクロールできない環境でも必ず表示される） */
html.reveal-ready .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
html.reveal-ready .reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }


/* ---------- 3. 雨の背景 ---------- */
.rain-bg {
    background-color: #0b3b4c;
    position: relative;
}

/* 暗い雲のイメージ */
.rain-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at top right, rgba(13, 74, 94, 0.8), rgba(10, 25, 47, 0.95));
    z-index: 1;
}

/* 激しい雨のアニメーション */
.rain-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        /* 細かい雨 */
        url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><line x1="80" y1="-20" x2="40" y2="220" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>'),
        /* 少し太めの雨 */
        url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><line x1="160" y1="-20" x2="120" y2="220" stroke="rgba(255,255,255,0.2)" stroke-width="1.5"/></svg>'),
        /* さらに太い雨（線状降水帯のイメージ） */
        url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><line x1="30" y1="-20" x2="-10" y2="220" stroke="rgba(255,255,255,0.25)" stroke-width="2.5"/></svg>');
    background-size: 80px 80px, 150px 150px, 300px 300px;
    animation: heavyRainDrop 0.8s linear infinite;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes heavyRainDrop {
    0%   { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: -40px 80px, -75px 150px, -150px 300px; }
}


/* ---------- 4. ヒーロー背景の写真（平行四辺形カット） ---------- */

/* 雨の背景の上に、右側から斜めに写真を差し込む */
.hero-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58%;
    z-index: 3;                                   /* .rain-bg::after(雨) より前面 */
    clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 50%;
}

/* 左端をネイビーへ溶かし込み、見出しの可読性を確保 */
.hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, #0a192f 0%, rgba(10, 25, 47, 0.92) 26%, rgba(11, 59, 76, 0.55) 62%, rgba(11, 59, 76, 0.35) 100%),
        linear-gradient(to top, rgba(10, 25, 47, 0.55), rgba(10, 25, 47, 0));
}

/* カット部分に沿うアクセントライン */
.hero-photo::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 30%;
    z-index: 1;
    clip-path: polygon(86.6% 0, 88.4% 0, 1.8% 100%, 0 100%);
    background: rgba(224, 138, 44, 0.6);
}

@media (max-width: 1023px) {
    .hero-photo {
        width: 82%;
        opacity: 0.85;
    }
}

@media (max-width: 767px) {
    .hero-photo {
        width: 100%;
        clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%);
        opacity: 0.6;
    }
    .hero-photo::before { display: none; }
}


/* ---------- 5. パーツ ---------- */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.parallax-bg {
    background-image: url('https://images.unsplash.com/photo-1547683905-f686c993aae5?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 雨を止めて背景グラデーションのみ残す */
.rain-bg.no-rain::after { display: none; }

@media (prefers-reduced-motion: reduce) {
    .rain-bg::after { animation: none; }
    html.reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 6. SMP 埋め込みフォーム（LPのトーンに合わせた上書き） ----------
   実マークアップ：
   form > .ss_container > .ss_contents
     .ss_visitor_form > fieldset.ss_field  (.ss_form_title / .ss_grid > .ss_input)
     .ss_enquete_form > fieldset.ss_enquete_field (.ss_enquete_title / .ss_grid > .ss_input > table)
     .ss_btnArea > p > input[name="smpSubmit"]
   必須: .ss_user_notnull / エラー: .ss_warning_label .ss_error_msg
   ------------------------------------------------------------------ */
.smpForm,
.smpForm * { font-family: "Noto Sans JP", sans-serif !important; box-sizing: border-box; }
.smpForm { color: #1f2937; font-size: 15px; line-height: 1.7; }
.smpForm .ss_container,
.smpForm .ss_contents { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }

/* グレー枠（fieldset の既定スタイル）を解除 */
.smpForm fieldset,
.smpForm .ss_field,
.smpForm .ss_enquete_field {
    border: 0 !important; margin: 0 0 18px !important; padding: 0 !important;
    min-width: 0; background: transparent !important; box-shadow: none !important;
}

/* 項目名 */
.smpForm .ss_form_title,
.smpForm .ss_enquete_title {
    display: flex; align-items: center; gap: 8px;
    margin: 0 0 8px !important; padding: 0 !important; border: 0 !important; background: transparent !important;
    font-size: 14px !important; font-weight: 700 !important; color: #4b5563 !important;
}

/* 必須マーク（※ を「必須」バッジに置き換え） */
.smpForm .ss_user_notnull {
    display: inline-block; font-size: 0 !important; line-height: 1;
    padding: 4px 8px; border-radius: 4px; background: #e08a2c;
}
.smpForm .ss_user_notnull::before { content: "必須"; font-size: 11px; font-weight: 700; color: #fff; }

/* 入力エリア */
.smpForm .ss_grid { display: block; margin: 0 !important; padding: 0 !important; }
.smpForm .ss_input { margin: 0 !important; padding: 0 !important; }
.smpForm .ss_input > br { display: none; }
.smpForm #ss_name .ss_grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.smpForm .ss_upComment { font-size: 12px; color: #6b7280; margin: 0 0 4px; }
.smpForm .ss_rightComment { display: none; }

.smpForm input[type="text"],
.smpForm input[type="email"],
.smpForm input[type="tel"],
.smpForm select,
.smpForm textarea {
    display: block; width: 100% !important; max-width: none !important; height: auto !important;
    margin: 0 !important; font-size: 15px !important; line-height: 1.5 !important;
    padding: 12px 14px !important; border: 1px solid #e5e7eb !important; border-radius: 8px !important;
    background: #f9fafb !important; color: #1f2937 !important; box-shadow: none !important;
    transition: border-color .2s, background-color .2s;
}
.smpForm input:focus,
.smpForm select:focus,
.smpForm textarea:focus { outline: none !important; border-color: #e08a2c !important; background: #fff !important; }
.smpForm textarea { min-height: 110px; resize: vertical; }

/* チェックボックス */
.smpForm input[type="checkbox"],
.smpForm input[type="radio"] { width: 16px !important; height: 16px !important; margin: 0 10px 0 0 !important; vertical-align: -3px; accent-color: #e08a2c; cursor: pointer; }

/* 同意欄 */
.smpForm [id="ss_VisitorData.attribute1"] .ss_input {
    padding: 12px 14px !important; border: 1px solid #e5e7eb; border-radius: 8px; background: #f9fafb;
}

/* ご相談内容（table → 2列カード） */
.smpForm .ss_enquete_field .ss_input { width: 100% !important; }
.smpForm .ss_enquete_field table { display: block !important; width: 100% !important; max-width: none !important; border: 0 !important; margin: 0 !important; background: transparent !important; }
.smpForm .ss_enquete_field tbody { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.smpForm .ss_enquete_field tr { display: contents; }
.smpForm .ss_enquete_field td {
    display: flex; align-items: center; padding: 10px 14px !important;
    border: 1px solid #e5e7eb !important; border-radius: 8px; background: #f9fafb !important;
    font-size: 15px; color: #1f2937;
}

/* エラー表示（表示の切り替えはSMP側に任せ、色のみ調整） */
.smpForm .ss_warning_label { color: #dc2626 !important; font-weight: 700; margin-right: 4px; }
.smpForm .ss_error_msg { color: #dc2626 !important; font-size: 13px !important; }

/* 登録ボタン */
.smpForm .ss_btnArea { margin: 8px 0 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; text-align: center; }
.smpForm .ss_btnArea p { margin: 0 !important; }
.smpForm .ss_btnArea input[type="button"],
.smpForm input[name="smpSubmit"] {
    -webkit-appearance: none; appearance: none;
    display: block; width: 100% !important; height: auto !important;
    padding: 16px 24px !important; border: 0 !important; border-radius: 9999px !important;
    background: #e08a2c !important; background-image: none !important; color: #fff !important;
    font-size: 16px !important; font-weight: 700 !important; letter-spacing: .1em; text-shadow: none !important;
    box-shadow: 0 10px 20px -8px rgba(224, 138, 44, .6) !important; cursor: pointer;
    transition: background-color .2s, transform .2s;
}
.smpForm .ss_btnArea input[type="button"]:hover,
.smpForm input[name="smpSubmit"]:hover { background: #ea580c !important; transform: translateY(-2px); }
.smpForm .ss_btnArea input[type="button"]:focus-visible { outline: 3px solid rgba(224, 138, 44, .4); outline-offset: 3px; }

/* 送信中のローダー */
.smpForm .ss_submit_loader .spinner { border-top-color: #e08a2c !important; }

.smpForm a { color: #0d4a5e; text-decoration: underline; }
.smpForm a:hover { color: #e08a2c; }

@media (max-width: 640px) {
    .smpForm #ss_name .ss_grid,
    .smpForm .ss_enquete_field tbody { grid-template-columns: 1fr; }
}

/* ---- コンパクト化（1画面に収めるための調整） ---- */
.smpForm fieldset,
.smpForm .ss_field,
.smpForm .ss_enquete_field { margin-bottom: 12px !important; }
.smpForm .ss_form_title,
.smpForm .ss_enquete_title { margin-bottom: 6px !important; font-size: 13px !important; }
.smpForm input[type="text"],
.smpForm input[type="email"],
.smpForm input[type="tel"] { padding: 10px 12px !important; }
.smpForm textarea { min-height: 80px; padding: 10px 12px !important; }
.smpForm .ss_enquete_field td { padding: 10px 14px !important; font-size: 15px; }
.smpForm [id="ss_VisitorData.attribute1"] .ss_input { padding: 8px 12px !important; }

/* 例示ラベルは placeholder に移したため非表示（JSで付与） */
.smpForm .ss_upComment { display: none !important; }


/* 入力欄を少し細く・低く */
.smpForm input[type="text"],
.smpForm input[type="email"],
.smpForm input[type="tel"] { padding: 11px 14px !important; font-size: 15px !important; line-height: 1.5 !important; }
.smpForm textarea { padding: 11px 14px !important; font-size: 15px !important; min-height: 88px; }

/* 個人情報の取扱いへの同意：見出し・本文を他項目より小さく */
.smpForm [id="ss_VisitorData.attribute1"] .ss_form_title { font-size: 12px !important; color: #6b7280 !important; margin-bottom: 4px !important; }
.smpForm [id="ss_VisitorData.attribute1"] .ss_input { padding: 6px 10px !important; font-size: 13px; }
.smpForm [id="ss_VisitorData.attribute1"] input[type="checkbox"] { width: 14px !important; height: 14px !important; margin-right: 8px !important; }

/* フォームが描画されたら代替表示を隠す */
.smpForm:not(:empty) + .smp-fallback { display: none; }


/* ---------- 7. ページ内ナビ（ヒーロー通過後にヘッダー直下で固定） ---------- */
.subnav { transition: box-shadow .2s; }
.subnav__inner { transition: padding .2s; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav.is-stuck { box-shadow: 0 6px 16px -10px rgba(10, 25, 47, .35); }
.subnav.is-stuck .subnav__inner { padding-top: .5rem; padding-bottom: .5rem; }
.subnav.is-stuck .subnav__inner > * { padding-top: .45rem; padding-bottom: .45rem; }

/* トップページ：ヒーロー通過後に上からスライドして表示 */
.subnav.subnav--reveal { position: fixed; left: 0; right: 0; transform: translateY(-100%); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s, box-shadow .2s; }
.subnav.subnav--reveal.is-visible { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; transition: transform .3s ease, opacity .3s ease, visibility 0s, box-shadow .2s; }

/* サブナビ表示中はヘッダーを細くし、影を外してサブナビと一体に見せる */
#header > div { transition: padding .3s ease; }
#header.is-compact { box-shadow: none !important; border-bottom-color: transparent; }
#header.is-compact > div { padding-top: .6rem; padding-bottom: .6rem; }
.subnav.subnav--reveal { transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s, box-shadow .2s, top .3s ease; }
.subnav.subnav--reveal.is-visible { transition: transform .3s ease, opacity .3s ease, visibility 0s, box-shadow .2s, top .3s ease; }

/* ---------- 文字色を一段階濃く（全ページ共通） ---------- */
.text-gray-800 { color: #222222 !important; }
.text-gray-700 { color: #2b2b2b !important; }
.text-gray-600 { color: #333333 !important; }
.text-gray-500 { color: #4b5563 !important; }
.bg-white .text-gray-400, .bg-brand-light .text-gray-400 { color: #6b7280 !important; }
body { color: #222222; }
