/* MOTOPIA v3 — quiet private studio.
   Layout: split hero (copy | portrait), then calm one-idea sections on a 1200px wrap.
   Palette from the studio itself: plaster ivory, the grey of the portrait backdrop, matte black steel, a trace of brick. */
:root {
  --bg: #f3f0eb;        /* plaster ivory */
  --surface: #e8e3db;   /* deeper plaster */
  --stone: #a49e98;     /* portrait backdrop grey */
  --ink: #23211e;       /* matte black steel */
  --muted: #5f5952;
  --brick: #8a4c39;     /* only for tiny marks */
  --line: rgba(35, 33, 30, .14);
  --kakao: #fee500;

  --serif: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif;

  --wrap: 1200px;
  --side: max(24px, env(safe-area-inset-left, 0px));
  --side-r: max(24px, env(safe-area-inset-right, 0px));
  --sec: clamp(88px, 11vw, 152px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.75; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: -999px; top: 10px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip:focus { left: 10px; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: calc(var(--wrap) + 48px); margin: 0 auto; padding-left: var(--side); padding-right: var(--side-r); }
.sec { padding-block: var(--sec); }

/* type scale (1.25): 14 / 17 / 21 / 28 / 36 / 54 */
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.75rem, 2.6vw, 2.25rem); line-height: 1.4; letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.45; }
.head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.head__note { color: var(--muted); max-width: 34em; justify-self: end; }

/* buttons & links: one button family, one link look */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 2px; border: 1px solid transparent; font-weight: 600; font-size: .98rem; letter-spacing: -0.005em; text-decoration: none; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ink:hover { background: #3a3732; }
.btn--line { border-color: rgba(35,33,30,.4); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); background: rgba(35,33,30,.04); }
.btn--kakao { background: var(--kakao); color: #191919; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: .9rem; }
.link { position: relative; display: inline-block; font-weight: 600; text-decoration: none; padding-bottom: 3px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--ease); }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* nav */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; padding-top: env(safe-area-inset-top, 0px); transition: background-color .3s var(--ease), border-color .3s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(243,240,235,.94); border-color: var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav__in { display: flex; align-items: center; gap: 36px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 36px; height: 36px; }
.brand__name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .02em; }
.nav__links { display: flex; gap: 28px; font-size: .95rem; }
.nav__links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav__links a:hover { color: var(--ink); }
.nav__burger { display: none; width: 44px; height: 44px; border: 0; background: none; position: relative; cursor: pointer; }
.nav__burger i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.nav__burger i:first-of-type { top: 18px; } .nav__burger i:last-of-type { top: 25px; }
.nav__burger[aria-expanded="true"] i:first-of-type { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] i:last-of-type { transform: translateY(-3.5px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 45; background: var(--bg); padding-top: calc(96px + env(safe-area-inset-top, 0px)); overflow-y: auto; }
.menu nav { display: flex; flex-direction: column; }
.menu a { font-family: var(--serif); font-size: 1.6rem; text-decoration: none; padding: 16px 0; border-bottom: 1px solid var(--line); }

/* 1. hero */
.hero { display: grid; grid-template-columns: minmax(0, 54fr) minmax(0, 46fr); min-height: 100svh; }
.hero__copy { display: flex; flex-direction: column; justify-content: center; padding: 120px clamp(32px, 6vw, 96px) 64px max(var(--side), calc((100vw - var(--wrap)) / 2)); }
.hero__place { color: var(--muted); font-size: .95rem; margin-bottom: 28px; }
.hero__title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 3.9vw, 3.5rem); line-height: 1.32; letter-spacing: -0.035em; }
.hero__lead { margin-top: 28px; max-width: 30em; color: var(--muted); }
.hero__actions { display: flex; align-items: center; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); max-width: 520px; }
.hero__facts div { padding-top: 16px; }
.hero__facts dt { font-size: .82rem; color: var(--muted); }
.hero__facts dd { margin: 2px 0 0; font-weight: 600; font-size: .98rem; }
.hero__photo { position: relative; overflow: hidden; background: var(--stone); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* the one entrance: copy rises, portrait settles */
@media (prefers-reduced-motion: no-preference) {
  .hero__photo img { animation: settle 1.8s var(--ease) both; }
}
@keyframes settle { from { transform: scale(1.045); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* 2. cases */
.cases__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: 48px; align-items: start; }
.compare { position: relative; overflow: hidden; aspect-ratio: 870 / 607; background: var(--surface); cursor: ew-resize; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: #fff; pointer-events: none; }
.compare__line i { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.compare__line i::before, .compare__line i::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.compare__line i::before { left: 11px; transform: translateY(-50%) rotate(-45deg); }
.compare__line i::after { right: 11px; transform: translateY(-50%) rotate(135deg); }
.compare__tag { position: absolute; top: 16px; padding: 4px 12px; background: rgba(243,240,235,.92); font-size: .85rem; font-weight: 600; pointer-events: none; }
.compare__tag--l { left: 16px; } .compare__tag--r { right: 16px; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:focus-within .compare__line i { outline: 2px solid var(--ink); outline-offset: 3px; }
.cases__pick { display: grid; border-top: 1px solid var(--line); }
.cases__pick button { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 56px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--muted); transition: color .2s; }
.cases__pick button b { font-weight: 600; }
.cases__pick button span { font-size: .92rem; }
.cases__pick button:hover, .cases__pick button[aria-pressed="true"] { color: var(--ink); }
.cases__pick button[aria-pressed="true"] b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brick); margin-right: 10px; vertical-align: middle; }
.cases__fine { margin: 24px 0; color: var(--muted); font-size: .92rem; }
.reels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.reels video { width: 100%; aspect-ratio: 870 / 1350; object-fit: cover; background: var(--surface); }
.reels__note { margin-top: 14px; color: var(--muted); font-size: .9rem; }

/* 3. voice */
.voice { background: var(--surface); }
.voice__in { display: flex; justify-content: center; }
.voice__quote { max-width: 760px; margin: 0; }
.voice__lead { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.6; letter-spacing: -0.03em; }
.voice__body { margin-top: 28px; color: var(--muted); font-size: 1.05rem; line-height: 1.9; }
.voice__src { margin-top: 28px; font-size: .92rem; color: var(--muted); }
.voice__src a { color: var(--ink); text-underline-offset: 4px; }

/* 4. director */
.director { background: var(--stone); color: #fff; }
.director__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 3fr); gap: clamp(32px, 4vw, 64px); align-items: end; }
.director__main img, .director__sub img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.director__sub { align-self: start; }
.director__copy { padding-bottom: 8px; }
.director__role { margin-top: 8px; color: rgba(255,255,255,.82); font-size: .95rem; }
.director__text { margin-top: 28px; color: rgba(255,255,255,.92); }
.creds { margin-top: 36px; border-top: 1px solid rgba(255,255,255,.35); }
.creds li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.25); font-size: .95rem; }
.creds span { color: rgba(255,255,255,.78); }

