@charset "utf-8";

/* DESIGN ONEUL / WORKS board skin
   시맨틱 구조 + 키보드 접근성 + 반응형 + prefers-reduced-motion 대응 */

.ow-works,
.ow-write,
.ow-view {
    --ow-ink: #171717;
    --ow-muted: #7a7a7a;
    --ow-line: #e6e6e6;
    --ow-soft: #f7f7f7;
    --ow-accent: #e7372f;
    --ow-max: 1240px;
    color: var(--ow-ink);
    background: #fff;
    padding: clamp(150px, 13vw, 210px) 0 clamp(90px, 10vw, 160px);
}

.ow-wrap {
    width: min(calc(100% - 40px), var(--ow-max));
    margin: 0 auto;
}

.ow-head,
.ow-write__head,
.ow-view__head {
    max-width: 900px;
}

.ow-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 38px;
    color: #929292;
    font-size: 12px;
    letter-spacing: .06em;
}
.ow-breadcrumb a { color: inherit; }
.ow-breadcrumb a:hover,
.ow-breadcrumb a:focus-visible { color: var(--ow-ink); }

.ow-kicker {
    margin: 0 0 8px;
    color: #777;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
}

.ow-head h1,
.ow-write__head h1,
.ow-view__head h1 {
    margin: 0;
    font-size: clamp(56px, 7vw, 108px);
    line-height: .95;
    letter-spacing: -.06em;
}

.ow-desc,
.ow-write__head > p:last-child {
    max-width: 650px;
    margin: 20px 0 0;
    color: var(--ow-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* 1차 분류 */
.ow-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: clamp(62px, 8vw, 110px);
}

.ow-filter__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    background: #f6f6f6;
    color: #222;
    font-size: 14px;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.ow-filter__pill:hover,
.ow-filter__pill:focus-visible { transform: translateY(-2px); }
.ow-filter__pill.is-active {
    background: var(--ow-accent);
    color: #fff;
    font-weight: 700;
}

/* 2차 분류 - 캡처처럼 라인형 */
.ow-subfilter {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 38px;
    border-bottom: 1px solid #d9d9d9;
}
.ow-subfilter a {
    position: relative;
    min-height: 50px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    color: #666;
    border-bottom: 1px solid #d9d9d9;
    font-size: 13px;
}
.ow-subfilter a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -1px;
    height: 2px;
    background: #1a1a1a;
    transition: right .28s ease;
}
.ow-subfilter a:hover::after,
.ow-subfilter a:focus-visible::after,
.ow-subfilter a.is-active::after { right: 0; }
.ow-subfilter a.is-active { color: #111; font-weight: 700; }

.ow-admin-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}
.ow-write-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    background: #171717;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* WORK 카드 */
.ow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(60px, 7vw, 100px) clamp(24px, 4vw, 54px);
    margin-top: clamp(58px, 7vw, 94px);
}

.ow-card { min-width: 0; }
.ow-card__link { display: block; }
.ow-card__media {
    position: relative;
    aspect-ratio: .78;
    overflow: hidden;
    background: #eee;
}
.ow-card__media > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.ow-card__empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #aaa;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .15em;
    background: linear-gradient(145deg, #eeeeec, #dededb);
}

/* 이지메디컬 WORKS와 비슷한 방향:
   이미지 확대 + 어두운 오버레이 + 정보/원형 화살표가 자연스럽게 등장 */
.ow-card__hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: clamp(22px, 2.3vw, 34px);
    color: #fff;
    text-align: center;
    background: rgba(0,0,0,.58);
    opacity: 0;
    transition: opacity .4s ease;
}
.ow-card__hover-copy {
    min-width: 0;
    transform: translateY(18px);
    opacity: 0;
    transition: transform .58s cubic-bezier(.16,1,.3,1), opacity .4s ease;
}
.ow-card__hover-copy > span {
    display: block;
    margin-bottom: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .78;
}
.ow-card__hover-copy strong {
    display: block;
    font-size: clamp(19px, 1.7vw, 28px);
    line-height: 1.18;
    letter-spacing: -.035em;
}
.ow-card__hover-copy p {
    margin: 8px 0 0;
    font-size: 12px;
    opacity: .78;
}

