@charset "UTF-8";

/* =========================================
   From common.css (Base & Common Styles)
   ========================================= */

/* デザイン設定 (CSS Variables) */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --sub-text-color: #666666;
    --accent-color: #000000;
    --link-hover: #555555;

    /* フォント設定：メインをゴシック体に統一 */
    --font-main: 'Noto Sans JP', sans-serif;
    --font-serif: 'Noto Serif JP', serif;
    --font-eng: 'Oswald', sans-serif; /* 数字などで使用 */

    /* コンテナ幅・余白 */
    --container-width: 1280px;
    --section-spacing: 180px;

    --header-height: 80px;
}

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

/* Sticky Scroll修正: 
   html, body に overflow: hidden/scroll があると sticky が効かないため調整 
   overflow-x: clip は sticky コンテキストを壊さずに横スクロールを防ぎます
*/
html {
    width: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 2.0;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    overflow-x: clip; /* hiddenの代わりにclipを使用 */
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s, background-color 0.3s, color 0.3s;
}
a:hover {
    opacity: 0.7;
}

img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #f0f0f0;
}

h1, h2, h3, p { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section { padding-bottom: var(--section-spacing); }

/* Section Header */
.section-header {
    text-align: left;
    margin-bottom: 80px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.section-title {
    font-family: var(--font-main); /* ゴシック体 */
    /* フォントサイズを大きく変更 (1.5rem -> 3.0rem) */
    font-size: 3.0rem;
    letter-spacing: 0.1em;
    text-transform: capitalize;
    font-weight: 700;
    color: var(--text-color);
    display: block;
    margin-bottom: 10px;
}

.section-divider {
    display: none;
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.0s ease-out, transform 1.0s ease-out;
}
.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header --- */
header {
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    transition: background-color 0.3s;
}
header.scrolled {
    /* 修正: 背景を薄い透明の黒にし、すりガラス効果を追加 */
    background: rgba(0, 0, 0, 0.3); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between; /* 修正: ロゴとナビを両端に配置 */
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo {
    /* 通常時は非表示（アニメーション用にopacityとvisibilityで制御） */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px); /* 上から降りてくる演出 */
    transition: all 0.4s ease;
    
    /* テキストスタイル */
    font-family: var(--font-main);
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1em;
    text-decoration: none;
    white-space: nowrap; /* 折り返し防止 */
}

/* スクロール時にロゴを表示 */
header.scrolled .logo {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Nav Menu */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: #333333; /* ダークグレー背景 */
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: right 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.nav-menu.active {
    right: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

.nav-list li a {
    font-family: var(--font-main);
    font-size: 2rem;
    letter-spacing: 0.05em;
    font-weight: 500;
    color: #ffffff; /* 白文字 */
}

/* Hamburger */
.hamburger {
    display: block;
    border: none;
    background: none;
    cursor: pointer;
    width: 40px;
    height: 30px;
    padding: 0;
    position: relative;
    z-index: 1200;
}
.hamburger span {
    position: absolute;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: #ffffff; /* 白線 */
    transition: all 0.3s ease-in-out;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); width: 70%; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
    top: 50%;
    width: 100%;
    transform: translateY(-50%) rotate(45deg);
}
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) {
    bottom: 50%;
    width: 100%;
    transform: translateY(50%) rotate(-45deg);
}

/* --- Buttons --- */
.view-more-btn {
    display: inline-block;
    background-color: #111;
    color: #fff;
    padding: 16px 50px;
    border: 1px solid #111;
    font-family: var(--font-main);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: all 0.3s;
    margin-top: 40px;
}
.view-more-btn:hover {
    background-color: #fff;
    color: #111;
}

/* --- Footer --- */
footer {
    background: #f4f4f4;
    padding: 100px 0 40px;
    color: var(--text-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    /* コンテナを中央寄せにする修正 */
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}
.footer-col h4 {
    font-size: 0.9rem;
    margin-bottom: 30px;
    font-weight: 700;
    font-family: var(--font-main);
}
.footer-links li { margin-bottom: 15px; }
.footer-links li a {
    color: var(--sub-text-color);
    font-size: 0.9rem;
}
.footer-links li a:hover {
    color: var(--text-color);
}
.footer-col p {
    color: var(--sub-text-color) !important;
    font-size: 0.9rem;
}
.copyright {
    font-size: 0.75rem;
    color: #999;
    margin-top: 60px;
    text-align: center;
}

/* Footer Logo Adjustment */
.footer-logo-img {
    background-color: transparent !important;
}

/* 追加: フッターロゴのラッパー */
.footer-logo-wrap {
    margin-top: 20px;
    width: 180px;
}

/* =========================================
   Page Specific Styles
   ========================================= */

/* --- Hero Section --- */
.home-hero {
    position: relative;
    width: 100%;
    /* height: 100vh; を以下に変更 */
    /* JSで計算した高さ(--hero-height)を使用。JS無効時などは100vh */
    height: var(--hero-height, 100vh);
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: #f4f4f4;
}

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

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
    z-index: 1;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Hero Logo */
.hero-logo {
    position: absolute;
    top: -0px; /* PC: 上へ */
    left: -80px; /* PC: 左へ */
    width: 300px; 
    z-index: 4;
}
.hero-logo img {
    width: 100%;
    height: auto;
    background: transparent;
}

/* Hero Copy */
.hero-copy {
    position: absolute;
    top: 15%;
    right: 8%;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 2.8rem;
    line-height: 2.2;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.2);
    writing-mode: vertical-rl;
    letter-spacing: 0.3em;
}
.hero-copy span {
    display: inline-block;
    margin-left: 30px;
}
.sp-only { display: none; }

/* --- About Section --- */
.home-about {
    background-color: #fff;
    padding-top: var(--section-spacing);
    padding-bottom: 0;
}

.about-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 100px;
}

.about-img {
    flex: 1.2;
}
.about-img img {
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}

.about-text {
    flex: 1;
    padding-top: 40px;
}

.about-lead {
    font-family: var(--font-main);
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 40px;
    line-height: 1.8;
}
.about-text p {
    color: var(--sub-text-color);
    margin-bottom: 40px;
}

/* About Extra Images */
.about-extra-images {
    position: relative;
    margin-top: 80px;
    height: 480px;
    width: 100%;
}

.extra-img-01 {
    width: 45%;
    position: absolute;
    top: 50px;
    left: 5%;
    z-index: 1;
}
.extra-img-01 img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 20px 20px 0px rgba(0,0,0,0.05);
}

