/* Uptown Bridge - shared styles
 *
 * Palette built around the Uptown navy (#013a52). Bridge has a more
 * "consumer" feel than Tracker - softer corners, more whitespace,
 * brighter accents. Anywhere this file diverges from pugdashboard's
 * app.css is intentional.
 */

:root {
  --navy:           #013a52;
  --navy-700:       #02486a;
  --navy-50:        #e6f0f4;
  --ink:            #0e2230;
  --ink-soft:       #4a5b66;
  --muted:          #8a9aa3;
  --line:           #e3e9ee;
  --line-soft:      #eef3f6;
  --bg:             #f7f9fb;
  --card:           #ffffff;
  --accent:         #ff8a4c;          /* warm orange - confetti + reveal */
  --accent-soft:    #ffe6d7;
  --good:           #1f9d6c;
  --good-soft:      #d8f1e6;
  --warn:           #b86113;
  --bad:            #b8323e;

  --radius:         14px;
  --radius-sm:      10px;
  --radius-lg:      22px;
  --shadow-sm:      0 1px 2px rgba(2,30,46,.06);
  --shadow:         0 4px 24px rgba(2,30,46,.07);
  --shadow-pop:     0 20px 60px rgba(2,30,46,.18);
  --font:           "Inter", "Montserrat", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-wordmark:  "Montserrat", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 15px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Site header (signed-in app) ---------------------------------- */
.app-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 14px rgba(2,30,46,.18);
}
.app-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.app-header .brand img { height: 38px; display: block; }
.app-header nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.app-header nav a {
  color: rgba(255,255,255,.86);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
}
.app-header nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.app-header nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.app-header .spacer { flex: 1; }
.app-header .role-pill {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.app-header .me {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,.92);
}
.app-header .me .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ---- Layout containers -------------------------------------------- */
.page { max-width: 1100px; margin: 0 auto; padding: 32px 28px 80px; }
.page-narrow { max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
.page-wide { max-width: 1400px; margin: 0 auto; padding: 32px 28px 80px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}

/* ---- Typography helpers ------------------------------------------- */
.h1 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 8px; color: var(--ink); }
.h2 { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 0 0 8px; color: var(--ink); }
.h3 { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--ink); }
.lead { font-size: 17px; color: var(--ink-soft); }
.subtle { color: var(--muted); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--navy);
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* ---- Cards -------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card.pop { box-shadow: var(--shadow); border: none; }
.card-hd { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-hd .h2 { margin: 0; }
.card + .card { margin-top: 16px; }

/* ---- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 11px 20px; border-radius: 99px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
  background: var(--navy); color: #fff;
}
.btn:hover { background: var(--navy-700); transform: translateY(-1px); box-shadow: var(--shadow-sm); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { background: var(--navy-50); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #ff7333; }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--line); }
.btn.danger:hover { background: #fff3f4; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.lg { padding: 14px 28px; font-size: 16px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Forms -------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > label, .label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink); margin-bottom: 6px;
}
.field .hint, .hint {
  font-size: 12px; color: var(--muted); margin-top: 4px;
}
.input, .textarea, .select {
  font-family: inherit; font-size: 15px; color: var(--ink);
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--navy); box-shadow: 0 0 0 4px rgba(1, 58, 82, .12);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: #fff;
  font-size: 13px; color: var(--ink-soft); cursor: pointer; user-select: none;
}
.chip:hover { background: var(--navy-50); border-color: var(--navy-50); color: var(--navy); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip.on:hover { background: var(--navy-700); }

.error-text { color: var(--bad); font-size: 13px; margin-top: 6px; }
.info-text  { color: var(--good); font-size: 13px; margin-top: 6px; }

/* ---- Tag / badge -------------------------------------------------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 600;
  background: var(--navy-50); color: var(--navy); border-radius: 99px;
}
.tag.warn { background: #fef0e2; color: var(--warn); }
.tag.good { background: var(--good-soft); color: var(--good); }
.tag.muted { background: var(--line-soft); color: var(--ink-soft); }
.tag.accent { background: var(--accent-soft); color: var(--warn); }

/* ---- Brief card --------------------------------------------------- */
.brief-card { padding: 22px; }
.brief-card .b-title { font-size: 18px; font-weight: 700; color: var(--ink); }
.brief-card .b-summary { color: var(--ink-soft); margin-top: 6px; font-size: 14px; }
.brief-card .b-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.brief-card .b-foot {
  display: flex; gap: 14px; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 13px;
}

/* ---- Proposal card ------------------------------------------------ */
.proposal-card { padding: 22px; }
.proposal-card .p-hd { display: flex; gap: 14px; align-items: flex-start; }
.proposal-card .p-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy-50); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.proposal-card .p-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.proposal-card .p-body { margin-top: 14px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }
.proposal-card .p-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }

