/* BERYON STUDIO — Brand A · Quiet Gallery */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist/geist-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist/geist-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist/geist-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #F4F3F0;
  --ink: #151515;
  --stone: #66635E;
  --line: #DAD8D3;
  --night: #1D2B3D;
  --white: #FFFFFF;
  --err: #9B2C2C;

  --font: "Geist", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --g: clamp(16px, 2vw, 28px);       /* 화면 가장자리 여백 */
  --gap: clamp(10px, 1.2vw, 16px);   /* 이미지 사이 간격 */
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100svh; display: flex; flex-direction: column; /* 내용이 짧아도 하단 글자는 화면 맨 아래에 */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--night); outline-offset: 3px; }

.bar { padding-inline: var(--g); }
main { flex: 1 0 auto; }
.muted { color: var(--stone); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; }
.ko { word-break: keep-all; line-height: 1.75; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--g); top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 14px; font-size: 14px; }
.skip:focus { top: 12px; }

.link-line { border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color .2s; }
.link-line:hover { color: var(--night); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--ink); color: var(--paper);
  border: 0; font-size: 14px; letter-spacing: 0.02em; cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--night); }
.btn:disabled { opacity: .6; cursor: progress; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.wordmark-svg { height: 15px; width: auto; }
.nav { display: flex; gap: 32px; font-size: 14px; }
.nav a { padding: 12px 0; }
.nav a[aria-current="page"] { border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.nav a:hover { color: var(--night); }
.menu-btn { display: none; min-height: 44px; padding: 0 4px; background: none; border: 0; font-size: 14px; cursor: pointer; }

@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--g) 20px;
  }
  .nav a { padding: 14px 0; font-size: 22px; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--night); }
  .menu-open .nav { display: flex; }
}

/* ---------------------------------------------------------------- footer */

/* 하단: 디놈처럼 가운데 회색 한 줄 (로고·구분선 없음) */
.footer-line {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 24px;
  padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(28px, 3vw, 40px);
  font-size: 13px; color: var(--stone); text-align: center;
}
.footer-line a { transition: color .2s; }
.footer-line a:hover { color: var(--ink); }
@media (max-width: 640px) { .footer-line .copy { order: 3; flex-basis: 100%; } }

/* ---------------------------------------------------------------- page head */
.page-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(24px, 3vw, 40px);
}
.page-head h1 { font-size: clamp(34px, 4.4vw, 60px); font-weight: 500; letter-spacing: -0.025em; line-height: 1; }

/* ---------------------------------------------------------------- caption (미르식: 하단 가운데) */
.cap {
  position: absolute; left: 16px; right: 16px; bottom: clamp(16px, 1.8vw, 22px); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center; color: var(--white); text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
  pointer-events: none; font-weight: 400;
}
.cap-client { font-size: 13px; letter-spacing: 0.01em; }
.cap-name { font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; letter-spacing: -0.005em; line-height: 1.25; }

/* ---------------------------------------------------------------- work = 첫 화면 (디놈식: 원본 비율 그대로 2열로 쌓기) */
.work-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); align-items: start;
  padding-top: 4px; padding-bottom: var(--gap);
}
.work-list.is-single { grid-template-columns: 1fr; }
.w-col { display: flex; flex-direction: column; gap: var(--gap); }
.w-item { position: relative; display: block; overflow: hidden; background: var(--line); }
.w-img { display: block; }
.w-img img { display: block; width: 100%; height: auto; transition: transform 1.2s var(--ease); }
.w-item:hover .w-img img { transform: scale(1.02); }
.w-item::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 35%; background: linear-gradient(to top, rgba(0, 0, 0, .22), transparent); pointer-events: none; }
@media (max-width: 640px) {
  /* 휴대폰: 한 줄로, 최신 순서 그대로 */
  .work-list { display: flex; flex-direction: column; }
  .w-col { display: contents; }
}

/* ---------------------------------------------------------------- project (이미지만, 미르식 줄 배치) */
.pf {
  container-type: inline-size;
  --rowmax: min(calc(100svh - var(--header-h) - 48px), 1000px);
  --rowgap: clamp(40px, 7vw, 112px);
  display: flex; flex-direction: column; gap: var(--rowgap);
  padding-top: 4px; padding-bottom: var(--rowgap);
}
.shot { scroll-margin-top: calc(var(--header-h) + 16px); }
.pf-hero { position: relative; }
.pf-hero img { width: 100%; background: var(--line); }
/* 한 줄의 높이 = 화면 높이에 맞추되, 이미지들이 가로 폭을 넘으면 그만큼 낮춤 → 자르지 않고 가운데 정렬 */
.pf-row {
  display: flex; justify-content: center; gap: var(--gap);
  height: min(var(--rowmax), calc((100cqw - (var(--n) - 1) * var(--gap)) / var(--sum) - 1px));
}
.pf-row .shot { flex: none; height: 100%; }
.pf-row .zoom { height: 100%; }
.pf-row img { height: 100%; width: auto; max-width: none; background: var(--line); }
@media (max-width: 640px) {
  .pf { --rowgap: 24px; }
  .pf-row { flex-direction: column; height: auto; gap: var(--rowgap); }
  .pf-row .shot, .pf-row .zoom { height: auto; }
  .pf-row img { width: 100%; height: auto; }
}

