/* ==========================================================================
   01 홈페이지 (miracle/homepage.php · assets/js/sx/homepage.js) — "한 장처럼 보이는 여섯 겹"
   ========================================================================== */
.sub--homepage { --accent: var(--y); --code: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

/* ---------- Hero: 한 장의 웹사이트 → 비스듬히 보면 여섯 겹 DOM 레이어 ---------- */
.wb-hero { --e: 0; position: relative; background: #0b0c0e; color: var(--on-dark); }
.wb-hero__sticky { position: relative; height: 100vh; height: 100svh; min-height: 680px; overflow: hidden; isolation: isolate; }
.sx-motion .wb-hero { height: 240vh; }
.sx-motion .wb-hero__sticky { position: sticky; top: 0; }
.wb-view { position: absolute; inset: 0; perspective: 2400px; perspective-origin: 50% 40%; }
.wb-stack { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50%; will-change: transform; }
.wb-ly { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
/* 레이어 테두리·옅은 바탕: 다 켠 값으로 그려 두고 opacity = --e (색 투명도를 --e로 바꾸면 화면 크기 레이어 6장을 매 프레임 다시 그림) */
.wb-ly__frame { position: absolute; inset: 0; pointer-events: none; outline: 1px solid rgba(244, 242, 236, .3); outline-offset: -1px; background: rgba(244, 242, 236, .025); opacity: min(1, var(--e)); will-change: opacity; }
.wb-ly.is-body > .wb-ly__frame { background: none; }
.wb-ly.is-on > .wb-ly__frame { outline-color: rgba(255, 225, 77, .9); }
.wb-ly::before { will-change: opacity; content: attr(data-tag); position: absolute; z-index: 2; left: 0; top: 0; padding: 6px 10px; font-family: var(--code); font-size: var(--fs-xs); color: var(--on-dark-2); background: rgba(11, 12, 14, .7); border: 1px solid rgba(244, 242, 236, .18); transform: translateY(-100%); opacity: calc(var(--e) * 1.6 - .3); white-space: nowrap; transition: background .3s, color .3s, border-color .3s; }
.wb-ly.is-on::before { background: var(--y); color: var(--k); border-color: var(--y); }
.wb-ly.is-body { background: var(--k); }
.wb-ly.is-body::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--b-3), transparent 60%), linear-gradient(transparent 55%, var(--b-4)); }
.wb-site__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.48) saturate(.85); }
.wb-site__nav { position: absolute; left: 6%; right: 6%; top: calc(var(--hd-h) + 72px); display: flex; align-items: center; gap: 32px; }
.wb-site__nav b { font-family: var(--f-display); font-size: var(--fs-md); letter-spacing: .1em; }
.wb-site__nav span { display: flex; gap: 28px; margin-left: auto; }
.wb-site__nav span i { font-style: normal; font-size: var(--fs-sm); color: var(--on-dark-2); }
.wb-site__nav em { display: grid; place-items: center; height: 40px; padding: 0 20px; border: 1px solid var(--w-mid); font-style: normal; font-size: var(--fs-xs); font-weight: 700; }
.wb-site__h { position: absolute; left: 6%; top: 34%; display: grid; gap: 16px; }
.wb-site__h small { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--on-dark-2); }
.wb-site__h strong { font-family: var(--f-display); font-size: var(--t-mega); font-weight: 800; line-height: .82; letter-spacing: -.06em; }
.wb-site__btn { position: absolute; left: 6%; top: calc(34% + var(--t-mega) * .82 + 72px); display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 28px; background: var(--y); color: var(--k); font-size: var(--fs-sm); font-weight: 800; }
.wb-site__cards { position: absolute; right: 6%; bottom: 20%; display: grid; grid-template-columns: repeat(3, clamp(110px, 11vw, 180px)); gap: 12px; }
.wb-site__cards i { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--k3); box-shadow: var(--sh-lg); }
.wb-site__cards img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.wb-grid { position: absolute; inset: 0 6%; display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.6%; opacity: calc(var(--e) * 1.4); will-change: opacity; }
.wb-grid i { background: rgba(255, 225, 77, .04); border-inline: 1px solid rgba(255, 225, 77, .16); }
.wb-hero__top { position: absolute; left: 0; right: 0; top: calc(var(--hd-h) + 24px); z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.wb-hero__mode { display: flex; align-items: center; gap: 8px; font-family: var(--code); font-size: var(--fs-xs); color: var(--on-dark-3); }
.wb-hero__mode i { width: 8px; height: 8px; border-radius: 50%; background: var(--y); box-shadow: 0 0 0 4px var(--y-a1); }
.wb-hero__mode b { color: var(--on-dark); font-weight: 600; font-variant-numeric: tabular-nums; }
.wb-hero__mode b[data-wb-z] { display: inline-block; min-width: 3ch; text-align: right; }
.wb-hero__foot { position: absolute; left: 0; right: 0; bottom: clamp(32px, 6vh, 64px); z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; pointer-events: none; }
.wb-hero__foot .sx-svc-title { max-width: 520px; padding: 18px 20px; background: var(--b-3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .5s, transform .5s var(--ease); }
.wb-hero.is-open .wb-hero__foot .sx-svc-title { opacity: 0; transform: translateY(12px); }
.wb-hero__hint { display: flex; align-items: center; gap: 12px; font-family: var(--code); font-size: var(--fs-xs); color: var(--on-dark-3); }
.wb-hero__hint i { width: 18px; height: 26px; border: 1px solid var(--w-mid); border-radius: 9px; position: relative; }
.wb-hero__hint i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 6px; margin-left: -1px; background: var(--y); animation: wb-swipe 1.6s var(--ease) infinite; }
@keyframes wb-swipe { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

/* ---------- 소개: 코드 → 렌더링 ---------- */
.wb-code__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: round(clamp(40px, 6vw, 112px), 4px); }
.wb-editor { background: var(--k2); border: 1px solid var(--line); box-shadow: var(--sh-lg); font-family: var(--code); font-size: var(--fs-sm); }
.wb-editor__bar { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--fg-2); font-size: var(--fs-xs); }
.wb-editor__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--w-mid); }
.wb-editor__bar span { margin-left: 12px; padding: 0 12px; line-height: 40px; border-inline: 1px solid var(--line); color: var(--fg); }
.wb-editor__code { counter-reset: ln; padding: 20px 0; line-height: 1.9; }
.wb-editor__code li { counter-increment: ln; display: block; white-space: pre-wrap; padding: 0 24px 0 56px; position: relative; color: var(--on-dark-2); }
.wb-editor__code li::before { content: counter(ln); position: absolute; left: 0; width: 36px; text-align: right; color: var(--on-dark-3); opacity: .6; }
.wb-editor__code .t { color: var(--y); }
.wb-editor__code .a { color: var(--on-dark-3); }
.wb-editor__code .s { color: var(--y-soft); }
.wb-editor__typed { color: var(--on-dark); }
.wb-editor__caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -3px; background: var(--y); animation: sx-caret 1s steps(1) infinite; }
.wb-code__out .eyebrow { margin-bottom: 32px; }
.wb-code__text { font-family: var(--f-display); font-size: max(var(--fs-xl), min(var(--fs-2xl), (100vw - 960px) * 999), min(var(--fs-3xl), (100vw - 1280px) * 999), min(var(--fs-4xl), (100vw - 1600px) * 999)); font-weight: 600; line-height: 1.42; letter-spacing: -.04em; }
.sx-motion .wb-code__text .w { opacity: .1; transition: opacity .25s, background .4s; }
.sx-motion .wb-code__text .w.is-on { opacity: 1; }
.sx-motion .wb-code__text .w.is-new { background: var(--y-a1); }