/* 5. services */
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.svc li { padding: 28px 32px 8px 0; }
.svc li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.svc p { margin-top: 10px; color: var(--muted); }
.svc__extra { margin-top: 48px; padding: 24px 28px; background: var(--surface); color: var(--muted); max-width: 820px; }
.svc__extra b { color: var(--ink); margin-right: 10px; }

/* 6. process */
.process { background: var(--surface); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { border-top: 1px solid var(--ink); padding-top: 24px; }
.steps__n { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--brick); line-height: 1; margin-bottom: 18px; }
.steps p { margin-top: 10px; color: var(--muted); font-size: .98rem; }
.hygiene { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); max-width: 820px; }
.hygiene b { color: var(--ink); margin-right: 10px; }

/* 7. space */
.space__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; gap: 16px; }
.space__grid figure { overflow: hidden; }
.space__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.space__grid figure:hover img { transform: scale(1.025); }
.space__a { grid-row: 1 / span 2; aspect-ratio: 4 / 5; }
.space__b, .space__c { aspect-ratio: 3 / 2; }
.space__b { align-self: end; }

/* 8. faq */
.faq__in { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; }
.faq__list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 22px 44px 22px 0; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details p { padding-bottom: 24px; color: var(--muted); max-width: 40em; }

/* 9. visit */
.visit { background: var(--surface); }
.visit__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.visit__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.visit__lead { margin-top: 20px; color: var(--muted); max-width: 30em; }
.visit__dl { margin-top: 36px; border-top: 1px solid var(--ink); }
.visit__dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.visit__dl dt { color: var(--muted); }
.visit__dl dd { margin: 0; }
.visit__dl a { text-underline-offset: 4px; }
.visit__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* footer */
.footer { padding-block: 56px calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer__in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 48px; align-items: start; }
.brand--foot img { width: 44px; height: 44px; }
.footer__note, .footer__info { grid-column: 2; color: var(--muted); font-size: .88rem; max-width: 52em; }
.footer__info a { color: var(--ink); text-underline-offset: 3px; }

.dock { display: none; }

