/* STUDIO D1 AI 디자인 — editorial one-pager.
   Black page, Pretendard only (Thin for big type), one blue accent, square corners, no boxes or borders. */

@font-face { font-family: Pretendard; font-weight: 100; font-display: swap; src: url(../assets/fonts/Pretendard-Thin.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 300; font-display: swap; src: url(../assets/fonts/Pretendard-Light.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 400; font-display: swap; src: url(../assets/fonts/Pretendard-Regular.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 600; font-display: swap; src: url(../assets/fonts/Pretendard-SemiBold.woff2) format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 800; font-display: swap; src: url(../assets/fonts/Pretendard-ExtraBold.woff2) format('woff2'); }

:root {
  --bg: #000000;
  --ink: #ffffff;
  --muted: #8c8c8c;
  --subtle: #5a5a5a;
  --point: #3d7bff;
  /* Pretendard has no Hanja: fall back to a system CJK face for 百聞不如一見 */
  --sans: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
  --gutter: clamp(20px, 4.4vw, 80px);
  --t-hero: clamp(44px, 9.4vw, 176px);
  --t-head: clamp(36px, 5.6vw, 104px);
  --t-lead: clamp(20px, 1.9vw, 32px);
  --t-body: clamp(16px, 1.25vw, 20px);
  --t-small: clamp(12px, 0.85vw, 14px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 400; font-size: var(--t-body); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
.pad { padding-inline: var(--gutter); }
.point { color: var(--point); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Notice line (top and bottom of the page) */
.notice { display: flex; justify-content: center; gap: 0.6em; padding-block: 12px; font-size: var(--t-small); color: var(--ink); }
.notice b { font-weight: 600; color: var(--point); }
.notice:hover b, .notice:focus-visible b { text-decoration: underline; text-underline-offset: 4px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; background: var(--bg); }
.logo { font-weight: 800; font-size: 18px; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 40px); font-size: var(--t-small); font-weight: 600; }
.nav a { color: var(--muted); transition: color 0.3s var(--ease); }
.nav a:hover, .nav a:focus-visible { color: var(--ink); }

/* Hero: BEYOND LIMITS + a ring of cards (a donut turned about 15deg with strong perspective, js sets the turn).
   Cards overlap a little, square corners, each casting a soft shadow on the card below. Cards drop in from the top on load; the ring turns slowly and with the scroll, cards at the back darken and blur. */
.hero { position: relative; height: 420svh; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.hero h1 { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding-block: clamp(96px, 12svh, 140px) clamp(48px, 9svh, 96px); font-weight: 100; font-size: var(--t-hero); line-height: 0.95; pointer-events: none; }
.hero h1 span { display: block; }
.hero h1 .w1 { position: relative; z-index: 0; }  /* BEYOND behind the ring */
/* Intro: BEYOND, then LIMITS, come down slowly from above while fading in; then STUDIO D1 fades in at the centre */
.fall { display: inline-block; }
.js .fall { opacity: 0; transform: translateY(-0.6em); animation: fall-in 3s cubic-bezier(0.33, 0, 0.2, 1) forwards; }
.js .limits .fall { animation-delay: 1.3s; }
.js .w1 .fall { animation-delay: 0.3s; }
@keyframes fall-in { to { opacity: 1; transform: none; } }
/* Big STUDIO D1 in the middle of the first screen; js moves and shrinks it into the header logo as you scroll */
.hero-logo { position: fixed; left: 0; top: 0; z-index: 11; margin: 0; font-weight: 800; font-size: clamp(40px, 8vw, 144px); line-height: 1; white-space: nowrap; transform-origin: 0 0; pointer-events: none; opacity: 0; will-change: transform; }
.hero-logo.in { transition: opacity 1.6s var(--ease); }
.top .logo.hand-off { opacity: 0; }
.deck { --cw: min(49vw, 24svh, 416px); position: absolute; inset: 0; z-index: 1; perspective: 1050px; perspective-origin: 50% 50%; }
.scene { position: absolute; inset: 0; transform-style: preserve-3d; }
.ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
/* LIMITS sits in the 3D scene at the depth of the ring's centre (js sets it), so it shows in front of the cards
   turning round the back and behind the cards in front. Big, set to the right margin so only the L tucks under the front cards.
   Low on the screen: one font-size below 79%, but never past the bottom of the screen. */
.limits { position: absolute; left: 0; right: 0; top: min(calc(79% + 1em), calc(100% - 0.6em)); margin: 0; padding-inline: var(--gutter); text-align: right; font-weight: 100; font-size: clamp(56px, 17vw, 320px); line-height: 1; letter-spacing: -0.07em; white-space: nowrap; pointer-events: none; }
.card { position: absolute; left: calc(var(--cw) / -2); top: calc(var(--cw) * -0.625); width: var(--cw); height: calc(var(--cw) * 1.25); transform-style: preserve-3d; will-change: transform; opacity: 0; }
.card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
/* js cuts each card into strips that bend like paper; each strip carries the blur and the shade itself
   (a filter or overflow on .card would flatten the bend) */
.strip { position: absolute; left: 0; width: 100%; background-repeat: no-repeat; backface-visibility: visible; filter: blur(var(--blur, 0px)); }
.strip::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); }
.strip.edge { box-shadow: 0 calc(var(--cw) * 0.06) calc(var(--cw) * 0.1) rgba(0, 0, 0, 0.5); }
.hero-cap { position: absolute; left: 0; bottom: 18px; z-index: 2; font-size: var(--t-small); color: var(--muted); }

/* Ring photos flying into the Works grid (js makes one copy per card and moves it with the scroll) */
.flyer { position: fixed; left: 0; top: 0; z-index: 9; margin: 0; overflow: hidden; pointer-events: none; visibility: hidden; will-change: transform, width, height; }
.flyer img { width: 100%; height: 100%; object-fit: cover; }
.flyer::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); }
.deck .card.gone { visibility: hidden; }
.wall .item.await img { opacity: 0; }

/* Full-bleed figures with a small caption under them */
.bleed { margin-block: clamp(64px, 8vw, 140px); }
.bleed img, .bleed video { width: 100%; height: auto; max-height: 92svh; object-fit: cover; }
figcaption { padding-top: 14px; font-size: var(--t-small); color: var(--muted); }

/* Essay: heading left (sticky on wide screens), text right */
.essay { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 120px); padding-block: clamp(72px, 9vw, 160px); }
.essay h2 { font-weight: 100; font-size: var(--t-head); line-height: 1.08; align-self: start; position: sticky; top: 96px; }
.essay h2 .hanja { display: block; margin-top: 0.3em; font-size: 0.62em; }
.essay .body { display: flex; flex-direction: column; gap: 1.4em; font-size: var(--t-lead); font-weight: 300; line-height: 1.6; }

/* Works */
.works { padding-block: clamp(72px, 9vw, 160px) 0; }
.works-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4vw, 64px); }
.works-head h2 { font-weight: 100; font-size: var(--t-head); line-height: 1.05; }
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.filters button { margin: 0; padding: 8px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--t-small); font-weight: 600; cursor: pointer; transition: color 0.3s var(--ease); }
.filters button:hover, .filters button[aria-pressed="true"] { color: var(--ink); }
.filters button[aria-pressed="true"] { color: var(--point); }
/* photo wall: columns keep each image at its own proportions, edge to edge, no gaps */
.wall { columns: 3; column-gap: 0; }
.wall .item { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: #111; cursor: zoom-in; break-inside: avoid; }
.wall .item img, .wall .item video { width: 100%; height: auto; transition: opacity 0.4s var(--ease); }
.wall .item:hover img, .wall .item:hover video { opacity: 0.8; }
.wall .item[hidden] { display: none; }
.wall-note { padding: 14px var(--gutter) 0; font-size: var(--t-small); color: var(--muted); }

/* Lightbox */
.lightbox { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.lightbox::backdrop { background: var(--bg); }
.lightbox .frame { position: absolute; inset: 72px var(--gutter) 56px; display: flex; align-items: center; justify-content: center; }
.lightbox .frame img, .lightbox .frame video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox .close { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox .lb-cap { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font-size: var(--t-small); color: var(--muted); }
.lightbox .step { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; padding: 0; border: 0; background: none; color: var(--ink); opacity: 0.7; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox .step:hover { opacity: 1; }
.lightbox .prev { left: 8px; }
.lightbox .next { right: 8px; }
body:has(.lightbox[open]) { overflow: hidden; }

/* Workshop */
.workshop { padding-block: clamp(96px, 12vw, 200px) clamp(72px, 9vw, 160px); }
.workshop .kicker { font-size: var(--t-lead); margin-bottom: clamp(16px, 2vw, 28px); }
.workshop h2 { font-weight: 100; font-size: var(--t-hero); line-height: 1.02; }
.workshop h2 span { display: block; }
.ws-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 120px); margin-top: clamp(64px, 8vw, 140px); }
.ws-intro { display: flex; flex-direction: column; gap: 1.4em; font-size: var(--t-lead); font-weight: 300; line-height: 1.6; }
.ws-course { display: flex; flex-direction: column; gap: clamp(28px, 3vw, 48px); }
.ws-course li { font-size: clamp(22px, 2.4vw, 40px); font-weight: 600; line-height: 1.3; }
.ws-course li small { display: block; margin-top: 8px; font-size: var(--t-body); font-weight: 400; color: var(--muted); }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 14px clamp(24px, 3vw, 56px); margin-top: clamp(48px, 5vw, 80px); font-size: var(--t-body); }
.info dt { color: var(--muted); }
.info dd { font-weight: 600; }
.apply { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 32px; margin-top: clamp(48px, 5vw, 80px); }
.apply a { font-weight: 800; font-size: clamp(32px, 4vw, 64px); color: var(--point); }
.apply a:hover, .apply a:focus-visible { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.apply p { color: var(--muted); font-size: var(--t-body); }

/* Footer */
.foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: clamp(72px, 8vw, 140px) 40px; font-size: var(--t-small); color: var(--muted); }
.foot .logo { color: var(--ink); }
.foot p + p { margin-top: 6px; }
.foot a:hover, .foot a:focus-visible { color: var(--ink); }
.foot .copy { grid-column: 1 / -1; text-align: center; padding-top: 48px; }

/* Reveal on scroll (js adds .js to <html>, .in when visible) */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .fall { opacity: 1; transform: none; animation: none; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

@media (max-width: 900px) {
  .essay, .ws-grid { grid-template-columns: 1fr; }
  .essay h2 { position: static; }
  .wall { columns: 2; }
}
@media (max-width: 560px) {
  .nav { gap: 14px; }
  .nav a:nth-child(n+4) { display: none; } /* keep About / Works / Workshop on phones */
  .foot { grid-template-columns: 1fr; }
  .notice { flex-direction: column; align-items: center; gap: 2px; text-align: center; }
}
