/* GigGuide by LastKeyboard — Apple × Palantir × LastKeyboard aesthetic */
:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #161616;
  --border: #1a1a1a;
  --border-2: #262626;
  --text: #ffffff;
  --text-dim: #888888;
  --accent: #0066ff;
  --accent-dim: #0a4bb3;
  --accent-green: #00ff88;
  --accent-green-dim: #00cc66;
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8,8,8,0.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 17px; }
.logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 12px var(--accent-green); }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a, .nav button {
  color: var(--text-dim); font-size: 14px; font-weight: 500; padding: 8px 12px;
  border-radius: 8px; background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
  font-family: var(--font);
}
.nav a:hover, .nav button:hover { color: var(--text); background: var(--surface); }
.nav .nav-share { color: var(--text); border-color: var(--border-2); }
.nav .nav-share:hover { border-color: var(--accent-green); color: var(--accent-green); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 56px; text-align: center; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 320px at 50% 0%, rgba(0,102,255,0.12), transparent 70%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 600; margin-bottom: 26px;
  border: 1px solid var(--border-2); padding: 7px 14px; border-radius: 999px;
}
.eyebrow .live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); animation: pulse 2s infinite; }
h1.headline {
  font-size: clamp(38px, 7vw, 76px); line-height: 1.02; font-weight: 800;
  letter-spacing: -0.035em; margin: 0 auto 22px; max-width: 15ch;
}
.headline .grad { color: var(--accent-green); }
.subheadline { font-size: clamp(16px, 2.4vw, 20px); color: var(--text-dim); max-width: 60ch; margin: 0 auto 40px; }

