:root {
    --bg-dark: #0a0a0a;
    --bg-light: #f4f4f0;
    --text-dark: #1a1a1a;
    --text-light: #f4f4f0;
    --accent: #d4af37;
    --gray: #888;

    --font-main: 'Zen Kaku Gothic New', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    --font-display: 'Cinzel', serif;

    --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-fluid: cubic-bezier(0.4, 0, 0, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow: hidden;
    /* Default for desktop smooth scroll */
    cursor: none;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

ul {
    list-style: none;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Custom Cursor --- */
.cursor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-main {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.cursor-follower {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

.cursor-text {
    position: absolute;
    top: -30px;
    left: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
    white-space: nowrap;
}

body.hover-active .cursor-follower {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

body.hover-active .cursor-text {
    opacity: 1;
}

/* --- Loading & Intro --- */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-dark);
    color: var(--text-light);
}

.intro-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 6vw, 3rem);
    letter-spacing: clamp(0.2em, 2vw, 0.5em);
    overflow: hidden;
    display: flex;
}

.intro-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
}

.intro-shutter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    transform: scaleY(0);
    transform-origin: bottom;
    z-index: 1;
}

/* --- Fixed UI --- */
.ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    padding: 2rem;
    mix-blend-mode: difference;
    color: #fff;
}

.brand-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    pointer-events: auto;
}

.menu-trigger {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: inherit;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    cursor: none;
}

.menu-trigger .line {
    width: 40px;
    height: 1px;
    background: currentColor;
    transition: width 0.3s;
}

.menu-trigger:hover .line:first-child {
    width: 20px;
}

.menu-trigger:hover .line:nth-child(2) {
    width: 30px;
}

.menu-trigger .text {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-top: 5px;
}

.scroll-status {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
}

.scroll-status .bar {
    width: 100px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

.scroll-status .progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #fff;
}

.book-now {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    pointer-events: auto;
    transition: all 0.4s var(--ease-expo);
    overflow: hidden;
}

.book-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-expo);
    z-index: -1;
}

.book-now:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.book-now:hover {
    border-color: var(--accent);
}

.book-now .btn-text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    white-space: nowrap;
}

.book-now .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0.75rem;
    transition: transform 0.3s var(--ease-expo);
}

.book-now .btn-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.book-now:hover .btn-icon {
    transform: translateX(3px);
}

/* --- Navigation Overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.nav-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.nav-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
}

.nav-links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.nav-links li {
    overflow: hidden;
    margin: 1rem 0;
}

.nav-links a {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 4rem);
    color: var(--text-light);
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-expo), color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
    font-style: italic;
}

.nav-overlay.active .nav-links a {
    transform: translateY(0);
}

.nav-footer {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--gray);
    font-family: var(--font-serif);
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* --- Main Layout --- */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 10vh clamp(1.25rem, 5vw, 3rem);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    /* Full screen */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 8vw;
    line-height: 0.9;
    color: #fff;
    mix-blend-mode: overlay;
}

.hero-title .line {
    display: block;
}

.hero-title .word {
    display: inline-block;
    transform: translateY(100%);
}

.hero-title .italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
}

.hero-scroll-down {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    opacity: 0.7;
}

.hero-scroll-down .line {
    width: 1px;
    height: 60px;
    background: #fff;
}

/* Philosophy Section */
.philosophy {
    background: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.philosophy-content {
    max-width: 1000px;
    margin: 0 auto;
}

.label-text {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    color: var(--gray);
}

.big-text {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 5vw, 4rem);
    line-height: 1.5;
    font-weight: 400;
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

.highlight {
    color: var(--accent);
    font-style: italic;
}

.desc-block {
    margin-left: 40%;
    max-width: 500px;
    font-size: 1.1rem;
    line-height: 2;
    color: #444;
}

.magnetic-btn {
    display: inline-block;
    margin-top: 3rem;
    position: relative;
    padding: 1rem 2rem;
    border: 1px solid var(--text-dark);
    border-radius: 50px;
    overflow: hidden;
    color: var(--text-dark);
}

.magnetic-btn .hover-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text-dark);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s;
    z-index: -1;
}

