/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

/* CSS Reset & Variable Tokens */
:root {
    --bg-dark: #090a0f;
    --bg-dark-gray: #12131a;
    --bg-light: #ffffff;
    --bg-light-gray: #f8f9fa;
    --text-light: #ffffff;
    --text-dark: #111111;
    --text-muted-light: #8a8d9a;
    --text-muted-dark: #6c757d;
    --accent: #0052ff;
    --accent-light: #3b82f6;
    --accent-glow: rgba(0, 82, 255, 0.4);
    --border-color-dark: #222533;
    --border-color-light: #e9ecef;
    
    --font-primary: 'Inter', 'Noto Sans KR', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

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

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

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

/* Grid / Flex Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 991px) {
    .grid-3, .grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 60px 0;
    }
}

/* Header & Navigation (Casio Aesthetic) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background-color: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color-dark);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition-smooth);
}

.header.scrolled .nav-container {
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-light);
}

.logo span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-item a {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-muted-light);
    position: relative;
    padding: 8px 0;
}

.nav-item a:hover,
.nav-item.active a {
    color: var(--text-light);
}

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

.nav-item a:hover::after,
.nav-item.active a::after {
    width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-light);
    transition: var(--transition-fast);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        height: 0;
        background-color: var(--bg-dark-gray);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        gap: 30px;
        overflow: hidden;
        transition: var(--transition-smooth);
        border-bottom: 1px solid var(--border-color-dark);
    }
    
    .nav-menu.open {
        height: calc(100vh - 80px);
    }
}

/* Hero Section (Centered Banner - Casio style) */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(9,10,15,0.7) 0%, rgba(9,10,15,0.9) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 24px;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 24px;
    display: block;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-light);
}

.hero-title span {
    color: var(--accent);
}

.hero-desc {
    font-size: 18px;
    color: var(--text-muted-light);
    margin-bottom: 40px;
    font-weight: 300;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    .hero-desc {
        font-size: 15px;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted-light);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 60px;
    background-color: var(--text-muted-light);
    display: block;
    animation: scrollLine 2s infinite ease-in-out;
    transform-origin: top;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); }
    50% { transform: scaleY(1); }
    100% { transform: scaleY(0); transform: translateY(60px); }
}

/* Page Header (Subpages) */
.page-header {
    padding: 160px 0 60px;
    background-color: var(--bg-dark-gray);
    border-bottom: 1px solid var(--border-color-dark);
}

.page-title {
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 12px;
}

.page-subtitle {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.1em;
}

