/* ========================================
   Main — crea-m / dnd-lab inspired
   ======================================== */

:root {
    --xf-black: #0c0c0c;
    --xf-white: #fafafa;
    --xf-muted: #888;
    --xf-line: rgba(255,255,255,0.12);
    --xf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.index-page .main-content { margin-top: 0; }
.index-page .floating-consultation,
.index-page .scroll-top { display: none; }

.xf-main {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--xf-black);
    color: var(--xf-white);
    -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.xf-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 24px clamp(20px, 4vw, 48px);
    background: linear-gradient(to bottom, rgba(12,12,12,0.55), transparent);
    transition: background 0.35s var(--xf-ease), border-color 0.35s;
}

/* 밝은 섹션(Selected Work) 위에서는 다크 텍스트 네비 */
.xf-nav.is-light {
    background: rgba(250,250,250,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.xf-nav__logo { display: block; line-height: 0; }

.xf-nav__logo-img {
    height: 18px;
    display: block;
}
.xf-nav__logo-img--light { display: none; }

.xf-nav.is-light .xf-nav__logo-img--dark { display: none; }
.xf-nav.is-light .xf-nav__logo-img--light { display: block; }

.xf-nav__menu {
    display: flex;
    gap: 32px;
    margin-left: auto;
    margin-right: 32px;
}

.xf-nav__menu a {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s;
}
.xf-nav__menu a:hover,
.xf-nav__menu .xf-nav__link.is-active { opacity: 1; }

.xf-nav.is-light .xf-nav__menu a { color: var(--xf-black); }

.xf-nav__cta {
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 999px;
    transition: background 0.25s, border-color 0.25s;
}
.xf-nav__cta:hover {
    background: #fff;
    color: #000 !important;
    border-color: #fff;
}

.xf-nav.is-light .xf-nav__cta {
    color: var(--xf-black) !important;
    border-color: rgba(0,0,0,0.35);
}
.xf-nav.is-light .xf-nav__cta:hover {
    background: var(--xf-black);
    color: #fff !important;
    border-color: var(--xf-black);
}

.xf-nav__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-left: auto;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
}
.xf-nav__toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: #fff;
    transition: background 0.35s;
}
.xf-nav.is-light .xf-nav__toggle span { background: var(--xf-black); }

.xf-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    background: var(--xf-black);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--xf-ease);
}
.xf-drawer.is-open { opacity: 1; pointer-events: auto; }
.xf-drawer a {
    font-size: 22px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
}

/* ── HERO BILLBOARD ── */
.xf-hero {
    position: relative;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.xf-hero__slides {
    position: absolute;
    inset: 0;
}

.xf-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s var(--xf-ease);
}
.xf-hero__slide.is-active { opacity: 1; }

.xf-hero__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 8s linear;
}
.xf-hero__slide.is-active img { transform: scale(1); }

.xf-hero__slide-cap {
    position: absolute;
    right: clamp(20px, 4vw, 48px);
    bottom: clamp(100px, 12vh, 140px);
    text-align: right;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s var(--xf-ease) 0.3s, transform 0.8s var(--xf-ease) 0.3s;
}
.xf-hero__slide.is-active .xf-hero__slide-cap {
    opacity: 1;
    transform: translateY(0);
}
.xf-hero__slide-cap span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}
.xf-hero__slide-cap strong {
    font-size: clamp(18px, 2.5vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.xf-hero__dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(12,12,12,0.92) 0%,
        rgba(12,12,12,0.75) 45%,
        rgba(12,12,12,0.35) 100%
    );
    pointer-events: none;
}

.xf-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 clamp(20px, 6vw, 80px);
    max-width: 720px;
}

.xf-hero__badge-wrap {
    margin-bottom: 32px;
    line-height: 0;
}

.xf-hero__badge {
    height: 28px;
    width: auto;
    display: block;
}

/* 슬라이드별 카피 전환 */
.xf-hero__copy {
    display: grid;
    margin-bottom: 36px;
}

.xf-hero__panel {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s var(--xf-ease), transform 0.7s var(--xf-ease);
    pointer-events: none;
}
.xf-hero__panel.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.xf-hero__eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin: 0 0 20px;
}

.xf-hero__title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    color: #fff;
}
.xf-hero__title-line {
    display: block;
}

.xf-hero__desc {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    margin: 0;
    letter-spacing: 0.02em;
}

.xf-hero__btn {
    display: inline-block;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: var(--xf-black);
    background: #fff;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 999px;
    transition: transform 0.25s var(--xf-ease), opacity 0.25s;
    margin-top: 0;
}
.xf-hero__btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.xf-hero__ctrl {
    position: absolute;
    z-index: 3;
    bottom: clamp(28px, 5vh, 48px);
    left: clamp(20px, 6vw, 80px);
    display: flex;
    align-items: center;
    gap: 20px;
}

