/* 
  style.css - Creative Premium v2
  AI Webアナリスト 孔明くん 
*/

/* --- デザイン変数 --- */
:root {
    --primary-deep: #0C0D1A;
    --primary-main: #191A32;
    --accent-gold: #D4AF37;
    --accent-light: #F1D592;
    --white: #FFFFFF;
    --text-body: #E0E0E0;
    --text-muted: #A0A0A0;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-rich: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 全般設定 --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
figure {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-rich);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--primary-deep);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-body);
    line-height: 1.8;
    overflow-x: hidden;
    background-color: var(--primary-deep);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4%;
}

/* --- ヘッダー（画像準処のクリーンデザイン） --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    transition: var(--transition-rich);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-brand a {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #333;
}

.header-logo {
    height: 48px;
    width: auto;
}

.header-title-group {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
}

.service-name {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    margin-right: 12px;
    border-right: 1px solid #eee;
    padding-right: 25px;
}

.koumei-name {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0c0d1a;
    letter-spacing: 0.1em;
    font-family: "Times New Roman", "Shippori Mincho", serif;
}

.nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: #444;
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
    letter-spacing: 0.05em;
    transition: var(--transition-rich);
}

.nav a:hover:not(.btn-contact-header):not(.btn-customer-header) {
    color: #000;
}

/* 契約中の方はこちらボタン（ゴールド・プレステージ） */
.btn-customer-header {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: #D4AF37 !important;
    /* 格式高い真鍮色 */
    border: 1px solid #D4AF37 !important;
    padding: 12px 28px;
    border-radius: 100px;
    /* お問い合わせボタンと形状を統一 */
    font-size: 0.85rem !important;
    line-height: 1.2;
    text-align: center;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-customer-header:hover {
    background: #D4AF37 !important;
    color: #fff !important;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

.btn-contact-header {
    background: #191A32;
    color: #fff !important;
    padding: 14px 40px;
    border-radius: 100px;
    font-weight: 900;
    border: none;
    box-shadow: 0 4px 15px rgba(25, 26, 50, 0.2);
}

.btn-contact-header:hover {
    background: #0c0d1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 26, 50, 0.4);
}

/* ハンバーガーメニューボタン */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: #191A32;
    transition: 0.3s;
}

/* モバイル対応レスポンシブ設定 */
@media screen and (max-width: 1024px) {
    header {
        padding: 10px 0;
    }

    .header-logo {
        height: 40px;
    }

    .koumei-name {
        font-size: 1.6rem;
    }

    .service-name {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #eee;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 1000;
    }

    .nav.active {
        display: block;
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
    }

    .nav ul li {
        width: 100%;
    }

    .nav a {
        display: block;
        padding: 15px 4%;
        border-bottom: 1px solid #f9f9f9;
        text-align: center;
    }

    .btn-customer-header {
        margin: 15px 4%;
        width: calc(100% - 8%);
    }

    .btn-contact-header {
        margin: 10px 4%;
        width: calc(100% - 8%);
    }

    /* 開閉時アニメーション */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* --- ブランド・インパクト・バナー --- */
.brand-visual {
    height: 100vh;
    min-height: 800px;
    background: #000 url('https://images.pexels.com/photos/373543/pexels-photo-373543.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 50;
}

.visual-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(12, 13, 26, 0.4) 0%, rgba(6, 7, 14, 0.9) 100%);
}

.visual-inner {
    position: relative;
    z-index: 10;
    text-align: center;
    transform: translateY(-20px);
}

.brand-logo-massive {
    max-width: 800px;
    margin: 0 auto 0;
    /* 下余白を完全にゼロに */
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
    animation: logoEntrance 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards, logoFloat 4s infinite ease-in-out 1.8s;
    opacity: 0;
    transform: scale(0.85);
}

@keyframes logoEntrance {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
        filter: drop-shadow(0 10px 20px rgba(212, 175, 55, 0.3));
    }

    50% {
        transform: translateY(-10px);
        filter: drop-shadow(0 30px 50px rgba(212, 175, 55, 0.5));
    }

    /* 浮遊量を半分に */
}

.brand-logo-massive img {
    width: 100%;
    height: auto;
    display: block;
    /* 余計な隙間を排除 */
}

.brand-impact-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    margin-top: -120px;
    /* 大幅に引き上げてロゴのすぐ下へ */
    padding-bottom: 100px;
    /* 下の要素との距離を確保 */
    animation: fadeIn 1s ease forwards 1.2s;
    position: relative;
    z-index: 15;
}

.brand-impact-tag .line {
    width: 60px;
    height: 1px;
    background: var(--accent-gold);
}

