:root {
  --ink: #12241f;
  --muted: #5d756c;
  --line: rgba(18, 36, 31, 0.12);
  --teal: #1f6b57;
  --teal-deep: #0f3f36;
  --mint: #d7ebe3;
  --sand: #f3f7f4;
  --paper: #ffffff;
  --danger: #b42318;
  --ok: #1f6b57;
  --radius: 14px;
  --font: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--sand);
  font-family: var(--font);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: auto;
  height: 40px;
  flex-shrink: 0;
  border-radius: 0;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-family: var(--font);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 1.14rem;
  font-weight: 600;
}

.nav a:hover { color: var(--ink); }

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.nav-cta,
.btn.primary {
  background: var(--teal);
  color: #fff;
}

.btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.btn.full { width: 100%; }

.hero {
  position: relative;
  min-height: calc(100dvh - 72px);
  display: grid;
  align-items: end;
  padding: clamp(14px, 3vw, 36px);
  color: #f7fffb;
  background:
    linear-gradient(180deg, rgba(8, 28, 24, 0.28), rgba(8, 28, 24, 0.78)),
    url("./assets/hero/hero.jpg?v=20260718-danyang-hires-1") center 45% / cover no-repeat;
  overflow: hidden;
}

.hero-bg {
  display: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 75%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-brand {
  margin: 0 0 7px;
  font-family: var(--font);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero h1 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.6rem, 3.8vw, 2.85rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.04em;
  word-break: keep-all;
}

.hero-lead {
  margin: 9px 0 0;
  max-width: 34rem;
  color: rgba(247, 255, 251, 0.86);
  font-size: 0.92rem;
}

.hero-lead-br {
  display: none;
}

.hero-lead-space {
  display: inline;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 5px;
}

.section {
  padding: clamp(56px, 9vw, 96px) clamp(18px, 4vw, 48px);
}

.section-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section h2,
.auth-card h1,
.member-hero h1 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.section-lead,
.auth-lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.about {
  background:
    linear-gradient(180deg, #ffffff, #f3f7f4);
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
}

.about-photo,
.contact-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  min-height: 320px;
}

.about-photo img,
.contact-photo img,
.visual-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-photo img,
.contact-photo img {
  min-height: 320px;
}

.visual-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-height: clamp(180px, 28vw, 320px);
}

.visual-strip img {
  min-height: inherit;
  filter: saturate(0.92);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}

.stat-row div,
.member-stats div {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.stat-row strong,
.member-stats strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.stat-row span,
.member-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.works {
  background:
    radial-gradient(circle at 90% 0%, rgba(31, 107, 87, 0.08), transparent 35%),
    #eef5f1;
}

.work-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin: 34px 0 0;
  padding: 0;
}

.work-list li {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.work-list h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.work-list p {
  margin: 0;
  color: var(--muted);
}

.news {
  background: #ffffff;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.news-item {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  align-content: start;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  transition: opacity 160ms ease;
  background: #fff;
}

.news-item:hover {
  opacity: 0.88;
}

.news-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  background: #d9e6df;
}

.news-item > div {
  position: relative;
  z-index: 1;
  padding: 16px 2px 18px;
  background: #fff;
}

.news-meta {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
}

