/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --primary-blue: #2563EB;
    --primary-dark: #1E40AF;
    --primary-light: #3B82F6;

    /* Secondary Colors */
    --accent-green: #10B981;
    --accent-green-dark: #059669;
    --accent-orange: #F59E0B;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-500: #64748B;
    --gray-700: #334155;
    --gray-900: #0F172A;

    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Font Sizes */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    --text-4xl: 36px;
    --text-5xl: 48px;
    --text-6xl: 60px;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Spacing */
    --section-padding: 100px;
    --container-max: 1200px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Header Height */
    --header-height: 72px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    border: none;
    cursor: pointer;
    background: transparent;
}

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: var(--font-bold);
    line-height: 1.3;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: 1em;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary-blue); }
.text-accent { color: var(--accent-green); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-green-dark));
    color: var(--white);
    padding: 14px 32px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
    background: var(--white);
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 12px 28px;
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    padding: 12px 28px;
}

.btn-outline:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-lg {
    padding: 16px 40px;
    font-size: var(--text-lg);
}

.btn-sm {
    padding: 10px 20px;
    font-size: var(--text-sm);
}

/* ===== Header / Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--gray-900);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav__menu {
    display: flex;
    align-items: center;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav__link {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--gray-700);
    transition: color var(--transition-fast);
}

.nav__link:hover {
    color: var(--primary-blue);
}

/* Dropdown */
.nav__dropdown {
    position: relative;
}

.nav__dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-arrow {
    transition: transform var(--transition-fast);
}

.nav__dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.nav__dropdown:hover .nav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav__dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: var(--text-sm);
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.nav__dropdown-link:hover {
    background: var(--gray-50);
    color: var(--primary-blue);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav__cta {
    padding: 10px 24px;
    font-size: var(--text-sm);
}

/* Mobile Menu Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===== Main Content ===== */
.main {
    padding-top: var(--header-height);
}

/* ===== Section Common ===== */
.section {
    padding: var(--section-padding) 0;
}

.section--gray {
    background: var(--gray-50);
}

.section--dark {
    background: var(--gray-900);
    color: var(--white);
}

.section--dark h2,
.section--dark h3 {
    color: var(--white);
}

.section__header {
    text-align: center;
    margin-bottom: 60px;
}

.section__badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--primary-blue);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border-radius: 50px;
    margin-bottom: 16px;
}

.section__title {
    margin-bottom: 16px;
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Cards ===== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ===== Footer ===== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 80px 0 40px;
}

.footer__content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--white);
    margin-bottom: 16px;
}

.footer__logo .logo-text {
    background: linear-gradient(135deg, var(--primary-light), #60A5FA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer__tagline {
    font-size: var(--text-base);
    color: var(--gray-500);
    margin-bottom: 0;
}

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

.footer__title {
    color: var(--white);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    margin-bottom: 20px;
}

.footer__list li {
    margin-bottom: 12px;
}

.footer__list a {
    font-size: var(--text-sm);
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer__list a:hover {
    color: var(--white);
}

.footer__legal {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__legal-links {
    display: flex;
    gap: 16px;
    font-size: var(--text-sm);
}

.footer__legal-links a {
    color: var(--gray-400);
}

.footer__legal-links a:hover {
    color: var(--white);
}

.footer__legal-links .divider {
    color: var(--gray-600);
}

.footer__bottom {
    padding-top: 24px;
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.footer__bottom p {
    margin-bottom: 4px;
}

/* ===== Modern Animations ===== */

/* Base fade animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Blur In Animation */
.blur-in {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}

.blur-in.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Slide Up Animation */
.slide-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Rotate In Animation */
.rotate-in {
    opacity: 0;
    transform: rotate(-5deg) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.rotate-in.visible {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Staggered Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* Text Reveal Animation */
.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.visible span {
    transform: translateY(0);
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-15px);
    }
    70% {
        transform: translateY(-7px);
    }
    90% {
        transform: translateY(-3px);
    }
}

.bounce {
    animation: bounce 1s ease;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Icon Bounce Wave */
@keyframes iconWave {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

/* Counter Number Animation */
.counter-animate {
    display: inline-block;
    transition: transform 0.3s ease;
}

.counter-animate.counting {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Card 3D Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateZ(10px);
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animate {
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green), var(--primary-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Underline Reveal */
.underline-reveal {
    position: relative;
    display: inline-block;
}

.underline-reveal::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.underline-reveal.visible::after {
    width: 100%;
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Parallax Container */
.parallax {
    will-change: transform;
}

/* Smooth Entrance for Lists */
.list-animate > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.list-animate.visible > *:nth-child(1) { transition-delay: 0.1s; }
.list-animate.visible > *:nth-child(2) { transition-delay: 0.2s; }
.list-animate.visible > *:nth-child(3) { transition-delay: 0.3s; }
.list-animate.visible > *:nth-child(4) { transition-delay: 0.4s; }
.list-animate.visible > *:nth-child(5) { transition-delay: 0.5s; }
.list-animate.visible > *:nth-child(6) { transition-delay: 0.6s; }
.list-animate.visible > *:nth-child(7) { transition-delay: 0.7s; }
.list-animate.visible > *:nth-child(8) { transition-delay: 0.8s; }
.list-animate.visible > *:nth-child(9) { transition-delay: 0.9s; }
.list-animate.visible > *:nth-child(10) { transition-delay: 1.0s; }
.list-animate.visible > *:nth-child(11) { transition-delay: 1.1s; }
.list-animate.visible > *:nth-child(12) { transition-delay: 1.2s; }
.list-animate.visible > *:nth-child(13) { transition-delay: 1.3s; }

.list-animate.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Clip Path Reveal */
.clip-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.clip-reveal.visible {
    clip-path: inset(0 0 0 0);
}

/* Number Counter Styling */
.animate-number {
    font-variant-numeric: tabular-nums;
}

/* ===== Responsive ===== */
@media (max-width: 1199px) {
    :root {
        --section-padding: 80px;
    }

    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
}

@media (max-width: 991px) {
    .nav__menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        padding: 24px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }

    .nav__menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav__list {
        flex-direction: column;
        gap: 0;
    }

    .nav__item {
        width: 100%;
    }

    .nav__link {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav__dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background: var(--gray-50);
        border-radius: var(--radius-sm);
        opacity: 1;
        visibility: visible;
        display: none;
        margin-top: 8px;
    }

    .nav__dropdown.active .nav__dropdown-menu {
        display: block;
    }

    .nav__toggle {
        display: flex;
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer__links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    :root {
        --section-padding: 60px;
        --text-5xl: 36px;
        --text-4xl: 30px;
        --text-3xl: 24px;
    }

    .container {
        padding: 0 16px;
    }

    .footer__links {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .section__header {
        margin-bottom: 40px;
    }
}

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

    .btn-lg {
        padding: 14px 28px;
        font-size: var(--text-base);
    }
}
