:root {
    --blue: #007AFF;
    --gold: #6b442a;
    --emerald: #10B981;
    --purple: #f59600;
    --agriculture-color: #557c55; /* 自然を感じる深い緑 */
    --dark: #1a1a1a;
}

/* 万が一Google Fontsが読み込まれなくても、太くならないように保険をかける */
.main-title, .logo-text {
    font-synthesis: none; /* ブラウザによる勝手な太字化を禁止 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
}

body {
    background: #f8f8f8;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
}

/* ページ遷移時のフェードイン */
/* フェードイン初期状態 */
body.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* 表示状態 */
body.fade-in.loaded {
    opacity: 1;
}

/* フェードアウト */
body.fade-out {
    opacity: 0;
}


/* アニメーション前の状態（HTML側にこのクラスを付与する） */
.reveal {
    opacity: 0;
    transform: translateY(30px); /* 30px下から */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* JavaScriptで付与される「表示後」の状態 */
.reveal.active {
    opacity: 1;
    transform: translateY(0); /* 元の位置へ */
}
/* --- フェードイン演出の基本設定 --- */

/* --- Navigation --- */
.glass-nav {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    height: 80px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* 会社概要ヒーロー専用 */
.about-hero-profile {
    background: linear-gradient(135deg, #eaf4ff 0%, #ffffff 100%);
    padding: 160px 0 100px;
    text-align: center;
}

.about-hero-profile .concept-lead {
    max-width: 800px;
    margin: 30px auto 0;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 2;
    color: #333;
}


/* --- ロゴ周りの体裁修正 --- */
.nav-left {
    display: flex;
    align-items: center;
    gap: 25px; /* ロゴエリアとサブリンクの間隔 */
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px; /* ロゴ画像とSTC文字の間隔 */
    text-decoration: none;
    color: inherit;
}
.logo-img {
    height: 38px; /* 80pxのナビに対してバランスの良いサイズ */
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    line-height: 1;
}
.sub-links-top {
    display: flex;
    gap: 15px;
    border-left: 2px solid rgba(0,0,0,0.3); /* 境界線を入れて整理 */
    padding-left: 20px;
}

.sub-links-top a {
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: #888;
    transition: color 0.3s;
}
.sub-links-top a:hover {
    color: var(--blue);
}


/* --- 中央・右側 --- */
.main-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}
.main-links a {
    text-decoration: none;
    font-weight: 300;
    font-size: 0.85rem;
    color: #111;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sub-links-top { display: flex; gap: 10px; }
.sub-links-top a { font-size: 0.65rem; text-decoration: none; color: #555; font-weight: 500; text-transform: uppercase; }

.main-links { list-style: none; display: flex; gap: 30px; }
.main-links a {
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
}
.main-links a:hover { color: var(--blue); }

.nav-right { display: flex; align-items: center; gap: 20px; }
.btn-contact {
    background: #000;
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: #333;
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?w=1600&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    background-attachment: fixed;
    justify-content: center;
}
/* 背景ロゴの配置 */
.hero::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* ← これが最適解 */
    width: clamp(250px, 35vw, 400px);
    max-width: 400px; /* 大きくなりすぎないように制限 */
    height: 80%;
    background: url('./image/logobigw.png') no-repeat center center;
    background-size: contain;
    
    /* 透過率30%（不透明度70%）の設定 */
    opacity: 0.4; 
    
    z-index: 1; /* オーバーレイより下、背景より上 */
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3; /* ロゴやオーバーレイよりも手前に配置 */
    text-align: center;
    color: #fff;
}

/* スタイリッシュなSTCロゴタイポグラフィ */
.main-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;           /* 細く */
    letter-spacing: 0.6em;      /* 広く */
    font-size: clamp(5rem, 10vw, 7rem);

    /* margin-rightではなくtransformで中央補正 */
    transform: translateX(0.3em);

    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 20px;
    letter-spacing: 0.05em;
}

/* --- Business Grid (5枚対応) --- */
.business-grid {
    display: grid;
    /* 1200px以上では5カラム、それ以下は自動調整 */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 0 5% 100px;
    margin-top: -120px;
    position: relative;
    z-index: 10;
}

.card {
    height: 500px;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    color: white;
    transition: 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    text-decoration: none; /* 下線を消す */
}
.card a { text-decoration: none; color: white; }


.card:hover { transform: translateY(-15px); }
.card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 1; transition: 0.6s; }
.card:hover .card-bg { transform: scale(1.1); }
.card:hover .arrow-link {
    background: white;
    color: black;
}
/* カード全体を覆う透明リンク */
.card-link {
    position: absolute;
    inset: 0;
    z-index: 20; /* ← 最前面にする */
    text-indent: -9999px;
}

/* テキストは透明リンクより上に見える必要はない */
.card-content {
    position: relative;
    z-index: 10;
}

/* 背景は一番下 */
.card-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* --- 各事業カード背景（統合・修正） --- */
.hr-card .card-bg { background-image: linear-gradient(to top, var(--blue), transparent), url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?q=80&w=2070'); }
.catering-card .card-bg { background-image: linear-gradient(to top, var(--gold), transparent), url('https://images.unsplash.com/photo-1555244162-803834f70033?w=800'); }
.interior-card .card-bg { background-image: linear-gradient(to top, var(--emerald), transparent), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=800'); }
.funeral-card .card-bg { background-image: linear-gradient(to top, var(--purple), transparent), url('./image/yourbrand.jpg'); }
/* 農業部門追加 */
.agriculture-card .card-bg { background-image: linear-gradient(to top, var(--agriculture-color), transparent), url('https://images.unsplash.com/photo-1500651230702-0e2d8a49d4ad?w=800'); }

.card-content { position: relative; z-index: 2; }
.tag { font-size: 0.7rem; font-weight: 800; background: rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 10px; margin-bottom: 15px; display: inline-block; }
.card h2 { font-size: 1.8rem; margin-bottom: 8px; }
.card p { font-size: 0.9rem; opacity: 0.9; margin-bottom: 25px; line-height: 1.4; }

.arrow-link { 
    display: inline-block;
    color: white; 
    text-decoration: none; 
    font-weight: 700; 
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}
.arrow-link:hover { background: #fff; color: var(--dark); transform: translateX(5px); }

/* --- Footer --- */
.footer-brand .logo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;    /* 上下中央揃え */
    justify-content: flex-start; /* 左寄せ（中央寄せならcenter） */
    gap: 10px;              /* ロゴと文字の間隔 */
    margin-bottom: 20px;    /* 下のキャッチコピーとの余白 */
}
/* フッターのロゴ画像サイズ調整 */
.footer-brand .logo-img {
    height: 40px;           /* ナビゲーションより少し大きくすると安定します */
    width: auto;
    object-fit: contain;
    display: block;         /* 余計な下隙間を消す */
}
/* フッターの社名テキスト */
.footer-brand .logo-text {
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1;         /* 行高を1にすることで中央に揃いやすくなります */
    color: #333;            /* 背景色に合わせて調整してください */
}
/* キャッチコピー */
.footer-tagline {
    margin-bottom: 25px;
    font-size: 0.9rem;
    opacity: 0.8;
    
}
.footer-tagline span{white-space: nowrap;}

.site-footer {
    background-color: #ffffff;
    padding: 80px 5% 40px;
    border-top: 1px solid #eee;
    color: var(--dark);
    margin-top: 100px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 { font-size: 0.95rem; margin-bottom: 25px; color: #000; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 12px; }
.footer-column ul li a { text-decoration: none; color: #666; font-size: 0.85rem; transition: 0.3s; }
.footer-column ul li a:hover { color: var(--blue); padding-left: 5px; }


/* ============================
   ハンバーガーアイコン
============================ */
.hum-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 2000;
}
.hum-btn span {
    width: 28px;
    height: 3px;
    background: #333;
    border-radius: 3px;
}

/* ============================
   モバイルメニュー本体
============================ */
.hum-menu {
    position: fixed;
    top: 0;
    right: -70%;
    width: 70%;
    height: 100vh;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    padding: 100px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: 0.4s ease;
    z-index: 1500;
    opacity: 0;
    transform: translateX(30px);
}
.hum-menu.active {
    right: 0;
    opacity: 1;
    transform: translateX(0);
}

/* ============================
   モバイルメニューのリンク共通
============================ */
.hum-menu a {
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    padding: 12px 0;
    border-radius: 8px;
    transition: 0.25s ease;
}
.hum-menu a:hover {
    padding-left: 10px;
    transform: translateX(10px);
}

/* ============================
   小さめリンク（会社概要・Policy）
============================ */
.hum-menu a.hum-small {
    font-size: 0.9rem !important;
    opacity: 0.8;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 5px;
    margin-bottom: 5px !important;
}
.hum-menu a.hum-big {
    font-size: 1.5rem !important;
    opacity: 0.8;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 5px;
    margin-bottom: 5px !important;
}

/* ============================
   Contact（黒背景）
============================ */
.hum-contact {
    background: #000;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 50px;
    text-align: center;
    font-weight: 700;
    margin-top: 20px;
}
.hum-contact:hover {
    background: #333;
    color: #fff;
}


/* ============================
   背景オーバーレイ
============================ */
.hum-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1400;
}
.hum-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.social-links span {
    white-space: normal !important;
}

/* --- Responsive --- */
@media (max-width: 1080px) {
    .main-links { display: none; }
    .hum-btn { display: flex; }
    .nav-right { display: none; } 
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-links { grid-template-columns: repeat(2, 1fr); text-align: left; }
    .social-links { justify-content: center; }
    .glass-nav {
        height: 64px;
        top: 15px;
        padding: 0 20px;
    }
/* Heroタイトルのスマホ・タブレット最適化 */
.main-title {
    font-size: clamp(3.5rem, 12vw, 5rem);
    letter-spacing: 0.35em;
    transform: translateX(0.175em);
}
    .nav-center, 
    .sub-links-top {
        display: none; /* スマホではメインメニューとサブリンクを非表示 */
    }

    .logo-img {
        height: 28px;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .footer-brand .logo {
        justify-content: center; /* スマホでは全体を中央寄せにすることが多いため */
        gap: 10px;
    }
    .footer-brand .logo-text {
        font-size: 1.2rem;
    }
    .footer-tagline {
        text-align: center;
    }
    .social-links {
        display: flex;
        flex-direction: column;  /* ←追加 */
        align-items: center;     /* 中央寄せしたいなら */
    }
    .hero-desc {
        font-size: 0.95rem;          /* スマホ向けに少しだけ文字を小ぶりに */
        line-height: 1.8;            /* 行間を少し広げて読みやすく */
        max-width: 280px;            /* ★一番重要：文字が横に広がりすぎないように「枠」を狭める */
        margin: 20px auto 0;         /* 左右「auto」で、狭めた枠ごと画面の中央に配置 */
        word-break: keep-all;        /* 単語の途中での不自然な改行を防ぐ（保険） */
        opacity: 0.9;                /* 少しだけ透過させて洗練された印象に */
    }

}

@media (max-width: 480px) {
    .footer-links { grid-template-columns: 1fr; text-align: center; }
    .business-grid { margin-top: -50px; }
}
