/* =========================================================
   2026 REBRANDED: WARMTH & ELEGANCE
   ========================================================= */

:root {
    /* New Palette: Warm Neutrals & Earth Tones */
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

    /* Backgrounds */
    --color-warm-bg: #F5F2EB;
    /* エクリュ（生成り）：ベース背景 */
    --color-paper: #FFFFFF;
    /* ホワイト：カード背景 */

    /* Text Colors */
    --color-text-main: #4A4A4A;
    /* チャコールグレー：メイン文字 */
    --color-text-sub: #8C8C8C;
    /* ライトグレー：サブ文字 */

    /* Accents */
    --color-accent: #9C8E7E;
    /* トープ：メインアクセント（旧小豆色の代わり） */
    --color-gold: #C5B088;
    /* アンティークゴールド：ハイライト */

    /* Typography */
    --font-serif: "Noto Serif JP", "Yu Mincho", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

/* --- Core Settings --- */
html {
    scroll-padding-top: 0;
}

body {
    background-color: var(--color-warm-bg);
    color: var(--color-text-main);
    overflow-x: hidden;
    width: 100%;
    font-family: var(--font-serif);
    margin: 0;
    padding: 0;
    /* 微細なノイズを全体にかけて紙の質感を出す */
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
}

/* --- Lenis Scroll Fixes --- */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* =========================================================
   SCROLL SNAP & SECTION LAYOUT FIXES
   ========================================================= */

/* 各セクションを画面いっぱいに広げ、中央配置にする（スナップ対応） */
.hero-dynamic,
.works-horizontal-section,
.news-dynamic-section,
.process-journey-section,
.philosophy-dynamic,
.works-dynamic,
.footer-modern-seo {
    min-height: 100vh !important; /* 強制的に画面の高さに合わせる */
    height: auto; /* コンテンツが多い場合は伸びることを許容 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 中身を上下中央寄せ */
    position: relative;
    box-sizing: border-box;
    padding-top: 80px; /* ヘッダー分の余白 */
    padding-bottom: 80px;
}

/* フッターだけは中身の配置を維持 */
.footer-modern-seo {
    justify-content: space-between;
    padding-top: 100px;
}


/* =========================================================
   1. HERO SECTION (Premium Video Background)
   ========================================================= */
.hero-dynamic {
    padding: 0 5vw;
    overflow: hidden;
    background-color: #000;
}

/* Video Container */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-fallback-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-text-layer {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

.hero-main-title {
    /* 文字サイズを大幅に縮小（元の約半分程度のイメージ） */
    font-size: clamp(1.8rem, 5vw, 3.5rem); 
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.1em; /* 日本語に合わせて少し広げる */
    color: #FFF;
    display: block; /* flex-direction: column を解除 */
    text-align: center;
}

.title-line {
    display: block;
    overflow: hidden;
    padding: 0.05em 0;
}

.line-inner {
    display: block;
    will-change: transform;
}

.en-huge {
    font-family: var(--font-sans);
    font-weight: 900;
    letter-spacing: 0.05em;
    font-style: italic;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    color: transparent;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-sub-wrapper {
    overflow: hidden;
    margin-top: 10px;
}

.hero-sub-dynamic {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    padding-top: 10px;
    position: relative;
    display: inline-block;
}

.hero-sub-dynamic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: var(--color-gold);
}

/* Scroll Indicator */
.hero-scroll-simple {
    position: absolute;
    bottom: 50px;
    right: 50px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.hero-scroll-simple p {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
    margin: 0;
    color: #FFF;
}

.hero-scroll-simple .line {
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--color-gold), transparent);
    animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}


/* =========================================================
   2. HORIZONTAL WORKS SHOWCASE (New Feature)
   ========================================================= */
.works-horizontal-section {
    height: 100vh !important; /* ピン留め用に強制固定 */
    overflow: hidden;
    padding: 0; /* ピン留め時は余白なし */
    background-color: var(--color-text-main);
    color: var(--color-warm-bg);
    display: flex;
    align-items: center;
}

.works-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

/* 左側のタイトルエリア */
.works-intro {
    flex: 0 0 30vw; /* 画像エリアを広く取るために少し縮小 */
    padding: 0 5vw;
    z-index: 2;
}

.works-intro h2 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1;
    margin: 0 0 30px;
    color: var(--color-warm-bg);
}

.works-intro p {
    color: #999;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 400px;
}

.works-intro .btn-arrow {
    display: inline-flex;
    align-items: center;
    margin-top: 40px;
    color: var(--color-gold);
    text-decoration: none;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
    transition: opacity 0.3s;
}

