/*
Theme Name: SINGULIER
Author: 株式会社SINGULIER
Copyright: 株式会社SINGULIER
Description: 株式会社SINGULIERの公式WEBサイト用オリジナルテーマです。
Version: 1.0
*/

/* --- 共通スタイル --- */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f8f8f8;
    color: #333333;
    overflow-x: hidden;
}

h1, h2, h3, .font-serif {
    font-family: 'Noto Serif JP', serif;
}

.gold-text {
    color: #D4AF37;
}

.gold-border {
    border-color: #D4AF37;
}

.bg-black-custom {
    background-color: #1a1a1a;
}

.bg-deep-black {
    background-color: #111111;
}

.bg-white-custom {
    background-color: #FFFFFF;
}

.bg-gray-custom {
    background-color: #f8f8f8;
}

/* --- アニメーション --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- ヘッダー --- */
header.site-header {
    /* ヘッダーの共通スタイルがあればここに記述 */
}

/* --- フッター --- */
footer.site-footer {
    /* フッターの共通スタイルがあればここに記述 */
}

/* --- スクロールダウンアイコン --- */
#scroll-indicator {
    transition: opacity 0.4s ease-out;
}
#scroll-wheel {
    width: 4px;
    height: 8px;
    background-color: white;
    border-radius: 2px;
    animation: scroll-animation 2.2s infinite;
}
@keyframes scroll-animation {
    0% { opacity: 1; transform: translateY(0); }
    50% { transform: translateY(20px); }
    100% { opacity: 0; transform: translateY(20px); }
}

/* --- ページごとの固有スタイル --- */

/* ▼ トップページ (page-top.php) ▼ */
.page-template-page-top body {
    background-color: #111111;
    color: #ffffff;
}

.page-template-page-top h1,
.page-template-page-top h2 {
    color: #FFFFFF !important;
}

.page-template-page-top .bg-white-custom h2,
.page-template-page-top .bg-white-custom h3:not(.gold-text) {
    color: #1f2937 !important; /* text-gray-800 */
}


.page-template-page-top .hero-section {
    animation: slow-pulse 8s infinite ease-in-out;
}
@keyframes slow-pulse {
    0% { background-color: #111111; }
    50% { background-color: #1a1a1a; }
    100% { background-color: #111111; }
}

.page-template-page-top .pillars-section-container {
    padding-top: 8rem;
    padding-bottom: 8rem;
}
.page-template-page-top .pillars-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 0.9;
    margin: auto;
}
.page-template-page-top .pillar-group {
    position: absolute;
    width: 66.66%;
    height: 66.66%;
}
.page-template-page-top .pillar-circle-new {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid #ccc;
    border-radius: 50%;
    transition: all 0.4s ease;
    display: flex;
}
.page-template-page-top .group:hover .pillar-circle-new {
    border-color: #D4AF37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}
.page-template-page-top .pillar-description-outside {
    position: absolute;
    width: 300px;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #6b7280;
    transition: color 0.4s ease, transform 0.4s ease;
    transform: translateY(0);
}
.page-template-page-top .group:hover .pillar-description-outside {
    color: #1f2937;
    transform: translateY(-15px);
}
.page-template-page-top #pillar1-group { top: -15%; left: 50%; transform: translateX(-50%); }
.page-template-page-top #pillar2-group { bottom: 0; left: -10%; }
.page-template-page-top #pillar3-group { bottom: 0; right: -10%; }

.page-template-page-top #pillar1-group .pillar-description-outside {
    bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 1rem; text-align: left;
}
.page-template-page-top #pillar1-group:hover .pillar-description-outside {
    transform: translateX(-50%) translateY(-15px);
}
.page-template-page-top #pillar2-group .pillar-description-outside {
    top: 100%; left: 0; margin-top: 1rem; text-align: left;
}
.page-template-page-top #pillar3-group .pillar-description-outside {
    top: 100%; right: 0; margin-top: 1rem; text-align: left;
}
.page-template-page-top .pillar-content { width: 100%; }
.page-template-page-top #pillar1-group .pillar-circle-new { align-items: flex-start; justify-content: center; }
.page-template-page-top #pillar1-group .pillar-content { padding-top: 25%; text-align: center; }
.page-template-page-top #pillar2-group .pillar-circle-new { align-items: flex-end; justify-content: flex-start; }
.page-template-page-top #pillar2-group .pillar-content { padding-left: 15%; padding-bottom: 25%; text-align: left; }
.page-template-page-top #pillar3-group .pillar-circle-new { align-items: flex-end; justify-content: flex-end; }
.page-template-page-top #pillar3-group .pillar-content { padding-right: 15%; padding-bottom: 25%; text-align: right; }