.extra-img-02 {
    width: 35%;
    position: absolute;
    top: 0;
    right: 5%;
    z-index: 1;
}
.extra-img-02 img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 20px 20px 0px rgba(0,0,0,0.05);
}

/* --- Service Section (Sticky Stacking - Updated) --- */
.home-service {
    background-color: #fff;
    padding-top: 60px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 0; 
    padding-bottom: 100px;
    contain: paint;
}

.service-item {
    display: flex;
    align-items: flex-start; /* 上揃えに変更 */
    gap: 60px;
    
    /* Sticky settings */
    position: -webkit-sticky;
    position: sticky;
    top: 80px; /* Header height */
    
    background-color: #fff;
    padding: 80px 0; /* 上下余白調整 */
    
    /* 高さ調整: 画面いっぱいではなく、適度な高さにする */
    min-height: 70vh; /* 以前の100vhから縮小 */
    
    /* デザイン再現: ボーダーライン */
    border-top: 1px solid #333;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}

/* Stacking Order */
.service-item:nth-child(1) { z-index: 1; }
.service-item:nth-child(2) { z-index: 2; }
.service-item:nth-child(3) { z-index: 3; }
.service-item:nth-child(4) { z-index: 4; }
.service-item:nth-child(5) { z-index: 5; }

.service-item.service-reverse {
    flex-direction: row-reverse;
}

.service-img {
    flex: 1.2; /* テキストとの比率調整 */
    overflow: hidden;
}
.service-img img {
    transition: transform 0.8s ease;
    width: 100%;
    /* 画像を横長に固定 */
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.service-item:hover .service-img img {
    transform: scale(1.03);
}

.service-content {
    flex: 1;
    padding-top: 0; /* ボーダーからの距離 */
}

/* ナンバリングを表示・スタイリング */
.service-num {
    display: block;
    font-family: var(--font-eng);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 20px;
}

.service-name {
    font-family: var(--font-main);
    /* サイズ縮小: 1.8rem -> 1.5rem */
    font-size: 1.5rem;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 2px solid #000; /* タイトル下の強調線（参考デザイン風） */
    display: inline-block;
    padding-bottom: 10px;
}

.service-desc {
    color: var(--sub-text-color);
    margin-bottom: 40px;
    font-size: 0.95rem;
    line-height: 2.2;
}

/* --- Works Section (Updated Design) --- */
.home-works {
    background-image: url('../img/works_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    width: 100%;
    padding-top: 180px; /* セクション余白確保 */
    padding-bottom: 180px; /* 高さを出す */
}

/* Works Section Title - Larger */
.home-works .section-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

/* Works Grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Works Item (Card Style) */
.work-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px; /* 角丸 */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* 軽い影 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}
.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 1;
}

.work-img-wrap {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    margin-bottom: 0; /* マージンリセット */
    position: relative;
}
.work-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.work-item:hover .work-img-wrap img {
    transform: scale(1.05);
}

.work-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
}

