/*
 * FlowLab Main Styles - Cosmic Flow Edition
 * 메인 스타일시트 - 미래지향적 디자인
 * ========================================
 */

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: var(--space-4) 0;
    background: transparent;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: var(--space-3) 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
}

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

.logo {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: all var(--transition-base);
}

.logo span {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover {
    text-shadow: var(--glow-text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    position: relative;
    padding: var(--space-2) 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-glow);
    transition: all var(--transition-base);
    transform: translateX(-50%);
    box-shadow: var(--glow-cyan);
}

.nav-links a:hover {
    color: var(--neon-cyan);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    overflow: hidden;
    background: var(--gradient-hero);
}

/* Animated Background */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Mesh Gradient Orbs */
.mesh-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: morph 15s ease-in-out infinite, float 20s ease-in-out infinite;
}

.mesh-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.4) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}

.mesh-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 245, 212, 0.3) 0%, transparent 70%);
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
}

.mesh-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 0, 110, 0.25) 0%, transparent 70%);
    top: 40%;
    left: 50%;
    animation-delay: -10s;
}

/* Floating Geometric Shapes */
.geo-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.geo-shape {
    position: absolute;
    border: 1px solid rgba(0, 245, 212, 0.2);
    animation: float 8s ease-in-out infinite, rotate-slow 30s linear infinite;
}

.geo-shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.geo-shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    border-radius: 30%;
    animation-delay: -3s;
}

.geo-shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    transform: rotate(45deg);
    animation-delay: -6s;
}

.geo-shape-4 {
    width: 100px;
    height: 100px;
    top: 15%;
    right: 25%;
    border-radius: 50%;
    border-color: rgba(123, 44, 191, 0.3);
    animation-delay: -4s;
}

/* Grid Lines Background */
.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 245, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

/* Hero Content */
.hero-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: var(--z-base);
    padding: 0 var(--space-4);
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-8);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.1s forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.hero-badge span:last-child {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--neon-cyan);
    letter-spacing: 0.02em;
}

/* Hero Title */
.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-7xl);
    font-weight: var(--font-bold);
    line-height: 1.05;
    margin-bottom: var(--space-8);
    letter-spacing: -0.02em;
}

.hero-title .title-line {
    display: block;
    opacity: 0;
    animation: titleReveal 1s ease forwards;
}

.hero-title .title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-title .title-line:nth-child(2) {
    animation-delay: 0.35s;
}

.hero-title .title-line:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title .gradient-text {
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}

.hero-title .title-line.accent {
    color: var(--text-secondary);
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.7s forwards;
}

/* Hero Description */
.hero-description {
    font-size: var(--text-lg);
    color: var(--text-tertiary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-10);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.9s forwards;
}

.highlight-text {
    color: var(--neon-cyan);
    font-weight: var(--font-semibold);
    position: relative;
}

.highlight-text::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-cyan), transparent);
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.1s forwards;
}

.hero-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.hero-cta .btn-primary svg {
    transition: transform var(--transition-fast);
}

.hero-cta .btn-primary:hover svg {
    transform: translateX(4px);
}


/* ========================================
   Section Common Styles
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    line-height: var(--leading-tight);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* ========================================
   About Section (Bento Grid)
   ======================================== */
.about {
    padding: var(--space-24) 0;
    background: var(--bg-secondary);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--neon-cyan), transparent);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: var(--space-6);
}

.bento-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 245, 212, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.bento-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--glow-cyan);
}

.bento-card:hover::before,
.bento-card:hover::after {
    opacity: 1;
}

/* Bento Card Sizes */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-wide {
    grid-column: span 2;
}

.bento-card .card-label {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-cyan);
    margin-bottom: var(--space-4);
    display: inline-block;
}

.bento-card .card-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    line-height: var(--leading-snug);
}

