:root {
    --vite-purple: #bd34fe;
    --vite-blue: #41d1ff;
    --vite-dark: #0f0e14;
    --glass-bg: rgba(30, 30, 36, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

html, body {
    height: 100%;
    overflow: hidden;
    position: fixed;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--vite-dark);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Animated Background */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(189, 52, 254, 0.15), transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(65, 209, 255, 0.15), transparent 40%);
    animation: bg-pulse 15s ease-in-out infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes bg-pulse {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, -5%) scale(1.1); }
}

body {
    display: flex;
    flex-direction: column;
}
.site-header {
    flex: 0 0 auto;
    background: rgba(15, 14, 20, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.site-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
@keyframes al-gradient{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
@keyframes al-glow-pulse{0%,100%{box-shadow:0 0 12px rgba(233,69,96,0.4),0 2px 8px rgba(0,0,0,0.2)}50%{box-shadow:0 0 20px rgba(233,69,96,0.6),0 2px 8px rgba(0,0,0,0.2)}}
.archerlab-link {
    background: linear-gradient(135deg, #e94560, #ff6b8a, #e94560);
    background-size: 200% 200%;
    animation: al-gradient 3s ease infinite, al-glow-pulse 2s ease-in-out infinite;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.4);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 0 12px rgba(233,69,96,0.4),0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.archerlab-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(233,69,96,0.6),0 4px 12px rgba(0,0,0,0.3);
}
#main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    padding: 0;
}
.hub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    gap: 2vh;
    padding: 4vh 1.5rem 4vh 1.5rem;
    box-sizing: border-box;
    perspective: 1000px;
}

/* Glassmorphism Card */
.hub-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.2vh 2rem;
    width: 100%;
    max-width: 420px;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: auto;
    min-height: 14vh;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease-out, box-shadow 0.4s ease; /* Faster transform for tilt */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d; /* Enable 3D space */
    
    /* Entrance Animation */
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
}

/* 3D Pop-out Effect for Content */
.hub-icon, .hub-title, .hub-desc {
    transform: translateZ(20px); /* Float above card */
    transform-style: preserve-3d;
}

.hub-icon {
    transform: translateZ(40px); /* Icon floats higher */
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.2));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/*
.hub-icon-svg {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}
*/

.hub-card:nth-child(2) {
    animation-delay: 0.15s;
}

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

/* Glowing Border Effect */
.hub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.02));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Spotlight Effect */
.hub-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.04), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.hub-card:hover::after {
    opacity: 1;
}

/* Spotlight Border */
.hub-card .spotlight-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.4), transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 2;
}

