/* ==========================================================
   Lala Photo Studio — Portrait Portfolio
   Palette: ink #191715 / gallery #F4F3F0 / seal red #B5342A
   Type: Gowun Batang (display) + Noto Sans KR (body)
   ========================================================== */

:root {
  --ink: #191715;
  --paper: #F4F3F0;
  --stone: #8A867F;
  --line: #D8D5CF;
  --seal: #B5342A;
  --tile: #E3E1DC;
  --display: "Gowun Batang", serif;
  --body: "Noto Sans KR", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
}
.seal {
  width: 34px;
  height: 34px;
  background: var(--seal);
  color: #F7EFEA;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  letter-spacing: 0;
  flex-shrink: 0;
}
.site-nav { font-size: 0.9rem; color: var(--stone); }
.site-nav a { margin-left: 20px; }
.site-nav a:hover { color: var(--seal); }
.nav-row { display: flex; align-items: center; gap: 20px; }
.lang-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  overflow: hidden;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 5px 12px;
  cursor: pointer;
  font-family: var(--body);
  color: var(--stone);
}
.lang-toggle button.on { background: var(--ink); color: var(--paper); }

/* ---------- Portfolio index ---------- */
.intro { padding: 72px 0 48px; }
.intro .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: var(--seal);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.intro h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.25;
  max-width: 18em;
}
.intro p {
  margin-top: 20px;
  max-width: 34em;
  color: var(--stone);
  font-size: 1rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding-bottom: 96px;
}
.category-card {
  display: block;
  position: relative;
}
.category-card .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--tile);
  overflow: hidden;
}
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.category-card:hover img { transform: scale(1.03); }
.category-card .frame.empty::after {
  content: "대표 사진: " attr(data-slot);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
.category-card .label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 2px 0;
  border-top: 2px solid var(--ink);
  margin-top: 14px;
}
.category-card .ko {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
}
.category-card .en {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
}
.category-card:hover .label { border-top-color: var(--seal); }
.category-card:hover .ko { color: var(--seal); }

/* ---------- Category page ---------- */
.cat-head { padding: 64px 0 40px; }
.back-link {
  font-size: 0.85rem;
  color: var(--stone);
  letter-spacing: 0.06em;
}
.back-link:hover { color: var(--seal); }
.cat-title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.cat-title h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.2;
}
.cat-title .seal { width: 40px; height: 40px; font-size: 0.95rem; }
.cat-en {
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 10px;
}
.cat-desc {
  margin-top: 22px;
  max-width: 36em;
  color: var(--stone);
}

/* masonry via columns */
.gallery {
  columns: 3;
  column-gap: 20px;
  padding-bottom: 96px;
}
.gallery figure {
  break-inside: avoid;
  margin-bottom: 20px;
  background: var(--tile);
  position: relative;
  cursor: zoom-in;
}
.gallery figure.empty {
  aspect-ratio: 4 / 5;
  cursor: default;
}
.gallery figure.empty::after {
  content: attr(data-slot) " 를 이 자리에 넣어주세요";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
  font-size: 0.78rem;
  padding: 0 12px;
  text-align: center;
}
.gallery img {
  width: 100%;
  display: block;
}

/* prev / next */
.cat-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 28px 0 72px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}
.cat-nav a:hover { color: var(--seal); }
.cat-nav .hint {
  display: block;
  font-family: var(--body);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 4px;
}
.cat-nav .next { text-align: right; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #F4F3F0;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--body);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #B9B5AE;
  padding: 40px 0;
  font-size: 0.85rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a:hover { color: var(--seal); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gallery { columns: 2; }
}
@media (max-width: 560px) {
  .gallery { columns: 1; }
  .site-nav { display: none; }
  .intro { padding: 48px 0 36px; }
}

/* 모바일(세로 화면)에서도 상단 메뉴 보정 — 항상 보이도록 */
@media (max-width: 760px) {
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; width: 100%; }
  .site-nav { display: flex !important; flex-wrap: wrap; gap: 8px 14px; }
  .site-nav a { display: inline-block; font-size: 0.85rem; margin-left: 0; }
}
