/* =====================================================================
   Colours & fonts. Change a value here and it updates everywhere.
   ===================================================================== */
:root {
  --bg:      #0A0A0B;
  --bg-glow: #1A1A1C;
  --card:    #111113;
  --card2:   #141416;
  --ink:     #F3EBDD;
  --gold:    #C9A45C;
  --gold-hi: #D8B76E;
  --rose:    #E8B4B8;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  Karla, system-ui, -apple-system, sans-serif;
}

/* ---------- base ---------- */
html, body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
body { font-family: var(--sans); }
a { color: var(--gold); text-decoration: none; }
@media (hover: hover) { a:hover { color: var(--rose); } }
button { font-family: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }

.page {
  min-height: 100vh;
  background: radial-gradient(120% 70% at 50% 0%, var(--bg-glow) 0%, var(--bg) 65%);
  position: relative;
  overflow-x: hidden;
}

.serif { font-family: var(--serif); }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.muted { color: rgba(243,235,221,.5); }

/* ---------- buttons ---------- */
.btn {
  height: 56px; border-radius: 2px; font-size: 14px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; transition: background .25s, border-color .25s;
}
.btn-gold { border: 0; background: var(--gold); color: var(--bg); }
@media (hover: hover) { .btn-gold:hover { background: var(--gold-hi); } }
.btn-ghost { border: 1px solid var(--gold); background: transparent; color: var(--ink); }

/* ---------- animations ---------- */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fall    { 0% { transform: translateY(-10vh) rotate(0); opacity: 1; } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } }
@keyframes shake   { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes wobble  { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-1.6deg); } 75% { transform: rotate(1.6deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes ring    { 0% { transform: scale(.4); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes heart   { 0% { transform: translate(-50%,0) scale(0); opacity: 0; } 30% { transform: translate(-50%,0) scale(1.25); opacity: 1; } 100% { transform: translate(-50%,-50px) scale(1); opacity: 0; } }
@keyframes unfold  { from { opacity: 0; transform: perspective(900px) rotateX(-12deg) translateY(30px); } to { opacity: 1; transform: none; } }

.screen { box-sizing: border-box; }

/* =====================================================================
   01 — The Question
   ===================================================================== */
.ask {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 28px; animation: fadeIn 1.2s ease both;
}
.ask-name {
  font-family: var(--serif); font-style: italic; font-weight: 500; margin: 0;
  font-size: clamp(56px, 16vw, 96px); line-height: .95; letter-spacing: -.01em;
  animation: fadeUp 1.1s ease both;
}
.ask-q {
  font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 7.5vw, 44px); line-height: 1.1;
  margin: 22px 0 0; max-width: 420px; text-wrap: pretty; animation: fadeUp 1.1s .25s ease both;
}
.ask-sub { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 26px 0 0; animation: fadeUp 1.1s .5s ease both; }
.ask-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 56px; width: min(100%, 280px); animation: fadeIn 1.1s .75s ease both; }

.no-slot { height: 56px; }               /* keeps the layout still when No runs away */
#btnNo {
  position: relative; width: 100%; max-width: calc(100vw - 32px); z-index: 10; touch-action: none;
  transition: left .45s cubic-bezier(.2,.8,.2,1), top .45s cubic-bezier(.2,.8,.2,1), transform .6s ease, opacity .6s;
}
#btnNo.fled { position: fixed; width: 280px; }
#btnNo.small { transform: scale(.55); opacity: .6; }

.whisper { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--rose); margin: 6px 0 0; animation: fadeIn 1.4s ease both; }

#confetti > i {
  position: fixed; top: 0; display: block; opacity: 0; z-index: 30; pointer-events: none;
  animation-name: fall; animation-timing-function: ease-in; animation-fill-mode: both;
}

/* =====================================================================
   02 — The Login (quiz)
   ===================================================================== */
.login {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; animation: fadeIn 1s ease both;
}
.login-inner { width: min(100%, 440px); text-align: center; }
.login-title { font-family: var(--serif); font-weight: 500; font-size: clamp(36px, 10vw, 54px); line-height: 1; letter-spacing: -.01em; margin: 0; }
.login-sub { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 18px 0 0; }