.brand-impact-tag .tag-text {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.5em;
    color: var(--accent-gold);
    text-transform: uppercase;
}

.visual-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    z-index: 10;
    opacity: 0.6;
}

.visual-scroll-hint::after {
    content: '';
    display: block;
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--white), transparent);
    margin: 15px auto 0;
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- インダストリアル・ポップ・ヒーロー --- */
.hero {
    height: 100vh;
    min-height: 700px;
    /* 850pxから縮小 */
    position: relative;
    overflow: hidden;
    padding: 0;
    transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* スライド別カラー */
.hero.slide-1 {
    background-color: #00AEEF;
}

/* シアンブルー */
.hero.slide-2 {
    background-color: #FF6600;
}

/* オレンジ */
.hero.slide-3 {
    background-color: #E6007E;
}

/* マゼンタ */

/* テクニカルグリッド */
.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

/* 背景文字 */
.hero-bg-text-large {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 25vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
}

.hero-slider {
    position: relative;
    z-index: 10;
    height: 100%;
    width: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: flex-start;
    /* 真ん中ではなく上寄りに配置 */
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 85px 4% 0;
    /* 英語テキストの高さに微調整 */
    height: 100%;
}

/* 左側：コピーエリア */
.slide-copy {
    color: #fff;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.headline-en {
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 1.25;
    display: flex;
    flex-direction: column;
}

.headline-en span {
    white-space: nowrap;
    /* 強制改行されるまで1行で表示 */
}

.headline-jp-caption {
    display: none;
}

.slide-message {
    position: absolute;
    bottom: -160px;
    left: 0;
    font-size: 1.4rem;
    font-weight: 700;
    background: #fff;
    color: var(--primary-main);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    max-width: 650px;
    /* 横幅を広げて1行での表示を確保 */
    line-height: 1.6;
    white-space: nowrap;
    /* メッセージ全体を1行で見せる場合はこちら、brタグを使う場合は適宜調整 */
}

/* 右側：キャラクターカプセル */
.slide-visual {
    position: relative;
    height: 500px;
    /* 高さを詰めて上端を合わせやすく */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* 上揃え */
}

.char-bubble-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 吹き出しカプセル */
.char-bubble {
    background: #fff;
    border: 10px solid #fff;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    position: absolute;
    overflow: visible;
    /* キャラクターが外に飛び出すために必要 */
}

/* ポップアウト効果 */
.char-bubble img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    /* カプセルより少し大きく */
    height: auto;
    display: block;
}

/* 各スライドのキャラ配置（例：Slide 1） */
.slide-1 .bubble-center {
    width: 320px;
    height: 380px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #FFC0CB;
}

.slide-1 .bubble-right {
    width: 200px;
    height: 260px;
    top: 110px;
    right: -30px;
    z-index: 5;
    background: #FFF176;
}

.slide-1 .bubble-left {
    width: 180px;
    height: 240px;
    top: 150px;
    left: -30px;
    z-index: 5;
    background: #64B5F6;
}

.slide-2 .bubble-left-center {
    width: 320px;
    height: 380px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #64B5F6;
}

.slide-2 .bubble-right-mid {
    width: 210px;
    height: 270px;
    top: 115px;
    right: -30px;
    z-index: 7;
    background: #E1BEE7;
}

.slide-2 .bubble-right-small {
    width: 190px;
    height: 250px;
    top: 160px;
    left: -30px;
    /* 左側に逃がしてバランスを取る */
    z-index: 5;
    background: #FFF176;
}

.slide-3 .bubble-focus {
    width: 320px;
    height: 380px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: #FFF176;
}

.slide-3 .bubble-sub-l {
    width: 200px;
    height: 260px;
    top: 150px;
    left: -30px;
    z-index: 5;
    background: #FFC0CB;
}

.slide-3 .bubble-sub-r {
    width: 210px;
    height: 270px;
    top: 110px;
    right: -30px;
    z-index: 5;
    background: #64B5F6;
}

/* 吹き出しのしっぽ（オプション） */
.char-bubble::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 40px;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #fff;
}

