@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@1,6..96,400&family=Cormorant+Garamond:ital,wght@0,500;1,500&family=Noto+Serif+KR:wght@400;500&family=Pretendard:wght@400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  --bg: #ffffff;
  --soft: #f6f5f2;
  --ink: #161616;
  --sub: #8a8a8a;
  --line: #e6e4df;
  --accent: #7a2e2e;
  --serif: 'Cormorant Garamond', 'Noto Serif KR', serif;
  --serif-ko: 'Noto Serif KR', serif;
  --sans: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; letter-spacing: -.01em; word-break: keep-all; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.wrap { width: min(1280px, 100% - 64px); margin: 0 auto; }
.narrow { width: min(620px, 100% - 40px); margin: 0 auto; }
@media (max-width: 700px) { .wrap { width: calc(100% - 40px); } }
.eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.eyebrow::before { content: ''; width: 44px; height: 1px; background: var(--ink); }

/* ---------- header ---------- */
header.site { position: sticky; top: 0; z-index: 30; background: rgba(250, 249, 246, .92); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
header.site.solid { border-color: var(--line); }
header.site .wrap { display: flex; align-items: center; height: 72px; gap: 48px; }
.logo { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 28px; line-height: 1; white-space: nowrap; }
header.site nav { display: flex; gap: 30px; font-size: 15px; }
header.site nav a { position: relative; padding: 4px 0; }
header.site nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: currentColor; transform: scaleX(0); transition: transform .25s; }
header.site nav a:hover::after { transform: scaleX(1); }
header.site .cta { margin-left: auto; }
@media (max-width: 700px) { header.site .wrap { gap: 20px; height: 60px; } .logo { font-size: 23px; } header.site nav { gap: 18px; font-size: 14px; } header.site .cta { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 30px; background: var(--ink); color: #fff; border: 0; font: inherit; font-weight: 500; cursor: pointer; transition: background .2s; }
.btn:hover { background: #333; }
.btn.white { background: #fff; color: var(--ink); }
.btn.white:hover { background: #eee; }
.btn.small { height: 38px; padding: 0 18px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn:disabled { opacity: .45; cursor: wait; }
.pill { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border: 1px solid currentColor; font-size: 13px; }

/* ---------- hero: 이미지 한 장 ---------- */
body { background: #faf9f6; }
.hero { position: relative; background: #f3f2f3; overflow: hidden; }
.hero-copy { position: absolute; left: max(32px, calc((100% - 1280px) / 2)); top: 50%; transform: translateY(-50%); color: #3d3532; }
.hero .dear { font-family: 'Bodoni Moda', 'Cormorant Garamond', serif; font-style: italic; font-weight: 400; font-size: clamp(28px, 2.7vw, 44px); line-height: 1; letter-spacing: .01em; margin: 0 0 clamp(18px, 2vw, 30px); display: flex; align-items: baseline; gap: .18em;
  opacity: 0; animation: rise 1s .3s cubic-bezier(.2,.7,.2,1) forwards; }
.hero .dear .dot { margin-left: -.18em; }
.hero .dear .blank { display: inline-block; width: 0; height: 1px; background: #3d3532; transform: translateY(-.08em); animation: write 1.4s 1s cubic-bezier(.6,0,.2,1) forwards; }
@keyframes write { to { width: clamp(80px, 7vw, 130px); } }
.hero .sub { font-family: var(--serif-ko); font-size: clamp(14px, 1.2vw, 19px); line-height: 1.85; letter-spacing: -.02em; color: #5b524e; margin: 0 0 clamp(26px, 3vw, 46px); opacity: 0; animation: rise 1s .7s forwards; }
.hero .more { display: inline-flex; gap: 8px; align-items: center; font-size: 10.5px; font-weight: 500; letter-spacing: .18em; color: #3d3532; padding-bottom: 6px; border-bottom: 1px solid #3d3532; opacity: 0; animation: rise 1s 1s forwards; }
.hero .more span { transition: transform .25s; } .hero .more:hover span { transform: translateX(5px); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero img { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; animation: herofade 1.2s ease-out both; }
@keyframes herofade { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.hero .ai-note { position: absolute; right: 16px; bottom: 10px; margin: 0; font-size: 8px; letter-spacing: -.01em; color: rgba(60, 53, 50, .5); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) { .hero img { aspect-ratio: 4 / 3; object-position: 72% center; } .hero-copy { position: static; transform: none; padding: 34px 20px 50px; } .hero .ai-note { bottom: auto; top: calc(75vw + 6px); right: 20px; font-size: 8px; } }

/* ---------- 카테고리: 타이포그래피 ---------- */
.lines { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.cat { padding: 44px 34px 48px 0; cursor: pointer; position: relative; transition: background .3s; }
.cat + .cat { padding-left: 34px; border-left: 1px solid var(--line); }
.cat .no { font-family: var(--serif); font-size: 15px; color: #999; }
.cat h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(42px, 4.6vw, 72px); line-height: 1; margin: 18px 0 14px; letter-spacing: -.02em; transition: color .3s, font-style .3s; }
.cat:hover h3 { color: var(--accent); font-style: italic; }
.cat .ko { font-family: var(--serif-ko); font-size: 17px; margin: 0 0 6px; }
.cat p { margin: 0; color: #777; font-size: 14px; }
@media (max-width: 860px) { .lines { grid-template-columns: 1fr; } .cat, .cat + .cat { padding: 30px 0; border-left: 0; border-top: 1px solid var(--line); } .cat:first-child { border-top: 0; } }

/* ---------- sections ---------- */
section { padding: 130px 0 0; }
.intro h2 { font-family: var(--serif-ko); font-weight: 400; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.5; margin: 22px 0 0 54px; }
.intro p { margin: 18px 0 0 54px; color: #555; max-width: 560px; }
@media (max-width: 700px) { .intro h2, .intro p { margin-left: 0; } }

/* ---------- portfolio ---------- */
.p-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; border-bottom: 1px solid var(--ink); padding-bottom: 20px; margin-bottom: 26px; }
.p-head h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 4vw, 56px); line-height: 1; margin: 0; }
.p-head h2 small { display: block; font-family: var(--sans); font-size: 15px; color: var(--sub); margin-top: 10px; font-weight: 400; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; transition: all .2s; }
.chips button:hover { border-color: var(--ink); }
.chips button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips button em { font-style: normal; opacity: .55; margin-left: 4px; font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px 14px; }
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 8px; } }
.tile { cursor: zoom-in; animation: fade .5s both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.grid { grid-auto-flow: dense; }
.tile.wide { grid-column: span 2; }
.tile { display: flex; flex-direction: column; }
.tile.wide .img { aspect-ratio: 1.6; }
.tile .img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.tile:hover img { transform: scale(1.05); }
.tile p { margin: 10px 0 0; font-family: var(--serif); font-size: 15px; color: #555; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(255,255,255,.97); display: none; place-items: center; }
.lightbox.show { display: grid; }
.lightbox img { max-width: 90vw; max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border: 0; background: none; font-size: 28px; cursor: pointer; }
.lightbox .prev { left: 2vw; } .lightbox .next { right: 2vw; }
.lightbox .close { top: 32px; right: 2vw; transform: none; font-size: 22px; }
.lightbox .count { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--sub); }

/* ---------- order ---------- */
.order-wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
.order-wrap .aside { position: sticky; top: 110px; }
.order-wrap .aside h2 { font-family: var(--serif-ko); font-weight: 400; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.45; margin: 22px 0 18px; }
.order-wrap .aside p { color: #555; margin: 0 0 8px; }
.order-wrap .aside ol { list-style: none; padding: 0; margin: 30px 0 0; border-top: 1px solid var(--line); }
.order-wrap .aside li { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.order-wrap .aside li b { font-family: var(--serif); font-weight: 500; font-size: 16px; width: 22px; }
@media (max-width: 860px) { .order-wrap { grid-template-columns: 1fr; } .order-wrap .aside { position: static; } }

.form { display: grid; gap: 28px; }
.field label.f, .legend { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.req { color: var(--accent); }
.hint { color: var(--sub); font-size: 12px; margin-top: 6px; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .row2 { grid-template-columns: 1fr; } }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; height: 50px; border: 1px solid var(--line); background: #fff; padding: 0 16px; font: inherit; color: var(--ink); border-radius: 0; transition: border-color .2s;
}
textarea { height: auto; min-height: 150px; padding: 14px 16px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.types input { position: absolute; opacity: 0; pointer-events: none; }
.types label { display: block; border: 1px solid var(--line); padding: 16px; cursor: pointer; transition: all .2s; }
.types label b { display: block; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.types label span { font-size: 12.5px; color: var(--sub); }
.types input:checked + label { border-color: var(--ink); background: var(--ink); color: #fff; }
.types input:checked + label span { color: #ccc; }
.types input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) { .types { grid-template-columns: 1fr; } }
.drop { border: 1px dashed #c9c6bf; padding: 28px; text-align: center; color: var(--sub); cursor: pointer; font-size: 14px; transition: all .2s; }
.drop:hover, .drop.over { border-color: var(--ink); color: var(--ink); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.previews .pv { position: relative; width: 76px; height: 76px; background: var(--soft); }
.previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.previews .pv button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; line-height: 1; }
.consent { background: var(--soft); padding: 18px 20px; font-size: 13px; color: #555; }
.consent ul { margin: 6px 0 12px; padding-left: 18px; }
.consent label { color: var(--ink); cursor: pointer; }
.hp { position: absolute; left: -9999px; }
.msg { display: none; padding: 10px 0; font-size: 14px; }
.msg.show { display: block; }
.msg.err { color: #b3261e; } .msg.ok { color: #2f6b2f; }
.done { text-align: center; padding: 60px 20px; border: 1px solid var(--line); }
.done .num { font-family: var(--serif); font-size: 34px; letter-spacing: .06em; margin: 14px 0; }
.center { text-align: center; }

/* ---------- footer ---------- */
footer.site { margin-top: 160px; border-top: 1px solid var(--line); padding: 50px 0 60px; font-size: 13px; color: var(--sub); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
footer.site .logo { color: var(--ink); font-size: 24px; margin-bottom: 14px; }
footer.site .links { display: flex; gap: 20px; color: var(--ink); }

/* ---------- sub pages (조회 · 관리자) ---------- */
body.sub header.site { color: var(--ink); background: #fff; border-color: var(--line); position: sticky; }
.page-head { padding: 80px 0 40px; text-align: center; }
.page-head h1 { font-family: var(--serif-ko); font-weight: 400; font-size: 30px; margin: 0; }
.page-head p { color: var(--sub); margin: 8px 0 0; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; font-size: 12px; font-weight: 500; border: 1px solid currentColor; }
.badge.in_production, .badge.shipping { color: var(--accent); } .badge.done { color: #2f6b2f; } .badge.cancelled { color: #aaa; }
.steps { display: flex; margin: 30px 0 22px; gap: 4px; }
.steps .t { flex: 1; font-size: 11.5px; color: #aaa; padding-top: 10px; border-top: 2px solid #ddd; }
.steps .t.on { border-color: #999; color: var(--sub); } .steps .t.now { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.kv td:first-child { color: var(--sub); width: 130px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: 22px; font-weight: 600; margin: 0; } .sec-head h2 small { color: var(--sub); font-weight: 400; font-size: 14px; margin-left: 8px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-width: 160px; height: 40px; }
details.order { border-bottom: 1px solid var(--line); }
details.order > summary { list-style: none; cursor: pointer; padding: 16px 0; display: grid; grid-template-columns: 170px 1fr auto; gap: 14px; align-items: center; }
details.order .detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 6px 0 24px; }
details.order dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; }
details.order dt { color: var(--sub); } details.order dd { margin: 0; white-space: pre-wrap; }
details.order .photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
details.order .photos img { width: 96px; height: 96px; object-fit: cover; }
details.order .edit { display: grid; gap: 16px; }
details.order .edit textarea { min-height: 70px; }
@media (max-width: 760px) { details.order .detail { grid-template-columns: 1fr; } details.order > summary { grid-template-columns: 1fr auto; } details.order > summary .who { display: none; } }

#order { scroll-margin-top: 80px; }
