/* 예은 디지털 사역 쇼케이스 — Slate (모던 SaaS / 균일 카드, 설명 전용) */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e6ebf1;
  --line-2: #d5dde6;
  --accent: #4f46e5;
  --accent-2: #0ea5e9;
  --accent-deep: #3730a3;
  --sans: "Pretendard", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 28px -20px rgba(15,23,42,.5);
  --shadow-h: 0 2px 4px rgba(15,23,42,.06), 0 26px 46px -22px rgba(15,23,42,.55);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Masthead ---------- */
.masthead { padding: 60px 0 26px; }
.masthead .kicker {
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 18px;
}
.masthead h1 {
  font-size: clamp(30px, 5.2vw, 52px); font-weight: 800;
  letter-spacing: -.028em; line-height: 1.08; margin: 0 0 16px;
}
.masthead h1 em {
  font-style: normal;
  background: linear-gradient(92deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.masthead .lede { max-width: 620px; font-size: 16.5px; color: var(--muted); margin: 0; }
.masthead .meta-row {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.masthead .meta-row b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.disclaimer {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-deep); background: #eef0fe; border: 1px solid #dfe1fb;
  padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.disclaimer svg { width: 13px; height: 13px; }

/* ---------- Filter bar ---------- */
.filterbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px) saturate(1.1); border-bottom: 1px solid var(--line);
}
.filterbar .inner { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 11px 0; }
.filter {
  appearance: none; border: 1px solid transparent; background: transparent; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; transition: color .18s, background .18s;
}
.filter:hover { color: var(--ink); background: rgba(15,23,42,.045); }
.filter[aria-pressed="true"] { color: #fff; background: var(--ink); }
.filter .n { font-size: 11px; opacity: .55; margin-left: 5px; font-variant-numeric: tabular-nums; }
.filter:focus-visible, .card:focus-visible, .btn:focus-visible, .closex:focus-visible {
  outline: 2.5px solid var(--accent); outline-offset: 2px;
}
.count { margin-left: auto; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Grid (균일 카드) ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; padding: 30px 0 24px;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  box-shadow: var(--shadow); text-align: left;
  transition: transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-h); }
.thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eef2f7; border-bottom: 1px solid var(--line); }
/* 진행상태 배지 (전체 뷰 구분용) */
.pbadge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  font-size: 11px; font-weight: 700; letter-spacing: -.01em;
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(3px);
  border: 1px solid transparent;
}
.pbadge[data-p="진행 중"] { background: rgba(79,70,229,.92); color: #fff; }
.pbadge[data-p="진행 완료"] { background: rgba(22,101,52,.92); color: #fff; }
.pbadge[data-p="진행 예정"] { background: rgba(180,83,9,.92); color: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.card[data-focus="center"] .thumb img { object-position: center; }
.card:hover .thumb img { transform: scale(1.04); }
.body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.crow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.name { font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; color: var(--accent); }
.status { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; display: block; }
.status.arch i { background: #94a3b8; }
.card h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.28; margin: 0; }
.tag { font-size: 13.5px; color: var(--muted); margin: 0; }
.foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span, .chip { font-size: 10.5px; color: #475569; background: #f1f5f9; border-radius: 6px; padding: 3px 8px; }
.access { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .card.reveal { opacity: 0; transform: translateY(12px); }
  .card.in { opacity: 1; transform: none; transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
}

/* ---------- Detail overlay ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: rgba(15,23,42,.5); backdrop-filter: blur(4px); padding: 4vh 18px; overflow-y: auto;
}
.overlay.open { display: block; }
.sheet {
  max-width: 760px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; position: relative;
  box-shadow: 0 50px 100px -30px rgba(15,23,42,.6); animation: rise .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.sheet-head { padding: 30px 34px 0; }
.sheet-head .name { font-family: ui-monospace, monospace; font-size: 12px; color: var(--accent); }
.sheet-head h2 { font-size: 26px; font-weight: 800; margin: 8px 0 4px; line-height: 1.16; letter-spacing: -.02em; }
.sheet-head .tagline { font-size: 16px; color: var(--accent-deep); margin: 0; font-weight: 600; }
/* 실제 비율 그대로 — 전체 화면이 잘리지 않게 */
.shot-wrap { padding: 22px 34px 4px; }
.shot-wrap img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 12px; background: #eef2f7; box-shadow: 0 18px 40px -26px rgba(15,23,42,.5); }
.shot-wrap.mobile { display: flex; justify-content: center; }
.shot-wrap.mobile img { width: auto; max-width: 260px; max-height: 560px; border-radius: 26px; border: 8px solid #0f172a; box-shadow: 0 24px 50px -22px rgba(15,23,42,.55); }
.sheet-body { padding: 18px 34px 4px; }
.sheet-body p.body { font-size: 15px; color: var(--ink-soft); line-height: 1.72; margin: 0 0 20px; }
/* 개조식 도트 불릿 (설명에 줄바꿈 있으면 각 줄이 항목) */
.sheet-body .body-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sheet-body .body-list li { position: relative; padding-left: 17px; font-size: 15px; color: var(--ink-soft); line-height: 1.6; }
.sheet-body .body-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
/* 편집 중 설명 — 줄바꿈 보이게 */
.sheet.is-editing .body.editable { white-space: pre-wrap; min-height: 4em; }
.dl { display: grid; grid-template-columns: 76px 1fr; gap: 10px 16px; font-size: 13.5px; padding-top: 18px; border-top: 1px solid var(--line); }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--ink); }
.dl .chips span { background: #f1f5f9; }
.sheet .actions { padding: 18px 34px 30px; display: flex; gap: 12px; align-items: center; }
.btn { font-family: var(--sans); font-size: 14px; border-radius: 10px; padding: 11px 20px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: #fff; transition: .18s; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); font-weight: 500; }
.btn.ghost:hover { background: rgba(15,23,42,.045); }
.btn.disabled { opacity: .5; cursor: default; border-color: var(--line); background: transparent; color: var(--muted); }
.closex { position: absolute; top: 16px; right: 18px; z-index: 5; background: rgba(255,255,255,.85); border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 50%; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.closex:hover { background: #fff; }
.closex svg { width: 16px; height: 16px; }

/* ---------- 상세 갤러리(여러 화면 넘기기) ---------- */
.shot-wrap.has-gallery { position: relative; }
.shot-wrap .gnav {
  position: absolute; top: calc(50% - 14px); transform: translateY(-50%); z-index: 4;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.92); color: var(--ink);
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 6px 18px -8px rgba(15,23,42,.5); transition: background .15s, transform .15s;
}
.shot-wrap .gnav:hover { background: #fff; }
.shot-wrap .gnav.prev { left: 46px; }
.shot-wrap .gnav.next { right: 46px; }
.shot-wrap .gmeta { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.shot-wrap .gcap { font-size: 13px; font-weight: 700; color: var(--accent-deep); }
.shot-wrap .gdots { display: inline-flex; gap: 7px; }
.shot-wrap .gdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); cursor: pointer; transition: background .15s, transform .15s; }
.shot-wrap .gdots i.on { background: var(--accent); transform: scale(1.15); }

/* ---------- 편집 모드 ---------- */
.sheet.is-editing [contenteditable] {
  outline: none; border-radius: 8px;
  box-shadow: 0 0 0 2px var(--accent); background: #fff;
  padding: 4px 8px; margin-left: -8px; margin-right: -8px;
  transition: box-shadow .15s;
}
.sheet.is-editing #ed-title { min-height: 1em; }
.sheet.is-editing [contenteditable]:focus { box-shadow: 0 0 0 2px var(--accent), 0 6px 20px -8px rgba(79,70,229,.5); }
.edit-hint { margin: 4px 34px 0; font-size: 12.5px; color: var(--muted); background: #eef0fe; border: 1px solid #dfe1fb; border-radius: 8px; padding: 8px 12px; }
.edit-hint b { color: var(--accent-deep); }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px; z-index: 80; opacity: 0; pointer-events: none;
  box-shadow: 0 18px 40px -16px rgba(15,23,42,.6); transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
footer { margin-top: 44px; padding: 38px 0 60px; border-top: 1px solid var(--line-2); }
footer .fwrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: baseline; }
footer .brand { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
footer .note { font-size: 12.5px; color: var(--muted); max-width: 540px; line-height: 1.6; }

@media (max-width: 720px) {
  .sheet-head { padding: 24px 22px 0; }
  .shot-wrap { padding: 16px 22px 0; }
  .sheet-body, .sheet .actions { padding-left: 22px; padding-right: 22px; }
  .masthead { padding-top: 40px; }
}
