/* ============================================================
   유성 나눔의전당 온라인 아카이브 – 메인 스타일시트
   ============================================================ */

/* ── 0. CSS 변수 ─────────────────────────────────────────── */
:root {
  --ink:          #16372f;
  --muted:        #61736d;
  --cream:        #f7f4ec;
  --paper:        #fffefa;
  --coral:        #f0645b;
  --pink:         #ed8e98;
  --green:        #4ba984;
  --individual:   #dc7e9a;
  --organization: #72ad91;
  --line:         #dfe6df;

  --banner-h: 32px;
}
.footer { position: relative!important; }
/* ── 2. 프로토타입 바 ───────────────────────────────────── */
.prototype-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--banner-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #eaf5ef;
  font-size: 12px;
  letter-spacing: .03em;
}

/* ── 3. 버튼 공통 ───────────────────────────────────────── */
.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 16px 25px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.primary-button span { font-size: 16px; }


/* ── 5. 공통 섹션 레이아웃 ─────────────────────────────── */
.section-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 48px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  margin-bottom: 24px;
}
.coral-text { color: var(--coral); }

/* ── 6. HERO 섹션 ───────────────────────────────────────── */
.sec-hero {
  background: linear-gradient(135deg, #fffaf4 0%, #f5f1e7 55%, #f1eee4 100%);
  display: flex;
  align-items: center;
  padding: var(--banner-h) clamp(24px, 8vw, 130px) 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(22, 55, 47, .07);
  border-radius: 50%;
}
.orbit-one { width: 760px; height: 760px; top: -190px; right: -130px; }
.orbit-two { width: 430px; height: 430px; bottom: -320px; right: 23%; }

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
}
.hero-content h1 {
  font-family: 'Noto Sans KR', 'Noto Serif KR', Georgia, serif;
  font-size: clamp(52px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.15;
  margin: 0;
}
.hero-content h1 em {
  color: var(--coral);
  font-style: normal;
  position: relative;
}
.hero-content h1 em::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 6px;
  background: rgba(240, 100, 91, .22);
  border-radius: 50%;
}
.hero-copy {
  color: #526963;
  font-size: 17px;
  line-height: 1.9;
  margin: 32px 0;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #d8c8a8;
  overflow: hidden;
  margin: 0;
}
.hero-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,250,244,.99) 0%, rgba(248,244,235,.97) 31%, rgba(247,243,234,.82) 43%, rgba(247,243,234,.28) 59%, rgba(16,38,31,.06) 100%),
    linear-gradient(rgba(255,255,255,.06) 48%, rgba(10,31,25,.25) 100%);
}
.hero-photo img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(.76) contrast(.96) brightness(.98);
  transform: translate(55%) scale(1.5);
  transform-origin: 100% 18%;
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: .18em;
  color: #89958f;
}
.scroll-cue span {
  display: block;
  width: 28px; height: 1px;
  background: #a9b2ad;
}

/* ── 7. ABOUT 섹션 ──────────────────────────────────────── */
.sec-about {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.sec-about .section-shell {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 120px;
  align-items: center;
}

.sec-about h2 {
  font-family: 'Noto Sans KR', 'Noto Serif KR', Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  letter-spacing: -.055em;
  line-height: 1.2;
  margin: 0;
}

.intro-copy > p:first-child {
  font-family: 'Noto Sans KR', 'Noto Serif KR', serif;
  font-size: 22px;
  line-height: 1.8;
  margin: 30px 0 52px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.stats div {
  padding: 4px 24px;
  border-right: 1px solid var(--line);
}
.stats div:first-child { padding-left: 0; }
.stats div:last-child  { border-right: 0; }
.stats strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 44px;
  font-weight: 500;
  color: var(--coral);
}
.stats span {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  color: var(--muted);
}

/* ── 8. ARCHIVE 섹션 ────────────────────────────────────── */
.sec-archive {
  background: var(--cream);
  height: 100%;
}
.sec-archive .section-shell {
  padding-top: 120px;
  padding-bottom: 120px;
}
.sec-archive h2 {
  font-family: 'Noto Sans KR', 'Noto Serif KR', Georgia, serif;
  font-size: clamp(38px, 4vw, 58px);
  letter-spacing: -.055em;
  margin-bottom: 8px;
}

.archive-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 36px;
}