.news-item h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.news-item p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.news-note {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.join-cta {
  background:
    linear-gradient(135deg, #163f37, #1f6b57 55%, #2a8570);
  color: #f7fffb;
}

.join-cta .eyebrow,
.join-cta .section-lead {
  color: rgba(247, 255, 251, 0.78);
}

.join-cta .btn.primary {
  margin-top: 24px;
  background: #fff;
  color: var(--teal-deep);
}

.contact-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.contact-list span {
  color: var(--muted);
  font-weight: 600;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 24px clamp(18px, 4vw, 48px) 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-admin-link {
  color: inherit;
  text-decoration: none;
}

.footer-admin-link:hover {
  color: var(--ink);
}

.page-auth,
.page-member,
.page-admin {
  min-height: 100dvh;
}

.auth-shell,
.member-shell,
.admin-shell {
  width: min(920px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.auth-shell {
  width: min(560px, calc(100% - 32px));
}

.auth-card,
.panel,
.member-hero {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-card {
  display: grid;
  gap: 12px;
}

.auth-card label,
.inline-form label,
.grid-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-card input,
.auth-card textarea,
.inline-form input,
.grid-form input,
.grid-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfc;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef5f1;
  color: var(--teal-deep);
  font-size: 0.92rem;
}

.form-message.is-error {
  background: #fdecea;
  color: var(--danger);
}

.member-shell,
.admin-shell {
  display: grid;
  gap: 18px;
}

.member-stats,
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 22px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.inline-form,
.grid-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form button {
  grid-column: 1 / -1;
  justify-self: start;
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.list-item,
.table-row {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
}

.list-item strong {
  font-size: 0.98rem;
}

.list-item span,
.table-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.list-actions button,
.list-actions a {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.list-actions .ok {
  border-color: var(--teal);
  color: var(--teal);
}

.list-actions .danger {
  border-color: #f0b4ae;
  color: var(--danger);
}

.table-wrap {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.table-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
}

.empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.kakao-float {
  position: fixed;
  z-index: 80;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 50%;
  background: #fee500;
  color: #191600;
  box-shadow: 0 10px 28px rgba(25, 22, 0, 0.18);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease;
  /* 헤더 회원가입 버튼과 동일한 우측 패딩, 아래도 같은 여백 */
  right: clamp(18px, 4vw, 48px);
  bottom: clamp(18px, 4vw, 48px);
}

@media (min-width: 821px) {
  .kakao-float {
    bottom: calc(clamp(18px, 4vw, 48px) - 15px);
  }

  .hero {
    align-items: end;
    padding-top: clamp(14px, 3vw, 36px);
    padding-bottom: clamp(20px, 3.5vh, 40px);
    background:
      linear-gradient(180deg, rgba(8, 28, 24, 0.28) 0%, rgba(8, 28, 24, 0.45) 42%, rgba(8, 28, 24, 0.82) 100%),
      url("./assets/hero/hero.jpg?v=20260718-danyang-hires-1") center 45% / cover no-repeat;
  }

  .hero-lead {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .hero-lead-br {
    display: none;
  }
}

.kakao-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(25, 22, 0, 0.22);
}

.kakao-float-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 20px;
}

.kakao-float-icon::before {
  content: "";
  width: 22px;
  height: 19px;
  background: #191600;
  border-radius: 45% 45% 45% 10%;
}

.kakao-float-text {
  padding: 0;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .brand-logo {
    height: 32px;
    max-width: min(220px, 58vw);
    margin-top: 2px;
  }

  .nav-cta {
    min-height: 39px;
    padding: 0 15px;
    font-size: 0.92em;
  }

  .nav a:not(.nav-cta) { display: none; }
  .stat-row,
  .admin-stats,
  .field-row,
  .grid-form,
  .inline-form,
  .table-row,
  .contact-list li,
  .about-grid,
  .contact-grid,
  .visual-strip {
    grid-template-columns: 1fr;
  }
  .visual-strip {
    min-height: 0;
  }
  .visual-strip img {
    min-height: 160px;
  }
  .hero {
    min-height: 0;
    height: auto;
    max-height: none;
    align-items: end;
    padding-top: clamp(14px, 3vw, 24px);
    padding-bottom: clamp(14px, 3vw, 24px);
    background: #0f3f36;
    overflow: hidden;
  }

  .hero::after {
    display: none;
  }

  .hero-bg {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    pointer-events: none;
  }

  .hero::before {
    z-index: 1;
    background-image: none;
    background: linear-gradient(180deg, rgba(8, 28, 24, 0.28) 0%, rgba(8, 28, 24, 0.45) 40%, rgba(8, 28, 24, 0.82) 100%);
    mask-image: none;
  }

  .hero-copy {
    z-index: 2;
  }

  .hero h1 {
    font-size: clamp(1.15rem, 4.6vw, 1.65rem);
    white-space: nowrap;
  }

  .hero-br {
    display: none;
  }

  .hero-lead-br {
    display: inline;
  }

  .hero-lead-space {
    display: none;
  }

  .kakao-float {
    width: 70px;
    height: 70px;
  }
}

@media print {
  .kakao-float {
    display: none !important;
  }
}

.kakao-fix { display: none !important; }
