/* 겹 스튜디오 portfolio. Tokens in DESIGN.md. */
:root {
  --ink: #0C0C0E; --ink2: #17171B; --paper: #EDEBE6; --mute: #9A9893; --line: #2A2A30; --lemon: #DDFF45;
  --paper-mute: #55534F;
  --sans: "IBM Plex Sans KR", system-ui, sans-serif;
  --display: "Archivo", "IBM Plex Sans KR", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 64px);
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s24: 24px; --s32: 32px; --s48: 48px; --s64: 64px; --s96: 96px; --s144: 144px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); color: var(--paper); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
body { margin: 0; font: 400 17px/1.65 var(--sans); word-break: keep-all; overflow-wrap: break-word; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
html.fw body { visibility: hidden; }
a, button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.muted { color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--lemon); outline-offset: 4px; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--lemon); color: var(--ink); padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 16px; }
.label { color: var(--mute); margin-bottom: var(--s16); }
.h2 { font: 700 clamp(28px, 3.4vw, 52px)/1.1 var(--sans); letter-spacing: -.02em; }
.h-xl { font: 700 clamp(28px, 7.4vw, 104px)/1.04 var(--sans); letter-spacing: -.03em; }
.split-lines .line, .split-chars .line { overflow: clip; padding-bottom: .06em; margin-bottom: -.06em; }

/* loader */
.loader { position: fixed; inset: 0; z-index: 90; background: var(--ink); display: none; place-items: center; }
html.motion .loader { display: grid; }
.loader-word { font: 800 clamp(64px, 16vw, 220px)/.9 var(--display); font-variation-settings: "wdth" 62; letter-spacing: -.02em; color: var(--paper); }
.loader-count { position: absolute; right: var(--pad); bottom: var(--pad); font-size: 15px; color: var(--paper); }

/* header */
.top { position: fixed; z-index: 40; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: var(--s24); padding: 16px var(--pad); color: var(--paper); transition: transform .45s cubic-bezier(.3, .7, .4, 1), background-color .3s; }
.top.is-solid { background: rgba(12, 12, 14, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; min-height: 44px; min-width: 44px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 999px; font: 800 14px/1 var(--display); }
.nav { display: flex; gap: clamp(12px, 2.4vw, 32px); margin-left: auto; }
.nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 4px; font-weight: 500; position: relative; }
.nav a::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 8px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .25s cubic-bezier(.3, .7, .4, 1); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a:active, .brand:active, .foot-row a:active { opacity: .6; }
.top-clock { display: flex; align-items: center; gap: 8px; }
.top-clock .dot { width: 7px; height: 7px; border-radius: 9px; background: currentColor; }
@media (max-width: 720px) { .top-clock { display: none; } .brand-name { display: none; } .nav a { font-size: 16px; } }

