:root {
  --bg: #efeeea;
  --surface: #e3e2dd;
  --tone: #d2d0c8;
  --ink: #2b2a28;
  --muted: #4a4640;
  --accent: #7d5f25;
  --accent-ink: #ffffff;
  --dark: #2b2a28;
  --dark-ink: #efeeea;
  --dark-muted: #d2d0c8;

  --m: clamp(16px, 2.4vw, 32px);
  --gap: 12px;
  --s-small: 14px;
  --s-body: 17px;
  --s-lead: 22px;
  --s-head: 32px;
  --s-display: clamp(40px, 4.6vw, 66px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s-body);
  line-height: 1.6;
  letter-spacing: 0;
  word-break: keep-all;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h2 { font-size: var(--s-head); }
h3 { font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; }
p { margin: 0; max-width: 60ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--m); background: var(--bg);
  position: sticky; top: 0; z-index: 5;
}
.mark { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; }
.links { display: flex; gap: 28px; font-size: var(--s-small); }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* buttons: square, one fill, one radius (0) */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 17px/1 var(--sans); text-decoration: none; border: 0;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
  cursor: pointer;
}
.btn:hover { background: #6a4f1d; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-line { background: var(--tone); color: var(--ink); }
.btn-line:hover { background: #c9bfa9; }

/* hero: sheet of photographs with a text cell */
.hero { padding: 0 var(--m) var(--m); }
.sheet {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: auto auto;
  gap: var(--gap);
  align-items: start;
  min-height: calc(100svh - 80px);
}
.col { display: flex; flex-direction: column; gap: var(--gap); }
.c1 { grid-column: 1; grid-row: 1; }
.c2 { grid-column: 2; grid-row: 1; margin-top: 90px; }
.c5 { grid-column: 5; grid-row: 1; margin-top: 40px; }
.c6 { grid-column: 6; grid-row: 1; margin-top: 150px; }
.panel {
  grid-column: 3 / 5; grid-row: 1;
  margin-top: 28vh; padding: 28px;
  background: var(--dark); color: var(--dark-ink);
  display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.panel h1 { font-size: var(--s-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; }
.lead { font-size: var(--s-lead); line-height: 1.5; color: var(--dark-ink); }
.panel .btn { background: var(--accent); }
.panel .btn:hover { background: #95742e; }
.panel-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--s-small); }
.panel-links a { color: var(--dark-ink); text-underline-offset: 4px; }
.hf { margin: 0; display: flex; flex-direction: column; }
.hf img { width: 100%; object-fit: cover; }
.h-tall img { height: 360px; }
.h-short img { height: 230px; }
.cap {
  padding: 7px 10px; font-size: 14px; line-height: 1.4; color: var(--ink);
}
.s1 { background: var(--surface); }
.s2 { background: var(--tone); }
.s3 { background: var(--dark); color: var(--dark-ink); }
.s4 { background: var(--accent); color: var(--accent-ink); }
.hero-big {
  grid-column: 3 / 5; grid-row: 2; margin-top: var(--gap);
}
.hero-big img { height: 520px; }
.shutter img { clip-path: inset(0 0 0 0); }

/* sections common */
section { padding: 140px var(--m); }
.reveal { will-change: auto; }

/* work: sticky side + one strip per project */
.work { display: flex; flex-direction: column; gap: 64px; padding-top: 120px; }
.work-side { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 32px; align-items: start; }
.work-side h2 { font-size: var(--s-head); }
.note { font-size: var(--s-small); color: var(--muted); line-height: 1.6; }
.filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 20px; justify-self: end; }
.filter {
  font: 500 14px/1 var(--sans); background: transparent; color: var(--muted);
  border: 0; padding: 6px 0; cursor: pointer; letter-spacing: -0.01em;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.filter:hover { color: var(--ink); transform: translateX(3px); }
.filter[aria-pressed="true"] { color: var(--ink); font-weight: 700; }
.runs { display: flex; flex-direction: column; gap: 56px; min-width: 0; }
.run h3 { font-size: 17px; font-weight: 500; color: var(--ink); margin-bottom: 10px; }
.frames { display: flex; flex-wrap: wrap; gap: 8px; }
.f { height: 230px; width: auto; object-fit: cover; flex: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.f.s { width: 180px; }
.f.l { width: 340px; }
.f.m { width: 290px; }
.run.off .f { opacity: .18; }
.run:hover .f { transform: translateY(-2px); }
.archive { margin: 40px 0 0; max-width: 720px; }
.archive img { width: 100%; height: auto; }
.archive figcaption, .contact-map figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* how */
.how { background: var(--surface); }
.how-lead { font-size: var(--s-lead); line-height: 1.5; max-width: 34ch; margin: 24px 0 56px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.step img, .step video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.step p { font-size: var(--s-body); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .clip { display: none; }
}

/* about */
.about { display: flex; flex-direction: column; gap: 56px; padding-bottom: 120px; }
.about h2 { max-width: 16ch; }
.facts {
  margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding: 24px 0 0;
  background: transparent;
}
.facts div { background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.facts dt { font-size: var(--s-small); color: var(--muted); }
.facts dd { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.3; }
.statement { font-size: 32px; line-height: 1.4; letter-spacing: -0.01em; max-width: 30em; }

/* price */
.price { background: var(--bg); }
.price-pick { font-size: var(--s-lead); margin: 22px 0 40px; line-height: 1.5; }
table { width: 100%; border-collapse: collapse; font-size: var(--s-body); }
th, td { text-align: left; vertical-align: top; padding: 20px 16px; }
thead th { font-size: var(--s-small); font-weight: 700; color: var(--muted); }
tbody tr:nth-child(odd) { background: var(--surface); }
tbody th { font-weight: 500; font-size: var(--s-small); color: var(--muted); width: 22%; }
tbody td { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; width: 26%; }
.price-note { margin-top: 20px; font-size: var(--s-small); color: var(--muted); }

/* faq */
.faq { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.faq h2 { font-size: var(--s-head); }
.qa { columns: 2; column-gap: 56px; font-size: 17px; line-height: 1.7; }
.qa p { break-inside: avoid; margin-bottom: 26px; }
.qa strong { font-weight: 700; display: block; margin-bottom: 4px; font-size: 17px; }

/* contact: dark field */
.contact { background: var(--dark); color: var(--dark-ink); padding-top: 160px; padding-bottom: 120px; }
.contact-line { font-size: 32px; line-height: 1.35; max-width: 22ch; letter-spacing: -0.02em; }
.contact-body { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.ask { display: flex; flex-direction: column; gap: 16px; }
.ask label { display: flex; flex-direction: column; gap: 6px; font-size: var(--s-small); color: var(--dark-muted); }
.ask input, .ask select, .ask textarea {
  font: 400 17px/1.4 var(--sans); color: var(--dark-ink); background: #3a342e;
  border: 0; padding: 12px 14px; border-radius: 0; width: 100%;
}
.ask-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact .btn { background: var(--accent); }
.contact .btn-line { background: #3a342e; color: var(--dark-ink); }
.contact .btn-line:hover { background: #4a433b; }
.ask-mail { font-size: var(--s-small); color: var(--dark-muted); }
.ask-mail a { color: var(--dark-ink); text-underline-offset: 4px; }
.contact-map img { width: 100%; height: auto; }
.contact-map figcaption { color: var(--dark-muted); }
.contact-meta { grid-column: auto; font-size: var(--s-small); color: var(--dark-muted); }

/* footer */
.foot { padding: 30vh var(--m) 30px; }
.foot-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-size: var(--s-small); gap: 16px; }
.foot-line > span:last-child { justify-self: end; }
.foot-links { display: flex; gap: 24px; }
.foot-links a, .foot-line a { text-decoration: none; }
.credits li { max-width: 60ch; }
.credits { margin-top: 24px; font-size: 16px; color: var(--muted); }
.credits summary { cursor: pointer; color: var(--ink); }
.credits ul { margin: 12px 0 0; padding-left: 18px; line-height: 1.6; }

/* motion: entrance and moving pictures; content is visible without JS */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .shutter img { clip-path: inset(0 0 0 100%); transition: clip-path 1.1s var(--ease); }
.js .shutter.in img { clip-path: inset(0 0 0 0); }
.js .shutter img { transform: scale(1.12); transition: clip-path 1.1s var(--ease), transform 1.6s var(--ease); }
.js .shutter.in img { transform: scale(1); }
.drift img { transition: transform 9s ease-in-out; }
.drift.in img, .js .drift img { transform: scale(1.04); }
.js .drift.in img { animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.07) translate3d(0, -6px, 0); }
}
.btn, .filter, .f, .links a { transition-property: transform, background-color, color, opacity; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .shutter img, .shutter img { clip-path: none; transform: none; transition: none; }
  .js .drift.in img { animation: none; }
  .drift img { transition: none; transform: none; }
  .btn:active { transform: none; }
}

/* phone */
@media (max-width: 960px) {
  .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { grid-column: 1 / -1; grid-row: 1; margin-top: 0; padding: 24px; }
  .panel h1 { font-size: 40px; }
  .lead { font-size: 17px; }
  .c1 { grid-column: 1; grid-row: 2; }
  .c2 { grid-column: 2; grid-row: 2; margin-top: 60px; }
  .c5 { grid-column: 1; grid-row: 3; margin-top: 0; }
  .c6 { grid-column: 2; grid-row: 3; margin-top: 60px; }
  .hero-big { grid-column: 1 / -1; grid-row: 4; }
  .hero-big img { height: 300px; }
  .h-tall img { height: 260px; }
  .h-short img { height: 170px; }
  .work-side { grid-template-columns: 1fr; }
  .filters { justify-self: start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq { grid-template-columns: 1fr; }
  .contact-body { grid-template-columns: 1fr; }
  .contact-meta { grid-column: auto; }
  .links { display: none; }
}
@media (max-width: 760px) {
  section { padding: 96px var(--m); }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .statement { font-size: 22px; }
  .f { height: 170px; }
  .f.s { width: 120px; }
  .f.m { width: 180px; }
  .qa { columns: 1; }
  table thead { display: none; }
  table, tbody, tr, th, td { display: block; width: 100%; }
  tbody td { font-size: 17px; padding-top: 0; }
  tbody th { padding-bottom: 0; }
  .foot-line { grid-template-columns: 1fr; }
  .foot-line > span:last-child { justify-self: start; }
  .contact-line { font-size: 22px; }
  .panel h1 { font-size: 40px; }
}

/* work opener: full-bleed material picture above the 시공사례 heading */
.work-open { margin: 0 calc(var(--m) * -1); }
.work-open img { width: 100%; height: 56vh; object-fit: cover; }
.work-open figcaption { padding: 10px var(--m); font-size: 14px; color: var(--muted); }
