/* CSS Reset & Variables */
:root {
    --bg-color: #0d0d0d;
    --text-color: #f0f0f0;
    --accent-color: #7b2cbf;
    /* Vivid Purple */
    --accent-secondary: #00b4d8;
    /* Cyan */
    --gray-dark: #1a1a1a;
    --gray-light: #888888;
    --font-main: 'Outfit', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* スマホでの横揺れ防止 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main), var(--font-jp);
    line-height: 1.6;
    overflow-x: hidden;
    /* スマホでの横揺れ防止 */
    cursor: none;
}

/* Custom Cursor (PCのみ適用) */
@media (pointer: fine) {
    body {
        cursor: none;
    }

    .cursor-dot,
    .cursor-outline {
        position: fixed;
        top: 0;
        left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        z-index: 9999;
        pointer-events: none;
        mix-blend-mode: difference;
    }

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

    .cursor-outline {
        width: 40px;
        height: 40px;
        border: 1px solid #fff;
        transition: width 0.2s, height 0.2s, background-color 0.2s, transform 0.1s ease-out;
    }

    body:hover .cursor-outline {
        opacity: 1;
    }
}

/* スマホでは非表示 */
@media (pointer: coarse) {

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(45deg, var(--text-color), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseLogo 1.5s ease-in-out infinite alternate;
}

.preloader-line {
    width: 0;
    height: 2px;
    background: var(--accent-color);
    margin: 1rem auto 0;
    animation: loadingLine 1.5s ease-in-out forwards;
}

@keyframes pulseLogo {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes loadingLine {
    0% {
        width: 0;
    }

    50% {
        width: 100%;
    }

    100% {
        width: 0;
        margin-left: 100%;
    }
}

/* Hide preloader when loaded */
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(13, 13, 13, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* グラスモーフィズム強化の境界線 */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: transform 0.3s ease-in-out;
}

/* スクロールダウン時にヘッダーを隠すクラス */
.header--hidden {
    transform: translateY(-100%);
}

.logo {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(45deg, var(--text-color), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-list a:hover::after {
    width: 100%;
}

.nav-list a:hover {
    color: var(--accent-color);
}

/* Nav Contact Button */
.btn-nav {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    color: #fff !important;
    -webkit-text-fill-color: initial;
    transition: var(--transition);
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 44, 191, 0.4);
}

.btn-nav::after {
    display: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
}

.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 2px;
    background: var(--text-color);
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* パララックス用に少し高さを出す */
    background-image: url('assets/hero_bg_studio_1_1771701316208.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
    will-change: transform;
    /* ブラウザに最適化を促す */
}

/* 画像の上に暗いオーバーレイをかけて文字を読みやすくする */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.7);
    /* ダーク系の透過ブラック */
    z-index: 1;
}

/* 既存の紫の光（パルス）は残しつつ、少し弱める */
.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.08) 0%, rgba(13, 13, 13, 0) 70%);
    z-index: 2;
    border-radius: 50%;
    filter: blur(60px);
    animation: pulse 8s infinite alternate;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 3;
    /* 背景色・光波より手前に配置 */
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .text-accent {
    color: var(--accent-color);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-light);
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin: 0 0.5rem;
    vertical-align: middle;
    /* ズレ補正 */
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-secondary));
    background-size: 200% auto;
    color: white;
    border: 1px solid transparent;
    /* ボーダー幅を隣と合わせる */
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-color));
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(123, 44, 191, 0.5), 0 0 15px rgba(0, 180, 216, 0.3);
    background-position: right center;
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--gray-light);
}

.btn-outline:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

/* Sections General & Ambient Light */
.section {
    padding: 6rem 5%;
    position: relative;
    /* 背景の光の基準位置として */
}

/* 共通のアンビエント背景装飾（偶数セクションの右側） */
.section:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.04) 0%, rgba(13, 13, 13, 0) 60%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

/* 共通のアンビエント背景装飾（奇数セクションの左側） */
.section:nth-child(odd)::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: -10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.05) 0%, rgba(13, 13, 13, 0) 60%);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    border-top: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

.section-desc {
    text-align: center;
    color: var(--gray-light);
    margin-bottom: 2rem;
    margin-top: -2rem;
    /* Pull it up closer to the title */
    font-size: 0.9rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #ccc;
}

.about-stats {
    /* Removed grid for visual element */
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-image-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 90%);
    mask-image: radial-gradient(circle, black 40%, transparent 90%);
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.15);
    /* ぼんやりとしたオーラ */
    animation: float 6s ease-in-out infinite;
    /* ゆっくり上下に浮遊 */
}

.profile-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    border: 2px solid rgba(0, 180, 216, 0.3);
    /* 薄いシアンの枠線 */
    pointer-events: none;
    z-index: 10;
    opacity: 0.5;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2) brightness(0.8);
    /* B&W base */
    transition: var(--transition);
}

