/* Global Root & Reset */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    /* Ensure no horizontal scroll */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

body,
body * {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

:root {
    --neon-cyan: #12d1ff;
    --neon-pink: #ff00ff;
    --neon-yellow: #fffa00;
    --neon-green: #00ffbf;
    --neon-orange: #ff8c00;
    --dark: #050505;
}

::selection {
    background: var(--neon-cyan);
    color: var(--dark);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

/* Animations */
@media (max-width: 768px) {
    .header-logo-wrap {
        display: none !important;
    }
    #mainHeader.scrolled .header-logo-wrap {
        display: block !important;
    }
}

#headerLogo {
    transition: filter 0.5s ease;
}

#mainHeader #headerLogo,
.logo-white-filter {
    filter: brightness(0) invert(1);
}

/* Header text and buttons (always white for solid brown background) */
#mainHeader nav a {
    color: #fff8f0 !important;
}
#mainHeader nav a:hover {
    color: #fff8f0 !important;
    opacity: 0.7;
}
#mainHeader nav a span {
    background-color: #fff8f0 !important;
}
#mainHeader a[href^="tel:"] {
    border-color: #fff8f0 !important;
    color: #fff8f0 !important;
}
#mainHeader a[href^="tel:"]:hover {
    background-color: #fff8f0 !important;
    color: #5a3020 !important;
}

