/* ========================================
   五徳珈琲 公式サイト - 古風な和のスタイル
   白黒基調 + 和紙テクスチャ + 墨の濃淡
======================================== */

/* ========================================
   カラーパレット - 白黒基調
======================================== */
:root {
    /* 和紙調の濁った白系 */
    --color-white: #F8F6F0;
    --color-off-white: #F5F3ED;
    --color-paper: #F2F0E8;
    --color-ivory: #EBE9E0;
    
    /* 黒系・墨系 */
    --color-black: #0A0A0A;
    --color-charcoal: #1A1A1A;
    --color-ink: #2A2A2A;
    --color-gray-dark: #3A3A3A;
    --color-gray: #6A6A6A;
    --color-gray-light: #9A9A9A;
    --color-border: #D8D6CE;
    --color-divider: #E0DED6;
    
    /* フォント */
    --font-serif: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', serif;
    --font-display: 'Zen Old Mincho', 'Noto Serif JP', serif;
    
    /* スペーシング（余白を広く） */
    --section-padding: 140px;
    --section-padding-mobile: 100px;
    --container-max-width: 1200px;
    
    /* トランジション */
    --transition-smooth: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}

/* ========================================
   リセット & ベース
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-serif);
    color: var(--color-charcoal);
    background-color: var(--color-paper);
    background-image: 
        repeating-linear-gradient(90deg, rgba(0,0,0,0.01) 0px, transparent 1px, transparent 40px, rgba(0,0,0,0.01) 41px),
        repeating-linear-gradient(0deg, rgba(0,0,0,0.01) 0px, transparent 1px, transparent 40px, rgba(0,0,0,0.01) 41px);
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* 和紙テクスチャオーバーレイ - より強く */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="200" height="200" filter="url(%23noise)" opacity="0.05"/></svg>'),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

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

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

/* ========================================
   コンテナ & レイアウト
======================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 2;
}

/* ========================================
   ナビゲーション
======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-divider);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 40px;
    width: auto;
    filter: contrast(1.1);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.nav-link {
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--color-charcoal);
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-black);
    border-bottom-color: var(--color-black);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: var(--color-charcoal);
    transition: var(--transition-fast);
}

.cart-link:hover {
    color: var(--color-black);
}

.cart-badge {
    background: var(--color-black);
    color: var(--color-white);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-black);
    transition: var(--transition-fast);
}

/* ========================================
   ヒーローセクション
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(180deg, var(--color-off-white) 0%, var(--color-paper) 100%);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-logo-container {
    margin-bottom: 60px;
}

.hero-logo {
    margin-bottom: 60px;
}

.hero-logo-symbol {
    height: 120px;
    width: auto;
    margin: 0 auto;
    opacity: 0.9;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--color-black);
    margin-bottom: 40px;
    line-height: 1.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.03);
    position: relative;
}

/* 筆文字風エフェクト */
.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-ink), transparent);
    opacity: 0.3;
}

.hero-subtitle {
    font-size: 18px;
    letter-spacing: 0.3em;
    color: var(--color-gray);
    font-weight: 300;
}

.hero-scroll {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-text {
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--color-gray);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--color-gray) 0%, transparent 100%);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* ========================================
   MVVセクション（理念・展望・価値観）
======================================== */
.mvv-section {
    background: var(--color-white);
    border-top: 1px solid var(--color-divider);
    border-bottom: 1px solid var(--color-divider);
    padding: 100px 0;
}

.mvv-container {
    max-width: 900px;
    margin: 0 auto;
}

.mvv-item {
    text-align: center;
    margin-bottom: 100px;
}

.mvv-item:last-child {
    margin-bottom: 0;
}

.mvv-label {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.25em;
    color: var(--color-gray);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.mvv-content {
    font-size: 24px;
    line-height: 2;
    color: var(--color-black);
    letter-spacing: 0.1em;
    font-weight: 400;
}

/* 価値観リスト */
.value-list {
    list-style: none;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.value-item {
    text-align: center;
    padding: 20px 0;
}

.value-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 500;
    color: var(--color-black);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.value-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-ink);
    letter-spacing: 0.05em;
}

/* 理念の説明 */
.philosophy-intro,
.philosophy-practice {
    margin-top: 60px;
    text-align: center;
}