.archive-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  padding: 16px 0;
  margin-bottom: 30px;
  border-top: 1px solid #ced8d0;
  border-bottom: 1px solid #ced8d0;
}

/* 탭 */
.tabs {
  display: flex;
  gap: 8px;
}
.tabs button {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  color: #697a74;
  cursor: pointer;
}
.tabs button span {
  margin-left: 7px;
  font-size: 11px;
  opacity: .6;
}
.tabs button.active {
  background: var(--ink);
  color: #fff;
}

/* 검색 */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 310px;
  padding: 7px 2px;
  border-bottom: 1px solid #9aaba4;
}
.search span { font-size: 22px; transform: rotate(-20deg); }
.search input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--ink);
}

/* 기부자 그리드 */
.donor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.donor-card {
  background: var(--paper);
  text-align: left;
  color: inherit;
  cursor: pointer;
  border: 1px solid rgba(22, 55, 47, .12);
  border-radius: 4px;
  padding: 14px 14px 20px;
  transition: transform .25s, box-shadow .25s;
}
.donor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(32, 58, 50, .11);
}

/* 초상화 */
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  background: #e9eee9;
  overflow: hidden;
}
.portrait::before,
.portrait::after {
  content: '';
  position: absolute;
  width: 170px; height: 170px;
  border-radius: 50%;
  opacity: .88;
}
.portrait::before { top: -20px;   left: -35px; }
.portrait::after  { bottom: -50px; right: -55px; }

