/* ==========================================================================
   Main Stylesheet
   - variables.css를 기반으로 실제 레이아웃과 컴포넌트 스타일을 정의합니다.
   - 규모가 커지면 layout.css, components.css, reset.css 등으로 분리하는 것이 좋습니다.
   ========================================================================== */

/* 1. Reset (초기화) */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* 2. Layout & Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* 3. Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-main);
}

.btn-secondary:hover {
    background-color: var(--color-border);
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--color-border);
    background-color: transparent;
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Icon Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background-color: transparent;
    color: var(--color-text-main);
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--color-primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

/* 4. Sections */

/* Header */
.header {
    background-color: var(--color-bg-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(var(--color-bg-surface), 0.9);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-text-main);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

/* Mobile Menu Animation */
.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

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

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    padding: var(--space-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* Features Section */
.features {
    padding: var(--space-2xl) var(--space-md);
}

.feature-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.feature-header h2 {
    font-size: 2.25rem;
    margin-bottom: var(--space-sm);
}

.feature-header p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background-color: var(--color-bg-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--color-text-muted);
}

/* Footer */
.footer {
    background-color: var(--color-bg-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-xl) 0 var(--space-md);
    margin-top: var(--space-2xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand {
    margin-bottom: var(--space-lg);
}

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    width: 100%;
    padding-top: var(--space-md);
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--color-bg-surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        box-shadow: var(--shadow-2xl);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}