@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #16161f;
    --card-bg: rgba(255, 255, 255, 0.015);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-border-hover: rgba(255, 255, 255, 0.15);

    --text-main: #f3f4f6;
    --text-muted: #8e9196;
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.1);

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    --liquid-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    min-height: 100vh;
}

/* Ambient light glows for premium look */
.ambient-glow-1 {
    position: fixed;
    top: -10%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    animation: float-glow-1 22s ease-in-out infinite;
}

.ambient-glow-2 {
    position: fixed;
    bottom: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    animation: float-glow-2 28s ease-in-out infinite;
}

@keyframes float-glow-1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translate(-40px, 60px) scale(1.08);
        opacity: 1;
    }
}

@keyframes float-glow-2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translate(60px, -30px) scale(0.92);
        opacity: 1;
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem 2rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    margin-bottom: 4rem;
    background: rgba(22, 22, 31, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: none;
    border-bottom: 1px solid var(--card-border);
    border-radius: 0;
    transition: border-color 0.4s var(--liquid-ease), background 0.4s var(--liquid-ease);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.4s var(--liquid-ease);
}

.brand-wrapper:hover .logo-container {
    transform: scale(1.03);
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Typography */
h1 {
    font-family: var(--font-sans);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--accent);
    margin-bottom: 1.5rem;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin-top: 4rem;
    margin-bottom: 1.5rem;
}

p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
    max-width: 680px;
}

p.lead {
    color: #e5e7eb;
    font-size: 1.35rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Minimal Project Link (Magic UI Card implementation) */
.project-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.2rem 2rem;
    margin-top: 3.5rem;

    /* Double-layer background-clipping for border and body highlights */
    background:
        padding-box linear-gradient(rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.015)),
        padding-box radial-gradient(400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.02), transparent 80%),
        border-box radial-gradient(300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.15), transparent 80%),
        border-box var(--card-border);

    border: 1px solid transparent;
    border-radius: 14px;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--liquid-ease), box-shadow 0.4s var(--liquid-ease);
}

.project-link:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    background:
        padding-box linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02)),
        padding-box radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.04), transparent 80%),
        border-box radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.3), transparent 80%),
        border-box var(--card-border);
}

.project-link-content h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.4s var(--liquid-ease);
}

.project-link-content p {
    margin-bottom: 0;
    font-size: 1rem;
    transition: color 0.4s var(--liquid-ease);
}

.project-link:hover .project-link-content h3 {
    color: #ffffff;
}

.project-link:hover .project-link-content p {
    color: #d1d5db;
}

.project-link-arrow {
    color: var(--text-main);
    font-size: 1.5rem;
    z-index: 2;
    transition: transform 0.4s var(--liquid-ease), color 0.4s var(--liquid-ease);
}

.project-link:hover .project-link-arrow {
    transform: translateX(6px);
    color: #ffffff;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--bg-color);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    corner-shape: squircle;
    font-size: 0.95rem;
    transition: opacity 0.4s var(--liquid-ease), transform 0.4s var(--liquid-ease), box-shadow 0.4s var(--liquid-ease);
    border: none;
    cursor: pointer;
}

.btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: none;
}

/* Video Placeholder / Container */
.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-color);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    margin: 3.5rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s var(--liquid-ease);
}

.video-container video.loaded {
    opacity: 1;
}

.video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1;
}

.video-fallback-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.video-fallback-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: pulseFallback 2s infinite ease-in-out;
}

@keyframes pulseFallback {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Purchase Box */
.purchase-box {
    margin: 5rem 0;
    padding: 4rem 3rem;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.015);
}

.purchase-box h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

/* Page exit overlay for seamless transitions */
#exit-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.5s var(--liquid-ease);
}

#exit-overlay.active {
    opacity: 1;
}

/* Footer layout */
footer {
    margin-top: auto;
    padding-top: 3rem;
    padding-bottom: 3.5rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-studio {
    color: var(--text-main);
    font-weight: 500;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-right a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s var(--liquid-ease);
}

.footer-right a:hover {
    color: var(--text-main);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    footer {
        flex-direction: column;
        gap: 2rem;
    }

    .sticky-header {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        padding: 0.75rem 1rem;
    }
}

/* ─── Skeleton Loader System ─────────────────────────────── */
@keyframes skeleton-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 1200px 100%;
    animation: skeleton-shimmer 1.6s infinite linear;
    border-radius: 8px;
}

.skeleton-block {
    display: block;
    width: 100%;
}

/* Crystal container skeleton — 1:1 square */
.crystal-skeleton {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

/* Video section skeleton — 16:9 */
.video-skeleton {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

/* Fade-out when the real asset reveals */
.skeleton-wrap {
    position: relative;
}

.skeleton-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.6s var(--liquid-ease);
}

.skeleton-overlay.hidden {
    opacity: 0;
}

/* Hero name logo styling */
#name-logo-container {
    height: 200px;
    max-width: 1040px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
    transform: translateZ(0);
    transition: transform 0.4s var(--liquid-ease);
}

#name-logo-container:hover {
    transform: translateY(-2px) translateZ(0);
}

#name-logo-container svg {
    width: auto !important;
    height: 100% !important;
    max-width: 100%;
}

/* Staggered page entrance animations */
@keyframes slide-fade-up {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.995);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-stagger-1,
.animate-stagger-2,
.animate-stagger-3 {
    opacity: 0;
    animation: slide-fade-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-stagger-1 {
    animation-delay: 0.15s;
}

.animate-stagger-2 {
    animation-delay: 0.35s;
}

.animate-stagger-3 {
    animation-delay: 0.55s;
}

/* Index page nav header */
.index-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 4rem 0;
}

.index-header nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.index-header nav a {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s var(--liquid-ease);
}

.index-header nav a:hover {
    color: var(--text-main);
}

/* Crystal Canvas page — header flush with container */
.crystal-canvas-page .sticky-header {
    margin-left: -2rem;
    margin-right: -2rem;
    width: calc(100% + 4rem);
}

/* Bottom progressive blur container */
.bottom-blur-gradient {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 155px;
    pointer-events: none;
    z-index: 9;
}

.bottom-blur-gradient .blur-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.bottom-blur-gradient .layer-1 {
    backdrop-filter: blur(0.31px);
    -webkit-backdrop-filter: blur(0.31px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0) 37.5%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0) 37.5%);
}

.bottom-blur-gradient .layer-2 {
    backdrop-filter: blur(0.625px);
    -webkit-backdrop-filter: blur(0.625px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 0) 50%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 12.5%, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 0) 50%);
}

.bottom-blur-gradient .layer-3 {
    backdrop-filter: blur(1.25px);
    -webkit-backdrop-filter: blur(1.25px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 62.5%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 1) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 62.5%);
}

.bottom-blur-gradient .layer-4 {
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 0) 75%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 37.5%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 0) 75%);
}

.bottom-blur-gradient .layer-5 {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 87.5%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 87.5%);
}

.bottom-blur-gradient .layer-6 {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 62.5%, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 0) 100%);
}

.bottom-blur-gradient .layer-7 {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 1) 87.5%, rgba(0, 0, 0, 1) 100%);
}

.bottom-blur-gradient .layer-8 {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 87.5%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 87.5%, rgba(0, 0, 0, 1) 100%);
}