@layer base, components, utilities;

@layer base {
    :root {
        --bg-color: #fdf6f0;
        --card-bg: #ffffff;
        --text-primary: #2d3436;
        --text-secondary: #636e72;
        --accent-primary: #a29bfe;
        --accent-secondary: #fd79a8;
        --accent-soft: #fab1a0;
        --shadow-color: rgba(0, 0, 0, 0.05);
        --nav-bg: rgba(253, 246, 240, 0.85);
        --noise-opacity: 0.04;
    }

    [data-theme="dark"] {
        --bg-color: #121212;
        --card-bg: #1e1e1e;
        --text-primary: #f5f6fa;
        --text-secondary: #b2bec3;
        --accent-primary: #81ecec;
        --accent-secondary: #a29bfe;
        --accent-soft: #ffeaa7;
        --shadow-color: rgba(0, 0, 0, 0.3);
        --nav-bg: rgba(18, 18, 18, 0.85);
        --noise-opacity: 0.06;
    }

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

    html {
        scroll-behavior: smooth;
    }

    body {
        font-family: 'Pretendard', sans-serif;
        background-color: var(--bg-color);
        color: var(--text-primary);
        line-height: 1.7;
        transition: background-color 0.4s ease, color 0.4s ease;
        min-height: 100vh;
        overflow-x: hidden;
    }

    .noise-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('https://grainy-gradients.vercel.app/noise.svg');
        opacity: var(--noise-opacity);
        pointer-events: none;
        z-index: 9999;
    }

    .decorative-blobs {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: -1;
        filter: blur(80px);
        opacity: 0.4;
    }

    .blob {
        position: absolute;
        border-radius: 50%;
    }

    .blob-1 {
        width: 400px;
        height: 400px;
        background: var(--accent-primary);
        top: -100px;
        right: -100px;
        animation: drift 20s infinite alternate;
    }

    .blob-2 {
        width: 300px;
        height: 300px;
        background: var(--accent-secondary);
        bottom: -50px;
        left: -50px;
        animation: drift 15s infinite alternate-reverse;
    }

    @keyframes drift {
        from { transform: translate(0, 0); }
        to { transform: translate(50px, 100px); }
    }
}

@layer components {
    .navbar {
        position: fixed;
        top: 0;
        width: 100%;
        padding: 1.5rem 10%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--nav-bg);
        backdrop-filter: blur(15px);
        z-index: 1000;
        border-bottom: 1px solid var(--shadow-color);
    }

    .logo {
        font-size: 1.25rem;
        font-weight: 900;
        letter-spacing: -0.5px;
        background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

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

    .nav-links a {
        text-decoration: none;
        color: var(--text-primary);
        font-weight: 600;
        font-size: 0.95rem;
        transition: color 0.3s;
    }

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

    .content-wrapper {
        padding: 0 10%;
    }

    /* Hero Section */
    .hero-section {
        height: 100vh;
        display: flex;
        align-items: center;
        padding-top: 80px;
    }

    .badge {
        display: inline-block;
        padding: 0.5rem 1.25rem;
        background: var(--shadow-color);
        border-radius: 100px;
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--accent-primary);
        margin-bottom: 1.5rem;
        border: 1px solid var(--accent-primary);
    }

    .hero-content h1 {
        font-size: clamp(3rem, 8vw, 5rem);
        line-height: 1.1;
        margin-bottom: 2rem;
        font-weight: 900;
        letter-spacing: -2px;
    }

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

    .highlight::after {
        content: '';
        position: absolute;
        bottom: 10%;
        left: 0;
        width: 100%;
        height: 30%;
        background: var(--accent-primary);
        opacity: 0.2;
        z-index: -1;
    }

    .hero-description {
        max-width: 600px;
        font-size: 1.2rem;
        color: var(--text-secondary);
        margin-bottom: 3rem;
    }

    .hero-actions {
        display: flex;
        gap: 1.5rem;
    }

    /* Feature Section */
    .feature-section {
        padding: 100px 0;
    }

    .section-header {
        margin-bottom: 4rem;
        text-align: center;
    }

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

    .grid-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    .grid-card {
        background: var(--card-bg);
        padding: 3rem;
        border-radius: 32px;
        box-shadow: 0 15px 35px var(--shadow-color);
        transition: transform 0.3s ease;
        border: 1px solid var(--shadow-color);
    }

    .grid-card:hover {
        transform: translateY(-10px);
    }

    .card-icon {
        width: 60px;
        height: 60px;
        background: var(--bg-color);
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent-primary);
        margin-bottom: 1.5rem;
    }

    /* Stats Banner */
    .stats-banner {
        background: var(--card-bg);
        border-radius: 100px;
        padding: 2.5rem 4rem;
        display: flex;
        justify-content: space-around;
        align-items: center;
        margin: 50px 0;
        box-shadow: 0 20px 50px var(--shadow-color);
    }

    .stat-box {
        text-align: center;
    }

    .stat-box .num {
        display: block;
        font-size: 2rem;
        font-weight: 800;
        color: var(--accent-primary);
    }

    .stat-box .lab {
        font-size: 0.9rem;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .stat-divider {
        width: 1px;
        height: 40px;
        background: var(--shadow-color);
    }

    /* Buttons */
    .primary-btn {
        background: var(--text-primary);
        color: var(--bg-color);
        border: none;
        padding: 1rem 2.5rem;
        border-radius: 100px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        transition: transform 0.2s, background-color 0.3s;
    }

    .secondary-btn {
        text-decoration: none;
        color: var(--text-primary);
        border: 2px solid var(--text-primary);
        padding: 1rem 2.5rem;
        border-radius: 100px;
        font-weight: 700;
        transition: all 0.3s;
    }

    .secondary-btn:hover {
        background: var(--text-primary);
        color: var(--bg-color);
    }

    .footer {
        padding: 4rem 10%;
        border-top: 1px solid var(--shadow-color);
        margin-top: 100px;
    }

    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .social-links {
        display: flex;
        gap: 1.5rem;
    }

    .social-icon {
        color: var(--text-secondary);
        transition: color 0.3s;
    }

    .social-icon:hover {
        color: var(--accent-primary);
    }
}

@media (max-width: 768px) {
    .content-wrapper { padding: 0 5%; }
    .hero-content h1 { font-size: 3.5rem; }
    .nav-links a { display: none; }
    .stats-banner {
        flex-direction: column;
        gap: 2rem;
        border-radius: 40px;
    }
    .stat-divider { display: none; }
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}