.portrait.coral::before { background: #f5a39d; }
.portrait.coral::after  { background: #e96c68; }
.portrait.gold::before  { background: #f1ca78; }
.portrait.gold::after   { background: #c8a24f; }
.portrait.green::before { background: #78c0a5; }
.portrait.green::after  { background: #4d9f80; }
.portrait.blue::before  { background: #93b7c8; }
.portrait.blue::after   { background: #507f96; }

.portrait > span {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: 'Noto Sans KR', serif;
  font-size: 42px;
  font-weight: 700;
  text-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.portrait-ring {
  position: absolute;
  z-index: 1;
  width: 110px; height: 110px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
}

/* 사진/로고 초상화 */
.portrait.with-image { background: #fff; }
.portrait.with-image::before,
.portrait.with-image::after { display: none; }

.portrait.with-image.photo {
  isolation: isolate;
  background: #d9d7d0;
}
.portrait.with-image.photo .portrait-backdrop {
  position: absolute;
  inset: -18px;
  z-index: 0;
  width: calc(100% + 36px);
  height: calc(100% + 36px);
  object-fit: cover;
  object-position: center 18%;
  filter: blur(18px) saturate(.72) brightness(.92);
  opacity: .7;
  transform: scale(1.08);
}
.portrait.with-image.photo .portrait-image {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center top;
  width: auto;
  max-width: 100%;
  height: 100%;
  box-shadow: 0 4px 18px rgba(19,42,35,.14);
}

.portrait.with-image.logo .portrait-image {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
}
.portrait.with-image.logo-lotte .portrait-image { padding: 22%; }
.portrait.with-image.logo-ktg   .portrait-image { padding: 25% 13%; }

/* 카드 텍스트 */
.card-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  font-size: 10px;
  letter-spacing: .09em;
  color: #89968f;
}
.card-meta span:first-child { font-weight: 800; }
.donor-card.individual   .card-meta span:first-child { color: var(--individual); }
.donor-card.organization .card-meta span:first-child { color: var(--organization); }

.donor-card h3 {
  font-family: 'Noto Sans KR', serif;
  font-size: 21px;
  letter-spacing: -.04em;
  margin: 13px 0 2px;
}
.affiliation {
  color: #7b8b84;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}
.donor-card blockquote {
  min-height: 44px;
  margin: 14px 0 8px;
  color: #5c7068;
  font-size: 13px;
  line-height: 1.72;
}
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 80px 20px;
}

/* ── 9. 등재기준 섹션 ───────────────────────────────────── */
.sec-criteria {
  background: var(--paper);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sec-criteria .section-shell {
  padding-top: 120px;
  padding-bottom: 120px;
}

.criteria-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 32px;
}
.criteria-heading h2 {
  font-family: 'Noto Sans KR', 'Noto Serif KR', Georgia, serif;
  font-size: clamp(32px, 4vw, 42px);
  letter-spacing: -.055em;
  line-height: 1.2;
  margin: 0;
}
.criteria-heading > p {
  max-width: 410px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 4px;
}

.criteria-layout {
  display: grid;
  grid-template-columns: 1.03fr .97fr;
  align-items: start;
  gap: 52px;
}

.criteria-panel {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
}
.section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--muted);
  margin-bottom: 18px;
}
.criteria-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.criteria-cards article {
  display: flex;
  flex-direction: column;
  padding: 27px 25px;
  background: var(--cream);
  border: 1px solid #e6e1d6;
}
.criteria-cards article:nth-child(2) {
  background: #eff5f1;
  border-color: #dbe7df;
}
.criteria-type        { font-size: 13px; font-weight: 800; }
.individual-text   { color: var(--individual); }
.organization-text { color: var(--organization); }

.criteria-cards strong {
  display: block;
  margin: 16px 0 12px;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.criteria-cards strong b {
  font-family: Georgia, 'Noto Serif KR', serif;
  font-size: 36px;
  font-weight: 500;
  margin-right: 5px;
}
.criteria-cards article p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.78;
  margin: auto 0 0;
}

.criteria-rules {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 27px;
}
.criteria-rules h3 {
  font-family: 'Noto Sans KR', 'Noto Serif KR', serif;
  font-size: 23px;
  margin-bottom: 17px;
}
.criteria-rules ul { list-style: none; }
.criteria-rules li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 11px;
  font-size: 14px;
  line-height: 1.7;
  color: #4f655e;
}
.criteria-rules li::before {
  content: '';
  position: absolute;
  top: .65em; left: 0;
  width: 5px; height: 5px;
  background: var(--coral);
  border-radius: 50%;
}
.criteria-note {
  margin: 21px 0 0;
  padding-top: 17px;
  border-top: 1px dashed #d6dfda;
  font-size: 11px;
  line-height: 1.75;
  color: #84918c;
}

/* 오프라인 전당 패널 */
.visit-panel {
  background: var(--ink);
  color: #fff;
  padding: 14px;
  box-shadow: 0 28px 65px rgba(22, 55, 47, .16);
}
.hall-photo {
  position: relative;
  aspect-ratio: 1.2;
  background: #ddd3bf;
  overflow: hidden;
}
.hall-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 47%;
}
.hall-photo figcaption {
  position: absolute;
  bottom: 12px; left: 13px;
  padding: 7px 10px;
  background: rgba(18, 43, 36, .82);
  font-size: 10px;
  letter-spacing: .02em;
  color: #f3f7f5;
}
.location-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 25px 14px 24px;
}
.location-pin { color: var(--coral); font-size: 16px; line-height: 1; margin-top: 3px; }
.location-info span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .16em; color: #a9bdb5; }
.location-info h3 {
  font-family: 'Noto Sans KR', 'Noto Serif KR', serif;
  color: #fff;
  font-size: 25px;
  letter-spacing: -.04em;
  margin: 7px 0 4px;
}

/* ── 10. 모달 ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 30, 24, .64);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  position: relative;
  width: min(92vw, 720px);
  min-height: 400px;
  max-height: 90vh;
  overflow: auto;
  background: var(--paper);
  padding: 36px 42px 34px 310px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}
.modal-close {
  position: absolute;
  top: 12px; right: 18px;
  background: none;
  border: none;
  font-size: 30px;
  color: #6f7c77;
  cursor: pointer;
  line-height: 1;
}
.modal-portrait {
  position: absolute;
  top: 20px; bottom: 20px; left: 20px;
  width: 250px;
  background: #e9eee9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-portrait > span {
  font-family: 'Noto Sans KR', serif;
  font-size: 56px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.modal-portrait::before,
.modal-portrait::after {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  opacity: .88;
}
.modal-portrait::before { top: -30px;  left: -50px; }
.modal-portrait::after  { bottom: -60px; right: -70px; }
.modal-portrait.coral::before { background: #f5a39d; }
.modal-portrait.coral::after  { background: #e96c68; }
.modal-portrait.gold::before  { background: #f1ca78; }
.modal-portrait.gold::after   { background: #c8a24f; }
.modal-portrait.green::before { background: #78c0a5; }
.modal-portrait.green::after  { background: #4d9f80; }
.modal-portrait.blue::before  { background: #93b7c8; }
.modal-portrait.blue::after   { background: #507f96; }

/* 모달 사진 */
.modal-portrait.with-photo .modal-photo-backdrop {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: blur(16px) saturate(.7) brightness(.9);
  opacity: .65;
}
.modal-portrait.with-photo .modal-photo-main {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.modal-portrait.with-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #fff;
}
.modal-portrait.logo-lotte img { padding: 20%; }
.modal-portrait.logo-ktg   img { padding: 22% 10%; }

.modal h2 {
  font-family: 'Noto Sans KR', serif;
  font-size: 38px;
  letter-spacing: -.04em;
  margin: 0 0 4px;
}
.modal-affiliation { color: var(--muted); font-size: 14px; margin: 0; }
.modal blockquote {
  font-family: 'Noto Sans KR', serif;
  font-size: 22px;
  line-height: 1.6;
  color: #365b50;
  margin: 26px 0;
}
.modal .eyebrow.individual   { color: var(--individual); }
.modal .eyebrow.organization { color: var(--organization); }
.modal-year { color: #7b8985; font-size: 13px; }

/* ── 11. 반응형 ─────────────────────────────────────────── */
@media (max-width: 1050px) {
  .sec-about .section-shell { gap: 60px; }
  .criteria-layout { gap: 28px; }
  .donor-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  :root { --banner-h: 28px; }
  .prototype-bar { font-size: 11px; }

  .sec-about .section-shell {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .intro-copy > p:first-child { font-size: 20px; }

  .sec-hero { align-items: flex-start; padding: var(--banner-h) 24px 0; }
  .hero-content { padding-top: 60px; }
  .hero-content h1 { font-size: 50px; }
  .hero-copy { font-size: 16px; }

  .archive-tools { flex-direction: column; align-items: stretch; }
  .tabs { overflow: auto; }
  .search { width: 100%; }
  .donor-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .portrait {  }
  .donor-card { padding: 9px 9px 16px; }
  .donor-card h3 { font-size: 17px; }
  .card-meta span:last-child { display: none; }

  .archive-heading, .criteria-heading { display: block; }
  .criteria-layout { grid-template-columns: 1fr; }
  .criteria-cards article { min-height: 195px; }

  .modal { padding: 220px 20px 26px; }
  .modal-portrait { top: 16px; bottom: auto; height: 180px; left: 16px; right: 16px; width: auto; }
  .modal h2 { font-size: 28px; }
}

@media (max-width: 420px) {
  .donor-grid { grid-template-columns: 1fr 1fr; }
  .portrait { height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .donor-card { transition: none; }
}
