:root {
    --bg: #fff8f3;
    --ink: #111;
    --muted: #6b665e;
    --accent: #ff761a;
    --line: rgba(17, 17, 17, .12);
    --max: 1200px;
    --pad: clamp(16px, 3.2vw, 40px);
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Suit', -apple-system, "Noto Sans KR", sans-serif;
    letter-spacing: -.01em;
    font-weight: 500;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

html,
body {
    overflow-x: hidden;
}

.wrap {
    width: min(var(--max), 100% - (var(--pad)*2));
    margin: 0 auto;
}

/* =========================================================
      Hero
    ========================================================= */
.hero {
    text-align: center;
}

.hero__kicker {
    margin: 0;
    font-size: clamp(28px, 3vw, 60px);
    /* letter-spacing: .06em; */
    text-transform: uppercase;
    padding: 4em 0;
}

.hero__sub {
    margin: 0 0 1em;
    font-size: 20px;
    letter-spacing: .12em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.scroll-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
}

.scroll-chip b {
    font-weight: 700;
    color: var(--accent);
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: clamp(11px, 1.5vw, 16px);
}

.scroll-chip:nth-child(2) b {
    margin: 0 1em;
}

.line-container {
    width: 1px;
    height: 22px;
    position: relative;
}

.line {
    position: absolute;
    width: 2px;
    height: 0px;
    background-color: var(--accent);
    top: 0;
    bottom: initial;
    animation: line-animation 2.5s ease-in-out 0s infinite normal;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.line::before {
    content: ' ';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    display: block;
    position: absolute;
    bottom: 0;
    animation: arrow-animation 2.5s ease-in-out 0s infinite normal;
}

@keyframes line-animation {
    0% {
        height: 0px;
        top: 0px;
        opacity: 0;
    }

    50% {
        height: 22px;
        top: 0px;
        opacity: 1;
    }

    100% {
        height: 0px;
        top: 22px;
        opacity: 0;
    }
}

@keyframes arrow-animation {
    0% {
        opacity: 0
    }

    50% {
        opacity: 1
    }

    100% {
        opacity: 0
    }
}

/* =========================================================
      Showreel (click -> modal)
    ========================================================= */
.showreel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    background: var(--accent);
}

/* 기존 .showreel__inner는 padding/grid였는데 → 영상용으로 변경 */
.showreel__inner {
    height: 100%;
    padding: 0;
    /* ✅ 텍스트용 패딩 제거 */
}

/* ✅ 영상이 박스에 꽉 차도록 */
.showreel__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-fit: cover;
}

/* =========================================================
      About
    ========================================================= */
.about {
    height: 100vh;
    padding: clamp(7em, 7vw, 10em) 0;
    position: relative;
    overflow: hidden;
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(18px, 3vw, 40px);
    align-items: start;
    min-height: calc(100vh - clamp(7em, 7vw, 10em) * 2);
    position: relative;
}

