@charset "utf-8";

/* 메인 갤러리 — 화면 폭을 그대로 쓴다 */
.mg-section {
    position: relative;
    padding: 120px 0 130px;
    background: #08131e;
    background-image: radial-gradient(900px 520px at 85% 0%, rgba(0, 204, 198, .14), transparent 60%),
        linear-gradient(180deg, #0b1622 0%, #08131e 100%);
    overflow: hidden;
}

.mg-head {
    max-width: 1440px;
    margin: 0 auto 54px;
    padding: 0 40px;
}

.mg-eyebrow {
    display: inline-block;
    margin: 0 0 18px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
}

.mg-title {
    margin: 0;
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.04em;
    color: #fff;
    word-break: keep-all;
}

.mg-desc {
    margin: 20px 0 0;
    font-size: 1.02rem;
    color: rgba(255, 255, 255, .5);
    word-break: keep-all;
}

/* 작품 격자 — 첫 장을 크게 잡아 시선을 끈다 */
.mg-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 260px;
    gap: 10px;
    padding: 0 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.mg-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, .04);
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1);
}

.animate-on-scroll.is-visible .mg-item {
    opacity: 1;
    transform: none;
}

.mg-item:nth-child(2) { transition-delay: .06s; }
.mg-item:nth-child(3) { transition-delay: .12s; }
.mg-item:nth-child(4) { transition-delay: .18s; }
.mg-item:nth-child(5) { transition-delay: .24s; }
.mg-item:nth-child(6) { transition-delay: .3s; }
.mg-item:nth-child(7) { transition-delay: .36s; }
.mg-item:nth-child(8) { transition-delay: .42s; }
.mg-item:nth-child(9) { transition-delay: .48s; }
.mg-item:nth-child(10) { transition-delay: .54s; }

/* 첫 장과 여섯째 장은 두 칸을 쓴다. 격자가 단조로워지지 않는다 */
.mg-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mg-item:nth-child(6) { grid-column: span 2; }

.mg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .8, .3, 1);
}

.mg-item:hover img { transform: scale(1.06); }

.mg-item-dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(4, 14, 22, .85));
    opacity: .75;
    transition: opacity .3s;
}

.mg-item:hover .mg-item-dim { opacity: .95; }

.mg-item-info {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mg-item-info b {
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--point-mint);
}

.mg-item-info strong {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
    word-break: keep-all;
}

.mg-item-info i {
    font-style: normal;
    font-size: .82rem;
    color: rgba(255, 255, 255, .55);
}

/* 더 보기 */
.mg-more {
    display: flex;
    justify-content: center;
    margin-top: 46px;
}

.mg-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 42px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.mg-more-btn::after {
    content: '';
    width: 7px;
    height: 7px;
    border-top: 2px solid var(--point-mint);
    border-right: 2px solid var(--point-mint);
    transform: rotate(45deg);
    transition: border-color .2s;
}

.mg-more-btn:hover {
    border-color: var(--point-mint);
    background: var(--point-mint);
    color: #05221f;
    transform: translateY(-2px);
}

.mg-more-btn:hover::after { border-color: #05221f; }

@media (max-width: 1080px) {
    .mg-head { padding: 0 24px; }
    .mg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 220px; padding: 0 24px; }
}

@media (max-width: 640px) {
    .mg-section { padding: 80px 0 90px; }
    .mg-head { padding: 0 16px; margin-bottom: 34px; }
    .mg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; gap: 8px; padding: 0 16px; }
    .mg-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
    .mg-item:nth-child(6) { grid-column: span 2; }
    .mg-item-info { left: 14px; right: 14px; bottom: 14px; }
    .mg-item-info strong { font-size: .95rem; }
}
