/* Landing operation polish: compact header, FAQ, footer sitemap, back-to-top */

.site-header,
.site-header-inner,
.site-brand img {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    height 180ms ease,
    padding 180ms ease;
}

.site-header.compact {
  --gnb-h: 60px;
  border-bottom-color: rgba(159, 20, 21, 0.2);
  background: rgba(255, 251, 244, 0.98);
  box-shadow: 0 14px 30px rgba(58, 31, 12, 0.12);
}

.site-header.compact .site-brand img {
  height: 46px;
}

body.theme-dark .site-header.compact {
  border-bottom-color: rgba(213, 75, 82, 0.22);
  background: rgba(17, 16, 15, 0.96);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.home-faq {
  padding: clamp(58px, 8vh, 90px) 24px;
  background:
    linear-gradient(180deg, rgba(248, 239, 225, 0.72), rgba(255, 253, 248, 0.78)),
    url("./assets/bg-hanji-texture.webp") center / cover;
}

.home-faq-list {
  display: grid;
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}

.home-faq-item {
  border: 1px solid rgba(159, 20, 21, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 42px rgba(84, 56, 28, 0.09);
  overflow: hidden;
}

.home-faq-item[open] {
  border-color: rgba(181, 6, 9, 0.28);
}

.home-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 18px clamp(18px, 3vw, 24px);
  color: var(--hg-ink);
  cursor: pointer;
  font-size: clamp(15px, 1.7vw, 17px);
  font-weight: 800;
  list-style: none;
}

.home-faq-item summary::marker,
.home-faq-item summary::-webkit-details-marker {
  display: none;
  content: "";
}

.home-faq-item summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(181, 6, 9, 0.22);
  border-radius: 50%;
  background: rgba(181, 6, 9, 0.06);
  color: var(--hg-red-strong);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.home-faq-item[open] summary::after {
  content: "-";
  border-color: var(--hg-red-strong);
  background: var(--hg-red-strong);
  color: #fff8ed;
  transform: rotate(180deg);
}

.home-faq-answer {
  padding: 0 clamp(18px, 3vw, 24px) 22px;
  animation: faqAnswerIn 180ms ease both;
}

.home-faq-answer p {
  margin: 0;
  color: var(--hg-muted);
  font-size: 14.5px;
  line-height: 1.75;
}

@keyframes faqAnswerIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.theme-dark .home-faq {
  background:
    linear-gradient(180deg, rgba(17, 16, 15, 0.86), rgba(25, 22, 19, 0.92)),
    url("./assets/bg-hanji-texture.webp") center / cover;
}

body.theme-dark .home-faq-item {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

body.theme-dark .home-faq-item[open] {
  border-color: rgba(213, 75, 82, 0.44);
}

body.theme-dark .home-faq-item summary {
  color: var(--ink);
}

body.theme-dark .home-faq-item summary::after {
  border-color: rgba(255, 139, 146, 0.28);
  background: rgba(213, 75, 82, 0.16);
  color: #ff8b92;
}

body.theme-dark .home-faq-item[open] summary::after {
  border-color: #d54b52;
  background: #d54b52;
  color: #ffffff;
}

body.theme-dark .home-faq-answer p {
  color: var(--muted);
}

.auth-signup-panel {
  display: grid;
  gap: 14px;
}

.auth-signup-panel[hidden],
.auth-review-card[hidden] {
  display: none;
}

.auth-review-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(181, 6, 9, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(251, 244, 231, 0.96)),
    #fffaf2;
  box-shadow: 0 18px 42px rgba(84, 56, 28, 0.1);
}

.auth-review-card:focus-visible {
  outline: 2px solid rgba(211, 160, 76, 0.6);
  outline-offset: 3px;
}

.auth-review-eyebrow {
  color: #b20f18;
  font-size: 12px;
  font-weight: 900;
}

.auth-review-card h3 {
  margin: 0;
  color: #15110c;
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}

.auth-review-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-review-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  min-height: 58px;
}

