/* Custom CSS for Newsletter Landing Page */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom font loading */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
}

/* Animation classes for scroll reveals */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

.animate-fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

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

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

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

/* Hero section background animation */
#hero {
    background: linear-gradient(135deg, #F2EED8 0%, #ffffff 50%, #F2EED8 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

/* Form input focus states */
input[type="email"] {
    transition: all 0.3s ease;
}

input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(29, 100, 242, 0.1);
    transform: scale(1.02);
}

/* Card hover effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1D64F2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for CTA buttons */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Scroll indicator bounce */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, #1243A6, #1D64F2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Number counter animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Modal animations */
.modal-fade-in {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Section dividers */
.section-divider {
    background: linear-gradient(90deg, transparent, #1D64F2, transparent);
    height: 1px;
    width: 100%;
    margin: 2rem 0;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .text-hero {
        font-size: 1.125rem;
    }
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

/* Focus styles for accessibility */
button:focus,
input:focus {
    outline: 2px solid #1D64F2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-light {
        background-color: #ffffff;
    }
    
    .text-gray-600,
    .text-gray-700 {
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-fade-in-right {
        opacity: 1 !important;
        transform: none !important;
    }
    
    button {
        display: none;
    }
    
    #success-modal,
    #loading-modal {
        display: none !important;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --text-dark: #ffffff;
        --bg-white: #2a2a2a;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1D64F2;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1243A6;
}

/* Selection styles */
::selection {
    background-color: #1D64F2;
    color: white;
}

::-moz-selection {
    background-color: #1D64F2;
    color: white;
}