/* Garet Font */
@font-face {
    font-family: 'Garet';
    src: url('assets/fonts/Garet-Book.woff2') format('woff2'),
         url('assets/fonts/Garet-Book.woff') format('woff'),
         url('assets/fonts/Garet-Book.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.glass-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.text-gradient {
    background: linear-gradient(to right, #1a1a1a, #4a4a4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    color: #e5e5e5;
    text-shadow: none;
    position: relative;
}


/* Subtle Grid Background */
.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f5;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Utilities */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
}

/* Hero logo and title - no spacing */
.hero-logo-container img {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.hero-logo-container h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* Partners hover effect - 컬러 기본, hover 시 나머지 흑백 */
.partners-container .partner-item {
    filter: grayscale(0);
    transition: filter 0.3s ease;
}

.partners-container:hover .partner-item {
    filter: grayscale(100%);
}

.partners-container .partner-item:hover {
    filter: grayscale(0);
}

/* Enhanced Typography - Pretendard */
body {
    font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-weight: 700;
}
p, span, a, button, input, textarea, label {
    font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
/* Better line-height for readability */
p {
    line-height: 1.8;
}

/* Modern Sophisticated Button Styles */
.btn-primary {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.btn-primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

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

/* Modern Minimal Portal Button */
.btn-portal {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-portal:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.portal-icon {
    color: #64748b;
    transition: all 0.2s ease;
}

.btn-portal:hover .portal-icon {
    color: #0f172a;
}

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

.hero-action-row {
    align-items: flex-start;
}

.hero-action-btn {
    min-height: 40px;
    line-height: 1.25;
}

.portal-demo-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.42rem;
}

.author-demo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(212, 212, 212, 0.62);
    font-size: 0.72rem;
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.author-demo-link:hover {
    color: rgba(245, 245, 245, 0.9);
}

/* Cinematic Reveal Intro Animation */
:root {
    --uca-black: #000000;
    --uca-cyan: #00ffff;
    --uca-glow: rgba(0, 255, 255, 0.6);
}

.intro-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
}

.reveal-wrapper {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reveal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-logo {
    width: 300px;
    height: 300px;
    object-fit: contain;
    opacity: 0;
    filter: blur(20px);
    transform: scale(0.95);
    position: relative;
    z-index: 2;
}

/* 시네마틱 글로우 효과 (사용 안 함) */
.glow-element {
    display: none;
}

/* 하단 로딩 바 */
.loading-bar-wrap {
    width: 200px;
    height: 2px;
    background: rgba(0, 0, 0, 0.1);
    margin: 40px auto 0;
    overflow: hidden;
    border-radius: 1px;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: #1a1a1a;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    /* Touch-friendly button sizes */
    .btn-primary, .btn-secondary, .btn-portal {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Better text readability on mobile */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Better spacing for mobile */
    section {
        scroll-margin-top: 60px;
    }

    /* Intro logo mobile size */
    .intro-logo {
        width: 200px;
        height: 200px;
    }
}

/* Modern Clean Form Inputs */
input, textarea {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
    background: #ffffff;
}

/* Modern Clean Card Styles */
.work-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

/* Enhanced Clean Navigation */
nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom-color: #e2e8f0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Improved Text Readability */
p {
    line-height: 1.7;
}

/* Smooth Animations */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Glass Card */
.glass-card {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.glass-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Improved Stats Display */
.counter {
    background: linear-gradient(135deg, #1a1a1a 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Better Link Underlines */
a[href^="#"] {
    position: relative;
}

/* Improved Section Headers */
section h2 {
    background: linear-gradient(135deg, #1a1a1a 0%, #666666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Works Horizontal Scroll */
.works-scroll-container {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
    cursor: grab;
    padding-top: 20px; /* Add space for hover effect */
}

.works-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.works-scroll-container:active {
    cursor: grabbing;
}

/* Partners Horizontal Scroll */
.partners-scroll-container {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
    cursor: grab;
}

.partners-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.partners-scroll-container:active {
    cursor: grabbing;
}

/* Partners Navigation Buttons */
.partners-nav-btn {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.partners-nav-btn:hover {
    transform: scale(1.1);
}

/* Partner Logo Styling */
.partner-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Partner Glint Effect */
.partner-glint {
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    animation: partnerGlint 0.6s ease-out;
    pointer-events: none;
    z-index: 5;
}

.partner-item:hover .partner-glint {
    animation: partnerGlint 0.6s ease-out;
}

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

/* Works Navigation Buttons */
.works-nav-btn {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.works-nav-btn:hover {
    transform: scale(1.1);
}

/* Gold Card Effects */
.gold-gradient-bg {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 25%, #d4af37 50%, #b8860b 75%, #8b6914 100%);
    background-size: 200% 200%;
}

.gold-card {
    position: relative;
    box-shadow: 0 0 10px rgba(15, 23, 42, 0.3);
    transition: all 0.3s ease;
}

.gold-card:hover .gold-gradient-bg {
    animation: goldShimmer 3s ease-in-out infinite;
}

.gold-card:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5), 0 0 60px rgba(212, 175, 55, 0.4), 0 0 90px rgba(212, 175, 55, 0.3);
    transform: translateY(-4px) scale(1.02);
}

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

.shimmer-effect {
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    pointer-events: none;
}

.gold-card:hover .shimmer-effect {
    animation: shimmer 2s infinite;
}

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

.gold-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700, #ffed4e);
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.3s ease;
}

.gold-card:hover::before {
    opacity: 0.6;
    animation: borderGlow 3s ease-in-out infinite;
}

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

/* Ink Drop Animation Styles */
#ink-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#ink-drop {
    transform-origin: center center;
    will-change: transform, opacity;
}

.ink-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
}

.ink-orb-blue-1 {
    background: #93c5fd;
    width: 300px;
    height: 300px;
}

.ink-orb-blue-2 {
    background: #60a5fa;
    width: 250px;
    height: 250px;
}

.ink-orb-blue-3 {
    background: #3b82f6;
    width: 200px;
    height: 200px;
}

.ink-orb-red-1 {
    background: #fca5a5;
    width: 280px;
    height: 280px;
}

.ink-orb-red-2 {
    background: #f87171;
    width: 240px;
    height: 240px;
}

.ink-orb-red-3 {
    background: #ef4444;
    width: 220px;
    height: 220px;
}

.ink-orb-purple-1 {
    background: #c4b5fd;
    width: 260px;
    height: 260px;
}

.ink-orb-purple-2 {
    background: #a78bfa;
    width: 230px;
    height: 230px;
}

/* =========================
   Dark Theme Overrides
   ========================= */
:root {
    color-scheme: dark;
}

html, body {
    background: #000000;
    color: #e5e5e5;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,0.05), rgba(0,0,0,0) 50%),
        radial-gradient(circle at 80% 0%, rgba(255,255,255,0.035), rgba(0,0,0,0) 55%),
        radial-gradient(circle at 50% 100%, rgba(255,255,255,0.03), rgba(0,0,0,0) 55%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.012), rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
    mix-blend-mode: overlay;
}

main, nav, footer, #all-works-page, #login-modal, #admin-login-modal {
    position: relative;
    z-index: 1;
}

.intro-container {
    background: #000000;
}

.bg-grid {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #404040;
}
::-webkit-scrollbar-thumb:hover {
    background: #525252;
}

/* Tailwind utility remapping for global dark look */
.bg-white { background-color: #0a0a0a !important; }
.bg-gray-50 { background-color: #111111 !important; }
.bg-gray-100 { background-color: #171717 !important; }
.bg-gray-200 { background-color: #262626 !important; }
.bg-gray-300 { background-color: #404040 !important; }
.text-gray-900 { color: #f8fafc !important; }
.text-gray-700 { color: #d4d4d4 !important; }
.text-gray-600, .text-uca-muted { color: #d4d4d4 !important; }
.text-gray-500, .text-gray-400 { color: #b3b3b3 !important; }
.border-gray-100 { border-color: rgba(255, 255, 255, 0.10) !important; }
.border-gray-200 { border-color: rgba(255, 255, 255, 0.16) !important; }
.border-gray-300 { border-color: rgba(255, 255, 255, 0.25) !important; }

.hover\:bg-gray-50:hover { background-color: #1f1f1f !important; }
.hover\:bg-gray-100:hover, .hover\:bg-gray-200:hover { background-color: #2a2a2a !important; }
.hover\:text-gray-900:hover { color: #ffffff !important; }
.hover\:border-gray-300:hover { border-color: rgba(255, 255, 255, 0.35) !important; }

.hero-vignette {
    background:
        radial-gradient(70% 55% at 50% 46%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 28%, rgba(0, 0, 0, 0) 60%),
        radial-gradient(110% 85% at 50% 50%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.82) 100%);
}

.uca-orb {
    border-radius: 9999px;
    filter: blur(110px);
    opacity: 0.38;
    will-change: transform, opacity;
    animation: ucaDrift 10s ease-in-out infinite;
}

.uca-orb--cool {
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), rgba(255,255,255,0.06) 35%, rgba(0,0,0,0) 70%);
}

.uca-orb--warm {
    background: radial-gradient(circle at 40% 40%, rgba(255,255,255,0.16), rgba(255,255,255,0.05) 40%, rgba(0,0,0,0) 72%);
}

.uca-orb--neutral {
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.18), rgba(255,255,255,0.045) 42%, rgba(0,0,0,0) 72%);
}

@keyframes ucaDrift {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 0.34;
    }
    50% {
        transform: translate3d(18px, -12px, 0) scale(1.03);
        opacity: 0.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    .uca-orb,
    .btn-portal::after,
    .animate-bounce {
        animation: none !important;
    }
}

.hero-title {
    font-family: 'Space Grotesk', 'Pretendard', 'Inter', sans-serif;
    color: #ffffff;
    text-shadow: 0 12px 38px rgba(0, 0, 0, 0.6);
}

.hero-mark {
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
}

.hero-subcopy {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.glass {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-card {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(0, 0, 0, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.text-gradient {
    background: linear-gradient(to right, #ffffff, #a3a3a3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

section h2 {
    background: linear-gradient(135deg, #fafafa 0%, #a3a3a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary {
    background: #0a0a0a;
    border-color: rgba(255, 255, 255, 0.26);
    color: #ffffff;
}
.btn-primary:hover {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary,
.btn-portal {
    background: #0a0a0a;
    color: #e5e5e5;
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 18px rgba(255, 255, 255, 0.08);
}
.btn-secondary:hover,
.btn-portal:hover {
    background: #171717;
    border-color: rgba(255, 255, 255, 0.3);
}

.portal-icon,
.btn-portal:hover .portal-icon {
    color: #d4d4d4;
}

.btn-portal::after {
    content: '';
    position: absolute;
    top: -120%;
    left: -40%;
    width: 52%;
    height: 340%;
    transform: rotate(22deg);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.65) 48%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: portalShine 2.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes portalShine {
    0% {
        left: -55%;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    42% {
        left: 125%;
        opacity: 0;
    }
    100% {
        left: 125%;
        opacity: 0;
    }
}

input, textarea {
    border-color: rgba(255, 255, 255, 0.2);
    background: #0a0a0a;
    color: #e5e5e5;
}
input:focus, textarea:focus {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    background: #141414;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
