/* Variables */
:root {
    --color-bg: #0a0a0a;
    --color-bg-alt: #111111;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    --color-accent: #6366f1;
    --color-accent-alt: #a855f7;
    --font-main: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container: min(90rem, 90vw);
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

/* Cursor */
.cursor {
    width: 10px;
    height: 10px;
    background: var(--color-accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.2s var(--transition);
    display: none;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.4s var(--transition);
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .cursor,
    .cursor-follower {
        display: block;
    }
}

.cursor--hover {
    transform: scale(4);
}

/* Noise */
.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.02;
    z-index: 100;
}

.noise::before {
    content: '';
    position: absolute;
    inset: -50%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgbnVtT2N0YXZlcz0iNCIgLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjYSkiIG9wYWNpdHk9IjEiLz48L3N2Zz4=');
    animation: noise 1s steps(2) infinite;
}

@keyframes noise {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, 5%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-15%, 0); }
    90% { transform: translate(10%, 5%); }
    100% { transform: translate(5%, 0); }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1.25rem;
}

.nav__logo svg {
    width: 2.5rem;
    height: 2.5rem;
}

.nav__menu {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.nav__link {
    position: relative;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s var(--transition);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}

.nav__toggle span {
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s var(--transition);
}

/* Container */
.container {
    width: var(--container);
    margin: 0 auto;
}

/* Hero */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__canvas {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero__content {
    text-align: center;
    z-index: 1;
}

.hero__title {
    font-family: var(--font-main);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.hero__title span {
    display: block;
    /* overflow: hidden; 애니메이션 실패 시에도 보이도록 주석처리 */
}

.hero__subtitle {
    margin-top: 2rem;
    font-size: clamp(0.875rem, 1.5vw, 1.125rem);
    color: var(--color-text-muted);
    max-width: 40ch;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    margin-top: 3rem;
}

.hero__scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.hero__scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-text-muted), transparent);
    animation: scroll-line 2s infinite;
}

@keyframes scroll-line {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    transition: all 0.3s var(--transition);
}

.btn--primary {
    background: var(--color-accent);
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px var(--color-accent);
}

.btn-glow {
    position: relative;
    background: var(--color-accent);
    color: white;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-alt));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(10px);
    z-index: -1;
}

.btn-glow:hover::before {
    opacity: 1;
}

/* Marquee */
.marquee-section {
    padding: 4rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee {
    position: relative;
}

.marquee__track {
    display: flex;
    gap: 3rem;
    animation: marquee 20s linear infinite;
}

.marquee__track span {
    font-family: var(--font-main);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    white-space: nowrap;
    color: var(--color-text-muted);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Sections */
section {
    padding: 8rem 0;
}

.section-title {
    font-family: var(--font-main);
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
    /* 애니메이션 실패 시에도 표시되도록 */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Work */
.work__grid {
    display: grid;
    gap: 4rem;
}

.work__item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.work__media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 1rem;
}

.work__image {
    width: 100%;
    height: 100%;
    background: var(--color-bg-alt);
    transition: transform 1s var(--transition);
}

.work__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.5));
    opacity: 0;
    transition: opacity 0.5s;
}

.work__item:hover .work__image {
    transform: scale(1.1);
}

.work__item:hover .work__overlay {
    opacity: 1;
}

.work__info {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
}

.work__info h3 {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 600;
}

.work__info p {
    color: var(--color-text-muted);
}

.work__year {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* About */
.about .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about__text {
    margin-top: 2rem;
}

.about__text p {
    margin-bottom: 1.5rem;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.6;
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
}

.stat__number {
    display: block;
    font-family: var(--font-main);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat__label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.about__visual {
    position: relative;
    aspect-ratio: 1;
}

.about__canvas {
    width: 100%;
    height: 100%;
}

/* Services */
.services__list {
    display: grid;
    gap: 2rem;
}

.service {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    transition: all 0.3s var(--transition);
    /* 애니메이션 실패 시에도 표시되도록 */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.service:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(1rem);
}

.service__number {
    font-family: var(--font-main);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
}

.service__title {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service__desc {
    color: var(--color-text-muted);
}

.service__icon svg {
    width: 3rem;
    height: 3rem;
    stroke: var(--color-accent);
}

/* Contact */
.contact {
    text-align: center;
    padding: 12rem 0;
}

.contact__text {
    font-size: 1.5rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.contact__email {
    font-family: var(--font-main);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    display: inline-block;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s var(--transition);
}

.contact__email:hover {
    transform: scale(1.05);
}

.contact__info {
    margin-top: 4rem;
}

.contact__item {
    display: flex;
    justify-content: center;
    gap: 3rem;
    color: var(--color-text-muted);
}

/* Process Section */
.process {
    padding: 8rem 0;
}

.process__grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
}

.process__item {
    text-align: center;
}

.process__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
    font-family: var(--font-main);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.process__item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.process__item p {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.process__arrow {
    font-size: 2rem;
    color: var(--color-accent);
}

/* FAQ Section */
.faq {
    padding: 8rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.faq__list {
    max-width: 800px;
    margin: 0 auto;
}

.faq__item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq__question h3 {
    font-size: 1.125rem;
    font-weight: 500;
}

.faq__toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq__item.active .faq__toggle {
    transform: rotate(45deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq__answer p {
    padding-top: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.faq__item.active .faq__answer {
    max-height: 200px;
}

/* Database Section */
.database {
    padding: 8rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.database__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.database__text h3 {
    font-family: var(--font-main);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.database__features {
    list-style: none;
    margin: 2rem 0;
}

.database__features li {
    padding: 0.75rem 0;
    font-size: 1.125rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-main);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__links {
    display: flex;
    gap: 2rem;
}

.footer__links a {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer__links a:hover {
    color: var(--color-text);
}

/* Responsive */
@media (max-width: 768px) {
    .nav__menu {
        display: none;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .hero__title {
        font-size: clamp(1.75rem, 5vw, 3rem);
    }
    
    .section-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    
    .about .container {
        grid-template-columns: 1fr;
    }
    
    .about__stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .database__content {
        grid-template-columns: 1fr;
    }
    
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .service {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .service__icon {
        order: -1;
    }
    
    .process__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .process__arrow {
        display: none;
    }
    
    .contact__item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer__content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
