/* ─────────────────────────────────────────────────────────────────────────────
   CUTIB 2026 — Homepage (LOCOMOTION 2026 home.css + IA B sections)
───────────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════════
   01 HERO — identical to LOCOMOTION (key bg, label + line, Degular headline,
   showreel card top-right that expands to full screen on scroll)
══════════════════════════════════════════════════════════════════════════ */

.section-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    padding: 40px var(--nav-pad-left);
    background-color: var(--color-key);
    color: var(--color-on-key);
    overflow: hidden;
}

.hero-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding-top: calc(var(--nav-height) + var(--nav-pad-top) + 160px);
}

.hero-label {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    width: 100%;
    margin-bottom: auto;
}

.section-hero .section-line {
    background-color: currentColor;
}

.label-text {
    font-family: var(--font-ui);
    font-size: var(--text-label);
    line-height: var(--lh-label);
    text-transform: uppercase;
}

/* Headline (left) + sub copy & buttons (right) */
.hero-headline {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    align-items: end;
    gap: var(--gap-md);
}

.hero-aside {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.section-hero .headline {
    color: inherit;
    word-break: keep-all;
}

.hero-sub {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--lh-normal);
    max-width: 910px;
}

.hero-aside .btn-group {
    margin-top: 10px;
}

.showreel-card {
    position: absolute;
    top: 40px;
    right: var(--nav-pad-left);
    width: 600px;
    height: 338px;
    border-radius: var(--radius-nav);
    overflow: hidden;
    background-color: var(--color-dark);
    z-index: 3;
    will-change: transform;
}

.showreel-video,
.showreel-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


/* ══════════════════════════════════════════════════════════════════════════
   02 FEATURED WORKS — pinned horizontal scroll (desktop) / grid
══════════════════════════════════════════════════════════════════════════ */

.section-featured-works .section-cta {
    margin-top: var(--gap-sm);
}

.hscroll-viewport {
    width: 100%;
}

.is-hscroll .hscroll-viewport {
    overflow: hidden;
    margin-inline: calc(var(--section-px) * -1);
    padding-inline: var(--section-px);
}

.is-hscroll .hscroll-track {
    display: flex;
    gap: var(--gap-sm);
    width: max-content;
    will-change: transform;
}

.is-hscroll .hscroll-track > .works-item {
    width: calc((100vw - var(--section-px) * 2 - var(--gap-sm) * 2) / 3);
    flex-shrink: 0;
}

/* Last slot: "전체 작품 보기" */
.works-all-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1 / 1;
    padding: 20px;
    border-radius: 6px;
    background-color: var(--color-cream);
    color: var(--color-black);
}

.works-all-card__label {
    font-family: var(--font-ui);
    font-size: var(--text-label);
    text-transform: uppercase;
}

.works-all-card .next-banner__arrow {
    align-self: flex-end;
    width: 64px;
    height: 64px;
}

.works-all-card:hover .next-banner__arrow {
    transform: rotate(45deg) translate(10%, -10%);
}

.section-cta--mobile {
    display: none;
}


/* ══════════════════════════════════════════════════════════════════════════
   03 ORIGINALS — full-width key visual + split body
══════════════════════════════════════════════════════════════════════════ */

.original-feature {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.original-feature__media {
    display: block;
}

.original-feature__media img {
    transition: transform 0.8s ease;
}

.original-feature__media:hover img {
    transform: scale(1.03);
}

.original-feature__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gap-sm);
}

.original-feature__title {
    font-family: var(--font-body);
    font-size: var(--text-section-head);
    font-weight: var(--fw-medium);
    line-height: var(--lh-normal);
    text-transform: uppercase;
}

.original-feature__meta {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    line-height: var(--lh-normal);
}


/* ══════════════════════════════════════════════════════════════════════════
   04 / 07 BG SECTION — full-bleed image with copy
══════════════════════════════════════════════════════════════════════════ */

.bg-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--section-py) var(--section-px);
    background-color: var(--color-dark);
    color: var(--color-white);
    overflow: hidden;
}

.bg-section__bg {
    position: absolute;
    inset: -10% 0;
    will-change: transform;
}

.bg-section__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-section__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.bg-section__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    width: 100%;
}

.bg-section .section-label {
    color: inherit;
}

.bg-section .section-line {
    background-color: currentColor;
    opacity: 0.6;
}

.bg-section__title {
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    font-size: var(--text-section-head);
    font-weight: var(--fw-medium);
    line-height: var(--lh-normal);
    text-transform: uppercase;
}

.bg-section__desc {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--lh-normal);
    max-width: 760px;
}

.bg-section .btn-group {
    margin-top: var(--gap-sm);
}

/* Centred variant: copy in the middle, line keeps full width */
.bg-section--center .bg-section__copy {
    text-align: center;
    align-items: center;
}

.bg-section--center .bg-section__copy .section-line {
    width: 100%;
}

.bg-section--center .bg-section__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 1.5rem + 3vw, 5rem);
    font-weight: var(--fw-semibold);
    line-height: 1.1;
    margin-top: var(--gap-md);
}

/* Left variant: title (left 50%) / description + buttons (right) */
.bg-section--left {
    align-items: flex-end;
}

/* 07 Enterprise: shorter section — about half the empty space above the copy */
.section-enterprise {
    min-height: calc(50vh + 160px);
}