.magnetic-btn:hover .hover-circle {
    transform: scale(2);
    /* Fill effect */
}

.magnetic-btn:hover {
    color: #fff;
}

/* Services Horizontal Scroll */
.services-scroller {
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: var(--bg-dark);
}

.services-track {
    display: flex;
    gap: 5vw;
    padding-left: 10vw;
    width: max-content;
}

.service-intro {
    min-width: 30vw;
}

.service-intro h2 {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 2rem;
}

.service-item {
    position: relative;
    width: 30vw;
    height: 60vh;
    flex-shrink: 0;
}

.service-img-box {
    width: 100%;
    height: 70%;
    overflow: hidden;
    position: relative;
}

.service-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.service-item:hover .service-img-box img {
    transform: scale(1.1);
}

.service-info {
    margin-top: 1.5rem;
    color: #fff;
}

.service-info .num {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.service-info h3 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
}

.service-info .price {
    color: var(--accent);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.end-card {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20vw;
}

.circle-cta {
    width: 150px;
    height: 150px;
    border: 1px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.3s, color 0.3s;
    font-family: var(--font-display);
}

.circle-cta:hover {
    background: #fff;
    color: #000;
}

/* Gallery Section */
.gallery {
    background: var(--bg-light);
    min-height: 150vh;
    position: relative;
    padding-top: 10vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    width: 100%;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item:nth-child(1) {
    grid-column: 2 / 7;
    height: 60vh;
}

.gallery-item:nth-child(2) {
    grid-column: 8 / 12;
    height: 50vh;
    margin-top: 20vh;
}

.gallery-item:nth-child(3) {
    grid-column: 3 / 6;
    height: 40vh;
    margin-top: -10vh;
}

.gallery-text {
    grid-column: 7 / 11;
    text-align: center;
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1;
    color: var(--text-dark);
    margin-top: 10vh;
    z-index: 2;
}

/* Contact Section */
.contact {
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 5rem;
}

.contact-container {
    width: 100%;
    max-width: 800px;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-header h2 {
    font-family: var(--font-display);
    font-size: 4rem;
    margin-bottom: 1rem;
}

.contact-header p {
    color: var(--gray);
}

.minimal-form .input-group {
    position: relative;
    margin-bottom: 3rem;
}

.minimal-form input,
.minimal-form textarea {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 1rem 0;
    min-height: 48px;
    font-family: var(--font-main);
    border-radius: 0;
    /* iOS fix */
}

.minimal-form textarea {
    resize: none;
    height: 100px;
}

.minimal-form label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--gray);
    pointer-events: none;
    transition: 0.3s;
}

.minimal-form input:focus~label,
.minimal-form input:not(:placeholder-shown)~label,
.minimal-form textarea:focus~label,
.minimal-form textarea:not(:placeholder-shown)~label {
    top: -1.5rem;
    font-size: 0.8rem;
    color: var(--accent);
}

.minimal-form .line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #333;
}

.minimal-form .line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s;
}

.minimal-form input:focus~.line::after,
.minimal-form textarea:focus~.line::after {
    transform: scaleX(1);
}

.submit-magnetic {
    width: 100%;
    padding: 1.5rem;
    background: #fff;
    color: #000;
    border: none;
    font-family: var(--font-display);
    font-size: 1.2rem;
    cursor: none;
    transition: transform 0.3s, background 0.3s;
}

.submit-magnetic:hover {
    background: var(--accent);
    color: #fff;
}

.contact-info-footer {
    margin-top: 5rem;
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-family: var(--font-serif);
    border-top: 1px solid #333;
    padding-top: 3rem;
}