/* ▼ 企業理念ページ (page-philosophy.php) ▼ */
.page-template-page-philosophy .bg-black-philosophy {
    background-color: #000000;
}
.page-template-page-philosophy .divider,
.page-template-page-company .divider {
    height: 2px;
    width: 80px;
    background-color: #D4AF37;
    margin: 2rem auto;
}
.page-template-page-philosophy .heading-with-drop-cap {
    display: flex;
    justify-content: center; /* PCでは中央揃え */
    align-items: center;
    gap: 0.5rem;
}
.page-template-page-philosophy .large-first-letter {
    font-size: 6rem;
    line-height: 1;
    font-weight: 600;
    color: #D4AF37;
    font-family: 'Noto Serif JP', serif;
}
.page-template-page-philosophy .heading-text-block {
    text-align: left;
}

/* ▼ 会社概要ページ (page-company.php) ▼ */
/* .divider は企業理念ページと共通 */


/* ▼ お問い合わせページ (page-contact.php) - MW WP Form スタイル上書き ▼ */
#singulier-contact-form #company_name,
#singulier-contact-form #company_url,
#singulier-contact-form #contact_name,
#singulier-contact-form #email,
#singulier-contact-form #inquiry {
    background-color: #f8f8f8 !important;
    border: 1px solid #cccccc !important;
    border-radius: 0.375rem !important;
    width: 100% !important;
    padding: 0.75rem !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease-in-out !important;
}
#singulier-contact-form #company_name:focus,
#singulier-contact-form #company_url:focus,
#singulier-contact-form #contact_name:focus,
#singulier-contact-form #email:focus,
#singulier-contact-form #inquiry:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3) !important;
    outline: none !important;
}
#singulier-contact-form .form-checkbox-lg {
    width: 1.25rem;
    height: 1.25rem;
    color: #D4AF37;
    vertical-align: bottom;
}
#singulier-contact-form .form-checkbox-lg:focus {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
    box-shadow: none;
}

/* --- レスポンシブ用ヘルパークラス --- */
/* PCで非表示 (768px以上で非表示) */
@media (min-width: 768px) {
    .pc-none {
        display: none !important;
    }
}

/* スマートフォンで非表示 (767px以下で非表示) */
@media (max-width: 767px) {
    .sp-none {
        display: none !important;
    }
}

/* スマホ用説明文アニメーション */
@keyframes glow-and-zoom-in {
    0% {
        opacity: 0;
        transform: translateY(15px);
        font-size: 0.85rem; /* 開始時のサイズ */
        text-shadow: none;
    }
    50% {
        text-shadow: 0 0 15px rgba(212, 175, 55, 0.7);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
        font-size: 0.95rem; /* 控えめなズーム */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        font-size: 0.9rem; /* 最終的なサイズ */
        text-shadow: none;
    }
}


/* --- レスポンシブデザイン --- */

/* ▼ タブレット表示 (1024px以下) ▼ */
@media (max-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    /* --- トップページ：見出しの改行を許可 --- */
    .page-template-page-top h2,
    .page-template-page-top h3 {
        white-space: normal !important;
    }
}


