/* ==========================================
   グローバル設定
   ========================================== */
:root {
    --color-primary: #2A2A2A;
    --color-secondary: #FAFAFA;
    --color-accent: #C9A961;
    --color-text: #2A2A2A;
    --color-bg: #FAFAFA;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Noto Sans JP', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.8;
    font-size: 16px;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================
   ナビゲーション
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-menu a {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
    text-transform: uppercase;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s;
}

/* ==========================================
   ヒーローセクション（動画背景）
   ========================================== */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-title {
    font-family: var(--font-secondary);
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 200;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ==========================================
   イントロセクション（Sticky + パララックス）
   ========================================== */
.intro-section {
    position: relative;
    min-height: 150vh;
    overflow: hidden;
}

.intro-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/parallax-background.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 1;
}

.intro-text {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.intro-text h2 {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 400;
    line-height: 2;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.intro-text p {
    font-size: 1rem;
    line-height: 2;
    letter-spacing: 0.05em;
}

/* ==========================================
   Worksセクション
   ========================================== */
.works-section {
    padding: 150px 0;
    background: var(--color-bg);
}

.section-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 200;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 4rem;
    color: #666;
    letter-spacing: 0.1em;
}

/* マソンリーギャラリー */
.works-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    grid-auto-flow: dense;
    grid-auto-rows: 300px;
}

.work-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* サイズバリエーション（正方形・横長・縦長） */
.work-item.tall {
    grid-row: span 2;
}

.work-item.wide {
    grid-column: span 2;
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item:hover img {
    transform: scale(1.05);
}

.works-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 42, 42, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s;
    padding: 2rem;
    text-align: center;
}

.work-item:hover .works-overlay {
    opacity: 1;
}

.works-overlay h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 300;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
}

.works-overlay p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.works-buttons {
    display: flex;
    gap: 1rem;
}

.work-btn {
    padding: 0.8rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.work-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

/* VIEW ALL WORKS ボタン */
.view-all-wrapper {
    text-align: center;
    margin-top: 4rem;
}

.view-all-btn {
    display: inline-block;
    padding: 1rem 3rem;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    text-decoration: none;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 169, 97, 0.3);
}

/* ==========================================
   ライトボックス
   ========================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.lightbox-close {
    top: 2rem;
    right: 2rem;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

/* ==========================================
   フッター
   ========================================== */
.footer {
    background: var(--color-primary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h3,
.footer-column h4 {
    font-family: var(--font-primary);
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.footer-column h3 {
    font-size: 1.5rem;
}

.footer-column h4 {
    font-size: 1rem;
}

.footer-column p {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 0.5rem;
}

.footer-menu a {
    font-family: var(--font-primary);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu a:hover {
    color: var(--color-accent);
}

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

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================
   レスポンシブ
   ========================================== */
@media (max-width: 1199px) {
    .works-gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 280px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .intro-text h2 {
        font-size: 1.2rem;
    }

    .intro-text p {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        grid-auto-rows: 200px;
    }
    
    .work-item {
        min-height: 200px;
    }

    .view-all-btn {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }
}
