@charset 'UTF-8';

/*
COLORS & VARIABLES (Vintage Denim Artistry Theme)
================================================ */
:root {
    /* ベースカラー */
    --text-main: #1d2d50; /* インクブルー */
    --bg-body: #f7f4ed;   /* 生成り色（古紙のようなオフホワイト） */
    --bg-wrapper: #fffcf5;
    --video-opacity: .6;
    
    /* Theme Colors */
    --color-denim-dark: #182445;  /* 濃紺 */
    --color-denim-light: #485c85; /* 褪せたデニム */
    --color-stitch: #c28e46;      /* 金茶色のステッチ */
    --color-accent: #a63737;      /* 赤いアクセント（セルビッチ風） */

    /* Typography */
    --font-serif: 'Bree Serif', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* UI Elements */
    --color-badge-bg: var(--color-denim-dark); 
    --color-badge-text: #f7f4ed;
    
    /* Table */
    --color-info-label: #2c3855; 
    --color-info-value: #fffcf5; 
    --color-info-text: #1d2d50;

    /* Line (Connector - Stitch Style) */
    --color-line: var(--color-denim-dark); 
    --line-width: 3px;
    
    /* Buttons */
    --color-btn-bg: var(--color-denim-dark);
    --color-btn-text: #fffcf5;
    
    /* Gauge Colors (Vintage Tones) */
    --gauge-color-1: #6b8cb3; /* Vintage Blue */
    --gauge-color-2: #d67d7d; /* Vintage Red */
    --gauge-color-3: #8eb384; /* Vintage Green */
    
    /* Shadows & Radius */
    /* 影を「紙が浮いている」ようなシャープなものに変更 */
    --shadow-card: 2px 4px 10px rgba(29, 45, 80, 0.15);
    --radius-card: 4px; /* 角丸を小さくして武骨に */
}

/*
GENERAL STYLING
================================================ */
html {
    font-size: 100%;
    scroll-snap-type: y mandatory;
}
body {
	color: var(--text-main);
    background-color: var(--bg-body);
    font-family: var(--font-sans);
    /* 繊維のような微細なノイズ画像を背景に入れるとより良いが、色だけで表現 */
    background-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.02)); 
    transition: .5s;
    margin: 0;
    overflow-x: hidden;
}
p {
    line-height: 1.8;
}
img {
    max-width: 100%;
    vertical-align: bottom;
}
a:hover {
    opacity: 0.8;
}

/*
SLIDE MENU STYLING (Adjusted colors)
================================================ */
.menu-trigger { position: fixed; top: 20px; right: 20px; width: 50px; height: 50px; background-color: var(--bg-wrapper); border: 2px solid var(--color-denim-dark); border-radius: 50%; box-shadow: 2px 2px 5px rgba(0,0,0,0.1); z-index: 1000; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; transition: all 0.3s; }
.menu-trigger:hover { background-color: var(--color-denim-dark); }
.menu-trigger span { display: block; width: 24px; height: 2px; background-color: var(--color-denim-dark); transition: transform 0.3s, opacity 0.3s, background-color 0.3s; }
.menu-trigger:hover span { background-color: #fff; }

.menu-trigger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-trigger.active span:nth-child(2) { opacity: 0; }
.menu-trigger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.slide-menu { position: fixed; top: 0; right: 0; width: 300px; height: 100vh; background-color: var(--bg-wrapper); border-left: 4px solid var(--color-denim-dark); z-index: 999; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); overflow-y: auto; }
.slide-menu.active { transform: translateX(0); }
.menu-content { padding: 80px 40px; }
.menu-title { font-family: var(--font-serif); font-size: 2rem; font-weight: bold; margin-bottom: 2rem; border-bottom: 2px dashed var(--color-stitch); color: var(--color-denim-dark); }
.menu-list { list-style: none; padding: 0; }
.menu-link { display: block; padding: 15px 0; font-size: 1.2rem; color: var(--text-main); text-decoration: none; border-bottom: 1px solid #ddd; transition: color 0.3s; }
.menu-footer { margin-top: auto; padding-top: 2rem; font-size: 0.875rem; color: var(--color-denim-light); text-align: center; }
.menu-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(24, 36, 69, 0.6); z-index: 998; opacity: 0; visibility: hidden; transition: opacity 0.4s; }
.menu-overlay.active { opacity: 1; visibility: visible; }


/*
HEADER (Video Background)
================================================ */
header {
    position: relative;
    margin-bottom: .5rem;
    height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
    background-color: #000;
    border-bottom: 8px solid var(--color-denim-dark); /* 下線を太く */
}
.header-text {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
    text-align: center;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}
.header-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-stitch); /* ステッチカラーでアクセント */
}
.header-name {
    font-family: var(--font-serif);
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
}
.header-pattern {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    /* デニムの綾織のようなパターン */
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 3px 3px;
}
header .img-wrapper {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}
header img, header video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: var(--video-opacity);
    filter: sepia(0.3) contrast(1.1); /* 少しヴィンテージ感を出すフィルター */
}