/* ▼ スマートフォン表示 (767px以下) ▼ */
@media (max-width: 767px) {
    /* --- 全般的なタイポグラフィと余白の調整 --- */
    h1 { font-size: 2rem; /* 32px */ }
    h2 { font-size: 1.75rem; /* 28px */ }
    h3 { font-size: 1.25rem; /* 20px */ }
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* ★★★ 修正点1: ページタイトルセクションの修正 (v4) ★★★ */
    /* 1a: 背景の横幅ズレを修正 */
    main > section[class*="bg-"] {
        position: relative;
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        box-sizing: border-box;
    }
    /* 1b: ヘッダーとの重なりを解消 */
    body:not(.page-template-page-top) main > section:first-of-type {
        padding-top: 8rem !important; /* ヘッダーとの重なりを防ぐため、十分な余白を確保 */
    }
    /* ★★★ ここまで ★★★ */


    /* --- トップページ：ヒーローセクション --- */
    .page-template-page-top #hero {
        height: 100vh; /* 画面の高さに固定 */
        min-height: 600px;
        display: flex;
        flex-direction: column;
    }
    .page-template-page-top #hero > .relative {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* 上下のブロックを分離 */
        padding-top: 10vh; /* 上からの余白を確保 */
        padding-bottom: 5vh; /* 下からの余白を確保 */
    }
    .page-template-page-top #hero > .relative > .fade-in-section {
        padding-top: 0; /* リセット */
    }
    .page-template-page-top #hero h1 {
        font-size: 2rem; /* 32px */
        white-space: nowrap;
        margin-bottom: 1.5rem;
    }
    .page-template-page-top #hero img {
        max-width: 150px !important;
    }
    .page-template-page-top #hero .absolute.bottom-5 {
        position: static; /* flexレイアウトに参加させる */
        padding-bottom: 0; /* リセット */
    }
    .page-template-page-top #hero .absolute.bottom-5 p {
        font-size: 0.75rem; /* 12px */
        line-height: 1.6;
    }
    .page-template-page-top #hero .absolute.bottom-5 p .block {
        font-size: 0.875rem; /* 14px */
    }
    
    /* --- トップページ：問題提起セクション --- */
    .page-template-page-top h2,
    .page-template-page-top h3 {
        white-space: normal !important;
    }
    .page-template-page-top .bg-white-custom h2[class*="mb-"] {
        margin-bottom: 1.5rem !important;
    }

    /* --- トップページ：タイムライン --- */
    .page-template-page-top .w-full.bg-gray-800 {
        padding: 2rem 1rem;
    }
    .page-template-page-top .w-full.bg-gray-800 .relative.w-full.h-1,
    .page-template-page-top .w-full.bg-gray-800 .space-y-8 {
        display: none; /* PC用の横線と元のバーは非表示 */
    }
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row {
        margin: 0 auto !important;
        display: block;
        position: relative;
    }
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row::before {
        content: '';
        position: absolute;
        left: 1.5rem;
        top: 1.5rem;
        bottom: 1.5rem;
        width: 2px;
        background-color: #4b5563; /* gray-600 */
    }
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row p {
        position: relative;
        text-align: left;
        padding: 2.5rem 0 2.5rem 3rem;
        min-height: 110px;
        display: flex;
        align-items: center;
    }
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row p::before {
        content: '';
        position: absolute;
        left: 1.5rem;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 14px;
        height: 14px;
        background-color: #1a1a1a;
        border: 2px solid #9ca3af;
        border-radius: 50%;
        z-index: 1;
    }

    /* 吹き出し */
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row p:nth-child(2)::after,
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row p:nth-child(3)::after {
        position: absolute;
        left: 4.5rem;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        width: calc(100% - 5.5rem);
        line-height: 1.5;
        white-space: pre-wrap;
        color: white;
        text-align: left;
        font-size: 0.8rem;
        z-index: 2;
    }
    .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row p:nth-child(2)::after {
        content: '・・・ここで途切れる\A by コンサルティング・広告・マーケティング会社';
        background-color: #60a5fa; /* bg-blue-400 */
        top: 100%;
        transform: translateY(-50%);
    }
     .page-template-page-top .w-full.bg-gray-800 .flex-col.md\:flex-row p:nth-child(3)::after {
        content: '改善は含まれない・・・\A by システム開発会社';
        background-color: #4ade80; /* bg-green-400 */
        top: 100%;
        transform: translateY(-50%);
    }

    /* --- トップページ：3つの柱 --- */
    .page-template-page-top .pillars-section-container {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    .page-template-page-top .pillars-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem; /* 各柱の間隔 */
        position: static;
        height: auto;
        aspect-ratio: auto;
        margin-top: 0;
    }
    .page-template-page-top .pillar-group {
        position: static !important;
        width: 100% !important;
        max-width: 320px;
        height: auto !important;
        transform: none !important;
    }
    .page-template-page-top .pillar-circle-new {
        width: 280px;
        height: 280px;
        margin: 0 auto;
        border-color: #D4AF37;
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
        position: relative;
        align-items: center !important; /* 円の中のコンテンツを中央揃え */
        justify-content: center !important; /* 円の中のコンテンツを中央揃え */
    }
    .page-template-page-top .pillar-content {
        padding: 10% !important;
        text-align: center !important; /* テキスト自体も中央揃え */
    }
    .page-template-page-top .pillar-content h3 {
        font-size: 1rem; /* 16px */
        line-height: 1.4;
        word-break: break-word;
    }
    .page-template-page-top .pillar-content p {
        font-size: 0.75rem; /* 12px */
        line-height: 1.4;
    }
    .page-template-page-top .pillar-description-outside {
        display: block !important;
        position: static !important;
        width: 100% !important;
        max-width: 320px;
        text-align: left !important;
        margin: 1rem auto 0 !important;
        transform: none !important;
        color: #333 !important;
        font-size: 0.9rem;
        line-height: 1.7;
        /* アニメーションの初期状態 */
        opacity: 0;
    }
    /* JSで .is-visible が付与された時のスタイル */
    .page-template-page-top .pillar-description-outside.is-visible {
        animation-name: glow-and-zoom-in;
        animation-duration: 1.2s; /* ゆっくりにする */
        animation-timing-function: ease-out; /* 上品なイージング */
        animation-fill-mode: forwards;
        /* animation-delay は common.js でインラインスタイルとして付与される */
    }
    .page-template-page-top .text-center[style*="margin-top: 200px"] {
        margin-top: 5rem !important;
        margin-bottom: 0 !important;
        padding-bottom: 1rem !important;
    }

    /* --- 企業理念ページ --- */
    /* ★★★ 修正点2: ドロップキャップのレイアウト修正 (最終版) ★★★ */
    .page-template-page-philosophy .heading-with-drop-cap {
        flex-direction: row;
        gap: 0.25rem;
        align-items: center;
        justify-content: center; /* スマホでも中央揃えに */
    }
    .page-template-page-philosophy .large-first-letter {
        font-size: 4.5rem;
        line-height: 1;
    }
    /* ★★★ ここまで ★★★ */
    .page-template-page-philosophy .heading-text-block h2 {
        font-size: 1.5rem;
    }
    .page-template-page-philosophy .heading-text-block span {
        font-size: 1rem;
    }
    .page-template-page-philosophy .flex-col.md\:flex-row,
    .page-template-page-philosophy .flex-col.md\:flex-row-reverse {
        gap: 2rem;
    }

    /* --- 会社概要ページ --- */
    .page-template-page-company .grid-cols-1.md\:grid-cols-2 {
        gap: 2rem;
    }
    .page-template-page-company .text-gray-700.text-xl {
        font-size: 1rem; /* 16px */
    }
    .page-template-page-company a.text-2xl {
        font-size: 1.5rem; /* 24px */
    }

    /* --- お問い合わせページ --- */
    #singulier-contact-form {
        padding: 1.5rem;
    }
    #singulier-contact-form .my-6.p-4 {
        padding: 1rem;
    }
}

