/* 여러 페이지 구성용 스타일 (site.css 다음에 로드) */

/* ---------- 공통 ---------- */
.nav a.active:not(.btn)::after { transform: scaleX(1); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--ink); margin-top: 28px; }
.btn-light:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--text); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: 15px; color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 5px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.checks li:nth-child(even)::before { background: var(--cyan); }

.page-hero { padding: 88px 0 72px; }
.page-hero h1 { margin: 0 0 20px; font-size: clamp(34px, 5.4vw, 60px); line-height: 1.2; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.page-hero .lead { max-width: 680px; }
.page-hero .lead b { color: var(--ink); font-weight: 600; }

/* ---------- 포트폴리오 목록 ---------- */
.pf-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.pf-filters button { height: 40px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.pf-filters button:hover { background: var(--paper-2); }
.pf-filters button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.pf-list { padding-bottom: 120px; }
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.pf-card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.pf-card[hidden] { display: none; }
.pf-card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); }
.pf-sample { margin-left: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; background: var(--ink); color: var(--white); padding: 3px 9px; border-radius: 999px; }
.pf-meta { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; border-top: 1.5px solid var(--ink); }
.pf-meta > span { font-size: 13px; color: var(--muted); }
.pf-meta h3 { margin: 0; font-size: 19px; font-weight: 600; color: var(--ink); }
.pf-meta p { margin: 0 0 10px; font-size: 14.5px; color: var(--muted); }
.pf-meta .tags { margin-top: auto; }

[hidden] { display: none !important; }
.pf-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 12px; padding: 64px 24px; text-align: center; background: var(--white); border: 1.5px dashed var(--ink); border-radius: 22px; }
.pf-empty img { width: 180px; height: auto; animation: float 3s ease-in-out infinite; margin-bottom: 8px; }
.pf-empty h3 { margin: 0; font-size: 22px; font-weight: 600; color: var(--ink); }
.pf-empty p { margin: 0 0 12px; max-width: 420px; font-size: 15px; color: var(--muted); }

/* 기기 프레임 */
.frame { aspect-ratio: 16 / 11; display: flex; flex-direction: column; background: var(--white); overflow: hidden; }
.frame-bar { flex: none; height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--ink); }
.frame-bar i { width: 8px; height: 8px; border-radius: 50%; background: #55585D; }
.frame-bar i:first-child { background: var(--orange); }
.frame-bar i:nth-child(2) { background: var(--cyan); }
.frame-bar span { margin-left: 10px; flex: 1; max-width: 220px; height: 16px; line-height: 16px; padding: 0 10px; border-radius: 8px; background: #34363B; color: #A3A6AA; font-size: 10.5px; overflow: hidden; white-space: nowrap; }
.frame-bar span:empty { display: none; }
.shot { flex: 1; min-height: 0; overflow: hidden; container-type: size; background: var(--white); }
.shot img { width: 100%; height: auto; transition: transform 5s ease-in-out; }
.pf-card:hover .shot img, .pf-card.play .shot img { transform: translateY(calc(-100% + 100cqh)); }
.frame.phones { flex-direction: row; align-items: flex-end; justify-content: center; gap: 7%; padding: 9% 0 0; background: var(--tint); }
.phone { width: 27%; height: 100%; display: flex; border: 2px solid var(--ink); border-bottom: 0; border-radius: 20px 20px 0 0; overflow: hidden; background: var(--white); }
.frame.phones .phone:last-child { height: 86%; }

/* ---------- 포트폴리오 상세 ---------- */
.pd-hero { padding-bottom: 48px; }
.pd-hero .back { display: block; width: fit-content; margin-bottom: 28px; font-size: 14px; font-weight: 500; color: var(--muted); }
.pd-hero .back:hover { color: var(--ink); }
.pd-hero h1 { font-size: clamp(30px, 4.6vw, 52px); }
.pd-facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 48px; margin: 36px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.pd-facts dt { font-size: 13px; color: var(--muted); }
.pd-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.pd-hero .btn { margin-top: 28px; }
.pf-notice { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); text-align: center; }
.pf-notice.sample { margin: 0 0 16px; padding: 12px 16px; border: 1.5px dashed var(--ink); border-radius: 12px; background: var(--white); color: var(--text); }
.pd-screens { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 40px; align-items: end; padding: 48px; border-radius: 24px; background: var(--tint); border: 1.5px solid var(--ink); }
.pd-screens.app { grid-template-columns: repeat(2, minmax(0, 270px)); justify-content: center; align-items: center; }
.frame.big { aspect-ratio: 16 / 10.6; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 8px 8px 0 var(--ink); }
.phone.big { width: auto; height: auto; aspect-ratio: 9 / 18.5; border: 2px solid var(--ink); border-radius: 30px; box-shadow: 6px 6px 0 var(--ink); }
.shot.scroll { overflow-x: hidden; overflow-y: auto; container-type: normal; overscroll-behavior: contain; scrollbar-width: thin; }
.shot.scroll:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; }
.shot.scroll img { transition: none; }

