:root {
    --bg-color: #000000;
    --accent-color: #ffffff;
    --font-display: 'Syncopate', sans-serif;
    --font-tech: 'Rajdhani', sans-serif;
    --font-head: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --text-muted: #888888;
    --c-white: #f0f0f0;
    --c-black: #111111;
    --c-primary: #472e77;
    --font-jp: 'Zen Old Mincho', serif;
    --font-en: 'Syne', sans-serif;
}

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

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
    background-color: var(--bg-color);
    color: var(--accent-color);
    font-family: var(--font-tech);
    /* overflow: hidden; を削除し、autoに変更 */
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

/* --- UI Overlay (Fixed) --- */
.ui-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    pointer-events: none;
    z-index: 20;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    mix-blend-mode: exclusion;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0; /* Animated later */
}

.logo { font-family: var(--font-head); font-weight: 500; font-size: 1.5rem; letter-spacing: 0.1em; }

.progress-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    z-index: 20;
}
.dot { width: 4px; height: 4px; background: #555; border-radius: 50%; transition: 0.3s; }
.dot.active { background: #fff; transform: scale(1.5); box-shadow: 0 0 10px #fff; }

/* --- Loading Screen (Hold Interaction) --- */
.loader-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: #000;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


.loader-spinner {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: rgba(255,255,255,0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    margin-top: 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.7;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Scroll Ghost (The actual scrollable area) --- */
.scroll-ghost {
    position: relative; /* Document flow */
    width: 100%;
    z-index: 10;
}
.ghost-section {
    height: 100vh; /* Full viewport height per section */
    width: 100%;
    pointer-events: none;
    /* Debug border (optional) */
    /* border-bottom: 1px solid rgba(255,255,255,0.1); */
}

/* --- WebGL Canvas (Fixed Background) --- */
#gl-canvas {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 0;
}

/* Titles overlaying canvas (Fixed) */
.section-title {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    pointer-events: none;
    opacity: 0; /* Controlled by JS */
    z-index: 5;
}
.title-main {
    font-family: var(--font-head);
    font-size: clamp(3rem, 8vw, 4rem);
    line-height: 0.9;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 30px rgba(255,255,255,0.3);
    margin-bottom: 1rem;
}
.title-sub {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    line-height: 1.5;
    margin-top: 1rem;
    color: var(--text-muted);
}

/* Left-aligned variant for Plena Inc. section */
.section-title.left-aligned {
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    text-align: left;
    width: auto;
}
.section-title.left-aligned .title-main {
    font-size: 4rem;
}
.section-title.left-aligned .title-sub {
    max-width: 200px;
}

/* --- Japanese Section Styles --- */
.japanese-content {
    opacity: 0;
    transition: opacity 0.5s;
}

.japanese-active .japanese-content {
    opacity: 1;
}

/* 縦書きユーティリティ */
.tategaki {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
}

/* Navigation (Hanko Style) */
.jp-nav {
    position: fixed;
    top: 2rem; right: 1.5rem;
    z-index: 100;
    mix-blend-mode: exclusion;
}
.nav-seal {
    width: 48px; height: 48px;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    writing-mode: horizontal-tb;
}

/* Hero Section */
.hero.jp-section {
    height: 100vh;
    position: relative;
    padding: 2rem;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}

.hero-main {
    font-family: var(--font-jp);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.4;
    height: 80%;
}
.hero-main span {
    display: inline-block;
    opacity: 0;
}

.hero-sub {
    font-family: var(--font-en);
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* Image Circles */
.floating-img {
    position: absolute;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
    z-index: -1;
    opacity: 0.1;
}
.f-img-1 { width: 200px; height: 200px; top: 10%; left: -50px; }
.f-img-2 { width: 300px; height: 300px; bottom: 5%; right: -100px; }

/* Business Section */
.section-dark.jp-section {
    padding: 6rem 1.5rem;
    min-height: 100vh;
    position: relative;
}

.v-card {
    margin-bottom: 8rem;
    position: relative;
    padding-right: 2rem;
}

.v-num {
    font-family: var(--font-en);
    font-size: 4rem;
    color: var(--c-primary);
    position: absolute;
    top: -20px;
    right: 0;
    opacity: 0.3;
    writing-mode: horizontal-tb;
}

.v-title {
    font-family: var(--font-jp);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    height: 200px;
}

.v-desc {
    font-family: var(--font-jp);
    font-size: 0.9rem;
    line-height: 2;
    height: 250px;
    color: #999;
}

.v-img-wrap {
    position: absolute;
    top: 20px;
    left: 0;
    width: 50vw;
    height: 40vh;
    overflow: hidden;
}
.v-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: transform 0.5s;
}

/* Variant classes for v-card layout */
.v-card.alt { margin-left: auto; width: 80%; }
.v-num.left { right: auto; left: 0; }
.v-img-wrap.right { left: auto; right: 0; }
.section-red .brand-title { 
    font-family: var(--font-en); 
    letter-spacing: -1px; 
    font-size: 3rem; 
}
.section-red .brand-desc { 
    margin-bottom: 2rem; 
    font-size: 0.8rem; 
    opacity: 0.8; 
}

/* Red Section */
.section-red.jp-section {
    background-color: var(--c-primary);
    color: var(--c-white);
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 60vh;
}
.section-red h2 {
    font-family: var(--font-en);
    font-size: 2rem;
    margin-bottom: 2rem;
    writing-mode: horizontal-tb;
}
.btn-circle {
    width: 120px; height: 120px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-en);
    text-transform: uppercase;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}
.btn-circle::after {
    content: '';
    position: absolute; width: 0; height: 0;
    background: #fff; border-radius: 50%;
    transition: width 0.4s, height 0.4s;
    z-index: -1;
}
.btn-circle:active::after { width: 150px; height: 150px; }
.btn-circle:active { color: var(--c-primary); }

/* Scroll Progress Line */
.scroll-line {
    position: fixed;
    left: 1.5rem;
    top: 0;
    width: 1px;
    height: 0;
    background: var(--c-primary);
    z-index: 50;
}
