/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* ===== CSS Variables (Light) ===== */
[data-theme="light"] {
    --bg: #f5f5f7;
    --bg-card: #ffffff;
    --text: #1d1d1f;
    --text-sub: #6e6e73;
    --primary: #0071e3;
    --primary-hover: #0059b3;
    --header-bg: rgba(255,255,255,0.85);
    --border: #e0e0e0;
    --shadow: 0 2px 16px rgba(0,0,0,0.08);
    --card-hover-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ===== CSS Variables (Dark) ===== */
[data-theme="dark"] {
    --bg: #1a1a2e;
    --bg-card: #16213e;
    --text: #eaeaea;
    --text-sub: #a0a0b0;
    --primary: #4fc3f7;
    --primary-hover: #81d4fa;
    --header-bg: rgba(26,26,46,0.92);
    --border: #2a2a4a;
    --shadow: 0 2px 16px rgba(0,0,0,0.3);
    --card-hover-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
}
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), #6c5ce7);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
}
.nav-menu {
    display: flex;
    gap: 8px;
}
.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.nav-link:hover {
    background: var(--primary);
    color: #fff;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    width: 56px; height: 32px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    font-size: 1rem;
    transition: background 0.3s;
}
.icon-sun, .icon-moon {
    font-size: 0.9rem;
    transition: opacity 0.3s;
}
[data-theme="light"] .icon-moon { opacity: 0.3; }
[data-theme="dark"] .icon-sun { opacity: 0.3; }
.theme-toggle::after {
    content: '';
    position: absolute;
    width: 24px; height: 24px;
    background: var(--primary);
    border-radius: 50%;
    top: 3px; left: 4px;
    transition: transform 0.3s;
}
[data-theme="dark"] .theme-toggle::after {
    transform: translateX(23px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}
.mobile-nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    z-index: 999;
}
.mobile-nav.active { display: flex; }
.mobile-nav-link {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}
.mobile-nav-link:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    height: 85vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1600&q=80') center/cover no-repeat;
    margin-top: 64px;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(0,30,80,0.7) 100%);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 0 24px;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 20px;
}
.hero-title span {
    background: linear-gradient(90deg, #4fc3f7, #81d4fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    font-weight: 300;
}
.hero-btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}
.hero-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* ===== Services ===== */
.services {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    text-align: center;
}
.section-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 12px;
}
.section-desc {
    color: var(--text-sub);
    margin-bottom: 48px;
    font-size: 1.05rem;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 28px 32px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    display: block;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow);
}
.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.service-card p {
    color: var(--text-sub);
    font-size: 0.95rem;
    line-height: 1.6;
}
.card-arrow {
    position: absolute;
    bottom: 20px; right: 24px;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s, transform 0.3s;
}
.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-sub);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ===== Page Template (for sub pages) ===== */
.page-hero {
    margin-top: 64px;
    padding: 80px 24px 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-card), var(--bg));
    border-bottom: 1px solid var(--border);
}
.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
}
.page-hero p {
    color: var(--text-sub);
    font-size: 1.05rem;
}
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
}
.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.page-content .content-section {
    margin-bottom: 48px;
}
.page-content .feature-list {
    list-style: none;
    margin-top: 20px;
}
.page-content .feature-list li {
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    transition: transform 0.2s;
}
.page-content .feature-list li:hover {
    transform: translateX(6px);
}
.page-content .feature-list li strong {
    color: var(--primary);
}
.page-content .cta-box {
    background: linear-gradient(135deg, var(--primary), #6c5ce7);
    color: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
}
.page-content .cta-box h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}
.page-content .cta-box p {
    opacity: 0.9;
    margin-bottom: 20px;
}
.page-content .cta-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #fff;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    transition: transform 0.2s;
}
.page-content .cta-btn:hover {
    transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero { height: 70vh; }
}
@media (max-width: 500px) {
    .service-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.6rem; }
}