.pd-story .wrap { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.story { display: grid; gap: 40px; }
.story article { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
.story .num { grid-row: span 2; font-size: 14px; font-weight: 700; color: var(--orange); padding-top: 6px; }
.story article:nth-child(2) .num { color: var(--cyan); }
.story h2 { margin: 0 0 8px; font-size: 24px; font-weight: 600; color: var(--ink); }
.story p { margin: 0; font-size: 16.5px; color: var(--text); }
.pd-side { display: grid; gap: 32px; padding: 32px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 18px; position: sticky; top: calc(var(--header-h) + 24px); }
.pd-side h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--ink); }

.pd-ba { background: var(--paper-2); }
.ba { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border: 2px solid var(--ink); border-radius: 18px; background: var(--white); box-shadow: 8px 8px 0 var(--ink); }
.ba img { position: absolute; top: 0; left: 0; width: 100%; height: auto; max-width: none; }
.ba-before { position: absolute; inset: 0; background: #D7D7D7; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-tag { position: absolute; top: 14px; font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--white); pointer-events: none; }
.ba-tag.l { left: 14px; }
.ba-tag.r { right: 14px; background: var(--orange); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: var(--ink); pointer-events: none; }
.ba-handle i { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); }
.ba-handle i::before, .ba-handle i::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-top: 2.5px solid #fff; border-left: 2.5px solid #fff; }
.ba-handle i::before { left: 10px; transform: translateY(-50%) rotate(-45deg); }
.ba-handle i::after { right: 10px; transform: translateY(-50%) rotate(135deg); }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba:has(input:focus-visible) { outline: 3px solid var(--cyan); outline-offset: 3px; }

.pd-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 40px 0 100px; }
.pd-nav a { font-weight: 600; color: var(--ink); }
.pd-nav a small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.pd-nav a.next { text-align: right; }
.pd-nav a.all { padding: 10px 22px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 14px; }
.pd-nav a.all:hover { background: var(--ink); color: var(--white); }
.pd-stage + .block { padding-top: 96px; }