.ow-card__arrow {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ow-accent);
    color: #fff;
    font-size: 22px;
    transform: translateY(12px);
    opacity: 0;
    transition: transform .62s cubic-bezier(.16,1,.3,1), opacity .35s ease;
}

.ow-card__meta {
    padding-top: 16px;
}
.ow-card__meta h2 {
    margin: 0;
    font-size: clamp(17px, 1.3vw, 22px);
    line-height: 1.35;
    letter-spacing: -.025em;
}
.ow-card__meta p {
    margin: 6px 0 0;
    color: #888;
    font-size: 12px;
}

.ow-card__link:hover .ow-card__hover,
.ow-card__link:focus-visible .ow-card__hover { opacity: 1; }
.ow-card__link:hover .ow-card__hover-copy,
.ow-card__link:focus-visible .ow-card__hover-copy {
    opacity: 1;
    transform: translateY(0);
}
.ow-card__link:hover .ow-card__arrow,
.ow-card__link:focus-visible .ow-card__arrow {
    opacity: 1;
    transform: translateY(0);
}

.ow-card__link:focus-visible {
    outline: 3px solid #2468ff;
    outline-offset: 5px;
}

.ow-empty {
    margin-top: 70px;
    padding: 90px 20px;
    text-align: center;
    color: #888;
    background: #fafafa;
}

.ow-pagination { margin-top: 70px; }
.ow-pagination .pg_wrap { display: block; text-align: center; }
.ow-pagination .pg_page,
.ow-pagination .pg_current {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    margin: 0 2px;
    border: 1px solid #e2e2e2;
    background: #fff;
}
.ow-pagination .pg_current {
    border-color: #171717;
    background: #171717;
    color: #fff;
}

/* 글쓰기 */
.ow-wrap--write { max-width: 980px; }
.ow-write__head { margin-bottom: 58px; }
.ow-write form {
    padding: clamp(26px, 4vw, 50px);
    border: 1px solid var(--ow-line);
    background: #fff;
}
.ow-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.ow-field { margin-bottom: 26px; }
.ow-field > label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 700;
}
.ow-field label em {
    color: var(--ow-accent);
    font-style: normal;
    font-size: 11px;
}
.ow-field input[type="text"],
.ow-field input[type="url"],
.ow-field select,
.ow-file input[type="text"] {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #d7d7d7;
    border-radius: 0;
    background: #fff;
}
.ow-field small {
    display: block;
    margin-top: 7px;
    color: #888;
    font-size: 11px;
}
.ow-editor { min-height: 300px; }
.ow-editor textarea { width: 100%; min-height: 300px; }

.ow-options {
    display: flex;
    gap: 18px;
    margin-bottom: 28px;
    padding: 14px 16px;
    background: #fafafa;
}
.ow-check { font-size: 12px; }

.ow-upload {
    margin-top: 44px;
    padding-top: 36px;
    border-top: 1px solid var(--ow-line);
}
.ow-upload__head h2 {
    margin: 0;
    font-size: 25px;
}
.ow-upload__head p {
    margin: 8px 0 26px;
    color: #777;
    font-size: 13px;
}
.ow-file {
    display: grid;
    grid-template-columns: 140px minmax(0,1fr);
    gap: 10px 18px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #ededed;
}
.ow-file > label:first-child { font-size: 13px; font-weight: 700; }
.ow-file input[type="file"] { width: 100%; }
.ow-file__delete {
    grid-column: 2;
    color: #a13d38;
    font-size: 11px;
}