.contact-info-footer h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.contact-info-footer a {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.contact-info-footer a:hover {
    color: #fff;
}

/* Footer Marquee */
.main-footer {
    background: var(--bg-dark);
    padding: 2rem 0;
    overflow: hidden;
    border-top: 1px solid #333;
}

.marquee .track {
    display: flex;
    gap: 2rem;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #333;
}

.footer-links-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2rem);
    margin-top: 2rem;
    padding: 0 1rem;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: var(--gray);
}

/* Animations */
@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, -20px);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.overflow-hidden {
    overflow: hidden;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {

    /* Reset body for native scroll */
    body {
        overflow: auto;
        height: auto;
        cursor: auto;
    }

    /* Hide custom cursor on touch devices */
    .cursor-wrapper {
        display: none;
    }

    /* Reset smooth scroll container */
    #smooth-wrapper,
    #smooth-content {
        position: static;
        transform: none;
        height: auto;
        width: 100%;
    }

    /* UI Adjustments */
    .ui-layer {
        padding: 1rem;
    }

    .brand-logo {
        top: 1.25rem;
        left: 1.25rem;
        font-size: clamp(1rem, 4vw, 1.2rem);
    }

    .menu-trigger {
        top: 1.25rem;
        right: 1.25rem;
    }

    .menu-trigger .line {
        width: 32px;
    }

    .menu-trigger .text {
        font-size: 0.7rem;
    }

    .scroll-status,
    .book-now {
        display: none;
    }

    /* Hero */
    .hero-title {
        font-size: clamp(10vw, 15vw, 20vw);
        padding: 0 1rem;
    }

    .hero-scroll-down {
        bottom: 4rem;
    }

    .hero-scroll-down .line {
        height: 40px;
    }

    /* Philosophy */
    .section {
        padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2rem);
        min-height: auto;
    }

    .desc-block {
        margin-left: 0;
        font-size: clamp(0.9rem, 2.5vw, 1rem);
        line-height: 1.9;
    }

    .magnetic-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 1rem 1.5rem;
    }

    /* Services (Vertical Stack) */
    .services-scroller {
        height: auto;
        display: block;
        overflow: visible;
        padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2rem);
    }

    .services-track {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: clamp(2.5rem, 6vw, 4rem);
    }

    .service-intro {
        width: 100%;
        margin-bottom: 2rem;
    }

    .service-intro h2 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .service-intro p {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }

    .service-item {
        width: 100%;
        height: auto;
    }

    .service-img-box {
        height: clamp(220px, 50vw, 300px);
    }

    .service-info .num {
        font-size: 1.5rem;
    }

    .service-info h3 {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
    }

    .service-info .price {
        font-size: 1rem;
    }

    .end-card {
        width: 100%;
        height: 180px;
    }

    .circle-cta {
        width: 120px;
        height: 120px;
        font-size: 0.9rem;
    }

    /* Gallery */
    .gallery {
        min-height: auto;
        padding-bottom: clamp(3rem, 8vw, 5rem);
    }

    .gallery-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .gallery-item {
        width: 100%;
        height: clamp(220px, 50vw, 300px);
        margin: 0;
        grid-column: auto;
    }

    .gallery-text {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin: 2rem 0;
    }

    /* Contact */
    .contact-header h2 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .contact-header p {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }

    .contact-info-footer {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .contact-info-footer h3 {
        font-size: clamp(1.1rem, 3vw, 1.3rem);
    }

    .submit-magnetic {
        cursor: pointer;
        font-size: clamp(1rem, 3vw, 1.2rem);
        padding: 1.25rem;
    }

    /* Input Group */
    .minimal-form .input-group {
        margin-bottom: 2.5rem;
    }

    .minimal-form label {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
    }
}
/* --- Sub Page Styles --- */
.page-header {
    padding: clamp(6rem, 20vh, 12rem) clamp(1.25rem, 5vw, 3rem) clamp(3rem, 10vh, 6rem);
    text-align: center;
    position: relative;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 6rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
    mix-blend-mode: exclusion;
}

.page-subtitle {
    font-family: var(--font-serif);
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    letter-spacing: 0.1em;
    color: var(--gray);
}