.about__art {
    position: absolute;
    left: 0;
    bottom: -150px;
    width: min(64vw, 940px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
}

.about__art svg {
    width: min(520px, 100%);
    height: auto;
}

.about__artImg {
    width: 100%;
    height: auto;
    display: block;
}

.about__copy {
    grid-column: 2;
}

.about__copy h3 {
    margin: 0;
    font-size: clamp(18px, 1.5vw, 40px);
    text-transform: uppercase;
    font-weight: 300;
}

.about__copy h2 {
    margin: 1em 0;
    font-size: clamp(18px, 2.2vw, 50px);
    font-weight: 600;
    padding-left: 2em;
}

.about__copy p {
    margin: 0;
    font-size: clamp(14px, 1.5vw, 32px);
    font-weight: 400;
}

/* =========================================================
      Works (hover: zoom + title slide-in)
    ========================================================= */
/* =========================================================
      WORK (clean & dedup)
      - rem/vw 스케일 유지
      - hover / 이미지 / services 세로정렬 고정
      - 중복 셀렉터/불필요 !important 최소화
    ========================================================= */

/* ✅ scale */
html {
    font-size: .0694444444vw;
    scroll-behavior: auto;
}

@media (max-width:1024px) {
    html {
        font-size: 1px;
    }
}

/* ✅ base tone */
body {
    margin: 0;
    background: var(--bg);
    /* color: #ff1a00; */
    font-family: 'Suit', -apple-system, "Noto Sans KR", sans-serif;
    font-size: 20rem;
    font-weight: 400;
    letter-spacing: -.03em;
    line-height: 1.2;
    text-transform: none;
}

/* ✅ grid vars */
:root {
    --margin: 20rem;
    --gap: 20rem;
    --rvw: 1vw;
    --column: calc(var(--rvw)*100/12 - var(--margin)*2/12 - var(--gap)*11/12);
}

@media (max-width:1024px) {
    :root {
        --margin: 16px;
        --gap: 10px;
    }
}

@media (max-width:740px) {
    :root {
        --margin: 18px;
    }
}

/* =========================================================
      SECTION
    ========================================================= */
.work {
    box-sizing: border-box;
    overflow-x: clip;
    width: 100%;
    padding: 200rem var(--margin) 0;
    position: relative;
}

.work__top {
    display: flex;
    align-items: flex-start;
    margin: 0 0 120rem;
    margin-left: calc(var(--column) + var(--gap));
}

.work__title {
    margin: 0;
    font-family: 'Suit', -apple-system, "Noto Sans KR", sans-serif;
    font-size: 42rem;
    letter-spacing: -.02em;
    line-height: 1;
    position: relative;
    top: -.1em;
}

/* (N) : 괄호-숫자-괄호 한 덩어리, ()6 배치가 아님 */
.work__brackets {
    display: inline-block;
    position: relative;
    overflow: hidden;
    line-height: 1;
    margin-left: 12rem;
    /* 전체 (6) 스케일 */
    font-size: 1.65em;
    vertical-align: middle;
}

/* 한 줄: (  숫자  ) */
.work__frame {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 2s cubic-bezier(.65, .2, 0, 1);
}

.work__paren {
    display: block;
    flex: 0 0 auto;
    font-weight: 400;
    letter-spacing: 0;
}

/* 한 자리 숫자만 보이는 슬롯(괄호 사이) */
.work__numMask {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    width: 0.55em;
    height: 1em;
    text-align: center;
}

.work__numbers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1;
    font-size: 1em;
    transform: translateY(1em);
    transition: transform 2s cubic-bezier(.6, .14, 0, 1) .7s;
}

.work__numbers span {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: 400;
    flex: 0 0 auto;
    height: 1em;
    line-height: 1;
}

.work__brackets.is-show .work__numbers {
    transform: translateY(calc(-100% + 1.02em));
}

.work__brackets:not(.is-show) .work__frame {
    transform: translateY(100%);
}

/* =========================================================
      CARDS WRAP
    ========================================================= */
.work__cards {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    pointer-events: none;
    /* ✅ 원본 구조 */
}

.work__card {
    flex: 0 0 auto;
    flex-shrink: 0;
    pointer-events: auto;
    /* ✅ hover 살리는 핵심 */
    will-change: transform, filter;
    transition: transform 1s cubic-bezier(.19, 1, .22, 1), filter 1s cubic-bezier(.19, 1, .22, 1);
}

/* layout pattern */
.work__card:nth-child(5n+1) {
    margin-left: 30rem;
    margin-top: 30rem;
    width: 510rem;
}

.work__card:nth-child(5n+2) {
    margin-left: 220rem;
    margin-top: -80rem;
    width: 400rem;
}

.work__card:nth-child(5n+3) {
    margin-left: 150rem;
    margin-right: 220rem;
    margin-top: 160rem;
    width: 510rem;
}

.work__card:nth-child(5n+4) {
    margin-left: auto;
    margin-right: 0;
    margin-top: 110rem;
    width: 510rem;
}

.work__card:nth-child(5n+5) {
    margin: 160rem 0 200rem;
    margin-left: calc(var(--column)*4 + var(--gap)*5);
    width: 700rem;
}

.work__card:nth-child(5n+6) {
    margin-left: auto;
    /* margin-left: calc(var(--column)*6 + var(--gap)*7); */
    width: 840rem;
}

html[data-touch="false"] .work__cards:hover .work__card:not(:hover) {
    filter: blur(17rem);
    transform: scale(.8);
}

/* =========================================================
      PROJECT CARD
    ========================================================= */
.project {
    display: inline-flex;
    width: 100%;
    position: relative;
    color: inherit;
    text-decoration: none;
}

/* 원본처럼 내부는 hover 대상이 아님 */
.project__parallax,
.project__inner {
    pointer-events: none;
    width: 100%;
    position: relative;
}

.project__media {
    width: 100%;
    margin-bottom: 32rem;
    position: relative;
    overflow: hidden;
    background: #e6e6e6;
    border-radius: 0;
    aspect-ratio: 16/11;
}

