/* アトリエパティオ デザイン・システム */

/* 1. リセット & ベース */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 2. 余白の定義 - セクション間 */
.section-gap {
    margin-top: 80px;
    margin-bottom: 80px;
}

@media (min-width: 1024px) {
    .section-gap {
        margin-top: 120px;
        margin-bottom: 120px;
    }
}

/* 3. セクション見出し (master_4-1.jpg) */
.section-title-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

@media (max-width: 640px) {
    .section-title-wrap {
        width: 80%;
        height: 80px;
    }
}

.section-title-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.section-title {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* 4. パララックス効果 (iOS Safari対応版) */
.parallax-container {
    position: relative;
    clip-path: inset(0); /* 子要素をこの範囲に切り抜く */
}

.parallax-bg {
    position: fixed; /* 常に画面に対して固定 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

/* 5. インタラクション & 装飾 */
.scroll-line {
    animation: scroll-anim 2s infinite cubic-bezier(0.8, 0, 0.2, 1);
}

@keyframes scroll-anim {
    0% { transform: translateY(-100%); }
    50% { transform: translateY(0); }
    100% { transform: translateY(100%); }
}

/* Scroll Top Button Visibility */
#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-10px);
}

/* Mobile Menu Transition */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

/* Swiper Fade Optimization */
.fv-swiper .swiper-slide {
    opacity: 0 !important;
}
.fv-swiper .swiper-slide-active {
    opacity: 1 !important;
    transition: opacity 2s ease-in-out;
}

/* 6. 画像の扱い共通 */
img {
    vertical-align: bottom;
    object-fit: cover;
}

/* 7. ボタン類 */
.cta-link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

/* 8. Utility: Vertical Margin fix for seamless join */
.vertical-bottom {
    vertical-align: bottom;
}

/* 9. Service Section Background Animation */
.bg-service-gradient {
    position: relative;
    background: linear-gradient(-45deg, #FFF3DE, #DEB887, #FFF3DE, #DEB887);
    background-size: 400% 400%;
    animation: gradient-flow 15s ease infinite;
    overflow: hidden;
}

/* キラキラ星屑エフェクト */
.bg-service-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(1.5px 1.5px at 10% 20%, #fff 100%, transparent),
        radial-gradient(1px 1px at 30% 50%, #fff 100%, transparent),
        radial-gradient(2px 2px at 50% 80%, #fff 100%, transparent),
        radial-gradient(1px 1px at 80% 20%, #fff 100%, transparent),
        radial-gradient(1.5px 1.5px at 90% 60%, #fff 100%, transparent),
        radial-gradient(1px 1px at 23% 85%, #fff 100%, transparent),
        radial-gradient(2px 2px at 70% 38%, #fff 100%, transparent);
    background-size: 250px 250px;
    opacity: 0.4;
    animation: kirakira 5s infinite ease-in-out alternate;
}

/* 光のスイープ（高級感のあるキラリとした反射） */
.service-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-25deg);
    animation: shine-sweep 7s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes kirakira {
    0% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
    100% { opacity: 0.2; transform: scale(1); }
}

@keyframes shine-sweep {
    0% { left: -150%; }
    30% { left: 150%; }
    100% { left: 150%; }
}

/* 10. Menu Section Background (Brown Check) */
.bg-menu-check {
    background-color: #fcf9f5;
    background-image: 
        linear-gradient(90deg, rgba(139, 69, 19, 0.04) 50%, transparent 50%),
        linear-gradient(rgba(139, 69, 19, 0.04) 50%, transparent 50%);
    background-size: 60px 60px;
}

/* 11. Signature Drawing Title (Common) */
.signature-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 6.8rem;
    font-weight: 300;
    font-style: italic;
    color: #8B7E6F; /* ダークベージュ */
    display: inline-block;
    line-height: 1.5;
    letter-spacing: 0.13em;
    padding: 0.1em 0.3em;
    clip-path: inset(0 100% 0 0);
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    white-space: nowrap;
}

/* スクロールして表示された時にアニメーション開始 */
.signature-title.is-visible {
    animation: reveal-signature 1.5s ease-in-out forwards;
}

@media (max-width: 1024px) {
    .signature-title {
        font-size: clamp(3rem, 10vw, 5rem);
    }
}

@media (max-width: 640px) {
    .signature-title {
        font-size: clamp(2rem, 12vw, 2.5rem);
        letter-spacing: 0.1em;
        padding: 0.1em 0.2em;
    }
}

@keyframes reveal-signature {
    0% { 
        clip-path: inset(0 100% 0 0);
        opacity: 0;
        transform: translateY(20px);
    }
    10% {
        opacity: 1;
    }
    100% { 
        clip-path: inset(0 0 0 0);
        opacity: 1;
        transform: translateY(0);
    }
}

/* 12. Button Style 21 (Square with Shadow) */
.button-21 {
    display: block;
}

.button-21 a {
    font-family: 'Shippori Mincho', serif;
    font-size: 14px;
    letter-spacing: 0.1em;
    color: #666;
    font-weight: 700;
    outline: 1px solid #d1d1d1;
    display: block;
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
    text-align: center; 
    padding: 16px 10px;
    text-decoration: none;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s;
    background: #fff;
}

.button-21 a::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 100%;
    height: 100%;
    background: #f7f7f7;
    z-index: -1;
    transition: all 0.3s ease;
}

.button-21 a:hover::before {
    top: 0;
    left: 0;
}

/* 個別カラー（白に近い極めて淡いトーン） */
.button-21:nth-child(1) a::before { background: #FAF3E0; } /* 非常に淡いアイボリー */
.button-21:nth-child(2) a::before { background: #EBF4F5; } /* 非常に淡いミストブルー */
.button-21:nth-child(3) a::before { background: #F5EBEB; } /* 非常に淡いシェルピンク */
.button-21:nth-child(4) a::before { background: #EDF5EB; } /* 非常に淡いペールグリーン */

/* 13. Service Section Fukidashi Style */
.fukidashi-10 {
    position: relative;
    display: inline-block;
    padding: 10px 32px;
    border: solid 1px #4E342E; /* 深みのある茶色 */
    transform: skewX(-25deg);
    background-color: #4E342E; /* 深みのある茶色 */
    color: #fff;
    margin-bottom: 40px;
    width: fit-content;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.1em;
}

/* 傾きを打ち消して文字を直立させる */
.fukidashi-10 span {
    display: inline-block;
    transform: skewX(25deg);
}

.fukidashi-10::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 20%;
    height: 25px;
    width: 25px;
    border-right: 2px solid #4E342E; /* 深みのある茶色 */
    transform: rotate(40deg);
}

/* 数字強調用 */
.fukidashi-digit {
    font-size: 1.8em;
    font-weight: 700;
    margin-left: 8px;
    line-height: 1;
    vertical-align: baseline;
}

/* 14. FV Section (onzs-shibuya style) */
.fv-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #FFFCF2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 100px 0 60px;
    z-index: 50; /* Header below this if necessary, but usually header is fixed */
}

.fv-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 0.4fr 0.6fr;
    gap: 60px;
    align-items: center;
}

.fv-left {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 500px;
    padding-left: 20px;
}

.fv-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.fv-deco {
    position: absolute;
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.fv-deco.show {
    opacity: 0.45;
}

.fv-deco-01 { top: 8%; right: 15%; width: clamp(150px, 28%, 220px); }
.fv-deco-02 { bottom: 0%; left: -15%; width: clamp(200px, 50%, 320px); }
.fv-deco-03 { bottom: 12%; left: 45%; transform: translateX(-50%); width: clamp(180px, 42%, 300px); }
.fv-deco-04 { top: 28%; right: 10%; width: clamp(120px, 22%, 180px); }
.fv-deco-05 { top: 32%; right: -8%; width: clamp(160px, 32%, 240px); }

.fv-left-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    text-align: left;
}

.fv-catch,
.fv-sub,
.fv-logo,
.fv-read-more {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fv-catch.is-active,
.fv-sub.is-active,
.fv-logo.is-active {
    opacity: 1;
    --opacity: 1;
    --translate-y: 0;
}

.char {
    display: inline-block;
    opacity: var(--opacity, 0);
    transform: translateY(var(--translate-y, 15px));
    transition: opacity 0.6s cubic-bezier(0.77, 0, 0.175, 1),
                transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    transition-delay: calc(0.04s * var(--char-index));
    white-space: pre;
}

.fv-catch,
.service-point-title {
    font-family: 'Shippori Mincho', serif;
    font-size: clamp(1.2rem, 4vw, 2.4rem);
    line-height: 1.6;
    color: #4E342E;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.fv-catch {
    margin-bottom: 1.5rem;
}

.service-point-title {
    margin-bottom: 1.5rem;
}

.fv-catch-line {
    display: block;
}

.fv-sub {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.1rem);
    letter-spacing: 0.2em;
    color: #8B7E6F;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.fv-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    font-style: italic;
    color: #4E342E;
    letter-spacing: 0.15em;
    margin-bottom: 3.5rem;
    line-height: 1.1;
}

.fv-logo-line {
    display: block;
}

@media (min-width: 1025px) {
    .fv-logo-line {
        display: inline-block;
    }
    .fv-logo-line:first-child::after {
        content: '\00a0'; /* Space between ATELIER and PATIO on desktop */
    }
}

.fv-logo .char {
    transition-delay: calc(0.06s * var(--char-index));
}

.fv-read-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: fit-content;
}

.fv-read-more.is-visible {
    opacity: 1;
}

.fv-read-more-line {
    width: 1px;
    height: 0;
    background-color: #8B7E6F;
}

.fv-read-more-line.animate {
    animation: lineGrow 1.2s ease-out forwards;
}

@keyframes lineGrow {
    from { height: 0; }
    to { height: 80px; }
}

.fv-read-more-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: #8B7E6F;
    text-transform: uppercase;
}

/* Right Column - Image Grid */
.fv-right {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
}

.fv-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 180px 300px 200px;
    gap: 15px;
    width: 100%;
    align-self: center;
}

.fv-grid-item {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
    border-radius: 4px;
}

.fv-grid-item.show {
    opacity: 1;
    transform: translateY(0);
}

.fv-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

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

.fv-grid-1 { grid-column: 2 / 3; grid-row: 1 / 2; }
.fv-grid-2 { grid-column: 3 / 4; grid-row: 1 / 3; }
.fv-grid-3 { grid-column: 1 / 3; grid-row: 2 / 3; }
.fv-grid-4 { grid-column: 1 / 2; grid-row: 3 / 4; }
.fv-grid-5 { grid-column: 2 / 3; grid-row: 3 / 4; }
.fv-grid-6 { grid-column: 3 / 4; grid-row: 3 / 4; }

@media (min-width: 1025px) {
    .fv-right {
        width: 140%;
        max-width: 140%;
        margin-left: -5%;
    }
}

@media (max-width: 1024px) {
    .fv-section { padding: 80px 0; min-height: auto; }
    .fv-container {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 0 40px;
    }
    .fv-left {
        min-height: auto;
        justify-content: center;
        padding-left: 0;
    }
    .fv-left-content {
        max-width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .fv-decorations { display: block; opacity: 0.6; }
    .fv-deco-01 { width: 120px; top: -5%; right: 5%; }
    .fv-deco-02 { width: 180px; bottom: -5%; left: -5%; }
    .fv-read-more { margin: 0 auto; }
    .fv-image-grid { grid-template-rows: repeat(3, 200px); }
}

@media (max-width: 768px) {
    .fv-container { padding: 0 20px; gap: 40px; }
    .fv-catch { font-size: 1.4rem; }
    .fv-logo { font-size: 3rem; }
    .fv-image-grid { grid-template-rows: repeat(3, 160px); gap: 10px; }
}
/* 15. Gallery Flowing Animation Fix */
.gallery-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}
