/* 들어가는 문: 빛 기둥 아래 십자가, 위로 오르는 불티와 내려오는 빛 */
:root {
  --void: #0a0807;
  --char: #17120e;
  --gold: #f2c35a;
  --flame: #ffd98a;
  --ember: #ff9a3c;
  --stone: #f1e9d8;
  --dim: #b9ad98;
  --line: rgba(242, 195, 90, .38);
  --serif: "Song Myung", "AppleMyungjo", "Batang", serif;
  --sans: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; }
body { margin: 0; background: var(--void); color: var(--stone); font-family: var(--sans); font-size: 17px; line-height: 1.65; word-break: keep-all; }
h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ── 하늘: 고정된 배경 층 ── */
.sky { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.sky-image { position: absolute; inset: 0; background: url(/assets/art/bg/login.webp) center 42% / cover no-repeat; }
.sky-beam {
  position: absolute; left: 50%; top: -10%; width: min(46vw, 520px); height: 85%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 214, 140, .0), rgba(255, 214, 140, .22) 30%, rgba(255, 214, 140, 0) 75%);
  background-size: 100% 260%;
  mask-image: radial-gradient(ellipse 40% 100% at 50% 0, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 40% 100% at 50% 0, #000 30%, transparent 75%);
  mix-blend-mode: screen;
  animation: beam-fall 7s linear infinite;
}
@keyframes beam-fall { from { background-position: 0 100%; } to { background-position: 0 -60%; } }
.sky-rays {
  position: absolute; left: 50%; top: -30vh; width: 200vmax; height: 200vmax; margin-left: -100vmax;
  background: repeating-conic-gradient(from 180deg at 50% 0, rgba(255, 210, 130, .11) 0deg 3deg, transparent 3deg 9deg);
  mask-image: radial-gradient(circle at 50% 0, #000 0, transparent 46%);
  -webkit-mask-image: radial-gradient(circle at 50% 0, #000 0, transparent 46%);
  mix-blend-mode: screen; filter: blur(2px);
  animation: rays-sway 18s ease-in-out infinite alternate;
  transform-origin: 50% 0;
}
@keyframes rays-sway { from { transform: rotate(-5deg); opacity: .65; } to { transform: rotate(5deg); opacity: 1; } }
.sky-cross-glow {
  position: absolute; left: 50%; top: 52%; width: 36vmin; height: 36vmin; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 196, 100, .42), rgba(255, 150, 60, .12) 40%, transparent 68%);
  mix-blend-mode: screen; animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.94); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }
.sky-sparks { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.sky-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, rgba(10, 8, 7, .85)), linear-gradient(180deg, transparent 60%, rgba(10, 8, 7, .9)); }

