/* partydesk — confident but legible. One dark theme, on purpose:
   the party gradient is the brand, the copy stays high-contrast. */

:root {
  --bg:        #0b0d14;
  --bg-raise:  #12151f;
  --border:    #232736;
  --text:      #e8eaf2;
  --muted:     #9aa1b5;
  --accent:    #a78bfa;
  --ok:        #34d399;
  --grad:      linear-gradient(100deg, #8b5cf6, #ec4899 55%, #f59e0b);
  --mono:      ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--text); }

h1, h2, h3 { line-height: 1.2; }

main, .hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
  padding-bottom: 3.5rem;
  text-align: center;
}

.hero > * { position: relative; z-index: 1; }

/* the ascii field behind the headline — performativeUI's AsciiHero */
#ascii-hero {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 1px;
  color: #a78bfa;
  opacity: 0.38;
  white-space: pre;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, black 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, black 40%, transparent 85%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-raise);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.sparkle {
  color: #f59e0b;
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8) rotate(20deg); }
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  letter-spacing: -0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  min-height: 2.4em; /* reserve space while the typewriter runs */
}

#typewriter::after {
  content: "▋";
  -webkit-text-fill-color: var(--accent);
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  margin: 0 auto 2rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.1rem;
  /* soft halo so the sub stays legible over the ascii field */
  text-shadow: 0 0 6px var(--bg), 0 0 14px var(--bg), 0 0 24px var(--bg);
}

/* ------------------------------------------------------------- CTA */

.cta {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 10px;
  background: var(--grad);
  color: #14060d;
  font-size: 1.05rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.cta:hover {
  color: #14060d;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.35);
}

/* ------------------------------------------------------------- concierge demo */

.demo { margin: 1rem 0 2.5rem; }

.chat-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-raise);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.thinking-pill {
  margin-left: auto;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
}

.thinking-pill.thinking { animation: pill-pulse 1.4s ease-in-out infinite; }

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

.chat-brief {
  margin: 0.8rem 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.chat-stream {
  margin: 0;
  min-height: 8em;
  font-size: 0.95rem;
  color: var(--text);
}

.stream-caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: -0.15em;
  animation: blink 1s steps(1) infinite;
}

.demo-caption {
  margin: 0.6rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ------------------------------------------------------------- cards */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

@media (max-width: 680px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-raise);
}

.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p  { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ------------------------------------------------------------- how */

.how h2, .a2a h2, .hitl h2 { margin: 3rem 0 1rem; font-size: 1.5rem; }

.a2a p, .hitl p { color: var(--muted); }

.byline { font-size: 0.85rem; }

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  margin: 0 0 1rem;
  padding-left: 3rem;
  color: var(--muted);
}

.steps li strong { color: var(--text); }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #14060d;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------- trust */

.trust {
  margin: 3rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--bg-raise);
}

.trust p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ------------------------------------------------------------- CTA note */

.cta-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ------------------------------------------------------------- waitlist page */

.waitlist-page { padding-top: 4rem; padding-bottom: 4rem; }

.waitlist-page h1 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.waitlist-sub { margin: -0.5rem 0 1.5rem; color: var(--muted); }

.challenge { margin: 1.5rem 0 2rem; }

.challenge .terminal { margin: 0 0 0.75rem; }

.challenge-note { margin: 0; color: var(--muted); font-size: 0.85rem; }

#challenge-countdown { color: var(--ok); font-family: var(--mono); }

.waitlist-page form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 32rem;
}

.waitlist-page label { margin-top: 0.75rem; font-size: 0.95rem; }

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

.waitlist-page input[type="email"],
.waitlist-page input[type="text"],
.waitlist-page textarea {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raise);
  color: var(--text);
  font: inherit;
}

.waitlist-page input:focus, .waitlist-page textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 1rem !important;
  color: var(--muted);
  font-size: 0.85rem !important;
}

.consent input { margin-top: 0.3rem; }

.waitlist-page .cta { margin-top: 1.25rem; align-self: flex-start; }

.form-error {
  padding: 0.6rem 0.9rem;
  border: 1px solid #7f1d3a;
  border-radius: 8px;
  background: rgba(236, 72, 153, 0.08);
  color: #f9a8d4;
  font-size: 0.95rem;
}

/* honeypot: hidden from humans, tempting to bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------- thanks / 404 */

.thanks, .error404 { padding-top: 5rem; padding-bottom: 3rem; }

.thanks h1 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.term-note, .terminal {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
}

.terminal {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #05060a;
}

.term-line { margin: 0.25rem 0; }

.prompt { color: var(--ok); }

/* ------------------------------------------------------------- legal */

.legal { padding-top: 3rem; padding-bottom: 3rem; max-width: 680px; }
.legal h1 { font-size: 2rem; }
.legal h2 { margin-top: 2.25rem; font-size: 1.2rem; }
.legal p  { color: var(--muted); }
.legal p strong { color: var(--text); }
.effective { font-size: 0.9rem; }

/* ------------------------------------------------------------- footer */

.site-footer {
  margin-top: 2rem;
  padding: 2rem 1.25rem 5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p { margin: 0.35rem 0; }

.token-gag { font-size: 0.8rem; opacity: 0.7; }

/* ------------------------------------------------------------- agent status pill */

.agent-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 21, 31, 0.92);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
}

@media (max-width: 680px) {
  .agent-status { display: none; }
}

/* ------------------------------------------------------------- confetti */

.confetti {
  position: fixed;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: fall 2.2s linear forwards;
  z-index: 99;
}

@keyframes fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0.3; }
}

/* ------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .sparkle, .status-dot, .thinking-pill.thinking { animation: none; }
  .cta { transition: none; }
  #typewriter::after { display: none; }
  .confetti { display: none; }
  .stream-caret { display: none; }
}