.works-intro .btn-arrow:hover {
    opacity: 0.7;
}

/* 横に流れるコンテナ */
.works-scroll-container {
    display: flex;
    gap: 5vw; /* レスポンシブな隙間 */
    padding-right: 10vw;
    height: 60vh; /* 画像エリアの高さ */
    align-items: center;
    will-change: transform;
}

/* 個別の商品カード */
.work-item {
    position: relative;
    width: 40vw; /* 1枚の幅を少し広げる */
    height: 100%;
    min-width: 300px;
    min-height: 400px;
    flex-shrink: 0;
}

.work-item-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #333;
}

.work-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* 枠いっぱいに広げる設定（隙間がなくなる） */
    transition: transform 0.5s ease;
    filter: grayscale(20%);
}

.work-item:hover .work-item-img img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.work-item-info {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: var(--color-warm-bg);
}

.work-item-title {
    font-size: 1.2rem;
    font-weight: 500;
}

.work-item-cat {
    font-size: 0.9rem;
    color: var(--color-gold);
    font-family: var(--font-sans);
}


/* =========================================================
   3. NEWS (Bento Grid - Warmth Update)
   ========================================================= */
.news-dynamic-section {
    background: var(--color-warm-bg);
    position: relative;
    z-index: 5;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.section-head-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
}

.section-title-jp {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    margin: 0;
    color: var(--color-text-main);
}

.en-sub {
    font-size: 1rem;
    font-family: var(--font-sans);
    color: var(--color-gold);
    margin-left: 15px;
    letter-spacing: 0.1em;
}

.link-arrow {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--color-text-main);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 10px 30px;
    border-radius: 30px;
    transition: all 0.3s;
}

.link-arrow:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.news-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto; /* 固定値をやめ、自動調整にする */
    gap: 25px;
}

.news-bento-card {
    text-decoration: none;
    color: var(--color-text-main);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-paper);
    transition: all 0.6s var(--ease-out-expo);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.news-bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.news-bento-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    z-index: 10;
}

.news-bento-thumb {
    width: 100%;
    height: 180px;      /* 通常サイズのカードの画像高さ */
    flex-shrink: 0;     /* テキスト量が増えても画像が潰れないように固定 */
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
}

/* 最初の大きなカードだけ画像の高さを広げる */
.news-bento-large .news-bento-thumb {
    height: 420px; 
}

/* ラジオボタンで「枠いっぱいに拡大」を選んだ場合 */
.news-bento-thumb.is-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠を隙間なく埋める */
}

/* ラジオボタンで「全体を表示」を選んだ場合 */
.news-bento-thumb.is-contain img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像を切り取らず全部見せる */
    padding: 15px;       /* 枠との間に少し余白を作ると綺麗です */
}

.news-bento-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像全体を表示するように変更 */
    object-position: center;
    transition: transform 0.8s var(--ease-smooth);
}

/* 「空白があってもいい（全体表示）」モード */
.news-bento-thumb.is-contain img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像を切り取らずに全部見せる */
    padding: 20px;       /* 枠との間に少し余白を入れると綺麗です */
    object-position: center;
    transition: transform 0.8s var(--ease-smooth);
}

/* ホバー時のアニメーションは共通 */
.news-bento-card:hover img {
    transform: scale(1.05);
}

/* 「枠いっぱいに表示」モード */
.news-bento-thumb.is-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 隙間なく埋める */
    object-position: center;
    transition: transform 0.8s var(--ease-smooth);
}

.news-bento-card:hover .news-bento-thumb img {
    transform: scale(1.05);
}

.news-bento-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EAE8E3;
    color: #CCC;
    font-weight: 700;
}

.news-bento-overlay {
    display: none; /* グラデーションを消す */
}

.news-bento-content {
    position: relative; /* absoluteから変更 */
    padding: 20px;      /* 余白を少し調整 */
    z-index: 2;
    color: var(--color-text-main); /* 文字を暗い色に変更 */
    background: var(--color-paper); /* テキストエリアに背景色を付与 */
}