/* ── 문: 첫 화면 ── */
.gate { position: relative; z-index: 1; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 28px 16px 22px; gap: 16px; }
.gate-title { text-align: center; display: grid; gap: 6px; }
.wordmark {
  font-family: "Cinzel", "Times New Roman", serif; font-weight: 500; font-size: clamp(2.3rem, 8.4vw, 5rem); line-height: 1.05; letter-spacing: .1em; margin-right: -.1em; white-space: nowrap;
  color: transparent; background: linear-gradient(180deg, #fff6dc, var(--gold) 55%, #b9771f); -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 18px rgba(255, 190, 90, .45));
}
.verse { font-family: var(--serif); color: #e4d8c2; font-size: clamp(.9rem, 2.4vw, 1.05rem); text-shadow: 0 0 8px #000, 0 0 3px #000, 0 1px 2px #000; }
.verse span { display: block; font-size: .78em; color: #c9bba3; margin-top: 2px; }

.card {
  align-self: end; width: min(100%, 25rem); margin-top: 30vh;
  background: linear-gradient(180deg, rgba(23, 18, 14, .82), rgba(12, 10, 8, .9));
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 20px 60px rgba(0, 0, 0, .7), 0 0 40px rgba(255, 170, 70, .08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card-form { display: grid; gap: 14px; padding: 24px 24px 18px; }
.card-form[hidden] { display: none; }
.card-title { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; text-align: center; color: var(--flame); margin-bottom: 2px; }
.line { display: grid; gap: 4px; }
.line span { font-size: .84rem; color: var(--dim); }
.line input {
  width: 100%; min-height: 46px; padding: .55em .8em; border-radius: 8px;
  background: rgba(0, 0, 0, .55); border: 1px solid #4a3d2c; color: var(--stone); font-size: 1.05rem;
}
.line input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(242, 195, 90, .25); }
.line input::placeholder { color: #6f665a; }
.newcomer { border-top: 1px dashed #4a3d2c; padding-top: 10px; }
.newcomer summary { cursor: pointer; color: var(--gold); font-size: .95rem; list-style: none; display: flex; align-items: center; gap: .5em; }
.newcomer summary::-webkit-details-marker { display: none; }
.newcomer summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s; }
.newcomer[open] summary::before { transform: rotate(45deg); }
.newcomer[open] summary { margin-bottom: 10px; }
.newcomer .line { margin-bottom: 8px; }
.note { font-size: .8rem; color: var(--dim); line-height: 1.55; }
.message { min-height: 1.4em; font-size: .9rem; color: #ffb4a0; text-align: center; }
.message.ok { color: var(--flame); }
.go {
  min-height: 50px; border: 0; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, #ffd27a, #e9a43a); color: #2a1a06; font-size: 1.1rem; font-family: var(--serif);
  box-shadow: 0 0 22px rgba(255, 180, 80, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: box-shadow .2s, transform .1s;
}
.go:hover { box-shadow: 0 0 32px rgba(255, 190, 90, .6), inset 0 1px 0 rgba(255, 255, 255, .5); }
.go:active { transform: translateY(1px); }
.go[disabled] { opacity: .6; cursor: wait; }
.link { border: 0; background: none; color: var(--dim); font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: center; padding: 4px; }
.link:hover { color: var(--stone); }
.more { grid-row: 3; align-self: end; color: var(--dim); text-decoration: none; font-size: .9rem; display: grid; justify-items: center; gap: 2px; text-shadow: 0 0 6px #000; }
.more::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }
.more:hover { color: var(--stone); }

/* ── 배경 찬양 단추 ── */
.music {
  position: fixed; left: 16px; bottom: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 8px 16px 8px 12px; border-radius: 22px; cursor: pointer;
  background: rgba(14, 11, 9, .78); border: 1px solid var(--line); color: var(--dim); font-size: .88rem;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.music:hover { color: var(--stone); }
.music[aria-pressed="true"] { color: var(--flame); }
.music-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.music-bars i { width: 3px; height: 5px; border-radius: 2px; background: currentColor; }
.music[aria-pressed="true"] .music-bars i { animation: bar 1.4s ease-in-out infinite; }
.music[aria-pressed="true"] .music-bars i:nth-child(2) { animation-delay: .3s; }
.music[aria-pressed="true"] .music-bars i:nth-child(3) { animation-delay: .6s; }
@keyframes bar { 0%, 100% { height: 4px; } 50% { height: 15px; } }
@media (prefers-reduced-motion: reduce) { .music[aria-pressed="true"] .music-bars i { animation: none; height: 10px; } }

/* ── 소개 ── */
.about { position: relative; z-index: 1; background: linear-gradient(180deg, rgba(10, 8, 7, .0), var(--void) 120px); padding: 80px 16px 70px; display: grid; justify-items: center; gap: 30px; }
.about h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 4vw, 2.1rem); text-align: center; color: var(--flame); max-width: 22em; line-height: 1.4; }
.film { margin: 0; width: min(100%, 960px); display: grid; gap: 8px; }
.film video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--line); background: #000; box-shadow: 0 20px 70px rgba(0, 0, 0, .8), 0 0 50px rgba(255, 170, 70, .1); }
.film figcaption { text-align: center; color: #8e8370; font-size: .82rem; }
.film.missing { display: none; }
.ways { list-style: none; margin: 0; padding: 0; width: min(100%, 960px); display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px 28px; }
.ways li { display: grid; align-content: start; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.ways b { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; color: var(--gold); }
.ways span { color: var(--dim); font-size: .95rem; }
.foot { color: #8e8370; font-family: var(--serif); text-align: center; }

@media (min-width: 980px) {
  /* 넓은 화면에서는 십자가를 가운데 두고 문은 오른쪽에 섭니다 */
  .card { position: absolute; right: max(5vw, calc(50% - 42rem)); top: 50%; transform: translateY(-50%); margin: 0; }
  .gate { grid-template-rows: auto 1fr auto; }
}
@media (max-width: 640px) {
  /* 세로 화면: 십자가 그림을 위쪽에 두고 그 아래에 문을 놓습니다 */
  .gate { padding-top: 22px; gap: 10px; }
  .card { margin-top: calc(50svh - 170px); }
  .card-form { padding: 18px 18px 12px; gap: 11px; }
  .sky-image { background-size: auto 62svh; background-position: center top; }
  .sky-image::after { content: ""; position: absolute; left: 0; right: 0; top: 50svh; height: 14svh; background: linear-gradient(180deg, transparent, var(--void)); }
  .sky-cross-glow { top: 39svh; width: 46vmin; height: 46vmin; }
  .sky-beam { height: 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .sky-beam, .sky-rays, .sky-cross-glow, .more::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* 새벽별 상징: 여덟 갈래 빛이 십자가 모양으로 길게 뻗습니다 */
.mark-star { width: 64px; height: 64px; justify-self: center; background: radial-gradient(circle, #fffbe8 0 10%, rgba(255, 220, 140, .9) 18%, transparent 40%), conic-gradient(from 0deg, transparent 0 40deg, rgba(255,214,130,.0) 40deg); position: relative; filter: drop-shadow(0 0 18px rgba(255, 200, 110, .8)); animation: star-breathe 5s ease-in-out infinite; }
.mark-star::before, .mark-star::after { content: ""; position: absolute; left: 50%; top: 50%; background: linear-gradient(90deg, transparent, #fff3c8 50%, transparent); transform: translate(-50%, -50%); }
.mark-star::before { width: 64px; height: 3px; }
.mark-star::after { width: 3px; height: 64px; background: linear-gradient(180deg, transparent, #fff3c8 45%, #fff3c8 60%, transparent); }
@keyframes star-breathe { 50% { transform: scale(1.12); filter: drop-shadow(0 0 28px rgba(255, 210, 120, .95)); } }
@media (prefers-reduced-motion: reduce) { .mark-star { animation: none; } }
/* 가입 칸 설명과 다음 칸 사이를 띄웁니다 */
.newcomer .note { margin: 4px 0 12px; }
/* 폰에서는 아래에 떠 있는 음악 단추가 링크를 가리지 않게 여백을 둡니다 */
@media (max-width: 640px) { .gate { padding-bottom: 84px; } }
