/* 홈(index.html) 전용 스타일 */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  /* 살짝 어두운 톤 배경 — 주의를 모으기 위한 어두운 브라운·버건디 그라디언트 */
  background: radial-gradient(120% 120% at 50% 20%, #4a3628 0%, #33261b 45%, #231a12 100%);
  color: #f7f0e2;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1.display { margin: 20px 0 28px; color: #f7f0e2; }
.hero .eyebrow { color: #e0b45c; }
.hero .lead { margin-bottom: 36px; color: #e9dfc9; }
.hero .lead strong { color: #f7f0e2; }
/* 어두운 배경에서는 골드 그라디언트로 두드러지게 */
.hero .grad-text {
  background: linear-gradient(135deg, #f3d183 0%, #e0b45c 45%, #c8942d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
/* 어두운 배경에서 ghost 버튼은 밝게 */
.hero-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(247, 240, 226, 0.4);
  color: #f7f0e2;
}
.hero-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid rgba(247, 240, 226, 0.16);
}
.hero-meta .m {
  display: flex;
  flex-direction: column;
}
.hero-meta .m b {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-meta .m span {
  font-size: 0.82rem;
  color: #cdbfa2;
}

/* 히어로 오른쪽 시각 */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.orbit {
  position: relative;
  width: 400px;
  height: 400px;
  max-width: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.orbit-bg {
  position: absolute;
  inset: -20px;
  display: grid;
  place-items: center;
  transform: translateZ(-60px);
  will-change: transform;
}
.dharma-bg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(200, 148, 45, 0.25));
}
.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(200, 148, 45, 0.28);
  animation: spin 30s linear infinite;
  --z: -40px;
  transform: translateZ(var(--z));
  will-change: transform;
}
.orbit-ring.r2 {
  inset: 34px;
  border-color: rgba(140, 47, 57, 0.28);
  animation-direction: reverse;
  animation-duration: 22s;
  --z: -30px;
  transform: translateZ(var(--z));
}
.orbit-ring.r3 {
  inset: 70px;
  border-color: rgba(201, 106, 106, 0.24);
  animation-duration: 16s;
  --z: -20px;
  transform: translateZ(var(--z));
}
@keyframes spin {
  from { transform: rotate(0deg) translateZ(var(--z, 0px)); }
  to { transform: rotate(360deg) translateZ(var(--z, 0px)); }
}
.orbit-core {
  position: relative;
  width: 360px;
  height: 360px;
  background: transparent;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateZ(50px);
}
.dharma-wheel-img {
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  will-change: transform;
  object-fit: contain;
  filter: drop-shadow(0 0 45px rgba(200, 148, 45, 0.4));
  transition: opacity 0.5s ease;
}
/* 밥할머니 오버레이 표시 중 법륜을 잠시 숨김 */
.dharma-wheel-img.hidden {
  opacity: 0;
}
/* 밥할머니/암베드카르 원형 일러스트 — 법륜 위에 겹쳐 hover 시 페이드 + 틸트 */
.babhalmeoni-overlay,
.ambedkar-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  object-fit: contain;
  transform: translate(-50%, -50%) translateZ(80px);
  transform-style: preserve-3d;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 40px rgba(200, 148, 45, 0.45));
  will-change: transform, opacity;
  border-radius: 50%;
}
.babhalmeoni-overlay.visible,
.ambedkar-overlay.visible {
  opacity: 1;
}
/* 오른쪽에서 왼쪽으로 서서히 틸트(rotateY)하는 상태 */
.babhalmeoni-overlay.tilt-rl {
  transform: translate(-50%, -50%) translateZ(80px) rotateY(28deg);
}
.orbit-dots {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: spinSlow 45s linear infinite;
  will-change: transform;
  transform: translateZ(5px);
}
@keyframes spinSlow {
  from { transform: rotate(0deg) translateZ(5px); }
  to { transform: rotate(360deg) translateZ(5px); }
}
.orbit-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(200, 148, 45, 0.8);
  transform: translateZ(10px);
  will-change: transform;
}

/* 개념 카드 */
.concept-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 18px;
  background: var(--surface-2);
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.card p { color: var(--muted); font-size: 0.95rem; }

/* 밥할머니 스토리 섹션 배경 */
.section-babhalmeoni {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
  isolation: isolate;
}
.section-babhalmeoni::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/nojeokbong-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.16;
  z-index: -1;
  pointer-events: none;
}

/* 밥할머니 스토리 타임라인 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
}
.tl-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  position: relative;
  padding-bottom: 36px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--gold), var(--accent));
  opacity: 0.3;
}
.tl-item:last-child::before { display: none; }
.tl-year {
  text-align: right;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-top: 2px;
}
.tl-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.tl-body h4 { margin-bottom: 6px; font-size: 1.05rem; }
.tl-body p { color: var(--muted); font-size: 0.92rem; }

/* CTA 배너 */
.cta-banner {
  border-radius: 28px;
  padding: 56px 48px;
  background: var(--grad-main);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/gongyanggan-cta-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  mix-blend-mode: overlay;
}
.cta-banner > * {
  position: relative;
  z-index: 1;
}
.cta-banner h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 14px; }
.cta-banner .btn { background: #fff; color: #8c2f39; }

/* ===== 봉축법어 모달 ===== */
.dharma-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dharma-modal.open { display: flex; }
.dharma-overlay {
  position: absolute;
  inset: 0;
  background: rgba(58, 47, 40, 0.55);
  backdrop-filter: blur(6px);
}
.dharma-dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  background: var(--surface);
  border: 1px solid rgba(200, 148, 45, 0.35);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  animation: dharmaPop 0.28s ease;
}
@keyframes dharmaPop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.dharma-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.dharma-close:hover { background: rgba(140,47,57,0.1); }
.dharma-scroll {
  padding: 40px 42px 36px;
  overflow-y: auto;
  max-height: 86vh;
}
.dharma-body h3 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
  color: #8c2f39;
}
.dharma-body p {
  margin: 10px 0;
  line-height: 1.85;
  color: #4a3d33;
}
.dharma-quote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--gold);
  background: var(--surface-2);
  border-radius: 0 12px 12px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #8c2f39;
}
.dharma-sign {
  margin-top: 28px;
  text-align: right;
  color: var(--muted);
  line-height: 1.7;
}
.dharma-sign strong { color: #8c2f39; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .orbit { width: 240px; height: 240px; }
  .orbit-ring.r2 { inset: 26px; }
  .orbit-ring.r3 { inset: 54px; }
  .orbit-core { width: 230px; height: 230px; }
  .tl-item { grid-template-columns: 64px 1fr; }
  .tl-item::before { left: 26px; }
  .dharma-scroll { padding: 32px 24px 28px; }
}