/* ---------- 수상: 기기 틀이 바뀜 ---------- */
.wb-award { position: relative; background: var(--k2); color: var(--on-dark); }
.wb-award__sticky { padding: 120px 0; }
.wb-award__in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: round(clamp(40px, 5vw, 96px), 4px); height: 100%; }
.wb-award__text .sx-head { margin-bottom: 40px; }
.wb-award__text .lead { font-size: var(--fs-sm); }
.wb-award__list li { display: grid; grid-template-columns: 40px 1fr; gap: 0 12px; padding: 14px 0; border-top: 1px solid var(--w-line); color: var(--on-dark-3); transition: color .4s; }
.wb-award__list li:last-child { border-bottom: 1px solid var(--w-line); }
.wb-award__list b { grid-row: 1 / 3; font-size: var(--fs-xs); }
.wb-award__list strong { font-size: var(--fs-md); }
.wb-award__list small { font-size: var(--fs-xs); }
.wb-award__list li.is-on { color: var(--on-dark); }
.wb-award__list li.is-on b { color: var(--y); }
.wb-award__view { position: relative; display: grid; place-items: center; height: min(66vh, 640px); }
.wb-device { --w: 640px; --h: 400px; position: relative; width: var(--w); height: var(--h); max-width: 100%; display: flex; flex-direction: column; background: var(--k3); border: 1px solid var(--w-mid); border-radius: var(--r, 4px); box-shadow: var(--sh-xl); overflow: hidden; }
.wb-device__bar { flex: none; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid var(--w-line); font-family: var(--code); font-size: var(--fs-2xs); color: var(--on-dark-3); white-space: nowrap; overflow: hidden; }
.wb-device__bar i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--w-mid); }
.wb-device__bar span { margin-left: auto; }
.wb-device__bar b { color: var(--y); font-weight: 600; }
.wb-device__bar em { font-style: normal; }
.wb-device__screen { position: relative; flex: 1; overflow: hidden; background: var(--white); }
.wb-device__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease); }
.wb-device__screen img.is-on { clip-path: inset(0); }
.wb-device__badge { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--y); color: var(--k); font-size: var(--fs-2xs); font-weight: 700; line-height: 1.3; text-align: center; box-shadow: var(--sh-md); }
.wb-device__badge b { display: block; letter-spacing: .1em; }
.wb-ruler { position: absolute; left: 50%; bottom: -8px; display: flex; flex-direction: column; align-items: center; gap: 8px; width: var(--rw, 640px); max-width: 100%; transform: translateX(-50%); font-family: var(--code); font-size: var(--fs-2xs); color: var(--on-dark-3); }
.wb-ruler i { position: relative; width: 100%; height: 9px; border-inline: 1px solid var(--y); }
.wb-ruler i::after { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: var(--y-a2); }
.sx-motion .wb-award { height: calc(var(--n) * 90vh + 100vh); }
.sx-motion .wb-award__sticky { position: sticky; top: 0; height: 100vh; padding: calc(var(--hd-h) + 20px) 0 40px; overflow: hidden; }

