/* =========================================================
   마사지XYZZ — 광주 서구 금호동
   Contemporary-art poster · scroll-kinetic objects
   ========================================================= */

:root {
  /* 색 — 본 화이트 캔버스 + 잉크 + 바우하우스 원색 */
  --canvas: #ebe7db;
  --canvas-2: #e2ddce;
  --ink: #111110;
  --ink-2: #45443d;
  --red: #f0361a;
  --blue: #1f2ad8;
  --yellow: #f5bf00;
  --line: rgba(17, 17, 16, 0.16);

  --poster: "Black Han Sans", "Gothic A1", sans-serif;
  --sans: "Gothic A1", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", "Gothic A1", monospace;

  --wrap: 1280px;
  --pad: clamp(20px, 5vw, 64px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--red); color: var(--canvas); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- 필름 그레인 오버레이 (미술 프린트 질감) ---------- */
.grain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  opacity: 0.06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 스크롤 진행바 ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 120; background: transparent; }
.progress__bar { height: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  mix-blend-mode: normal;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--canvas) 85%, transparent); backdrop-filter: blur(8px); border-color: var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--poster); font-size: 1.4rem; letter-spacing: 0.01em; line-height: 1; }
.brand i { font-style: normal; color: var(--red); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); transition: color 0.2s; }
.nav a:hover { color: var(--red); }
.nav .n-cta { color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 2px; }

.burger { display: none; width: 42px; height: 42px; border: 0; background: none; cursor: pointer; flex-direction: column; gap: 6px; align-items: center; justify-content: center; }
.burger span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 떠다니는 기하 오브젝트 ---------- */
.floaty { position: absolute; pointer-events: none; will-change: transform; }
.spin-slow { animation: spin 26s linear infinite; }
.spin-rev { animation: spin 34s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.o-circle { border-radius: 50%; }
.o-ring { border-radius: 50%; background: transparent; }
.o-square { border-radius: 2px; }
.o-arc { border-radius: 999px 999px 0 0; }
.o-bar { border-radius: 99px; }
.o-tri { width: 0 !important; height: 0 !important; background: transparent !important; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: flex; align-items: center; padding-top: 68px; }
.hero__shapes { position: absolute; inset: 0; }
.hero .o-circle { width: clamp(120px, 20vw, 260px); height: clamp(120px, 20vw, 260px); background: var(--red); top: 12%; right: 8%; }
.hero .o-square { width: clamp(80px, 12vw, 150px); height: clamp(80px, 12vw, 150px); background: var(--blue); bottom: 14%; left: 6%; transform: rotate(18deg); }
.hero .o-arc { width: clamp(120px, 18vw, 220px); height: calc(clamp(120px, 18vw, 220px) / 2); background: var(--yellow); top: 20%; left: 12%; }
.hero .o-ring { width: clamp(90px, 14vw, 170px); height: clamp(90px, 14vw, 170px); border: 8px solid var(--ink); bottom: 10%; right: 16%; }
.hero .o-bar { width: clamp(160px, 26vw, 360px); height: 8px; background: var(--ink); top: 30%; right: 20%; }
.hero .o-tri { border-left: 60px solid transparent; border-right: 60px solid transparent; border-bottom: 104px solid var(--red); bottom: 22%; right: 34%; }

.hero__in { position: relative; z-index: 2; width: 100%; }
.hero__cat { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--ink-2); margin-bottom: clamp(24px, 5vw, 48px); }
.hero__title { font-family: var(--poster); line-height: 0.9; letter-spacing: -0.01em; }
.hero__title .l1 { display: block; font-size: clamp(3.6rem, 17vw, 12rem); }
.hero__title .l2 { display: block; font-size: clamp(3.6rem, 17vw, 12rem); color: transparent; -webkit-text-stroke: clamp(1.5px, 0.35vw, 3px) var(--ink); }
.hero__title .l1 em { font-style: normal; color: var(--red); }
.hero__sub {
  max-width: 40ch; margin-top: clamp(22px, 4vw, 38px);
  font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--ink-2); line-height: 1.85;
}
.hero__sub b { color: var(--ink); font-weight: 700; }
.hero__scroll { margin-top: clamp(30px, 5vw, 52px); display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.hero__scroll .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--canvas); overflow: hidden; border-block: 2px solid var(--ink); padding: 14px 0; }
.marquee__track { display: inline-flex; align-items: center; white-space: nowrap; will-change: transform; animation: marq 26s linear infinite; }
.marquee__track span { font-family: var(--poster); font-size: clamp(1.3rem, 3vw, 2.1rem); padding: 0 26px; letter-spacing: 0.01em; }
.marquee__track .star { color: var(--yellow); font-family: var(--sans); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- 섹션 공통 ---------- */
.sec { position: relative; overflow: hidden; padding-block: clamp(84px, 13vw, 170px); }
.sec--canvas2 { background: var(--canvas-2); }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(34px, 5vw, 60px); }
.sec-head .no { color: var(--red); }
.sec-head h2 { font-family: var(--poster); font-size: clamp(2rem, 6vw, 4.2rem); line-height: 1; letter-spacing: -0.01em; }