.philosophy-intro p,
.philosophy-practice p {
    font-size: 15px;
    line-height: 2;
    color: var(--color-ink);
    margin-bottom: 20px;
}

.philosophy-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.philosophy-list li {
    font-size: 14px;
    color: var(--color-charcoal);
    letter-spacing: 0.05em;
}

/* ========================================
   ブランドコンセプトセクション
======================================== */
.concept-section {
    background: var(--color-off-white);
    text-align: center;
}

.concept-content {
    max-width: 800px;
    margin: 0 auto;
}

.lead-text {
    font-size: 24px;
    line-height: 2.2;
    color: var(--color-black);
    margin-bottom: 40px;
    letter-spacing: 0.1em;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.02);
}

.section-title-small {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--color-black);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.03);
}

/* 筆文字風アンダーライン */
.section-title-small::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-ink), transparent);
    opacity: 0.4;
}

.section-title-center {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--color-black);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    display: inline-block;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.03);
}

.section-title-center::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-ink), transparent);
    opacity: 0.4;
}

.section-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: var(--color-black);
    margin-bottom: 30px;
}

.section-subtitle {
    font-size: 16px;
    letter-spacing: 0.2em;
    color: var(--color-gray);
    margin-bottom: 60px;
}

.section-text {
    max-width: 700px;
    margin: 0 auto;
}

.body-text {
    font-size: 24px;
    line-height: 2.2;
    color: var(--color-ink);
    margin-bottom: 30px;
    letter-spacing: 0.1em;
}

.mt-2 {
    margin-top: 40px;
}

/* 区切り線（より繊細に） */
.divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-ink), transparent);
    margin: 80px auto;
    opacity: 0.5;
}

/* ========================================
   五徳セクション
======================================== */
.virtues-section {
    background: var(--color-ivory);
}

.virtues-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.virtue-item {
    text-align: center;
    padding: 40px 20px;
    transition: var(--transition-smooth);
}

.virtue-item:hover {
    transform: translateY(-5px);
}

.virtue-kanji {
    font-family: var(--font-display);
    font-size: 72px;
    font-weight: 400;
    color: var(--color-black);
    margin-bottom: 15px;
    line-height: 1;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.04);
    position: relative;
}

.virtue-reading {
    font-size: 14px;
    letter-spacing: 0.3em;
    color: var(--color-gray);
}

.virtues-link {
    text-align: center;
    margin-top: 40px;
}

/* ========================================
   商品セクション
======================================== */
.product-section {
    text-align: center;
    background: var(--color-paper);
}

.product-preview-section {
    background: var(--color-off-white);
    text-align: center;
}

.product-preview-content {
    max-width: 800px;
    margin: 0 auto;
}

.mt-3 {
    margin-top: 60px;
}

/* ========================================
   YouTubeセクション
======================================== */
.youtube-section {
    background: var(--color-ivory);
    text-align: center;
}

.youtube-content {
    max-width: 1000px;
    margin: 0 auto;
}

.youtube-video {
    max-width: 800px;
    margin: 0 auto 40px;
}

.youtube-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    letter-spacing: 0.1em;
    color: var(--color-black);
    border: 2px solid var(--color-black);
    padding: 16px 40px;
    transition: var(--transition-fast);
}

.youtube-link:hover {
    background: var(--color-black);
    color: var(--color-white);
}

.cf-image {
    max-width: 600px;
    margin: 40px auto;
    border: 1px solid var(--color-divider);
}

.cf-caption {
    font-size: 14px;
    line-height: 1.9;
    color: var(--color-ink);
    max-width: 700px;
    margin: 0 auto;
}

.crowdfunding-success {
    margin-top: 60px;
}

.crowdfunding-success img {
    display: block;
    margin: 0 auto;
}

/* ========================================
   卸・仕入れセクション
======================================== */
.wholesale-section {
    background: var(--color-paper);
    text-align: center;
}

.wholesale-preview-section {
    background: var(--color-off-white);
    text-align: center;
}