.bento-card .card-text {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.bento-card .card-text p+p {
    margin-top: var(--space-3);
}

/* Large card special styling */
.bento-large .card-title {
    font-size: var(--text-3xl);
}


/* ========================================
   Programs Section
   ======================================== */
.programs {
    padding: var(--space-32) 0;
    background: var(--bg-primary);
    position: relative;
}

.programs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
}

/* Section Label */
.section-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--neon-cyan);
    margin-bottom: var(--space-4);
}

/* Section Quote */
.section-quote {
    font-size: var(--text-2xl);
    font-style: italic;
    color: var(--neon-cyan);
    margin-bottom: var(--space-4);
    font-weight: var(--font-medium);
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    margin-top: var(--space-16);
}

/* Program Card */
.program-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.program-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.program-card:hover::before {
    opacity: 1;
}

/* Program Icon */
.program-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
    color: var(--neon-cyan);
    transition: all var(--transition-base);
}

.program-card:hover .program-icon {
    background: rgba(0, 245, 212, 0.15);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.2);
    transform: scale(1.05);
}

/* Program Content */
.program-title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.program-title span {
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    color: var(--text-tertiary);
    margin-left: var(--space-2);
}

.program-tagline {
    font-size: var(--text-base);
    color: var(--neon-cyan);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-4);
}

.program-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

.program-highlight {
    font-size: var(--text-sm);
    color: var(--neon-purple-light);
    font-weight: var(--font-semibold);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
}

/* Featured Program Card */
.program-featured {
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(0, 245, 212, 0.05) 100%);
    border-color: rgba(123, 44, 191, 0.3);
}

.program-featured .program-icon {
    background: rgba(123, 44, 191, 0.15);
    border-color: rgba(123, 44, 191, 0.3);
    color: var(--neon-purple-light);
}

.program-featured:hover {
    border-color: rgba(123, 44, 191, 0.5);
}

.program-featured::before {
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-purple-light), transparent);
}

.section-cta {
    text-align: center;
    margin-top: var(--space-12);
}


/* ========================================
   Newsletter Preview Section
   ======================================== */
.newsletter-preview {
    padding: var(--space-20) 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.newsletter-preview::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    padding: var(--space-12);
    position: relative;
    z-index: 1;
}

.newsletter-info .card-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
}

/* ========================================
   Products Preview Section
   ======================================== */
.products-preview {
    padding: var(--space-24) 0;
    background: var(--bg-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

/* ========================================
   Contact CTA Section
   ======================================== */
.contact-cta {
    padding: var(--space-32) 0;
    background: var(--gradient-hero);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-content .section-title {
    margin-bottom: var(--space-4);
}

.contact-content .section-subtitle {
    margin-bottom: var(--space-10);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: var(--space-16) 0 var(--space-8);
    background: var(--cosmic-black);
    border-top: 1px solid var(--border-subtle);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at 50% 0%, rgba(123, 44, 191, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-12);
    flex-wrap: wrap;
    gap: var(--space-8);
    position: relative;
    z-index: 1;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: var(--space-4);
}

.footer-brand p {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
}

.footer-links {
    display: flex;
    gap: var(--space-16);
}

.footer-links-group h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.footer-links-group ul {
    list-style: none;
}

.footer-links-group li {
    margin-bottom: var(--space-2);
}

.footer-links-group a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: all var(--transition-fast);
}

.footer-links-group a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.footer-tagline {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .programs-grid,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: var(--glass-blur);
        padding: var(--space-6);
        gap: var(--space-4);
        border-bottom: 1px solid var(--border-subtle);
    }

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

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

    .hero {
        padding: var(--space-24) 0 var(--space-16);
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
    }

    .bento-grid,
    .programs-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .bento-large,
    .bento-wide {
        grid-column: span 1;
    }

    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

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

    .footer-links {
        flex-direction: column;
        gap: var(--space-8);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .geo-shape {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn-lg {
        width: 100%;
        max-width: 300px;
    }
}