/*
    Hestia's Re-forged Blueprint for Style
    -------------------------------------------
    File: style.css
    Role: To define the soul and atmosphere of the "Connect Station HOME".
    Concept: A fusion of "rational beauty" as a station and "heartfelt warmth" as a home.
*/

/* --- [I] The Foundational Pillars: Basic Station Design --- */
:root {
    --color-primary: #005a9e; /* A deep, intelligent blue, symbolizing the EGIC philosophy. */
    --color-secondary: #ff9800; /* A warm, inviting orange, representing the "HOME" aspect. */
    --color-text: #333333; /* Clear and legible text color. */
    --color-background: #f8f9fa; /* A clean, welcoming base white for the station interior. */
    --font-family-base: 'Noto Sans JP', sans-serif; /* For readability. */
    --font-family-title: 'Roboto', sans-serif; /* For strong, clear headings. */
}

body {
    margin: 0;
    font-family: var(--font-family-base);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    /* ページ遷移を滑らかにするための基本設定 */
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

/* ページ離脱時のフェードアウト用クラス */
body.is-leaving {
    opacity: 0;
}

/* --- [II] The Core Architecture: Layout & Common Elements --- */
.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s, opacity 0.3s;
}
a:hover {
    color: var(--color-secondary);
    opacity: 0.8;
}

.section-title {
    text-align: center;
    font-family: var(--font-family-title);
    font-size: clamp(2rem, 5vw, 2.5rem); /* レスポンシブ対応 */
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
}
.section-title span {
    display: block;
    font-family: var(--font-family-base);
    font-size: 1rem;
    color: #888;
    margin-top: 0.25rem;
}

/* 汎用的なコール・トゥ・アクションボタン */
.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--color-secondary);
    color: #fff;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
                background-color 0.3s, 
                box-shadow 0.3s;
}
.cta-button:hover {
    background-color: #e68900;
    color: #fff;
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.cta-button:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* --- [III] The Main Gate: Header Design --- */
.station-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #e0e0e0;
    padding: 0.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s, box-shadow 0.3s;
}
.station-header.is-scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.logo-area { display: flex; align-items: center; }
.logo-area:hover { opacity: 1; color: var(--color-primary); }
.logo-area img { height: 40px; margin-right: 1rem; }
.site-title { font-family: var(--font-family-title); font-size: 1.2rem; font-weight: 700; color: var(--color-text); }

.global-navigation ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 1.5rem; }
.global-navigation a { font-weight: 700; }

/* --- [IV] The Soul's Proportion: Character Sizing --- */
/*
    Hestia's Note:
    キャラクターの魂の比率。サイトのどこに現れても、この比率が保たれます。
*/
.welcome-character#chara-chisamaru, .peeking-character[src*="chisamaru"] {
    height: 100px; /* 基準サイズ */
}
.welcome-character#chara-correct, .welcome-character#chara-connect, .peeking-character[src*="correct"], .peeking-character[src*="connect"] {
    height: 120px;
}
.welcome-character#chara-folio, .peeking-character[src*="folio"] {
    height: 160px;
}

/* --- [V] The Foundation: Footer Design --- */
.station-footer {
    background-color: #343a40;
    color: #ffffff;
    padding: 3rem 2rem;
}
.footer-container {
    display: flex;
    flex-wrap: wrap; /* スマホ表示対応 */
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1.5rem;
}
.footer-navigation ul { display: flex; list-style: none; margin: 0; padding: 0; gap: 1rem; }
.footer-navigation a { color: #ffffff; }
.footer-navigation a:hover { color: var(--color-secondary); opacity: 1; }
.copyright { font-size: 0.9rem; }


/* --- [VI] The Sparkle of the Soul: Microinteractions --- */
/*
    Hestia's Note:
    “魂の器”たるカードやボタンへの生命感。サイト全体に共通する心地よい操作感を与えます。
*/
.card, .news-item, .gateway-card, .character-card, .event-card, .pickup-card, .platform-gate {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover, .news-item:hover, .gateway-card:hover, .character-card:hover, .event-card:hover, .pickup-card:hover, .platform-gate:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 90, 158, 0.12);
}

/* --- [VII] The Attentive Gaze: Scroll Effects --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- [VIII] The Soul's Awakening: Loading Animation --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s, visibility 0s 0.5s;
}
.loading-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loading-hud {
    width: 80px;
    height: 80px;
    border: 5px solid #e3f2fd;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- [IX] The Station's Courtesy: Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.98);
    color: white;
    padding: 1.5rem 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cookie-banner.is-visible {
    transform: translateY(0);
}
.cookie-banner-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.cookie-banner p { margin: 0; }
.cookie-banner a { color: var(--color-secondary); font-weight: bold; }
.cookie-banner .cta-button { flex-shrink: 0; }

/* --- [X] A Little Miracle: Omikuji Shrine --- */
#connect-omikuji-shrine {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}
.omikuji-icon {
    width: 80px;
    height: 80px;
    background-color: #ffca28;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s;
}
.omikuji-icon:hover {
    transform: scale(1.1) rotate(5deg);
}
.omikuji-icon img {
    height: 60px;
}
.omikuji-result-window {
    position: absolute;
    bottom: 100px;
    right: 0;
    width: 300px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 1.5rem;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s, transform 0.4s, visibility 0s 0.4s;
}
.omikuji-result-window.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}
.omikuji-close-btn {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 30px; height: 30px; border: none; background: #f0f0f0;
    border-radius: 50%; font-size: 1.2rem; cursor: pointer;
    line-height: 30px;
}
.omikuji-result-content img { height: 100px; margin-bottom: 1rem; }
.omikuji-result-content h3 { margin: 0 0 0.5rem 0; font-family: var(--font-family-title); color: var(--color-primary); }
.omikuji-result-content p { margin: 0; font-size: 0.9rem; line-height: 1.6; }