.work-date {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 12px;
    font-family: var(--font-eng);
}

.work-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 16px;
    color: #333;
}

.work-tags {
    font-size: 0.75rem;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 10px; /* 矢印削除に伴い余白調整 */
}

/* --- Flow Section (Updated Stylish Box Design) --- */
.home-flow {
    background-color: #f9f9f9;
    color: var(--text-color);
    padding-top: var(--section-spacing);
    position: relative; 
    z-index: 10;
    overflow: hidden; /* 傾きによるはみ出し防止 */
}

/* Container for line and items */
.flow-list {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2%;
    padding: 80px 0; /* 傾き分の余白 */
    max-width: 1100px; /* 幅を少し広げる */
    margin: 0 auto;
}

/* Horizontal Line (Desktop) */
.flow-list::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -50vw; /* 画面端まで伸ばす */
    right: -50vw;
    height: 2px; /* 少し太く */
    background-color: #333;
    z-index: 0;
    transform: translateY(-50%);
    opacity: 0.2; /* 薄くして上品に */
}

.flow-item {
    background: #fff;
    padding: 50px 30px; /* 余白を増やしてサイズアップ */
    width: 23%; /* 4つ並べる */
    aspect-ratio: 1 / 1; /* 正方形 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* 影を柔らかく */
    position: relative;
    z-index: 1;
    border: 1px solid #eaeaea; /* 薄いボーダー */
    transition: all 0.4s ease;
}

/* Double Border Effect (Stylish Decoration) */
.flow-item::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid #f0f0f0; /* 内側の飾り枠 */
    pointer-events: none;
    transition: border-color 0.3s;
}

/* Alternating tilts for "stylish" look */
.flow-item:nth-child(odd) {
    transform: rotate(-3deg);
}
.flow-item:nth-child(even) {
    transform: rotate(2deg) translateY(20px); /* ずらし量を増やす */
}

.flow-item:hover {
    transform: scale(1.1) rotate(0deg) !important; /* ホバー時に大きく、正面に */
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); /* 影を強調 */
    border-color: #333; /* 枠線を濃く */
}
.flow-item:hover::after {
    border-color: #ccc; /* 内枠も少し濃く */
}

