@charset "UTF-8";

/* ===================================================
   デジタルお手紙・自分史LP — 田中はる
   テーマ: 上品なミニマル × ぬくもり
   =================================================== */

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
    font-family: 'Zen Maru Gothic', 'Noto Serif JP', serif;
    background: #fdfbf7; color: #333; line-height: 1.9;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

:root {
    --navy: #1a2a3a;
    --cream: #fdfbf7;
    --cream-dark: #f5f0e8;
    --white: #ffffff;
    --text: #2c3540;
    --text-light: #5a6472;
    --text-muted: #8a9199;
    --accent-warm: #c4956a;
    --border-soft: rgba(26,42,58,0.08);
    --shadow-soft: rgba(26,42,58,0.06);
}

/* ===== ヘッダー（すりガラス） ===== */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(253,251,247,0.55);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(255,255,255,0.4);
    transition: box-shadow 0.4s ease;
}
.site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.07); }

.header-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 40px;
    height: 72px; display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
    font-family: 'Noto Serif JP', serif; font-weight: 600;
    font-size: 1.15rem; color: var(--navy); letter-spacing: 0.08em;
}
.header-logo-sub {
    font-weight: 400; font-size: 0.75rem; color: #6b5c4d;
    margin-left: 8px; letter-spacing: 0.05em;
}
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a {
    font-size: 0.85rem; font-weight: 500; color: var(--text-light);
    letter-spacing: 0.03em; transition: color 0.3s; position: relative;
}
.header-nav a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 1px; background: var(--accent-warm); transition: width 0.3s;
}
.header-nav a:hover { color: var(--navy); }
.header-nav a:hover::after { width: 100%; }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; background: none; border: none; padding: 8px; z-index: 200;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== 共通 ===== */
.container { max-width: 960px; margin: 0 auto; padding: 0 40px; }
.bg-white { background: var(--white); }
.bg-cream { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-dark) 100%); }
.section-padding { padding: 100px 0; }

.section-label-center { text-align: center; margin-bottom: 12px; }
.label-number { font-family: 'Noto Serif JP', serif; font-size: 0.85rem; font-weight: 600; color: var(--accent-warm); letter-spacing: 0.1em; }
.label-text { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.2em; margin-left: 12px; }

.section-title-center {
    font-family: 'Noto Serif JP', serif; font-size: 1.8rem; font-weight: 600;
    color: var(--navy); text-align: center; margin-bottom: 48px; line-height: 1.5; letter-spacing: 0.05em;
}
.section-title-center::after {
    content: ''; display: block; width: 40px; height: 1px;
    background: var(--accent-warm); margin: 20px auto 0;
}
.section-intro { text-align: center; font-size: 1.05rem; color: var(--text-light); margin-top: -24px; margin-bottom: 48px; }

/* ===== 01. ヒーロー（全面背景＋右端テキストカード） ===== */
.hero-section {
    position: relative; width: 100%; height: 85vh; min-height: 540px;
    display: flex; overflow: hidden;
}
.hero-bg-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: 25% top; z-index: 1;
    image-rendering: -webkit-optimize-contrast;
    filter: contrast(1.06) saturate(1.1);
}
/* 左側の人物は完全透明、右端だけ薄く白 */
.hero-overlay {
    position: absolute; inset: 0; z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(253,251,247,0.0) 0%,
        rgba(253,251,247,0.0) 40%,
        rgba(253,251,247,0.3) 55%,
        rgba(253,251,247,0.7) 70%,
        rgba(253,251,247,0.9) 100%
    );
}
/* テキストを右側に寄せる */
.hero-text-area {
    position: relative; z-index: 3; width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
    padding: 88px 5% 40px;
}
.hero-card {
    max-width: 440px; text-align: left;
    background: rgba(253,251,247,0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 24px;
    padding: 48px 44px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 40px rgba(26,42,58,0.1);
}
.hero-label {
    font-size: 0.8rem; font-weight: 500; color: var(--accent-warm);
    letter-spacing: 0.2em; text-transform: uppercase; display: block; margin-bottom: 12px;
}
.hero-name {
    font-family: 'Noto Serif JP', serif; font-size: 3.4rem; font-weight: 700;
    color: var(--navy); letter-spacing: 0.15em; line-height: 1.3; margin-bottom: 0;
}
.hero-divider { width: 44px; height: 1px; background: var(--accent-warm); margin: 24px 0; }
.hero-catchcopy {
    font-family: 'Noto Serif JP', serif; font-size: 1.45rem; font-weight: 500;
    color: var(--navy); line-height: 1.9; margin-bottom: 14px; letter-spacing: 0.06em;
}
.hero-sub { font-size: 1rem; color: var(--text-light); letter-spacing: 0.08em; }
.hero-scroll-hint {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 8px; margin-top: auto;
}
.hero-scroll-hint span { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.2em; }
.scroll-line { width: 1px; height: 40px; background: var(--text-muted); opacity: 0.4; animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0.4; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 0.8; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.4; }
}

