/* ▼ CSS変数 (カラー・フォント設定) */
:root {
    --bg-color: #fcfcfc;
    --text-main: #555;
    --text-sub: #888;
    --accent: #8ec5fc; 
    --accent-sub: #e0c3fc;
    --section-title: #e0e0e0;
}

/* ▼ ベース設定 */
* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP","Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

body.modal-open {
    overflow: hidden;
}

/* ▼ アニメーション定義 */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blurFadeIn {
    0% { opacity: 0; filter: blur(15px); transform: translateY(15px) scale(0.98); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}

@keyframes slideFadeIn {
    0% { opacity: 0; transform: translateX(-15px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes imageReveal {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ▼ 背景装飾 (Blob) */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(5px);
    z-index: -1;
    opacity: 0.5;
    animation: float 25s infinite alternate ease-in-out;
}

.color-1 { background: #e0c3fc; }
.color-2 { background: #8ec5fc; }
.color-3 { background: #ffdee9; }
.color-4 { background: #f6d365; }
.color-5 { background: #b9fbc0; }

.blob-1  { top: 5%;   left: 5%;   width: 20px; height: 20px; animation-duration: 20s; }
.blob-2  { top: 15%;  left: 25%;  width: 12px; height: 12px; animation-duration: 25s; animation-delay: -2s; }
.blob-3  { top: 8%;   right: 10%; width: 25px; height: 25px; animation-duration: 30s; animation-delay: -5s; }
.blob-4  { top: 40%;  left: 8%;   width: 15px; height: 15px; animation-duration: 22s; animation-delay: -8s; }
.blob-5  { top: 35%;  right: 25%; width: 18px; height: 18px; animation-duration: 28s; animation-delay: -10s; }
.blob-6  { bottom: 30%; left: 15%; width: 22px; height: 22px; animation-duration: 24s; animation-delay: -12s; }
.blob-7  { bottom: 10%; left: 5%;  width: 10px; height: 10px; animation-duration: 26s; animation-delay: -15s; }
.blob-8  { bottom: 20%; right: 5%; width: 28px; height: 28px; animation-duration: 32s; animation-delay: -3s; }
.blob-9  { top: 50%;  left: 50%;  width: 14px; height: 14px; animation-duration: 29s; animation-delay: -7s; }
.blob-10 { bottom: 45%; right: 15%; width: 16px; height: 16px; animation-duration: 23s; animation-delay: -1s; }
.blob-11 { top: 20%;  left: 80%;  width: 12px; height: 12px; animation-duration: 27s; animation-delay: -9s; }
.blob-12 { bottom: 5%;  right: 40%; width: 20px; height: 20px; animation-duration: 31s; animation-delay: -4s; }
.blob-13 { top: 10%;  left: 40%;  width: 8px;  height: 8px;  animation-duration: 21s; animation-delay: -11s; }
.blob-14 { bottom: 60%; left: 5%; width: 18px; height: 18px; animation-duration: 25s; animation-delay: -6s; }
.blob-15 { top: 80%;  right: 50%; width: 10px; height: 10px; animation-duration: 28s; animation-delay: -13s; }

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* ▼ メインビジュアル (ヒーローセクション) */
.main-visual-wrapper {
    width: 100%;
    display: block;
    margin: 0 0 10rem 0;
    padding: 0;
    position: relative; 
    top: 0;
    z-index: 10;
}

.mv-content-flex {
    display: block;
    width: 100%;
    height: 100vh;
    position: relative;
}

.main-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%; 
    background-color: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0; 
    overflow: hidden;
    display: block; 
    opacity: 1;
}

.main-visual-img {
    display: block; 
    width: 100%;    
    height: 100%;   
    object-fit: cover;
    object-position: center;
    transition: transform 10s ease;
    border-radius: 0; 
}

.main-visual:hover .main-visual-img {
    transform: scale(1.02);
}

.main-visual-overlay {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    left: 10%;
    background: transparent; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 0;
    z-index: 20;
    pointer-events: none;
}

.mv-title {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    font-size: 4.5rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.05em;
    font-weight: 400; 
    font-style: normal;
    margin: 0;
    opacity: 0;
    animation: blurFadeIn 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.5s forwards;
    line-height: 1.4;
    white-space: nowrap;
}

.mv-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    background: transparent;
    backdrop-filter: none;
    padding: 0.5rem 1.2rem;
    margin-top: 1rem;
    margin-left: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    animation: slideFadeIn 3.0s cubic-bezier(0.2, 0.8, 0.2, 1) 1.5s forwards;
}

/* ▼ グローバルナビゲーション */
.global-nav {
    position: absolute;
    right: 10%;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0; 
    display: flex;
    flex-direction: column;
    gap: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
    z-index: 100;
}

.menu-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    position: relative;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    font-family: 'Quicksand', 'M PLUS Rounded 1c', sans-serif;
    font-size: 1rem;
    display: inline-block;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.menu-btn::after, .menu-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s;
}

.menu-btn::after {
    transform: translate(3px, 3px);
}
.menu-btn::before {
    transform: translate(-3px, -3px);
}

.menu-btn:hover::after, .menu-btn:hover::before {
    transform: translate(0);
}

/* ▼ 共通レイアウト・セクションヘッダー */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 1rem;
}

section {
    margin-bottom: 8rem;
    position: relative;
}

.section-header {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6rem;
}

#profile-section {
    margin-bottom: 2rem;
}

.emblem {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    font-weight: 600;
    color: var(--accent); 
    animation: spinZ 40s linear infinite;
    text-align: center;
    pointer-events: none;
    z-index: 0;
    font-family: 'Cormorant Garamond', serif;
    opacity: 0.5;
}

.emblem span {
    position: absolute;
    display: inline-block;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    text-transform: uppercase;
    font-size: 1.5rem;
    transition: all .5s cubic-bezier(0,0,0,1);
}

@keyframes spinZ {
    0% { transform: translate(-50%, -50%) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) rotateZ(360deg); }
}

@keyframes spinZMobile {
    0% { transform: translate(-50%, -50%) scale(0.7) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) scale(0.7) rotateZ(360deg); }
}

.section-title-jp {
    font-size: 2.2rem;
    font-weight: 600;
    color: #444;
    position: relative;
    z-index: 1;
    display: inline-block;
    letter-spacing: 0.1em;
    background: rgba(255,255,255,0.8);
    padding: 0.5rem 1rem;
    backdrop-filter: blur(2px);
}

/* ▼ セクション2: プロフィール (Profile) */
.glass-card {
    background: transparent; 
    backdrop-filter: none;   
    -webkit-backdrop-filter: none;
    border: none;            
    border-radius: 0;        
    box-shadow: none;        
    padding: 0;              
    margin-bottom: 0;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

.profile-container {
    display: flex;
    align-items: flex-start;
    gap: 3rem; 
    text-align: left;
    padding: 2rem 0; 
}

.profile-col-img {
    flex-shrink: 0;
    text-align: center;
    width: 220px;
}

.profile-col-content {
    flex: 1;
    min-width: 0;
}

.profile-col-philosophy {
    flex: 1;
    min-width: 0;
    padding-left: 2rem;
    border-left: 1px solid #eee;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%; 
    object-fit: cover;
    border: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}

h1 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
    color: #333;
    font-weight: 400; 
    letter-spacing: 0.1em;
}

.role {
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.8rem;
    display: block; 
    background: transparent; 
    padding: 0;
    border-radius: 0;
}

.bio-text {
    line-height: 2;
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.philosophy-text {
    margin-top: 0;
    padding-top: 0;
    border-top: none; 
    line-height: 2.2;
    color: #555;
    font-size: 0.95rem;
}

.philosophy-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #444;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.links-row {
    display: flex;
    justify-content: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.glass-btn {
    background: transparent;
    padding: 10px 30px;
    border-radius: 50px;
    text-decoration: none;
    color: #333; 
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #333333;
    box-shadow: none;
    letter-spacing: 0.1em;
    display: inline-block;
}

.glass-btn:hover {
    transform: translateY(-2px);
    background-color: #333;
    color: #fff;
}

/* ▼ セクション1: 制作実績 (Works) */
.works-list {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.work-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8rem; 
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

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

.work-item:nth-child(even) {
    flex-direction: row-reverse;
}

.work-img-wrapper {
    flex: 1;
    position: relative;
}

.work-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 20px -5px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
}

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

.work-content {
    flex: 1;
    padding: 1rem;
}

.work-title {
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    color: #333;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
}

.work-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--accent);
}

.work-cat {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    display: block;
}

.work-desc {
    line-height: 2;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.view-more-btn {
    display: inline-block;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    transition: 0.3s;
}

.view-more-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ▼ 無限スライダー (ギャラリー) */
.slider-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: 4rem;
    margin-bottom: 4rem;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0;
}

.slider-track {
    display: flex;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.slider-reverse {
    animation: scroll-reverse 60s linear infinite;
}

.slider-item {
    width: 200px;
    height: 200px;
    margin-right: 40px;
    flex-shrink: 0;
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes scroll-reverse {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* ▼ セクション3: お問い合わせ (Contact) */
#contact-section {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 0;
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 5rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.c-card {
    display: flex;
    flex-direction: column;
}

.c-card:nth-child(1) .c-box .c-icon .c-iconBox {
    background: var(--accent);
}

.c-card:nth-child(2) .c-box .c-icon .c-iconBox {
    background: var(--accent-sub);
}

.c-card ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.c-card ul li {
    text-transform: uppercase;
    background: var(--clr-tag);
    color: #282828;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.188rem;
}

.c-card .c-content {
    padding: 0.938rem 0.625rem;
}

.c-card .c-content h3 {
    text-transform: capitalize;
    font-size: 1.5rem;
    margin: 0;
    color: #333;
    font-family: 'Quicksand', sans-serif;
}

.c-card .c-content p {
    margin: 0.625rem 0 1.25rem;
    color: #565656;
    line-height: 1.5;
    font-size: 0.95rem;
}

.c-card-inner {
    position: relative;
    width: 100%;
    height: 20rem;
    background: var(--clr);
    border-radius: 1.25rem;
    border-bottom-right-radius: 0;
    overflow: hidden;
}

.c-box {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative; 
}

.c-imgBox {
    position: absolute;
    inset: 0;
}

.c-imgBox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.c-card:hover .c-imgBox img {
    transform: scale(1.05);
}

.c-icon {
    position: absolute;
    bottom: -0.375rem;
    right: -0.375rem;
    width: 6rem;
    height: 6rem;
    background: var(--clr);
    border-top-left-radius: 50%;
    z-index: 2;
}

.c-icon::before {
    position: absolute;
    content: "";
    bottom: 0.375rem;
    left: -1.25rem;
    background: transparent;
    width: 1.25rem;
    height: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0.313rem 0.313rem 0 0.313rem #fff; 
}

.c-icon::after {
    position: absolute;
    content: "";
    top: -1.25rem;
    right: 0.375rem;
    background: transparent;
    width: 1.25rem;
    height: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    box-shadow: 0.313rem 0.313rem 0 0.313rem var(--clr);
}

.c-iconBox {
    position: absolute;
    inset: 0.625rem;
    background: #282828;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    text-decoration: none;
}

.c-iconBox span {
    color: #fff;
    font-size: 1.8rem;
}

.c-icon:hover .c-iconBox {
    transform: scale(1.1);
}

/* ▼ モーダル */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(252, 252, 252, 0.95); 
    backdrop-filter: none;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
}

.modal-img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); 
    object-fit: contain;
}

.modal-body {
    color: #555;
    margin-top: 1.5rem;
}

/* ▼ タブレット表示 (1024px以下) */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem 3rem;
    }
    
    .mv-content-flex {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 3rem;
    }

    .main-visual-wrapper {
        margin-bottom: 8rem;
    }

    .main-visual {
        position: relative;
        width: 100%;
        height: 60vh;
    }

    .main-visual-overlay {
        left: 0;
        right: 0;
        top: 0;
        transform: none;
        padding: 5rem 2rem 2rem;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
    }

    .mv-title {
        font-size: 3.5rem;
        color: #fff; 
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); 
    }

    .global-nav {
        position: static;
        left: auto;
        right: auto;
        margin-left: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        width: 100%;
        margin-top: 2rem;
        opacity: 0;
        animation: fadeInUp 1s ease-out 1s forwards;
    }

    .menu-btn {
        color: var(--text-main);
        text-shadow: none;
    }

    .menu-btn::after, .menu-btn::before {
        border: 2px solid var(--accent);
    }

    .contact-cards-grid {
        gap: 2rem;
    }
}

