/* ==========================================================================
   CSS Variables & Reset (Stylish Theme)
   ========================================================================== */
:root {
    --color-bg: #f8f9fa;        /* クリーンなオフホワイト */
    --color-primary: #b05c6d;   /* ローズピンク（くすんだ大人のピンク） */
    --color-primary-dark: #8c4654;
    --color-secondary: #e0e0e0; /* ライトグレー */
    --color-text: #2c2c2c;      /* ダークグレー（ほぼ黒） */
    --color-text-light: #6c757d;
    --color-white: #ffffff;
    
    /* よりシャープで洗練されたグラスモーフィズム */
    --color-glass: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(255, 255, 255, 0.4);
    
    /* 洗練されたシャドウ */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(176, 92, 109, 0.15);
    
    /* フォント設定：セリフ体でエレガントに */
    --font-main: 'Inter', 'Noto Sans JP', sans-serif;
    --font-heading: 'Cinzel', 'Noto Serif JP', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.8;
    overflow-x: hidden;
    font-weight: 300;
}

/* ==========================================================================
   Ambient Background
   ========================================================================== */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, #fdfdfd 0%, #f4f4f4 100%);
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: pulseGlow 15s infinite alternate ease-in-out;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(176,92,109,0.15) 0%, rgba(255,255,255,0) 70%);
    top: -10%;
    right: -10%;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200,200,200,0.2) 0%, rgba(255,255,255,0) 70%);
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220,180,185,0.15) 0%, rgba(255,255,255,0) 70%);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { transform: scale(1.1) translate(30px, 20px); opacity: 0.5; }
    100% { transform: scale(0.9) translate(-20px, -30px); opacity: 0.3; }
}

/* ==========================================================================
   Typography & Reusable Classes
   ========================================================================== */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.05em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--color-text);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background-color: var(--color-primary);
}

.section-title span {
    font-size: 1rem;
    display: block;
    font-weight: 300;
    font-family: var(--font-main);
    color: var(--color-text-light);
    margin-top: 10px;
    letter-spacing: 0.2em;
}

/* Glassmorphism Card (Sharp & Elegant) */
.glass-card {
    background: var(--color-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-glass-border);
    border-radius: 8px; /* 丸みを抑える */
    box-shadow: var(--shadow-soft);
    padding: 50px;
    transition: all 0.4s ease;
}

/* Button */
.btn-primary {
    display: inline-block;
    background: transparent;
    color: var(--color-text);
    padding: 15px 45px;
    border: 1px solid var(--color-text);
    border-radius: 0; /* シャープな四角 */
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.1em;
    font-family: var(--font-heading);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-primary:hover {
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 10px 20px rgba(176, 92, 109, 0.2);
}

.btn-primary:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 25px 0;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    color: var(--color-text);
    display: flex;
    align-items: baseline;
    gap: 15px;
    font-weight: 600;
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 300;
    font-family: var(--font-main);
    letter-spacing: 0.1em;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav a {
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    position: relative;
    padding: 5px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

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

.nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 0;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-text {
    flex: 1;
    padding-right: 40px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: var(--color-text);
}

.hero-title .highlight {
    font-style: italic;
    color: var(--color-primary);
    font-weight: 400;
}

.hero-catchphrase {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--color-text);
    font-weight: 400;
    letter-spacing: 0.1em;
}

.hero-catchphrase .line1 {
    display: block;
    margin-bottom: 10px;
}

.hero-catchphrase .line2 {
    display: block;
    color: var(--color-primary);
    padding-left: 2rem;
}

.hero-catchphrase .line-en {
    display: block;
    font-size: 1.1rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: 15px;
    padding-left: 3rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 50px;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
    line-height: 1.8;
}

.hero-mascot {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* エレガントなキャラクターコンテナ */
.character-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

.character-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
    pointer-events: none;
}

.character-img {
    width: 100%;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.character-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.character-container:hover .character-img {
    transform: scale(1.03);
}

.character-container:hover .image-overlay {
    opacity: 1;
}

/* クリック時の波紋エフェクト用 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    text-align: center;
    font-size: 1.1rem;
    line-height: 2.2;
}

.concept-ja {
    color: var(--color-text);
}

.concept-ja p {
    margin-bottom: 25px;
}

.concept-en {
    margin-top: 40px;
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-style: italic;
    font-family: var(--font-heading);
}

.concept-en p {
    margin-bottom: 15px;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.gallery-item {
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
    background: var(--color-white);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-img-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4; /* 9:16だと極端すぎるため、ポスターや一般的な縦長に近い3:4に緩和 */
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.8); /* 余白ができた場合用の背景色 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像全体を必ず表示させる（見切れ防止） */
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-img-wrapper img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 30px;
    position: relative;
}

.gallery-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.gallery-info p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* ==========================================================================
   Characters Profile Section
   ========================================================================== */