/* PC Hover Effects (Separate from Mobile) */
@media (hover: hover) {
    .hub-card:hover .spotlight-border {
        opacity: 1;
    }

    .hub-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 
                    0 0 50px rgba(189, 52, 254, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    }

    /* Special Glow for Analysis Card */
    .hub-card:first-child:hover {
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 
                    0 0 60px rgba(65, 209, 255, 0.2);
    }

    /* Hover Effects - Premium */
    .hub-card:hover .hub-icon {
        transform: translateZ(60px) scale(1.15);
        filter: drop-shadow(0 0 40px rgba(255,255,255,0.5));
    }

    /* Gradient Text for Titles on Hover */
    .hub-card:first-child:hover .hub-title {
        background: linear-gradient(to right, #80dfff, #e0aaff);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .hub-card:last-child:hover .hub-title {
        background: linear-gradient(to right, #ff80bf, #ffb380);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .hub-card:hover .hub-desc {
        color: #ffffff;
    }
}

.hub-title {
    font-family: 'Manrope', 'Pretendard', sans-serif;
    font-size: 2.4vh;
    font-weight: 700;
    margin-bottom: 1.2vh;
    color: #e0e0e0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hub-desc {
    font-family: 'Pretendard', sans-serif;
    color: #aaaaaa;
    font-size: 1.5vh;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.01em;
    word-break: keep-all;
    transition: all 0.3s;
}

/*
.hub-card:hover .hub-desc {
    color: rgba(255, 255, 255, 0.9);
}
*/

.site-footer {
    flex: 0 0 auto;
    margin-top: 0 !important;
    padding: 1rem 0 !important;
    background: transparent !important;
    border-top: none !important;
    position: absolute;
    bottom: 0;
    width: 100%;
    pointer-events: none;
    z-index: 10;
}
.site-footer__inner {
    pointer-events: auto;
    padding-bottom: 1rem;
}

@media (min-width: 768px) {
    .hub-container {
        flex-direction: row;
        gap: 3rem;
        justify-content: center;
        padding: 0 2rem;
    }
    .hub-card {
        height: auto;
        max-height: none;
        padding: 3rem 2.5rem;
        flex: 0 1 450px;
        min-height: 320px;
    }
    .hub-icon { font-size: 5rem; margin-bottom: 2rem; }
    .hub-title { 
        font-size: 2rem; 
        margin-bottom: 1rem; 
        word-break: keep-all;
        text-align: center;
    }
    .hub-desc { 
        font-size: 1.1rem; 
        word-break: keep-all;
    }
    .site-footer {
        position: relative;
        bottom: auto;
        padding: 2rem 0 !important;
    }
}

/* Mobile Wow Effects (Touch Devices) */
/* Applied when hover is none OR when .is-mobile class is present */
@media (hover: none), (pointer: coarse) {
    /* 1. Active/Touch Feedback */
    .hub-card:active {
        transform: scale(0.96);
        transition: transform 0.1s;
    }

    /* 2. Neon Pulse Glow */
    @keyframes neon-pulse-1 {
        0%, 100% { box-shadow: 0 0 20px rgba(65, 209, 255, 0.1); border-color: rgba(65, 209, 255, 0.3); }
        50% { box-shadow: 0 0 35px rgba(189, 52, 254, 0.2); border-color: rgba(189, 52, 254, 0.3); }
    }
    @keyframes neon-pulse-2 {
        0%, 100% { box-shadow: 0 0 20px rgba(255, 45, 136, 0.1); border-color: rgba(255, 45, 136, 0.3); }
        50% { box-shadow: 0 0 35px rgba(255, 142, 97, 0.2); border-color: rgba(255, 142, 97, 0.3); }
    }

    /* 3. Mobile 3D Sway (Gyroscope Simulation) - Disabled */
    /*
    @keyframes mobile-3d-sway {
        0% { transform: perspective(1000px) rotateX(0) rotateY(0); }
        25% { transform: perspective(1000px) rotateX(3deg) rotateY(3deg); }
        50% { transform: perspective(1000px) rotateX(0) rotateY(0); }
        75% { transform: perspective(1000px) rotateX(-3deg) rotateY(-3deg); }
        100% { transform: perspective(1000px) rotateX(0) rotateY(0); }
    }
    */

    .hub-card:first-child {
        animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, neon-pulse-1 4s infinite ease-in-out;
    }
    
    .hub-card:last-child {
        animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, neon-pulse-2 4s infinite ease-in-out;
        animation-delay: 0.15s, 2s;
    }

    /* 4. Auto Shine Effect (자동 빛 반사) */
    .mobile-shine {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 24px;
        background: linear-gradient(
            120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.01) 45%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.01) 55%,
            transparent 70%
        );
        background-size: 200% 200%;
        animation: shine-sweep 4s infinite linear;
        pointer-events: none;
        z-index: 3;
        display: block !important; /* Force display on mobile */
    }

    @keyframes shine-sweep {
        0% { background-position: 150% 0; }
        100% { background-position: -50% 0; }
    }
}

/* Force mobile effects if JS detects mobile */
body.is-mobile .hub-card:first-child {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, neon-pulse-1 4s infinite ease-in-out;
}

body.is-mobile .hub-card:last-child {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, neon-pulse-2 4s infinite ease-in-out;
    animation-delay: 0.15s, 2s;
}

body.is-mobile .mobile-shine {
    display: block !important;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.01) 45%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.01) 55%,
        transparent 70%
    );
    background-size: 200% 200%;
    animation: shine-sweep 4s infinite linear;
}

/* Hide mobile shine on desktop (only if not .is-mobile) */
@media (hover: hover) {
    body:not(.is-mobile) .mobile-shine {
        display: none;
    }
}

/* Mobile Default Hover State (Always Active) */
body.is-mobile .hub-card {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 
                0 0 40px rgba(189, 52, 254, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 100%);
}