.auth-review-steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 38px;
  bottom: 8px;
  left: 16px;
  width: 1px;
  background: rgba(181, 6, 9, 0.18);
}

.auth-review-steps em {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(181, 6, 9, 0.22);
  border-radius: 50%;
  background: rgba(181, 6, 9, 0.06);
  color: #b20f18;
  font-style: normal;
  font-weight: 900;
}

.auth-review-steps .is-complete em {
  border-color: #b20f18;
  background: #b20f18;
  color: #fff8ed;
}

.auth-review-steps div {
  display: grid;
  gap: 4px;
  padding-bottom: 16px;
}

.auth-review-steps strong {
  color: #2b2117;
  font-size: 14.5px;
  font-weight: 900;
}

.auth-review-steps span {
  color: #6d6255;
  font-size: 13px;
  line-height: 1.55;
}

body.theme-dark .auth-review-card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

body.theme-dark .auth-review-card h3,
body.theme-dark .auth-review-steps strong {
  color: var(--ink);
}

body.theme-dark .auth-review-eyebrow,
body.theme-dark .auth-review-steps em {
  color: #ff8b92;
}

body.theme-dark .auth-review-steps em {
  border-color: rgba(255, 139, 146, 0.28);
  background: rgba(213, 75, 82, 0.16);
}

body.theme-dark .auth-review-steps .is-complete em {
  border-color: #d54b52;
  background: #d54b52;
  color: #ffffff;
}

body.theme-dark .auth-review-steps li:not(:last-child)::before {
  background: rgba(213, 75, 82, 0.28);
}

body.theme-dark .auth-review-steps span {
  color: var(--muted);
}

.home-community {
  padding: clamp(54px, 8vh, 88px) 24px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.78), rgba(248, 239, 225, 0.68)),
    url("./assets/bg-hanji-texture.webp") center / cover;
}

.home-community .home-section-head p {
  max-width: 680px;
  line-height: 1.7;
}

.home-community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.home-community-grid > article {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 148px;
  padding: 28px 26px 26px;
  border: 1px solid rgba(159, 20, 21, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 18px 42px rgba(84, 56, 28, 0.09);
}

.home-community-grid > article::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--hg-red-strong);
}

.home-community-grid strong {
  color: var(--hg-ink);
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
  font-size: 19px;
  font-weight: 700;
}

.home-community-grid span {
  color: var(--hg-muted);
  font-size: 14px;
  line-height: 1.65;
}

body.theme-dark .home-community {
  background:
    linear-gradient(180deg, rgba(17, 16, 15, 0.9), rgba(25, 22, 19, 0.92)),
    url("./assets/bg-hanji-texture.webp") center / cover;
}