/*
GENEALOGY LAYOUT (Vintage Denim Tree)
================================================ */
main.main-content {
    width: 100%;
    padding: 2rem; 
    box-sizing: border-box;
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

main.main-content.page-body {
    display: block;
    height: auto;
    min-height: auto;
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.genealogy-wrapper {
    width: 100%;
    max-width: 1400px;
    background-color: var(--bg-wrapper);
    border-radius: var(--radius-card);
    /* 枠線を二重線にしてクラシックに */
    border: 1px solid #e0dcd0;
    outline: 4px solid transparent; 
    box-shadow: 
        0 0 0 4px var(--bg-body), /* 隙間 */
        0 0 0 6px var(--color-denim-dark), /* 外枠 */
        0 20px 50px rgba(0,0,0,0.1);
    padding: 4rem;
    position: relative;
}

/* Title */
.genealogy-title {
    font-family: var(--font-serif);
    text-align: center;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    color: var(--color-denim-dark);
    margin-bottom: 4rem;
    letter-spacing: 0.1em;
    position: relative;
    display: inline-block;
    width: 100%;
}
/* タイトルの装飾（ロープ風） */
.genealogy-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        var(--color-denim-dark),
        var(--color-denim-dark) 4px,
        #fff 4px,
        #fff 6px
    );
    margin: 1rem auto 0;
    border-radius: 4px;
}

/* --- Tree Structure --- */
.genealogy-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* 1. Sources Row (Top) */
.sources-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.source-node {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.node-content {
    width: 100%;
    max-width: 380px;
    background: #fff;
    /* 写真のような白い枠 */
    padding: 10px 10px 20px 10px;
    border: 1px solid #ddd;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s;
    position: relative;
}
/* マスキングテープ風の装飾（オプション） */
.node-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background-color: rgba(220, 200, 180, 0.7);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    z-index: 5;
    opacity: 0.8;
}

.node-content:hover {
    transform: translateY(-5px) rotate(1deg);
}

/* 接続点：デニムのステッチ（点線）に変更 */
.connector-point {
    width: 0;
    border-left: 2px dashed var(--color-line);
    height: 50px; 
    margin-top: 5px;
}

/* Badge (Tag Style) */
.badge-wrapper {
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 10;
}
.badge {
    display: inline-block;
    background-color: var(--color-denim-dark);
    color: var(--color-stitch); /* 金文字 */
    padding: 0.4rem 1.2rem;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    letter-spacing: 0.1em;
    /* ステッチ風の枠線 */
    border: 1px dashed var(--color-stitch);
}

/* Image Card */
.card-visual {
    position: relative;
    overflow: hidden;
    background-color: #eee;
    aspect-ratio: 4/3;
    border: 1px solid #ccc; /* 写真の縁 */
}
.visual-link {
    display: block;
    width: 100%;
    height: 100%;
}
.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.05) saturate(0.9); /* レトロ調 */
    transition: transform 0.5s ease;
}
.card-visual:hover img {
    transform: scale(1.05);
}

/* MORE Button (Denim Label Style) */
.btn-more {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--color-denim-dark);
    color: #fff;
    padding: 0.4rem 1rem;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s;
    z-index: 10;
    border: 1px solid var(--color-stitch);
}
.btn-more:hover {
    background: var(--color-accent);
    border-color: #fff;
}

