/* --- 共通設定 --- */
html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; font-family: 'Helvetica Neue', Arial, sans-serif; background-color: #F8F9FA; color: #333; overflow-x: hidden; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 40px;
}

/* PC版のセクション余白 */
.section-padding { padding: 100px 0; }

/* --- ロード画面 --- */
#loader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #F8F9FA;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.loaded { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; }
.cube-wrapper { perspective: 800px; width: 60px; height: 60px; margin: 0 auto 30px; }
.cube { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; animation: rotateCube 3s infinite linear; }
.face { position: absolute; width: 60px; height: 60px; background: rgba(29, 195, 204, 0.4); border: 1.5px solid #FFFFFF; box-shadow: 0 0 10px rgba(29, 195, 204, 0.1); }
.front  { transform: translateZ(30px); }
.back   { transform: rotateY(180deg) translateZ(30px); }
.right  { transform: rotateY(90deg) translateZ(30px); }
.left   { transform: rotateY(-90deg) translateZ(30px); }
.top    { transform: rotateX(90deg) translateZ(30px); }
.bottom { transform: rotateX(-90deg) translateZ(30px); }
@keyframes rotateCube { 0% { transform: rotateX(0deg) rotateY(0deg); } 100% { transform: rotateX(360deg) rotateY(360deg); } }
#progress-text { font-size: 1.2rem; font-weight: 300; color: #1DC3CC; letter-spacing: 0.15em; }

/* --- ヘッダー --- */
header { background: rgba(248, 249, 250, 0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 1000; height: 60px; display: flex; align-items: center; }
header .container { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; position: relative; }
h1 { font-size: 1.1rem; letter-spacing: 0.15em; font-weight: 500; margin: 0; }
.menu-icon { width: 25px; height: 18px; position: relative; cursor: pointer; z-index: 2000; padding: 10px; display: flex; align-items: center; }
.menu-icon span { display: block; position: absolute; width: 25px; height: 1.5px; background-color: #333; transition: 0.3s; left: 10px; }
.menu-icon span:nth-child(1) { top: 12px; }
.menu-icon span:nth-child(2) { top: 18px; }
.menu-icon span:nth-child(3) { top: 24px; }
.menu-icon.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); background-color: #1DC3CC; }
.menu-icon.open span:nth-child(2) { opacity: 0; }
.menu-icon.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background-color: #1DC3CC; }
nav { position: absolute; top: 55px; right: 40px; width: 180px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-radius: 4px; box-shadow: 0 15px 40px rgba(0,0,0,0.08); opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1); z-index: 1500; }
nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
nav ul { list-style: none; padding: 10px 0; margin: 0; text-align: center; }
nav a { display: block; padding: 15px 0; text-decoration: none; color: #333; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.1em; transition: 0.2s; }
nav a:hover { background-color: rgba(29, 195, 204, 0.7); color: #fff; }

/* --- セクションタイトル --- */
.section-title { text-align: center; font-size: 1.5rem; letter-spacing: 0.2em; font-weight: 400; display: block; width: fit-content; margin: 0 auto 50px; padding: 0 5px 5px; border-bottom: 1px solid #1DC3CC; }

/* --- メインビジュアル --- */
.hero-full { width: 100vw; height: calc(100vh - 60px); background-color: #F8F9FA; overflow: hidden; }
.slideshow { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.8s ease-in-out; }
.slide.active { opacity: 1; }

/* --- About --- */
.about-flex { display: flex; align-items: center; justify-content: center; gap: 80px; max-width: 900px; margin: 0 auto; }
.profile-img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; filter: grayscale(10%); }
.about-text h3 { color: #1DC3CC; font-size: 1.4rem; margin-bottom: 20px; font-weight: 500; }
.about-text p { line-height: 2.2; font-size: 0.95rem; color: #666; margin-bottom: 30px; }
.inline-link { color: #1DC3CC; transition: opacity 0.3s; text-decoration: underline; }
.inline-link:hover { opacity: 0.7; }
.sns-links { display: flex; flex-wrap: wrap; gap: 10px; }
.sns-button { display: inline-block; padding: 8px 20px; border: 1px solid #1DC3CC; color: #1DC3CC; text-decoration: none; border-radius: 30px; font-size: 0.75rem; transition: 0.4s; }
.sns-button:hover { background: #1DC3CC; color: #fff; box-shadow: 0 5px 15px rgba(29, 195, 204, 0.3); }
.sns-button .small-text { font-size: 0.65rem; margin-left: 3px; color: inherit; }

/* --- ギャラリー --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }

.grid-item { 
    position: relative; 
    background: #fff; /* ホバー時に白く見せるため背景を白に */
    border-radius: 2px; 
    overflow: hidden; 
    aspect-ratio: 1 / 1; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); 
}

.grid-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    cursor: pointer; 
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.4s ease; 
}

/* ホバー時の状態：画像を白く透過させる */
.grid-item:hover img { 
    transform: scale(1.05); 
    opacity: 0.6; /* 数値を下げるとより白さが増します */
}

/* ホバー時の黒グラデーション（範囲を20%に凝縮） */
.grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 下から20%の範囲に限定 */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 20%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.overlay-text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4); 
}

.grid-item:hover .grid-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* --- ライトボックス --- */
.lightbox { 
    display: none; 
    position: fixed; 
    z-index: 9999; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0.7); 
    justify-content: center; 
    align-items: center; 
    backdrop-filter: blur(4px); 
}

/* 拡大画像とキャプションを包むコンテナ */
.lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content { 
    max-width: 100%; 
    max-height: 85vh; /* キャプション表示分を少し確保 */
    object-fit: contain; 
    animation: fadeInScale 0.25s ease-out;
}

/* ライトボックス内のタイトル表示 */
.lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* 下部からのグラデーション */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    padding: 40px 20px 20px;
    box-sizing: border-box;
    text-align: left;
    font-size: 1rem;
    letter-spacing: 0.1em;
    pointer-events: none;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }

/* --- Contact --- */
.contact-desc-container { 
    text-align: center; 
    max-width: 600px; 
    margin: 0 auto 30px;    
}
.contact-desc { 
    display: inline-block; 
    text-align: left; 
    line-height: 2.2; 
    font-size: 0.95rem; 
    color: #666; 
    margin: 0; 
    padding-left: 150px; 
    box-sizing: border-box;
}
.email-link { 
    color: #1DC3CC; 
    text-decoration: underline; 
    cursor: pointer; 
    transition: opacity 0.3s; 
}
.email-link:hover { 
    opacity: 0.7; 
}
.copy-message { display: inline-block; margin-left: 10px; font-size: 0.7rem; color: #fff; background: #333; padding: 3px 10px; border-radius: 4px; opacity: 0; visibility: hidden; transition: all 0.3s; }
.copy-message.show { opacity: 1; visibility: visible; }
.form-wrapper { max-width: 600px; margin: 0 auto; padding: 40px; background: #fff; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.03); border: 1px solid #eee; }
.form-item { margin-bottom: 25px; text-align: left; }
.form-item label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; color: #1DC3CC; }
.form-item label .required-mark { color: #FD757F; margin-left: 2px; font-size: 1.4rem; vertical-align: middle; line-height: 0; }
.form-item input, .form-item textarea { width: 100%; padding: 15px; border: 1px solid #eee; border-radius: 8px; font-size: 1rem; background-color: #fafafa; box-sizing: border-box; transition: all 0.3s; font-family: inherit; }
.form-item textarea { height: 280px; resize: none; }
.form-item input:focus, .form-item textarea:focus { outline: none; border-color: #1DC3CC; background-color: #fff; box-shadow: 0 0 0 4px rgba(29, 195, 204, 0.1); }
.form-submit { text-align: center; margin-top: 30px; }
.submit-btn { background: #fff; cursor: pointer; padding: 15px 80px !important; font-size: 1rem !important; font-weight: 500; border: 1px solid #1DC3CC; color: #1DC3CC; border-radius: 30px; transition: all 0.3s; }
.submit-btn:hover { background: #1DC3CC; color: #fff; }

/* --- TOPに戻るボタン --- */
.back-to-top { position: fixed; right: 30px; bottom: 30px; width: 50px; height: 50px; background-color: rgba(29, 195, 204, 0.8); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; text-decoration: none; z-index: 999; opacity: 0; visibility: hidden; transition: all 0.4s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top .arrow { display: block; width: 10px; height: 10px; border-top: 2px solid #fff; border-right: 2px solid #fff; transform: rotate(-45deg); margin-top: 5px; }

footer { text-align: center; padding: 100px 0; color: #ccc; font-size: 0.7rem; letter-spacing: 0.1em; }

/* --- レスポンシブ --- */
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section-padding { padding: 80px 0; }
    .section-title { margin-bottom: 40px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .about-flex { flex-direction: column; gap: 40px; }
    .about-text { text-align: left; max-width: 320px; margin: 0 auto; }
    .about-text h3 { text-align: center; }
    .sns-links { justify-content: center; }
    .contact-desc { padding-left: 0; max-width: 340px; width: 100%; }
    .form-wrapper { padding: 30px 20px; margin: 0 auto; max-width: 320px; }
    .form-item textarea { height: 280px; }
}