/* ===== 02. 便箋カード ===== */
.letter-card {
    max-width: 800px; margin: 0 auto; background: var(--white); border-radius: 16px;
    overflow: hidden; box-shadow: 0 2px 8px var(--shadow-soft), 0 8px 32px rgba(26,42,58,0.08);
    border: 1px solid var(--border-soft);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s cubic-bezier(0.16,1,0.3,1);
}
.letter-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(26,42,58,0.1); }
.letter-card-inner { display: flex; flex-direction: column; }
.letter-photo { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.letter-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.letter-card:hover .letter-photo img { transform: scale(1.03); }
.letter-body {
    padding: 48px 48px 40px;
    background-image: repeating-linear-gradient(transparent, transparent 39px, rgba(26,42,58,0.05) 39px, rgba(26,42,58,0.05) 40px);
    background-position: 0 8px;
}
.letter-opening { font-family: 'Noto Serif JP', serif; font-size: 1rem; color: var(--accent-warm); margin-bottom: 24px; letter-spacing: 0.15em; }
.letter-text { font-size: 1.05rem; color: var(--text); line-height: 2.2; }
.letter-highlight { display: inline; background: linear-gradient(transparent 60%, rgba(196,149,106,0.15) 60%); font-weight: 500; }
.letter-closing { font-family: 'Noto Serif JP', serif; font-size: 1rem; color: var(--accent-warm); text-align: right; margin-top: 32px; letter-spacing: 0.15em; }

/* ===== 03. 趣味カード ===== */
.hobby-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; }
.hobby-card {
    background: var(--cream); border-radius: 16px; overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-soft); border: 1px solid var(--border-soft);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s cubic-bezier(0.16,1,0.3,1);
}
.hobby-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(26,42,58,0.12); }
.hobby-card-photo { width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.hobby-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.hobby-card:hover .hobby-card-photo img { transform: scale(1.05); }
.hobby-card-body { padding: 28px 28px 32px; }
.hobby-card-title { font-family: 'Noto Serif JP', serif; font-size: 1.2rem; font-weight: 600; color: var(--navy); margin-bottom: 16px; letter-spacing: 0.05em; }
.hobby-card-text { font-size: 1rem; color: var(--text-light); line-height: 2; }

/* ===== 04. 歩み ===== */
.history-block { max-width: 800px; margin: 0 auto; display: flex; gap: 48px; align-items: flex-start; }
.history-photo {
    flex: 0 0 320px; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px var(--shadow-soft);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s cubic-bezier(0.16,1,0.3,1);
}
.history-photo:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(26,42,58,0.12); }
.history-photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.history-photo:hover img { transform: scale(1.03); }
.history-text { flex: 1; min-width: 0; }
.history-text p { font-size: 1.05rem; color: var(--text); line-height: 2.2; }
.history-highlight { display: inline; background: linear-gradient(transparent 60%, rgba(196,149,106,0.15) 60%); font-weight: 500; color: var(--navy); }
.history-message {
    margin-top: 32px; padding: 20px 24px; background: var(--white); border-radius: 12px;
    border-left: 3px solid var(--accent-warm); font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem !important; color: var(--navy) !important; font-weight: 500; line-height: 1.8 !important;
}

/* ===== 05. ギャラリー ===== */
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.gallery-item {
    border-radius: 12px; overflow: hidden; aspect-ratio: 1/1;
    box-shadow: 0 2px 12px var(--shadow-soft); cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s cubic-bezier(0.16,1,0.3,1);
}
.gallery-item:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(26,42,58,0.14); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.gallery-item:hover img { transform: scale(1.06); }

/* ===== 06. メッセージ ===== */
.message-block { max-width: 800px; margin: 0 auto; display: flex; gap: 48px; align-items: center; }
.message-photo {
    flex: 0 0 280px; border-radius: 50%; overflow: hidden; aspect-ratio: 1/1;
    box-shadow: 0 4px 24px var(--shadow-soft);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s cubic-bezier(0.16,1,0.3,1);
}
.message-photo:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 40px rgba(26,42,58,0.12); }
.message-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.message-body { flex: 1; min-width: 0; }
.message-text { font-size: 1.05rem; color: var(--text); line-height: 2.2; }
.message-highlight { display: inline; background: linear-gradient(transparent 60%, rgba(196,149,106,0.2) 60%); font-weight: 600; color: var(--navy); font-size: 1.1rem; }
.message-line-hint {
    margin-top: 32px; display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px; background: var(--white); border-radius: 60px;
    border: 1px solid var(--border-soft); box-shadow: 0 2px 8px var(--shadow-soft);
    font-size: 0.95rem; color: var(--text-light); font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.message-line-hint:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(26,42,58,0.1); }
