/* =====================================================================
   NIXIE — dark + sky premium design system
   Headings: Fredoka · Body: Nunito
   Sky #0EA5E9 / #38BDF8 · Cyan #22D3EE · Ember #F97316 (CTA)
   ===================================================================== */
:root {
  /* surfaces */
  --ink: #05080F;
  --bg: #0A1322;
  --bg-2: #0C1626;
  --panel: #111E33;
  --panel-2: #16263F;
  --border: #1E3251;
  --border-2: #2A436A;

  /* text */
  --text: #EAF2FB;
  --text-dim: #93A8C4;
  --text-dimmer: #5B718C;

  /* brand */
  --sky: #0EA5E9;
  --sky-2: #38BDF8;
  --sky-3: #7DD3FC;
  --cyan: #22D3EE;
  --ember: #F97316;
  --ember-2: #FB923C;
  --green: #34D399;

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- backgrounds ---------- */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% -5%, rgba(14,165,233,.30), transparent 60%),
    radial-gradient(45% 40% at 12% 8%, rgba(34,211,238,.16), transparent 65%),
    radial-gradient(50% 45% at 60% 105%, rgba(249,115,22,.10), transparent 60%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(46,67,106,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46,67,106,.12) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 75%);
}
main, .nav, .footer { position: relative; z-index: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px;
  border: none; border-radius: 12px; padding: 15px 24px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
}
.btn-sm { padding: 10px 17px; font-size: 14px; border-radius: 10px; }
.btn-primary {
  background: linear-gradient(135deg, var(--ember-2), var(--ember));
  color: #fff;
  box-shadow: 0 10px 26px -8px rgba(249,115,22,.65), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(249,115,22,.8), inset 0 1px 0 rgba(255,255,255,.25); filter: saturate(1.05); }
.btn-primary:active { transform: translateY(0); }

/* ===================== NAV ===================== */
.nav {
  max-width: var(--maxw); margin: 0 auto;
  padding: 20px 28px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.logo { width: 40px; height: 40px; display: inline-block; filter: drop-shadow(0 6px 14px rgba(56,189,248,.45)); }
.logo-tile { width: 100%; height: 100%; display: block; }
.logo-sm { width: 30px; height: 30px; }
.logo-spark { transform-box: fill-box; transform-origin: center; animation: sparkPulse 3.5s ease-in-out infinite; }
.logo-orbit { transform-box: fill-box; transform-origin: 22px 22px; animation: orbit 6s linear infinite; }
.brand-name { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 23px; letter-spacing: -.4px; }
.nav-links { display: flex; gap: 28px; margin-left: 14px; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-size: 15px; font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 10px; padding: 8px 13px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--border-2); }

