/* ==========================================================
   SOPHIA 採用サイト 共通スタイル
   ソフィア総合研究所 2027年度 新卒採用

   【保守する方へ】
   このファイルは全ページで読み込まれる共通CSSです。
   特定ページだけに影響するスタイルは各HTMLの <style> 内に書いてください。
   ========================================================== */

/* ----------------------------------------------------------
   0-a. アンカーリンクのスクロールオフセット
   スティッキーヘッダーがある場合、アンカーリンクで飛んだとき
   セクション見出しがヘッダーの裏に隠れてしまう問題を防ぐための設定です。
   scroll-padding-top にヘッダーの高さを指定することで、
   ブラウザがアンカー位置へスクロールする際に自動で余白を空けてくれます。
   ヘッダー高さ：スマホ h-16 = 64px、PC(768px〜) md:h-20 = 80px
   ---------------------------------------------------------- */
html {
    scroll-padding-top: 64px; /* スマホ：ヘッダー高さ分オフセット */
    scroll-behavior: smooth;  /* ページ内リンクをなめらかにスクロール */
}
@media (min-width: 768px) {
    html {
        scroll-padding-top: 80px; /* PC：ヘッダー高さ分オフセット */
    }
}


/* ----------------------------------------------------------
   0. サブページ共通ヒーロー
   トップ以外の各ページ上部に表示される薄グレーの見出しエリア
   ---------------------------------------------------------- */
.page-header {
    background-color: #e2e8f0;
    padding: 80px 24px;
    text-align: center;
}
@media (max-width: 640px) {
    .page-header {
        padding: 56px 20px;
    }
}



/* ----------------------------------------------------------
   1. CSS 変数（デザイントークン）
   ここで色を一元管理しています。
   色を変更したい場合はここの値だけ書き換えれば全ページに反映されます。
   var(--変数名) という書き方でどこからでも参照できます。
   ---------------------------------------------------------- */
:root {
    /* ブランドカラー：ロゴの #092767 に同期 */
    --aiiro:        #092767; /* 藍色：ブランドのメインカラー ← 変更する場合はロゴとセットで */
    --aiiro-light:  #163a8a; /* 藍色（明るめ）：ホバー時などに使用 */
    --accent:       #facc15; /* 黄色：強調・アクセントカラー */
    --impact-red:   #e11d48; /* 赤：感情的な強調テキストに使用 */
    --bg-light:     #f8fafc; /* ほぼ白：ページ背景色 */
}


/* ----------------------------------------------------------
   2. ベーススタイル
   ページ全体に適用される基本スタイルです。
   フォント・背景色・文字色などはここで一括設定しています。
   ---------------------------------------------------------- */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-light);
    color: var(--aiiro);
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3 {
    letter-spacing: -0.03em;
    line-height: 1.3;
}


/* ----------------------------------------------------------
   3. ブランドカラー ユーティリティ
   Tailwind に似た単発クラスです。
   class="bg-aiiro" のように HTML に書くだけで色を適用できます。
   ---------------------------------------------------------- */
.bg-aiiro    { background-color: var(--aiiro); }
.text-aiiro  { color: var(--aiiro); }
.border-aiiro { border-color: var(--aiiro); }
.bg-accent   { background-color: var(--accent); }
.text-accent { color: var(--accent); }


/* ----------------------------------------------------------
   4. ラベル
   セクションの上部に表示する小さな見出しラベルです。
   ::after 疑似要素で右側に横線を自動で引いています。
   ダーク背景の上では .label-jp--light を追加してください。
   ---------------------------------------------------------- */
.label-jp {
    font-size: 11px;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.label-jp::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ダークな背景上で使うバリアント */
.label-jp--light { color: var(--accent); }
.label-jp--light::after { background: rgba(255, 255, 255, 0.15); }


/* ----------------------------------------------------------
   5. テキスト装飾
   本文中で特定の単語・フレーズを目立たせるための装飾クラスです。
   .fact-highlight   : 黄色マーカー風（数値・事実の強調に）
   .emotion-highlight: 赤文字＋下線（感情的な強調に）
   .sharp-underline  : ::after で黄色い下線を引く（見出しの装飾に）
   ---------------------------------------------------------- */
.fact-highlight {
    background-color: var(--accent);
    color: var(--aiiro);
    padding: 0 4px;
    font-weight: 800;
    display: inline;
}

.emotion-highlight {
    color: var(--impact-red);
    font-weight: 900;
    border-bottom: 2px solid var(--impact-red);
    padding-bottom: 1px;
    display: inline-block;
    line-height: 1.2;
}

.sharp-underline {
    position: relative;
    display: inline-block;
}
.sharp-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}
@media (min-width: 1024px) {
    .sharp-underline::after {
        height: 4px;
        bottom: 10px;
    }
}


