/* THE SIGNAL — UPLINK Creative Studio
   CSS plain (tanpa Tailwind / build step). Palet: space #05070b · signal #4ade80 · gold #f5c36b */

:root {
  --space: #05070b;
  --ink: #f2f5f7;
  --signal: #4ade80;
  --gold: #f5c36b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: rgb(74 222 128 / 0.25); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgb(74 222 128 / 0.3); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 1px solid rgb(74 222 128 / 0.7); outline-offset: 3px; border-radius: 6px; }

.ico { flex: none; }

/* ---------- background: starfield + nebula ---------- */
.sky { position: fixed; inset: 0; z-index: -10; }
.sky canvas { width: 100%; height: 100%; display: block; }
.nebula {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 38% at 50% 30%, rgb(22 84 52 / 0.28), transparent 70%),
    radial-gradient(ellipse 40% 30% at 18% 75%, rgb(13 31 60 / 0.3), transparent 70%),
    radial-gradient(ellipse 36% 28% at 84% 70%, rgb(41 26 84 / 0.24), transparent 70%);
}

/* ---------- header ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
}
.brand { font-size: 12px; font-weight: 500; letter-spacing: 0.35em; color: rgb(255 255 255 / 0.8); }
.header-right { display: flex; align-items: center; gap: 24px; }
.live {
  display: none; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}
.live .dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--signal);
  animation: pulseDot 1.8s ease-in-out infinite;
}
.header-link {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.45); transition: color 0.3s;
}
.header-link:hover { color: var(--signal); }

/* ---------- shared bits ---------- */
main, .site-footer { position: relative; z-index: 10; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.38);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  border-radius: 999px; white-space: nowrap; cursor: pointer;
  font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase;
}
.btn-primary {
  border: 1px solid rgb(74 222 128 / 0.5);
  background: linear-gradient(135deg, rgb(74 222 128 / 0.2), rgb(74 222 128 / 0.06));
  color: var(--signal);
  padding: 0.85rem 0.5rem;
  box-shadow: 0 0 24px rgb(74 222 128 / 0.12);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s, background 0.3s;
}
.btn-primary:hover:not(.is-disabled):not(:disabled) {
  transform: scale(1.03);
  background: linear-gradient(135deg, rgb(74 222 128 / 0.3), rgb(74 222 128 / 0.1));
  box-shadow: 0 0 48px rgb(74 222 128 / 0.3);
}
.btn-primary:active:not(.is-disabled):not(:disabled) { transform: scale(0.98); }
.btn-primary.is-disabled, .btn-primary:disabled {
  border-color: rgb(255 255 255 / 0.12);
  color: rgb(255 255 255 / 0.3);
  background: rgb(255 255 255 / 0.03);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-lg { padding: 1rem 2.5rem; font-size: 13px; }

.btn-ghost {
  border: 1px solid rgb(255 255 255 / 0.14);
  color: rgb(255 255 255 / 0.55);
  padding: 0.85rem 0.5rem;
  letter-spacing: 0.2em;
  transition: color 0.3s, border-color 0.3s, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.btn-ghost:hover { color: #fff; border-color: rgb(255 255 255 / 0.35); transform: scale(1.03); }
.btn-ghost:active { transform: scale(0.98); }

.count { font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 68vh; padding: 96px 24px 0; text-align: center;
}
.logo {
  width: 96px; height: 96px; object-fit: contain;
  filter: drop-shadow(0 0 28px rgb(74 222 128 / 0.25));
}
.hero .eyebrow { margin-top: 28px; }
.title {
  margin-top: 24px;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  line-height: 1; font-weight: 100; letter-spacing: 0.14em;
  background: linear-gradient(180deg, #ffffff 30%, rgb(255 255 255 / 0.55));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  margin-top: 24px; max-width: 28rem;
  font-size: 16px; color: rgb(255 255 255 / 0.55);
}
.br-sm { display: none; }

.stats { display: flex; align-items: center; gap: 32px; margin-top: 40px; }
.stat { text-align: center; }
.stat-n { font-size: 30px; font-weight: 100; font-variant-numeric: tabular-nums; }
.stat-l { margin-top: 4px; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: rgb(255 255 255 / 0.35); }
.hero .btn-lg { margin-top: 40px; }

/* ---------- vote section ---------- */
.vote { max-width: 64rem; margin: 0 auto; padding: 80px 24px 96px; scroll-margin-top: 64px; }

.steps {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 12px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}
.step-n { color: rgb(74 222 128 / 0.8); }
.arrow { color: rgb(255 255 255 / 0.2); }
.steps-note {
  margin-top: 12px; text-align: center;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.3);
}

.notice {
  width: fit-content; margin: 24px auto 0;
  border: 1px solid rgb(74 222 128 / 0.3);
  background: rgb(74 222 128 / 0.06);
  border-radius: 999px; padding: 8px 24px;
  font-size: 14px; color: var(--signal);
}

.grid { display: grid; gap: 24px; margin-top: 56px; }

/* ---------- kartu ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border-radius: 24px; padding: 28px 24px 24px;
  background: rgb(255 255 255 / 0.04);
  border: 1px solid rgb(255 255 255 / 0.08);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s, box-shadow 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: var(--edge); }
.card--mine { border-color: rgb(245 195 107 / 0.4); }
.card--mine:hover { border-color: rgb(245 195 107 / 0.4); }

.rank {
  position: absolute; top: -12px; left: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgb(255 255 255 / 0.15); background: var(--space);
  border-radius: 999px; padding: 4px 12px;
  font-size: 10px; letter-spacing: 0.2em; color: rgb(255 255 255 / 0.45);
}
.rank--leader { border-color: rgb(245 195 107 / 0.5); color: var(--gold); }

/* mini browser preview */
.preview {
  display: block; width: 100%; overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.1); border-radius: 12px;
  transition: border-color 0.3s;
}
.preview:hover { border-color: rgb(255 255 255 / 0.25); }
.preview-bar {
  display: flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.04);
  padding: 8px 12px;
}
.pb-dot { width: 6px; height: 6px; border-radius: 999px; background: rgb(255 255 255 / 0.15); flex: none; }
.pb-url {
  margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: 999px; background: rgb(5 7 11 / 0.7); padding: 2px 10px;
  font-size: 9px; letter-spacing: 0.1em; color: rgb(255 255 255 / 0.4);
}
.preview-shot { position: relative; display: block; height: 128px; overflow: hidden; }
.preview-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}
.preview:hover .preview-shot img { transform: scale(1.04); }
.preview-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 40px rgb(5 7 11 / 0.55); }
.preview-live {
  position: absolute; right: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; background: rgb(5 7 11 / 0.7); padding: 2px 8px;
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: rgb(255 255 255 / 0.6);
}