/* ---------- 회사소개 ---------- */
.about-story { padding-top: 24px; }
.about-story .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; }
.about-visual { position: relative; aspect-ratio: 1 / 1; border: 1.5px solid var(--ink); border-radius: 24px; background: var(--white); display: grid; place-items: center; overflow: hidden; box-shadow: 8px 8px 0 var(--ink); }
.about-visual .grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(140,143,148,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(140,143,148,.16) 1px, transparent 1px); background-size: 24px 24px; }
.about-visual img { position: relative; width: 74%; animation: float 3s ease-in-out infinite; }
.about-text p { margin: 0 0 16px; font-size: 17px; color: var(--text); }
.about-text .checks { margin-top: 28px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.principles article { padding: 32px 28px; background: var(--white); border: 1.5px solid var(--ink); border-radius: 18px; }
.principles b { font-size: 14px; color: var(--orange); }
.principles article:nth-child(2) b { color: var(--cyan); }
.principles h3 { margin: 10px 0 10px; font-size: 21px; font-weight: 600; color: var(--ink); }
.principles p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- 서비스 ---------- */
.svc-detail-sec { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.svc-detail .num { font-size: 14px; font-weight: 700; color: var(--orange); }
.svc-detail:nth-of-type(even) .num { color: var(--cyan); }
.svc-detail h3 { margin: 6px 0 10px; font-size: 26px; font-weight: 600; color: var(--ink); }
.svc-detail p { margin: 0 0 14px; font-size: 16px; color: var(--text); }
.svc-detail small { display: block; font-size: 13.5px; color: var(--muted); }
.svc-detail .checks { grid-template-columns: repeat(2, 1fr); align-content: start; gap: 14px 24px; }

/* ---------- 문의 ---------- */
.contact-page { padding-bottom: 120px; }
.contact-page .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.c-form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 44px); background: var(--white); border: 1.5px solid var(--ink); border-radius: 22px; }
.c-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.c-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.c-form em { font-style: normal; color: var(--orange); }
.c-form input, .c-form select, .c-form textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); font: inherit; font-size: 16px; font-weight: 400; color: var(--text); transition: border-color .2s, background .2s; }
.c-form textarea { resize: vertical; min-height: 140px; }
.c-form input:focus, .c-form select:focus, .c-form textarea:focus { outline: none; border-color: var(--ink); background: var(--white); }
.c-form .btn { justify-self: start; height: 50px; padding: 0 28px; }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }
.form-note a { color: var(--orange); text-decoration: underline; }
.c-side { display: grid; gap: 20px; }
.c-card { padding: 30px 28px; border-radius: 22px; background: var(--orange); color: var(--white); display: grid; gap: 12px; }
.c-card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.c-card a, .c-card > div { display: block; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); font-weight: 500; word-break: break-all; }
.c-card a:hover { background: rgba(255,255,255,.24); }
.c-card small { display: block; font-size: 12px; font-weight: 400; opacity: .85; }
.c-card.light { background: var(--white); color: var(--text); border: 1.5px solid var(--ink); }
.c-card.light h2 { color: var(--ink); }
.c-card ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-story .wrap { grid-template-columns: 1fr; gap: 40px; }
  .pd-side { position: static; grid-template-columns: 1fr 1fr; }
  .pd-facts { grid-template-columns: repeat(2, auto); }
  .about-story .wrap { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { max-width: 460px; aspect-ratio: 4 / 3; }
  .principles { grid-template-columns: 1fr; }
  .contact-page .wrap { grid-template-columns: 1fr; }
  .pd-screens { padding: 32px; gap: 28px; grid-template-columns: minmax(0, 1fr) 180px; }
}
@media (max-width: 820px) {
  .nav a.active:not(.btn) { color: var(--orange); }
  .svc-detail { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .page-hero { padding: 56px 0 48px; }
  .pf-grid { grid-template-columns: 1fr; }
  .pf-list, .contact-page { padding-bottom: 80px; }
  .pd-screens { grid-template-columns: 1fr; padding: 20px; }
  .pd-screens:not(.app) .phone.big { width: 62%; justify-self: center; }
  .pd-screens.app { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .phone.big { border-radius: 22px; }
  .frame.big, .ba { box-shadow: 5px 5px 0 var(--ink); }
  .pd-side { grid-template-columns: 1fr; padding: 24px; }
  .pd-facts { gap: 12px 28px; }
  .pd-nav { grid-template-columns: 1fr 1fr; padding-bottom: 72px; }
  .pd-nav a.all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .svc-detail .checks { grid-template-columns: 1fr; }
  .c-form .row2 { grid-template-columns: 1fr; }
  .c-form .btn { justify-self: stretch; }
  .ba-handle i { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .ba-handle i::before { left: 7px; }
  .ba-handle i::after { right: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .shot img { transition: none; }
  .about-visual img { animation: none; }
}
