/* ============================================
   Global Styles & Variables
   ============================================ */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --background: #ffffff;
    --foreground: #0f172a;
    --muted: #f1f5f9;
    --border: #e2e8f0;
    --success: #10b981;
    --chart-1: #93c5fd;
    --chart-2: #06b6d4;
    --chart-3: #3b82f6;
    --chart-4: #1e40af;
    --chart-5: #1e3a8a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    border-bottom: 1px solid var(--border);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 100;
}

.header.sticky {
    position: sticky;
    top: 0;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--chart-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    cursor: pointer;
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 1.5rem;
    height: 2px;
    background-color: var(--foreground);
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav.active {
        display: flex;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(30, 64, 175, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 12px rgba(30, 64, 175, 0.35);
}

.btn-secondary {
    background-color: #f0f4f8;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #e8ecf1;
}

.btn-accent {
    background-color: var(--chart-2);
    color: white;
}

.btn-accent:hover {
    background-color: #0891b2;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background-color: rgba(30, 64, 175, 0.05);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0fdfa 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(30, 64, 175, 0.1);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-family: 'Poppins', sans-serif;
}

.hero-title .highlight {
    background: linear-gradient(to right, var(--primary), var(--chart-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}

/* ============================================
   Sections
   ============================================ */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Poppins', sans-serif;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    background-color: var(--muted);
}

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

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--chart-2));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #64748b;
    font-size: 0.95rem;
}

/* ============================================
   Benefits Section
   ============================================ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(6, 182, 212, 0.05));
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    text-align: center;
}

.benefit-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.benefit-card p {
    color: #64748b;
    line-height: 1.8;
}

/* ============================================
   Technology Section
   ============================================ */
.technology {
    background-color: var(--muted);
}

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

.tech-card {
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.tech-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.tech-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tech-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 1.5rem 1.5rem 0.5rem;
}

.tech-card p {
    color: #64748b;
    padding: 0 1.5rem 1.5rem;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.15);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-description {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.currency {
    color: #64748b;
    font-size: 0.875rem;
}

.plan-btn {
    width: 100%;
    margin-bottom: 0.75rem;
}

.plan-features {
    list-style: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.plan-features li {
    padding: 0.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.customization {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(6, 182, 212, 0.05));
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    text-align: center;
}

.customization h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.customization p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: scale(1);
    }
}

/* ============================================
   Comparison Table
   ============================================ */
.comparison {
    background-color: var(--muted);
}

.table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 1rem;
    overflow: hidden;
}

.comparison-table thead {
    background-color: var(--primary);
    color: white;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    font-weight: 600;
}

.comparison-table td:first-child,
.comparison-table th:first-child {
    text-align: left;
}

.feature-name {
    font-weight: 500;
}

.comparison-table tbody tr:hover {
    background-color: var(--muted);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    background-color: var(--muted);
    padding: 3rem 0;
}

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

.footer-brand h3 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--chart-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer-kakao {
    text-align: center;
}

.footer-kakao h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.qr-link {
    display: inline-block;
    padding: 0.75rem;
    background-color: white;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.qr-link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-link img {
    width: 128px;
    height: 128px;
    display: block;
}

.qr-text {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.channel-id {
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #64748b;
}

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

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.modal-section ul {
    list-style: none;
    padding-left: 0;
}

.modal-section li {
    padding: 0.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section li:before {
    content: "✓";
    color: var(--success);
    font-weight: 600;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    .section-title {
        font-size: 1.75rem;
    }

    section {
        padding: 2rem 0;
    }

    .features-grid,
    .benefits-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    .cta p {
        font-size: 1rem;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}