body.theme-dark .home-community-grid > article {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

body.theme-dark .home-community-grid strong {
  color: var(--ink);
}

body.theme-dark .home-community-grid span {
  color: var(--muted);
}

.site-footer-column {
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.site-footer-links-title {
  margin-bottom: 2px;
  color: var(--hg-ink);
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
  font-size: 15px;
  font-weight: 700;
}

.site-footer-sitemap button {
  text-align: left;
}

body.theme-dark .site-footer-links-title {
  color: var(--ink);
}

.back-to-top {
  position: fixed;
  right: 29px;
  bottom: 96px;
  z-index: 91;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(211, 160, 76, 0.88);
  border-radius: 50%;
  background: linear-gradient(180deg, #c21418, #8c0a0c);
  color: #fff8ed;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  box-shadow: 0 16px 36px rgba(58, 31, 12, 0.28);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 20px 46px rgba(58, 31, 12, 0.36);
  transform: translateY(-2px);
}

.back-to-top.is-visible:hover {
  transform: translateY(-2px);
}

body.theme-dark .back-to-top {
  border-color: rgba(255, 207, 126, 0.52);
  background: linear-gradient(180deg, #d54b52, #a5161d);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

@media (max-width: 1080px) {
  .back-to-top {
    right: 18px;
    bottom: 24px;
  }
}

@media (max-width: 960px) {
  .site-header.compact {
    --gnb-h: 56px;
  }

  .site-header.compact .site-brand img {
    height: 40px;
  }
}

@media (max-width: 640px) {
  .home-faq {
    padding: 50px 18px;
  }

  .auth-review-card {
    padding: 22px 18px;
  }

  .home-community {
    padding: 50px 18px;
  }

  .home-community-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 440px;
  }

  .home-faq-item summary {
    min-height: 58px;
    gap: 12px;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header-inner,
  .site-brand img,
  .home-faq-item summary::after,
  .home-faq-answer,
  .back-to-top {
    animation: none;
    transition: none;
  }
}

/* --- Why Hwaseong (region proof) --- */
.home-region {
  padding: clamp(52px, 8vh, 84px) 24px;
}

.home-region-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.home-region-grid > div {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 30px 20px 26px;
  border: 1px solid var(--hg-line);
  border-radius: 18px;
  background: var(--hg-surface);
  text-align: center;
}

.home-region-grid strong {
  color: var(--hg-red);
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.1;
}

.home-region-grid span {
  color: var(--hg-muted);
  font-size: 13.5px;
  font-weight: 700;
}

.home-region-note {
  margin: clamp(20px, 3vh, 28px) 0 0;
  color: #4a3d2b;
  font-family: "Noto Serif KR", "Noto Sans KR", serif;
  font-size: clamp(15.5px, 1.8vw, 18px);
  font-weight: 600;
  text-align: center;
}

body.theme-dark .home-region-grid > div {
  border-color: var(--line);
  background: var(--surface);
}

body.theme-dark .home-region-grid strong {
  color: #ff8b92;
}

body.theme-dark .home-region-grid span {
  color: var(--muted);
}

body.theme-dark .home-region-note {
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .home-region-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 440px;
  }
}

/* --- Brand: AI 캡션 이미지(왼쪽) + 로고(오른쪽, 원본 그대로) --- */
.site-brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-brand img.site-brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.site-brand img.site-brand-tagline {
  display: block;
  height: 38px;
  width: auto;
}

.site-header.compact .site-brand {
  gap: 10px;
}

.site-header.compact .site-brand img.site-brand-logo {
  height: 34px;
}

.site-header.compact .site-brand img.site-brand-tagline {
  height: 32px;
}

.site-brand img.tagline-dark {
  display: none;
}

body.theme-dark .site-brand img.tagline-light {
  display: none;
}

body.theme-dark .site-brand img.tagline-dark {
  display: block;
}

/* legacy dark-mode rule (styles.css) puts a cream card behind every .site-brand
   img, meant for the logo mark only — the tagline caption already carries its
   own light ink color and must stay flush with the transparent header. */
body.theme-dark .site-brand img.site-brand-tagline {
  padding: 0;
  border-radius: 0;
  background: none;
}

@media (max-width: 960px) {
  .site-brand {
    gap: 9px;
  }

  .site-brand img.site-brand-logo {
    height: 34px;
  }

  .site-brand img.site-brand-tagline {
    height: 32px;
  }

  .site-header.compact .site-brand img.site-brand-logo {
    height: 30px;
  }

  .site-header.compact .site-brand img.site-brand-tagline {
    height: 28px;
  }
}

@media (max-width: 640px) {
  .site-brand {
    gap: 7px;
  }

  .site-brand img.site-brand-logo {
    height: 30px;
  }

  .site-brand img.site-brand-tagline {
    height: 28px;
  }
}

@media (max-width: 480px) {
  .site-header-inner {
    gap: 10px;
    padding: 0 12px;
  }

  .site-brand {
    gap: 5px;
  }

  .site-brand img.site-brand-logo {
    height: 26px;
  }

  .site-brand img.site-brand-tagline {
    height: 24px;
  }

  .util-guest {
    gap: 2px;
  }

  .util-login {
    padding: 8px 6px;
  }

  .util-join {
    padding: 8px 12px;
    font-size: 13px;
  }

  .gnb-burger {
    width: 38px;
  }
}