/* statement */
.statement { position: relative; z-index: 2; }
.statement p { font-family: var(--poster); font-size: clamp(1.7rem, 5.2vw, 3.6rem); line-height: 1.28; letter-spacing: -0.01em; max-width: 20ch; }
.statement p .red { color: var(--red); }
.statement p .blue { color: var(--blue); }
.statement p .out { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.statement__note { font-family: var(--sans); font-size: 1.04rem; font-weight: 400; color: var(--ink-2); max-width: 52ch; margin-top: clamp(28px, 4vw, 44px); line-height: 1.9; }

.sec .o-circle.deco { width: clamp(90px, 13vw, 190px); height: clamp(90px, 13vw, 190px); }
.sec .o-square.deco { width: clamp(70px, 10vw, 140px); height: clamp(70px, 10vw, 140px); }
.sec .o-ring.deco { border: 7px solid var(--ink); }

/* ---------- works (관리 = 작품 목록) ---------- */
.works { border-top: 2px solid var(--ink); position: relative; z-index: 2; }
.work {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 3vw, 34px) 0; border-bottom: 2px solid var(--ink);
  position: relative; transition: color 0.35s;
}
.work__no { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2); transition: color 0.35s; }
.work__body { position: relative; z-index: 2; }
.work__name { font-family: var(--poster); font-size: clamp(1.5rem, 4vw, 2.6rem); line-height: 1; letter-spacing: -0.01em; }
.work__desc { font-size: 0.94rem; color: var(--ink-2); margin-top: 8px; transition: color 0.35s; }
.work__meta { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; color: var(--ink-2); transition: color 0.35s; z-index: 2; }
.work__fill { position: absolute; inset: 0; background: var(--wc, var(--red)); transform: scaleY(0); transform-origin: 50% 100%; transition: transform 0.4s cubic-bezier(.5,0,.2,1); z-index: 1; }
.work:hover .work__fill { transform: scaleY(1); }
.work:hover, .work:hover .work__no, .work:hover .work__desc, .work:hover .work__meta { color: var(--canvas); }
.work__body, .work__meta, .work__no { position: relative; z-index: 2; }
.works-note { font-size: 0.86rem; color: var(--ink-2); margin-top: 26px; line-height: 1.75; }

/* ---------- pinned stage (스크롤 회전 오브젝트) ---------- */
.stage { position: relative; height: 320vh; }
.stage__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.stage__glyph {
  position: absolute; z-index: 1;
  width: min(78vw, 640px); height: min(78vw, 640px);
  transform: rotate(calc(var(--p, 0) * 300deg)) scale(calc(0.7 + var(--p, 0) * 0.5));
  will-change: transform;
}
.stage__glyph svg { width: 100%; height: 100%; display: block; }
.stage__lines { position: relative; z-index: 2; text-align: center; padding-inline: var(--pad); }
.stage__line {
  font-family: var(--poster); font-size: clamp(1.8rem, 6vw, 4.4rem); line-height: 1.15;
  letter-spacing: -0.01em; opacity: 0.16; transition: opacity 0.4s, color 0.4s;
}
.stage__line.on { opacity: 1; }
.stage__line.on .k { color: var(--red); }
.stage__cap { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-top: 22px; }