.news-bento-large .news-bento-content {
    padding: 30px;
    flex-grow: 1; /* テキストエリアを下に伸ばす */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-bento-date {
    font-size: 0.85rem;
    font-family: var(--font-sans);
    opacity: 0.9;
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    color: var(--color-gold);
}

.news-bento-title {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
}

.news-bento-large .news-bento-title {
    font-size: 1.8rem;
    line-height: 1.4;
}


/* =========================================================
   4. PROCESS JOURNEY (Refined)
   ========================================================= */
.process-journey-section {
    background: #fff;
    position: relative;
    overflow: hidden;
}

.process-title {
    text-align: center;
    margin-bottom: 100px;
}

.process-timeline {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.process-progress-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: #EEE;
    transform: translateX(-50%);
    z-index: 0;
}

.process-progress-fill {
    width: 1px;
    height: 0%;
    background: var(--color-gold);
    transition: height 0.3s ease;
}

.process-step {
    display: flex;
    align-items: center;
    margin-bottom: 120px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.process-step.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.process-step:nth-child(even) .process-content {
    flex-direction: row-reverse;
}

.process-number {
    font-size: 6rem;
    font-family: var(--font-sans);
    font-weight: 300;
    color: #F0F0F0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    line-height: 1;
}

.process-content {
    display: flex;
    align-items: center;
    gap: 80px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.process-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.process-icon {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--color-warm-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.process-icon svg {
    width: 60px;
    height: 60px;
    color: var(--color-accent);
    transition: color 0.3s;
}

.process-step:hover .process-icon svg {
    color: var(--color-gold);
}

.process-text {
    flex: 1;
    padding: 0 20px;
}

.process-text h3 {
    font-size: 1.8rem;
    margin: 0 0 20px 0;
    color: var(--color-text-main);
}

.process-text p {
    font-size: 1rem;
    line-height: 2;
    color: var(--color-text-sub);
    margin: 0;
    text-align: justify;
}


/* =========================================================
   5. PHILOSOPHY (Calm & Strong)
   ========================================================= */
.philosophy-dynamic {
    background: var(--color-text-main);
    color: #FFF;
    display: flex;
    align-items: center;
    /* ▼▼▼ 修正: 高さ固定と重なり順の指定 ▼▼▼ */
    height: 100vh !important; /* 強制的に全画面 */
    min-height: 100vh;
    width: 100%;
    position: relative;
    z-index: 10; /* 前後のセクションより手前に表示 */
    overflow: hidden;
    padding: 0; /* 上下の余白はFlex配置で調整するため削除 */
}

.philo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 5vw; /* コンテナ内に左右余白を追加 */
    position: relative;
    z-index: 2;
}

/* ▼▼▼ 追加: 背景装飾（よりリッチに見せる場合） ▼▼▼ */
.philosophy-dynamic::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.philo-visual {
    width: 45%; 
    height: auto;        /* 修正：高さを固定（60vh）から自動に変更 */
    position: relative;
    overflow: hidden;
    background: transparent; /* 修正：背景の黒を透明に */
    border-radius: 4px;
}

.philo-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* ▼▼▼ 変更: 画像全体を表示（切り抜かない） */
    object-position: center;
    display: block;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 1.5s var(--ease-out-expo);
}

.philosophy-dynamic:hover .philo-visual img {
    filter: grayscale(0%) contrast(1);
}

.philo-text {
    width: 50%;
}

.philo-heading {
    /* clampの最大値を 4rem → 2.5rem 程度に下げて一行に収まりやすくします */
    font-size: clamp(1.5rem, 3.5vw, 2.5rem); 
    line-height: 1.2;
    font-family: var(--font-serif);
    margin-bottom: 30px;
    color: #EFEFEF;
    white-space: nowrap;  /* 追加：絶対に改行させない */
    letter-spacing: 0.05em;
}

.philo-desc {
    font-size: 1.1rem;
    line-height: 2.2;
    color: #AAA;
    margin-bottom: 50px;
    text-align: justify;
}

.btn-line {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #FFF;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    letter-spacing: 0.1em;
}

.btn-line:hover {
    background: #FFF;
    color: var(--color-text-main);
}


/* =========================================================
   5.5 WORKS GRID (Standard Showcase)
   ========================================================= */
.works-dynamic {
    background: var(--color-warm-bg);
}

.works-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3列を維持 */
    gap: 25px;       /* お知らせセクション（news-bento-grid）と同じ隙間に変更 */
    margin-top: 60px;
    width: 100%;     /* 親要素（container-wide）の幅に合わせる */
}

/* スマホ表示の調整（768px以下） */
@media (max-width: 768px) {
    .works-showcase-grid {
        grid-template-columns: 1fr; /* スマホではお知らせと同様に1カラムにする */
        gap: 20px;
    }
}

.work-card-new {
    text-decoration: none;
    color: var(--color-text-main);
    display: block;
}

.work-thumb-new {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #FFF;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* --- 製作実績の画像表示制御 --- */

/* 共通：デフォルト設定 */
.work-thumb-new img {
    width: 100%;
    height: 100%;
    object-position: center;
    transition: transform 0.8s var(--ease-out-expo);
}

/* 「枠いっぱいに拡大」を選んだ場合 */
.work-thumb-new.is-cover img {
    object-fit: cover;
}

/* 「全体を表示」を選んだ場合（余白が出る可能性あり） */
.work-thumb-new.is-contain img {
    object-fit: contain;
    padding: 15px; /* ロゴなどの場合、少し内側に余白があると綺麗です */
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(143, 46, 46, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
}

.work-overlay span {
    color: #FFF;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    border: 1px solid #FFF;
    padding: 8px 16px;
    border-radius: 20px;
}

.work-card-new:hover .work-overlay {
    opacity: 1;
}

.work-info-new {
    margin-top: 20px;
}

.work-title-n {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.work-cat-n {
    font-size: 0.8rem;
    color: var(--color-gold);
    font-family: var(--font-sans);
}

.works-footer-link {
    text-align: center;
    margin-top: 80px;
}

.btn-fill {
    display: inline-block;
    padding: 15px 50px;
    background: var(--color-text-main);
    color: #FFF;
    text-decoration: none;
    border-radius: 50px;
    transition: background 0.3s;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.btn-fill:hover {
    background: var(--color-azuki);
}


/* =========================================================
   6. FOOTER (Refined Premium)
   ========================================================= */
.footer-modern-seo {
    background: #111;
    color: #999;
}

.footer-hero {
    max-width: 1400px;
    margin: 0 auto 100px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 60px;
    text-align: center !important;
}

.footer-hero h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    margin: 0 0 20px 0;
    color: #FFF;
    text-align: center !important;
}

.footer-hero p {
    font-size: 1rem;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
    color: var(--color-gold);
    text-align: center !important;
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto 80px;
}

.footer-col h3 {
    font-size: 0.8rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFF;
    margin-bottom: 25px;
    opacity: 0.5;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 15px;
}

.footer-col a {
    text-decoration: none;
    color: #999;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--color-gold);
}

.footer-bottom-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
}


/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .works-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* モバイルでは高さ固定を解除して自然なスクロールに */
    .hero-dynamic,
    .works-horizontal-section,
    .news-dynamic-section,
    .process-journey-section,
    .philosophy-dynamic,
    .works-dynamic,
    .footer-modern-seo {
        min-height: auto !important;
        height: auto !important;
        padding-top: 60px;
        padding-bottom: 60px;
        display: block; /* フレックス解除 */
    }

    .hero-dynamic {
        height: 100vh !important; /* ヒーローだけは全画面維持 */
        display: flex;
    }

    .hero-main-title {
        font-size: 12vw;
    }

    /* Horizontal Scroll becomes vertical on mobile */
    .works-horizontal-section {
        height: auto;
        overflow: visible;
        padding: 80px 0;
        background-color: var(--color-text-main);
    }

    .works-wrapper {
        flex-direction: column;
    }

    .works-intro {
        width: 100%;
        padding: 0 20px;
        margin-bottom: 40px;
    }

    .works-scroll-container {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
        gap: 40px;
        height: auto;
        transform: none !important;
    }

    .work-item {
        width: 100%;
        height: 60vw;
    }

    .news-bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .news-bento-large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .process-content {
        flex-direction: column !important;
        gap: 30px;
        text-align: center;
    }

    .process-progress-line {
        display: none;
    }

    .process-step {
        margin-bottom: 80px;
    }

    .philo-container {
        flex-direction: column;
    }

    .philo-visual,
    .philo-text {
        width: 100%;
    }

    .philo-visual {
        height: 40vh;
        margin-bottom: 40px;
    }

    .works-showcase-grid {
        grid-template-columns: 1fr;
    }

    .footer-cols {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* =========================================================
   トップページ専用ヘッダー・背景修正
   ========================================================= */

/* 1. 肌色の隙間対策：トップページ全体の背景を黒にして隙間を目立たなくする */
body.home {
    background-color: #000 !important; 
    background-image: none !important; 
}

/* 他のセクションの背景色は個別に維持 */
.news-dynamic-section, 
.process-journey-section, 
.works-dynamic {
    background-color: var(--color-warm-bg) !important;
}

/* 2. ホーム画面ラッパーの余白を強制削除 */
.home-scroll-root,
.home-scroll-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 3. ヘッダーの完全透明化・カクつき防止修正 */
body.home .site-header {
    background: transparent !important;
    border: none;
    position: fixed;
    width: 100%;
    transition: padding 0.5s var(--ease-out-expo);
    box-shadow: none !important;
}

/* --- トップページ用ヘッダーのボタン配色 --- */
body.home .site-header .ui-menu-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: background-color 0.3s ease;
}
body.home .site-header .ui-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
body.home .site-header .menu-text {
    color: #FFF;
}
body.home .site-header .menu-lines span {
    background: #FFF;
}

/* --- スクロール時も配色を維持 --- */
body.home .site-header.is-scrolled {
    background: transparent !important;
    padding: 15px 0;
    backdrop-filter: none !important;
    box-shadow: none !important;
}
body.home .site-header.is-scrolled .header-logo img {
    filter: none !important;
}
body.home .site-header.is-scrolled .ui-menu-btn {
    border-color: rgba(255, 255, 255, 0.7);
}
body.home .site-header.is-scrolled .menu-text {
    color: #fff;
}
body.home .site-header.is-scrolled .menu-lines span {
    background: #fff;
}

/* --- メニューオープン時のボタン（X印）のスタイル --- */
body.home .site-header .ui-menu-btn.is-active {
    background-color: transparent !important;
    border-color: transparent !important;
}
body.home .site-header .ui-menu-btn.is-active .menu-text {
    color: #fff;
}
body.home .site-header .ui-menu-btn.is-active .menu-lines span {
    background-color: #fff;
}


/* ▼▼▼ 新しいカスタムカーソル ▼▼▼ */
#cursor-dot {
    position: fixed;
    top: -5px;
    left: -5px;
    width: 6px;
    height: 6px;
    background-color: var(--color-text-main);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease-out, background-color 0.2s;
    will-change: transform;
}

#cursor-ring {
    position: fixed;
    top: -20px;
    left: -20px;
    width: 30px;
    height: 30px;
    border: 1px solid var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.3s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
    will-change: transform;
}
/* ホバー時のスタイル */
#cursor-ring.is-hovering {
    width: 50px;
    height: 50px;
    border-color: var(--color-gold);
}
#cursor-dot.is-hovering {
    background-color: var(--color-gold);
}