/* ===================== HERO ===================== */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: 48px 28px 70px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: center;
}
.hero-copy, .hero-stage { min-width: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(56,189,248,.10); border: 1px solid rgba(56,189,248,.28);
  color: var(--sky-3); padding: 8px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 700; margin-bottom: 24px; letter-spacing: .1px;
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(52,211,153,.18); animation: livePulse 2s ease-in-out infinite; }
.hero-title {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: clamp(36px, 4.8vw, 62px); line-height: 1.04;
  letter-spacing: -1.6px;
}
.hero-title span { display: block; }
.grad {
  background: linear-gradient(105deg, var(--sky-2) 10%, var(--cyan) 60%, var(--sky-3) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { color: var(--text-dim); font-size: 18.5px; margin: 24px 0 30px; max-width: 480px; font-weight: 500; }
.waitlist { display: flex; gap: 10px; max-width: 470px; }
.waitlist input {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px 17px; color: var(--text);
  font-size: 15px; font-family: inherit; font-weight: 600; transition: border-color .2s, box-shadow .2s;
}
.waitlist input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(14,165,233,.16); }
.waitlist input::placeholder { color: #56708F; font-weight: 500; }
.micro { color: #6781A0; font-size: 13px; margin-top: 13px; font-weight: 600; }
.micro.ok { color: var(--green); }

.hero-proof { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.hero-proof-text { font-size: 14.5px; color: var(--text-dim); font-weight: 600; }
.hero-proof-text strong { color: var(--text); font-weight: 800; }

/* avatar stacks */
.avatar-stack { display: flex; }
.avatar-stack .av { width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--bg); margin-left: -12px; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .av-more {
  width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--bg); margin-left: -12px;
  background: var(--panel-2); color: var(--sky-3); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; font-family: 'Nunito';
}

/* ===================== HERO STAGE (mascot + demo) ===================== */
.hero-stage { position: relative; }

/* ---- Nixie sprite ---- */
.sprite { position: relative; }
.sprite-hero {
  position: absolute; top: -86px; right: 6px; width: 150px; z-index: 4;
  animation: float 5s ease-in-out infinite;
}
.sprite-glow {
  position: absolute; inset: -28% -22%; z-index: 0;
  background: radial-gradient(closest-side, rgba(56,189,248,.55), rgba(34,211,238,.18), transparent 78%);
  filter: blur(8px); animation: glowPulse 5s ease-in-out infinite;
}
.sprite-svg { position: relative; z-index: 1; width: 100%; height: auto; display: block; overflow: visible;
  filter: drop-shadow(0 14px 24px rgba(13,46,80,.55)); }
.wing { transform-box: fill-box; transform-origin: center; }
.wing-l { animation: flutterL 1.1s ease-in-out infinite; }
.wing-r { animation: flutterR 1.1s ease-in-out infinite; }
.eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
.tip-spark { transform-box: fill-box; transform-origin: center; animation: sparkPulse 2.6s ease-in-out infinite; }
.orbit-spark { position: absolute; color: var(--ember-2); font-size: 16px; z-index: 2; text-shadow: 0 0 10px rgba(251,146,60,.8); }
.orbit-spark.o1 { top: 6%; left: -6%; animation: twinkle 3s ease-in-out infinite; }
.orbit-spark.o2 { top: 60%; right: -10%; font-size: 12px; animation: twinkle 2.4s ease-in-out .6s infinite; }
.orbit-spark.o3 { bottom: -2%; left: 18%; font-size: 11px; color: var(--cyan); text-shadow: 0 0 10px rgba(34,211,238,.8); animation: twinkle 3.4s ease-in-out 1.1s infinite; }

.sprite-cta { width: 96px; margin: 0 auto 6px; animation: float 5s ease-in-out infinite; }

/* ---- live demo ---- */
.demo { position: relative; }
.demo-window {
  position: relative; z-index: 1; max-width: 100%;
  background: linear-gradient(180deg, var(--bg-2), #0A1320);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 90px -28px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04);
}
.demo-titlebar {
  display: flex; align-items: center; gap: 7px; padding: 13px 15px;
  background: rgba(17,30,51,.7); border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.demo-tabtitle { margin-left: 8px; color: var(--text-dim); font-size: 13px; font-weight: 700; }
.demo-live {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  color: var(--green); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
}
.demo-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: livePulse 1.6s ease-in-out infinite; }
.demo-body { display: grid; grid-template-columns: 54px 156px 1fr; height: 362px; overflow: hidden; }
.demo-rail { background: #070C16; padding: 13px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.demo-servericon {
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--panel-2); border: 1px dashed var(--border-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: 20px; font-weight: 300; transition: all .5s ease;
}
.demo-servericon.filled {
  border: none; border-radius: 13px; padding: 0; overflow: hidden; background: transparent;
  box-shadow: 0 6px 16px -5px rgba(0,0,0,.6); animation: pop .5s ease;
}
.demo-servericon.filled svg { width: 100%; height: 100%; display: block; }
.demo-rail-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.demo-sidebar { background: rgba(17,30,51,.5); padding: 15px 12px; border-right: 1px solid var(--border); overflow: hidden; }
.demo-servername { font-family: 'Fredoka'; font-weight: 600; font-size: 14px; margin-bottom: 14px; color: var(--text); transition: color .3s; letter-spacing: -.2px; }
.demo-channels { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.demo-channels li { font-size: 13px; color: var(--text-dim); padding: 5px 8px; border-radius: 7px; opacity: 0; transform: translateX(-8px); font-weight: 600; }
.demo-channels li.cat { color: #6781A0; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; margin-top: 9px; padding-bottom: 2px; }
.demo-channels li.show { opacity: 1; transform: none; animation: slideIn .45s ease; }
.demo-main { padding: 18px 18px; display: flex; flex-direction: column; overflow: hidden; }
.demo-msg-you { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 14px; min-height: 46px; font-weight: 600; }
.demo-prompt-label { color: var(--sky-2); font-weight: 800; margin-right: 8px; }
.demo-typed { color: var(--text); }
.caret { color: var(--sky-2); animation: blinkCaret 1s step-end infinite; }
/* assistant reply (replaces the old bouncy "nixie" word) */
.demo-reply {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(56,189,248,.12), rgba(34,211,238,.05));
  border: 1px solid rgba(56,189,248,.28); border-radius: 12px;
  opacity: 0; transform: translateY(6px);
}
.demo-reply.show { opacity: 1; transform: none; animation: replyIn .4s ease; }
.demo-reply-mark {
  flex: none; width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sky-2), var(--cyan)); box-shadow: 0 3px 8px -2px rgba(56,189,248,.6);
}
.demo-reply-mark svg { width: 14px; height: 14px; fill: #fff; }
.demo-reply-text { color: var(--text); font-size: 13.5px; font-weight: 600; line-height: 1.45; padding-top: 2px; }

/* ===================== TRUST STRIP ===================== */
.trust { max-width: var(--maxw); margin: 0 auto; padding: 14px 28px 30px; }
.trust-inner { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.trust-item {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; color: var(--text-dim); font-size: 14px; font-weight: 700;
}
.trust-item svg { width: 16px; height: 16px; color: var(--green); flex: none; }

/* ===================== SECTION HEADS ===================== */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.eyebrow {
  display: inline-block; white-space: nowrap; color: var(--sky-2); font-weight: 800; font-size: 13px;
  text-transform: uppercase; letter-spacing: 1.6px; margin-bottom: 14px;
}
.section-title { font-family: 'Fredoka', sans-serif; font-size: clamp(28px, 3.4vw, 42px); font-weight: 600; letter-spacing: -1px; line-height: 1.1; }
.section-sub { color: var(--text-dim); font-size: 17.5px; margin-top: 14px; font-weight: 500; }

/* ===================== HOW ===================== */
.how { max-width: var(--maxw); margin: 0 auto; padding: 80px 28px 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 26px; transition: transform .2s, border-color .2s; }
.step:hover { transform: translateY(-4px); border-color: var(--border-2); }
.step-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.step-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(34,211,238,.1));
  border: 1px solid rgba(56,189,248,.3); color: var(--sky-2);
  font-family: 'Fredoka'; font-weight: 600; font-size: 18px;
}
.step-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-2), transparent); }
.step h3 { font-family: 'Fredoka'; font-weight: 500; font-size: 20px; margin-bottom: 9px; letter-spacing: -.3px; }
.step p { color: var(--text-dim); font-size: 15px; font-weight: 500; }

