/* Plain Water — base styles (아이덴티티 확정 전 임시 타이포) */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #111;
  --max: 1080px;
  --col: 640px;
}
body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.6; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
img, video { display: block; max-width: 100%; }

/* ── 로고타입: 시안 A (fat lowercase, Archivo 900 wide) — 추후 디자이너 SVG로 교체 ── */
.wordmark {
  font-family: 'Archivo', 'Pretendard Variable', sans-serif;
  font-size: clamp(64px, 12vw, 160px);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.055em;
  line-height: 1;
  text-align: center;
}
.wordmark-sm {
  font-family: 'Archivo', 'Pretendard Variable', sans-serif;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  font-size: 18px;
}

.masthead { padding: 56px 24px 40px; }

/* ── 홈 그리드: 작업 적을 땐 큰 셀, 늘어나면 minmax가 3열로 흡수 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.cell { position: relative; }
/* iOS Safari에서 재생 중 video가 탭을 먹는 문제 — 그리드 미디어는 클릭 통과 */
.cell .loop, .cell img, .cell .placeholder { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; pointer-events: none; }
.placeholder { background: linear-gradient(135deg, #e8e6e1, #cfd4d6); }
.placeholder[data-sample]::after {
  content: 'SAMPLE';
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; letter-spacing: 0.3em; color: #999;
}
.contact .intro-line { color: #777; margin-bottom: 10px; max-width: 480px; }

/* ── 프로젝트 상세 ── */
.project {
  max-width: var(--col);
  margin: 0 auto;
  padding: 96px 24px 64px;
  display: flex; flex-direction: column; gap: 28px;
}
.p-title { font-size: 16px; font-weight: 500; text-align: center; }
.credits { display: flex; flex-direction: column; gap: 2px; align-items: center; font-size: 13px; }
.credits div { display: flex; gap: 8px; }
.credits dt { font-weight: 700; }
.sample-note { text-align: center; font-size: 12px; letter-spacing: 0.2em; opacity: 0.6; }

/* YouTube facade — 클릭 시 iframe 로드 */
.yt { position: relative; aspect-ratio: 16 / 9; cursor: pointer; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.yt .play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 40px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── About ── */
.about { max-width: var(--col); margin: 0 auto; padding: 56px 24px; display: flex; flex-direction: column; gap: 40px; }
.intro p + p { margin-top: 14px; }
.intro p[lang="ko"] { color: #555; }
.people { display: flex; flex-direction: column; gap: 24px; }
.person h2 { font-size: 15px; font-weight: 700; }
.person .role { color: #555; }
.selected h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.selected ul { list-style: none; font-size: 13px; color: #333; }

/* ── footer / 404 ── */
.contact { max-width: var(--max); margin: 0 auto; padding: 80px 24px 56px; font-size: 13px; }
.contact p { margin-top: 2px; }
/* 모바일 엄지 미스탭 방지 — 보이는 크기는 그대로, 탭 영역만 확장 */
.contact a, .cheese-toggle {
  display: inline-block;
  padding: 7px 4px;
  margin: -7px -4px;
}
.contact .intro-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 680px;
  color: #777;
  margin: 10px 0 26px;
}
.contact-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px 48px; flex-wrap: wrap; }
.project + .contact, body[style] .contact { color: inherit; }
.nf { min-height: 70vh; display: grid; place-items: center; }

/* ── say cheese 📸 → 하두리캠 팝업 ── */
.cheese { text-align: right; }
.cheese-toggle {
  font: inherit; font-size: 13px; border: 0; background: none; padding: 0;
  cursor: pointer; color: #999;
}
.cheese-toggle:hover { color: #111; }

.had-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: rgba(15, 15, 25, 0.5);
}
.had-overlay[hidden] { display: none; }
/* 모니터가 링라이트가 되는 가장자리 조명 */
.ringlight {
  position: fixed; inset: 0; pointer-events: none;
  border: 16px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 0 70px 20px rgba(255, 246, 228, 0.6);
  animation: ringon 0.7s ease;
}
@keyframes ringon { from { opacity: 0; } to { opacity: 1; } }

/* 옛날 윈도우 창 */
.had-window {
  position: relative;
  width: min(380px, 92vw);
  font-family: Gulim, '굴림', Dotum, '돋움', 'Apple SD Gothic Neo', sans-serif;
  font-size: 12px;
  background: #ece9d8;
  border: 2px outset #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.had-title {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(90deg, #0a246a, #3a6ea5 55%, #a6caf0);
  color: #fff; font-weight: bold; padding: 4px 6px; letter-spacing: 0;
}
.had-title button {
  width: 20px; height: 17px; line-height: 1; font-size: 10px; font-family: inherit;
  background: #ece9d8; color: #111; border: 2px outset #fff; border-radius: 0;
  cursor: pointer; padding: 0;
}
.had-title button:active { border-style: inset; }
.had-menu { position: relative; padding: 0 2px; border-bottom: 1px solid #b5b2a5; color: #333; }
.had-m { display: inline-block; padding: 4px 7px; cursor: default; }
.had-m:hover, .had-m.on { background: #0a246a; color: #fff; }
.had-drop {
  position: absolute; top: 100%; z-index: 5; min-width: 130px;
  background: #ece9d8; border: 2px outset #fff; box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  padding: 2px;
}
.had-item { padding: 4px 16px 4px 22px; cursor: default; position: relative; white-space: nowrap; }
.had-item:hover { background: #0a246a; color: #fff; }
.had-item.chk::before { content: '✓'; position: absolute; left: 7px; }
.had-item.dot::before { content: '•'; position: absolute; left: 8px; }
.had-sep { border-top: 1px solid #b5b2a5; border-bottom: 1px solid #fff; margin: 3px 2px; }
.had-about {
  position: absolute; z-index: 8; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 250px; background: #ece9d8; border: 2px outset #fff; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}
.had-about-body { padding: 14px; text-align: center; line-height: 1.7; }
.had-about-body p { margin: 0; }
.had-ok {
  margin-top: 10px; font-family: inherit; font-size: 12px; padding: 3px 26px;
  background: #ece9d8; border: 2px outset #fff; border-radius: 0; cursor: pointer;
}
.had-ok:active { border-style: inset; }
.had-about .had-title button {
  width: 20px; height: 17px; line-height: 1; font-size: 10px; font-family: inherit;
  background: #ece9d8; color: #111; border: 2px outset #fff; border-radius: 0; cursor: pointer; padding: 0;
}
.had-body { padding: 10px; background: #ffeef6; }
.had-screen { border: 2px inset #fff; background: #000; line-height: 0; }
#cheeseCanvas { width: 100%; image-rendering: pixelated; }
.had-opts { display: flex; gap: 14px; align-items: center; margin: 8px 0; color: #444; }
.had-opts label { display: flex; gap: 4px; align-items: center; }
.had-opts select { font-family: inherit; font-size: 12px; border-radius: 0; }
.had-no { margin-left: auto; color: #e75480; font-weight: bold; }
.had-btns { text-align: center; }
.had-btns button {
  font-family: inherit; font-size: 13px; font-weight: bold; padding: 5px 22px;
  background: #ece9d8; border: 2px outset #fff; border-radius: 0; cursor: pointer;
}
.had-btns button:active { border-style: inset; }
.had-marquee { margin-top: 8px; color: #e75480; }

/* ── 모션 배려: reduced-motion이면 루프 정지(포스터 유지) ── */
@media (prefers-reduced-motion: reduce) {
  .loop { display: none; }
  .cell:has(.loop)::before { content: ''; }
}
@media (max-width: 640px) {
  .masthead { padding-top: 40px; }
  .grid { gap: 32px; }
  .contact .intro-line { grid-template-columns: 1fr; gap: 8px; }
  .contact-row { flex-direction: column; }
  .cheese { text-align: left; }
  .cheese-panel:not([hidden]) { text-align: left; }
  .cheese-controls { justify-content: flex-start; }
}
