:root {
    --bg-deep: #020205;
    --bg-matte: #0a0a10;
    --text-main: #ffffff;
    --text-sub: #cfcfcf;
    --gold-main: #c5a059;
    --gold-light: #f0d6a8;
    --font-mincho: 'Shippori Mincho', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
    --nav-kanji-size: 1.0rem;
    --nav-en-size: 0.65rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-mincho);
    line-height: 2.0;
    letter-spacing: 0.08em;
    overflow-x: hidden;
}

/* --- Deep Nebula Background (CSS Only) --- */
#space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: url('lamat_bg_d_fantasy.jpg') no-repeat center center/cover;
    filter: brightness(0.4) contrast(1.2);
    /* Default fallback or initial state */
}

/* --- Pattern Variations (Strict Black & Gold) --- */
.bg-pattern-g {
    background-image: url('lamat_bg_g.png') !important;
    filter: grayscale(100%) sepia(100%) hue-rotate(0deg) saturate(2.0) brightness(0.6) contrast(1.3) !important;
}

.bg-pattern-h {
    background-image: url('lamat_bg_h.jpg') !important;
    filter: grayscale(100%) sepia(100%) hue-rotate(5deg) saturate(1.5) brightness(0.5) contrast(1.5) !important;
}

.bg-pattern-i {
    background-image: url('lamat_bg_i.jpg') !important;
    filter: grayscale(100%) sepia(100%) hue-rotate(-5deg) saturate(1.2) brightness(0.7) contrast(1.4) !important;
}

/* Overlay for readability */
#space-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darken for text readability */
}

/* Subtle Overlay Texture */
.hero-bg-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 50% 100%, rgba(60, 20, 80, 0.2), transparent 60%),
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MDAiIGhlaWdodD0iNDAwIj48ZmlsdGVyIGlkPSJnoiPjgoZmVUbHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2BGcmVxdWVuY3k9IjAuODUiIG51bU9jdGF2ZXM9IjMiIHN0aXRjaFRpbGVzPSJzdGl0Y2giLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjbikiIG9wYWNpdHk9IjAuMDQiLz48L3N2Zz4=');
    z-index: -1;
    mix-blend-mode: color-dodge;
    opacity: 0.8;
}