/* ===================== FEATURES ===================== */
.features { max-width: var(--maxw); margin: 0 auto; padding: 70px 28px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-5px); border-color: var(--border-2); box-shadow: 0 24px 50px -30px rgba(0,0,0,.7); }
.card-accent { border-color: rgba(56,189,248,.4); background: linear-gradient(180deg, rgba(56,189,248,.09), var(--panel)); }
.card-flag {
  position: absolute; top: 18px; right: 18px; white-space: nowrap; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ember-2); background: rgba(249,115,22,.12); border: 1px solid rgba(249,115,22,.3); padding: 4px 10px; border-radius: 999px;
}
.card-ico {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; color: var(--sky-2);
  background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(34,211,238,.07)); border: 1px solid rgba(56,189,248,.22);
}
.card-ico svg { width: 26px; height: 26px; }
.card-accent .card-ico { color: var(--cyan); }
.card h3 { font-family: 'Fredoka'; font-weight: 500; font-size: 21px; margin-bottom: 11px; letter-spacing: -.3px; }
.card p { color: var(--text-dim); font-size: 15px; font-weight: 500; }

/* ===================== WHO IT'S FOR (personas) ===================== */
.community { max-width: var(--maxw); margin: 0 auto; padding: 60px 28px 50px; }
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pcard { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; transition: transform .2s, border-color .2s; }
.pcard:hover { transform: translateY(-4px); border-color: var(--border-2); }
.pcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pcard-top .av { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.pcard-ico {
  width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  color: var(--sky-2); background: linear-gradient(135deg, rgba(56,189,248,.16), rgba(34,211,238,.07)); border: 1px solid rgba(56,189,248,.22);
}
.pcard-ico svg { width: 21px; height: 21px; }
.pcard-title { font-family: 'Fredoka'; font-weight: 500; font-size: 19px; margin-bottom: 9px; letter-spacing: -.3px; }
.pcard-text { color: var(--text-dim); font-size: 14.5px; font-weight: 500; line-height: 1.55; }

/* ===================== FINAL CTA ===================== */
.cta { max-width: var(--maxw); margin: 0 auto; padding: 50px 28px 90px; }
.cta-card {
  position: relative; max-width: 760px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border-2); border-radius: 28px; padding: 18px 40px 48px;
  box-shadow: 0 40px 90px -36px rgba(0,0,0,.8);
  overflow: hidden;
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% -10%, rgba(56,189,248,.22), transparent 70%);
}
.cta-card > * { position: relative; z-index: 1; }
.waitlist-center { margin: 28px auto 0; justify-content: center; max-width: 440px; }
.cta-proof { display: inline-flex; align-items: center; gap: 12px; margin-top: 24px; color: var(--text-dim); font-size: 14px; font-weight: 600; }