.ow-write__actions,
.ow-view__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 34px;
}
.ow-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid #171717;
    font-size: 13px;
    font-weight: 700;
}
.ow-btn--dark { background: #171717; color: #fff; }
.ow-btn--line { background: #fff; color: #171717; }

/* 상세 */
.ow-wrap--view { max-width: 1180px; }
.ow-view__head { margin-bottom: clamp(54px, 7vw, 95px); }
.ow-view__lead {
    margin: 24px 0 0;
    color: #555;
    font-size: clamp(16px, 1.5vw, 21px);
}
.ow-view__tags {
    margin: 10px 0 0;
    color: #999;
    font-size: 13px;
}
.ow-view__images {
    display: grid;
    gap: 24px;
}
.ow-view__image {
    margin: 0;
    text-align: center;
    background: #f7f7f7;
}
.ow-view__image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
.ow-view__image figcaption {
    padding: 10px 14px;
    color: #888;
    font-size: 11px;
}
.ow-view__content {
    max-width: 900px;
    margin: clamp(60px, 8vw, 110px) auto 0;
    color: #333;
    line-height: 1.85;
}
.ow-view__content img { max-width: 100%; height: auto; }
.ow-view__footer {
    margin-top: 90px;
    padding-top: 28px;
    border-top: 1px solid var(--ow-line);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .ow-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ow-subfilter { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 700px) {
    .ow-works,
    .ow-write,
    .ow-view { padding: 110px 0 80px; }

    .ow-wrap { width: min(calc(100% - 36px), var(--ow-max)); }
    .ow-head h1,
    .ow-write__head h1,
    .ow-view__head h1 { font-size: clamp(52px, 18vw, 82px); }

    .ow-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .ow-filter::-webkit-scrollbar { display: none; }
    .ow-filter__pill {
        flex: 0 0 auto;
        min-width: auto;
        min-height: 40px;
        padding: 0 19px;
        font-size: 12px;
    }

    .ow-subfilter {
        grid-template-columns: repeat(2, minmax(0,1fr));
        margin-top: 26px;
    }
    .ow-subfilter a { min-height: 44px; font-size: 12px; }

    .ow-grid {
        grid-template-columns: 1fr;
        gap: 56px;
        margin-top: 54px;
    }

    /* 터치 환경에서는 핵심 정보가 사라지지 않도록 카드 하단 메타 유지 */
    .ow-card__hover { display: none; }

    .ow-form-grid { grid-template-columns: 1fr; gap: 0; }
    .ow-write form { padding: 22px 18px; }

    .ow-file {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ow-file__delete { grid-column: auto; }

    .ow-write__actions .ow-btn,
    .ow-view__actions .ow-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .ow-card__media > img,
    .ow-card__hover,
    .ow-card__hover-copy,
    .ow-card__arrow,
    .ow-filter__pill {
        transition: none;
    }
}


/* Responsive hardening */
@media (max-width: 760px) {
    .ow-works,
    .ow-write,
    .ow-view { padding-top: 104px; }
    .ow-wrap { width: calc(100% - 32px); }
    .ow-head h1,
    .ow-write__head h1,
    .ow-view__head h1 { font-size: clamp(44px, 14vw, 64px); }
    .ow-desc { font-size: 14px; }
    .ow-filter { margin-top: 44px; }
    .ow-subfilter {
        display: flex;
        overflow-x: auto;
        gap: 0;
        border-bottom: 1px solid #ddd;
        scrollbar-width: none;
    }
    .ow-subfilter::-webkit-scrollbar { display: none; }
    .ow-subfilter a { flex: 0 0 auto; min-width: 104px; padding-inline: 16px; }
    .ow-grid { gap: 44px; }
    .ow-card__media { aspect-ratio: .84; }
    .ow-card__meta h2 { font-size: 20px; }
    .ow-write form { padding: 20px 16px; }
    .ow-editor,
    .ow-editor textarea { min-height: 240px; }
    .ow-upload { margin-top: 32px; padding-top: 28px; }
    .ow-view__content { margin-top: 48px; }
    .ow-view__footer { margin-top: 58px; }
}

@media (max-width: 420px) {
    .ow-wrap { width: calc(100% - 28px); }
    .ow-filter__pill { padding-inline: 16px; }
    .ow-write__actions,
    .ow-view__actions { flex-direction: column; }
    .ow-write__actions .ow-btn,
    .ow-view__actions .ow-btn { width: 100%; }
}