.flow-step {
    font-family: var(--font-eng);
    font-size: 1.6rem; /* サイズアップ */
    font-weight: 700;
    color: #ccc; /* アクセントカラー（薄いグレー） */
    margin-bottom: 20px;
    display: block;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}
.flow-item:hover .flow-step {
    color: #333; /* ホバー時に濃く */
}

.flow-item h3 {
    font-family: var(--font-main);
    font-size: 1.4rem; /* サイズアップ */
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
    text-align: center;
}

/* Remove old styles */
.flow-img, .flow-txt-box {
    display: none; 
}


/* --- Greeting Section (Updated Stylish Layout) --- */
.home-greeting {
    position: relative;
    padding: var(--section-spacing) 0;
    /* セクション全体の背景は白 */
    overflow: visible; /* 画像のはみ出し許可 */
}

/* 背景帯 (Background Bar) */
.greeting-bg-bar {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 50%; /* 帯の高さを少し短く調整 (60% -> 50%) */
    background-color: #333; /* アクセントカラー（濃いグレー） */
    transform: translateY(-50%);
    z-index: 0;
}

/* Container for Flex Layout */
.greeting-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    max-width: 1100px; /* コンテンツ幅を少し狭くして凝縮感を出す */
}

/* Content Area (Left) */
.greeting-content {
    flex: 1;
    color: #fff; /* 帯の上なので白文字 */
    padding-left: 20px;
}

/* 追加: Greetingタイトルのみサイズ調整 */
.home-greeting .section-title {
    font-size: 2.0rem; /* 2.2remからさらに縮小 */
    margin-bottom: 20px;
}

.greeting-name {
    font-family: var(--font-main);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 15px;
    display: inline-block;
}
.greeting-name .en {
    font-size: 1.2rem;
    font-weight: 400;
    margin-left: 15px;
    font-family: var(--font-eng);
    opacity: 0.8;
}

.greeting-text {
    font-size: 1rem;
    line-height: 2.2;
    opacity: 0.9;
}

/* Image Area (Right) */
.greeting-img {
    width: 45%;
    position: relative;
}

.greeting-img img {
    width: 100%;
    height: auto;
    display: block;
    /* 背景透過画像のまわりにグレーの背景がつかないようにする */
    background-color: transparent;
    transition: transform 0.5s ease;
}

/* --- Contact Section --- */
.home-contact {
    padding: 0;
    margin-top: 0;
    margin-bottom: 100px;
}

