/* Star Mansion — shared site styles (relative paths) */
:root {
  --bg-deep: #0e0b16;
  --bg-card: rgba(22, 18, 38, 0.72);
  --gold: #d4af37;
  --gold-soft: #e8d5a3;
  --violet: #7c6cf0;
  --text: #f2ecff;
  --text-muted: rgba(242, 236, 255, 0.72);
  --border: rgba(212, 175, 55, 0.35);
  --glow: rgba(212, 175, 55, 0.45);
  --radius: 18px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR",
    "Hiragino Sans", "Apple SD Gothic Neo", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.65;
  overflow-x: hidden;
}

/* animated starfield backdrop */
.bg-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #2a2248 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(124, 108, 240, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(212, 175, 55, 0.08), transparent),
    var(--bg-deep);
  pointer-events: none;
}
.bg-stars::before,
.bg-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 80% 40%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 35% 75%, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(2px 2px at 60% 10%, rgba(212, 175, 55, 0.35), transparent);
  animation: twinkle 8s ease-in-out infinite alternate;
  opacity: 0.6;
}
.bg-stars::after {
  animation-delay: -3s;
  opacity: 0.4;
  transform: translateX(3%) translateY(2%);
}

@keyframes twinkle {
  0% {
    opacity: 0.35;
    transform: scale(1);
  }
  100% {
    opacity: 0.75;
    transform: scale(1.02);
  }
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 20px var(--glow), 0 0 40px rgba(124, 108, 240, 0.2);
  }
  50% {
    box-shadow: 0 0 32px var(--glow), 0 0 60px rgba(124, 108, 240, 0.35);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

@media (min-width: 768px) {
  .wrap {
    padding: 0 1.25rem 4rem;
  }
}

/* header + mobile drawer */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.8s ease-out both;
  position: relative;
  z-index: 50;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.nav-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.2);
}
.nav-brand span {
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold), var(--violet));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--gold-soft);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger-lines,
.nav-hamburger-lines::before,
.nav-hamburger-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger-lines::before,
.nav-hamburger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-hamburger-lines::before {
  top: -7px;
}
.nav-hamburger-lines::after {
  top: 7px;
}
body.drawer-open .nav-hamburger-lines {
  background: transparent;
}
body.drawer-open .nav-hamburger-lines::before {
  transform: translateY(7px) rotate(45deg);
}
body.drawer-open .nav-hamburger-lines::after {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 12, 0.72);
  z-index: 90;
  backdrop-filter: blur(4px);
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  position: fixed;
  top: 0;
  right: 0;
  width: min(20rem, 88vw);
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 5rem 1.25rem 2rem;
  background: linear-gradient(
    165deg,
    rgba(22, 18, 38, 0.98) 0%,
    rgba(14, 11, 22, 0.99) 100%
  );
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.45);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow-y: auto;
}
body.drawer-open .site-nav {
  transform: translateX(0);
}
.site-nav > a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}
.site-nav > a:hover {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
}

.lang-wrap label {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}
.lang-wrap select {
  width: 100%;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.lang-wrap--nav {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .nav-hamburger {
    display: none;
  }
  .nav-backdrop {
    display: none !important;
  }
  .site-nav {
    position: static;
    transform: none !important;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 0.35rem 0.75rem;
    overflow: visible;
  }
  .site-nav > a {
    font-size: 0.95rem;
    padding: 0.35rem 0.65rem;
    color: var(--text-muted);
  }
  .site-nav > a:hover {
    color: var(--gold-soft);
  }
  .lang-wrap--nav {
    margin-top: 0;
    padding-top: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: auto;
  }
  .lang-wrap--nav label {
    margin: 0;
    white-space: nowrap;
  }
  .lang-wrap--nav select {
    width: auto;
    min-width: 7.5rem;
  }
}

/* hero */
.hero {
  display: grid;
  gap: 2rem;
  padding: 1.75rem 0 2.5rem;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding: 2.5rem 0 3rem;
  }
}