.xf-hero__arrow {
    width: 44px;
    height: 44px;
    border: 1px solid var(--xf-line);
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.xf-hero__arrow:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.xf-hero__count {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    min-width: 56px;
    text-align: center;
}

/* ── WORK (밝은 톤 · 넓은 벤토 그리드) ── */
.xf-work {
    background: #f0f0f0;
    color: var(--xf-black);
    padding: clamp(72px, 11vh, 108px) clamp(20px, 5vw, 72px);
}

.xf-work__inner {
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
}

.xf-work__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: clamp(32px, 5vh, 48px);
}

.xf-work__eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 10px;
}

.xf-work__head h2 {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--xf-black);
}

.xf-work__all {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--xf-black);
    text-decoration: none;
    border-bottom: 1px solid var(--xf-black);
    padding-bottom: 4px;
    transition: opacity 0.2s;
}
.xf-work__all:hover { opacity: 0.55; }

/* ── PRODUCT (라이트 톤 · 큰 썸네일 + 텍스트 하단) ── */
.xf-prod {
    background: #f0f0f0;
    color: var(--xf-black);
    padding: 96px 0;
}

.xf-prod__inner {
    max-width: 1680px;
    margin: 0 auto;
    width: 100%;
    padding: 0 clamp(20px, 5vw, 72px);
}

.xf-prod__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.xf-prod__head-text {
    display: flex;
    flex-direction: column;
}

.xf-prod__eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 10px;
}

.xf-prod__head h2 {
    margin: 0;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--xf-black);
}

.xf-prod__lead {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(0,0,0,0.64);
}

.xf-prod__all {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--xf-black);
    text-decoration: none;
    border-bottom: 1px solid var(--xf-black);
    padding-bottom: 4px;
    transition: opacity 0.2s, border-color 0.2s;
}
.xf-prod__all:hover { opacity: 0.55; }

.xf-prod__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.xf-prod__card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    background: transparent;
    transition: transform 0.25s var(--xf-ease), opacity 0.25s var(--xf-ease);
}
.xf-prod__card:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.xf-prod__thumb {
    border-radius: 16px;
    overflow: hidden;
    background: #ddd;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(0,0,0,0.06);
}
.xf-prod__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xf-prod__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
    margin-bottom: 8px;
}

.xf-prod__origin {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0,0,0,0.55);
    margin-bottom: 6px;
}

.xf-prod__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.xf-prod__desc {
    margin: 0;
    font-size: 13px;
    color: rgba(0,0,0,0.72);
    line-height: 1.55;
}

@media (max-width: 980px) {
    .xf-prod__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .xf-prod { padding: 72px 0; }
    .xf-prod__grid { grid-template-columns: 1fr; }
}

/* 빈틈 없는 모자이크 그리드 (gap: 0) */
.xf-work__mosaic {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(3, minmax(120px, 1fr));
    gap: 0;
    min-height: clamp(400px, 44vw, 520px);
    border-radius: 12px;
    overflow: hidden;
    background: #ddd;
}

/* 7칸 타일 배치 */
.xf-work__card:nth-child(1) { grid-area: 1 / 1 / 3 / 4; }
.xf-work__card:nth-child(2) { grid-area: 1 / 4 / 2 / 5; }
.xf-work__card:nth-child(3) { grid-area: 1 / 5 / 2 / 7; }
.xf-work__card:nth-child(4) { grid-area: 2 / 4 / 3 / 7; }
.xf-work__card:nth-child(5) { grid-area: 3 / 1 / 4 / 2; }
.xf-work__card:nth-child(6) { grid-area: 3 / 2 / 4 / 5; }
.xf-work__card:nth-child(7) { grid-area: 3 / 5 / 4 / 7; }

.xf-work__card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    min-width: 0;
    border-radius: 0;
    text-decoration: none;
    padding: clamp(16px, 2vw, 24px);
    transition: filter 0.25s, opacity 0.25s;
    outline: 1px solid rgba(0,0,0,0.04);
    outline-offset: -1px;
}
.xf-work__card:hover {
    filter: brightness(1.08);
    z-index: 1;
}

.xf-work__body {
    position: relative;
}

.xf-work__go {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 18px;
    opacity: 0.45;
    transition: opacity 0.25s, transform 0.25s;
}
.xf-work__card:hover .xf-work__go {
    opacity: 1;
    transform: translateX(3px);
}