.contact-inner {
    position: relative;
    padding: 100px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.contact-img img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.contact-box {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 80px 100px;
    text-align: center;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.contact-box .section-title {
    text-align: center;
    margin-bottom: 30px;
}
.contact-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 20px 80px;
    margin-top: 40px;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.1em;
    transition: background 0.3s;
    border-radius: 5px;
}
.contact-btn:hover {
    background: #444;
    color: #fff;
}


/* --- Responsive Adjustments (Specific) --- */
@media (max-width: 1024px) {
    :root { --section-spacing: 120px; }
    
    /* Hero Logo - Tablet adjustment */
    .hero-logo {
        top: 30px;
        left: 30px;
        width: 220px;
    }

    /* Hero Copy - Tablet adjustment */
    .hero-copy {
        top: auto;
        bottom: 15%;
        right: 6%;
        font-size: 2.0rem;
    }
    .hero-copy span {
        display: block;
        margin: 0 0 0 20px;
    }

    .about-wrapper { gap: 60px; }

    /* Service - Tablet (Make it behave like Mobile) */
    .service-list { gap: 0; }
    .service-item { 
        flex-direction: column; 
        gap: 30px; 
        top: 80px; /* Header height */
        padding: 40px 0 60px;
        min-height: auto; /* 高さ制限解除して通常スクロールに近い挙動へ */
        padding-bottom: 80px;
        border-top: 1px solid #333; /* ボーダー維持 */
    }
    .service-item.service-reverse { flex-direction: column; }
    .service-img { width: 100%; }
    .service-img img { aspect-ratio: 16/9; } /* タブレットでも横長比率維持 */

    /* Works Grid (Tablet: Same as mobile - 1 column) */
    .works-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Flow - Tablet/Mobile (Vertical Stack) */
    .flow-list {
        flex-direction: column;
        gap: 40px;
        padding: 0;
    }
    .flow-list::before {
        /* Change to vertical line */
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        height: auto;
        right: auto;
        transform: translateX(-50%);
    }
    .flow-item {
        width: 80%; 
        aspect-ratio: auto;
        min-height: 180px; /* サイズアップに合わせて調整 */
        transform: rotate(0deg) !important; /* No tilt */
        margin: 0 auto;
        padding: 40px; /* モバイルでも余白確保 */
    }
    .flow-item:nth-child(even) { transform: none; }
    .flow-item:nth-child(odd) { transform: none; }

    .footer-grid { 
        grid-template-columns: repeat(2, 1fr);
        /* タブレット用追加: 幅を制限して中央寄せ + テキスト中央揃え */
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    /* フッターロゴを中央に配置 */
    .footer-logo-wrap {
        margin-left: auto;
        margin-right: auto;
    }

    /* --- Typography Adjustment (Tablet) --- */
    body {
        font-size: 1.05rem; /* ベース文字サイズを少し大きく */
    }

    .section-title {
        /* タブレットサイズ調整 (1.8rem -> 2.5rem) */
        font-size: 2.5rem;
    }

    /* Works Title - Responsive */
    .home-works .section-title {
        font-size: 2.8rem;
    }

    .about-lead {
        font-size: 2.4rem;
    }

    .service-name {
        /* タブレット・スマホ用 サイズ縮小: 2.2rem -> 1.8rem */
        font-size: 1.8rem;
    }

    .service-desc {
        font-size: 1.1rem;
    }

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

    .flow-step {
        font-size: 1.4rem; /* タブレットでも大きめに */
    }
    .flow-item h3 {
        font-size: 1.3rem; /* タブレットでも大きめに */
    }
    
    /* Greeting - Tablet (PC-like layout) */
    .greeting-inner {
        flex-direction: row; /* 横並び */
        align-items: center;
        gap: 30px; /* PCより少し狭く */
    }

    /* 追加: Greetingタイトル タブレット調整 */
    .home-greeting .section-title {
        font-size: 1.8rem; /* 2.0remから縮小 */
    }

    .greeting-bg-bar {
        /* PCと同じスタイルを明示的に指定、またはPCスタイルが効くようにリセット */
        height: 65%; /* タブレット用に高さを広げる (50% -> 65%) */
        top: 50%;
        transform: translateY(-50%);
    }

    .greeting-content {
        width: auto;
        padding: 0;
        flex: 1;
    }

    .greeting-img {
        width: 45%; /* PCと同じ比率 */
        margin: 0;
    }

    .greeting-name { 
        font-size: 2.0rem; 
    }
    .greeting-name .en { 
        display: inline-block; 
        margin-left: 10px; 
        font-size: 1rem; 
    }
}

@media (max-width: 768px) {
    :root { --section-spacing: 100px; --header-height: 60px; }
    .container { padding: 0 24px; }
    
    /* Hero */
    .hero-copy {
        writing-mode: vertical-rl;
        top: auto;
        bottom: 12%;
        left: auto;
        right: 6%;
        transform: none;
        text-align: left;
        width: auto;
        font-size: 1.6rem;
        padding: 20px 15px;
    }
    .hero-copy span { 
        display: inline-block; 
        margin: 0;
        margin-left: 15px;
    }
    .sp-only { display: inline; }

    /* Hero Logo - Mobile adjustment */
    .hero-logo {
        top: 20px;
        left: 20px;
        width: 160px;
    }

    /* About */
    .about-wrapper { 
        flex-direction: column-reverse; 
        gap: 40px; 
    }
    .about-text { padding-top: 0; }
    .about-lead { font-size: 1.6rem; }

    /* About Extra Images - Mobile */
    .about-extra-images {
        height: 350px;
        display: block;
        position: relative;
        margin-top: 60px;
        width: 100%;
    }
    .extra-img-01 {
        position: absolute;
        width: 70%;
        top: 0;
        left: 0;
        z-index: 1;
    }
    .extra-img-02 {
        position: absolute;
        width: 50%;
        top: 130px;
        right: 0;
        margin-left: 0;
        z-index: 2;
    }
    .extra-img-02 img {
        border: 6px solid #fff;
    }

    /* Service */
    .service-list { gap: 0; }
    .service-item { 
        flex-direction: column; 
        gap: 30px; 
        top: 60px; /* Mobile header height */
        padding: 40px 0 60px; /* 余白も少し調整 */
        min-height: auto; /* モバイルでは高さ制限を解除 */
        padding-bottom: 80px;
        /* ボーダーはモバイルでも維持 */
        border-top: 1px solid #333;
    }
    .service-item.service-reverse { flex-direction: column; }
    .service-img { width: 100%; }
    .service-img img { aspect-ratio: 16/9; } /* モバイルでも横長比率を維持 */

    /* Works */
    .works-grid { grid-template-columns: 1fr; gap: 40px; }

    /* Works Title - Mobile */
    .home-works .section-title {
        font-size: 2.2rem;
    }
    
    /* スマホ全体のセクションタイトル調整 */
    .section-title {
        font-size: 2.0rem;
    }

    /* 追加: Greetingタイトル スマホ調整 */
    .home-greeting .section-title {
        font-size: 1.6rem; /* 1.8remから縮小 */
    }

    /* Flow - Mobile (Inherits 1024px vertical stack, adjust size if needed) */
    .flow-list { gap: 30px; }
    .flow-item { width: 100%; min-height: 140px; }
    
    /* Greeting - Mobile (Stack) */
    .greeting-inner { flex-direction: column-reverse; gap: 40px; }
    .greeting-bg-bar { height: 100%; top: 0; transform: none; } /* 全面塗りに変更 */
    .greeting-content { width: 100%; padding: 20px 0; }
    .greeting-img { width: 80%; transform: none; margin: 0 auto; }
    .greeting-img img { transform: none; }

    /* Contact */
    .home-contact {
        margin-top: var(--section-spacing); /* Greetingとの間に余白を追加 */
    }
    .contact-box { padding: 40px 20px; width: 95%; }
    .contact-btn { width: 100%; padding: 15px 0; }

    /* Footer */
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 40px; 
        /* スマホ用追加: 幅を制限して中央寄せ */
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* =========================================
   Desktop / Tablet Navigation (Over 769px)
   ========================================= */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        right: auto;
        display: flex;
        align-items: center;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: row;
        gap: 30px;
        padding: 0;
    }
    
    .nav-list li {
        margin: 0;
    }

    .nav-list li a {
        font-size: 0.9rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        padding: 5px 0;
        position: relative;
    }
    
    .nav-list li a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 1px;
        background-color: #ffffff;
        transition: width 0.3s;
    }
    .nav-list li a:hover::after {
        width: 100%;
    }

    .nav-list li:last-child {
        margin-left: 10px;
    }
    .nav-list li:last-child a {
        background-color: #ffffff;
        color: #333333;
        padding: 12px 24px;
        border-radius: 5px;
        transition: all 0.3s;
    }
    .nav-list li:last-child a::after {
        display: none;
    }
    .nav-list li:last-child a:hover {
        background-color: #e0e0e0;
        opacity: 1;
        transform: translateY(-2px);
    }
}