/* スマホでは非表示 */
@media (hover: none) or (pointer: coarse) {
    #cursor-dot, #cursor-ring {
        display: none !important;
    }
}

/* ヒーローエリアのボタン導線 */
.hero-cta-area {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 20;
}
.btn-hero-base, .btn-hero-portal {
    padding: 15px 30px;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    background: rgba(0,0,0,0.2);
}
.btn-hero-base:hover {
    background: #fff;
    color: #000;
}
.btn-hero-portal:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    color: #fff;
}
@media (max-width: 768px) {
    .hero-cta-area { flex-direction: column; align-items: center; }
}

.search-entry-section {
    position: relative;
    padding: clamp(72px, 8vw, 120px) 0;
    background: #f7f3ed;
    color: #1c1b19;
}

.search-entry-head {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.2fr) minmax(260px, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: end;
    margin-bottom: clamp(28px, 5vw, 56px);
}

.search-entry-label {
    margin: 0;
    color: #a51f24;
    font-family: var(--font-en, inherit);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
}

.search-entry-head h2 {
    margin: 0;
    font-size: clamp(2rem, 4.4vw, 5rem);
    line-height: 1.05;
    font-weight: 600;
}

.search-entry-head p:not(.search-entry-label) {
    margin: 0;
    color: #5d5953;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    line-height: 1.9;
}

.search-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(40, 35, 28, 0.18);
    border-left: 1px solid rgba(40, 35, 28, 0.18);
}

.search-entry-card {
    min-height: 170px;
    padding: clamp(22px, 2.4vw, 34px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.46);
    border-right: 1px solid rgba(40, 35, 28, 0.18);
    border-bottom: 1px solid rgba(40, 35, 28, 0.18);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-entry-card span {
    color: #a51f24;
    font-family: var(--font-en, inherit);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
}

.search-entry-card strong {
    display: block;
    font-size: clamp(1.05rem, 1.45vw, 1.32rem);
    line-height: 1.55;
    font-weight: 600;
}

.search-entry-card::after {
    content: "→";
    align-self: flex-end;
    color: #a51f24;
    font-size: 1.25rem;
    line-height: 1;
}

.search-entry-card:hover {
    background: #fff;
    color: #a51f24;
}

@media (max-width: 1024px) {
    .search-entry-head {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 14px;
    }

    .search-entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .search-entry-section {
        padding: 64px 0;
    }

    .search-entry-grid {
        grid-template-columns: 1fr;
    }

    .search-entry-card {
        min-height: 132px;
    }
}
