/* 
   D-oneApp Art Theme 
   Based on "Dark & Vibrant" concept
*/

:root {
    --color-bg: #050505;
    --color-text: #f0f0f0;
    --color-text-muted: #888888;
    --color-accent: #3B82F6; /* Fallback accent */
    --color-border: rgba(255, 255, 255, 0.1);
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

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

html {
    font-size: 16px;
    background-color: var(--color-bg);
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* カスタムカーソル使用のため */
}

/* ユーティリティ */
a {
    text-decoration: none;
    color: inherit;
    cursor: none;
}

ul {
    list-style: none;
}

img {
    width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4vw;
}

.container.fluid {
    max-width: 100%;
    padding: 0 4vw;
}

/* カスタムカーソル */
.cursor-dot,
.cursor-circle {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: white;
}

.cursor-circle {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

body.hovered .cursor-circle {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    backdrop-filter: blur(2px);
}

/* ローディング画面 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.loader-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    transform-origin: top;
}

.loader-text {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: #fff;
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
}

/* ナビゲーション */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
    mix-blend-mode: difference; /* 背景色に応じて反転 */
}

.brand {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: #fff;
}

.brand-dot {
    color: var(--color-accent);
}

.menu-toggle {
    background: none;
    border: none;
    width: 40px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: none;
}

.menu-toggle .line {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s, opacity 0.3s;
}

/* メニューオーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #111;
    z-index: 800;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-in-out);
}

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

.menu-items li {
    overflow: hidden;
    margin-bottom: 1rem;
}

.menu-link {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6rem);
    color: rgba(255, 255, 255, 0.3);
    display: block;
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out), color 0.3s;
    line-height: 1;
}

.menu-overlay.active .menu-link {
    transform: translateY(0);
}

/* Stagger delay for menu items handled in CSS for simplicity or JS */
.menu-items li:nth-child(1) .menu-link { transition-delay: 0.1s; }
.menu-items li:nth-child(2) .menu-link { transition-delay: 0.2s; }
.menu-items li:nth-child(3) .menu-link { transition-delay: 0.3s; }
.menu-items li:nth-child(4) .menu-link { transition-delay: 0.4s; }
.menu-items li:nth-child(5) .menu-link { transition-delay: 0.5s; }

.menu-link:hover {
    color: #fff;
    transform: translateX(20px);
}

.menu-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.socials a {
    margin-left: 1.5rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: #fff;
}

/* ヒーローセクション */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transform: scale(1.1); /* パララックス用余白 */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 300;
    line-height: 0.9;
    margin-bottom: 2rem;
    color: #fff;
    mix-blend-mode: overlay; /* 背景と馴染ませる */
}

.line-wrapper {
    display: block;
    overflow: hidden;
}

.line-inner {
    display: block;
    transform: translateY(100%);
    animation: slideUp 1s var(--ease-out) forwards;
}

.line-wrapper:nth-child(2) .line-inner {
    animation-delay: 0.2s;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.hero-sub {
    font-family: var(--font-jp);
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s var(--ease-out);
}

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

.btn-magnetic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    overflow: hidden;
    transition: border-color 0.3s;
}

.btn-magnetic:hover {
    border-color: #fff;
}

.btn-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.5s var(--ease-in-out);
    z-index: -1;
}

.btn-magnetic:hover .btn-circle {
    transform: scale(1);
}

.btn-magnetic:hover .btn-text {
    color: #000;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 4vw;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.6);
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: #fff;
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

/* 共通セクションスタイル */
.section-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1;
    margin-bottom: 3rem;
    color: #fff;
}

/* Concept Section */
.concept-section {
    padding: 10rem 0;
    position: relative;
}

.concept-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-body {
    font-family: var(--font-jp);
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 2;
}

.concept-visual {
    position: relative;
    padding-top: 20%; /* Offset */
}

.image-reveal {
    overflow: hidden;
    position: relative;
}

.image-reveal img {
    transform: scale(1.2);
    transition: transform 1.5s var(--ease-out);
}

.image-reveal.is-visible img {
    transform: scale(1);
}

/* マスクアニメーション用 */
.image-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    transform: scaleY(1);
    transform-origin: bottom;
    transition: transform 1s var(--ease-in-out);
    z-index: 2;
}

.image-reveal.is-visible::after {
    transform: scaleY(0);
}

.floating-caption {
    position: absolute;
    bottom: -10%;
    left: -10%;
    font-family: var(--font-serif);
    font-size: 4rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    z-index: 3;
}

/* Works Section */
.works-section {
    padding: 10rem 0;
}

.works-gallery {
    margin-top: 4rem;
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

.work-item {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 0 4vw;
}

.work-item.reversed {
    grid-template-columns: 1fr 1.5fr;
}

.work-item.reversed .work-image {
    order: 2;
}

.work-info {
    position: relative;
    z-index: 2;
}

.work-cat {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.work-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
    transition: all 0.3s;
}

.link-arrow:hover {
    border-color: #fff;
    gap: 1.5rem;
}

/* Services Section */
.services-section {
    padding: 10rem 0;
}

.service-row {
    display: grid;
    grid-template-columns: auto 2fr 1.5fr auto;
    align-items: center;
    padding: 3rem 0;
    gap: 2rem;
    transition: background-color 0.3s;
}

.service-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.border-top { border-top: 1px solid var(--color-border); }
.border-bottom { border-bottom: 1px solid var(--color-border); }

.service-num {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.service-name {
    font-size: 2rem;
    font-weight: 300;
}

.service-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.service-icon {
    font-size: 1.2rem;
    opacity: 0.5;
    transition: transform 0.3s;
}

.service-row:hover .service-icon {
    transform: rotate(90deg);
    opacity: 1;
    color: var(--color-accent);
}

/* Contact Section */
.contact-section {
    padding: 10rem 0;
    background: linear-gradient(to bottom, var(--color-bg), #0a0a0a);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-sub {
    margin-top: 2rem;
    color: var(--color-text-muted);
    font-family: var(--font-jp);
}

.art-form {
    padding-top: 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 3rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1.2rem;
    outline: none;
    resize: none;
    transition: border-color 0.3s;
}

.input-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.3s;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -1.5rem;
    font-size: 0.8rem;
    color: var(--color-accent);
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom-color: #fff;
}

.submit-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 1.5rem 3rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    border-radius: 50px;
}

.submit-btn:hover {
    background: #fff;
    color: #000;
    padding-right: 4rem;
}

/* Footer */
.footer {
    padding: 5rem 0;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--color-text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: #444;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 900px) {
    .concept-grid,
    .work-item,
    .work-item.reversed,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .service-row {
        grid-template-columns: auto 1fr auto;
        flex-wrap: wrap;
    }

    .service-desc {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}