/* ---------- 강점: 브라우저 탭 ---------- */
.wb-browser { border: 1px solid var(--line); background: var(--k2); box-shadow: var(--sh-xl); }
.wb-browser__tabs { display: flex; gap: 1px; padding: 10px 10px 0; background: var(--k); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.wb-browser__tabs button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 22px; font-size: var(--fs-sm); font-weight: 600; color: var(--fg-2); white-space: nowrap; background: var(--k); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; transition: color .3s, background .3s; }
.wb-browser__tabs button i { width: 12px; height: 12px; border: 1px solid currentColor; }
.wb-browser__tabs button:hover { color: var(--fg); }
.wb-browser__tabs button.is-on { color: var(--fg); background: var(--k2); border-color: var(--line); }
.wb-browser__tabs button.is-on i { background: var(--y); border-color: var(--y); }
.wb-browser__url { display: flex; align-items: center; gap: 10px; margin: 12px 16px; padding: 10px 16px; background: var(--k); font-family: var(--code); font-size: var(--fs-xs); color: var(--fg-2); }
.wb-browser__url i { width: 10px; height: 12px; border: 1.5px solid var(--y); border-radius: 2px; }
.wb-browser__url b { color: var(--fg); font-weight: 600; }
.wb-browser__load { display: block; height: 2px; background: transparent; }
.wb-browser__load i { display: block; width: var(--load, 0%); height: 100%; background: var(--y); box-shadow: 0 0 10px var(--y-a2); transition: opacity .4s; }
.wb-browser__view { position: relative; }
.wb-page[hidden] { display: none; }
.wb-page { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: round(clamp(32px, 4vw, 72px), 4px); padding: round(clamp(24px, 3vw, 48px), 4px); }
.wb-page__img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--k3); }
.wb-page__img img { width: 100%; height: 100%; object-fit: cover; }
.wb-page__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, var(--k3) 30%, var(--k4) 50%, var(--k3) 70%) 0 0 / 300% 100%; opacity: 0; transition: opacity .5s; pointer-events: none; }
.wb-page.is-loading .wb-page__img::after { opacity: 1; animation: wb-shimmer 1s linear infinite; }
@keyframes wb-shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.wb-page__text b { font-size: var(--fs-xs); color: var(--accent); letter-spacing: .08em; }
.wb-page__text h3 { margin: 12px 0 16px; font-family: var(--f-display); font-size: var(--t-h3); letter-spacing: -.045em; line-height: 1.2; }
.wb-page__text p { max-width: 420px; color: var(--fg-2); }
.wb-page.is-loading .wb-page__text > * { opacity: 0; transform: translateY(12px); }
.wb-page__text > * { transition: opacity .6s var(--ease), transform .7s var(--ease); }
.wb-page__text p { transition-delay: .08s; }