/* ▼ スマホ表示 (768px以下) */
@media (max-width: 768px) {
    .main-visual-wrapper {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2rem;
    }
    
    .global-nav {
        position: static;
        transform: none;
        flex-direction: row; 
        gap: 1rem;
        margin-top: 2rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        padding: 0 1rem;
    }

    .menu-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .profile-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .links-row {
        justify-content: center;
    }

    .section-title-en {
        font-size: 3rem;
    }

    .container {
        padding: 4rem 1.5rem 2rem;
    }

    #contact-section {
        margin-bottom: 0;
    }
    
    .profile-col-img {
        width: 100%;
        position: static;
        margin-bottom: 1rem;
    }

    .profile-col-content {
        width: 100%;
    }

    .profile-col-philosophy {
        width: 100%;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #eee;
        padding-top: 2rem;
        margin-top: 1rem;
    }
    
    .main-visual {
        position: relative;
        width: 100%; 
        height: 70vh; 
        border-radius: 0 0 24px 24px; 
        overflow: hidden; 
    }
    
    .main-visual-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .main-visual-overlay {
        position: absolute;
        inset: 0;
        top: 0; left: 0;
        padding: 4rem 1.5rem;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        transform: none; 
    }

    .mv-title {
        font-size: 2.2rem;
        color: #fff; 
        text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); 
        white-space: normal;
    }

    .mv-subtitle {
        color: #fff; 
        background: transparent;
        backdrop-filter: none;
        margin-left: 0;
        text-shadow: 0 2px 5px rgba(0,0,0,0.3); 
    }
    
    .works-list {
        gap: 5rem;
    }

    .work-item, .work-item:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
    }

    .work-content {
        padding: 0;
        text-align: left;
    }
    
    .slider-item {
        margin-right: 20px;
    }

    .slider-item img {
        max-height: 250px;
    }
    
    .section-header {
        height: 100px;
    }

    .section-title-jp {
        font-size: 1.5rem;
    }

    .emblem {
        width: 100px;
        height: 100px;
        animation: spinZMobile 40s linear infinite;
    }

    .emblem span {
        font-size: 1.2rem;
    }

    #works-section .section-header,
    #profile-section .section-header,
    #contact-section .section-header {
        margin-bottom: 3rem;
    }

    .contact-cards-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 3rem;
    }
}

/* ▼ アニメーション軽減対応 (アクセシビリティ) */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }
    body {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .blob,
    .slider-track {
        animation: none !important;
    }
    .main-visual-wrapper,
    .main-visual,
    .mv-title,
    .mv-subtitle,
    .global-nav,
    .glass-card,
    .slider-section,
    .work-item {
        opacity: 1 !important;
        transform: none !important;
    }
}