/* ============================================================
   dvote.club — tema kuning / hitam, serif editorial (Fraunces)
   Dipakai oleh form voting & landing page.
   ============================================================ */
:root {
  --bg: #FFD23F;          /* kuning hangat */
  --bg-2: #FFDA5E;
  --ink: #15120B;         /* hitam kehangatan */
  --ink-soft: #6B5D38;    /* coklat muted untuk teks sekunder */
  --line: rgba(21, 18, 11, 0.18);
  --line-strong: rgba(21, 18, 11, 0.85);
  --card: rgba(21, 18, 11, 0.035);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", "Times New Roman", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Tekstur halus di background */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(70vmax 70vmax at 85% -15%, var(--bg-2), transparent 55%),
    radial-gradient(60vmax 60vmax at -10% 115%, rgba(255,255,255,0.35), transparent 55%);
}

/* Progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 5px; background: rgba(21,18,11,0.12); z-index: 50; }
.progress__bar { height: 100%; width: 0%; background: var(--ink); transition: width 0.5s var(--ease); }

/* Brand pojok */
.brand {
  position: fixed; top: 20px; left: 26px; z-index: 40;
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.brand img { height: 26px; width: auto; display: block; }

.stage { position: relative; height: 100%; width: 100%; z-index: 1; }

.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(24px, 8vw, 120px);
  max-width: 800px; margin: 0 auto;
  opacity: 0; transform: translateY(38px); pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.slide.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.slide.is-prev { opacity: 0; transform: translateY(-38px); }

.q-index {
  color: var(--ink-soft); font-weight: 600; font-size: 15px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
  font-feature-settings: "tnum";
}
.q-index svg { width: 14px; height: 14px; }

.q-title { font-size: clamp(30px, 5vw, 52px); font-weight: 500; line-height: 1.12; letter-spacing: -0.025em; }
.q-desc { margin-top: 16px; color: var(--ink-soft); font-size: clamp(16px, 2vw, 20px); line-height: 1.5; }
.q-body { margin-top: 36px; }

/* Input teks */
.t-input, .t-area {
  width: 100%; background: transparent; border: none; color: var(--ink);
  font-family: var(--serif); font-size: clamp(22px, 3vw, 30px);
  border-bottom: 2px solid var(--line); padding: 10px 2px;
  transition: border-color 0.3s var(--ease);
}
.t-area { resize: none; min-height: 60px; }
.t-input:focus, .t-area:focus { outline: none; border-color: var(--ink); }
.t-input::placeholder, .t-area::placeholder { color: rgba(107,93,56,0.5); }

/* Pilihan */
.options { display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; font-size: 19px; user-select: none;
  transition: all 0.16s var(--ease);
}
.opt:hover { background: rgba(21,18,11,0.07); transform: translateX(4px); }
.opt.is-selected { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opt__key {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  font-size: 14px; font-weight: 600; transition: all 0.16s var(--ease);
}
.opt.is-selected .opt__key { background: var(--bg); border-color: var(--bg); color: var(--ink); }
.opt__check { margin-left: auto; opacity: 0; transition: opacity 0.16s; }
.opt.is-selected .opt__check { opacity: 1; }

/* Rating */
.rating { display: flex; gap: 12px; flex-wrap: wrap; }
.rate {
  width: 64px; height: 64px; border-radius: var(--radius);
  border: 1.5px solid var(--line-strong); background: transparent;
  color: var(--ink); font-family: var(--serif); font-size: 24px; font-weight: 500; cursor: pointer;
  transition: all 0.15s var(--ease);
}
.rate:hover { background: rgba(21,18,11,0.07); transform: translateY(-3px); }
.rate.is-selected { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* Tombol */
.slide__foot { margin-top: 38px; display: flex; align-items: center; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg); border: none; border-radius: var(--radius);
  padding: 14px 28px; font-family: var(--serif); font-size: 18px; font-weight: 600; cursor: pointer;
  transition: transform 0.15s var(--ease), opacity 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.hint { color: var(--ink-soft); font-size: 14px; }
.hint kbd {
  background: rgba(21,18,11,0.1); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 7px; font-size: 12px; font-family: var(--serif);
}
.err { color: #B4231F; font-size: 15px; margin-top: 14px; min-height: 20px; }

/* Welcome / thankyou */
.slide--center { text-align: center; align-items: center; }
.slide--center .q-title { font-size: clamp(40px, 7vw, 72px); }
.slide--center .slide__foot { justify-content: center; }
.big-emoji { margin-bottom: 16px; display: flex; justify-content: center; }
.big-icon { width: 68px; height: 68px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.big-mark { height: 60px; width: auto; margin-bottom: 18px; }

/* Navigasi panah */
.nav { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; gap: 4px; }
.nav button {
  width: 44px; height: 40px; border: 1.5px solid var(--ink); cursor: pointer;
  background: var(--ink); color: var(--bg); display: grid; place-items: center; transition: opacity 0.15s;
}
.nav button:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.nav button:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.nav button:hover { opacity: 0.85; }
.nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.nav svg { width: 18px; height: 18px; }

.spin { width: 22px; height: 22px; border: 2.5px solid rgba(21,18,11,0.25); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Landing page ===== */
.landing {
  position: relative; z-index: 1; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: clamp(28px, 8vw, 80px);
}
.landing h1 { font-size: clamp(52px, 11vw, 132px); font-weight: 500; letter-spacing: -0.04em; line-height: 0.95; }
.landing h1 em { font-style: italic; }
.landing .tag { margin-top: 22px; font-size: clamp(17px, 2.4vw, 23px); color: var(--ink-soft); max-width: 620px; line-height: 1.5; }
.landing .go {
  margin-top: 40px; display: flex; gap: 10px; align-items: center;
  background: var(--ink); border-radius: 999px; padding: 7px 7px 7px 24px;
}
.landing .go input {
  background: transparent; border: none; color: var(--bg); font-family: var(--serif);
  font-size: 18px; width: clamp(180px, 40vw, 320px);
}
.landing .go input::placeholder { color: rgba(255,210,63,0.55); }
.landing .go input:focus { outline: none; }
.landing .go button {
  background: var(--bg); color: var(--ink); border: none; border-radius: 999px;
  width: 46px; height: 46px; cursor: pointer; display: grid; place-items: center; flex: none;
  transition: transform 0.15s;
}
.landing .go button:hover { transform: scale(1.05); }
.landing .go input { letter-spacing: 0.04em; }
.join-result { margin-top: 20px; min-height: 22px; }
.join-err { color: #B4231F; font-size: 16px; }
.join-muted { color: var(--ink-soft); font-size: 16px; }
.join-confirm {
  background: var(--ink); color: var(--bg); border-radius: 20px;
  padding: 22px 26px 24px; display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  animation: pop 0.3s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.jc-label { font-size: 12px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.12em; }
.jc-title { font-size: clamp(22px, 4vw, 30px); font-weight: 500; margin-bottom: 16px; }
.jc-title em { font-style: normal; opacity: 0.6; font-size: 0.7em; }
.jc-actions { display: flex; gap: 10px; align-items: center; }
.join-confirm .btn { background: var(--bg); color: var(--ink); }
.jc-reset {
  background: transparent; border: 1.5px solid rgba(255, 210, 63, 0.4); color: var(--bg);
  border-radius: var(--radius); padding: 14px 18px; font-family: var(--serif); font-size: 15px; cursor: pointer;
  transition: border-color 0.15s;
}
.jc-reset:hover { border-color: var(--bg); }
.landing .adminlink { margin-top: 28px; font-size: 15px; color: var(--ink-soft); }
.landing .adminlink a { color: var(--ink); }

@media (max-width: 560px) { .nav { bottom: 16px; right: 16px; } .slide__foot { flex-wrap: wrap; } }