.character-profile-container {
    display: flex;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.profile-image-col {
    flex: 0 0 450px;
}

.profile-glass-frame {
    padding: 20px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.profile-info-col {
    flex: 1;
}

.profile-info-card {
    padding: 50px;
    height: 100%;
}

.profile-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--color-glass-border);
    padding-bottom: 20px;
}

.char-name-en {
    font-size: 1.2rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    letter-spacing: 0.15em;
    margin-bottom: 5px;
}

.char-name-ja {
    font-size: 3rem;
    color: var(--color-text);
    margin-bottom: 0;
}

.char-catchphrase {
    font-size: 1.15rem;
    color: var(--color-text);
    font-family: var(--font-heading);
    margin-bottom: 35px;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--color-primary);
}

.profile-stats {
    list-style: none;
    margin-bottom: 40px;
}

.profile-stats li {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.stat-label {
    flex: 0 0 140px;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.05em;
}

.stat-value {
    flex: 1;
    color: var(--color-text);
}

.profile-desc {
    line-height: 2;
    color: var(--color-text-light);
}

.profile-desc p {
    margin-bottom: 15px;
}

.badge {
    position: absolute;
    top: -12px;
    right: 30px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4px 16px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(176, 92, 109, 0.3);
}

/* ==========================================================================
   Demo Section (CTA Card)
   ========================================================================== */
.demo-cta {
    padding: 0;
    overflow: hidden;
}

.demo-cta-inner {
    display: flex;
    align-items: stretch;
    min-height: 320px;
}

.demo-preview {
    flex: 0 0 320px;
    overflow: hidden;
    position: relative;
}

.demo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.demo-cta:hover .demo-preview-img {
    transform: scale(1.04);
}

.demo-preview:hover .image-overlay {
    opacity: 1;
}

.demo-cta-text {
    flex: 1;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.demo-cta-title {
    font-size: 2rem;
    color: var(--color-text);
    line-height: 1.4;
}

.demo-cta-title-en {
    display: block;
    font-size: 0.95rem;
    color: var(--color-primary);
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    margin-top: 5px;
}

.demo-cta-desc {
    font-size: 1.05rem;
    color: var(--color-text-light);
    line-height: 2;
}

.demo-cta-desc-en {
    font-size: 0.95rem;
    font-family: var(--font-heading);
    font-style: italic;
    margin-top: 10px;
    color: var(--color-text-light);
    opacity: 0.8;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 18px 50px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    letter-spacing: 0.12em;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.btn-play::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s ease;
}

.btn-play:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(176, 92, 109, 0.4);
}

.btn-play:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

@media (max-width: 1px) {
    .demo-cta-inner {
        flex-direction: column;
    }

    .demo-preview {
        flex: 0 0 250px;
        width: 100%;
    }

    .demo-cta-text {
        padding: 35px 30px;
    }

    .btn-play {
        align-self: stretch;
        justify-content: center;
    }
}


/* ==========================================================================
   Links Section
   ========================================================================== */
.links-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.link-card {
    display: flex;
    align-items: center;
    padding: 25px 40px;
    text-decoration: none;
    transition: all 0.4s ease;
    border-radius: 8px;
    gap: 30px;
}

.link-card:hover {
    transform: translateX(10px) translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-primary);
}

.link-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.link-content h3 {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 5px;
}

.link-content p {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 60px 20px;
    margin-top: 80px;
    border-top: 1px solid rgba(0,0,0,0.05);
    color: var(--color-text-light);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-text {
        padding-right: 0;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-catchphrase {
        font-size: 1.8rem;
    }
    
    .hero-catchphrase .line2 {
        padding-left: 0;
    }
    
    .character-container {
        max-width: 400px;
    }

    .demo-cta-inner {
        flex-direction: column;
    }

    .demo-preview {
        flex: 0 0 250px;
        width: 100%;
    }

    .demo-cta-text {
        padding: 35px 30px;
    }

    .btn-play {
        align-self: stretch;
        justify-content: center;
    }

    .link-card {
        padding: 20px;
        gap: 15px;
    }

    .character-profile-container {
        flex-direction: column;
        gap: 30px;
    }

    .profile-image-col {
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .profile-info-card {
        padding: 30px 20px;
    }
}

@media (max-width: 1px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    
    .nav ul {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
}

/* --- Game Modal --- */
.game-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.game-modal-content {
    position: relative;
    width: 95vw;
    max-width: 1280px;
    /* 16:9 アスペクト比の維持と高さの制限 */
    aspect-ratio: 16 / 9;
    max-height: 90vh;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.game-modal.show .game-modal-content {
    transform: scale(1);
}

.game-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    z-index: 10001;
}

.game-modal-close:hover {
    color: var(--color-primary);
}

.game-modal-iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.game-modal-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* スマホ表示時の調整 */
@media (max-width: 768px) {
    .game-modal-content {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .game-modal-iframe-container {
        border-radius: 0;
    }
    
    .game-modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 30px;
    }
}
