/* 手づくりはうす･らびっと デザイン・システム */

/* 0. グローバルフォント設定 */
h1, h2, h3, h4 {
    font-family: 'Zen Maru Gothic', sans-serif !important;
}

.section-title, .signature-title {
    font-family: 'Zen Maru Gothic', sans-serif !important;
    color: #DC461E !important;
}

.en-title,
.en-font,
.about-title-drawn,
.section-title.en-font {
    font-family: 'Zen Maru Gothic', sans-serif !important;
    font-weight: 400;
}

/* 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;
    -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 {
    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 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;
}



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

/* 7. ボタン類・ユーティリティ */

/* 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;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ミシン糸アニメーション (Service背景用) */
.sewing-thread-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image: 
        linear-gradient(90deg, rgba(139,126,111,0.25) 50%, transparent 50%),
        linear-gradient(90deg, rgba(139,126,111,0.25) 50%, transparent 50%),
        linear-gradient(0deg, rgba(139,126,111,0.25) 50%, transparent 50%),
        linear-gradient(0deg, rgba(139,126,111,0.25) 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 24px 2px, 24px 2px, 2px 24px, 2px 24px;
    background-position: left top 15%, left bottom 15%, left 10% top, right 10% top;
    animation: sewing-run 1.5s linear infinite;
}

@keyframes sewing-run {
    0% {
        background-position: left top 15%, left bottom 15%, left 10% top, right 10% top;
    }
    100% {
        background-position: left 24px top 15%, left -24px bottom 15%, left 10% top 24px, right 10% top -24px;
    }
}

/* 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: 'Zen Maru Gothic', sans-serif;
    font-size: 3rem;
    font-weight: 500;
    font-style: normal;
    color: #DC461E !important;
    /* ダークベージュ */
    display: inline-flex;
    flex-direction: column;
    line-height: 1.2;
    letter-spacing: 0.1em;
    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 .sub-title {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 1.5rem;
    font-style: normal;
    letter-spacing: 0.1em;
    margin-top: 8px;
    opacity: 0.8;
}

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

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

@media (max-width: 640px) {
    .signature-title {
        font-size: clamp(1.5rem, 8vw, 2rem);
        letter-spacing: 0.05em;
        padding: 0.1em 0.2em;
    }
    .signature-title .sub-title {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
}

@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: 'Zen Maru Gothic', sans-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 #1F5A24;
    background-color: #1F5A24;
    /* 深い緑 */
    color: #fff;
    margin-bottom: 40px;
    width: fit-content;
    font-family: 'Zen Maru Gothic', sans-serif;
    letter-spacing: 0.1em;
}

/* 傾きを打ち消して文字を直立させる (傾き自体を削除したので不要) */
.fukidashi-10 span {
    display: inline-block;
}

.fukidashi-10::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 20%;
    height: 25px;
    width: 25px;
    border-right: 2px solid #1F5A24;
    /* 深い緑 */
    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: 'Zen Maru Gothic', sans-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: 'Noto Sans JP', 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: 'Zen Maru Gothic', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 500;
    font-style: normal;
    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: 'Zen Maru Gothic', sans-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;
    }

    /* SPサイズの時、本文のフォントを14ピクセルに変更 */
    p, li, .text-base, .text-sm {
        font-size: 14px !important;
        line-height: 1.8;
    }

    .fv-catch {
        font-size: 1.4rem;
        text-align: left;
        align-self: flex-start;
    }

    .fv-sub {
        text-align: left;
        align-self: flex-start;
    }

    .fv-logo {
        font-size: 3rem;
        text-align: center;
    }

    .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;
}

/* ステッチ風装飾 */
.stitch-border {
    padding: 6px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    background-image: 
      linear-gradient(90deg, #8B7E6F 50%, transparent 50%),
      linear-gradient(90deg, #8B7E6F 50%, transparent 50%),
      linear-gradient(0deg, #8B7E6F 50%, transparent 50%),
      linear-gradient(0deg, #8B7E6F 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 16px 2px, 16px 2px, 2px 16px, 2px 16px;
    background-position: left top, right bottom, left bottom, right top;
}

@keyframes stitch-dance {
    0% {
        background-position: left top, right bottom, left bottom, right top;
    }
    100% {
        background-position: left -16px top, right 16px bottom, left bottom 16px, right top -16px;
    }
}