.next-project { border-top: 1px solid var(--line); }
.next-project a {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 200px; padding: 24px var(--g); text-align: center;
}
.np-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone); }
.np-title { font-size: clamp(17px, 1.4vw, 20px); font-weight: 500; }
.np-arrow { transition: transform .4s var(--ease); }
.next-project a:hover .np-title { color: var(--night); }
.next-project a:hover .np-arrow { transform: translateX(6px); }

/* ---------------------------------------------------------------- about (디놈 Home식: 왼쪽 이미지 / 오른쪽 글) */
.about {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px);
  min-height: calc(100svh - var(--header-h) - 4px); padding-top: 4px;
}
.about-img { position: relative; overflow: hidden; background: var(--line); min-height: 480px; }
.about-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-text {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(40px, 5vw, 80px) clamp(0px, 3vw, 56px);
}
.about-logo { color: var(--ink); }
.about-logo .logo-svg { width: clamp(170px, 15vw, 220px); height: auto; }
.about-tag {
  margin-top: clamp(28px, 3vw, 40px); text-align: center;
  font-weight: 300; font-size: clamp(18px, 1.6vw, 24px); letter-spacing: 0.08em; line-height: 1.5;
}
.about-body { width: 100%; max-width: 540px; display: flex; flex-direction: column; gap: 14px; font-size: 14.5px; line-height: 1.85; }
.about-body.ko { margin-top: clamp(40px, 4vw, 56px); }
.about-body.en { margin-top: 40px; color: var(--stone); line-height: 1.7; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; min-height: 0; }
  .about-img { min-height: 0; aspect-ratio: 4 / 5; }
  .about-text { padding: 48px 0 24px; }
}

/* ---------------------------------------------------------------- contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(32px, 5vw, 80px); padding-bottom: clamp(56px, 7vw, 104px); }
.contact-info dl { display: flex; flex-direction: column; }
.contact-info dl div { display: grid; grid-template-columns: 100px 1fr; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.contact-info dl div:last-child { border-bottom: 1px solid var(--line); }
.contact-info dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--stone); text-transform: uppercase; padding-top: 3px; }
.contact-info a:hover { color: var(--night); }
.note { margin-top: 20px; font-size: 14px; word-break: keep-all; line-height: 1.7; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }

.form { display: flex; flex-direction: column; gap: 20px; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 640px) { .frow { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-size: 14px; font-weight: 500; padding: 0; }
.field small { color: var(--stone); font-weight: 400; margin-left: 4px; font-size: 12px; }
.req { color: var(--night); margin-left: 4px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: 0;
  font-size: 16px; transition: border-color .2s;
}
.field textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 1px var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #8C8983; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choices label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); background: var(--white); font-size: 14px; font-weight: 400; cursor: pointer;
}
.choices input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.choices input:focus-visible + label { outline: 2px solid var(--night); outline-offset: 2px; }
.consent { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.65; word-break: keep-all; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; min-height: 44px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form .btn { align-self: flex-start; }
.status { font-size: 14px; min-height: 1.5em; word-break: keep-all; }
.status.ok { color: var(--night); }
.status.err { color: var(--err); }

/* ---------------------------------------------------------------- lightbox */
.zoom { display: block; cursor: zoom-in; }
.lb-open, .lb-open body { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(21, 21, 21, 0.96);
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; min-width: 0; width: 100%; height: 100svh; display: flex; align-items: center; justify-content: center; padding: 56px 0; box-sizing: border-box; }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-btn {
  width: 48px; height: 48px; border: 0; background: transparent; color: #F4F3F0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; justify-self: center;
  opacity: 0.8; transition: opacity .2s;
}
.lb-btn:hover { opacity: 1; }
.lb-btn:focus-visible { outline: 2px solid #F4F3F0; outline-offset: 2px; }
.lb-close { position: absolute; top: 8px; right: 8px; }
.lb-count {
  position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; text-align: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: #B9B6B0;
}
@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { position: absolute; bottom: 4px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-stage { padding: 56px 0 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