/* ===================== FOOTER ===================== */
.footer {
  border-top: 1px solid var(--border); max-width: var(--maxw); margin: 0 auto;
  padding: 30px 28px; display: flex; justify-content: space-between; align-items: center;
  color: var(--text-dim); font-size: 14px; flex-wrap: wrap; gap: 12px;
}
.footer-brand { display: flex; align-items: center; gap: 9px; }
.footer-name { font-family: 'Fredoka'; font-weight: 600; font-size: 18px; color: var(--text); }
.footer-dim { color: #5B718C; font-weight: 600; }

/* ===================== REVEAL =====================
   Transform-only (opacity stays 1) so content is NEVER invisible even if a
   throttled/offscreen iframe stalls the transition mid-flight. */
[data-reveal] { transform: translateY(22px); transition: transform .65s cubic-bezier(.2,.7,.3,1); }
[data-reveal].in { transform: none; }

/* ===================== KEYFRAMES ===================== */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes glowPulse { 0%,100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes flutterL { 0%,100% { transform: scaleX(1) rotate(0deg); } 50% { transform: scaleX(.62) rotate(-6deg); } }
@keyframes flutterR { 0%,100% { transform: scaleX(1) rotate(0deg); } 50% { transform: scaleX(.62) rotate(6deg); } }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 95%,97% { transform: scaleY(.12); } }
@keyframes twinkle { 0%,100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes sparkPulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes orbit { from { transform: rotate(0deg) translateX(0); } to { transform: rotate(360deg); } }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.9); } }
@keyframes slideIn { from { transform: translateX(-8px); } }
@keyframes blinkCaret { 50% { opacity: 0; } }
@keyframes pop { from { transform: scale(.6); } }
@keyframes replyIn { from { transform: translateY(6px); } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; gap: 70px; }
  .hero-stage { order: 2; }
  .sprite-hero { top: -70px; right: 2%; width: 124px; }
  .nav-links { display: none; }
  .steps, .cards, .personas { grid-template-columns: 1fr; }
  .trust-inner { gap: 10px; }
}
@media (max-width: 560px) {
  .waitlist { flex-direction: column; }
  .hero-sub { max-width: 100%; }
  .cta-card { padding: 18px 22px 40px; }
}

/* ===================== A11Y ===================== */
:focus-visible { outline: 2px solid var(--sky-2); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .demo-channels li, .demo-reply { opacity: 1 !important; transform: none !important; }
  .caret { display: none !important; }
}