.project__media--169 {
    aspect-ratio: 16/9;
}

.project__media--195 {
    aspect-ratio: 19/5;
}

.project__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.01);
}

/* title(카드 아래 텍스트) */
.project__name {
    font-size: 18rem;
    letter-spacing: -.01em;
    margin-top: -6rem;
}

/* hover reveal */
.project__meta {
    position: absolute;
    left: 0;
    top: 100%;
    padding-top: 60rem;
    pointer-events: none;
}

.project__subtitle {
    display: block;
    margin-bottom: 1em;
    font-size: 18rem;
    opacity: .9;
}

/* ✅ services 세로정렬: 여기 하나만으로 끝 */
.project__services {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6rem;
    font-size: 18rem;
    opacity: .9;
}

.project__services span {
    display: block;
    width: 100%;
}

/* reveal motion */
.project__subtitle,
.project__services span {
    opacity: 0;
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(.19, 1, .22, 1), opacity 1s cubic-bezier(.19, 1, .22, 1);
}

.project:hover {
    z-index: 9;
}

.project:hover .project__subtitle,
.project:hover .project__services span {
    opacity: 1;
    transform: translateY(0);
}

/* stagger */
.project:hover .project__services span:nth-child(1) {
    transition-delay: .1s;
}

.project:hover .project__services span:nth-child(2) {
    transition-delay: .2s;
}

.project:hover .project__services span:nth-child(3) {
    transition-delay: .3s;
}

.project:hover .project__services span:nth-child(4) {
    transition-delay: .4s;
}

.project:hover .project__services span:nth-child(5) {
    transition-delay: .5s;
}

.project:hover .project__services span:nth-child(6) {
    transition-delay: .6s;
}

.project:hover .project__services span:nth-child(7) {
    transition-delay: .7s;
}

.project:hover .project__services span:nth-child(8) {
    transition-delay: .8s;
}

/* =========================================================
      RESPONSIVE (원본 발췌)
    ========================================================= */
@media (max-width:1024px) {
    .work__top {
        margin-left: 0;
    }
}

@media (max-width:740px) {
    .work {
        padding-top: 190px;
    }

    .work__top {
        margin-bottom: 65px;
    }

    .work__card:nth-child(5n+1) {
        margin: 0 0 70px;
        width: 66vw;
    }

    .work__card:nth-child(5n+2) {
        margin: 0 0 50px auto;
        width: 52%;
    }

    .work__card:nth-child(5n+3) {
        margin: 0 0 0 10%;
        width: 66vw;
    }

    .work__card:nth-child(5n+4) {
        margin: 80px 0 0 auto;
        width: 48vw;
    }

    .work__card:nth-child(5n+5) {
        margin: 70px 0 0;
        width: 45vw;
    }

    .work__card:nth-child(5n+5):not(:last-child) {
        margin-bottom: 70px;
    }

    .project {
        font-size: 12px;
    }

    .project__media {
        margin-bottom: 11px;
    }

    .project__meta {
        display: none;
    }
}

.works__more {
    display: flex;
    justify-content: flex-start;
    position: absolute;
    left: 5em;
    bottom: 15em;
}

.more-link {
    /* display: inline-flex; */
    align-items: center;
    gap: 10px;
    font-size: clamp(20px, 3vw, 40px);
    text-transform: uppercase;
    color: var(--accent);
}

.more-link>div:first-child {
    padding-left: 1.5em;
}

.more-link>div:last-child {
    display: flex;
    align-items: center;
}

.more-link .circle {
    width: 45px;
    height: 45px;
    border-radius: 999px;
    border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
    display: grid;
    place-items: center;
    margin-left: 10px;
}

.more-link svg {
    width: 40px;
    height: 40px;
}

/* =========================================================
      CTA
    ========================================================= */
.cta {
    padding: clamp(10em, 20vw, 30em) 0;
}

.cta__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cta__row h2 {
    margin: 0;
    font-size: clamp(50px, 3.2vw, 100px);
    line-height: 1.15;
    font-weight: 800;
}

.cta__row .more-link>div:first-child {
    padding-left: 0;
}

.cta__row .more-link>div:last-child {
    padding-left: 1.1em;
    display: flex;
    align-items: center;
}

.cta__row .more-link .circle {
    margin-left: 25px;
}