/* hero */
.hero { position: relative; z-index: 1; height: 100svh; min-height: 560px; overflow: clip; }
.marquee, .work, .services, .contact, .foot { position: relative; z-index: 2; background: var(--ink); }
.orbit { position: absolute; inset: 0; perspective: 1400px; perspective-origin: 50% 42%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage { position: absolute; left: 50%; top: 44%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-10deg); }
.word { position: absolute; left: 0; top: 0; transform: translate(-50%, -54%); font: 800 clamp(96px, 22vw, 380px)/.82 var(--display); letter-spacing: -.03em; white-space: nowrap; color: var(--paper); font-variation-settings: "wdth" 90; }
.word .ch { display: inline-block; }
.ring { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.cell { position: absolute; left: 0; top: 0; width: var(--cw); height: calc(var(--cw) * 1.25); margin: calc(var(--cw) * -.625) 0 0 calc(var(--cw) * -.5); transform-style: preserve-3d; }
.card { position: absolute; inset: 0; display: block; transform-style: preserve-3d; }
.card-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.card-face img { width: 100%; height: 100%; object-fit: cover; }
.card-back { transform: rotateY(180deg); background: var(--ink2); display: flex; flex-direction: column; justify-content: space-between; padding: 10px; }
.card-back img { position: absolute; inset: 0; transform: scaleX(-1); filter: grayscale(1) brightness(.32); }
.card-back b, .card-back span { position: relative; }
.card-back b { font: 800 clamp(22px, 3vw, 40px)/1 var(--display); color: var(--paper); opacity: .7; }
.card-back span { font: 500 12px/1.3 var(--sans); color: var(--paper); opacity: .7; }
.orbit:focus-visible { outline-offset: -12px; }
.card { cursor: pointer; }
.hero-copy { position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s24); pointer-events: none; }
.hero-copy h1 { font: 700 clamp(22px, 2.6vw, 40px)/1.25 var(--sans); letter-spacing: -.02em; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; color: var(--mute); }
.hero-hint { position: absolute; left: 50%; top: calc(var(--pad) + 64px); transform: translateX(-50%); color: var(--mute); display: flex; align-items: center; gap: 10px; }
.hero-hint::before, .hero-hint::after { content: ""; width: 24px; height: 1px; background: currentColor; }
.hint-touch { display: none; }
@media (hover: none) { .hint-pc { display: none; } .hint-touch { display: inline; } }
@media (max-width: 720px) {
  .stage { top: 45%; transform: rotateX(-16deg); }
  .word { font-size: 32vw; }
  .hero-copy { flex-direction: column; align-items: flex-start; gap: var(--s12); }
  .hero-side { flex-direction: row; gap: 16px; align-items: center; }
}