/* ナビゲーションドット */
.slider-nav {
    position: absolute;
    right: 50px;
    bottom: 50px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* --- レスポンシブ対応：ヒーローセクション --- */
@media (max-width: 992px) {
    .headline-en {
        font-size: 3.2rem;
    }

    .hero-bg-text-large {
        font-size: 30vw;
    }

    .slide-inner {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 60px;
    }

    .slide-inner {
        grid-template-columns: 1fr;
        padding: 40px 5% 80px;
        gap: 20px;
        text-align: center;
    }

    .slide-copy {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .headline-en {
        font-size: 2.2rem;
        align-items: center;
        margin-bottom: 20px;
    }

    .headline-en span {
        white-space: normal;
        line-height: 1.3;
    }

    .slide-message {
        position: relative;
        bottom: 0;
        left: 0;
        margin-top: 5px;
        width: 100%;
        max-width: 100%;
        padding: 15px 20px;
        font-size: 1.1rem;
        white-space: normal;
        background: #fff;
        color: var(--primary-main);
        border-radius: 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        line-height: 1.5;
    }

    .slide-visual {
        height: 320px;
        margin-top: 40px;
        width: 100%;
    }

    .char-bubble-container {
        transform: scale(0.85);
    }

    /* 全スライド共通のスマホ用黄金配置を確実に適用 */
    .hero-slide .char-bubble-container [class*="bubble-"] {
        position: absolute;
    }

    /* 中央メイン（スライド1,2,3共通） */
    .slide-1 .bubble-center,
    .slide-2 .bubble-left-center,
    .slide-3 .bubble-focus {
        width: 220px !important;
        height: 280px !important;
        left: 50% !important;
        top: 0 !important;
        z-index: 10 !important;
        transform: translateX(-50%) !important;
    }

    /* 右サブ（スライド1,2,3共通） */
    .slide-1 .bubble-right,
    .slide-2 .bubble-right-mid,
    .slide-3 .bubble-sub-r {
        width: 140px !important;
        height: 190px !important;
        right: -10px !important;
        top: 60px !important;
        z-index: 5 !important;
        left: auto !important;
        /* スライド2のPC用設定を打ち消し */
        transform: none !important;
    }

    /* 左サブ（スライド1,2,3共通） */
    .slide-1 .bubble-left,
    .slide-2 .bubble-right-small,
    .slide-3 .bubble-sub-l {
        width: 130px !important;
        height: 180px !important;
        left: -10px !important;
        top: 100px !important;
        z-index: 4 !important;
        right: auto !important;
        /* スライド2のPC用設定を打ち消し */
        transform: none !important;
    }

    .slider-nav {
        right: 50%;
        bottom: 30px;
        transform: translateX(50%);
        flex-direction: row;
        gap: 15px;
    }

    .hero-bg-text-large {
        font-size: 45vw;
        bottom: 5%;
        opacity: 0.04;
    }
}


/* --- 経営者の悩み（文字サイズアップと画像導入） --- */
.section-needs {
    padding: 150px 0;
}

.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 80px;
    color: #fff;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-gold);
    margin: 20px auto;
}

.needs-flex {
    display: flex;
    gap: 60px;
    align-items: center;
}

.needs-image {
    width: 45%;
    position: relative;
}

.needs-image img {
    border-radius: 30px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.needs-list {
    width: 55%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.needs-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 35px 40px;
    border-radius: 20px;
    position: relative;
    transition: var(--transition-rich);
}

.needs-item:hover {
    transform: translateX(15px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-gold);
}

.needs-item p {
    font-size: 1.5rem;
    /* 大きく読みやすく */
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
}

/* --- サービス内容（間隔調整と画像背景） --- */
.section-service {
    padding: 160px 0;
    background: #fff;
    color: var(--primary-main);
}

.section-service .section-title {
    color: var(--primary-main);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 確実に3列に整列 */
    gap: 30px;
    /* 広すぎた隙間を適切に */
}

.service-card {
    padding: 60px 40px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition-rich);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.card-num {
    font-size: 5rem;
    font-weight: 900;
    color: rgba(25, 26, 50, 0.05);
    position: absolute;
    top: 10px;
    right: 20px;
}

.service-card h3 {
    font-size: 1.7rem;
    font-weight: 900;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.service-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* --- 企業理念・ミッション（高級感のある画像背景） --- */
.section-philosophy {
    position: relative;
    padding: 180px 0;
    background: url('https://images.pexels.com/photos/3183150/pexels-photo-3183150.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat fixed;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.phi-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(12, 13, 26, 0.95), rgba(25, 26, 50, 0.7));
    z-index: 1;
}

.phi-inner {
    position: relative;
    z-index: 2;
}

.phi-tag {
    font-family: serif;
    font-size: 1.2rem;
    color: var(--accent-gold);
    letter-spacing: 0.3em;
    margin-bottom: 20px;
}

.phi-title {
    font-size: 3.8rem;
    font-weight: 900;
    margin-bottom: 40px;
    line-height: 1.3;
}

.phi-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.35rem;
    line-height: 2;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* --- 実績セクション --- */
.section-results {
    padding: 150px 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.result-card {
    border-radius: 20px;
    overflow: hidden;
    background: var(--glass-bg);
    transition: var(--transition-rich);
    position: relative;
}

.result-card.modal-trigger {
    cursor: pointer;
}

.result-card.modal-trigger:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.result-img {
    position: relative;
    overflow: hidden;
}

.result-img img {
    height: 300px;
    object-fit: cover;
    transition: var(--transition-rich);
}

.result-card.modal-trigger:hover .result-img img {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.result-hover-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent-gold);
    color: var(--primary-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--transition-rich);
    z-index: 2;
}

.result-card.modal-trigger:hover .result-hover-label {
    opacity: 1;
}

.result-content {
    padding: 30px;
}

/* --- モーダルウインドウ --- */
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    /* 初期は非表示 */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.result-modal.is-active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-body {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 30px;
    overflow: hidden;
    z-index: 2;
    animation: modalFadeUp 0.4s ease-out;
}

@keyframes modalFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-rich);
}

.modal-close:hover {
    transform: rotate(90deg);
    color: var(--accent-gold);
}

.modal-scroll-area {
    overflow-y: auto;
    max-height: 90vh;
}

.modal-main-img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-long-text {
    padding: 50px;
    color: #333;
    text-align: left;
}

.modal-long-text h3 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--primary-main);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--accent-gold);
}

