/* =========================================================
   Holy Seed — Common Styles
   ========================================================= */

/* =========================================================
   1. Base / Reset / Variables
   ========================================================= */
:root {
  --primary: #10b981;
  --secondary: #14b8a6;
  --accent: #06b6d4;
  --bg: #f0fdf4;
  --text-main: #064e3b;
  --text-default: #334155;
  --text-muted: #6b7280;
  --white: #ffffff;
  --border: rgba(0, 0, 0, 0.06);
}

@font-face {
  font-family: "Pretendard";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url("../assets/fonts/Pretendard/PretendardVariable.woff2") format("woff2-variations");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  font-family: "Pretendard", -apple-system, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  background: var(--bg);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* 공용 화살표 (btn-question / btn-join / m-btn-ghost 등에서 재사용) */
.btn-arrow {
  font-size: 18px;
}

/* =========================================================
   2. Header
   ========================================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 76px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}
.logo-img {
  height: 36px;
}
.logo-sub {
  font-size: 13px;
  font-weight: 500;
}
.nav {
  display: flex;
  gap: 36px;
}
.nav a {
  position: relative;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 500;
  padding: 4px 2px;
  transition: color 0.2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav a:hover {
  color: var(--primary);
}
.nav a:hover::after {
  width: 100%;
}
/* 현재 페이지에 해당하는 nav 링크 활성 상태 */
.nav a.is-active {
  color: var(--primary);
}
.nav a.is-active::after {
  width: 100%;
}

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}
.nav-toggle-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.2s ease,
    top 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-toggle-bar:nth-child(1) {
  top: 13px;
}
.nav-toggle-bar:nth-child(2) {
  top: 19px;
}
.nav-toggle-bar:nth-child(3) {
  top: 25px;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  top: 19px;
  transform: rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  top: 19px;
  transform: rotate(-45deg);
}
.nav-backdrop {
  position: fixed;
  inset: 76px 0 0 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 990;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-backdrop[hidden] {
  display: none;
}
.nav-backdrop.is-visible {
  opacity: 1;
}

/* =========================================================
   3. Footer
   ========================================================= */
.footer {
  background: linear-gradient(180deg, #f0fdf4 0%, #e6f7ed 100%);
  border-top: 1px solid rgba(16, 185, 129, 0.12);
}
.footer-inner {
  padding: 80px 32px 32px;
  max-width: 1400px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-logo {
  height: 48px;
}
.footer-logo-sub {
  font-size: 14px;
}
.footer-tagline {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
  word-break: keep-all;
}
.footer-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.partner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(16, 185, 129, 0.12);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.partner-card:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 10px 22px -8px rgba(16, 185, 129, 0.2);
}
.partner-logo-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.15));
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.partner-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.partner-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.partner-tag {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
}
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================================================
   4. Floating Donate Button
   (footer-brand 안에 위치하며 Donate Modal을 엽니다)
   ========================================================= */
.fab-donate-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 14px 22px 14px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.38), 0 4px 10px rgba(6, 78, 59, 0.18);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease;
  isolation: isolate;
}
.fab-donate-btn::after {
  /* glossy sheen */
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.fab-donate-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.5), 0 6px 14px rgba(6, 78, 59, 0.22);
}
.fab-donate-btn:active {
  transform: translateY(-1px) scale(0.99);
}
.btn-donate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

/* =========================================================
   5. Donate Modal
   ========================================================= */
.donate-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.donate-modal[hidden] {
  display: none;
}
.donate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 78, 59, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dm-fade 0.22s ease;
}
.donate-modal-card {
  position: relative;
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 44px 24px 36px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(6, 78, 59, 0.25);
  animation: dm-pop 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.donate-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #475569;
  transition: background 0.18s;
}
.donate-modal-close:hover {
  background: rgba(15, 23, 42, 0.12);
}
.donate-modal-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.donate-modal-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0 0 14px;
}
.donate-modal-lead {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-muted);
  word-break: keep-all;
  margin: 0 0 28px;
}

/* Lightning card */
.ln-card {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05), rgba(20, 184, 166, 0.03));
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 22px;
  padding: 24px 22px 20px;
  margin-bottom: 22px;
}
.ln-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.ln-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}
.ln-header-icon svg {
  width: 16px;
  height: 16px;
}
.ln-header-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.005em;
}

/* QR */
.ln-qr-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 18px;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.1), 0 0 0 1px rgba(16, 185, 129, 0.1);
}
.ln-qr-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* Make QR modules sage-dark instead of pure black */
.ln-qr-wrap svg path:nth-child(2),
.ln-qr-wrap svg rect:not(:first-child) {
  fill: var(--text-main);
}
.ln-qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(6, 78, 59, 0.15);
}
.ln-qr-logo img {
  width: 24px;
  height: 24px;
}

/* Address pill */
.ln-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 16px;
  background: #fff;
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  transition: border-color 0.18s;
}
.ln-address:hover {
  border-color: rgba(16, 185, 129, 0.36);
}
.ln-address-link {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.copy-btn:hover {
  background: rgba(16, 185, 129, 0.18);
}
.copy-btn.copied {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@keyframes dm-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes dm-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   6. Responsive (Header / Footer)
   ========================================================= */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 20px;
  }
  .nav-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 20px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.12);
    box-shadow: 0 12px 30px -12px rgba(6, 78, 59, 0.18);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    z-index: 1000;
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a {
    padding: 16px 4px;
    font-size: 17px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
  }
  .nav a:last-child {
    border-bottom: none;
  }
  .nav a::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .footer-inner {
    padding: 60px 32px 28px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
