:root {
  --paper: #F3F2EE;
  --paper-2: #EAE8E2;
  --ink: #1C1D20;
  --text: #2B2D31;
  --muted: #6B6E73;
  --line: #D6D4CE;
  --orange: #E95B1A;
  --orange-t: #FBE3D6;
  --cyan: #3FAFCB;
  --cyan-t: #DCF0F5;
  --white: #FFFFFF;
  --header-h: 68px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; background: var(--paper); color: var(--text); font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; line-height: 1.6; word-break: keep-all; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 헤더 ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(243,242,238,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 26px; width: auto; }
.nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav a:not(.btn) { color: var(--text); position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .2s; }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1.5px solid var(--ink); transition: background .2s, color .2s, transform .2s; cursor: pointer; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--white); }
.btn-primary:hover { background: #d44f13; border-color: #d44f13; }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.nav .btn { height: 38px; padding: 0 18px; font-size: 14px; }

/* ---------- 히어로 (기존 캔버스 그대로) ---------- */
.hero { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - var(--header-h)); max-height: calc(100svh - var(--header-h)); margin: 0 auto; overflow: hidden; }
.hero canvas { display: block; width: 100%; height: 100%; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 8px 24px 0; opacity: 0; transform: translateY(8px); transition: opacity .6s, transform .6s; }
.hero-cta.show { opacity: 1; transform: none; }

