/* ===== Design Tokens ===== */
:root {
  --navy: #1e2a3a;
  --navy-light: #2a3a4e;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --cream: #faf8f5;
  --cream-dark: #f0ede8;
  --text: #1e2a3a;
  --text-light: #4a5568;
  --text-muted: #718096;
  --border: #e2ddd5;
  --white: #ffffff;
  --danger: #c0392b;
  --success: #27ae60;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(30,42,58,0.06);
  --shadow-md: 0 4px 12px rgba(30,42,58,0.08);
  --transition: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold);
  text-decoration: none;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Noto Serif KR', serif;
  line-height: 1.3;
  font-weight: 700;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
  margin-bottom: 2rem;
  color: var(--navy);
}

.section-title-light {
  color: var(--cream);
}

/* ===== Layout ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 640px;
}

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }

  .hero {
    height: 66.75vw;
    max-width: 100vw;
  }

  .hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
  }

  .hero-subtitle {
    margin-bottom: 16px;
  }

  .scroll-indicator {
    display: none;
  }
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.reveal.visible {
  opacity: 1;
}

/* ===== 1. Hero ===== */
.hero {
  position: relative;
  height: 70vh;
  height: 70svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(30,42,58,0.55) 0%,
    rgba(30,42,58,0.35) 50%,
    rgba(30,42,58,0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px;
  max-width: 700px;
}

.heritage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(184,134,11,0.9);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.badge-icon {
  font-size: 1rem;
}

.hero-title {
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  line-height: 1.8;
  margin-bottom: 48px;
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ===== 2. Value Section ===== */
.section-value {
  background: var(--white);
}

.value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}

@media (max-width: 768px) {
  .value-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.value-lead {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-light);
  margin-bottom: 32px;
}

.fact-list {
  list-style: none;
}

.fact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fact-list li:last-child {
  border-bottom: none;
}

.fact-list li strong {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
}

.fact-list li span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.value-photo img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.photo-caption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* Timeline */
.timeline-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 32px 24px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.timeline-compact::-webkit-scrollbar {
  display: none;
}

.timeline-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  min-width: 72px;
}

.timeline-dot::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--cream-dark);
}

.timeline-dot.active::before {
  background: var(--gold);
  border-color: var(--gold-light);
}

.timeline-year {
  font-family: 'Noto Serif KR', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 8px;
}

.timeline-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 24px;
  margin-top: -20px;
}

/* ===== 3. Crisis Section ===== */
.section-crisis {
  background: var(--cream);
}

.crisis-desc {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.8;
}

.crisis-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .crisis-images {
    grid-template-columns: 1fr;
  }
}

.crisis-img img {
  border-radius: var(--radius);
  border: 2px solid #e8c4c4;
  width: 100%;
}

.crisis-img .img-label {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--danger);
  text-align: center;
  font-weight: 500;
}

.impact-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.impact-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.impact-list li:last-child {
  border-bottom: none;
}

.impact-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

/* ===== 4. Petition Section ===== */
.section-petition {
  background: var(--white);
}