.bg-section--left .bg-section__copy {
    display: grid;
    grid-template-columns: 50% 1fr;
    column-gap: var(--gap-sm);
    row-gap: var(--gap-sm);
}

.bg-section--left .section-label,
.bg-section--left .section-line {
    grid-column: 1 / -1;
}

.bg-section--left .bg-section__title {
    grid-column: 1;
    grid-row: 3 / span 2;
}

.bg-section--left .bg-section__desc,
.bg-section--left .btn-group {
    grid-column: 2;
    margin: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   05 TACU — LOCOMOTION "Services" layout (decoration column + 920px list)
══════════════════════════════════════════════════════════════════════════ */

.services-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-sm);
    width: 100%;
}

.services-decoration {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-height) + var(--nav-pad-top) + 20px);
}

.services-inner .num-list {
    flex-shrink: 0;
    width: calc(50% - var(--gap-sm));   /* starts on the description column above */
}

/* Image keeps its previous width (content width − 920px column − gap) */
.services-decoration .media-frame {
    width: min(100%, calc(100vw - var(--section-px) * 2 - var(--content-width) - var(--gap-sm)));
}


/* ══════════════════════════════════════════════════════════════════════════
   06 VIDEO AI — Featured Works cards, stacked in the right (description) column
══════════════════════════════════════════════════════════════════════════ */

.ai-cards {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
    width: calc(50% - var(--gap-sm));
    margin-left: auto;
}

/* Original image ratio */
.works-item__img-wrap--natural {
    aspect-ratio: auto;
}

.works-item__img-wrap--natural img {
    height: auto;
}

.works-item__desc p + p {
    margin-top: 0.5em;
}

/* ══════════════════════════════════════════════════════════════════════════
   08 NEWS — rows
══════════════════════════════════════════════════════════════════════════ */

.news-list {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.news-list__item {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.news-list__link {
    display: grid;
    grid-template-columns: 320px 1fr 24px;
    align-items: center;
    gap: var(--gap-sm);
}

.news-list__meta {
    display: flex;
    gap: var(--gap-sm);
    font-family: var(--font-ui);
    font-size: var(--text-small);
    text-transform: uppercase;
}

.news-list__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Media name above the title */
.news-list__source {
    font-family: var(--font-ui);
    font-size: var(--text-small);
    line-height: var(--lh-normal);
    opacity: 0.6;
}

.news-list__title {
    font-family: var(--font-body);
    font-size: var(--text-item-title);
    font-weight: var(--fw-medium);
    line-height: var(--lh-normal);
    transition: opacity var(--ease-default);
}

.news-list__link:hover .news-list__title {
    opacity: 0.6;
}

.news-list__arrow {
    width: 14px;
    height: 14px;
    justify-self: end;
    background-color: var(--color-black);
    -webkit-mask: var(--icon-arrow) no-repeat center / contain;
            mask: var(--icon-arrow) no-repeat center / contain;
    transform: rotate(45deg);
    transition: background-color 0.3s ease;
}

.news-list__arrow.is-external {
    transform: none;
}

/* Hover: key color only — position stays fixed */
.news-list__link:hover .news-list__arrow {
    background-color: var(--color-key);
}


/* ══════════════════════════════════════════════════════════════════════════
   SHOWREEL BREAKPOINT (≤ 1024px) — same as LOCOMOTION
══════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 1024px) {

    .section-hero {
        height: auto;
        padding: 0;
    }

    .hero-body {
        height: auto;
        justify-content: flex-start;
        padding: calc(var(--nav-height) + var(--nav-pad-top) + 120px) var(--section-px) var(--gap-md);
        gap: var(--gap-md);
    }

    .hero-headline {
        grid-template-columns: 1fr;
    }

    .showreel-card {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 0;
        transform: none !important;
    }

    /* Horizontal scroll falls back to a grid */
    .is-hscroll .hscroll-track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        transform: none !important;
    }

    .is-hscroll .hscroll-track > .works-item {
        width: auto;
    }

    .is-hscroll .works-item--all {
        display: none;
    }

    .section-cta--mobile {
        display: flex;
    }
}


/* ══════════════════════════════════════════════════════════════════════════
   MOBILE (≤ 980px)
══════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 980px) {

    .hero-body {
        padding: 160px var(--section-px) var(--gap-md);
        gap: var(--gap-md);
    }

    .hero-label {
        margin-bottom: 0;
    }

    .section-hero .headline {
        font-size: 32px;
    }

    .is-hscroll .hscroll-track {
        grid-template-columns: 1fr;
    }

    .services-inner {
        flex-direction: column;
    }

    .services-decoration {
        position: static;
        width: 100%;
    }

    .services-inner .num-list,
    .services-decoration .media-frame {
        width: 100%;
    }

    .ai-cards {
        width: 100%;
    }

    .bg-section {
        min-height: 80vh;
    }

    .section-enterprise {
        min-height: 60vh;
    }

    .bg-section--left .bg-section__copy {
        grid-template-columns: 1fr;
    }

    .bg-section--left .bg-section__title,
    .bg-section--left .bg-section__desc,
    .bg-section--left .btn-group {
        grid-column: 1;
        grid-row: auto;
    }

    .news-list__link {
        grid-template-columns: 1fr 16px;
    }

    .news-list__meta {
        grid-column: 1 / -1;
    }
}