/* ---- Blurred reveal field ----------------------------------------- */
.blurred {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
  letter-spacing: .04em;
  display: inline-block;
}
.reveal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.reveal-row .label { margin: 0; min-width: 90px; }
.revealed-pop {
  animation: revealPop .55s cubic-bezier(.25,.9,.3,1.2);
}
@keyframes revealPop {
  0%   { transform: scale(.6); filter: blur(8px); opacity: 0; }
  60%  { transform: scale(1.06); filter: blur(0); opacity: 1; }
  100% { transform: scale(1); }
}

/* ---- Wizard ------------------------------------------------------- */
.wizard {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.wizard .step-dots { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard .dot { width: 36px; height: 6px; border-radius: 99px; background: var(--line); }
.wizard .dot.on { background: var(--navy); }
.wizard .dot.done { background: var(--good); }
.wizard .q-prompt { font-size: 22px; font-weight: 700; line-height: 1.35; margin: 0 0 6px; color: var(--ink); }
.wizard .q-help { color: var(--ink-soft); margin: 0 0 18px; }
.wizard .wiz-foot {
  display: flex; justify-content: space-between; gap: 10px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft);
}
.wizard .ai-coach {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px dashed var(--navy-50);
  background: linear-gradient(180deg, rgba(255,138,76,.04), rgba(1,58,82,.04));
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.wizard .ai-coach .label { color: var(--accent); margin-bottom: 4px; }

/* ---- Chat / messages --------------------------------------------- */
.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 0;
}
.msg {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 15px;
  word-wrap: break-word;
}
.msg.mine { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .ts { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }
.composer {
  display: flex; gap: 10px; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.composer .textarea { min-height: 56px; }

/* ---- Landing ------------------------------------------------------ */
.lp-hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}
.lp-hero .h1 { font-size: 46px; max-width: 720px; margin: 0 auto 14px; }
.lp-hero .lead { font-size: 19px; max-width: 580px; margin: 0 auto 28px; }
.lp-hero .btn-row { justify-content: center; }
.lp-section { padding: 60px 24px; }
.lp-section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-card { background: var(--card); padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); }
.lp-card h3 { margin-top: 0; }
.lp-foot {
  padding: 30px 24px; text-align: center;
  color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line);
}
.lp-foot a { color: var(--muted); }

/* ---- Login card --------------------------------------------------- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg) 0%, #fff 100%);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-pop);
}
.login-brand { text-align: center; margin-bottom: 8px; }
.login-brand img { height: 50px; }
.login-title { font-size: 18px; font-weight: 700; text-align: center; color: var(--ink); margin-bottom: 24px; }
.login-switch { text-align: center; margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.login-switch a { font-weight: 600; }
.login-legal { text-align: center; font-size: 12px; color: var(--muted); margin-top: 20px; }
.login-forgot { float: right; font-size: 12px; margin-top: 4px; }
.login-error { color: var(--bad); font-size: 14px; min-height: 20px; margin: 8px 0 0; }
.login-info { color: var(--good); font-size: 14px; min-height: 20px; margin: 4px 0 0; }

/* ---- Status pills (proposal status) ------------------------------- */
.pill { padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 99px; }
.pill.sent { background: var(--navy-50); color: var(--navy); }
.pill.viewed { background: #eef3f6; color: var(--ink-soft); }
.pill.matched { background: var(--good-soft); color: var(--good); }
.pill.passed { background: #fbeaec; color: var(--bad); }

/* ---- Empty states ------------------------------------------------- */
.empty {
  text-align: center; padding: 60px 24px;
  color: var(--ink-soft); background: var(--card);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty .emoji { font-size: 36px; }
.empty .h3 { margin-top: 12px; }

/* ---- Tiny utilities ---------------------------------------------- */
.spacer-sm { height: 8px; }
.spacer { height: 18px; }
.spacer-lg { height: 36px; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex.between { justify-content: space-between; align-items: center; gap: 12px; }
.flex.col { flex-direction: column; }
.flex.gap { gap: 12px; }
.no-wrap { white-space: nowrap; }
.right { margin-left: auto; }
.hidden { display: none !important; }

/* ---- Confetti container ------------------------------------------ */
#confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
}
