:root {
  --bg-top: #0f172a;
  --bg-bottom: #1e293b;
  --ink: #f8fafc;
  --muted: #94a3b8;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --blue-400: #60a5fa;
  --violet-400: #a78bfa;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --green: #22c55e;
  --line: rgba(148, 163, 184, 0.22);
  --radius: 0.75rem;
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body { position: relative; overflow-x: hidden; }

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, black, transparent 75%);
  opacity: 0.7;
}

.nav, .hero, .foot { position: relative; z-index: 1; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5vw;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.55);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: grid;
  place-items: center;
  background: var(--primary);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}

.domain {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  min-height: calc(100vh - 7rem);
  padding: 2rem 5vw 2.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.15rem;
}

.spark { font-size: 0.85rem; }

h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.15rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  max-width: 18ch;
}

.grad {
  background: linear-gradient(to right, var(--blue-400), var(--violet-400), var(--blue-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.join {
  display: grid;
  grid-template-columns: 1fr 1.25fr auto;
  gap: 0.55rem;
  width: min(100%, 560px);
}

.join input {
  border: 1px solid var(--slate-700);
  background: rgba(15, 23, 42, 0.75);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.join input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.join button {
  border: 0;
  border-radius: var(--radius);
  padding: 0.85rem 1.15rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.join button:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.join button:disabled { opacity: 0.7; cursor: wait; }

.status {
  min-height: 1.35rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--blue-400);
}

.status.error { color: #f87171; }

.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-top: 1.35rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.check {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  position: relative;
}

.check::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.18rem;
  width: 0.28rem;
  height: 0.48rem;
  border: solid var(--green);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.showcase {
  display: grid;
  gap: 0.9rem;
  position: relative;
}

.showcase::before {
  content: "";
  position: absolute;
  inset: 10% -8% auto 20%;
  height: 70%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  animation: pulse 6s ease-in-out infinite;
}

.card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.muted { color: var(--muted); font-size: 0.82rem; }

.pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.pill.live {
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.ticket strong,
.votes strong,
.earn strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.ticket-code {
  margin-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px dashed rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
  font-size: 0.85rem;
}

.ticket-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  font-weight: 700;
}

.bars { display: grid; gap: 0.45rem; margin-top: 0.75rem; }

.bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.8);
  position: relative;
  overflow: hidden;
}

.bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: linear-gradient(90deg, var(--primary), var(--violet-400));
  border-radius: inherit;
  animation: fillBar 1.2s ease-out both;
}

.bar span {
  position: absolute;
  right: 0;
  top: -1.15rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.earn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.earn-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet-400));
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 5vw 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.animate {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.16s; }
.d3 { animation-delay: 0.24s; }
.d4 { animation-delay: 0.32s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes fillBar {
  from { width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .animate { animation: none; }
  .bar::before { animation: none; }
  .showcase::before { animation: none; }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.75rem;
  }

  h1 { max-width: none; }

  .showcase { max-width: 420px; }
}

@media (max-width: 640px) {
  .join { grid-template-columns: 1fr; }
  .trust { flex-direction: column; gap: 0.55rem; }
}