/* marquee */
.marquee { overflow: clip; border-block: 1px solid var(--line); padding: 20px 0; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.mq-item { display: inline-flex; align-items: center; gap: clamp(16px, 2vw, 32px); padding-right: clamp(16px, 2vw, 32px); font: 800 clamp(36px, 5vw, 80px)/1 var(--display); font-variation-settings: "wdth" 72; text-transform: uppercase; white-space: nowrap; }
.mq-item .ko { font: 700 clamp(28px, 3.8vw, 60px)/1 var(--sans); letter-spacing: -.02em; color: var(--mute); }
.mq-item .ko { color: var(--mute); }
.mq-dot { width: .3em; height: .3em; border-radius: 99px; background: var(--lemon); flex: none; }

/* section head */
.sec-head { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0 var(--pad); margin-bottom: clamp(40px, 6vw, 96px); max-width: 1600px; }
.sec-note { color: var(--mute); max-width: 34em; margin-top: var(--s16); font-size: 16px; }

/* work grid */
.work { padding: clamp(96px, 12vw, 180px) 0 clamp(64px, 8vw, 120px); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); row-gap: clamp(40px, 4.4vw, 72px); padding: 0 var(--pad); }
/* nine works, nine slots: big, small, landscape, square; no photo is drawn wider than its file (about 760 px) */
.work-item { align-self: start; }
.work-item:nth-child(1) { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.work-item:nth-child(2) { grid-column: 9 / span 4; grid-row: 1; }
.work-item:nth-child(3) { grid-column: 9 / span 4; grid-row: 2; --ar: 4 / 3; }
.work-item:nth-child(4) { grid-column: 1 / span 4; grid-row: 3; --ar: 1 / 1; margin-top: 10%; }
.work-item:nth-child(5) { grid-column: 6 / span 7; grid-row: 3; --ar: 16 / 10; }
.work-item:nth-child(6) { grid-column: 1 / span 5; grid-row: 4; }
.work-item:nth-child(7) { grid-column: 7 / span 3; grid-row: 4; --ar: 3 / 4; margin-top: 14%; }
.work-item:nth-child(8) { grid-column: 10 / span 3; grid-row: 4; --ar: 1 / 1; margin-top: 34%; }
.work-item:nth-child(9) { grid-column: 3 / span 7; grid-row: 5; --ar: 4 / 3; }
.work-link { display: block; }
.work-link .look { transition: transform .25s cubic-bezier(.3, .7, .4, 1); }
.work-link:active .look { transform: scale(.98); }
.look { position: relative; aspect-ratio: var(--ar, 4 / 5); overflow: hidden; background: var(--ink2); }
.look-img { width: 100%; height: 118%; object-fit: cover; position: absolute; left: 0; top: -9%; will-change: transform; }
.look-gl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.look-card { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(16px, 2.2vw, 32px); background: rgba(221, 255, 69, .62); color: #0C0C0E; opacity: 0; pointer-events: none; }
.look-card .lc-top { font: 400 13px/1.2 var(--mono); letter-spacing: .08em; }
.look-card .lc-line { display: block; font: 700 clamp(20px, 2vw, 30px)/1.3 var(--sans); white-space: nowrap; letter-spacing: -.01em; }
.look-card .lc-go { font: 700 15px/1.2 var(--sans); color: #0C0C0E; }
html:not(.gl) .work-link:hover .look-card, html:not(.gl) .work-link:focus-visible .look-card { opacity: 1; backdrop-filter: blur(6px); transition: opacity .25s; }
.work-meta { display: grid; grid-template-columns: auto 1fr auto; column-gap: var(--s16); align-items: baseline; padding-top: var(--s16); border-bottom: 1px solid var(--line); padding-bottom: var(--s12); }
.work-meta .num { grid-row: 1 / span 2; align-self: start; font: 800 clamp(40px, 4.4vw, 76px)/.82 var(--display); font-variation-settings: "wdth" 70; color: var(--mute); }
.work-meta h3 { font: 700 clamp(22px, 2vw, 32px)/1.2 var(--sans); letter-spacing: -.01em; }
.work-meta .kind { grid-column: 2; color: var(--mute); font-size: 15px; }
.work-meta .yr { grid-row: 1; grid-column: 3; font: 400 13px/1 var(--mono); color: var(--mute); }
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(6, 1fr); row-gap: 40px; }
  .work-item:nth-child(n) { grid-column: 1 / -1; grid-row: auto; margin-top: 0; }
  .work-item:nth-child(3n+2) { grid-column: 3 / -1; }
  .work-item:nth-child(3n) { grid-column: 1 / span 4; }
}

/* services */
.services { padding: clamp(96px, 8vw, 140px) 0; }
.svc-list { border-top: 1px solid var(--line); margin: 0 var(--pad); }
.svc { display: grid; grid-template-columns: 64px 1fr minmax(0, 32em); gap: var(--s24); align-items: baseline; padding: clamp(20px, 2.6vw, 40px) 0; border-bottom: 1px solid var(--line); position: relative; }
.svc .num { font: 400 13px/1 var(--mono); color: var(--mute); }
.svc h3 { font: 800 clamp(34px, 5vw, 84px)/1 var(--display); font-variation-settings: "wdth" 80; text-transform: uppercase; letter-spacing: -.01em; transition: font-variation-settings .45s cubic-bezier(.3, .7, .4, 1), color .25s; }
.svc h3 small { display: block; font: 700 clamp(17px, 1.5vw, 22px)/1.3 var(--sans); text-transform: none; letter-spacing: -.01em; margin-top: 8px; color: var(--paper); }
.svc p { color: var(--mute); font-size: 16px; }
.svc-thumbs { display: none; }
@media (hover: hover) and (pointer: fine) { .svc:hover h3 { font-variation-settings: "wdth" 125; color: var(--lemon); } }
@media (hover: none), (max-width: 720px) {
  .svc { grid-template-columns: 1fr; gap: var(--s12); }
  .svc-thumbs { display: flex; gap: 8px; }
  .svc-thumbs img { width: 30%; aspect-ratio: 4 / 5; object-fit: cover; }
}
.svc-float { position: fixed; left: 0; top: 0; width: 220px; height: 275px; pointer-events: none; z-index: 30; }
.svc-float img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }

