/* 홈(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 h1 .nowrap { white-space: nowrap; }
/* 히어로 제목 속 '시(施)' 강조 글자 */
.hero h1 .char-hl {
  color: #ffd875;
  text-shadow: 0 0 22px rgba(255, 216, 117, 0.55);
  position: relative;
  cursor: default;
}
/* '施' 한자는 툴팁 트리거 */
.hero h1 .char-hl-si {
  cursor: pointer;
  border-bottom: 2px dotted rgba(255, 216, 117, 0.65);
}
/* 예쁜 툴팁은 순수 CSS hover(::after)가 아니라 JS가 body 에 만드는 단일
   .char-tip 요소로 통일한다. 마우스 오버(hover)든 터치든 동일한 팝업이 뜬다.
   (중복이던 ::after/::before hover 툴팁은 제거) */
/* 터치 기기에서도 보이는 툴팁 요소 (.char-tip, JS가 body에 생성) */
.char-tip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  max-width: 340px;
  padding: 14px 18px;
  background: rgba(20, 16, 12, 0.97);
  color: #f7f0e2;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: -0.01em;
  text-align: left;
  border-radius: 12px;
  border: 1px solid rgba(255, 216, 117, 0.35);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.char-tip.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* 툴팁 꼬리 — 글자 중앙(--arrow-x)에 맞춘다 */
.char-tip::before {
  content: "";
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  background: rgba(20, 16, 12, 0.97);
  transform: rotate(45deg);
}
.char-tip[data-arrow="top"]::before {
  bottom: -6px;
  border-right: 1px solid rgba(255, 216, 117, 0.35);
  border-bottom: 1px solid rgba(255, 216, 117, 0.35);
}
.char-tip[data-arrow="bottom"]::before {
  top: -6px;
  border-left: 1px solid rgba(255, 216, 117, 0.35);
  border-top: 1px solid rgba(255, 216, 117, 0.35);
}
/* 탭 가능함을 알리는 표시 (모바일) */
.hero h1 .char-hl-si { -webkit-tap-highlight-color: transparent; }
.hero h1 .char-hl-si.tip-open {
  color: #fff0c4;
  text-shadow: 0 0 26px rgba(255, 216, 117, 0.8);
}
@media (pointer: coarse) {
  .hero h1 .char-hl-si {
    padding: 0 4px; /* 탭 타깃 확대 */
    border-bottom-width: 2px;
  }
}
.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);
}
/* 터치 기기: 권한 없이 스스로 도는 대각선 왕복 틸트 (JS가 transform을 쓸 땐 클래스 제거) */
.orbit.auto-tilt {
  animation: orbit-auto-tilt 16s ease-in-out infinite;
  transition: none; /* CSS 애니메이션이 transform을 소유하므로 transition은 끈다 */
}
@keyframes orbit-auto-tilt {
  0%   { transform: perspective(1000px) rotateX(-6deg) rotateY(-13deg); }
  25%  { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
  50%  { transform: perspective(1000px) rotateX(6deg) rotateY(13deg); }
  75%  { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
  100% { transform: perspective(1000px) rotateX(-6deg) rotateY(-13deg); }
}
@media (prefers-reduced-motion: reduce) {
  .orbit.auto-tilt { animation: none; }
}
.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 h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--ink);
}
.card p { color: var(--muted); font-size: 0.95rem; }

/* 사진 배경 카드 (공통: 비넷 + 흰 텍스트) */
.card-photo {
  position: relative;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.card-photo-young {
  background-image: url("../images/young-buddhists-bg.jpg");
}
.card-photo-influence {
  background-image: url("../images/good-influence-bg.jpg");
}
.card-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 42%, rgba(22, 16, 12, 0.05) 0%, rgba(22, 16, 12, 0.28) 48%, rgba(22, 16, 12, 0.82) 100%);
  z-index: 0;
}
.card-photo > * {
  position: relative;
  z-index: 1;
}
.card-photo h3,
.card-photo p {
  color: #fff;
}
.card-photo .concept-icon {
  background: rgba(255, 255, 255, 0.16);
}

/* 밥할머니 스토리 섹션 배경 */
.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;
}

/* 선한 영향력 섹션 배경 (사진 + 흰색 그라디언트 마스크) */
.section-good-influence {
  position: relative;
  background-image: url("../images/good-influence-section-bg.jpg");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.section-good-influence::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(251, 246, 236, 0.68) 0%, rgba(251, 246, 236, 0.82) 100%);
  z-index: -1;
  pointer-events: none;
}
.section-good-influence .heading {
  color: var(--ink);
}

/* 밥할머니 스토리 타임라인 */
.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;
  transform-style: preserve-3d;
}
.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; }
}

/* 제목 내 '밥할머니' 인라인 로고 */
.bh-inline-logo {
  height: 0.72em;
  width: auto;
  display: inline-block;
  vertical-align: -0.06em;
  margin-right: 0.06em;
}

/* 섹션 제목 위에 배치하는 큰 밥할머니 로고 */
.bh-section-logo {
  display: block;
  height: 56px;
  width: auto;
  margin: 0 0 18px;
}