.modal-long-text p {
    font-size: 1.15rem;
    line-height: 2;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .modal-long-text {
        padding: 30px 20px;
    }

    .modal-long-text h3 {
        font-size: 1.6rem;
    }
}

/* --- お問い合わせ --- */
.section-contact {
    padding: 140px 0;
}

.contact-form-container {
    max-width: 850px;
    margin: 0 auto;
    background: #fff;
    padding: 70px;
    border-radius: 30px;
    color: var(--primary-main);
}

.form-intro,
.confirm-intro {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-group label span {
    background: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition-rich);
    font-family: inherit;
    background: #f9f9f9;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: #fff;
    box-shadow: 0 0 0 4px var(--accent-gold-soft);
}

.form-submit {
    margin-top: 50px;
    text-align: center;
}

.confirm-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* --- 確認画面のテーブル風デザイン --- */
.confirm-table {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 10px 0;
    margin-bottom: 40px;
}

.confirm-table dl {
    display: flex;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.confirm-table dl:last-child {
    border-bottom: none;
}

.confirm-table dt {
    width: 200px;
    font-weight: 700;
    color: var(--primary-main);
    flex-shrink: 0;
}

.confirm-table dd {
    flex-grow: 1;
    line-height: 1.6;
}

/* --- 完了画面（Thanks Area） --- */
.thanks-area {
    text-align: center;
    padding: 40px 0;
}

.thanks-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    color: var(--primary-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.thanks-icon svg {
    width: 40px;
    height: 40px;
}

.thanks-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--primary-main);
}

.thanks-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .confirm-table dl {
        flex-direction: column;
        padding: 15px 20px;
    }

    .confirm-table dt {
        width: 100%;
        margin-bottom: 5px;
        font-size: 0.9rem;
        color: #888;
    }

    .confirm-btns {
        flex-direction: column;
    }
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.form-submit {
    text-align: center;
    margin-top: 40px;
}

.btn-main {
    display: inline-block;
    padding: 18px 60px;
    background: var(--primary-main);
    color: #fff;
    font-weight: 900;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition-rich);
    font-size: 1.1rem;
}

.btn-sub {
    display: inline-block;
    padding: 18px 40px;
    background: #f8f9fa;
    color: var(--primary-main);
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid #ddd;
    cursor: pointer;
    margin-left: 20px;
    transition: var(--transition-rich);
}

.confirm-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* 確認画面テーブル */
.confirm-table {
    margin-bottom: 40px;
    border-top: 1px solid #eee;
}

.confirm-table dl {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.confirm-table dt {
    width: 30%;
    font-weight: 700;
    color: var(--text-muted);
}

.confirm-table dd {
    width: 70%;
    font-weight: 500;
}

/* 完了画面 */
.thanks-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
}

/* --- レスポンシブ --- */
@media screen and (max-width: 1024px) {

    .service-grid,
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .needs-flex {
        flex-direction: column;
    }

    .needs-image,
    .needs-list {
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 20px;
    }

    .nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .service-grid,
    .results-grid {
        grid-template-columns: 1fr;
    }

    .philosophy-title {
        font-size: 2rem;
    }
}

/* --- フッター（高品質レイアウト） --- */
footer {
    background: #06070e;
    padding: 100px 0 60px;
    color: var(--text-body);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 60px;
}

.footer-brand {
    max-width: 450px;
}