.wholesale-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Contactセクション
======================================== */
.contact-section {
    background: var(--color-ivory);
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-symbol {
    margin-bottom: 30px;
}

.contact-logo {
    height: 80px;
    width: auto;
    margin: 0 auto;
    opacity: 0.9;
}

.contact-text {
    font-size: 16px;
    line-height: 2;
    color: var(--color-ink);
    margin-bottom: 40px;
}

.contact-button-wrapper {
    display: flex;
    justify-content: center;
}

.contact-button {
    display: inline-block;
    font-size: 16px;
    letter-spacing: 0.15em;
    color: var(--color-black);
    border: 2px solid var(--color-black);
    padding: 18px 60px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    cursor: pointer;
}

.contact-button:hover {
    background: var(--color-black);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* ========================================
   ボタン
======================================== */
.btn-primary,
.text-link {
    display: inline-block;
    font-size: 15px;
    letter-spacing: 0.15em;
    color: var(--color-black);
    border: 1px solid var(--color-black);
    padding: 16px 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover,
.text-link:hover {
    background: var(--color-black);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.text-link {
    border: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-black);
}

.text-link:hover {
    transform: translateY(0);
    box-shadow: none;
    border-bottom-color: transparent;
}

/* ========================================
   フッター
======================================== */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 60px 0 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo-image {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-nav {
    display: flex;
    gap: 30px;
    list-style: none;
}

.footer-link {
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--color-white);
    opacity: 0.8;
    transition: var(--transition-fast);
}

.footer-link:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-copyright {
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--color-white);
    opacity: 0.6;
}

/* ========================================
   アニメーション - スクロール連動（滑らかに改善）
======================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.4s cubic-bezier(0.4, 0, 0.2, 1), transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.scale-up {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-up.revealed {
    opacity: 1;
    transform: scale(1);
}

/* 文字スライドアニメーション */
.slide-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* 一文字ずつ浮かぶアニメーション */
.char-animation {
    display: inline-block;
}

.char-animation span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: charFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes charFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 一文字ずつの遅延 */
.char-animation span:nth-child(1) { animation-delay: 0s; }
.char-animation span:nth-child(2) { animation-delay: 0.05s; }
.char-animation span:nth-child(3) { animation-delay: 0.1s; }
.char-animation span:nth-child(4) { animation-delay: 0.15s; }
.char-animation span:nth-child(5) { animation-delay: 0.2s; }
.char-animation span:nth-child(6) { animation-delay: 0.25s; }
.char-animation span:nth-child(7) { animation-delay: 0.3s; }
.char-animation span:nth-child(8) { animation-delay: 0.35s; }
.char-animation span:nth-child(9) { animation-delay: 0.4s; }
.char-animation span:nth-child(10) { animation-delay: 0.45s; }
.char-animation span:nth-child(11) { animation-delay: 0.5s; }
.char-animation span:nth-child(12) { animation-delay: 0.55s; }
.char-animation span:nth-child(13) { animation-delay: 0.6s; }
.char-animation span:nth-child(14) { animation-delay: 0.65s; }
.char-animation span:nth-child(15) { animation-delay: 0.7s; }
.char-animation span:nth-child(16) { animation-delay: 0.75s; }
.char-animation span:nth-child(17) { animation-delay: 0.8s; }
.char-animation span:nth-child(18) { animation-delay: 0.85s; }
.char-animation span:nth-child(19) { animation-delay: 0.9s; }
.char-animation span:nth-child(20) { animation-delay: 0.95s; }

/* アニメーション遅延（滑らかなタイミング） */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }

/* ========================================
   レスポンシブデザイン - タブレット
======================================== */
@media (max-width: 1024px) {
    :root {
        --section-padding: 100px;
    }
    
    .container {
        padding: 0 30px;
    }
    
    .nav-container {
        padding: 20px 30px;
    }
    
    .virtues-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* ========================================
   レスポンシブデザイン - モバイル
======================================== */
@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 15px 20px;
    }
    
    /* ハンバーガーメニュー表示 */
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 71px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
        border-bottom: 1px solid var(--color-divider);
    }
    
    .nav-menu.active {
        max-height: 500px;
    }
    
    .nav-menu li {
        padding: 15px 20px;
        border-bottom: 1px solid var(--color-divider);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .hero-title {
        font-size: 32px;
        letter-spacing: 0.15em;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-logo-symbol {
        height: 80px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .body-text {
        font-size: 15px;
    }
    
    .virtues-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .virtue-kanji {
        font-size: 56px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .virtues-grid {
        grid-template-columns: 1fr;
    }
}