/* ---------- 과정: 빌드 파이프라인 ---------- */
.wb-build { position: relative; background: var(--k); }
.wb-build__sticky { padding: 120px 0; }
.wb-build__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: round(clamp(32px, 4vw, 72px), 4px); align-items: start; }
.wb-build__steps { border-left: 1px solid var(--line); }
.wb-step { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 2px 8px; padding: 20px 0 20px 28px; color: var(--fg-2); transition: color .4s; }
.wb-step::before { content: ""; position: absolute; left: -5px; top: 26px; width: 9px; height: 9px; border: 1px solid var(--w-mid); background: var(--k); transition: background .4s, border-color .4s; }
.wb-step b { grid-row: 1 / 4; font-size: var(--fs-xs); }
.wb-step small { font-family: var(--code); font-size: var(--fs-xs); }
.wb-step strong { font-size: var(--fs-xl); letter-spacing: -.03em; color: var(--fg); opacity: .4; transition: opacity .4s; }
.wb-step p { max-width: 440px; font-size: var(--fs-sm); line-height: 1.7; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--ease), opacity .5s; }
.wb-step.is-done::before { background: var(--y-a2); border-color: var(--y); }
.wb-step.is-on::before { background: var(--y); border-color: var(--y); box-shadow: 0 0 0 5px var(--y-a1); }
.wb-step.is-on b, .wb-step.is-on small { color: var(--y); }
.wb-step.is-on strong { opacity: 1; }
.wb-step.is-on p { max-height: 6em; opacity: 1; margin-top: 8px; }
.wb-term { position: sticky; top: calc(var(--hd-h) + 40px); background: var(--k2); border: 1px solid var(--line); font-family: var(--code); font-size: var(--fs-xs); box-shadow: var(--sh-lg); }
.wb-term__bar { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--on-dark-3); }
.wb-term__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--w-mid); }
.wb-term__bar span { margin-left: 12px; }
.wb-term__log { min-height: 260px; padding: 18px 20px; line-height: 2; color: var(--on-dark-2); }
.wb-term__log li { animation: wb-line .35s var(--ease) both; }
.wb-term__log .is-cmd { color: var(--on-dark); }
.wb-term__log .is-cmd::before { content: "$ "; color: var(--y); }
.wb-term__log .is-ok::before { content: "✓ "; color: var(--y); }
@keyframes wb-line { from { opacity: 0; transform: translateX(-8px); } }
.wb-term__progress { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--on-dark-3); }
.wb-term__progress span { flex: 1; height: 4px; background: var(--w-line); }
.wb-term__progress i { display: block; width: 0; height: 100%; background: var(--y); }
.wb-term__progress b { min-width: 4ch; color: var(--on-dark); text-align: right; }
.sx-motion .wb-build { height: calc(var(--n) * 60vh + 100vh); }
.sx-motion .wb-build__sticky { position: sticky; top: 0; height: 100vh; padding: calc(var(--hd-h) + 32px) 0 0; overflow: hidden; }