.hero-copy h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  animation: fadeUp 0.9s ease-out 0.1s both;
}
.hero-copy .badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-soft);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  animation: glowPulse 3.5s ease-in-out infinite;
}
.hero-copy .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  animation: fadeUp 0.9s ease-out 0.2s both;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeUp 0.9s ease-out 0.3s both;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #a67c2a);
  color: #1a1525;
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-visual {
  position: relative;
  min-height: min(72vw, 320px);
  animation: fadeUp 1s ease-out 0.25s both;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Luna hero + starlight */
.hero-luna-stage {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-luna-glow {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(212, 175, 55, 0.35) 0%,
    rgba(124, 108, 240, 0.15) 38%,
    transparent 70%
  );
  animation: lunaGlowPulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lunaGlowPulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}
.hero-star-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.22);
  animation: orbit 56s linear infinite;
  pointer-events: none;
}
.hero-star-ring--slow {
  inset: -5%;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  animation-duration: 88s;
  animation-direction: reverse;
}
.hero-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-sparkles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9), 0 0 14px rgba(212, 175, 55, 0.6);
  opacity: 0;
  animation: starTwinkle 2.8s ease-in-out infinite;
}
.hero-sparkles span:nth-child(1) {
  top: 8%;
  left: 18%;
  animation-delay: 0s;
}
.hero-sparkles span:nth-child(2) {
  top: 22%;
  right: 12%;
  animation-delay: 0.4s;
}
.hero-sparkles span:nth-child(3) {
  bottom: 28%;
  left: 8%;
  animation-delay: 0.9s;
}
.hero-sparkles span:nth-child(4) {
  bottom: 14%;
  right: 20%;
  animation-delay: 1.2s;
}
.hero-sparkles span:nth-child(5) {
  top: 52%;
  left: 4%;
  animation-delay: 1.6s;
}
.hero-sparkles span:nth-child(6) {
  top: 38%;
  right: 6%;
  animation-delay: 0.2s;
}
.hero-sparkles span:nth-child(7) {
  top: 62%;
  right: 28%;
  animation-delay: 2s;
}
.hero-sparkles span:nth-child(8) {
  bottom: 42%;
  right: 4%;
  animation-delay: 2.4s;
}
@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  35% {
    opacity: 1;
    transform: scale(1.15);
  }
  55% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}
.hero-luna {
  position: relative;
  z-index: 2;
  width: min(78%, 260px);
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  animation: floatY 5.5s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.45))
    drop-shadow(0 0 48px rgba(124, 108, 240, 0.25));
}
.hero-card-float {
  position: absolute;
  z-index: 3;
  width: min(22%, 64px);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: floatY 3.2s ease-in-out infinite;
}
.hero-card-float--a {
  top: 10%;
  right: 4%;
  animation-delay: -0.5s;
}
.hero-card-float--b {
  bottom: 16%;
  left: 6%;
  animation-delay: -1s;
}

/* sections */
section {
  margin: 3rem 0;
}
section h2 {
  font-size: 1.65rem;
  margin: 0 0 1.25rem;
  color: var(--gold-soft);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  backdrop-filter: blur(10px);
  transition: transform 0.25s, border-color 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.55);
}
.card img.thumb {
  width: 100%;
  max-height: 120px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.lang-pills span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(124, 108, 240, 0.2);
  border: 1px solid rgba(124, 108, 240, 0.35);
  font-size: 0.85rem;
}

.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer a {
  color: var(--gold-soft);
}

/* marketing / privacy prose */
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.35rem;
}
.prose p,
.prose li {
  color: var(--text-muted);
}
.prose ul {
  padding-left: 1.25rem;
}

.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0;
}
.accordion-item + .accordion-item {
  border-top: 1px solid var(--border);
}
.accordion-head {
  width: 100%;
  text-align: start;
  padding: 1rem 1.25rem;
  background: rgba(22, 18, 38, 0.85);
  color: var(--text);
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.accordion-head::after {
  content: "+";
  color: var(--gold);
  font-size: 1.25rem;
}
.accordion-item.open .accordion-head::after {
  content: "–";
}
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
  background: rgba(14, 11, 22, 0.6);
}
.accordion-item.open .accordion-panel {
  max-height: 2400px;
}
.accordion-panel-inner {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
}

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  margin: 2rem 0;
}
.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.85rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--glow);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat {
  text-align: center;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.stat b {
  display: block;
  font-size: 1.75rem;
  color: var(--gold-soft);
}

.card-grid--thumb img.tarot-thumb {
  width: 100%;
  max-height: 110px;
  object-fit: contain;
  margin-bottom: 0.65rem;
}

.prose .legal-html,
.legal-html {
  font-size: 0.95rem;
  line-height: 1.65;
}
.prose .legal-html p,
.legal-html p {
  margin: 0 0 1rem;
}
.prose .legal-html a,
.legal-html a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-word;
}
.prose .legal-html a:hover,
.legal-html a:hover {
  color: #fff5cc;
}
.legal-links {
  margin: 0.75rem 0 1.25rem;
  padding-left: 1.15rem;
}
.legal-links li {
  margin-bottom: 0.45rem;
}

body.drawer-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  section h2 {
    font-size: 1.4rem;
  }
}
