/* ======================================================================
   site.css — YEIN 고객 화면(한 페이지 스크롤 + 포트폴리오 상세)
   톤: 화이트 바탕 · 큰 이미지 · 얇은 영문 헤딩(Jost 300) · 넓은 여백. 관리자(app.css/cgrid.css)와 섞지 않는다.
   ====================================================================== */
:root {
    --ink: #1c1b19;
    --text: #3d3a35;
    --muted: #8a857c;
    --line: #e6e2dc;
    --soft: #f6f4f0;
    --accent: #a08c74;
    --danger: #b4492f;
    --header-h: 76px;
    --gutter: 40px;
    --max: 1200px;
    --en: 'Jost', 'Noto Sans KR', sans-serif;
    --ko: 'Noto Sans KR', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font-family: var(--ko); font-weight: 300; font-size: 15px; line-height: 1.8; letter-spacing: -.01em; word-break: keep-all; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 920px; }
.pc { display: inline; }
.eyebrow { font-family: var(--en); font-size: 12px; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }

/* ---------- 헤더 ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 50; background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-word { font-family: var(--en); font-weight: 400; font-size: 20px; letter-spacing: .38em; color: var(--ink); margin-right: -.38em; }
.gnb { display: flex; gap: 34px; }
.gnb a { font-family: var(--en); font-size: 13.5px; font-weight: 400; letter-spacing: .04em; color: var(--muted); position: relative; padding: 4px 0; transition: color .2s; }
.gnb a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.gnb a:hover, .gnb a.is-current { color: var(--ink); }
.gnb a:hover::after, .gnb a.is-current::after { transform: scaleX(1); }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 10px 8px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .2s; }
body.menu-open .menu-btn span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

main { padding-top: var(--header-h); }

/* ---------- 공통 섹션 ---------- */
.section { padding: 140px 0 0; }
.sec-title { font-family: var(--en); font-weight: 300; font-size: 40px; letter-spacing: .01em; color: var(--ink); line-height: 1.2; margin-bottom: 56px; }
.frame { overflow: hidden; background: var(--soft); aspect-ratio: 4 / 3; }
.frame.wide { aspect-ratio: 16 / 7; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.btn-line { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; height: 46px; padding: 0 26px; border: 1px solid var(--ink);
    background: transparent; font-family: var(--en); font-size: 13px; letter-spacing: .12em; color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-solid { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 34px; border: 1px solid var(--ink); background: var(--ink);
    color: #fff; font-size: 14px; letter-spacing: .04em; cursor: pointer; transition: opacity .2s; }
.btn-solid:hover { opacity: .85; }
.btn-solid:disabled { opacity: .5; cursor: wait; }

/* 스크롤 등장 — JS 가 꺼져 있으면 그대로 보인다(.js-on 일 때만 숨김) */
.js-on [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js-on [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; height: calc(100vh - var(--header-h)); min-height: 520px; max-height: 960px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-media { position: absolute; inset: 0; background-size: cover; background-position: center; animation: heroZoom 14s ease-out both; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .35)); }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-copy { position: relative; text-align: center; padding: 0 24px; }
.hero-copy h1 { font-weight: 400; font-size: 34px; line-height: 1.55; color: var(--ink); margin: 18px 0 18px; letter-spacing: -.02em; }
.hero-sub { font-size: 15px; color: var(--text); margin-bottom: 34px; }
.hero .btn-line { background: rgba(255, 255, 255, .7); }
.hero .btn-line:hover { background: var(--ink); }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font-family: var(--en); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); padding-bottom: 44px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 36px; background: var(--muted); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- 메시지 ---------- */
.message-text { text-align: center; font-size: 19px; line-height: 1.9; color: var(--ink); margin-bottom: 64px; font-weight: 300; }

/* ---------- About (지그재그) ---------- */
.zigzag { display: flex; flex-direction: column; gap: 0; }
.zz-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.zz-row .frame { aspect-ratio: 5 / 4; }
.zz-text { padding: 0 64px; }
.zz-row.reverse .frame { order: 2; }
.zz-row.reverse .zz-text { order: 1; text-align: right; }
.zz-text h3 { font-family: var(--en); font-weight: 400; font-size: 22px; letter-spacing: .14em; color: var(--ink); margin-bottom: 20px; }
.zz-text p { color: var(--muted); font-size: 14.5px; }

/* ---------- Portfolio ---------- */
.portfolio .sec-title { margin-bottom: 28px; }
.pf-tabs { display: flex; gap: 26px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.pf-tabs button { border: 0; background: none; padding: 0 0 12px; margin-bottom: -1px; cursor: pointer; font-family: var(--en); font-size: 14px; letter-spacing: .04em;
    color: var(--muted); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.pf-tabs button:hover { color: var(--ink); }
.pf-tabs button.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.pf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 32px; transition: opacity .25s; }
.pf-grid.is-loading { opacity: .35; }
.pf-card { display: block; }
.pf-thumb { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--soft); margin-bottom: 18px; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.pf-card:hover .pf-thumb img { transform: scale(1.04); }
.pf-name { display: block; font-size: 17px; font-weight: 400; color: var(--ink); line-height: 1.5; }
.pf-meta { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.pf-empty { text-align: center; color: var(--muted); padding: 60px 0; }
.pf-more-wrap { text-align: center; margin-top: 64px; }
.pf-more-wrap .btn-line { min-width: 220px; }

/* ---------- Our design ---------- */
.design-media { margin-bottom: 56px; }
.design-media img { width: 100%; aspect-ratio: 16 / 6.5; object-fit: cover; }
.design .sec-title { margin-bottom: 28px; }
.design-copy h3 { font-family: var(--en); font-weight: 400; font-size: 22px; color: var(--ink); margin-bottom: 18px; }
.design-copy p { max-width: 820px; color: var(--muted); }

/* ---------- Business Scope ---------- */
.scope-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.scope-item h3 { font-family: var(--en); font-weight: 400; font-size: 18px; line-height: 1.35; color: var(--ink); min-height: 50px; }
.scope-item p { font-size: 13.5px; color: var(--muted); margin: 12px 0 22px; min-height: 76px; }
.scope-item .frame { aspect-ratio: 4 / 3; }
.scope-item:hover .frame img { transform: scale(1.05); }

/* ---------- Contact ---------- */
.contact { padding-bottom: 140px; }
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 100px; }
.contact-form { display: flex; flex-direction: column; gap: 22px; }
.fld { display: block; }
.fld > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.fld em, .check em { color: var(--accent); font-style: normal; }
.fld input, .fld textarea { width: 100%; border: 0; border-bottom: 1px solid #cfcac2; background: transparent; padding: 8px 0; font-size: 15px; font-weight: 400; outline: none; border-radius: 0; transition: border-color .2s; }
.fld textarea { resize: vertical; min-height: 120px; }
.fld input:focus, .fld textarea:focus { border-bottom-color: var(--ink); }
.fld input::placeholder, .fld textarea::placeholder { color: #bbb5ab; font-weight: 300; }
.fld.has-error input, .fld.has-error textarea { border-bottom-color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 13px; }
.privacy details { background: var(--soft); padding: 12px 16px; margin-bottom: 12px; }
.privacy summary { cursor: pointer; color: var(--text); }
.privacy details p { margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }
.privacy.has-error .check { color: var(--danger); }
.form-msg { min-height: 1.6em; font-size: 13.5px; }
.form-msg.is-error { color: var(--danger); }
.form-msg.is-ok { color: var(--ink); font-weight: 400; }
.contact-form .btn-solid { align-self: flex-end; min-width: 180px; }
.contact-info { display: flex; flex-direction: column; gap: 34px; padding-top: 8px; }
.contact-info h3 { font-family: var(--en); font-weight: 400; font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.contact-info p { font-size: 14px; color: var(--muted); }
.contact-info a:hover { color: var(--ink); }
.contact-note { font-size: 12px !important; color: #b3ada3 !important; }
.contact-done { padding: 48px 32px; background: var(--soft); text-align: center; }
.contact-done h3 { font-family: var(--en); font-weight: 400; font-size: 24px; color: var(--ink); margin-bottom: 10px; }
.contact-done p { color: var(--muted); }

/* ---------- 포트폴리오 상세 ---------- */
.pf-detail { padding: 72px 0 140px; }
.back-link { display: inline-block; font-family: var(--en); font-size: 13px; letter-spacing: .06em; color: var(--muted); margin-bottom: 40px; }
.back-link:hover { color: var(--ink); }
.pd-title { font-weight: 400; font-size: 34px; color: var(--ink); line-height: 1.4; margin-top: 10px; }
.pd-summary { margin-top: 12px; font-size: 16px; color: var(--text); }
.pd-meta { display: flex; flex-wrap: wrap; gap: 0; margin: 36px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-meta > div { padding: 16px 32px 16px 0; margin-right: 32px; }
.pd-meta dt { font-family: var(--en); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.pd-meta dd { margin: 2px 0 0; color: var(--ink); font-weight: 400; }
.pd-desc { white-space: pre-line; margin-top: 36px; color: var(--text); }
.pd-images { display: flex; flex-direction: column; gap: 24px; margin-top: 64px; }
.pd-images .frame { aspect-ratio: auto; background: none; }
.pd-images .frame img { height: auto; }
.pd-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; margin-top: 88px; padding-top: 32px; border-top: 1px solid var(--line); }
.pd-prev, .pd-next { display: flex; flex-direction: column; min-width: 0; }
.pd-next { text-align: right; }
.pd-prev span, .pd-next span { font-family: var(--en); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pd-prev strong, .pd-next strong { font-weight: 400; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-prev.is-empty strong, .pd-next.is-empty strong { color: #c2bcb2; }
a.pd-prev:hover strong, a.pd-next:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.pd-list { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pd-list:hover { color: var(--ink); }

/* ---------- 푸터 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--en); font-size: 13px; letter-spacing: .16em; color: var(--ink); }
.footer-info { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.footer-right { text-align: right; }
.footer-right a { font-family: var(--en); font-size: 13px; letter-spacing: .06em; color: var(--text); }
.footer-right a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.copy { font-family: var(--en); font-size: 12px; color: #b3ada3; margin-top: 6px; }
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line); color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .3s; }
.to-top.is-show { opacity: 1; pointer-events: auto; }

/* ---------- 오류 페이지 ---------- */
.err { min-height: calc(100vh - var(--header-h) - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 80px 24px; }
.err .code { font-family: var(--en); font-weight: 300; font-size: 72px; color: var(--ink); line-height: 1; }
.err p { color: var(--muted); }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
    :root { --gutter: 28px; }
    .scope-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 28px; }
    .zz-text { padding: 0 40px; }
    .contact-grid { gap: 56px; }
}
@media (max-width: 768px) {
    :root { --header-h: 64px; --gutter: 20px; }
    body { font-size: 14.5px; }
    .pc { display: none; }
    .menu-btn { display: flex; }
    /* ⚠️ backdrop-filter 는 fixed 자식의 기준 상자를 헤더로 바꾼다 → 메뉴판이 헤더 높이로 잘려 투명해진다. 모바일은 끈다 */
    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
    .gnb { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; gap: 0; padding: 24px var(--gutter);
        transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
    body.menu-open { overflow: hidden; }
    body.menu-open .gnb { opacity: 1; transform: none; pointer-events: auto; }
    .gnb a { font-size: 22px; font-weight: 300; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); }
    .gnb a::after { display: none; }
    .section { padding-top: 96px; }
    .sec-title { font-size: 30px; margin-bottom: 36px; }
    .hero { height: calc(100svh - var(--header-h)); min-height: 480px; }
    .hero-copy h1 { font-size: 24px; }
    .hero-sub { font-size: 14px; }
    .message-text { font-size: 16px; margin-bottom: 40px; }
    .frame.wide { aspect-ratio: 4 / 3; }
    .zz-row, .zz-row.reverse { grid-template-columns: 1fr; }
    .zz-row.reverse .frame { order: 0; }
    .zz-row.reverse .zz-text { order: 1; text-align: left; }
    .zz-text { padding: 28px 0 48px; }
    .pf-tabs { gap: 20px; overflow-x: auto; }
    .pf-tabs button { white-space: nowrap; }
    .pf-grid { gap: 36px 14px; }
    .pf-name { font-size: 14.5px; }
    .pf-meta { font-size: 12px; }
    .design-media img { aspect-ratio: 4 / 3; }
    .scope-grid { grid-template-columns: 1fr; gap: 44px; }
    .scope-item h3, .scope-item p { min-height: 0; }
    .contact { padding-bottom: 96px; }
    .contact-grid { grid-template-columns: 1fr; gap: 56px; }
    .contact-form .btn-solid { align-self: stretch; }
    .pf-detail { padding-top: 40px; }
    .pd-title { font-size: 26px; }
    .pd-meta > div { padding: 12px 0; margin-right: 28px; }
    .pd-images { gap: 12px; margin-top: 40px; }
    .pd-nav { grid-template-columns: 1fr 1fr; }
    .pd-list { grid-column: 1 / -1; grid-row: 2; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-right { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-media, .scroll-cue::after { animation: none; }
    .js-on [data-reveal] { opacity: 1; transform: none; transition: none; }
}
