/* =========================================================================
   Monthly 404 | CSS Design System & Global Styles
   테마: 하이엔드 다크 테마 + 글래스모피즘(Glassmorphism) + 네온 액센트
========================================================================= */

/* 1. 디자인 토큰(Design Tokens) 선언 */
:root {
    /* Color Palette */
    --bg-dark: #0a0a0c;               /* 완전한 블랙이 아닌 깊은 모노크롬 */
    --bg-surface: rgba(25, 25, 30, 0.4); /* 글래스 블러를 위한 반투명 서피스 */
    --bg-surface-hover: rgba(40, 40, 50, 0.6);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    /* Accent & Gradients */
    --accent-primary: #8b5cf6;        /* Viloet 계열 네온 색상 */
    --accent-secondary: #ec4899;      /* Pink 액센트 계열 */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    /* Store Button Colors */
    --apple-dark: rgba(255, 255, 255, 0.1);
    --apple-hover: rgba(255, 255, 255, 0.2);

    /* Glass Effect Parameters */
    --glass-blur: blur(16px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Typography */
    --font-heading: 'Outfit', 'Pretendard', sans-serif;
    --font-body: 'Inter', 'Pretendard', sans-serif;

    /* Metrics & Layout */
    --nav-height: 80px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* 2. 전역 리셋(Global Resets) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark); 
}
::-webkit-scrollbar-thumb {
    background: #2a2a30; 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary); 
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

/* 3. 유틸리티 & 컴포넌트(Components) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: 120px 0;
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.highlight {
    color: var(--accent-primary);
}

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    background: var(--bg-surface-hover);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* 버튼 스타일 (Buttons) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* 4. 배경 이펙트 (Ambient Glow Background) */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.15);
    top: -10%;
    right: -10%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(236, 72, 153, 0.1);
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(56, 189, 248, 0.15);
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* 5. Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition-fast);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 6. Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--nav-height);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    animation: fadeInOut 2s infinite;
}

.scroll-indicator p {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 2px;
    animation: scrollDown 1.5s infinite;
}

@keyframes scrollDown {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 10px); opacity: 0; }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* 7. About Section */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.glass-container {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

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

.feature-list {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* 8. Apps Portfolio Section */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.app-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.app-icon-wrapper {
    margin-bottom: 1.5rem;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.app-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.app-category {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
    line-height: 1.6;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--apple-dark);
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: var(--transition-fast);
    margin-top: auto;
}

.store-btn i {
    font-size: 1.25rem;
}

.store-btn:hover {
    background: var(--apple-hover);
    transform: scale(1.02);
}

/* 9. Footer */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
}

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

.link-group h3 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.link-group a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 10. Animations & Responsive */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* 모바일 메뉴 구현은 js에서 토글로 확장 가능 */
    }
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .glass-container {
        padding: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}