.page-content {
    padding: clamp(3rem, 5vh, 5rem) clamp(1.25rem, 5vw, 3rem) clamp(5rem, 15vh, 10rem);
    position: relative;
    z-index: 2;
}

.text-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Styled Table */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 3rem 0;
    font-family: var(--font-main);
}

.styled-table th,
.styled-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.styled-table th {
    font-family: var(--font-serif);
    color: var(--gray);
    width: 30%;
    font-weight: 400;
}

/* Timeline */
.timeline {
    position: relative;
    margin: 4rem 0;
    padding-left: 2rem;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.5rem;
    width: 0.8rem;
    height: 0.8rem;
    background: var(--bg-dark);
    border: 1px solid var(--accent);
    border-radius: 50%;
}

.timeline-date {
    font-family: var(--font-display);
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

/* Service Detail */
.service-detail-block {
    margin-bottom: 8rem;
}

.service-detail-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.service-detail-header h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
}

.service-detail-header .jp-name {
    font-family: var(--font-serif);
    color: var(--gray);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* Service Grid Layout for Services Page */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    margin-top: 2rem;
}

.service-grid.reverse {
    direction: rtl;
}

.service-grid.reverse > * {
    direction: ltr;
}

/* Reset gallery-item grid-column when inside service-grid */
.service-grid .gallery-item {
    grid-column: auto;
    height: auto;
    margin: 0;
}

.service-grid .service-image {
    grid-column: auto;
    height: clamp(250px, 40vh, 450px);
    margin: 0;
}

.service-grid .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-grid .service-text {
    max-width: none;
}

.service-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.9;
    color: #ccc;
    margin-bottom: 2rem;
}

/* Service CTA */
.service-cta {
    text-align: center;
    padding: clamp(3rem, 8vw, 6rem) 0;
    margin-top: clamp(2rem, 5vw, 4rem);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.service-cta p {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--gray);
    margin-bottom: 2rem;
}

.service-cta .magnetic-btn {
    border-color: #fff;
    color: #fff;
}

.service-cta .magnetic-btn .hover-circle {
    background: #fff;
}

.service-cta .magnetic-btn:hover {
    color: var(--bg-dark);
}

/* --- About Page Styles --- */
.about-philosophy {
    margin-bottom: clamp(4rem, 10vw, 8rem);
}

.about-desc {
    margin-left: 0;
    max-width: 100%;
}

.about-mission {
    margin: clamp(4rem, 10vw, 8rem) 0;
}

.about-mission-image {
    grid-column: 1 / 7;
    height: clamp(300px, 50vh, 500px);
}

.about-mission-text {
    grid-column: 7 / 12;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.mission-heading,
.vision-heading {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--accent);
    margin-bottom: 1rem;
}

.vision-heading {
    margin-top: 2.5rem;
}

.mission-text {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.9;
    color: var(--text-dark);
}

/* --- Company Page Styles --- */
.company-message {
    margin-bottom: clamp(4rem, 10vw, 8rem);
}

.company-image {
    grid-column: 1 / 6;
    height: clamp(300px, 50vh, 500px);
}

.company-message-text {
    grid-column: 6 / 12;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    max-width: none;
}

.message-content {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 2;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.ceo-signature {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--accent);
    text-align: right;
    font-style: italic;
}