.profile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* Simple dark overlay for monochrome look */
    mix-blend-mode: normal;
    /* Removed overlay mode to avoid color shifting */
    pointer-events: none;
    transition: var(--transition);
}

/* Optional hover effect */
.profile-image-container:hover .profile-img {
    filter: grayscale(0%) contrast(1) brightness(1);
    transform: scale(1.05);
}

.profile-image-container:hover .profile-overlay {
    opacity: 0;
    /* Reveal original image on hover */
}

/* Works Section */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

.work-card {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(123, 44, 191, 0.25),
        0 0 20px rgba(0, 180, 216, 0.15),
        inset 0 0 20px rgba(123, 44, 191, 0.05);
    /* 内側にもわずかな発光 */
    border-color: rgba(123, 44, 191, 0.4);
}

.work-image {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.work-card:hover .work-image {
    transform: scale(1.05);
}

.placeholder-gradient {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
    font-size: 0.8rem;
}

.work-info {
    padding: 1.5rem;
}

.work-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.work-info p {
    font-size: 0.9rem;
    color: var(--gray-light);
}

.work-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Service/Price Grid & Options */
.plans-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.service-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.price-card {
    background: rgba(40, 40, 40, 0.2);
    /* すりガラスの背景色 */
    backdrop-filter: blur(12px);
    /* グラスモーフィズムぼかし */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* 少し明るい白のフチ */
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    /* グラスモーフィズム特有の影 */
}

.price-card:hover {
    transform: translateY(-8px);
    border-color: rgba(123, 44, 191, 0.6);
    /* ホバー時に紫のフチが強く光る */
    box-shadow: 0 15px 40px rgba(123, 44, 191, 0.25), 0 0 20px rgba(0, 180, 216, 0.15);
}

.price-card.popular {
    background: linear-gradient(145deg, #1f1f1f, #151515);
    border: 1px solid var(--accent-color);
    box-shadow: 0 5px 20px rgba(123, 44, 191, 0.2);
}

.price-card.popular:hover {
    box-shadow: 0 15px 40px rgba(123, 44, 191, 0.4);
}

.popular-badge {
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--accent-color);
    color: white;
    padding: 5px 35px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Service/Price Header */
.price-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
}

.price-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-header h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.price {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--accent-secondary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.price-suffix {
    font-size: 1rem;
    color: var(--gray-light);
    font-weight: 400;
}

.price-desc {
    font-size: 0.9rem;
    color: var(--gray-light);
    line-height: 1.4;
}

.price-body {
    flex-grow: 1;
}

.feature-list {
    list-style: none;
    text-align: left;
    display: inline-block;
    width: 100%;
}

.feature-list li {
    padding: 0.8rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
    color: #ddd;
    display: flex;
    align-items: center;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-color);
    margin-right: 12px;
    font-weight: bold;
}

.highlight {
    color: var(--accent-secondary);
    font-weight: 500;
}

/* Options List */
.options-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.options-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--gray-light);
}

.option-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
    list-style: none;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-dark);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.option-name {
    font-size: 0.95rem;
    color: var(--text-color);
}

.option-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-secondary);
}


/* Contact Form */
.contact-desc {
    margin-bottom: 3rem;
    color: var(--gray-light);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* paddingを含めた幅計算を強制してハミ出しを防ぐ */
    padding: 1rem;
    background: var(--gray-dark);
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-color);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #252525;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    cursor: pointer;
}

/* Footer */
.footer {
    padding: 3rem 5%;
    background: #000;
    text-align: center;
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* Animations */
.block {
    display: block;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.15;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.25;
    }
}

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

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.fade-in-up,
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.delay-1 {
    transition-delay: 0.1s;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem 5%;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 101;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #111;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        z-index: 99;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .nav-list a {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-layout {
        grid-template-columns: 1fr;
    }

    .option-list {
        grid-template-columns: 1fr;
    }
}

/* Utilities added for cleanup */
.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.w-100 {
    width: 100%;
}

.text-sm {
    font-size: 0.8rem;
}

.text-gray {
    color: var(--gray-light);
}

.underline {
    text-decoration: underline;
}

/* Workflow Section */
.flow {
    background: linear-gradient(180deg, var(--bg-color) 0%, #111 100%);
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.step-item {
    background: var(--gray-dark);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.step-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.step-number {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
}

.step-content h3 {
    font-size: 1.2rem;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--gray-light);
}

/* FAQ Section */
.faq {
    background: var(--bg-color);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: 2rem;
}

.faq-item {
    background: var(--gray-dark);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.faq-question {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.faq-answer {
    font-size: 0.95rem;
    color: var(--gray-light);
    line-height: 1.6;
}

/* Footer Social */
.footer-social {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-link {
    color: var(--gray-light);
    transition: var(--transition);
    display: flex;
}

.social-link:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Responsive adjustments for Flow and FAQ */
@media (max-width: 768px) {

    .flow-steps,
    .faq-grid {
        grid-template-columns: 1fr;
    }
}