/* 밝은 글자 / 어두운 글자 */
.xf-work__card--tone-light {
    color: #fff;
}
.xf-work__card--tone-light .xf-work__num { color: rgba(255,255,255,0.45); }
.xf-work__card--tone-light .xf-work__tag { color: rgba(255,255,255,0.7); }
.xf-work__card--tone-light .xf-work__title { color: #fff; }
.xf-work__card--tone-light .xf-work__desc { color: rgba(255,255,255,0.75); }

.xf-work__card--tone-dark {
    color: #111;
}
.xf-work__card--tone-dark .xf-work__num { color: rgba(0,0,0,0.35); }
.xf-work__card--tone-dark .xf-work__tag { color: rgba(0,0,0,0.5); }
.xf-work__card--tone-dark .xf-work__title { color: #111; }
.xf-work__card--tone-dark .xf-work__desc { color: rgba(0,0,0,0.55); }

.xf-work__num {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
}

.xf-work__tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.xf-work__title {
    font-size: clamp(15px, 1.6vw, 22px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    padding-right: 24px;
}
.xf-work__card:nth-child(1) .xf-work__title {
    font-size: clamp(17px, 2vw, 26px);
}

.xf-work__desc {
    font-size: 12px;
    margin: 0;
    line-height: 1.45;
    max-width: 22em;
}
.xf-work__card:nth-child(2) .xf-work__desc,
.xf-work__card:nth-child(5) .xf-work__desc {
    display: none;
}

/* ── CTA ── */
.xf-cta {
    background: var(--xf-black);
    text-align: center;
    padding: clamp(80px, 14vh, 120px) 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.xf-cta__label {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin: 0 0 20px;
}

.xf-cta__title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 0 0 40px;
    color: #fff;
}

.xf-cta__btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.xf-cta__btn {
    display: inline-block;
    padding: 16px 36px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: opacity 0.2s, transform 0.2s;
}
.xf-cta__btn:hover { transform: translateY(-2px); }

.xf-cta__btn--fill {
    background: #fff;
    color: var(--xf-black);
}
.xf-cta__btn--line {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
}

/* ── FOOTER (메인 전용) ── */
.xf-foot {
    background: var(--xf-black);
    color: rgba(255,255,255,0.55);
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
}

.xf-foot__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(48px, 8vh, 72px) clamp(20px, 4vw, 48px) 32px;
}

.xf-foot__brand {
    max-width: 360px;
}

.xf-foot__logo {
    height: 18px;
    width: auto;
    display: block;
    margin-bottom: 16px;
}

.xf-foot__badge {
    height: 24px;
    width: auto;
    display: block;
    margin-bottom: 14px;
}

.xf-foot__desc {
    margin: 0;
    line-height: 1.6;
    color: rgba(255,255,255,0.4);
}

.xf-foot__info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    text-align: right;
}

.xf-foot__info a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.xf-foot__info a:hover { color: #fff; }

.xf-foot__info span {
    color: rgba(255,255,255,0.35);
    font-size: 12px;
    line-height: 1.5;
}

.xf-foot__bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 20px clamp(20px, 4vw, 48px) 28px;
    text-align: center;
}

.xf-foot__bottom p {
    margin: 0;
    font-size: 11px;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.02em;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .xf-nav__menu,
    .xf-nav__cta { display: none; }
    .xf-nav__toggle { display: flex; }
    .xf-drawer { display: flex; }

    .xf-work__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .xf-work__mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: none;
        grid-auto-rows: minmax(120px, auto);
        min-height: 0;
    }
    .xf-work__card:nth-child(1) { grid-area: auto; grid-column: 1 / -1; min-height: 200px; }
    .xf-work__card:nth-child(2) { grid-area: auto; min-height: 120px; }
    .xf-work__card:nth-child(3) { grid-area: auto; min-height: 120px; }
    .xf-work__card:nth-child(4) { grid-area: auto; grid-column: 1 / -1; min-height: 140px; }
    .xf-work__card:nth-child(5) { grid-area: auto; min-height: 120px; }
    .xf-work__card:nth-child(6) { grid-area: auto; min-height: 120px; }
    .xf-work__card:nth-child(7) { grid-area: auto; grid-column: 1 / -1; min-height: 140px; }
    .xf-work__card:nth-child(2) .xf-work__desc,
    .xf-work__card:nth-child(5) .xf-work__desc {
        display: block;
    }

    .xf-hero__slide-cap { display: none; }

    .xf-foot__inner {
        flex-direction: column;
        gap: 28px;
    }
    .xf-foot__info {
        align-items: flex-start;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xf-hero__slide,
    .xf-hero__slide img { transition: none; }
    .xf-hero__slide.is-active img { transform: none; }
}