.section-heading {
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.company-profile {
    margin-bottom: clamp(4rem, 10vw, 8rem);
}

.company-access {
    margin-top: clamp(4rem, 10vw, 8rem);
}

.access-address {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 2;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Light theme text colors */
[data-color="light"] {
    background: var(--bg-light);
    color: var(--text-dark);
}

[data-color="light"] .big-text,
[data-color="light"] .section-heading {
    color: var(--text-dark);
}

[data-color="light"] .desc-block,
[data-color="light"] .about-desc {
    color: #444;
}

[data-color="light"] .mission-text,
[data-color="light"] .message-content,
[data-color="light"] .about-mission-text .mission-text {
    color: #333 !important;
}

/* Force override for about-mission-text inside light theme */
[data-color="light"] .about-mission-text {
    color: var(--text-dark);
}

[data-color="light"] .about-mission-text p {
    color: #333;
}

[data-color="light"] .mission-heading,
[data-color="light"] .vision-heading {
    color: var(--accent);
}

[data-color="light"] .ceo-signature {
    color: var(--accent);
}

[data-color="light"] .access-address {
    color: #444;
}

[data-color="light"] .feature-item {
    border-color: rgba(0,0,0,0.1);
    color: var(--text-dark);
}

[data-color="light"] .feature-item h4 {
    color: var(--text-dark);
}

[data-color="light"] .feature-item p {
    color: #666;
}

[data-color="light"] .styled-table th {
    color: var(--gray);
}

[data-color="light"] .styled-table td {
    color: var(--text-dark);
}

[data-color="light"] .styled-table td a {
    color: var(--accent);
}

[data-color="light"] .styled-table td a:hover {
    color: var(--text-dark);
}

[data-color="light"] .styled-table th,
[data-color="light"] .styled-table td {
    border-bottom-color: rgba(0,0,0,0.1);
}

[data-color="light"] .timeline {
    border-left-color: rgba(0,0,0,0.15);
}

[data-color="light"] .timeline-item::before {
    background: var(--bg-light);
    border-color: var(--accent);
}

[data-color="light"] .timeline-item p {
    color: #444;
}

[data-color="light"] .timeline-date {
    color: var(--accent);
}

/* Light theme map container */
[data-color="light"] .map-container {
    border-color: rgba(0,0,0,0.1);
}

/* Dark theme text colors */
[data-color="dark"] {
    background: var(--bg-dark);
    color: var(--text-light);
}

[data-color="dark"] .big-text,
[data-color="dark"] .section-heading {
    color: var(--text-light);
}

[data-color="dark"] .service-description {
    color: #ccc;
}

[data-color="dark"] .service-detail-header h2 {
    color: var(--text-light);
}

[data-color="dark"] .service-detail-header .jp-name {
    color: var(--gray);
}

[data-color="dark"] .styled-table th {
    color: var(--gray);
}

[data-color="dark"] .styled-table td {
    color: var(--text-light);
}

[data-color="dark"] .styled-table th,
[data-color="dark"] .styled-table td {
    border-bottom-color: rgba(255,255,255,0.1);
}

[data-color="dark"] .feature-item {
    border-color: rgba(255,255,255,0.1);
    color: var(--text-light);
}

[data-color="dark"] .feature-item p {
    color: #aaa;
}

/* Legal Text */
.legal-text h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin: 4rem 0 2rem;
    color: var(--accent);
}

.legal-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #ccc;
}

.legal-text ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 2rem;
    color: #ccc;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

/* Legal text in light theme */
[data-color="light"] .legal-text p,
[data-color="light"] .legal-text ul,
[data-color="light"] .legal-text li {
    color: #444;
}

[data-color="light"] .legal-text h2 {
    color: var(--accent);
}

/* Legal table in light theme */
[data-color="light"] .legal-table ul,
[data-color="light"] .legal-table li {
    color: #444;
}

/* Policy date in light theme */
[data-color="light"] .policy-date {
    color: var(--gray);
}

/* Address in light theme */
[data-color="light"] address {
    color: #444;
    border-color: rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.02);
}

[data-color="light"] address a {
    color: var(--accent);
}

[data-color="light"] address a:hover {
    color: var(--text-dark);
}

/* Label text adjustment for better contrast */
[data-color="light"] .label-text {
    color: #666;
}

/* Philosophy section desc-block */
[data-color="light"] .desc-block p {
    color: #444;
}

