/**
 * Sumapeta LP メインスタイルシート
 *
 * TSXコンポーネントから変換したスタイルをここに記述
 */

/* ===================================
   Google Fonts (API経由でサブセット化)
   header.php の <link> タグで読み込み
   ローカルTTF版（10MB超）から切り替え済み
   =================================== */


/* ===================================
   ベースリセット・変数
   =================================== */
:root {
    /* プライマリカラー */
    --color-primary: #E55D48;
    --color-primary-safe: #CE503C;
    --color-primary-dark: #c94a38;

    /* テキストカラー */
    --color-text: #1e293b;
    --color-text-muted: #64748b;

    /* 背景カラー */
    --color-bg: #ffffff;
    --color-bg-gray: #f8fafc;

    /* その他 */
    --font-english: 'Inter', sans-serif;
    --font-japanese: 'Noto Sans JP', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-japanese);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   仮スタイル（開発中）
   =================================== */
.site-header {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--color-primary);
    text-decoration: none;
}

.site-footer {
    padding: 40px 20px;
    background: var(--color-primary);
    color: #fff;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* CLS Prevention: Reserve height for hero section */
#hero {
    min-height: 40em;
    /* モバイル基準 */
    contain-intrinsic-size: auto 40em;
}

@media (min-width: 1024px) {
    #hero {
        min-height: min(100vh, 60em);
        contain-intrinsic-size: auto min(100vh, 60em);
    }
}

/* ===================================
   カスタム装飾（index.html から移植）
   =================================== */

/* Grainy Mesh Gradient */
.bg-grainy-mesh {
    background-color: #fdfbf7;
    background-image:
        radial-gradient(at 10% 10%, rgba(229, 93, 72, 0.08) 0px, transparent 50%),
        radial-gradient(at 90% 0%, rgba(84, 185, 197, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(253, 251, 247, 1) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(206, 77, 113, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 90%, rgba(0, 120, 140, 0.05) 0px, transparent 50%);
}

/* Noise Texture Overlay */
.bg-noise {
    position: relative;
}

.bg-noise::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 0;
    /* CLS Prevention: prevent pseudo-element from affecting layout */
    contain: strict;
}

/* Marker Animation */
.text-marker {
    background: linear-gradient(transparent 60%, rgba(229, 93, 72, 0.3) 60%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    transition: background-size 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0.6s;
    /* Wait for fade in */
}

[data-visible="true"] .text-marker {
    background-size: 100% 100%;
}

/* Diagonal rounded corners */
.rounded-diagonal {
    border-radius: 30px 0 30px 0;
}

/* Hover Fan Effect for Use Cases */
.fan-hover {
    clip-path: circle(0% at 100% 0%);
    transition: clip-path 0.4s ease-in-out;
}

.group:hover .fan-hover {
    clip-path: circle(140% at 100% 0%);
}

/* ===================================
   スクロールアニメーション初期状態
   =================================== */
[data-fade-in] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-fade-in][data-direction="up"] {
    transform: translateY(30px);
}

[data-fade-in][data-direction="down"] {
    transform: translateY(-30px);
}

[data-fade-in][data-direction="left"] {
    transform: translateX(30px);
}

[data-fade-in][data-direction="right"] {
    transform: translateX(-30px);
}

[data-fade-in][data-visible="true"] {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===================================
   シミュレーター用アニメーション
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

/* Chrome, Safari, Edge, Opera - 常にスクロールバーを表示（React版の挙動再現） */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* スクロールバーを完全に非表示にする */
.scrollbar-hide {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* モバイル用ボタン出現アニメーション */
@media (max-width: 767px) {
    .usecase-card .fan-button {
        transform: translateX(100%) translateY(-100%);
        transition: transform 0.3s ease-out;
    }

    .usecase-card.is-active .fan-button {
        transform: translateX(0) translateY(0);
    }
}

/* Benefit画像バウンドアニメーション（1回だけ） */
@keyframes bounce-once {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* ===================================
   本文エリア 行間調整（单記事ページ）
   prose クラスや WordPress ブロックCSS との競合対策
   =================================== */

/* Voice詳細ページ・Column詳細ページの本文 */
body.single-voice .prose p,
body.single-voice .prose li,
body.single-column .prose p,
body.single-column .prose li,
body.single-voice .entry-content p,
body.single-voice .entry-content li,
body.single-column .entry-content p,
body.single-column .entry-content li,
body.single-voice article p,
body.single-voice article li,
body.single-column article p,
body.single-column article li,
body.single-voice main p,
body.single-voice main li,
body.single-column main p,
body.single-column main li {
    line-height: 2 !important;
}

/* ===================================
   太字（b / strong）：オレンジマーカー風ハイライト
   記事詳細ページのブロックエディタ本文に適用
   =================================== */

body.single-voice .prose b,
body.single-voice .prose strong,
body.single-column .prose b,
body.single-column .prose strong,
body.single-voice main b,
body.single-voice main strong,
body.single-column main b,
body.single-column main strong {
    background: linear-gradient(transparent 55%, rgba(229, 93, 72, 0.18) 55%);
    font-weight: 700;
    padding: 0 0.1em;
}

/* 見出し内の太字にはマーカーを適用しない */
body.single-voice .prose :is(h1, h2, h3, h4, h5, h6) b,
body.single-voice .prose :is(h1, h2, h3, h4, h5, h6) strong,
body.single-column .prose :is(h1, h2, h3, h4, h5, h6) b,
body.single-column .prose :is(h1, h2, h3, h4, h5, h6) strong {
    background: none;
    padding: 0;
}

/* ===================================
   FAQページ: ブロックエディタ「詳細」ブロック スタイル
   WordPress の wp-block-details をアコーディオンUIに変換
   =================================== */

/* コンテナの間隔 */
.faq-content>.wp-block-details {
    margin-bottom: 1rem;
}

/* 各FAQカード */
.faq-content details.wp-block-details {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 1.5rem;
    border: none;
}

/* 質問部分（summary） */
.faq-content details.wp-block-details>summary {
    display: flex;
    align-items: flex-start;
    font-weight: 700;
    font-size: 1.125rem;
    color: #1e293b;
    cursor: pointer;
    list-style: none;
    gap: 1rem;
}

/* Q. マーカー（オレンジ） */
.faq-content details.wp-block-details>summary::before {
    content: 'Q.';
    flex-shrink: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #CE503C;
    line-height: 1.4;
}

/* Safariのデフォルト三角形を消す */
.faq-content details.wp-block-details>summary::-webkit-details-marker {
    display: none;
}

/* 開閉矢印を疑似要素で追加 */
.faq-content details.wp-block-details>summary::after {
    content: '';
    flex-shrink: 0;
    margin-left: auto;
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' height='24' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.faq-content details.wp-block-details[open]>summary::after {
    transform: rotate(180deg);
}

/* 回答部分 */
.faq-content details.wp-block-details>*:not(summary) {
    color: #475569;
    line-height: 1.75;
    margin-top: 1rem;
    padding-top: 0;
    padding-left: 2.25rem;
    position: relative;
}

/* A. マーカー（ダークグレー） */
.faq-content details.wp-block-details>*:not(summary):first-of-type::before {
    content: 'A.';
    position: absolute;
    left: 0;
    top: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* 回答の段落間隔 */
.faq-content details.wp-block-details p {
    margin-bottom: 0.5rem;
}

.faq-content details.wp-block-details p:last-child {
    margin-bottom: 0;
}