/* ----------------------------------------------------------
   6. スクロールアニメーション
   .reveal クラスを付けた要素が画面内に入ると .active が追加され
   フワッと浮き上がって表示されます。
   script.js の IntersectionObserver が .active を自動で付与します。
   ・opacity: 0 → 初期状態は透明
   ・translateY(20px) → 初期状態は20px下にずれている
   ・transition → 0.8秒かけてなめらかに変化する
   ---------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* ----------------------------------------------------------
   6-B. テキスト分解アニメーション（data-split / .split）
   data-split 属性を付けた要素の文字を1文字ずつ <span class="char"> に分解し、
   画面に入ったとき（.inview 付与時）に1文字ずつ順番に表示します。
   ・--i カスタムプロパティ：各文字のインデックス（アニメ遅延に使用）
   ・prefers-reduced-motion が有効な端末では即時表示にフォールバックします
   ---------------------------------------------------------- */
/* ----------------------------------------------------------
   6-C. タブカルーセル（[data-philo-carousel]）
   data-philo-carousel 属性を付けた要素内のスライドを
   タブクリックまたはスワイプで切り替えます。
   ---------------------------------------------------------- */
.philo-tabs {
    display: flex; gap: 4px; margin-bottom: 12px;
    flex-wrap: wrap;
}
.philo-tab {
    flex: 1 1 calc(50% - 2px);
    padding: 10px 6px; border: 1.5px solid #c7d2f0; background: #eef3ff;
    font-size: 10px; font-weight: 700; color: #5c6782;
    border-radius: 8px; transition: .3s; cursor: pointer;
    text-align: center; white-space: nowrap;
    border: 2px solid #5c6782;
}
@media (min-width: 480px) {
    .philo-tab { flex: 1 1 auto; }
}
.philo-tab[aria-selected="true"] { background: var(--aiiro); color: #fff; border-color: var(--aiiro); }
.philosophy-viewport { overflow: hidden; border-radius: 16px; }
.philosophy-track {
    display: flex; transition: transform .5s cubic-bezier(.23,1,.32,1);
    margin: 0; padding: 0; list-style: none;
}
.philosophy-slide { flex: 0 0 100%; }
/* about.html promise-item カード上書き */
.philosophy-slide .promise-item {
    background: #fff; border: 1px solid #e6ebf5; padding: 28px;
    border-radius: 16px; box-shadow: 0 4px 16px rgba(15,34,64,.05);
    border-top: none; min-height: 160px;
}
/* recruit.html 選考フローカード上書き */
.philosophy-slide .flow-step {
    border-radius: 16px; padding: 28px; min-height: 180px;
}


.split {
    display: inline-block;
}
.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(.6em);
}
.split.inview .char {
    animation: riseChar .72s cubic-bezier(.2,.7,.2,1) forwards;
    animation-delay: calc(var(--i) * 28ms);
}
@keyframes riseChar {
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .char { opacity: 1 !important; transform: none !important; animation: none !important; }
}


/* ----------------------------------------------------------
   7. フローティング導線（全ページ共通）
   画面に常時浮いて表示されるCTAボタンエリアです。
   ・z-index: 100 は「他の要素より手前に表示する」という意味です。
     （数値が大きいほど手前に来ます。ハンバーガーメニューは 200 以上なので
      メニューを開いたときはメニューが最前面になります）
   ・スクロール中は .is-scrolling が付いて一時的に非表示になります。
   ・モバイルは画面下部に横並び、デスクトップ（1280px以上）は右端に縦並びになります。
   ---------------------------------------------------------- */