body.is-mobile .hub-card:first-child {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 
                0 0 50px rgba(65, 209, 255, 0.15);
}

body.is-mobile .hub-card .hub-icon {
    transform: translateZ(50px) scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.4));
}

body.is-mobile .hub-card:first-child .hub-title {
    background: linear-gradient(to right, #80dfff, #e0aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.is-mobile .hub-card:last-child .hub-title {
    background: linear-gradient(to right, #ff80bf, #ffb380);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.is-mobile .hub-card .hub-desc {
    color: rgba(255, 255, 255, 0.9);
}

body.is-mobile .hub-card::after {
    opacity: 1;
}

body.is-mobile .hub-card .spotlight-border {
    opacity: 1;
}

/* Refined landing treatment */
:root {
    --latin-ink: #111010;
    --latin-ink-2: #1b1413;
    --latin-panel: rgba(27, 20, 19, 0.88);
    --latin-panel-soft: rgba(255, 249, 244, 0.055);
    --latin-line: rgba(244, 218, 194, 0.14);
    --latin-text: #fbf3ea;
    --latin-muted: #bca99e;
    --latin-copper: #d46a55;
    --latin-amber: #d9a15f;
    --latin-teal: #35b6a6;
}

html,
body {
    background-color: var(--latin-ink);
    background-image:
        linear-gradient(130deg, rgba(212, 106, 85, 0.18) 0%, rgba(17, 16, 16, 0) 36%),
        linear-gradient(315deg, rgba(53, 182, 166, 0.13) 0%, rgba(17, 16, 16, 0) 38%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 90px),
        linear-gradient(180deg, #151110 0%, #0f0f0f 100%);
    color: var(--latin-text);
}

body::before {
    background:
        linear-gradient(180deg, rgba(8, 8, 8, 0.24), rgba(8, 8, 8, 0.58)),
        repeating-linear-gradient(0deg, rgba(244, 218, 194, 0.025) 0 1px, transparent 1px 36px);
    animation: none;
    opacity: 1;
}

body > canvas {
    display: none !important;
}

.site-header {
    background: rgba(17, 16, 16, 0.86);
    border-bottom-color: rgba(244, 218, 194, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.archerlab-link {
    animation: none;
    background: rgba(251, 243, 234, 0.06);
    border: 1px solid rgba(244, 218, 194, 0.18);
    border-radius: 6px;
    box-shadow: none;
    color: var(--latin-muted);
    font-size: 0;
    letter-spacing: 0;
    padding: 0.42rem 0.66rem;
}

.archerlab-link::after {
    content: "ArcherLab";
    font-size: 0.72rem;
    font-weight: 650;
}

.archerlab-link:hover {
    transform: translateY(-1px);
    box-shadow: none;
    color: var(--latin-text);
    border-color: rgba(217, 161, 95, 0.38);
}

.hub-container {
    gap: clamp(1rem, 3vw, 2rem);
    justify-content: center;
    padding: clamp(1.25rem, 4vh, 2.4rem) 1.25rem 5.5rem;
    perspective: none;
}

.hub-card {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 230px;
    max-width: 440px;
    padding: 1.45rem;
    border-radius: 8px;
    border: 1px solid var(--latin-line);
    border-top-color: rgba(217, 161, 95, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 249, 244, 0.07), rgba(255, 249, 244, 0.025)),
        var(--latin-panel);
    color: var(--latin-text);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: none !important;
    transform-style: flat;
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hub-card:first-child {
    border-top-color: rgba(212, 106, 85, 0.58);
}

.hub-card:last-child {
    border-top-color: rgba(53, 182, 166, 0.5);
}

.hub-card::before {
    inset: 0;
    bottom: auto;
    height: 3px;
    border-radius: 8px 8px 0 0;
    padding: 0;
    background: linear-gradient(90deg, rgba(212, 106, 85, 0.95), rgba(217, 161, 95, 0.72));
    -webkit-mask: none;
    mask: none;
    opacity: 1;
}

.hub-card:last-child::before {
    background: linear-gradient(90deg, rgba(53, 182, 166, 0.9), rgba(217, 161, 95, 0.68));
}

.hub-card::after,
.hub-card .spotlight-border,
.mobile-shine {
    display: none !important;
}

.hub-icon,
.hub-title,
.hub-desc {
    transform: none !important;
    position: relative;
    z-index: 1;
}

.hub-icon {
    width: 84px;
    height: 52px;
    margin: 0 0 1.4rem;
    border-radius: 8px;
    border: 1px solid rgba(244, 218, 194, 0.16);
    background:
        linear-gradient(135deg, rgba(212, 106, 85, 0.17), rgba(217, 161, 95, 0.07)),
        rgba(255, 249, 244, 0.045);
    box-shadow: none;
    filter: none;
    font-size: 0;
}

.hub-card:last-child .hub-icon {
    background:
        linear-gradient(135deg, rgba(53, 182, 166, 0.16), rgba(217, 161, 95, 0.07)),
        rgba(255, 249, 244, 0.045);
}

.hub-icon::before {
    content: "MOTION";
    position: absolute;
    left: 12px;
    top: 10px;
    color: var(--latin-text);
    font-family: "Manrope", "Pretendard", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hub-card:last-child .hub-icon::before {
    content: "SOCIAL";
}

.hub-icon::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    height: 2px;
    background: linear-gradient(90deg, var(--latin-copper), var(--latin-amber), transparent);
}

.hub-card:last-child .hub-icon::after {
    background: linear-gradient(90deg, var(--latin-teal), var(--latin-amber), transparent);
}

.hub-title {
    margin: 0 0 0.75rem;
    color: var(--latin-text);
    font-family: "Manrope", "Pretendard", sans-serif;
    font-size: clamp(1.35rem, 2.4vh, 1.75rem);
    font-weight: 760;
    letter-spacing: 0;
    line-height: 1.22;
    text-shadow: none;
}

.hub-desc {
    color: var(--latin-muted);
    font-size: clamp(0.96rem, 1.45vh, 1.04rem);
    line-height: 1.62;
    letter-spacing: 0;
}

@media (hover: hover) {
    .hub-card:hover {
        transform: translateY(-4px) !important;
        border-color: rgba(217, 161, 95, 0.44);
        background:
            linear-gradient(180deg, rgba(255, 249, 244, 0.085), rgba(255, 249, 244, 0.032)),
            rgba(31, 22, 20, 0.94);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    }

    .hub-card:hover .hub-icon {
        transform: none !important;
        filter: none;
    }

    .hub-card:hover .hub-title {
        background: none;
        -webkit-text-fill-color: currentColor;
        color: var(--latin-text);
    }

    .hub-card:hover .hub-desc {
        color: #d2c2b8;
    }
}

@media (min-width: 768px) {
    .hub-container {
        padding: 0 2rem;
    }

    .hub-card {
        flex: 0 1 420px;
        min-height: 278px;
        padding: 2rem;
    }

    .hub-icon {
        width: 96px;
        height: 58px;
        margin-bottom: 1.7rem;
    }

    .hub-title {
        font-size: 1.86rem;
        text-align: left;
    }

    .hub-desc {
        font-size: 1.04rem;
    }
}

@media (hover: none), (pointer: coarse) {
    .hub-card,
    .hub-card:first-child,
    .hub-card:last-child,
    body.is-mobile .hub-card,
    body.is-mobile .hub-card:first-child,
    body.is-mobile .hub-card:last-child {
        animation: fadeInUp 0.7s ease forwards;
        transform: none !important;
        box-shadow: 0 20px 58px rgba(0, 0, 0, 0.32);
        background:
            linear-gradient(180deg, rgba(255, 249, 244, 0.075), rgba(255, 249, 244, 0.026)),
            var(--latin-panel);
    }

    .hub-card:last-child,
    body.is-mobile .hub-card:last-child {
        animation-delay: 0.12s;
    }

    .hub-card:active {
        transform: translateY(1px) !important;
    }
}

body.is-mobile .hub-card .hub-title,
body.is-mobile .hub-card:first-child .hub-title,
body.is-mobile .hub-card:last-child .hub-title {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--latin-text);
}

body.is-mobile .hub-card .hub-icon {
    transform: none !important;
    filter: none;
}

.site-footer {
    color: var(--latin-muted);
}

.contact-icon {
    display: none;
}
