/* ============================================================
   Joyboydata — black storefront (hero only)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #08080b;
  --bg-soft: #0e0e13;
  --fg: #f4f5f8;
  --muted: #7f8595;
  --muted-2: #565b68;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.20);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.55);

  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --container: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* Ambient blue glow behind the hero */
body::before {
  content: "";
  position: fixed;
  top: 50%; left: 50%;
  width: min(1100px, 130vw);
  height: min(1100px, 130vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Bars ---------- */
.topbar, .bottombar {
  position: relative;
  z-index: 20;
  padding-inline: clamp(20px, 4vw, 48px);
}
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 11, 0.88);
}
.bottombar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  min-height: 68px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  background: rgba(8, 8, 11, 0.88);
  font-size: 0.86rem;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 36px; height: 36px; flex: none; }
.brand__name { font-size: 1.28rem; font-weight: 500; letter-spacing: -0.03em; }
.brand__name .accent { color: var(--blue); }

.topbar__apliq {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  transition: color 0.15s ease;
}
.topbar__apliq:hover { color: var(--blue); }
.topbar__apliq .accent { color: var(--blue); }
.topbar__apliq small {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 8px;
}

.bottombar__pt { color: var(--muted); }
.bottombar__contacts { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.bottombar__contacts a {
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s ease;
}
.bottombar__contacts a:hover { color: var(--blue); }
.bottombar__contacts .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--blue);
  opacity: 0.6;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vh, 56px);
  padding: clamp(40px, 8vh, 96px) 24px;
  text-align: center;
}
.hero__tagline {
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 20ch;
}
.hero__tagline .accent { color: var(--blue); }

/* tagline + who-we-are, grouped so the hero's large gap only sits before the CTA */
.hero__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.hero__brief {
  color: var(--muted);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.65;
  max-width: 44ch;
}

/* ---------- Agent trigger (the logo) ---------- */
.agent-trigger {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 50%;
  outline: none;
}
.agent-trigger__mark {
  display: block;
  position: relative;
  transform-origin: center;
}
/* The glow used to be a drop-shadow filter on the animated SVG. A filter on a
   continuously-animated element makes iOS Safari re-rasterise it every frame
   until the renderer runs out of memory; a static gradient composited by
   opacity looks the same and costs nothing per frame. */
.agent-trigger__mark::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--blue-soft) 0%, rgba(59, 130, 246, 0) 70%);
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.5s ease;
}
.agent-trigger.invite .agent-trigger__mark::before { opacity: 1; }
.agent-trigger.invite:hover .agent-trigger__mark::before {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.9) 0%, rgba(59, 130, 246, 0) 72%);
}
.agent-trigger:focus-visible .agent-trigger__mark {
  outline: 2px solid var(--blue);
  outline-offset: 12px;
  border-radius: 50%;
}
.hero__mark {
  width: clamp(180px, 34vw, 300px);
  height: auto;
  overflow: visible;
}

/* the invitation ring */
.agent-trigger__ring {
  position: absolute;
  top: 18px;
  width: clamp(180px, 34vw, 300px);
  height: clamp(180px, 34vw, 300px);
  border-radius: 50%;
  border: 1px solid var(--blue);
  opacity: 0;
  pointer-events: none;
}

/* the hint label */
.agent-trigger__hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.2s ease;
}
.agent-trigger__hint .arrow { transition: transform 0.25s ease; }
.agent-trigger:hover .agent-trigger__hint { color: var(--fg); }
.agent-trigger:hover .agent-trigger__hint .arrow { transform: translateX(4px); }

/* ---------- The invitation (after a beat) ---------- */
.agent-trigger.invite .agent-trigger__hint { opacity: 1; transform: none; }
.agent-trigger.invite .agent-trigger__mark {
  animation: jb-invite 3.6s ease-in-out infinite;
}
.agent-trigger.invite .agent-trigger__ring {
  animation: jb-ring 3.6s ease-out infinite;
}
.agent-trigger.invite:hover .agent-trigger__mark { animation-play-state: paused; }