.line-icon { font-size: 1.2rem; }

/* ===== 07. フッター ===== */
.site-footer { background: var(--cream-dark); padding: 48px 40px; text-align: center; }
.footer-copyright { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.1em; }
.footer-link { color: inherit; text-decoration: none; transition: opacity 0.3s; }
.footer-link:visited { color: inherit; }
.footer-link:hover { opacity: 0.55; }

/* ===== アニメーション ===== */
.reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.hero-card.reveal { transition-delay: 0.3s; }
.hobby-grid .reveal:nth-child(2) { transition-delay: 0.15s; }
.gallery-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.gallery-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* ===== レスポンシブ 768px ===== */
@media (max-width: 768px) {
    html { scroll-padding-top: 60px; }
    .container { padding: 0 20px; }
    .section-padding { padding: 64px 0; }

    .header-inner { padding: 0 16px; height: 60px; }
    .header-logo { font-size: 1rem; }
    .header-logo-sub { display: none; }
    .hamburger { display: flex; }
    .header-nav {
        position: fixed; top: 0; right: -100%; width: 70%; max-width: 280px;
        height: 100vh; background: var(--cream); flex-direction: column;
        align-items: flex-start; padding: 80px 28px 28px; gap: 0;
        box-shadow: -4px 0 20px rgba(0,0,0,0.08); transition: right 0.35s ease;
    }
    .header-nav.open { right: 0; }
    .header-nav a { font-size: 1rem; padding: 16px 0; width: 100%; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .header-nav a::after { display: none; }
    .menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 90; }
    .menu-overlay.active { display: block; }

    /* ヒーロー（スマホ：画像とテキストを完全分離） */
    .hero-section {
        min-height: auto; height: auto;
        flex-direction: column;
    }
    .hero-bg-img {
        position: relative; inset: auto;
        width: 100%; height: 60vh; min-height: 320px;
        object-position: 30% top;
    }
    .hero-overlay { display: none; }
    .hero-text-area {
        position: relative; height: auto;
        align-items: center; justify-content: center;
        padding: 40px 24px 48px;
        background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
    }
    .hero-card {
        max-width: 100%; text-align: center;
        background: none; backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none; box-shadow: none;
        border-radius: 0; padding: 0;
    }
    .hero-name { font-size: 2.4rem; letter-spacing: 0.1em; }
    .hero-catchcopy { font-size: 1.15rem; }
    .hero-sub { font-size: 0.9rem; }
    .hero-divider { margin: 16px auto; }
    .hero-scroll-hint { display: none; }

    .section-title-center { font-size: 1.4rem; margin-bottom: 36px; }
    .section-intro { font-size: 0.95rem; margin-bottom: 32px; }
    .letter-body { padding: 28px 24px 24px; }
    .letter-text { font-size: 1rem; }
    .hobby-grid { grid-template-columns: 1fr; gap: 24px; }
    .hobby-card-body { padding: 24px 24px 28px; }
    .history-block { flex-direction: column; gap: 32px; }
    .history-photo { flex: none; width: 100%; max-width: 400px; margin: 0 auto; }
    .history-photo img { aspect-ratio: 4/3; }
    .history-text p { font-size: 1rem; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gallery-grid .gallery-item:nth-child(3) { grid-column: 1 / -1; aspect-ratio: 16/9; }
    .message-block { flex-direction: column; gap: 32px; text-align: center; }
    .message-photo { flex: none; width: 200px; margin: 0 auto; }
    .message-text { font-size: 1rem; text-align: left; }
    .message-line-hint { font-size: 0.85rem; padding: 12px 20px; }
    .site-footer { padding: 32px 16px; }
}

/* ===== レスポンシブ 480px ===== */
@media (max-width: 480px) {
    .hero-name { font-size: 2rem; }
    .hero-catchcopy { font-size: 1rem; }
    .hero-sub { font-size: 0.8rem; }
    .hero-bg-img { height: 50vh; min-height: 280px; }
    .section-title-center { font-size: 1.25rem; }
    .letter-body { padding: 24px 20px 20px; background-image: none; }
    .gallery-grid { grid-template-columns: 1fr; gap: 12px; }
    .gallery-grid .gallery-item:nth-child(3) { grid-column: auto; aspect-ratio: 1/1; }
    .message-photo { width: 160px; }
}