.footer-logo {
    height: 60px;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
    /* 白抜きにする */
}

.company-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 15px;
}

.footer-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    margin-top: 85px;
}

.footer-nav a {
    color: var(--text-body);
    font-size: 1rem;
    font-weight: 500;
    display: inline-block;
    width: fit-content;
    transition: var(--transition-rich);
}

.footer-nav a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* モバイル用フッター調整 */
@media screen and (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav ul {
        text-align: center;
        margin-top: 20px;
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }
}

/* --- 軍師紹介ページ（gunshi.php） --- */
.gunshi-page {
    padding-top: 100px;
    /* ヘッダー分 */
}

/* 軍師ヒーロー */
.gunshi-hero {
    background: var(--primary-main);
    color: var(--white);
    padding: 160px 0 120px;
    position: relative;
    overflow: hidden;
}

.gunshi-hero::before {
    content: "STRATEGY";
    position: absolute;
    top: 50%;
    right: -5%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 15rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.gunshi-hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.gunshi-hero-content .sub-title {
    color: var(--accent-gold);
    font-weight: 900;
    letter-spacing: 0.3em;
    margin-bottom: 20px;
    display: block;
}

.gunshi-hero-content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 30px;
}

.gunshi-hero-content h1 .highlight {
    color: var(--accent-gold);
}

.gunshi-hero-content p {
    font-size: 1.25rem;
    line-height: 1.8;
    opacity: 0.9;
}

/* 誕生秘話 */
.gunshi-origin {
    padding: 140px 0;
    background: #fff;
    color: var(--primary-main);
}

.gunshi-origin .section-title {
    color: var(--primary-main);
}

.origin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.origin-img img {
    width: 100%;
    border-radius: 40px;
    box-shadow: var(--shadow-rich);
}

.origin-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 2;
    color: #444;
    /* 本文用の少し柔らかい黒 */
}

/* 三大兵法 */
.gunshi-pillars {
    padding: 140px 0;
    background: #f8f9fc;
    color: var(--primary-main);
}

.gunshi-pillars .section-title {
    color: var(--primary-main);
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 80px;
}

.pillar-card {
    background: #fff;
    padding: 60px 40px;
    border-radius: 30px;
    position: relative;
    transition: var(--transition-rich);
    border: 1px solid #eee;
}

.pillar-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.pillar-num {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.1);
}

.pillar-icon {
    font-size: 3.5rem;
    margin-bottom: 30px;
}

.pillar-card h3 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--primary-main);
}

.pillar-card p {
    color: #444;
    line-height: 1.8;
}

/* メッセージ */
.gunshi-message {
    padding: 160px 0;
    background: var(--accent-gold);
    text-align: center;
}

.message-box {
    max-width: 900px;
    margin: 0 auto;
}

.message-box h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    color: var(--primary-main);
    line-height: 1.2;
}

.message-box p {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 50px;
    color: rgba(6, 7, 14, 0.8);
}

/* レスポンシブ（軍師ページ） */
@media screen and (max-width: 1024px) {
    .origin-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .pillar-grid {
        grid-template-columns: 1fr;
    }
}

/* --- プライバシーポリシー（新デザイン） --- */
.privacy-container {
    max-width: 900px;
    margin: 180px auto 80px;
    background: #fff;
    padding: 60px 80px;
    color: #333;
    line-height: 1.8;
}

.privacy-container h1 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 50px;
    color: #000;
}

.privacy-section h2 {
    font-size: 1.25rem;
    font-weight: 900;
    margin: 40px 0 20px;
    color: #000;
    display: flex;
    align-items: flex-start;
}

.privacy-section p {
    margin-bottom: 20px;
    font-size: 1rem;
}

/* リスト構造 */
.main-list {
    padding-left: 20px;
    margin-bottom: 30px;
}

.main-list>li {
    list-style: disc;
    margin-bottom: 15px;
}

.sub-list {
    margin-top: 15px;
    padding-left: 20px;
}

.sub-list li {
    list-style: disc;
    margin-bottom: 10px;
}

.privacy-date {
    margin-top: 60px;
    text-align: left;
    font-weight: 500;
}

.ai-notice {
    background: #fff8f8;
    border: 1px solid #ffebeb;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
}

.ai-notice p {
    color: #d63031 !important;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
    .privacy-container {
        padding: 40px 20px;
        margin: 40px auto;
    }

    .privacy-container h1 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 768px) {
    .gunshi-hero-content h1 {
        font-size: 2.8rem;
    }

    .message-box h2 {
        font-size: 2.4rem;
    }

    .gunshi-hero {
        padding: 100px 0 80px;
    }
}