:root {
  --navy-dd: #0E2240; --navy-d: #162B51; --navy: #0A4060; --teal: #03696B;
  --gold: #E9B21A; --gold-l: #F6D36B; --gold-d: #AE8F37; --red: #941716;
  --mist: #D7E3EC;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100svh;
  font-family: "Noto Sans KR", "Noto Sans Khmer", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff; background: var(--navy-dd); overflow-x: hidden;
}

/* ── 배경: 사진 두 장이 천천히 교차, 조금씩 다가옴 ── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--navy-dd); }
.photo {
  position: absolute; inset: -4%;
  background-size: cover; background-position: center;
  filter: blur(2.5px) saturate(.7);
  opacity: 0;
  animation: slide 26s infinite, drift 26s ease-in-out infinite alternate;
}
.photo.p1 { background-image: url(assets/photo-seminar.jpg); }
.photo.p2 { background-image: url(assets/photo-gate.jpg); animation-delay: 13s, 0s; }
@keyframes slide {
  0% { opacity: 0; } 8% { opacity: 1; } 46% { opacity: 1; } 56% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes drift {
  from { transform: scale(1.02) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.5%, -1%); }
}
.veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 50% 8%, rgba(233,178,26,.16), transparent 65%),
    linear-gradient(180deg, rgba(14,34,64,.80) 0%, rgba(10,64,96,.72) 48%, rgba(14,34,64,.92) 100%);
}

/* 아래에서 올라오는 작은 빛 */
.lights span {
  position: absolute; bottom: -12px; left: var(--x);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--gold-l); box-shadow: 0 0 10px 2px rgba(233,178,26,.55);
  opacity: 0;
  animation: rise var(--t) linear infinite; animation-delay: var(--d);
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: .85; }
  75% { opacity: .5; }
  100% { transform: translate(var(--dx), -105vh); opacity: 0; }
}

/* ── 언어 ── */
.lang { position: absolute; top: 14px; right: 14px; display: flex; gap: 4px; z-index: 2; }
.lang button {
  font: inherit; font-size: 13px; color: var(--mist); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 12px; cursor: pointer;
  backdrop-filter: blur(4px);
}
.lang button:hover { background: rgba(255,255,255,.16); }
.lang button[aria-pressed="true"] { background: var(--gold); color: #2B2100; border-color: var(--gold); font-weight: 700; }

/* ── 가운데 ── */
main {
  width: 100%; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 64px 20px 140px;
}
main > * { max-width: 100%; }
.logo {
  width: 104px; height: 104px; border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold-d), 0 14px 44px rgba(0,0,0,.45);
  opacity: 0; animation: fade 1.4s ease .1s forwards, glow 5s ease-in-out 1.5s infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold-d), 0 14px 44px rgba(0,0,0,.45); }
  50% { box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold), 0 14px 56px rgba(233,178,26,.38); }
}
.eyebrow {
  margin: 24px 0 0; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-l); font-weight: 500;
  opacity: 0; animation: fade 1.2s ease .5s forwards;
}
h1 {
  margin: 14px 0 0; max-width: 18em;
  font-family: "Noto Serif KR", "Noto Serif Khmer", Georgia, serif; font-weight: 700;
  font-size: clamp(30px, 6vw, 54px); line-height: 1.3; letter-spacing: -.005em;
  text-shadow: 0 2px 28px rgba(0,0,0,.45);
  overflow-wrap: anywhere;
}
h1 .w {
  display: inline-block; opacity: 0; transform: translateY(14px); filter: blur(8px);
  animation: word 1.2s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(.8s + var(--i) * .24s);
}
@keyframes word { to { opacity: 1; transform: none; filter: none; } }
html[lang="km"] .eyebrow { letter-spacing: .08em; text-transform: none; }
html[lang="km"] h1 { font-family: "Noto Serif Khmer", "Noto Sans Khmer", serif; line-height: 1.6; }

/* 금빛 붓선 */
.stroke { width: min(62vw, 260px); height: 18px; margin-top: 12px; overflow: visible; }
.stroke path {
  fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  animation: draw 1.8s cubic-bezier(.5,0,.2,1) forwards; animation-delay: var(--after, 2s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.sub {
  margin: 18px 0 0; max-width: 30em; font-size: clamp(15px, 2.3vw, 18px); line-height: 1.75; color: var(--mist);
  overflow-wrap: anywhere;
  opacity: 0; animation: fade 1.4s ease forwards; animation-delay: var(--after2, 2.6s);
}
@keyframes fade { to { opacity: 1; } }

/* 준비 중 — 숨 쉬는 세 점 */
.dots { margin: 26px 0 0; display: flex; gap: 9px; justify-content: center; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: .25; animation: breathe 1.8s ease-in-out infinite; }
.dots span:nth-child(2) { animation-delay: .3s; }
.dots span:nth-child(3) { animation-delay: .6s; }
@keyframes breathe { 0%, 100% { opacity: .25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }

/* ── 하단: 캄보디아 ⟶ 한국, 빛이 건너감 ── */
footer { position: fixed; left: 0; right: 0; bottom: 0; text-align: center; padding: 14px 16px 18px; pointer-events: none; }
.bridge { display: inline-flex; align-items: center; gap: 10px; }
.bridge img { width: 48px; height: 32px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.3), 0 4px 14px rgba(0,0,0,.4); }
.arc { width: 150px; height: 40px; overflow: visible; }
.arc path { fill: none; stroke: rgba(233,178,26,.55); stroke-width: 1.5; stroke-dasharray: 2 5; stroke-linecap: round; }
.arc circle { fill: #FFE08A; filter: drop-shadow(0 0 4px #E9B21A); }
.credit {
  margin: 12px 0 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(215,227,236,.65); pointer-events: auto;
}
.credit a { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(233,178,26,.6); padding-bottom: 1px; }
.credit a:hover { border-bottom-color: var(--gold); }

@media (max-width: 480px) {
  .lang { top: 10px; right: 10px; }
  .lang button { font-size: 12px; padding: 5px 10px; }
  main { padding-top: 72px; }
  .bridge img { width: 42px; height: 28px; }
  .arc { width: 110px; height: 32px; }
}
/* 움직임 끄기: 사용자가 원할 때, 또는 브라우저가 애니메이션을 안 돌릴 때(app.js가 html.static 붙임) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .logo, .eyebrow, .sub, h1 .w { opacity: 1; transform: none; filter: none; }
  .stroke path { stroke-dashoffset: 0; }
  .photo.p1 { opacity: 1; }
  .lights { display: none; }
}
html.static *, html.static *::before, html.static *::after { animation: none !important; }
html.static .logo, html.static .eyebrow, html.static .sub, html.static h1 .w { opacity: 1; transform: none; filter: none; }
html.static .stroke path { stroke-dashoffset: 0; }
html.static .photo.p1 { opacity: 1; }
html.static .lights { display: none; }