/* ---------- 인증서: 자·안내선 ---------- */
.wb-cert__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: round(clamp(16px, 2.4vw, 36px), 4px); }
.wb-cert__frame { position: relative; display: block; width: 100%; padding: 12px; background: var(--white); box-shadow: var(--sh-lg); }
.wb-cert__frame img { width: 100%; aspect-ratio: 422 / 574; object-fit: contain; }
.wb-guides { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; font-family: var(--code); font-size: var(--fs-2xs); font-weight: 700; }
.wb-guides .is-x { position: absolute; left: -24px; right: -24px; top: var(--my, 50%); height: 1px; background: var(--y); box-shadow: 0 0 0 .5px var(--k); }
.wb-guides .is-y { position: absolute; top: -24px; bottom: -24px; left: var(--mx, 50%); width: 1px; background: var(--y); box-shadow: 0 0 0 .5px var(--k); }
.wb-guides em { position: absolute; padding: 2px 6px; background: var(--y); color: var(--k); font-style: normal; }
.wb-guides .is-w { left: 50%; top: -26px; transform: translateX(-50%); }
.wb-guides .is-h { right: -8px; top: 50%; transform: translate(100%, -50%) rotate(90deg); transform-origin: 0 50%; }
.wb-guides b { position: absolute; width: 8px; height: 8px; background: var(--white); border: 1px solid var(--y); }
.wb-guides b:nth-of-type(1) { left: -4px; top: -4px; } .wb-guides b:nth-of-type(2) { right: -4px; top: -4px; }
.wb-guides b:nth-of-type(3) { left: -4px; bottom: -4px; } .wb-guides b:nth-of-type(4) { right: -4px; bottom: -4px; }
.wb-cert__frame:is(:hover, :focus-visible) { outline: 1px solid var(--y); }
.wb-cert__frame:is(:hover, :focus-visible) .wb-guides { opacity: 1; }
.wb-cert__grid p { display: grid; gap: 2px; margin-top: 20px; font-size: var(--fs-sm); }
.wb-cert__grid p span { font-size: var(--fs-xs); color: var(--fg-2); }

/* ---------- 작업: 창 안에서 스크롤 ---------- */
.wb-works__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: round(clamp(48px, 6vw, 88px), 4px); }
.wb-works__top .sx-head { margin-bottom: 0; }
.wb-works__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: round(clamp(16px, 2vw, 32px), 4px); }
.wb-shot { display: block; border: 1px solid var(--line); background: var(--k2); transform: perspective(1000px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform .6s var(--ease), border-color .4s; }
.wb-shot:hover { border-color: var(--y); }
.wb-shot__bar { display: flex; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.wb-shot__bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--w-mid); }
.wb-shot__view { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.wb-shot__view img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: object-position 4s cubic-bezier(.45, 0, .55, 1); }
.wb-shot:hover .wb-shot__view img { object-position: 50% 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .wb-cert__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .wb-hero__foot { flex-direction: column; align-items: flex-start; }
  .wb-hero__hint, .wb-site__nav span { display: none; }
  .wb-site__h { top: 26%; }
  .wb-site__btn { top: calc(26% + var(--t-mega) * .82 + 48px); }
  .wb-site__cards { bottom: 34%; grid-template-columns: repeat(3, 72px); }

  .wb-code__in, .wb-award__in, .wb-build__in, .wb-page { grid-template-columns: 1fr; }
  .wb-award__text .lead, .wb-award__text .sx-head .h2 + .lead { display: none; }
  .wb-award__text .sx-head { margin-bottom: 16px; }
  .wb-award__list { display: none; }
  .wb-award__view { height: 56vh; }
  .wb-term { display: none; }
  .wb-works__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wb-works__grid { grid-template-columns: 1fr; }


}