.dots { display: flex; gap: 8px; justify-content: center; margin: 34px 0 22px; }
.dots span { width: 28px; height: 2px; background: rgba(243,235,221,.2); transition: background .5s; }
.dots span.current { background: var(--ink); }
.dots span.done { background: var(--gold); }

.qcard {
  text-align: left; border: 1px solid rgba(201,164,92,.35); padding: 22px; border-radius: 2px; background: var(--card);
}
.qcard.shake { animation: shake .5s ease; }
.q-num { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,235,221,.5); }
.q-text { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.15; margin: 12px 0 26px; text-wrap: pretty; }
.q-options { display: grid; gap: 10px; }
.q-options button:focus { outline: none; }
.q-options button:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.q-options button {
  height: 52px; border: 1px solid rgba(201,164,92,.35); background: transparent; color: var(--ink);
  font-size: 15px; border-radius: 2px; text-align: left; padding: 0 18px; transition: border-color .25s, background .25s;
}
@media (hover: hover) { .q-options button:hover { border-color: var(--gold); background: rgba(201,164,92,.08); } }
.q-wrong { height: 22px; margin-top: 18px; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--rose); }

.unlocking { height: 300px; display: flex; align-items: center; justify-content: center; position: relative; }
.unlocking .ring { position: absolute; width: 140px; height: 140px; border: 1px solid var(--gold); border-radius: 50%; animation: ring 1.6s ease-out infinite; }
.unlocking .ring:nth-child(2) { animation-delay: .5s; }
.unlocking .welcome { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--gold); animation: fadeIn 1s ease both; }

/* =====================================================================
   03 — The Season (dashboard)
   ===================================================================== */
.dash { max-width: 520px; margin: 0 auto; padding: 72px 22px 64px; animation: fadeIn 1s ease both; }

.hero-editorial { text-align: center; }
.hero-editorial .hero-title { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 11vw, 60px); line-height: 1; letter-spacing: -.015em; margin: 22px 0 0; text-wrap: balance; }
.hero-editorial .hero-line  { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(30px, 8vw, 42px); line-height: 1.05; margin: 16px 0 0; color: var(--rose); }
.hero-editorial .hero-khmer { font-size: 13px; color: rgba(243,235,221,.5); margin: 8px 0 0; letter-spacing: .06em; }
.hero-editorial .hero-close { font-family: var(--serif); font-weight: 500; font-size: clamp(30px, 8vw, 42px); line-height: 1.05; margin: 16px 0 0; }

.hero-ticket { border: 1px solid var(--gold); padding: 34px 26px 30px; position: relative; text-align: left; background: var(--card); }
.hero-ticket .ticket-head { display: flex; justify-content: space-between; }
.hero-ticket .hero-title { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 12vw, 68px); line-height: .92; letter-spacing: -.02em; margin: 26px 0 0; text-wrap: balance; }
.hero-ticket .hero-line  { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 6.5vw, 32px); line-height: 1.1; margin: 20px 0 0; color: var(--rose); }
.hero-ticket .hero-khmer { font-size: 12px; color: rgba(243,235,221,.5); margin: 6px 0 0; }
.hero-ticket .ticket-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 28px; border-top: 1px dashed rgba(201,164,92,.4); padding-top: 18px; }
.hero-ticket .hero-close { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0; }
.hero-ticket .admit { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }

.divider { display: flex; align-items: center; gap: 14px; margin: 44px 0 36px; color: var(--gold); }
.divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,164,92,.6)); }
.divider .line:last-child { background: linear-gradient(90deg, rgba(201,164,92,.6), transparent); }

.cards { display: grid; gap: 14px; }
.card { text-align: left; display: block; width: 100%; border-radius: 2px; position: relative; color: var(--ink); }
.card-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }

.card-open {
  border: 1px solid var(--gold); padding: 22px 22px 20px;
  background: linear-gradient(110deg, rgba(201,164,92,.05) 30%, rgba(201,164,92,.2) 50%, rgba(201,164,92,.05) 70%) var(--card2);
  background-size: 200% 100%; animation: shimmer 5s linear infinite;
}
@media (hover: hover) { .card-open:hover { border-color: var(--rose); } }
.card-open .card-title { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1; margin-top: 14px; }
.card-open .card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: rgba(243,235,221,.7); }
.card-open .card-foot span:last-child { color: var(--gold); }