@keyframes expand {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes title-up-sme {
    0% {
        transform: translateY(110%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes person-pop {
    0% {
        transform: translate(-50%, 50px) scale(0.9);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
    }
}

@keyframes star-float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-10px, -20px);
    }
}

@keyframes star-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes star-rotate-rev {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes line-scroll {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@keyframes title-up {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes marquee-h {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes float-bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes ping-slow {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes neon-image-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        filter: grayscale(0%) brightness(1);
        opacity: 1;
    }
    19%, 21%, 23%, 24%, 54%, 56% {
        filter: grayscale(60%) brightness(0.5) contrast(1.5);
        opacity: 0.6;
    }
}

/* Poyoyon Animation */
@keyframes poyoyon3 {

    0%,
    40% {
        transform: skew(0deg, 0deg);
    }

    5% {
        transform: skew(5deg, 5deg);
    }

    10% {
        transform: skew(-4deg, -4deg);
    }

    15% {
        transform: skew(3deg, 3deg);
    }

    20% {
        transform: skew(-2deg, -2deg);
    }

    25% {
        transform: skew(1deg, 1deg);
    }

    30% {
        transform: skew(-0.6deg, -0.6deg);
    }

    35% {
        transform: skew(0.3deg, 0.3deg);
    }
}

.animate-poyoyon {
    animation: poyoyon3 2.5s infinite;
}

.animate-expand {
    animation: expand 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-title-up {
    animation: title-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in {
    animation: fade-in 1.5s ease forwards;
}

.marquee-text {
    animation: marquee-h 40s linear infinite;
}

.character-float {
    animation: float-bob 4s ease-in-out infinite;
}

.animate-ping-slow {
    animation: ping-slow 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-title-up-sme {
    animation: title-up-sme 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-person-pop {
    animation: person-pop 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-star-float {
    animation: star-float 6s ease-in-out infinite;
}

.animate-star-float-slow {
    animation: star-float 10s ease-in-out infinite;
}

.animate-star-rotate {
    animation: star-rotate 15s linear infinite;
}

.animate-star-rotate-rev {
    animation: star-rotate-rev 12s linear infinite;
}

.animate-line-scroll {
    animation: line-scroll 2s ease-in-out infinite;
}

.animate-person-float-l {
    animation: star-float 8s ease-in-out infinite;
}

.animate-person-float-r {
    animation: star-float 7s ease-in-out infinite reverse;
}

.animate-person-float-fast {
    animation: star-float 4s ease-in-out infinite;
}

.neon-image-flicker {
    animation: neon-image-flicker 8s infinite;
}

.group:hover .neon-image-flicker {
    animation: none !important;
}

/* Grid Patterns & Utilities */
.bg-grid-white {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Red-to-Pink Subtle Dot Pattern (for Concept section) */
.bg-dots-red-pink {
    background-image:
        radial-gradient(circle, rgba(255, 120, 150, 0.07) 8px, transparent 8px),
        radial-gradient(circle, rgba(220, 50, 80, 0.04) 7px, transparent 7px);
    background-size: 96px 96px;
    background-position: 0 0, 48px 48px;
}

/* Red-to-Pink Subtle Check Pattern (for Other Menus section) */
.bg-check-red-pink {
    background-image:
        linear-gradient(rgba(255, 120, 150, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 50, 80, 0.12) 1px, transparent 1px);
    background-size: 56px 56px;
}

/* Red-to-Pink Subtle Stripe Pattern */
.bg-stripe-red-pink {
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 20px,
        rgba(220, 50, 80, 0.04) 20px,
        rgba(220, 50, 80, 0.04) 28px
    );
}

.border-text {
    -webkit-text-stroke: 2px white;
}

.border-text-white {
    -webkit-text-stroke: 1.5px white;
    color: transparent;
}

/* Kaiyukan Inspired Button (Adapted for SME Style) */
.kaiyukan-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.kaiyukan-btn .btn-text span {
    transition: all 0.5s ease;
}

/* Section Reveal Effect */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Text Reveal Animation inside Section Reveal */
.reveal-text {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
}

.section-reveal.active .reveal-text {
    transform: translateY(0);
    opacity: 1;
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Vertical Text */
.vertical-text {
    writing-mode: vertical-rl;
}

/* Grain/Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.12;
    pointer-events: none;
    z-index: 9999;
}

/* Swiper Nav Custom */
.gallery-nav button {
    font-family: serif;
    font-weight: 900;
}

/* FAQ Accordion Styling */
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active {
    border-bottom-color: #c62235 !important;
}

.faq-item.active button span:first-child {
    color: #c62235;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* Voice Swiper Pagination Custom */
#voice .swiper-pagination-bullet {
    background: #c62235;
    opacity: 0.3;
}

#voice .swiper-pagination-bullet-active {
    background: #c62235;
    opacity: 1;
}

/* Force Luminous Lightbox to center */
.lum-lightbox {
    z-index: 10000 !important;
}

.lum-lightbox-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lum-lightbox-image-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
}

.lum-img {
    max-width: 95vw !important;
    max-height: 95vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: auto !important;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: inherit;
    mix-blend-mode: hard-light;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffbf;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 3.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    10% {
        clip: rect(90px, 9999px, 160px, 0);
    }

    20% {
        clip: rect(0, 0, 0, 0);
    }

    25% {
        clip: rect(0, 0, 0, 0);
    }

    30% {
        clip: rect(30px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(120px, 9999px, 180px, 0);
    }

    50% {
        clip: rect(50px, 9999px, 130px, 0);
    }

    60% {
        clip: rect(0, 0, 0, 0);
    }

    65% {
        clip: rect(0, 0, 0, 0);
    }

    70% {
        clip: rect(140px, 9999px, 220px, 0);
    }

    80% {
        clip: rect(40px, 9999px, 100px, 0);
    }

    90% {
        clip: rect(80px, 9999px, 150px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(120px, 9999px, 200px, 0);
    }

    5% {
        clip: rect(10px, 9999px, 90px, 0);
    }

    10% {
        clip: rect(0, 0, 0, 0);
    }

    35% {
        clip: rect(0, 0, 0, 0);
    }

    36% {
        clip: rect(150px, 9999px, 190px, 0);
    }

    40% {
        clip: rect(40px, 9999px, 110px, 0);
    }

    45% {
        clip: rect(0, 0, 0, 0);
    }

    70% {
        clip: rect(0, 0, 0, 0);
    }

    71% {
        clip: rect(100px, 9999px, 140px, 0);
    }

    80% {
        clip: rect(60px, 9999px, 130px, 0);
    }

    100% {
        clip: rect(100px, 9999px, 190px, 0);
    }
}

/* Italiana Font */
.font-italiana {
    font-family: "Parisienne", cursive;
}

.scene-text {
    color: #c62235;
}

#scene-gallery img {
    display: block;
    max-width: 100%;
    height: auto;
}

.bg-about-atmosphere {
    background-image: url("../img/concept_01.jpg");
    background-attachment: fixed;
}

.bg-service-fixed {
    background-image: url("../img/service_01.jpg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.bg-service-02-fixed {
    background-image: url("../img/service_02.jpg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

.bg-service-03-fixed {
    background-image: url("../img/service_03.jpg");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}

/* Service Scrollytelling Custom */
.service-image {
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.grayscale-sm {
    filter: grayscale(40%);
}

/* FV Section - 2 Column Layout */
.fv-section {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    height: calc(100dvh - 80px);
    background-color: #FFF8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 40px;
}

.fv-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../img/fv_bg_01.png");
    background-attachment: fixed;
    background-size: cover;
    background-position: bottom left;
    background-repeat: no-repeat;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: -1;
}


.fv-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 450px 1fr;
    gap: 40px;
    align-items: center;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Left Column - Spacious with breathing room */
.fv-left {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
}

.fv-center {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.fv-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}


.fv-left-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    text-align: center;
    /* Center text */
}

.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 {
    font-family: 'Shippori Mincho', serif;
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    letter-spacing: 0.1em;
    color: #5a3020cc;
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    width: 100%;
}

/* Sub Column - OSAKE TO NIWAKAYA */
.fv-sub {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(0.75rem, 1vw, 0.95rem);
    letter-spacing: 0.2em;
    color: #5a3020;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
}

.fv-sub .char {
    display: inline-block;
    opacity: 0;
    transform: none;
    transition: none;
}

.fv-sub.is-active .char {
    animation: typeWriterReveal 0.05s forwards;
    /* Delay sequentially based on char index. Starts 1 second after page load */
    animation-delay: calc(0.05s * var(--char-index) + 1s);
}

@keyframes typeWriterReveal {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Original Yellow/Greenish Neon Flicker for GOOD VIBES ONLY */
@keyframes neonFlicker {

    0%,
    96%,
    100% {
        opacity: 1;
        text-shadow: none;
    }

    97% {
        opacity: 0.8;
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
    }

    98% {
        opacity: 1;
        text-shadow: 0 0 15px currentColor, 0 0 35px currentColor, 0 0 50px currentColor;
    }

    99% {
        opacity: 0.9;
        text-shadow: none;
    }
}

.fv-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    /* Ensure no neon animation on logo */
    animation: none;
}

.fv-logo.is-active {
    opacity: 1;
    transform: translateY(0);
}

.fv-logo img {
    height: clamp(80px, 15vw, 150px);
    width: auto;
    object-fit: contain;
}

.fv-read-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: auto;
}

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

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

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

@keyframes lineGrow {
    from {
        height: 0;
    }

    to {
        height: 50px;
    }
}

.fv-read-more-text {
    font-family: 'Parisienne', cursive;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: #c62235;
    text-transform: lowercase;
}


/* Right Column - Image Grid */

.fv-image-grid {
    display: grid;
    gap: 15px;
    width: 100%;
}

.fv-grid-left {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 180px;
    max-width: 500px;
}

.fv-grid-right {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 220px;
    max-width: 500px;
}

.fv-grid-item {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fv-grid-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slideshow animations */
.fv-slideshow .slide-1 {
    animation: slide1Anim 12s infinite;
}

.fv-slideshow .slide-2 {
    opacity: 0;
    animation: slide2Anim 12s infinite;
}

.fv-slideshow .slide-3 {
    opacity: 0;
    animation: slide3Anim 12s infinite;
}

@keyframes slide1Anim {
    0%, 28% { opacity: 1; transform: scale(1); }
    33%, 95% { opacity: 0; transform: scale(1.15); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slide2Anim {
    0%, 28% { opacity: 0; transform: scale(1.15); }
    33%, 61% { opacity: 1; transform: scale(1); }
    66%, 100% { opacity: 0; transform: scale(1.15); }
}

@keyframes slide3Anim {
    0%, 61% { opacity: 0; transform: scale(1.15); }
    66%, 95% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.15); }
}

/* Uneven Layout - Left */
.fv-grid-4 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

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

/* Taller */
.fv-grid-6 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

/* Uneven Layout - Right */
.fv-grid-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

/* Taller */
.fv-grid-2 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.fv-grid-3 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

@media (min-width: 1025px) {
    /* Option A: Editorial / Magazine Layout */
    .fv-container {
        grid-template-columns: 280px 450px 1fr;
    }
    
    .fv-left {
        transform: translateY(0);
        justify-content: center;
    }
    
    .fv-right {
        transform: translateY(0);
    }
    
    .fv-grid-left {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 40px;
    }
    
    .fv-grid-right {
        grid-template-columns: 1fr;
        grid-template-rows: 85vh; /* Huge main image */
        max-width: none;
        width: 100%;
    }
    
    .fv-grid-1 {
        grid-column: 1 / -1;
        grid-row: 1 / -1;
        border-radius: 8px; /* Optional slight rounding for elegance */
    }
    
    .fv-grid-4 {
        grid-column: 1 / -1;
        grid-row: 1 / 2;
        height: 350px;
        border-radius: 8px;
    }
    
    .fv-grid-5 {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        width: 75%;
        height: 220px;
        margin-left: auto;
        border-radius: 8px;
    }
    
    /* Hide unnecessary extra images */
    .fv-grid-2, .fv-grid-3, .fv-grid-6 {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .fv-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
        height: auto;
        min-height: 100%;
    }

    .fv-grid-left,
    .fv-grid-right {
        grid-template-rows: 120px 100px;
    }

    .fv-section {
        height: auto;
        min-height: calc(100vh - (80px + env(safe-area-inset-top, 0px)));
        padding-top: calc(80px + env(safe-area-inset-top, 0px)) !important;
        overflow-y: auto;
    }

    .fv-center {
        order: 2;
    }

    .fv-left {
        order: 1;
    }

    .fv-right {
        order: 3;
    }

    .fv-left {
        min-height: auto;
        justify-content: center;
        padding: 0;
        margin: 0;
        width: 100%;
        order: 1;
    }

    .fv-catch-arch {
        height: 45px !important;
        margin-bottom: 0.5rem !important;
    }

    .fv-left-content {
        max-width: 100%;
        text-align: center;
    }

    .fv-logo {
        margin-bottom: 0.5rem;
    }

    .fv-logo img {
        height: 100px;
    }

    .fv-read-more {
        align-items: center;
        margin: 0 auto;
    }

    .fv-right {
        min-height: auto;
        justify-content: center;
        padding: 0;
        margin: 0;
        width: 100%;
        order: 3;
    }

    .fv-image-grid {
        min-height: auto;
        max-width: 320px; /* Adjusting to a size closer to the bottom grid's balanced look */
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .fv-grid-left,
    .fv-grid-right {
        /* Ensuring they don't force full width if content is smaller */
        display: grid;
    }
}

@media (max-width: 768px) {
    .fv-section::before { background-image: url("../img/fvsp_bg_01.png"); }

    .fv-section {
        padding-top: calc(60px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 10px !important;
    }

    .fv-container {
        padding: 0 20px;
        gap: 15px;
    }

    .fv-left {
        padding: 0;
    }

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

    .fv-logo img {
        height: 80px;
    }

    @keyframes lineGrowMobile {
        from {
            height: 0;
        }

        to {
            height: 25px;
        }
    }

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

    .fv-read-more-text {
        font-size: 0.8rem;
    }

    .fv-right {
        min-height: auto;
    }

    .fv-image-grid {
        min-height: auto;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .fv-logo {
        margin-bottom: 1.5rem;
    }

    .fv-logo img {
        height: 70px;
    }

    .fv-right {
        min-height: auto;
    }

    .fv-image-grid {
        min-height: auto;
        gap: 6px;
    }

    .fv-catch-arch {
        font-size: 1.3rem;
        height: 60px;
    }

    .char-arch {
        letter-spacing: 2px;
    }
}

/* SP Specific Adjustments */
@media (max-width: 768px) {
    /* Scene Gallery Adjustments */
    #scene-gallery .container > div:first-child .w-full {
        width: 100% !important;
    }
    #scene-gallery .container > div:nth-child(2) {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    #scene-gallery .order-2 {
        width: 33.333% !important;
        order: 2 !important;
        margin-bottom: 2rem;
        margin-left: auto;
        margin-right: 0;
    }
    #scene-gallery .order-3 {
        width: 100% !important;
        order: 3 !important;
    }
    #scene-gallery .scene-text {
        text-align: left !important;
    }

    /* Service Section Mobile Fix */
    #service {
        height: 300vh !important;
    }
    #service .sticky {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    
    .service-content-inner span {
        font-size: 4rem !important;
        margin-bottom: 0.5rem !important;
    }
    .service-content-inner h3 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    .service-content-inner p {
        font-size: 0.9rem !important;
    }

    /* Access Section Mobile Tel link */
    .access-tel-link {
        font-size: 1.5rem !important;
    }
}

.font-medium-desc {
    font-weight: 500 !important;
}

.fv-section img {
    border-radius: 0 !important;
}

/* Hamburger Button Custom */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000;
    position: relative;
    padding: 0;
}

.hamburger-btn span {
    display: block;
    position: absolute;
    left: 8px; /* (44 - 28) / 2 */
    width: 28px;
    height: 2px;
    background-color: #fff8f0;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hamburger-btn.is-active span {
    background-color: #fff8f0;
}

.hamburger-btn span:nth-child(1) { top: 14px; }
.hamburger-btn span:nth-child(2) { top: 21px; }
.hamburger-btn span:nth-child(3) { top: 28px; }

.hamburger-btn.is-active span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}
.hamburger-btn.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.is-active span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

/* Mobile Menu Instagram Icon */
.mobile-insta-icon {
    filter: brightness(0); /* Make white logo black */
    transition: filter 0.3s ease;
}
.group:hover .mobile-insta-icon {
    filter: none; /* Restore original white logo */
}

/* -------------------------------------------------
   Polaroid-style Stacked Cards (Scene Gallery)
   ------------------------------------------------- */
.polaroid-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    position: relative;
}

.polaroid-stack {
    position: relative;
    width: clamp(280px, 55vw, 520px);
    aspect-ratio: 4 / 5;
}

.polaroid-card {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 16px 16px 60px 16px;
    box-shadow: 0 8px 40px rgba(90, 48, 32, 0.15), 0 2px 8px rgba(90, 48, 32, 0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
}

.polaroid-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

/* Card 1: 背面、少し左に回転 */
.polaroid-card-1 {
    z-index: 1;
    transform: rotate(-6deg) translate(-12px, 8px);
}

/* Card 2: 前面、少し右に回転 */
.polaroid-card-2 {
    z-index: 2;
    transform: rotate(4deg) translate(12px, -8px);
}

/* ホバー時にカードが広がる */
.polaroid-stack:hover .polaroid-card-1 {
    transform: rotate(-10deg) translate(-30px, 5px);
    box-shadow: 0 14px 50px rgba(90, 48, 32, 0.22);
}

.polaroid-stack:hover .polaroid-card-2 {
    transform: rotate(8deg) translate(30px, -5px);
    box-shadow: 0 14px 50px rgba(90, 48, 32, 0.22);
}

/* テキストキャプション */
.polaroid-caption {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.polaroid-caption .caption-en {
    font-family: 'Parisienne', cursive;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    color: #c62235;
    line-height: 1.7;
    letter-spacing: 0.12em;
}

.polaroid-caption .caption-deco {
    display: block;
    width: 40px;
    height: 2px;
    background: #c62235;
    margin: 1.5rem auto;
    opacity: 0.4;
}

/* レスポンシブ：モバイル */
@media (max-width: 768px) {
    .polaroid-stage {
        flex-direction: column;
        gap: 2rem;
        min-height: auto;
        padding: 2rem 0;
    }

    .polaroid-stack {
        width: clamp(240px, 70vw, 340px);
    }

    .polaroid-card {
        padding: 10px 10px 40px 10px;
    }
}

/* -------------------------------------------------
   Diagonal Split Layout (Scene Gallery Option 1)
   ------------------------------------------------- */
.split-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.fv-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 450px;
    overflow: hidden;
}

.fv-split .fv-img {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

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

/* 斜めの分割ライン */
.fv-split::before {
    content: "";
    position: absolute;
    top: -10%;
    left: 50%;
    width: 6px;
    height: 120%;
    background: #EEEAD1; /* 背景色と同じ色にして切り取られているように見せる */
    transform: rotate(12deg);
    transform-origin: center;
    z-index: 10;
}

/* 中央のキャプション */
.fv-split-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
    width: 90%;
    max-width: 580px;
    pointer-events: none;
}

.fv-split-caption-bg {
    background: rgba(254, 253, 248, 0.95); /* 高級感のある薄いアイボリー系半透明 */
    border: 1px solid rgba(178, 73, 44, 0.15);
    padding: 2.5rem 3.5rem;
    box-shadow: 0 15px 35px rgba(90, 48, 32, 0.12);
    border-radius: 2px;
}

.fv-split-caption .caption-en {
    font-family: 'Parisienne', cursive;
    font-size: clamp(1.1rem, 2.2vw, 2.2rem);
    color: #c62235;
    line-height: 1.8;
    letter-spacing: 0.12em;
}

/* スマホ用レイアウト：縦並びにして、分割線を横にする */
@media (max-width: 768px) {
    .fv-split {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
        height: 75vh;
        min-height: 500px;
    }
    
    .fv-split::before {
        top: 50%;
        left: -10%;
        width: 120%;
        height: 6px;
        transform: rotate(-6deg);
        transform-origin: center;
    }
    
    .fv-split-caption-bg {
        padding: 1.5rem 2rem;
    }
}

/* -------------------------------------------------
   Editorial Grid Layout (Scene Gallery Option 3)
   ------------------------------------------------- */
.editorial-stage {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.editorial-row {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr; /* テキスト左、画像右 */
    gap: 5rem;
    align-items: center;
}

.editorial-text-wrap {
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.editorial-text-wrap .scene-text {
    font-family: "Parisienne", cursive;
    font-size: clamp(1.4rem, 2.8vw, 2.6rem);
    color: #c62235;
    line-height: 1.8;
    letter-spacing: 0.15em;
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid rgba(178, 73, 44, 0.25);
}

.editorial-images-wrap {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.editorial-img-large {
    width: 100%;
    box-shadow: 0 12px 35px rgba(90, 48, 32, 0.06);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    border-radius: 2px;
    overflow: hidden;
}

.editorial-img-small {
    width: 75%;
    margin-left: auto; /* 右寄せにして段違いのリズムを作る */
    box-shadow: 0 12px 35px rgba(90, 48, 32, 0.06);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
    border-radius: 2px;
    overflow: hidden;
}

.editorial-img-large img,
.editorial-img-small img {
    width: 100%;
    height: auto;
    display: block;
}

/* ホバー時に優しく浮き上がる演出（画像を一切クロップしない） */
.editorial-img-large:hover,
.editorial-img-small:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(90, 48, 32, 0.12);
}

/* レスポンシブ：モバイル */
@media (max-width: 768px) {
    .editorial-row {
        grid-template-columns: 1fr; /* 縦並びにする */
        gap: 3.5rem;
    }
    
    .editorial-text-wrap {
        padding-right: 0;
        text-align: center;
        order: 2; /* モバイルではテキストが下 */
    }
    
    .editorial-text-wrap .scene-text {
        border-left: none;
        border-top: 1px solid rgba(178, 73, 44, 0.15);
        border-bottom: 1px solid rgba(178, 73, 44, 0.15);
        padding: 2.5rem 0;
        padding-left: 0;
    }
    
    .editorial-images-wrap {
        order: 1; /* モバイルでは画像が上 */
        gap: 2.5rem;
    }
    
    .editorial-img-small {
        width: 85%; /* モバイルでは少し大きめに表示 */
    }
}

/* -------------------------------------------------
   Parallax Shift Layout (Scene Gallery Option 4)
   ------------------------------------------------- */
.parallax-img-wrap {
    will-change: transform;
    overflow: hidden;
    border-radius: 2px;
}

#parallax-img-1,
#parallax-img-2 {
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* スムーズに追従するイージング */
    will-change: transform;
}

/* -------------------------------------------------
   Filmstrip Layout (Scene Gallery Option 5)
   ------------------------------------------------- */
.filmstrip-stage {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.filmstrip-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg); /* 上から下、左から右に自然に読めるように回転 */
    font-family: "Parisienne", cursive;
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    color: #c62235;
    line-height: 2;
    letter-spacing: 0.18em;
    white-space: nowrap;
    border-right: 1px solid rgba(178, 73, 44, 0.15);
    padding-right: 2.5rem;
}

.filmstrip-gallery {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-grow: 1;
}

.filmstrip-img-wrap {
    flex: 1;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(90, 48, 32, 0.05);
    border-radius: 2px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease;
}

.filmstrip-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* ホバー時にごく僅かにカードが拡大し、影が深くなる上品なエフェクト */
.filmstrip-img-wrap:hover {
    transform: scale(1.02);
    box-shadow: 0 18px 45px rgba(90, 48, 32, 0.12);
}

/* レスポンシブ：モバイル */
@media (max-width: 768px) {
    .filmstrip-stage {
        flex-direction: column;
        gap: 3rem;
        align-items: stretch;
    }
    
    .filmstrip-text {
        writing-mode: horizontal-tb;
        transform: none;
        white-space: normal;
        border-right: none;
        border-bottom: 1px solid rgba(178, 73, 44, 0.15);
        padding-right: 0;
        padding-bottom: 2rem;
        text-align: center;
    }
    
    .filmstrip-gallery {
        flex-direction: column;
        width: 100%;
        gap: 2rem;
    }
    
    .filmstrip-img-wrap {
        width: 100%;
    }
}





/* iOS Safe Area Fixes for Header */
#mainHeader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #5a3020 !important;
    padding-top: env(safe-area-inset-top) !important;
    /* transition対象を限定し、topなどがアニメーションしてズレるバグを防ぐ */
    transition: background-color 0.5s ease, padding-top 0.5s ease, padding-bottom 0.5s ease, box-shadow 0.5s ease !important;
}
#mainHeader.scrolled {
    padding-top: calc(0.25rem + env(safe-area-inset-top)) !important;
}

@media (max-width: 767px) {
    /* スマホ実機でヘッダーが押し下げられて上に隙間ができるバグに対し、
       ヘッダーの上端からさらに上へ背景色を伸ばして隙間を完璧に塗りつぶします。
       Safariの動的継承（inherit）バグを避けるため、.scrolled時に明示的に背景色を適用します。 */
    #mainHeader::before {
        content: "";
        position: absolute;
        bottom: 100%;
        left: 0;
        width: 100%;
        height: 150px;
        background-color: #5a3020 !important;
        pointer-events: none;
        display: block;
        transition: background-color 0.5s ease;
    }
    #mainHeader.scrolled::before {
        background-color: #5a3020 !important;
    }
}

@media (min-width: 768px) {
    #mainHeader {
        padding-top: calc(0.5rem + env(safe-area-inset-top)) !important;
    }
}


/* =========================================================================
   Antigravity Auto Fix v3: Safari GPU Layer Containment
   重要: Safariではtransformを持つ要素のposition:fixedが壊れるため、
   ヘッダーにはtransformを絶対に使わない。代わりにFV側を封じ込める。
   ========================================================================= */

/* --- ヘッダー: 最大z-indexかつtransformなし --- */
.header, #mainHeader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: #5a3020 !important;
    background: #5a3020 !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    z-index: 2147483647 !important;
    /* transformは絶対に設定しない - Safariでfixedが壊れる */
    transform: none !important;
    -webkit-transform: none !important;
}

/* --- ヘッダー上のノッチ裏シールド --- */
.header::before, #mainHeader::before {
    content: "" !important;
    position: absolute !important;
    bottom: 100% !important;
    left: 0 !important;
    width: 100% !important;
    height: 300px !important;
    background-color: #5a3020 !important;
    pointer-events: none !important;
    display: block !important;
    z-index: 2147483647 !important;
    /* こちらもtransformなし */
    transform: none !important;
    -webkit-transform: none !important;
}

/* --- FVセクション: GPU層が外に漏れないよう完全封じ込め --- */
.fv-section, #fv {
    position: relative !important;
    z-index: 1 !important;
    /* containでFV内のGPUレイヤーがヘッダーの手前に出るのを阻止 */
    contain: layout style paint !important;
    isolation: isolate !important;
    /* FV自体を平面に潰す */
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
}

/* FV内部のスライドショー画像もz-indexを低く抑える */
.fv-slideshow,
.fv-slideshow img,
.fv-grid-item,
.fv-container {
    z-index: auto !important;
}

/* FV内部のアニメーション要素がGPU昇格してもFVの外に出られないようにする */
.fv-slideshow img {
    -webkit-transform-style: flat !important;
    transform-style: flat !important;
}

@media (max-width: 1024px) {
    .fv-section, #fv {
        margin-top: 0 !important;
        padding-top: calc(70px + env(safe-area-inset-top, 0px)) !important;
    }
}