/* Magnetic button in light theme */
[data-color="light"] .magnetic-btn {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

[data-color="light"] .magnetic-btn .hover-circle {
    background: var(--text-dark);
}

[data-color="light"] .magnetic-btn:hover {
    color: #fff;
}

/* Gallery text in light theme */
[data-color="light"] .gallery-text,
[data-color="light"] .gallery-text p {
    color: var(--text-dark);
}

/* Responsive Sub Pages */
@media (max-width: 768px) {
    .styled-table th, .styled-table td {
        display: block;
        width: 100%;
        padding: 0.75rem 0;
    }
    .styled-table th {
        margin-top: 1.25rem;
        color: var(--accent);
        font-size: 0.9rem;
    }
    .styled-table td {
        font-size: 1rem;
    }
    .service-detail-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    .service-detail-header h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    /* Service Grid Mobile */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .service-grid.reverse {
        direction: ltr;
    }
    .service-grid .service-image {
        height: 250px;
    }

    /* Service Detail Block */
    .service-detail-block {
        margin-bottom: 4rem;
    }
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 1rem 2rem;
    z-index: 100000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* --- Hidden (Honeypot) --- */
.hidden {
    position: absolute;
    left: -9999px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* --- Select Styling --- */
.minimal-form select {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 1rem 0;
    min-height: 48px;
    font-family: var(--font-main);
    border-radius: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
}

.minimal-form select:focus {
    outline: none;
}

.minimal-form select option {
    background: var(--bg-dark);
    color: #fff;
    padding: 0.5rem;
}

.minimal-form select:focus ~ .line::after {
    transform: scaleX(1);
}

/* --- Thanks Page Styles --- */
.thanks-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a1a2e 100%);
}

.thanks-content {
    text-align: center;
}

.thanks-message {
    max-width: 600px;
}

.thanks-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.thanks-message h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
}

.thanks-message p {
    line-height: 2;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.thanks-note {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 2rem;
}

.thanks-btn {
    margin-top: 3rem;
}

/* --- Error Page Styles --- */
.error-header {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2e1a1a 100%);
}

.error-title {
    font-size: 10vw;
    color: var(--accent);
}

.error-content {
    text-align: center;
}

.error-message {
    max-width: 600px;
}

.error-message h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #fff;
}

.error-message p {
    line-height: 2;
    color: #ccc;
    margin-bottom: 2rem;
}

.error-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* --- Contact Page Additional Styles --- */
.contact-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-lead {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    line-height: 2;
    color: #ccc;
}

.contact-form-main {
    max-width: 700px;
    margin: 0 auto;
}

