@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Noto+Sans+JP:wght@300;400;500;700&family=Shippori+Mincho+B1:wght@400;700&display=swap');

:root {
    --bg-black: #0a0a0a;
    --text-white: #ffffff;
    --accent-gold: #c5a059;
    /* Optional accent color for luxury */
    --font-main: 'Noto Sans JP', sans-serif;
    --font-title: 'Shippori Mincho B1', serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-black);
    color: var(--text-white);
    line-height: 1.8;
    letter-spacing: 0.05em;
    font-size: 16px;
    margin: 0;
    overflow-x: hidden;
}

/* Base Spacing */
section {
    margin-bottom: 80px;
}

@media (min-width: 768px) {
    section {
        margin-bottom: 120px;
    }
}

/* Typography Overrides */
h1,
h2,
h3 {
    font-family: var(--font-title);
    font-weight: 700;
}

/* CTA Heading Custom Style */
.cta-heading {
    font-family: var(--font-title);
    font-weight: 700;
    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
}

/* Section Header Style - Text Based */
.section-header {
    margin: 0 auto 80px;
    text-align: center;
    position: relative;
}

.section-title-en {
    font-family: 'EB Garamond', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 0;
    display: block;
    line-height: 1;
}

.section-title-jp {
    font-size: 1rem;
    font-weight: 400;
    color: #fff;
    position: relative;
    padding-bottom: 20px;
    margin-top: 10px;
    letter-spacing: 0.1em;
}

.section-title-jp::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background-color: var(--accent-gold);
}

@media (min-width: 768px) {
    .section-title-en {
        font-size: 5rem;
    }

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

.section-header-left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.section-header-left .section-title-jp::after {
    left: 0;
    transform: none;
}

/* Responsive Image Gaps */
img {
    vertical-align: bottom;
}

/* FV image adjustment */
.fv-image {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    /* Ensure full visibility */
    display: block;
}

/* Mobile Menu Overlay */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.98);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

/* CTA Styles */
.cta-banner {
    background-color: transparent;
    padding: 40px 0 25px;
    border-top: none;
    border-bottom: none;
    margin: 80px 0 140px;
    position: relative;
    overflow: hidden;
}

.cta-banner .container {
    position: relative;
    z-index: 2;
}

/* CTA Background Text Scrolling */
.cta-bg-scroll-wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    opacity: 0.9;
}

.cta-bg-scroll-track {
    display: flex;
    white-space: nowrap;
    animation: scroll-left 40s linear infinite;
    width: max-content;
    /* Removed will-change to prevent layer creation which breaks background-attachment: fixed */
}

.cta-bg-text-item {
    font-family: 'EB Garamond', serif;
    font-weight: 800;
    font-size: clamp(4rem, 15vw, 12rem);
    line-height: 1.2;
    padding-right: 0.5em;
    /* Spacing */

    /* Parallax Mask Effect */
    background-image: url('../img/bg4.jpg');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

@keyframes scroll-left {
    0% {
        margin-left: 0;
    }

    100% {
        margin-left: var(--scroll-amount, -50%);
    }
}

.cta-banner .border {
    transition: all 0.3s ease;
}

.cta-banner .border:hover {
    border-color: var(--accent-gold) !important;
    background-color: rgba(197, 160, 89, 0.05) !important;
    transform: translateY(-2px);
}

/* Access Section border */
.access-container {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    transition: border-color 0.3s ease;
}

.access-container:hover {
    border-color: var(--accent-gold);
}

@media (min-width: 768px) {
    .access-container {
        padding: 60px;
    }
}

/* Service refinement */
.service-item {
    transition: transform 0.5s ease;
}

.service-item:hover .service-img {
    transform: scale(1.02);
}

.service-img-wrapper {
    overflow: hidden;
}

.service-img {
    transition: transform 0.8s ease;
}

/* Gallery refinement for seamless loop */
.gallery-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

.gallery-swiper .swiper-slide {
    backface-visibility: hidden;
    /* Prevent flickering */
}

#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#back-to-top.visible {
    opacity: 1;
}

/* Floating SP CTA */
.sp-cta-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    z-index: 99;
}

.sp-cta-footer a {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Gallery Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    /* Will be flex via JS */
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Custom Scrollbar for Luxury Feel */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal.reveal-visible {
    opacity: 1;
    transform: none;
}

#maintenance.reveal.reveal-visible,
#about.reveal.reveal-visible,
#report.reveal.reveal-visible {
    transform: none !important;
    opacity: 1 !important;
    /* Ensure no filter or other properties break fixed bg */
    filter: none !important;
    perspective: none !important;
    will-change: auto !important;
}

/* Optional: Stagger delay for child elements */
.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Parallax Background */
#maintenance.parallax-bg {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/bg.jpg');
    background-attachment: fixed !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#about.parallax-bg {
    background-image: linear-gradient(rgb(133 133 133 / 70%), rgba(0, 0, 0, 0.7)), url('../img/bg2.jpg');
    background-attachment: fixed !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    clip-path: polygon(0 5vw, 100% 0, 100% calc(100% - 5vw), 0 100%);
    padding-top: calc(6rem + 5vw);
    padding-bottom: calc(6rem + 5vw);
}

#report.parallax-bg {
    /* Dynamic Gradient Overlay */
    --overlay-color-1: rgba(0, 0, 0, 0.7);
    --overlay-color-2: rgba(0, 0, 0, 0.7);
    background-image: linear-gradient(var(--overlay-color-1), var(--overlay-color-2)), url('../img/bg3.jpg');
    background-attachment: fixed !important;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    clip-path: polygon(0 5vw, 100% 0, 100% calc(100% - 5vw), 0 100%);
    padding-top: calc(6rem + 5vw);
    padding-bottom: calc(6rem + 5vw);
    padding-left: 0;
    padding-right: 0;
}