/* Info Table (Receipt Style) */
.info-table {
    margin-top: 1rem;
    border-top: 2px dotted #ccc;
    padding-top: 0.5rem;
}
.info-table dl {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-row {
    display: flex;
    font-size: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}
.info-row:last-child {
    border-bottom: none;
}
.info-row dt {
    color: var(--color-denim-light);
    padding: 0.3rem;
    width: 30%;
    text-align: left;
    font-weight: 700;
    font-family: var(--font-serif);
}
.info-row dd {
    background-color: transparent; /* 背景なし */
    color: var(--text-main);
    padding: 0.3rem;
    width: 70%;
    font-weight: 600;
    text-align: right;
}


/* 2. Lines Area (Center) */
.tree-lines-area {
    position: relative;
    width: 100%;
    height: 50px; 
}

/* 横線：ステッチ風（点線） */
.line-horizontal {
    position: absolute;
    top: 0; 
    left: 16.666%;
    right: 16.666%;
    height: 0;
    border-top: 2px dashed var(--color-line);
}

/* 中央縦線：ステッチ風 */
.line-vertical-center {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 100%;
    border-left: 2px dashed var(--color-line);
}


/* 3. Product Row (Bottom) */
.product-row {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 0;
}

.product-node {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 商品上部の接続線 */
.product-node::before {
    content: '';
    display: block;
    width: 0;
    border-left: 2px dashed var(--color-line);
    height: 40px; 
    margin-bottom: 10px;
}

.product-visual {
    width: 100%;
    aspect-ratio: 16/9; 
    /* 写真の縁取り */
    background: #fff;
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
    position: relative;
}
/* 四隅にリベット（飾り） */
.product-visual::after {
    content: '';
    position: absolute;
    top: 5px; right: 5px;
    width: 8px; height: 8px;
    background: var(--color-stitch);
    border-radius: 50%;
    box-shadow: inset 1px 1px 1px rgba(0,0,0,0.3);
}

.product-visual img {
    object-position: center;
    filter: saturate(1.1);
}


/* ② 貢献度ゲージ (Vintage Style) */
.contribution-gauge-wrapper {
    width: 100%;
    background: #fdfdfd;
    padding: 2rem;
    border: 1px solid #ddd;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
    position: relative;
}
/* 縫い目のような枠線 */
.contribution-gauge-wrapper::before {
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px dashed #ccc;
    pointer-events: none;
}

.gauge-title {
    margin-bottom: 1rem;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--color-denim-dark);
    text-align: center;
    letter-spacing: 0.1em;
}

.gauge-bar {
    width: 100%;
    height: 36px;
    background-color: #eee;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    border: 1px solid #ccc;
}

.gauge-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-family: var(--font-serif);
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.5s ease;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
    /* 布地のようなテクスチャ */
    background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.1) 2px, rgba(255,255,255,0.1) 4px);
}

/* 各セグメントの色指定 (Vintage Tones) */
.segment-1 { background-color: var(--gauge-color-1); }
.segment-2 { background-color: var(--gauge-color-2); }
.segment-3 { background-color: var(--gauge-color-3); }

/* 凡例 (Legend) */
.gauge-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--color-denim-dark);
    font-family: var(--font-serif);
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.1);
}
.legend-color.color-1 { background-color: var(--gauge-color-1); }
.legend-color.color-2 { background-color: var(--gauge-color-2); }
.legend-color.color-3 { background-color: var(--gauge-color-3); }


/* Copyright */
.copyright-bottom-area {
    margin-top: 4rem;
    text-align: center;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-denim-light);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}


/* SMARTPHONE RESPONSIVE CSS
   ----------------------------------------
*/
@media (max-width: 900px) {

    /* ヘッダーテキストの位置調整 (追加) */
    .header-text {
        justify-content: flex-start; /* 垂直方向：上揃え */
        padding-top: 25vh; /* 上から25%の位置に配置（お好みで調整してください） */
    }

    main.main-content {
        padding: 2rem 1rem;
    }
    .genealogy-wrapper {
        padding: 30px 15px;
    }

    /* 縦並び */
    .sources-row {
        flex-direction: column;
        gap: 0; /* 隙間を詰めて線を繋げる */
    }
    
    /* 横線を消す */
    .tree-lines-area {
        display: none;
    }
    
    /* 各Sourceの下の線 */
    .connector-point {
        height: 3rem; 
        margin-top: 0;
        position: relative;
    }
    
    /* 最後のソースの下の線を長く伸ばしてProductへ繋げる */
    .source-node:last-child .connector-point {
        height: 3rem; 
    }

    /* 商品上の線を復活させ、上から繋がっているように見せる */
    .product-node::before {
        display: block;
        height: 2rem;
        margin-top: -10px; /* 位置微調整 */
        margin-bottom: 10px;
    }
    
    .product-visual {
        aspect-ratio: 4/3; 
    }
    
    /* スマホでのゲージ調整 */
    .gauge-bar {
        height: 24px;
    }
    .gauge-segment span {
        font-size: 0.6rem;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    background-color: #000;
    color: #fff;
    scroll-snap-align: end;
}

/* PC表示時のヘッダーサイズ調整
---------------------------------------- */
@media (min-width: 900px) {
    .header-name {
        font-size: 8rem;
    }
    .header-title {
        font-size: 2rem;
    }
}

/*
LOADING SCREEN
================================================ */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-body); 
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    width: 600px;
    max-width: 90%;
    height: auto;
    animation: loadingPulse 2s infinite ease-in-out;
}

@keyframes loadingPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}


/* COMMON NAVIGATION BUTTONS (共通の下部ナビゲーション) */
.bottom-nav {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* デザイン */
    background-color: #fff;
    color: var(--color-denim-dark);
    padding: 1.2rem 4rem;
    border-radius: 50px;
    
    /* テキスト */
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    
    /* 装飾 */
    border: 2px solid var(--color-denim-dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    
}

/* ホバー時の挙動 */
.btn-back:hover {
    
    background-color: var(--color-denim-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(24, 36, 69, 0.3);
    border-color: var(--color-denim-dark);
}

/* 押した感じ */
.btn-back:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}