@keyframes jb-invite {
  0%, 58%, 100% { transform: translateY(0) scale(1); }
  68% { transform: translateY(-12px) scale(1.05); }
  78% { transform: translateY(0) scale(0.99); }
  88% { transform: translateY(-5px) scale(1.02); }
}
@keyframes jb-ring {
  0% { transform: scale(0.92); opacity: 0; }
  30% { opacity: 0.5; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- The mark's own life (float, blink, blue-eye ping) ---------- */
.jb-float {
  transform-box: fill-box;
  transform-origin: center;
  animation: jb-float 7s ease-in-out infinite;
}
@keyframes jb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.jb-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: jb-blink 6.4s ease-in-out infinite;
}
@keyframes jb-blink {
  0%, 91%, 100% { transform: scaleY(1); }
  93.5% { transform: scaleY(0.08); }
  96% { transform: scaleY(1); }
}
.jb-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: jb-halo 3.2s ease-out infinite;
}
@keyframes jb-halo {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Agent overlay ---------- */
.agent-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.agent-overlay[hidden] { display: none; }
.agent-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.82);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.agent-overlay.open .agent-overlay__scrim { opacity: 1; }

.agent-overlay__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(86dvh, 780px);
  display: flex;
  flex-direction: column;
  background: #0c0c11;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.agent-overlay.open .agent-overlay__panel { opacity: 1; transform: none; }

.agent-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: #101017;
}
.agent-overlay__title {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}
.agent-overlay__close {
  width: 32px; height: 32px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  display: grid; place-items: center;
  transition: background 0.15s ease, color 0.15s ease;
}
.agent-overlay__close:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); }

.agent-overlay__body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 26px 30px;
}

