/* 동적(JS) 마크업·애니메이션 — Tailwind CDN이 HTML 외 클래스를 생성하지 않아 여기 유지 */
html {
    scroll-behavior: smooth;
}

/*
 * HTML hidden + Tailwind flex 동시 적용 시 CDN 삽입 순서 때문에 flex가 이길 수 있음
 * → 로드 직후 빈 라이트박스/모달이 보이는 현상 방지
 */
#portfolio-lightbox[hidden],
#contact-modal[hidden],
#nav-drawer[hidden] {
    display: none !important;
}

/* 모바일 햄버거 아이콘 → 닫기(X) */
#nav-menu-btn .nav-hb-line {
    position: absolute;
    left: 50%;
    width: 1.25rem;
    height: 2px;
    background-color: #fff;
    transform: translateX(-50%);
    transition:
        transform 0.2s ease,
        top 0.2s ease,
        bottom 0.2s ease,
        opacity 0.2s ease;
}

#nav-menu-btn .nav-hb-line--t {
    top: 30%;
}

#nav-menu-btn .nav-hb-line--m {
    top: 50%;
    transform: translate(-50%, -50%);
}

#nav-menu-btn .nav-hb-line--b {
    bottom: 30%;
}

#nav-menu-btn[data-open='true'] .nav-hb-line--t {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

#nav-menu-btn[data-open='true'] .nav-hb-line--m {
    opacity: 0;
}

#nav-menu-btn[data-open='true'] .nav-hb-line--b {
    bottom: auto;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
}

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

.hero-scroll .scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

/* 히어로 한글 카피 — CDN Tailwind보다 우선 적용되어 크기 보장 */
.hero-copy__title {
    font-size: clamp(1.5rem, 5.5vw, 3.25rem);
    line-height: 1.25;
    font-weight: 500;
}

.hero-copy__sub {
    font-size: clamp(1rem, 3.4vw, 1.875rem);
    line-height: 1.55;
}

/* portfolio.js 가 생성하는 카드 */
.portfolio-item {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.portfolio-img-wrap {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #1a1a1a;
}

.portfolio-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: blur(0.35px) saturate(0.92);
    transform: translateZ(0);
}

.portfolio-item:hover .portfolio-img-wrap img {
    transform: scale(1.05);
    filter: blur(0) saturate(1);
}

.portfolio-item h3 {
    padding: 20px 24px 12px;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.portfolio-item .portfolio-desc {
    margin: 0;
    padding: 0 24px 20px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

.portfolio-load-error {
    grid-column: 1 / -1;
    margin: 0;
    padding: 2rem;
    text-align: center;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.5);
}

.portfolio-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.portfolio-page-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #111;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.portfolio-page-btn:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.portfolio-page-btn.is-active {
    background: #fff;
    color: #111;
    border-color: #fff;
    font-weight: 600;
}

.portfolio-lightbox-img.is-loading {
    opacity: 0.15;
}

.portfolio-lightbox-img-wrap.is-busy::after {
    content: '불러오는 중…';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 900px) {
    #process .step {
        width: min(100%, 280px);
        min-height: 180px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}