/* Button & UI Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-light);
}

.btn-primary:hover {
    background-color: var(--accent-light);
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--text-dark);
}

/* Cards & Grid elements */
.card {
    background-color: var(--bg-dark-gray);
    border: 1px solid var(--border-color-dark);
    border-radius: 8px;
    padding: 40px;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-num {
    font-size: 14px;
    color: var(--accent);
    font-weight: 700;
    display: block;
    margin-bottom: 20px;
}

.card-title {
    font-size: 22px;
    margin-bottom: 16px;
}

.card-desc {
    color: var(--text-muted-light);
    font-size: 15px;
    font-weight: 300;
}

/* Interactive AI Chat Console (ai-sw.php) */
.chat-console {
    background-color: #161821;
    border: 1px solid var(--border-color-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.chat-header {
    background-color: #0d0e14;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-status-dot {
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.chat-title {
    font-size: 14px;
    font-weight: 600;
}

.chat-window {
    height: 380px;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.chat-msg {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-msg.user {
    align-self: flex-end;
    background-color: #3b82f6;
    color: var(--text-light);
    border-bottom-right-radius: 2px;
}

.chat-msg.bot {
    align-self: flex-start;
    background-color: #242838;
    color: var(--text-light);
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: 16px;
    background-color: #0d0e14;
    border-top: 1px solid var(--border-color-dark);
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    background-color: #1e212f;
    border: 1px solid var(--border-color-dark);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
}

.chat-input:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    background-color: var(--accent);
    border: none;
    border-radius: 6px;
    padding: 0 20px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.chat-send-btn:hover {
    background-color: var(--accent-light);
}

/* AI Webtoon Pipeline Visualizer */
.pipeline-timeline {
    position: relative;
    padding-left: 32px;
}

.pipeline-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 11px;
    width: 2px;
    height: 100%;
    background-color: var(--border-color-dark);
}

.pipeline-step {
    position: relative;
    padding-bottom: 40px;
}

.pipeline-step:last-child {
    padding-bottom: 0;
}

.pipeline-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 24px;
    height: 24px;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.pipeline-step.active .pipeline-dot {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.pipeline-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.pipeline-desc {
    color: var(--text-muted-light);
    font-size: 14px;
    font-weight: 300;
}

/* Interactive Image Slider */
.slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border-color-dark);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    min-width: 100%;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: var(--text-light);
}

.slider-nav {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-fast);
}

.slider-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* AX Step Cards */
.ax-step-card {
    background-color: var(--bg-dark-gray);
    border-left: 4px solid var(--accent);
    padding: 30px;
    border-radius: 0 8px 8px 0;
    height: 100%;
}

/* History Timeline styling */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 40px;
}

.history-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    align-items: flex-start;
}

.history-year {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.history-content {
    border-left: 1px solid var(--border-color-dark);
    padding-left: 24px;
}

.history-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.history-desc {
    color: var(--text-muted-light);
    font-size: 14px;
    font-weight: 300;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted-light);
}

.form-control {
    width: 100%;
    background-color: #12131a;
    border: 1px solid var(--border-color-dark);
    border-radius: 6px;
    padding: 14px 18px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 82, 255, 0.15);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-status {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
    display: none;
}

.form-status.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #10b981;
}

.form-status.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Footer Section */
.footer {
    background-color: #050609;
    border-top: 1px solid var(--border-color-dark);
    padding: 60px 0 40px;
    text-align: center;
}

.footer-logo {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-logo span {
    color: var(--accent);
}

.footer-nav {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-nav-link {
    font-size: 14px;
    color: var(--text-muted-light);
}

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

.footer-copyright {
    font-size: 13px;
    color: var(--text-muted-light);
}

/* Capabilities Box styling */
.cap-box {
    background-color: var(--bg-dark-gray);
    border: 1px solid var(--border-color-dark);
    border-radius: 8px;
    padding: 32px;
    height: 100%;
}

.cap-box-title {
    font-size: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cap-box-title::before {
    content: '';
    width: 6px;
    height: 20px;
    background-color: var(--accent);
    display: block;
}

.cap-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cap-item {
    font-size: 14px;
    color: var(--text-muted-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cap-item::before {
    content: '•';
    color: var(--accent);
    font-size: 18px;
    line-height: 1;
}

/* Highlight badge styling */
.badge-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
}

.badge.accent {
    background-color: rgba(0, 82, 255, 0.1);
    border-color: var(--accent);
    color: var(--accent-light);
}

/* ==========================================
   Responsive Utilities & Layout Overrides
   ========================================== */
.hero-btn-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.metric-group {
    display: flex;
    gap: 48px;
    margin-bottom: 30px;
}

/* Ensure z-index is high for mobile slide-down menu */
@media (max-width: 768px) {
    .nav-menu {
        z-index: 999;
    }
    
    .header.scrolled .nav-menu {
        top: 70px;
    }
}

@media (max-width: 767px) {
    .hero-btn-group {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .hero-btn-group .btn {
        width: 100%;
    }
    
    .metric-group {
        flex-direction: column;
        gap: 24px;
        align-items: center;
        text-align: center;
    }
    
    /* Timeline responsive layouts */
    .history-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .history-content {
        border-left: none;
        border-top: 1px solid var(--border-color-dark);
        padding-left: 0;
        padding-top: 16px;
    }
    
    /* Interactive webtoon slider height adjustment */
    .slider-slide img {
        height: 280px;
    }
    
    /* AI Chat Console responsiveness */
    .chat-window {
        height: 300px;
        padding: 16px;
    }
    
    .chat-msg {
        max-width: 90%;
    }
}