/* ---------- studio ---------- */
.studio-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 72px); align-items: center; position: relative; z-index: 2; }
.studio-grid p { font-size: 1.06rem; color: var(--ink-2); line-height: 1.95; max-width: 46ch; }
.studio-grid p + p { margin-top: 1.1em; }
.studio-card {
  aspect-ratio: 4 / 5; border: 2px solid var(--ink); border-radius: 4px;
  background:
    radial-gradient(circle at 72% 24%, var(--yellow) 0 14%, transparent 14.5%),
    linear-gradient(135deg, transparent 46%, var(--blue) 46% 54%, transparent 54%),
    var(--canvas);
  position: relative; overflow: hidden;
}
.studio-card::after {
  content: "無"; position: absolute; left: 26px; bottom: 8px;
  font-family: var(--poster); font-size: clamp(90px, 20vw, 200px); color: var(--red); line-height: 0.8;
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chips span { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; }

/* ---------- visit ---------- */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; position: relative; z-index: 2; }
.facts { border-top: 2px solid var(--ink); }
.fact { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1.5px solid var(--line); }
.fact dt { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); padding-top: 4px; }
.fact dd { font-size: 1.04rem; }
.fact dd small { display: block; font-size: 0.86rem; color: var(--ink-2); margin-top: 4px; }
.map { border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; filter: grayscale(0.3) contrast(1.05); }
.disclaimer { grid-column: 1 / -1; font-size: 0.82rem; color: var(--ink-2); line-height: 1.7; margin-top: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--canvas); padding-block: clamp(64px, 9vw, 110px) 36px; overflow: hidden; position: relative; }
.foot-mark { font-family: var(--poster); font-size: clamp(3rem, 13vw, 10rem); line-height: 0.9; letter-spacing: -0.01em; }
.foot-mark i { font-style: normal; color: var(--red); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-end; padding-bottom: clamp(34px, 5vw, 52px); border-bottom: 1px solid rgba(235,231,219,.2); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-nav a { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(235,231,219,.7); transition: color 0.2s; }
.foot-nav a:hover { color: var(--yellow); }
.biz { padding-top: 30px; font-size: 0.86rem; line-height: 1.9; color: rgba(235,231,219,.66); }
.biz .row { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.biz b { color: rgba(235,231,219,.9); font-weight: 700; margin-right: 5px; }
.biz .copy { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 18px; color: rgba(235,231,219,.5); }
.biz .copy a { border-bottom: 1px solid rgba(235,231,219,.35); }
.biz .copy a:hover { color: var(--yellow); border-color: var(--yellow); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 서브페이지 ---------- */
.doc-hero { padding: calc(68px + clamp(40px,7vw,80px)) 0 clamp(28px,4vw,44px); border-bottom: 2px solid var(--ink); }
.doc-hero h1 { font-family: var(--poster); font-size: clamp(2.2rem, 7vw, 4rem); margin-top: 12px; }
.doc { padding-block: clamp(44px, 6vw, 72px); max-width: 800px; }
.doc h2 { font-family: var(--sans); font-weight: 700; font-size: 1.14rem; margin: 38px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin-bottom: 14px; }
.doc ul { list-style: disc; padding-left: 20px; margin-bottom: 16px; }
.doc li { margin-bottom: 7px; }
.doc .meta { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); margin-bottom: 26px; }

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .studio-grid, .visit-grid { grid-template-columns: 1fr; }
  .studio-card { max-width: 420px; }
}
@media (max-width: 720px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--canvas); border-bottom: 2px solid var(--ink); padding: 6px var(--pad) 24px;
    transform: translateY(-140%); transition: transform 0.4s cubic-bezier(.4,0,.2,1);
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { width: 100%; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .work { grid-template-columns: auto 1fr; }
  .work__meta { grid-column: 2; grid-row: 2; justify-self: start; }
  .stage { height: 300vh; }
}
@media (max-width: 480px) {
  .hero .o-tri, .hero .o-bar { display: none; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
  .fact dt { padding-top: 0; }
}

/* ---------- 모션 최소화 ---------- */
@media (prefers-reduced-motion: reduce) {
  .floaty { transform: none !important; }
  .spin-slow, .spin-rev, .marquee__track, .hero__scroll .dot { animation: none !important; }
  .stage__glyph { transform: rotate(30deg) scale(1) !important; }
  .stage__line { opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
