/* ============================================
   NanoNside Landing Page - Custom Styles
   Based on NanoBanana Design System
   ============================================ */

/* ============================================
   1. CSS Variables & Base Styles
   ============================================ */

:root {
    /* Brand Colors - Amber */
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --primary-light: #fbbf24;
    --primary-subtle: #fffbeb;
    --primary-border: #fef3c7;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Typography */
    --font-sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

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

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

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-700);
    line-height: 1.6;
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. Button Styles
   ============================================ */

.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-normal), transform var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 500;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: var(--gray-200);
    border-color: var(--gray-300);
}

/* ============================================
   3. Header & Navigation
   ============================================ */

#header {
    transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

#header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

#mobile-menu.open {
    max-height: 500px;
}

/* ============================================
   4. Hero Section
   ============================================ */

.hero-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Elements Animation */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* ============================================
   5. Animations
   ============================================ */

/* Fade In Up Animation */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Bounce Animation */
.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Pulse Animation */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Spin Animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   6. Feature Cards
   ============================================ */

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   7. FAQ Accordion
   ============================================ */

.faq-item {
    transition: box-shadow var(--transition-normal);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-item.active {
    border-color: var(--primary-border);
}

.faq-toggle {
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
}

.faq-toggle:focus {
    outline: none;
}

.faq-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.faq-icon {
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition-slow);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.faq-content.open {
    max-height: 500px;
    padding-bottom: 1.25rem;
}

/* ============================================
   8. Point Buttons
   ============================================ */

.point-btn {
    position: relative;
    overflow: hidden;
}

.point-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.point-btn:hover::after {
    width: 300px;
    height: 300px;
}

.point-btn.selected {
    background-color: var(--primary);
    border: 2px solid var(--primary-light);
}

/* ============================================
   9. Back to Top Button
   ============================================ */

#back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal), transform var(--transition-fast);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-4px);
}

/* ============================================
   10. Scrollbar Customization
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================
   11. Selection Styles
   ============================================ */

::selection {
    background-color: var(--primary-light);
    color: var(--gray-900);
}

::-moz-selection {
    background-color: var(--primary-light);
    color: var(--gray-900);
}

/* ============================================
   12. Focus Styles for Accessibility
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   13. Responsive Utilities
   ============================================ */

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   14. Loading Skeleton
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 25%,
        var(--gray-100) 50%,
        var(--gray-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   15. Responsive Adjustments
   ============================================ */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    #hero {
        min-height: auto;
        padding-top: 6rem;
        padding-bottom: 4rem;
    }

    .floating-element {
        display: none;
    }
}

/* Mobile (max-width: 640px) */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* ============================================
   16. Print Styles
   ============================================ */

@media print {
    #header,
    #mobile-menu,
    #back-to-top,
    .floating-element {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   17. 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;
    }
}

/* ============================================
   18. Dark Mode Support (Future)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here in the future */
}