.card-title { margin-top: 24px; font-size: 18px; font-weight: 300; letter-spacing: 0.25em; text-transform: uppercase; color: #fff; }
.card-dev { margin-top: 4px; font-size: 12px; color: rgb(255 255 255 / 0.4); }
.card-traits { margin-top: 8px; font-size: 14px; }

.meter { width: 100%; margin-top: 24px; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; }
.meter-n { font-size: 24px; font-weight: 200; color: #fff; font-variant-numeric: tabular-nums; }
.meter-unit { margin-left: 6px; font-size: 12px; font-weight: 300; color: rgb(255 255 255 / 0.4); }
.meter-pct { font-size: 14px; color: rgb(255 255 255 / 0.45); font-variant-numeric: tabular-nums; }
.bar { margin-top: 8px; height: 6px; border-radius: 999px; background: rgb(255 255 255 / 0.07); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 1s ease-out; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; margin-top: 24px; }
.liked {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgb(245 195 107 / 0.4); border-radius: 999px;
  padding: 0.85rem 0.5rem;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap;
  color: var(--gold);
}

.tally { margin-top: 40px; text-align: center; font-size: 14px; color: rgb(255 255 255 / 0.4); }

/* ---------- footer ---------- */
.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 0 24px 48px; text-align: center;
}
.rule { height: 1px; width: 96px; background: rgb(255 255 255 / 0.1); }
.site-footer p { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: rgb(255 255 255 / 0.25); }

/* ---------- dialog konfirmasi (server-side, tanpa JS) ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(5 7 11 / 0.75); }
.dialog {
  position: relative; width: 100%; max-width: 24rem;
  border: 1px solid rgb(255 255 255 / 0.1); border-radius: 24px;
  background: #0a0f16; padding: 32px; text-align: center;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.6);
}
.dialog-icon { display: flex; justify-content: center; }
.sigil { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; }
.sigil--big { width: 80px; height: 80px; }
.dialog-title { margin-top: 20px; font-size: 18px; font-weight: 300; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; }
.dialog-note { margin-top: 12px; font-size: 14px; color: rgb(255 255 255 / 0.5); }
.dialog-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.dialog-actions .btn-primary { padding: 0.85rem 2rem; }
.dialog-cancel {
  border-radius: 999px; padding: 8px 0;
  font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase;
  color: rgb(255 255 255 / 0.4); transition: color 0.3s;
}
.dialog-cancel:hover { color: #fff; }

/* ---------- animasi ---------- */
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

.drift { animation: drift 7s ease-in-out infinite; }
.rise { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ---------- responsive ---------- */
@media (min-width: 640px) {
  .live { display: flex; }
  .br-sm { display: block; }
}
@media (min-width: 768px) {
  .site-header { padding: 20px 48px; }
  .logo { width: 112px; height: 112px; }
  .stats { gap: 48px; }
  .stat-n { font-size: 36px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
  .drift { animation: none; }
  .rise { animation-duration: 0.01ms; }
  .preview:hover .preview-shot img { transform: none; }
}
