/* ==========================================================================
   CSS 変数定義
   温かみがあり白を基調としたカラーパレット
   ========================================================================== */
:root {
    /* カラーパレット */
    --color-bg: #FFFDF7;            /* オフホワイト・アイボリー系（温かみのある白） */
    --color-bg-light: #FAF7F0;      /* セクション背景用 */
    --color-text: #4A3B32;          /* 焦げ茶色（テキスト） */
    --color-text-muted: #7A6960;    /* 補助テキスト */
    
    --color-primary: #DDA15E;       /* まろやかなマスタードイエロー・アンバー系 */
    --color-primary-hover: #C58844;
    --color-accent: #CB6A45;        /* 落ち着いた赤色（食欲をそそる温かみ） */
    
    --color-border: #E8E0D5;
    --color-card-bg: #FFFFFF;
    
    /* フォント */
    --font-heading: 'Kiwi Maru', serif;
    --font-body: 'Noto Sans JP', sans-serif;
    
    /* その他 */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* ボックスシャドウ（ふんわり、きれいな印象に） */
    --shadow-sm: 0 4px 12px rgba(74, 59, 50, 0.04);
    --shadow-md: 0 8px 24px rgba(74, 59, 50, 0.08);
    --shadow-lg: 0 16px 48px rgba(74, 59, 50, 0.12);
}

/* ==========================================================================
   リセット & ベーススタイル
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--color-text);
    font-weight: 500;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   レイアウト / ユーティリティ
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.container-narrow {
    max-width: 960px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-primary);
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-description {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 48px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(221, 161, 94, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197, 136, 68, 0.4);
}

/* ==========================================================================
   ヘッダー
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 253, 247, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    white-space: nowrap;
}

.header-logo-area {
    display: flex;
    align-items: center;
    gap: 32px; /* スペースを16pxから32pxに広げました */
}

.header-catch {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-list a {
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav-list a:hover::after {
    width: 100%;
}

/* ==========================================================================
   ヒーローセクション
   ========================================================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* 背景画像などの設定は後でJS等から追加可能 */
    background: linear-gradient(135deg, rgba(255, 253, 247, 0.9), rgba(250, 247, 240, 0.95));
}

/* もし背景画像を入れる場合のレイヤー */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image: url('../img/hero-bg.jpg'); */
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 24px;
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.4;
    margin-bottom: 24px;
    color: var(--color-text);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

/* ==========================================================================
   プロフィールセクション
   ========================================================================== */
.profile {
    display: flex;
    gap: 40px;
    align-items: center;
    background: var(--color-card-bg);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: 40px;
}

.profile-img {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 4px solid #fff;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-text p {
    margin-bottom: 16px;
    font-size: 1.05rem;
}

/* ==========================================================================
   カテゴリセクション (メインコンテンツ)
   ========================================================================== */
.category-hero-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4%;
    margin-bottom: 48px;
}

.hero-illus {
    width: 23%;
    max-width: 210px;
    height: auto;
    object-fit: contain;
}

.hero-text-block {
    text-align: center;
    flex-shrink: 0;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    background-color: var(--color-bg-light);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(221, 161, 94, 0.3);
}

.category-grid {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

.category-section {
    animation: fadeIn 0.8s ease-out forwards;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

.category-icon {
    font-size: 2rem;
}

.category-title {
    font-size: 1.6rem;
}

/* カテゴリごとのアクセントカラー */
.category-header.rank1 .category-title { color: #8F6A3B; } /* 殿堂入り: ゴールド系 */
.category-header.rank2 .category-title { color: #E67E22; } /* 高頻度: オレンジ系 */
.category-header.rank3 .category-title { color: #27AE60; } /* 中頻度: グリーン系 */
.category-header.rank4 .category-title { color: #C0392B; } /* 低頻度: レッド系 */
.category-header.rank5 .category-title { color: #8E44AD; } /* 限定的: パープル系 */

.item-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.group-illus-span2 {
    grid-column: span 2;
}

.group-illus-span3 {
    grid-column: span 3;
}

.item-card {
    background-color: var(--color-card-bg);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    cursor: pointer;
}

.item-card-with-thumb {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
}

.item-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    background: #fff;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-card-with-thumb .item-name {
    margin-bottom: 4px;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
}

.item-name {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.item-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* リンクをカード全体に広げる */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* ==========================================================================
   星評価（スターレーティング）
   ========================================================================== */
.star-rating-wrap {
    display: block;
    margin-top: 8px;
    margin-bottom: 16px;
    line-height: 1;
}

.star-rating {
    display: inline-block;
    position: relative;
    font-size: 1.4rem;
    color: #e0e0e0;
    line-height: 1;
    vertical-align: middle;
}

.star-rating::before {
    content: "★★★★★";
}

.star-rating::after {
    content: "★★★★★";
    position: absolute;
    left: 0;
    top: 0;
    width: var(--percent);
    overflow: hidden;
    color: #ffb800; /* ゴールド */
    white-space: nowrap;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
    background-color: #3E2723;
    color: #FDFBF7;
    padding: 40px 0;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media (max-width: 768px) {
    .header-logo-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .header-catch {
        display: none; /* スマホではヘッダーが狭くなるため非表示にするか、もしくは小さく表示 */
    }

    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .profile {
        flex-direction: column;
        padding: 24px;
        text-align: center;
    }
    
    .profile-img {
        width: 140px;
        height: 140px;
    }
    
    .nav-list {
        display: none; /* モバイルメニューは要追加ですが今回は簡易的に非表示でも */
    }
    
    .category-title {
        font-size: 1.3rem;
    }

    .category-hero-layout {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .hero-text-block {
        width: 100%;
        order: -1;
        margin-bottom: 16px;
        flex-shrink: 1;
    }
    
    .hero-illus {
        width: 45%;
        margin: 0 auto;
    }
    
    .category-filters {
        gap: 8px;
    }
    
    .group-illus-span2, .group-illus-span3 {
        grid-column: span 1;
    }
}