/* studio */
.studio { position: relative; background: var(--paper); color: var(--ink); overflow: clip; }
html.motion .studio { clip-path: inset(0 var(--pad) 0 var(--pad)); }
.studio-pin { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: center; padding: clamp(96px, 10vw, 140px) var(--pad); }
.studio .label { color: var(--paper-mute); }
.studio .lead { font-size: clamp(17px, 1.3vw, 19px); max-width: 30em; margin-top: var(--s24); color: #2B2A27; }
.studio-count { margin-top: var(--s32); color: var(--paper-mute); }
.studio-media { display: grid; gap: var(--s16); }
.studio-photo { aspect-ratio: 16 / 8; overflow: hidden; background: #D9D6CF; }
.studio-photo img { width: 100%; height: 100%; object-fit: cover; }
.stack { position: relative; height: clamp(220px, 30vh, 300px); overflow: clip; background: var(--ink); }
.stack-card { position: absolute; inset: 0; background: var(--ink); color: var(--paper); padding: clamp(20px, 2.4vw, 36px); display: flex; flex-direction: column; justify-content: space-between; transform-origin: 50% 0%; --dim: 0; }
.stack-card::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--dim); pointer-events: none; }
.sc-num { display: block; margin-bottom: auto; font: 800 clamp(72px, 7vw, 120px)/.8 var(--display); font-variation-settings: "wdth" 62; color: var(--lemon); }
.stack-card h3 { font: 700 clamp(22px, 2.2vw, 34px)/1.2 var(--sans); letter-spacing: -.02em; }
.stack-card p { color: #C9C7C2; max-width: 28em; margin-top: var(--s8); }
html:not(.motion) .stack { height: auto; display: grid; gap: var(--s16); background: none; }
html:not(.motion) .stack-card { position: relative; inset: auto; }
@media (max-width: 860px) {
  .studio-pin { grid-template-columns: 1fr; align-content: center; gap: var(--s32); padding-top: 88px; padding-bottom: 48px; }
  .studio .lead { margin-top: var(--s16); font-size: 16px; }
  .studio-count { margin-top: var(--s16); }
  .studio-photo { aspect-ratio: 16 / 7; }
  .stack { height: 210px; }
  .stack-card { padding: 18px; }
  .sc-num { font-size: 64px; }
  .stack-card h3 { font-size: 20px; }
  .stack-card p { font-size: 15px; line-height: 1.55; }
}

/* contact */
.contact { padding: clamp(120px, 14vw, 220px) var(--pad) clamp(64px, 8vw, 120px); }
.contact-row { display: flex; align-items: center; gap: clamp(32px, 6vw, 120px); margin-top: clamp(48px, 6vw, 96px); flex-wrap: wrap; }
.mail-btn { position: relative; width: clamp(150px, 16vw, 230px); aspect-ratio: 1; border-radius: 999px; display: grid; place-items: center; background: var(--lemon); color: var(--ink); font: 700 clamp(17px, 1.5vw, 22px)/1 var(--sans); overflow: hidden; isolation: isolate; }
.mail-btn-fill { position: absolute; inset: 0; background: var(--paper); border-radius: 999px; transform: translateY(101%); z-index: -1; }
.mail-btn-label { display: inline-block; }
.contact-links { display: grid; gap: var(--s12); }
.scramble-link { font-size: clamp(15px, 1.4vw, 20px); text-transform: none; letter-spacing: .02em; display: inline-flex; min-height: 44px; align-items: center; border-bottom: 1px solid var(--line); width: fit-content; }
.scramble-link:hover { border-color: var(--lemon); }

/* footer */
.foot { padding: 0 var(--pad) var(--s32); overflow: clip; }
.sign { position: relative; height: min(88svh, 900px); min-height: 420px; margin: 0 calc(var(--pad) * -1); perspective: 1400px; perspective-origin: 50% 45%; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.sign-stage { position: absolute; left: 50%; top: 46%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-12deg); }
.foot-word { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font: 800 18vw/.8 var(--display); font-variation-settings: "wdth" 62; letter-spacing: -.02em; color: var(--paper); white-space: nowrap; }
.foot-word .ch { display: inline-block; font-variation-settings: "wdth" var(--w, 62); }
html:not(.motion) .foot-word .ch { --w: 110; }
.foot-row { font-size: 15px; display: flex; flex-wrap: wrap; gap: var(--s12) var(--s32); justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: var(--s16); margin-top: var(--s24); color: var(--mute); }
.foot-row a { min-height: 44px; display: inline-flex; align-items: center; color: var(--paper); }

/* case */
.case { position: fixed; inset: 0; z-index: 60; background: var(--ink2); overflow-y: auto; overscroll-behavior: contain; }
.case[hidden] { display: none; }
.case-inner { min-height: 100%; }
.case-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px var(--pad); background: linear-gradient(var(--ink2) 60%, transparent); }
.case-close { min-height: 44px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--paper); font-weight: 500; }
.case-close:hover, .case-close:active { background: var(--paper); color: var(--ink); }
.case-next:active .case-next-name { color: var(--lemon); }
.mail-btn:active { transform: scale(.96); }
.case-hero { height: min(78svh, 900px); overflow: hidden; margin: 0 var(--pad); }
.case-hero img { width: 100%; height: 100%; object-fit: cover; }
.case-body { padding: clamp(40px, 6vw, 96px) var(--pad) var(--s96); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); }
.case-kind { grid-column: 1 / -1; color: var(--mute); }
.case-title { grid-column: 1 / -1; font: 800 clamp(48px, 9vw, 160px)/1 var(--sans); letter-spacing: -.04em; margin: var(--s16) 0 var(--s24); }
.case-title .ch { display: inline-block; }
.case-brief { grid-column: 1 / span 7; font: 500 clamp(20px, 2vw, 30px)/1.45 var(--sans); }
.case-meta { grid-column: 9 / -1; display: grid; gap: var(--s16); }
.case-meta dt { font: 400 13px/1 var(--mono); letter-spacing: .08em; color: var(--mute); }
.case-meta dd { margin-top: 6px; }
.case-text { grid-column: 1 / span 7; display: grid; gap: var(--s16); margin-top: var(--s48); color: #C9C7C2; }
.case-detail { grid-column: 1 / -1; margin-top: var(--s64); aspect-ratio: 16 / 9; overflow: hidden; }
.case-detail img { width: 100%; height: 100%; object-fit: cover; }
.case-next { grid-column: 1 / -1; margin-top: var(--s64); display: grid; gap: var(--s8); text-align: left; padding: var(--s32) 0; border-top: 1px solid var(--line); }
.case-next .mono { color: var(--mute); }
.case-next-name { font: 800 clamp(40px, 7vw, 120px)/1 var(--sans); letter-spacing: -.04em; transition: color .25s; }
.case-next:hover .case-next-name { color: var(--lemon); }
@media (max-width: 860px) {
  .case-brief, .case-meta, .case-text { grid-column: 1 / -1; }
  .case-meta { margin-top: var(--s32); grid-template-columns: 1fr 1fr; }
  .case-hero { height: 62svh; margin: 0; }
}

/* cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor .orbit { cursor: none; }
.cursor-dot { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 99px; background: var(--lemon); }
.cursor-ring { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 99px; border: 1.5px solid rgba(237, 235, 230, .5); display: grid; place-items: center; }
.cursor-label { font: 700 14px/1 var(--sans); color: var(--ink); opacity: 0; white-space: nowrap; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
.case-wipe { position: fixed; inset: 0; z-index: 5; background: var(--lemon); visibility: hidden; pointer-events: none; }
/* phone: the name sits above the ring so the cards pass under it, not over it */
@media (max-width: 720px) { .sign { height: 54svh; min-height: 340px; } .sign-stage { top: 58%; transform: rotateX(-22deg); } .foot-word { transform: translate(-50%, -175%); } }