/* ---------- 공통 섹션 ---------- */
section.block { padding: 120px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
h2.title { margin: 0 0 16px; font-size: clamp(28px, 4vw, 44px); line-height: 1.25; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.lead { margin: 0; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 620px; }
.sec-head { margin-bottom: 56px; }
.sec-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---------- 소개 수치 ---------- */
.intro { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.intro .wrap { display: grid; grid-template-columns: 1.2fr 2fr; gap: 48px; padding-top: 72px; padding-bottom: 72px; align-items: center; }
.intro p.big { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.45; font-weight: 600; color: var(--ink); }
.intro p.big em { font-style: normal; color: var(--orange); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { border-left: 2px solid var(--ink); padding-left: 18px; }
.stat b { display: block; font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); }

/* ---------- 서비스 ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.svc { background: var(--white); border: 1.5px solid var(--ink); border-radius: 18px; padding: 32px 26px 28px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s, box-shadow .25s; }
.svc:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--ink); }
.svc .ill { margin: -8px -6px 4px; height: 128px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background-image: linear-gradient(rgba(140,143,148,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(140,143,148,.14) 1px, transparent 1px); background-size: 16px 16px; }
.svc .ill.o { background-color: #FDF1EA; }
.svc .ill.c { background-color: #EEF7FA; }
.svc .ill svg { width: 78%; max-width: 200px; height: auto; transition: transform .3s; }
.svc:hover .ill svg { transform: translateY(-3px) rotate(-1deg); }
.svc h3 { margin: 6px 0 0; font-size: 20px; color: var(--ink); font-weight: 600; }
.svc p { margin: 0; font-size: 15px; color: var(--muted); }
.svc ul { list-style: none; margin: auto 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.svc li { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--text); }

/* ---------- 강점 ---------- */
.why { background: var(--ink); color: #D9DADC; }
.why h2.title { color: var(--white); }
.why .lead { color: #A3A6AA; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: #34363B; border: 1px solid #34363B; border-radius: 18px; overflow: hidden; }
.why-item { background: var(--ink); padding: 40px 36px; display: grid; grid-template-columns: auto 1fr; gap: 20px; }
.why-item .num { font-size: 14px; font-weight: 700; color: var(--orange); padding-top: 4px; }
.why-item:nth-child(even) .num { color: var(--cyan); }
.why-item h3 { margin: 0 0 8px; font-size: 21px; font-weight: 600; color: var(--white); }
.why-item p { margin: 0; font-size: 15px; color: #A3A6AA; }

/* ---------- 진행 과정 ---------- */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; position: relative; }
.process::before { content: ""; position: absolute; top: 27px; left: 10%; right: 10%; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 8px, transparent 8px 14px); }
.step { text-align: center; padding: 0 12px; position: relative; }
.step .dot { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 700; color: var(--ink); position: relative; z-index: 1; }
.step:nth-child(odd) .dot { background: var(--orange); border-color: var(--orange); color: var(--white); }
.step:nth-child(even) .dot { background: var(--cyan); border-color: var(--cyan); color: var(--white); }
.step h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); }
.step p { margin: 0; font-size: 14px; color: var(--muted); }
.step small { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

/* ---------- 포트폴리오 ---------- */
.portfolio-sec { background: var(--paper-2); }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work { background: var(--white); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.work .thumb { aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; overflow: hidden; }
.work .thumb.o { background: var(--orange-t); }
.work .thumb.c { background: var(--cyan-t); }
.work .thumb.k { background: #E3E2DE; }
.work .thumb svg { width: 72%; height: auto; max-height: 78%; }
.work .thumb .soon { position: absolute; top: 14px; left: 14px; font-size: 12px; font-weight: 600; background: var(--ink); color: var(--white); padding: 4px 10px; border-radius: 999px; }
.work .meta { padding: 20px 22px 22px; }
.work .meta span { font-size: 13px; color: var(--muted); }
.work .meta h3 { margin: 4px 0 0; font-size: 18px; font-weight: 600; color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 17px; font-weight: 600; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { margin: 0 0 22px; color: var(--muted); font-size: 15px; }

/* ---------- 문의 CTA ---------- */
.contact { padding: 0 0 120px; }
.contact-box { background: var(--orange); color: var(--white); border-radius: 28px; padding: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.contact-box::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: rgba(255,255,255,.12); }
.contact-box h2 { margin: 0 0 14px; font-size: clamp(28px, 4vw, 44px); line-height: 1.25; font-weight: 600; }
.contact-box p { margin: 0; font-size: 17px; opacity: .9; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.contact-list a, .contact-list div { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 14px; padding: 16px 20px; font-weight: 500; transition: background .2s; }
.contact-list a:hover { background: rgba(255,255,255,.24); }
.contact-list small { display: block; font-size: 12px; opacity: .8; font-weight: 400; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--ink); color: #A3A6AA; padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 14px; }
.foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid #34363B; }
.foot-top img { height: 28px; width: auto; margin-bottom: 16px; }
.foot-top p { margin: 0; max-width: 360px; }
.foot-links { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-links h4 { margin: 0 0 12px; font-size: 13px; color: var(--white); font-weight: 600; letter-spacing: .06em; }
.foot-links a { display: block; padding: 3px 0; }
.foot-links a:hover { color: var(--white); }
.foot-bottom { padding-top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.foot-bottom address { font-style: normal; line-height: 1.8; }

/* ---------- 리뉴얼 팝업 ---------- */
.popup { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(28,29,32,.55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.popup.open { opacity: 1; visibility: visible; }
.popup-card { width: 100%; max-width: 420px; max-height: 100%; overflow: auto; background: var(--white); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.25); transform: translateY(16px) scale(.98); transition: transform .35s; }
.popup.open .popup-card { transform: none; }
.popup-visual { position: relative; aspect-ratio: 4 / 3; background: var(--paper); overflow: hidden; display: grid; place-items: center; }
.popup-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: 22px 22px; }
.popup-visual .city { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; display: flex; align-items: flex-end; gap: 6px; padding: 0 14px; border-bottom: 2px solid var(--ink); }
.popup-visual .city i { flex: 1; border: 1.5px solid var(--ink); border-bottom: 0; background: var(--white); }
.popup-visual .city i:nth-child(3n+1) { background: var(--orange-t); }
.popup-visual .city i:nth-child(3n+2) { background: var(--cyan-t); }
.popup-visual img { position: relative; width: 62%; height: auto; animation: float 3s ease-in-out infinite; margin-bottom: 18%; }
.popup-visual .badge { position: absolute; top: 16px; left: 16px; background: var(--orange); color: var(--white); font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px; }
@keyframes float { 50% { transform: translateY(-8px); } }
.popup-body { padding: 26px 26px 22px; text-align: center; }
.popup-body h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.popup-body h2 em { font-style: normal; color: var(--orange); }
.popup-body p { margin: 0 0 20px; font-size: 15px; color: var(--muted); }
.popup-body .btn { width: 100%; }
.popup-foot { display: flex; border-top: 1px solid var(--line); }
.popup-foot button { flex: 1; height: 50px; background: none; border: 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; }
.popup-foot button + button { border-left: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.popup-foot button:hover { background: var(--paper); }

/* ---------- 스크롤 등장 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .hero-cta { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(2, 1fr); }
  .intro .wrap { grid-template-columns: 1fr; }
  .faq-wrap { grid-template-columns: 1fr; gap: 32px; }
  .contact-box { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px; transform: translateY(-120%); transition: transform .3s; z-index: -1; }
  .nav.open { transform: none; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; height: 46px; }
  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--ink) 0 8px, transparent 8px 14px); }
  .step { text-align: left; display: grid; grid-template-columns: 56px 1fr; column-gap: 20px; padding: 0; }
  .step .dot { margin: 0; grid-row: span 3; }
  .step small { justify-self: start; }
  .why-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  section.block { padding: 80px 0; }
  .contact { padding-bottom: 80px; }
  .services, .works { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 16px; }
  .why-item { padding: 28px 22px; }
  .sec-head { margin-bottom: 40px; }
  .foot-links { gap: 32px; }
  .hero-cta { padding-top: 16px; }
  .contact-list a, .contact-list div { padding: 14px 16px; }
}

/* 폴더블 커버 화면 · 아주 좁은 폰 (Galaxy Z Fold 커버 등) */
@media (max-width: 360px) {
  :root { --header-h: 58px; }
  .wrap { padding: 0 12px; }
  .brand img { height: 20px; }
  .hero-cta { flex-direction: column; padding: 16px 12px 0; }
  .hero-cta .btn { width: 100%; }
  .svc { padding: 24px 18px 22px; }
  .why-item { grid-template-columns: 1fr; gap: 8px; padding: 24px 18px; }
  .step { grid-template-columns: 44px 1fr; column-gap: 14px; }
  .step .dot { width: 44px; height: 44px; font-size: 14px; }
  .process::before { left: 21px; }
  .faq summary { font-size: 15.5px; }
  .contact-box { border-radius: 20px; padding: 32px 20px; }
  .contact-list a, .contact-list div { font-size: 14px; gap: 10px; word-break: break-all; }
  .popup-body { padding: 22px 18px 18px; }
  .popup-body h2 { font-size: 20px; }
  .foot-bottom { flex-direction: column; }
}

/* 폴더블 펼친 화면 · 정사각형에 가까운 태블릿 (Z Fold 내부, 폴더블 아이폰 등) */
@media (min-width: 601px) and (max-width: 1024px) and (min-aspect-ratio: 4/5) and (max-aspect-ratio: 5/4) {
  section.block { padding: 96px 0; }
}

/* 태블릿·폴더블: 포트폴리오 2열일 때 마지막 카드는 가로로 넓게 */
@media (min-width: 601px) and (max-width: 1024px) {
  .works .work:last-child { grid-column: 1 / -1; }
  .works .work:last-child .thumb { aspect-ratio: 16 / 7; }
}

/* 가로로 눕힌 폰: 히어로가 화면을 다 차지하지 않도록 */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { max-height: calc(100svh - var(--header-h) - 64px); }
  .popup-card { display: grid; grid-template-columns: 1fr 1fr; max-width: 640px; }
  .popup-visual { aspect-ratio: auto; height: 100%; }
  .popup-foot { grid-column: 1 / -1; }
}

/* 듀얼 스크린 (Surface Duo 등 화면이 두 개로 나뉜 기기): 힌지를 피해 좌우로 배치 */
@media (horizontal-viewport-segments: 2) {
  .wrap { max-width: none; padding-left: 24px; padding-right: 24px; }
  .services, .works, .why-grid { grid-template-columns: repeat(2, 1fr); column-gap: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px) + 24px); }
  .popup { padding-left: env(viewport-segment-left 1 0, 16px); }
}