/* =========================================================
      Showreel Modal
    ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(10px);
    padding: 18px;
}

.modal.is-open {
    display: grid;
}

.modal__panel {
    width: min(980px, 100%);
    background: #0b0b0b;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
    transform: translateY(8px);
    opacity: 0;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
}

.modal.is-open .modal__panel {
    transform: translateY(0);
    opacity: 1;
}

.modal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 10px;
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
}

.modal__title {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .85;
    margin: 0;
    padding-left: 6px;
}

/* index.html navMeta는 about과 동일하게 대문자 강제 없이 표시 */
.navMeta__pill {
    text-transform: none;
}

.modal__close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(0, 0, 0, .2);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.modal__close svg {
    width: 18px;
    height: 18px;
}

.modal__body {
    aspect-ratio: 16/9;
    background: #000;
}

.modal__body video,
.modal__body iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================
      Responsive
    ========================================================= */
@media (max-width: 900px) {
    .hero__kicker {
        font-size: clamp(30px, 8vw, 56px);
        line-height: 1.05;
        padding: clamp(90px, 18vw, 150px) 0 clamp(70px, 14vw, 120px);
    }

    .hero__sub {
        gap: 10px;
        font-size: 14px;
    }

    .about__grid {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 0;
        gap: clamp(32px, 7vw, 72px);
    }

    .about {
        height: auto;
        min-height: 100svh;
        padding: clamp(56px, 10vw, 90px) 0 clamp(40px, 8vw, 80px);
        overflow: visible;
    }

    .about__copy {
        grid-column: 1;
        width: min(520px, 100%);
        margin-left: auto;
        order: 1;
    }

    .about__copy h2 {
        padding-left: 0;
        font-size: clamp(30px, 6vw, 48px);
    }

    .about__copy p {
        font-size: clamp(16px, 3.2vw, 22px);
    }

    .about__art {
        position: static;
        order: 2;
        width: min(78vw, 620px);
        margin-left: auto;
        justify-content: flex-end;
    }

    .work {
        padding: clamp(120px, 18vw, 180px) var(--pad) 0;
    }

    .work__top {
        margin: 0 0 clamp(60px, 10vw, 100px);
    }

    .work__title {
        font-size: clamp(34px, 7vw, 52px);
    }

    .work__cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(44px, 7vw, 80px) clamp(16px, 4vw, 32px);
        pointer-events: auto;
    }

    .work__card:nth-child(n) {
        width: auto;
        margin: 0;
    }

    .project {
        display: block;
    }

    .project__media {
        margin-bottom: 14px;
    }

    .project__name,
    .project__subtitle,
    .project__services {
        font-size: clamp(14px, 2.4vw, 18px);
    }

    .project__meta {
        position: static;
        padding-top: 10px;
    }

    .project__subtitle,
    .project__services span {
        opacity: 1;
        transform: none;
    }

    html[data-touch="false"] .work__cards:hover .work__card:not(:hover) {
        filter: none;
        transform: none;
    }

    .works__more {
        position: static;
        margin: clamp(70px, 12vw, 120px) 0 0;
    }

    .cta {
        padding: clamp(90px, 18vw, 160px) 0;
    }

    .cta__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta__row h2 {
        font-size: clamp(38px, 8vw, 72px);
    }

    .modal__panel {
        width: min(980px, 100%);
    }

}

@media (max-width: 640px) {
    :root {
        --pad: 18px;
    }

    .hero__sub {
        justify-content: center;
    }

    .hero__sub > .scroll-chip:first-child,
    .hero__sub > .scroll-chip:last-child {
        display: none;
    }

    .showreel {
        height: 72svh;
    }

    .about {
        min-height: auto;
    }

    .about__grid {
        gap: 32px;
    }

    .about__copy {
        margin-left: 0;
    }

    .about__art {
        width: min(86vw, 520px);
        margin-left: auto;
        margin-right: 0;
    }

    .work__cards {
        grid-template-columns: 1fr;
        gap: 64px;
    }

    .work__card:nth-child(n) {
        width: 100%;
        margin: 0;
    }

    .project__media--195 {
        aspect-ratio: 16/7;
    }

    .works__more {
        margin-top: 70px;
    }

    .more-link {
        font-size: clamp(28px, 10vw, 42px);
    }

    .more-link > div:first-child,
    .cta__row .more-link > div:last-child {
        padding-left: 0;
    }

    .more-link .circle {
        width: 38px;
        height: 38px;
        margin-left: 8px;
    }

    .more-link svg {
        width: 30px;
        height: 30px;
    }

    .modal {
        padding: 10px;
    }

    .modal__panel {
        border-radius: 12px;
    }

    .modal__top {
        padding: 8px;
    }

    .modal__close {
        width: 34px;
        height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}