/* --- Planet Visual (Highest Class Addition) --- */
.planet-visual {
    position: fixed;
    top: 50%;
    right: -10%;
    width: 60vh;
    height: 60vh;
    background: radial-gradient(circle at 30% 30%, transparent 40%, #000 60%),
        radial-gradient(circle at 50% 50%, #4b0082, #000);
    border-radius: 50%;
    box-shadow: -20px -20px 60px rgba(100, 50, 255, 0.2),
        inset 10px 10px 40px rgba(0, 0, 0, 0.8);
    z-index: -2;
    opacity: 0.6;
    filter: blur(2px);
    pointer-events: none;
    animation: planetFloat 20s infinite alternate ease-in-out;
}

@keyframes planetFloat {
    0% {
        transform: translateY(0);
    }

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

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Utility */
a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

h1,
h2,
h3 {
    font-weight: 500;
}

/* --- Header Redesign --- */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 50px;
    z-index: 1000;
    background: rgba(2, 2, 5, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

/* Logo: Small & Compact */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-symbol {
    display: flex;
    align-items: center;
}

.logo-symbol img {
    height: 34px;
    /* Enlarged from 24px */
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.logo-text {
    font-family: var(--font-mincho);
    font-size: 1.4rem;
    /* Enlarged from 0.9rem */
    letter-spacing: 0.12em;
    font-weight: 500;
    color: #fff;
    padding-top: 2px;
}

/* Nav: Consistent with Reference Image 4 */
.nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.1;
}

.nav-ja {
    font-size: 1.0rem;
    /* Kept 1.0rem - good balance with 1.4rem logo */
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.1em;
    margin-bottom: 3px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.nav-en {
    font-size: var(--nav-en-size);
    font-family: var(--font-sans);
    color: #aaa;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 400;
}

/* --- Hero --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    padding-top: 80px;
    /* Header space */
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
    transition: 1s ease-out;
}

.hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-title {
    font-size: 3.2rem;
    /* Initial size */
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 50%, var(--gold-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: 0.5s;
}

/* Vignette Effect behind Hero Text */
.hero-content::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-subtitle {
    font-size: 1rem;
    /* Slightly smaller for longer text */
    line-height: 2.2;
    /* Breathable line height */
    margin-bottom: 50px;
    font-weight: 300;
    color: #ddd;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    text-align: left;
    /* Left align for longer copy usually reads better centered block? Let's try center for now as requested or check image. User said "Highest class". Centered usually works for subcopy if < 4 lines. This is 5 lines. Let's try keeping center but nice width. */
    display: inline-block;
}

.hero-btn {
    display: inline-block;
    padding: 15px 50px;
    border: 1px solid var(--gold-main);
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
    transition: 0.4s;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gold-main);
    transition: 0.4s;
    z-index: -1;
}

.hero-btn:hover {
    color: #000;
}

.hero-btn:hover::before {
    width: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.scroll-indicator span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    opacity: 0.7;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: #fff;
    margin: 0 auto;
    animation: scrollDrop 2s infinite;
}

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

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

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

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


/* --- Sections --- */
.section {
    padding: 120px 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- Section Title Composite (Japanese over English) --- */
.section-title-composite {
    position: relative;
    text-align: center;
    margin-bottom: 80px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-en {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-mincho);
    /* Serif for elegance */
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.03);
    /* Very faint */
    z-index: 0;
    white-space: nowrap;
    letter-spacing: 0.1em;
}

.fg-ja {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.2em;
    font-family: var(--font-mincho);
}


/* --- Concept V9 (Image Match) --- */
.concept-container-v9 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.concept-layout-v9 {
    display: flex;
    gap: 80px;
    align-items: flex-start;
    justify-content: center;
}

/* Left: Vertical Title + Line */
.concept-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.concept-vertical-title {
    writing-mode: vertical-rl;
    font-family: var(--font-mincho);
    font-size: 2.8rem;
    letter-spacing: 0.4em;
    color: #fff;
    font-weight: 500;
}

.concept-line {
    width: 1px;
    height: 300px;
    /* Adjust length as needed */
    background: linear-gradient(to bottom, var(--gold-main), transparent);
    margin-top: 10px;
}

/* Right: Heading + Body */
.concept-right {
    text-align: left;
    padding-top: 50px;
    /* Align with title roughly */
}

.concept-heading-v9 {
    font-size: 2.2rem;
    font-family: var(--font-mincho);
    color: var(--gold-main);
    margin-bottom: 50px;
    line-height: 1.4;
    text-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
}

.concept-body-v9 p {
    font-size: 1.05rem;
    line-height: 2.4;
    margin-bottom: 40px;
    color: #ccc;
    font-weight: 300;
}


/* --- Service V9 (Horizontal Grid) --- */
.service-grid-v9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card-v9 {
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 50px 30px;
    text-align: start;
    position: relative;
    backdrop-filter: blur(10px);
    transition: 0.4s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hover Shine Effect */
.service-card-v9::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.service-card-v9:hover {
    border-color: var(--gold-main);
    transform: translateY(-5px);
    background: rgba(15, 15, 22, 0.7);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.service-card-v9:hover::after {
    left: 150%;
    transition: 0.7s;
}

.service-num-v9 {
    font-size: 4rem;
    font-family: var(--font-mincho);
    color: rgba(255, 255, 255, 0.05);
    /* Faint background num */
    line-height: 1;
    margin-bottom: 20px;
    align-self: flex-end;
    /* Number at top right or bottom right? Let's try top right for balance */
    position: absolute;
    top: 20px;
    right: 20px;
}

.service-title-v9 {
    font-size: 1.6rem;
    font-family: var(--font-mincho);
    color: #fff;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.5);
    padding-bottom: 15px;
    display: inline-block;
}

.service-desc-v9 {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #ccc;
    margin-top: auto;
    /* Push to bottom if height varies */
}

/* Mobile V9 */
@media (max-width: 900px) {
    .service-grid-v9 {
        grid-template-columns: 1fr;
    }

    .concept-layout-v9 {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .concept-left {
        flex-direction: row;
        /* Horizontal title on mobile or keep vertical? Vertical might be too tall. Let's make it horizontal for mobile safe */
        writing-mode: horizontal-tb;
        align-items: center;
    }

    .concept-vertical-title {
        writing-mode: horizontal-tb;
        font-size: 2rem;
        letter-spacing: 0.2em;
    }

    .concept-line {
        width: 100px;
        height: 1px;
        background: linear-gradient(to right, var(--gold-main), transparent);
        margin-top: 0;
        margin-left: 20px;
    }

    .concept-right {
        text-align: center;
        padding-top: 0;
    }

    .concept-body-v9 p {
        text-align: left;
    }
}


/* --- Trust Section (replacing Representative) --- */
.trust-block {
    max-width: 900px;
    margin: 0 auto;
    background: #08080c;
    /* Solid dark block */
    position: relative;
    padding: 3px;
    /* For double border effect inside */
}

.trust-border {
    border: 1px solid var(--gold-main);
    padding: 60px;
    text-align: center;
    position: relative;
}

.trust-title {
    margin-bottom: 50px;
}

.trust-en {
    display: block;
    font-family: var(--font-sans);
    letter-spacing: 0.2em;
    color: var(--gold-main);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.trust-ja {
    display: block;
    font-size: 2.2rem;
    font-family: var(--font-mincho);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.trust-item h3 {
    font-size: 0.9rem;
    color: var(--gold-main);
    margin-bottom: 15px;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
}

.trust-item p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.trust-name {
    font-size: 0.85rem;
    color: #999;
    display: block;
    margin-top: 5px;
}


/* --- Content Island (Unified) --- */
.content-island {
    max-width: 900px;
    /* Unified Width */
    margin: 0 auto;
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 60px;
    border-radius: 4px;
    /* Optional: Keep sharp or slight radius */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.access-section {
    padding-bottom: 40px;
}

.contact-section {
    padding-top: 40px;
    /* Reduced gap since they are islands */
}

.map-island {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.map-container {
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(100%) invert(90%) contrast(1.2);
    /* Deep dark map style */
}

/* Company Table V7 */
.company-table-v7 dl {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.company-table-v7 dl:last-child {
    border-bottom: none;
}

.company-table-v7 dt {
    width: 150px;
    color: var(--gold-main);
    /* Gold for label */
    font-weight: 500;
}

.company-table-v7 dd {
    flex: 1;
    color: #eee;
}

/* Access Center */
.access-info-center {
    text-align: center;
    margin-top: 30px;
}

.access-address-v7 {
    font-size: 1.1rem;
    line-height: 1.8;
    display: inline-block;
    text-align: left;
}

.form-island {
    max-width: 800px;
    margin: 0 auto;
}

.contact-msg {
    text-align: center;
    margin-bottom: 50px;
    line-height: 2.0;
    color: #ccc;
}

/* Form Styles Refined */
.form-group {
    margin-bottom: 35px;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: var(--font-sans);
    border-radius: 2px;
    transition: 0.3s;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold-main);
    background: rgba(0, 0, 0, 0.4);
    outline: none;
}

.form-group label {
    position: absolute;
    top: 22px;
    left: 20px;
    color: #777;
    pointer-events: none;
    transition: 0.3s;
    font-size: 1rem;
    font-family: var(--font-sans);
}

.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label,
.form-group textarea:focus+label,
.form-group textarea:not(:placeholder-shown)+label {
    top: -24px;
    left: 0;
    color: var(--gold-main);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.submit-btn {
    width: 100%;
    padding: 20px;
    background: transparent;
    color: #fff;
    border: 1px solid var(--gold-main);
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.2em;
    font-size: 1.1rem;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: var(--gold-main);
    color: #000;
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.4);
}

/* Footer */
.footer {
    padding: 40px;
    text-align: center;
    border-top: 1px solid #111;
    font-size: 0.75rem;
    color: #555;
}

.footer a {
    color: #777;
    margin-right: 20px;
}

/* Responsive */
.sp-only {
    display: none;
}

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

    #header {
        padding: 15px 20px;
    }

    .nav {
        display: none;
    }

    .hero-copy-main {
        font-size: 2rem;
    }

    /* Concept Block Mobile */
    .concept-layout {
        flex-direction: column;
        gap: 40px;
    }

    .vertical-keyword {
        writing-mode: horizontal-tb;
        font-size: 2.2rem;
        border-right: none;
        border-bottom: 1px solid rgba(197, 160, 89, 0.3);
        padding-left: 0;
        padding-bottom: 20px;
        height: auto;
        width: 100%;
    }

    .concept-title-left {
        text-align: center;
    }

    .concept-body {
        text-align: justify;
    }

    /* Trust Section Mobile */
    .trust-border {
        padding: 30px 20px;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Glass Islands Mobile */
    .glass-island {
        padding: 40px 20px;
    }

    .contact-wrapper {
        flex-direction: column;
    }

    .company-table dl {
        flex-direction: column;
        gap: 5px;
    }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}