.petition-count {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

.petition-count strong {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.6rem;
  color: var(--gold);
  font-weight: 700;
}

.petition-form {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

@media (max-width: 480px) {
  .petition-form {
    padding: 24px 20px;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.form-check input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.form-check label {
  font-size: 0.88rem;
  color: var(--text-light);
  cursor: pointer;
}

.btn-petition {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Noto Serif KR', serif;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition), transform 0.15s ease;
}

.btn-petition:hover {
  background: var(--gold-light);
}

.btn-petition:active {
  transform: scale(0.98);
}

.btn-petition:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Recent Signatures */
.recent-signatures {
  margin-top: 40px;
}

.recent-signatures h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--navy);
}

.recent-signatures ul {
  list-style: none;
}

.recent-signatures li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.recent-signatures li:last-child {
  border-bottom: none;
}

.sig-name {
  font-weight: 500;
  color: var(--navy);
}

.sig-region {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.sig-message {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* ===== 5. Thank You + Actions Section ===== */
.section-thankyou {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.thankyou-desc {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 36px;
  line-height: 1.9;
}

.action-buttons {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 40px;
}

.btn-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
  color: var(--navy);
  min-width: 200px;
  text-align: center;
}

.btn-action:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(184,134,11,0.15);
}

.btn-action.active {
  border-color: var(--gold);
  background: linear-gradient(to bottom, rgba(184,134,11,0.06), rgba(184,134,11,0.02));
  box-shadow: 0 4px 16px rgba(184,134,11,0.12);
}

.btn-action-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.btn-action-label {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.btn-action-sub {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Prayer Card */
.prayer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  margin-bottom: 32px;
  animation: fadeIn 0.4s ease;
}

.prayer-card h3 {
  font-size: 1.15rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.6;
}

.prayer-text {
  color: var(--text);
  line-height: 2;
  font-size: 0.95rem;
}

.prayer-line {
  margin-bottom: 20px;
  padding-left: 24px;
  position: relative;
}

.prayer-mark {
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.75rem;
  color: var(--gold);
}

.prayer-mark.filled {
  color: var(--navy);
}

.prayer-amen {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 28px 0;
}

.prayer-response {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 8px;
}

.prayer-response p {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
}

.prayer-response .prayer-mark {
  position: relative;
  left: auto;
  top: auto;
  margin-right: 4px;
}

.prayer-footnote {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  font-style: italic;
}

/* Donate Card */
.donate-card {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .btn-action {
    padding: 24px 20px;
    min-width: auto;
  }

  .prayer-card {
    padding: 28px 20px;
  }

  .prayer-line {
    padding-left: 20px;
  }
}

/* Legacy donation classes kept for structure */
.section-donation {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.donation-lock {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(250,248,245,0.7);
  backdrop-filter: blur(2px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.donation-lock.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lock-message {
  text-align: center;
  color: var(--text-muted);
}

.lock-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.donation-content {
  opacity: 0.4;
  filter: blur(1px);
  pointer-events: none;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.donation-content.unlocked {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.donation-desc {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 32px;
}

.bank-info {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  margin-bottom: 32px;
}

.bank-info h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.bank-detail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.bank-name {
  background: var(--navy);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.bank-account {
  font-family: 'Noto Serif KR', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.bank-holder {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.donation-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.donation-form h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--navy);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-donation {
  width: 100%;
  padding: 14px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition);
}

.btn-donation:hover {
  background: var(--navy-light);
}

/* ===== 6. Share Section ===== */
.section-share {
  background: var(--navy);
  text-align: center;
}

.share-desc {
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}

.share-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity var(--transition);
}

.btn-share:hover {
  transform: translateY(-1px);
}

.btn-share:active {
  transform: scale(0.97);
}

.btn-kakao {
  background: #FEE500;
  color: #191919;
}

.btn-copy {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}

.qr-section {
  margin-top: 8px;
}

.qr-section img {
  margin: 0 auto;
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px;
}

.qr-label {
  margin-top: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ===== 7. Footer ===== */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
}

.footer p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ===== Floating CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  background: var(--gold);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Noto Serif KR', serif;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(184,134,11,0.35);
  transform: translateY(80px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
}

.floating-cta.visible {
  transform: translateY(0);
  opacity: 1;
}

.floating-cta:hover {
  background: var(--gold-light);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--white);
  padding: 18px 32px;
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
  .heritage-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .bank-detail {
    flex-direction: column;
    gap: 8px;
  }

  .share-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-share {
    justify-content: center;
  }

  .timeline-compact {
    justify-content: flex-start;
    padding-left: 4px;
    padding-right: 4px;
  }

  .timeline-dot {
    min-width: 56px;
  }

  .timeline-year {
    font-size: 0.7rem;
  }

  .timeline-label {
    font-size: 0.62rem;
  }

  .timeline-line {
    min-width: 12px;
  }
}