/* ---------- Designer (step 1) ---------- */
.designer__ask {
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--fg);
  max-width: 26ch;
}
.designer__sub {
  margin-top: 11px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  max-width: 52ch;
}
.designer__field { display: flex; gap: 10px; }
.designer__field input {
  flex: 1;
  min-width: 0;
  background: #08080b;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.designer__field input::placeholder { color: var(--muted-2); }
.designer__field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}
.designer__field button {
  flex: none;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.designer__field button:hover { background: #2f74e8; }
.designer__field button:disabled { opacity: 0.55; cursor: progress; }

.designer__examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.designer__examples-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-right: 2px;
}
.designer__examples button {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.designer__examples button:hover {
  color: var(--fg);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- Working / error ---------- */
.designer__working {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 30px 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.84rem;
}
.spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.designer__error {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-radius: 10px;
  font-size: 0.88rem;
}

.designer__nudge {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ---------- Spec (step 4) ---------- */
/* ---------- raw input, then the turn ---------- */
.spec__quote {
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--muted);
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
  word-break: break-word;
}

.turn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin: 22px 0 24px;
}
.turn__arrow {
  color: var(--blue);
  font-size: 1.05rem;
  line-height: 1;
}
.turn__caption {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.turn__mark { flex: none; width: 26px; height: 26px; }

/* ---------- the app card ---------- */
.spec__app {
  margin-top: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #14141c, #0f0f16);
}
.spec__app-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.spec__app-for { margin-top: 4px; font-size: 0.85rem; color: var(--muted); }
.spec__sketch-note { margin-top: 12px; text-align: center; font-size: 0.72rem; color: var(--muted-2); }

/* ---------- the sketch ---------- */
.sketch {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0a0f;
  overflow: hidden;
}
.sketch__chrome {
  display: flex;
  gap: 5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.sketch__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.sketch__body { display: grid; gap: 9px; padding: 14px; }
.sketch__line { display: block; height: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.13); }
.sketch__row { display: flex; align-items: center; gap: 10px; }
.sketch__row .sketch__line { margin-right: auto; }
.sketch__chip {
  flex: none;
  font-family: var(--mono);
  font-size: 0.64rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.sketch__chip.is-warn { color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.10); }
.sketch__chip.is-ok { color: #86efac; border-color: rgba(74, 222, 128, 0.30); background: rgba(74, 222, 128, 0.08); }
.sketch__field { display: flex; align-items: center; gap: 10px; }
.sketch__field .sketch__line { flex: 1 1 auto; }
.sketch__label { flex: none; min-width: 62px; font-family: var(--mono); font-size: 0.64rem; color: var(--muted-2); }
.sketch__add, .sketch__input, .sketch__drop { padding: 9px 12px; border-radius: 9px; font-size: 0.76rem; color: var(--muted); }
.sketch__add { border: 1px dashed rgba(59, 130, 246, 0.45); color: var(--blue); }
.sketch__input { border: 1px solid var(--line); color: var(--muted-2); }
.sketch__drop { padding: 18px 12px; border: 1px dashed var(--line); text-align: center; color: var(--muted-2); }
.sketch__btn {
  justify-self: start;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.74rem;
  color: var(--blue);
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.sketch__out { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.sketch__alert {
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.76rem;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.30);
}
.sketch__rule { height: 1px; background: var(--line); }
.sketch__result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.32);
}
.sketch__result .sketch__line { flex: 1 1 auto; background: rgba(59, 130, 246, 0.5); }
.sketch__tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.sketch__tag.is-blue { color: var(--blue); }
.sketch__split { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.sketch__pile { display: grid; gap: 8px; }
.sketch__pile.is-clean .sketch__line { background: rgba(59, 130, 246, 0.35); }
.sketch__arrow { color: var(--muted-2); font-size: 0.9rem; }
.sketch__node {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
}

/* ---------- the closing voice ---------- */
.spec__offer {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--fg);
  max-width: 56ch;
}

/* ---------- guardrail ---------- */
.spec__warn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 0.86rem;
  line-height: 1.55;
}

/* ---------- what it does ---------- */
.spec__section { margin-top: 22px; }
.spec__section h4 {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 11px;
  font-weight: 500;
}
.spec__plan { list-style: none; display: grid; gap: 9px; }
.spec__plan li { position: relative; padding-left: 20px; font-size: 0.92rem; line-height: 1.5; }
.spec__plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* ---------- size + needs ---------- */
.spec__facts {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.spec__fact { display: flex; gap: 14px; font-size: 0.82rem; }
.spec__fact-label {
  flex: none;
  width: 52px;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.spec__fact-value { color: var(--fg); }

.spec__torn { margin-top: 14px; font-size: 0.8rem; line-height: 1.55; color: var(--muted); }


.spec__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  transition: background 0.15s ease;
}
.spec__cta:hover { background: #2f74e8; }
.spec__cta .arrow { transition: transform 0.2s ease; }
.spec__cta:hover .arrow { transform: translateX(4px); }
.spec__restart { margin-top: 14px; text-align: center; font-size: 0.8rem; color: var(--muted); }
.spec__restart button { color: var(--blue); }
.spec__restart button:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .spec__app { padding: 16px; }
  .designer__field { flex-direction: column; }
  .designer__field button { padding: 13px 22px; }
  .agent-overlay__body { padding: 20px 18px 24px; }
}

body.overlay-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .topbar { height: 64px; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 1.1rem; }
  .topbar__apliq small { display: none; }
  .bottombar { justify-content: center; text-align: center; }
  .bottombar__contacts { justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .jb-float, .jb-eye, .jb-halo,
  .agent-trigger.invite .agent-trigger__mark,
  .agent-trigger.invite .agent-trigger__ring { animation: none; }
  .jb-halo { opacity: 0; }
  .agent-trigger.invite .agent-trigger__hint { opacity: 1; transform: none; }
  .agent-overlay__panel, .agent-overlay__scrim { transition: none; }
}