.card-locked { border: 1px solid rgba(201,164,92,.22); background: rgba(243,235,221,.03); padding: 18px 22px; }
.card-locked .card-head { color: rgba(201,164,92,.7); }
.card-locked .card-title { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1; margin-top: 12px; color: rgba(243,235,221,.5); filter: blur(7px); user-select: none; }
.card-locked.reveal .card-title { filter: none; user-select: auto; color: rgba(243,235,221,.8); }
.card-locked.reveal { border-color: rgba(201,164,92,.45); }
.card-locked .card-hint { margin-top: 10px; color: rgba(243,235,221,.45); font-style: italic; font-family: var(--serif); font-size: 17px; }
.card-locked.wobble { animation: wobble .5s ease; }

.dash-stat { text-align: center; margin-top: 44px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(243,235,221,.45); }
.dash-quote { text-align: center; margin-top: 28px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold); }
.dash-sign { text-align: center; margin-top: 6px; font-size: 12px; letter-spacing: .14em; color: rgba(243,235,221,.5); }

/* =====================================================================
   04 — Date detail
   ===================================================================== */
.detail { max-width: 520px; margin: 0 auto; padding: 24px 22px 72px; animation: unfold .9s cubic-bezier(.2,.7,.2,1) both; }
.back { background: transparent; border: 0; color: var(--gold); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; padding: 12px 0; }
.ticket { border: 1px solid var(--gold); border-radius: 2px; margin-top: 14px; background: var(--card); overflow: hidden; }
.ticket-top { padding: 34px 26px 30px; border-bottom: 1px dashed rgba(201,164,92,.4); }
.statement { font-family: var(--serif); font-weight: 500; font-size: clamp(32px, 8.5vw, 44px); line-height: 1.02; letter-spacing: -.01em; margin: 16px 0 0; text-wrap: pretty; }
.ticket-body { padding: 26px 26px 8px; display: grid; gap: 26px; }
.ticket-body .eyebrow { margin-bottom: 12px; }
.plan { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 15px; line-height: 1.4; }
.plan .map { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-left: 8px; border-bottom: 1px solid rgba(201,164,92,.5); }
.dress { display: flex; gap: 14px; align-items: flex-start; font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.dress svg { flex: none; margin-top: 3px; }
.expect { font-size: 15px; line-height: 1.6; color: rgba(243,235,221,.85); text-wrap: pretty; }
.songs { display: grid; gap: 10px; }
.song { display: flex; gap: 14px; align-items: center; color: var(--ink); }
.songs .n { width: 40px; height: 40px; flex: none; border: 1px solid rgba(201,164,92,.5); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--gold); }
.song-embed iframe { width: 100%; height: 80px; border: 0; border-radius: 12px; background: var(--card2); }
.songs .t { font-size: 15px; font-weight: 500; }
.songs .a { font-size: 12px; color: rgba(243,235,221,.55); margin-top: 2px; }
.ticket-foot { padding: 30px 26px 32px; text-align: center; border-top: 1px dashed rgba(201,164,92,.4); margin-top: 22px; position: relative; }
.closing { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(26px, 7vw, 34px); line-height: 1.1; margin: 0; }
.closing-khmer { font-size: 12px; color: rgba(243,235,221,.45); margin-top: 8px; }
.heart { position: absolute; left: 50%; bottom: 90px; font-size: 40px; color: var(--gold); animation: heart 1.3s ease both; pointer-events: none; }
#btnConfirm {
  margin-top: 26px; height: 54px; width: 100%; border: 0; border-radius: 2px; background: var(--gold); color: var(--bg);
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; transition: all .5s ease;
}
#btnConfirm.done { border: 1px solid var(--gold); background: transparent; color: var(--gold); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 0; right: 0; margin: 0 auto; width: max-content; bottom: 32px;
  background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 2px;
  font-family: var(--serif); font-style: italic; font-size: 20px; white-space: nowrap; animation: fadeUp .4s ease both; z-index: 20;
}