/* --- ハンバーガーメニュー関連 --- */

/* メニューオープン時のbodyスクロール禁止 */
body.is-menu-open {
    overflow: hidden;
}

/* ヘッダーの背景色をメニューオープン時に変更 */
.site-header.is-menu-open {
    background-color: transparent;
    backdrop-filter: none;
}

/* ロゴの色をメニューオープン時に反転（白背景で見えるように） */
body.is-menu-open .site-header a img {
    /* ロゴの色を反転させるフィルター（必要に応じて調整） */
    /* filter: invert(1); */
}

/* ハンバーガーボタンのスタイル */
#hamburger-button span {
    transform-origin: center;
}

/* メニューオープン時のハンバーガーボタン（バツ印に変形） */
#hamburger-button.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#hamburger-button.is-open span:nth-child(2) {
    transform: translateY(-8px) rotate(-45deg);
    /* 2本目の線を1本目の位置に移動させてから回転 */
    margin-top: -2px; 
}
#hamburger-button.is-open span:nth-child(3) {
    opacity: 0;
}

/* スマホ用メニューの表示状態 */
#mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
}

/* スマホ用メニュー内の各項目のアニメーション */
#mobile-menu.is-open nav > * {
    opacity: 0;
    transform: translateY(20px);
    animation: menu-item-fade-in 0.5s ease-out forwards;
}

/* 各メニュー項目が順番に表示されるようにディレイを設定 */
#mobile-menu.is-open nav > *:nth-child(1) { animation-delay: 0.2s; }
#mobile-menu.is-open nav > *:nth-child(2) { animation-delay: 0.3s; }
#mobile-menu.is-open nav > *:nth-child(3) { animation-delay: 0.4s; }
#mobile-menu.is-open nav > *:nth-child(4) { animation-delay: 0.5s; }


@keyframes menu-item-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}