/* responsive */
@media (max-width: 1000px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__cta { display: none; }
  .head { grid-template-columns: 1fr; }
  .head__note { justify-self: start; }
  .cases__grid { grid-template-columns: 1fr; gap: 28px; }
  .director__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .director__copy { grid-column: 1 / -1; order: -1; padding-bottom: 0; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .faq__in { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__photo { order: -1; height: 62svh; margin-top: 72px; }
  .hero__copy { padding: 40px var(--side-r) 64px var(--side); }
  .svc { grid-template-columns: 1fr; }
  .svc li, .svc li + li { padding: 24px 0 20px; border-left: 0; border-top: 1px solid var(--line); }
  .svc li:first-child { border-top: 0; }
  .visit__in { grid-template-columns: 1fr; }
  .visit__photo { order: 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero__title { font-size: 2.05rem; }
  .hero__facts { grid-template-columns: 1fr; gap: 0; }
  .hero__facts div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .hero__facts dd { margin: 0; }
  .hero__actions .btn { width: 100%; }
  .compare { aspect-ratio: 4 / 3; }
  .reels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 48px; }
  .director__in { grid-template-columns: 1fr; }
  .director__sub { display: none; }
  .steps { grid-template-columns: 1fr; }
  .space__grid { grid-template-columns: 1fr; }
  .space__a { grid-row: auto; aspect-ratio: 4 / 3; }
  .visit__actions .btn { width: 100%; }
  .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .footer__in { grid-template-columns: 1fr; }
  .footer__note, .footer__info { grid-column: 1; }
  .dock { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px var(--side-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--side); background: rgba(243,240,235,.96); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .35s var(--ease); }
  .dock.is-on { transform: none; }
  .dock .btn { min-height: 50px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* director band matches the portrait backdrop; ink text for contrast (≈5:1) */
:root { --stone: #918986; }
.director__role, .creds span { color: #1f1d1a; }
.director { color: var(--ink); }
.director__role { color: #2f2c28; }
.director__text { color: #1f1d1a; }
.creds { border-top-color: rgba(35,33,30,.45); }
.creds li { border-bottom-color: rgba(35,33,30,.22); }
.creds span { color: #2f2c28; }

.director { background: #9b9490; }
.director .director__role, .director .creds span { color: #1a1816; }

/* ===== v3.1 (Codex review) ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero__photo img { animation: settle-scale 1.6s var(--ease) both; }
}
@keyframes settle-scale { from { transform: scale(1.04); } to { transform: none; } }
@media (max-width: 1000px) {
  .dock { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px var(--side-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--side); background: rgba(243,240,235,.96); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .35s var(--ease); }
  .dock.is-on { transform: none; }
  .dock .btn { min-height: 50px; padding: 0 12px; }
  .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 900px) {
  .hero__photo { order: 0; height: 58svh; margin-top: 0; }
  .hero__copy { padding-top: calc(104px + env(safe-area-inset-top, 0px)); padding-bottom: 48px; }
}
.cases__fine, .reels__note, .hero__facts dt, .voice__src, .footer__note, .footer__info { font-size: 1rem; }

/* ===== v4 motion layer: quiet luxury, alive ===== */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.line-mask { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

/* the moment: dot by dot */
.dots { background: var(--bg); }
.dots__pin { min-height: 100svh; display: flex; align-items: center; padding-block: 96px; }
.dots__in { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.dots__stage { position: relative; aspect-ratio: 5 / 4; background: #dccbbd; overflow: hidden; }
.dots__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dots__meter { position: absolute; left: 20px; bottom: 18px; background: rgba(243,240,235,.92); padding: 6px 14px; font-weight: 600; font-size: .92rem; }
.dots__steps { margin-top: 40px; border-top: 1px solid var(--line); counter-reset: d; }
.dots__steps li { display: grid; gap: 4px; padding: 18px 0 18px 36px; border-bottom: 1px solid var(--line); position: relative; color: var(--muted); transition: color .5s var(--ease); }
.dots__steps li::before { counter-increment: d; content: counter(d); position: absolute; left: 0; top: 18px; font-family: var(--serif); color: var(--brick); }
.dots__steps li b { color: inherit; font-weight: 600; font-size: 1.08rem; }
.dots__steps li.is-on { color: var(--ink); }
.dots__steps li span { font-size: .98rem; }

/* space: horizontal track */
.space { overflow: hidden; }
.space__track { display: flex; gap: 20px; align-items: flex-end; will-change: transform; }
.space__track figure { flex: 0 0 auto; overflow: hidden; }
.space__track img { width: 100%; height: 100%; object-fit: cover; }
.t1, .t3, .t5 { width: min(58vw, 760px); aspect-ratio: 3 / 2; }
.t2, .t4 { width: min(28vw, 360px); aspect-ratio: 2 / 3; }
.t2 { align-self: flex-start; }

/* reveal helpers (JS adds; content is visible without JS) */
.rv-img { overflow: hidden; }
@media (max-width: 1000px) {
  .dots__in { grid-template-columns: 1fr; }
  .dots__pin { padding-block: 72px; }
  .space__track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: calc(-1 * var(--side-r)); }
  .space__track figure { scroll-snap-align: start; }
  .t1, .t3, .t5 { width: 82vw; } .t2, .t4 { width: 52vw; }
}
@media (max-width: 640px) {
  .dots__stage { aspect-ratio: 4 / 3; }
  .dots__steps { margin-top: 24px; }
}
/* nav hides while reading down, returns on the way up */
.nav { transition: transform .45s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease); }
.nav.is-hidden { transform: translateY(-100%); }

html, body { overflow-x: clip; }
/* gallery works without JS / under reduced motion: native horizontal scroll */
.space__track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
.space__track figure { scroll-snap-align: start; }
.space__track::-webkit-scrollbar { height: 4px; }
.space__track::-webkit-scrollbar-thumb { background: rgba(35,33,30,.25); }
.steps p, .dots__steps li span { font-size: 1rem; }