.contact-info-section {
    max-width: 700px;
    margin: 4rem auto 0;
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.access-note {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.phone-link,
.mail-link {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.phone-link:hover,
.mail-link:hover {
    color: var(--accent);
}

.business-hours {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 1rem;
}

/* --- Legal Table Additional Styles --- */
.legal-table ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.legal-table li {
    margin-bottom: 0.3rem;
    color: #ccc;
}

/* --- Policy Date --- */
.policy-date {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 3rem;
    text-align: right;
}

/* --- Address Styling --- */
address {
    font-style: normal;
    line-height: 2;
    color: #ccc;
    margin-top: 2rem;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.02);
}

address a {
    color: var(--accent);
    transition: color 0.3s;
}

address a:hover {
    color: #fff;
}

/* --- Footer Copyright --- */
.copyright {
    text-align: center;
    color: var(--gray);
    font-size: 0.8rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- Screen Reader Only --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Google Map Iframe --- */
.map-container {
    width: 100%;
    margin: 3rem 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: 0;
}

/* --- Responsive Additional --- */
@media (max-width: 768px) {
    .error-title {
        font-size: clamp(4rem, 20vw, 8rem);
    }
    .error-links {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    .error-links .magnetic-btn {
        width: 100%;
        max-width: 280px;
    }
    .error-message h2 {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
    }
    .error-message p {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }

    .thanks-icon {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    .thanks-message h2 {
        font-size: clamp(1.3rem, 4vw, 2rem);
    }
    .thanks-message p {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }
    .thanks-note {
        font-size: 0.85rem;
    }

    .contact-lead {
        font-size: clamp(1rem, 3vw, 1.3rem);
    }
    .contact-info-section {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }
    .contact-info-footer {
        gap: 2rem;
    }
    .phone-link, .mail-link {
        font-size: clamp(1rem, 3vw, 1.3rem);
    }
    .info-block h2 {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }
    .business-hours, .access-note {
        font-size: 0.85rem;
    }

    /* Map */
    .map-container iframe {
        height: 300px;
    }

    /* Address */
    address {
        padding: 1.5rem;
        font-size: 0.95rem;
    }

    /* Legal text */
    .legal-text h2 {
        font-size: clamp(1.2rem, 4vw, 1.8rem);
        margin: 3rem 0 1.5rem;
    }
    .policy-date {
        text-align: left;
        font-size: 0.85rem;
    }

    /* About/Company Grid Mobile Fix */
    .about-mission,
    .company-message {
        display: block;
    }
    .about-mission-image,
    .about-mission-text,
    .company-image,
    .company-message-text {
        grid-column: auto;
        width: 100%;
    }
    .about-mission-image,
    .company-image {
        height: clamp(200px, 45vw, 280px);
        margin-bottom: 2rem;
    }
    .about-mission-text,
    .company-message-text {
        padding: 0;
    }

    /* Navigation Links Mobile */
    .nav-links a {
        font-size: clamp(1.5rem, 7vw, 2.5rem);
    }
}

/* --- Landscape Mobile Fix --- */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100svh;
    }
    .section {
        min-height: auto;
    }
    .hero-title {
        font-size: clamp(6vw, 10vw, 12vw);
    }
    .hero-scroll-down {
        bottom: 1.5rem;
    }
    .hero-scroll-down .line {
        height: 25px;
    }
}

/* --- Touch Device Hover Fix --- */
@media (hover: none) and (pointer: coarse) {
    .service-item:hover .service-img-box img {
        transform: none;
    }
    .magnetic-btn:hover .hover-circle {
        transform: scale(0);
    }
    .magnetic-btn:hover {
        color: inherit;
    }
    .magnetic-btn:active .hover-circle {
        transform: scale(2);
    }
    .magnetic-btn:active {
        color: #fff;
    }
    .nav-links a:hover {
        color: var(--text-light);
        font-style: normal;
    }
    .nav-links a:active {
        color: var(--accent);
    }
    .circle-cta:hover {
        background: transparent;
        color: inherit;
    }
    .circle-cta:active {
        background: #fff;
        color: #000;
    }
}

/* --- Extra Small Screens (320px) --- */
@media (max-width: 374px) {
    .brand-logo {
        font-size: 0.9rem;
    }
    .menu-trigger .line {
        width: 28px;
    }
    .menu-trigger .text {
        font-size: 0.6rem;
    }
    .hero-title {
        font-size: 18vw;
    }
    .big-text {
        font-size: clamp(1.3rem, 5vw, 1.75rem);
    }
    .page-title {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }
    .nav-links a {
        font-size: clamp(1.2rem, 8vw, 1.8rem);
    }
    .contact-header h2 {
        font-size: clamp(1.4rem, 8vw, 1.8rem);
    }
    .gallery-text {
        font-size: clamp(1.3rem, 8vw, 1.8rem);
    }
    .service-intro h2 {
        font-size: clamp(1.5rem, 10vw, 2rem);
    }
    .styled-table th,
    .styled-table td {
        font-size: 0.85rem;
        padding: 0.6rem 0;
    }
}

/* --- Large Screens (1440px+) --- */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    .text-container {
        max-width: 900px;
    }
    .contact-container {
        max-width: 900px;
    }
    .hero-title {
        font-size: 7vw;
    }
}

/* --- Extra Large Screens (1920px+) --- */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    .container {
        max-width: 1600px;
    }
    .hero-title {
        font-size: 6.5vw;
    }
    .service-item {
        width: 25vw;
    }
}