.fixed-cta {
    position: fixed;
    z-index: 100;
    transition:
        opacity   0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fixed-cta.is-scrolling {
    opacity: 0;
    pointer-events: none;
}

/* モバイル・タブレット：画面下部に横並び */
@media (max-width: 1279px) {
    .fixed-cta {
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: 92%;
        max-width: 380px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 10px;
        border-radius: 28px;
        box-shadow: 0 25px 50px -12px rgba(9, 39, 103, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.6);
    }
    .fixed-cta.is-scrolling {
        transform: translate(-50%, 60px);
    }
    .btn-primary {
        background: var(--aiiro);
        color: #fff;
        font-weight: 900;
        padding: 16px;
        border-radius: 20px;
        font-size: 13px;
        text-align: center;
    }
    .btn-secondary {
        color: var(--aiiro);
        font-weight: 800;
        padding: 8px;
        font-size: 11px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
}

/* デスクトップ：右サイドに縦並び */
@media (min-width: 1280px) {
    .fixed-cta {
        top: 50%;
        right: 48px;
        transform: translateY(-50%);
        width: 240px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    .fixed-cta.is-scrolling {
        transform: translate(60px, -50%);
    }
    .btn-primary {
        background: var(--aiiro);
        color: #fff;
        text-align: center;
        font-weight: 900;
        padding: 28px 24px;
        border-radius: 24px;
        font-size: 16px;
        box-shadow: 0 30px 60px -15px rgba(9, 39, 103, 0.3);
    }
    .btn-secondary {
        background: #fff;
        color: var(--aiiro);
        text-align: center;
        font-weight: 700;
        padding: 18px;
        border-radius: 24px;
        border: 2px solid var(--aiiro);
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 10px 20px rgba(9, 39, 103, 0.05);
    }
}

.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.97);
}


/* ----------------------------------------------------------
   9. ハンバーガーメニュー（全ページ共通）
   右上の三本線ボタンを押すと右側からスライドして開くナビメニューです。
   ・.page-nav-overlay : 背景を暗くする半透明レイヤー（クリックで閉じる）
   ・.page-nav-panel   : 実際のメニューパネル（右端に隠れている状態から translateX で表示）
   ・z-index: 200/201  : フローティング導線(100)やヘッダー(50)より手前に表示
   ・overscroll-behavior: contain : パネル内スクロールが背面ページに伝わらないようにする
   ---------------------------------------------------------- */

/* ハンバーガーボタン */
.nav-hamburger {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
.nav-hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--aiiro);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* オーバーレイ */
.page-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(9, 39, 103, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.page-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* サイドパネル */
.page-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 201;
    width: min(300px, 88vw);
    height: 100dvh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
}
.page-nav-panel.open {
    transform: translateX(0);
    box-shadow: -24px 0 60px rgba(9, 39, 103, 0.12);
}

/* パネルヘッダー */
.page-nav-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.page-nav-panel-title {
    font-size: 9px;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.page-nav-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
    transition: background 0.2s;
    flex-shrink: 0;
}
.page-nav-close:hover {
    background: #e2e8f0;
}

/* 目次リンクリスト */
.page-nav-toc {
    padding: 8px 20px 32px;
    flex: 1;
}
.page-nav-toc a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    color: var(--aiiro);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    transition: all 0.2s;
}
.page-nav-toc a:last-child {
    border-bottom: none;
}
.page-nav-toc a::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}
.page-nav-toc a:hover {
    padding-left: 6px;
    color: var(--aiiro-light);
}

/* ----------------------------------------------------------
   8. サイトフッター（全ページ共通）
   全ページ下部の共通フッターです。
   ・footer-inner : ロゴエリアとナビを2カラムで並べます（スマホは1カラム）
   ・footer-nav   : 3列グリッドでリンクを並べます（幅560px以下は2列）
   ・footer-bottom: コピーライト表示エリア
   ---------------------------------------------------------- */
.site-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 40px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px;
    align-items: start;
}
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 36px 24px 28px;
    }
}

/* ブランドエリア */
.footer-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.footer-tagline {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin: 10px 0 0;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

/* ナビゲーション */
.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
@media (max-width: 560px) {
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

.footer-nav-label {
    display: block;
    font-size: 10px;
    font-weight: 900;
    color: #94a3b8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-nav a {
    font-size: 12px;
    font-weight: 700;
    color: var(--aiiro);
    text-decoration: none;
    transition: opacity 0.2s;
    line-height: 1.4;
}
.footer-nav a:hover {
    opacity: 0.6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* コピーライト */
.footer-bottom {
    border-top: 1px solid #f1f5f9;
    padding: 14px 24px;
    text-align: center;
}
.footer-copy {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
}