/* ---------- Input / Button ---------- */
.analyze-box { max-width: 640px; margin: 0 auto; }
.input-row { display: flex; gap: 10px; align-items: stretch; }
.field {
  flex: 1; background: var(--surface); border: 1px solid var(--border-2);
  color: var(--text); font-size: 16px; padding: 0 18px; height: 60px; border-radius: var(--radius);
  outline: none; transition: border-color .18s ease, box-shadow .18s ease; font-family: var(--font);
  width: 100%;
}
.field::placeholder { color: #666; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,102,255,0.25); }
.btn {
  border: none; cursor: pointer; font-family: var(--font); font-weight: 700;
  border-radius: var(--radius); transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
  font-size: 15px; letter-spacing: 0.01em; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-green); color: #04140b; padding: 0 26px; height: 60px;
  box-shadow: 0 0 0 rgba(0,255,136,0); 
}
.btn-primary:hover { background: var(--accent-green-dim); box-shadow: 0 8px 30px rgba(0,255,136,0.22); }
.btn-blue { background: var(--accent); color: #fff; }
.btn-blue:hover { background: #1a75ff; }
.btn-ghost { background: transparent; border: 1px solid var(--border-2); color: var(--text); padding: 12px 18px; }
.btn-ghost:hover { border-color: var(--accent-green); color: var(--accent-green); }
.btn:focus-visible, .field:focus-visible, a:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 2px; }

.alt-input { margin-top: 14px; }
.alt-input .field { height: 52px; font-size: 15px; }
.hero-note { margin-top: 18px; font-size: 13px; color: #666; letter-spacing: 0.02em; }
.hero-error { color: #ff6b6b; font-size: 14px; margin-top: 12px; min-height: 18px; }

/* ---------- Chat ---------- */
.chat-section { padding: 40px 0 72px; display: none; }
.chat-section.active { display: block; }
.chat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.chat-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.chat-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 10px var(--accent-green); }
.chat-window {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px; min-height: 320px;
}
.messages { display: flex; flex-direction: column; gap: 18px; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.msg.assistant { justify-content: flex-start; }
.bubble {
  max-width: 88%; padding: 16px 18px; border-radius: 16px; font-size: 15.5px; line-height: 1.65;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.msg.user .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; max-width: 78%; }
.msg.assistant .bubble { background: var(--surface-2); border: 1px solid var(--border-2); color: var(--text); border-bottom-left-radius: 6px; }
.bubble h1, .bubble h2, .bubble h3 { font-size: 16px; margin: 14px 0 6px; letter-spacing: -0.01em; }
.bubble strong { color: #fff; }
.bubble ul, .bubble ol { margin: 8px 0 8px 20px; }
.bubble li { margin: 3px 0; }
.bubble p { margin: 8px 0; }
.bubble p:first-child { margin-top: 0; }
.bubble a { color: var(--accent-green); text-decoration: underline; text-underline-offset: 3px; }
.bubble code { background: #000; padding: 2px 6px; border-radius: 5px; font-size: 13px; }

/* Recommendation card injected into assistant messages */
.rec-card {
  margin-top: 14px; background: linear-gradient(160deg, rgba(0,255,136,0.06), rgba(0,102,255,0.04));
  border: 1px solid var(--accent-green-dim); border-radius: 14px; padding: 18px;
  animation: cardIn .5s cubic-bezier(.2,.8,.2,1);
}
.rec-card .rec-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-green); font-weight: 700; margin-bottom: 8px; }
.rec-card .rec-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; background: var(--accent-green); color: #04140b; font-weight: 700; padding: 11px 18px; border-radius: 10px; font-size: 14px; }
.rec-card .rec-cta:hover { background: var(--accent-green-dim); }

/* thinking loader */
.thinking { display: inline-flex; align-items: center; gap: 6px; padding: 6px 2px; }
.thinking span { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); animation: bounce 1.2s infinite; }
.thinking span:nth-child(2) { animation-delay: .18s; }
.thinking span:nth-child(3) { animation-delay: .36s; }

.chat-input-row { display: flex; gap: 10px; margin-top: 18px; }
.chat-input-row .field { height: 54px; }

/* ---------- Project strip ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-green); font-weight: 700; margin-bottom: 12px; }
.section-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.03em; }
.section-sub { color: var(--text-dim); margin-top: 12px; font-size: 16px; }

.project-strip { display: flex; gap: 16px; overflow-x: auto; padding: 6px 4px 18px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.project-strip::-webkit-scrollbar { height: 8px; }
.project-strip::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 8px; }
.project-card {
  scroll-snap-align: start; flex: 0 0 300px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s ease, transform .18s ease;
}
.project-card:hover { border-color: var(--border-2); transform: translateY(-3px); }
.project-card .pc-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.project-card .pc-desc { color: var(--text-dim); font-size: 14px; flex: 1; }
.project-card .pc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.project-card .pc-link { font-size: 13px; color: var(--accent); font-weight: 600; }
.project-card .pc-ask { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--accent-green); background: transparent; border: 1px solid var(--accent-green-dim); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-family: var(--font); }
.project-card .pc-ask:hover { background: rgba(0,255,136,0.08); }

/* ---------- Outcomes ---------- */
.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.outcome {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  display: flex; flex-direction: column; gap: 12px; transition: border-color .18s ease, transform .18s ease;
}
.outcome:hover { transform: translateY(-4px); }
.outcome .oc-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.outcome.find { }
.outcome.find:hover { border-color: var(--accent); }
.outcome.find .oc-icon { background: rgba(0,102,255,0.12); color: var(--accent); }
.outcome.launch:hover { border-color: var(--accent-green-dim); }
.outcome.launch .oc-icon { background: rgba(0,255,136,0.12); color: var(--accent-green); }
.outcome.build:hover { border-color: #7a5cff; }
.outcome.build .oc-icon { background: rgba(122,92,255,0.14); color: #a78bff; }
.outcome .oc-title { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.outcome .oc-tag { color: var(--text-dim); font-size: 14.5px; flex: 1; }
.outcome .oc-price { font-size: 13px; color: #aaa; font-weight: 600; }
.outcome .oc-cta { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--accent-green); }
.outcome .oc-cta:hover { gap: 10px; }

/* ---------- Share / Embed ---------- */
.share-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.share-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.share-card h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.01em; }
.share-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.link-row { display: flex; gap: 10px; }
.link-row .field { height: 50px; font-size: 14px; }
.qr-wrap { display: flex; align-items: center; gap: 20px; }
.qr-wrap img { width: 140px; height: 140px; border-radius: 12px; background: #fff; padding: 8px; }
.code-block { position: relative; background: #000; border: 1px solid var(--border-2); border-radius: 12px; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #9ad; overflow-x: auto; white-space: pre; }
.code-block-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner .fnote { color: #666; font-size: 13px; max-width: 60ch; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-dim); font-size: 13px; }
.footer-links a:hover { color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: var(--accent-green); color: #04140b; font-weight: 700; padding: 12px 20px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 100; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Embed-specific ---------- */
body.embed { background: var(--bg); }
.embed-wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.embed-header { display: flex; align-items: center; gap: 10px; padding: 8px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.embed-header .logo { font-size: 16px; }
.embed-header .badge { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-dim); }
.embed-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); color: #666; font-size: 12px; text-align: center; }
.embed-footer a { color: var(--accent-green); }

/* ---------- Animations ---------- */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); opacity:.5; } 30% { transform: translateY(-6px); opacity:1; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .outcomes { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
  .input-row { flex-direction: column; }
  .btn-primary { height: 56px; }
  .nav a, .nav button { padding: 8px 9px; font-size: 13px; }
  .nav .nav-hide { display: none; }
  .bubble { max-width: 94%; }
  .msg.user .bubble { max-width: 90%; }
  .qr-wrap { flex-direction: column; align-items: flex-start; }
  .chat-input-row { flex-direction: column; }
  .container { padding: 0 16px; }
}
