/* FreelancerOS — crisp productivity aesthetic. Mobile-first, vanilla, no build step. */
:root {
  --bg: #070b12;
  --surface: #0c1320;
  --surface-2: #111a2c;
  --line: #1e2a44;
  --text: #eef3fb;
  --muted: #93a1bb;
  --accent: #34d399;
  --accent-2: #fbbf24;
  --accent-soft: rgba(52, 211, 153, .12);
  --grad: linear-gradient(135deg, #34d399, #22d3ee);
  --gold: #fbbf24;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
  --radius: 14px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 15% -5%, rgba(52, 211, 153, .10) 0%, transparent 60%) fixed,
    radial-gradient(900px 420px at 85% 0%, rgba(251, 191, 36, .07) 0%, transparent 60%) fixed,
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  font-size: 16px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 11, 18, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.5px; color: var(--text); text-decoration: none; }
.brand span {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.nav { display: flex; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 18px; }
.nav a:hover { color: var(--text); }
.nav .nav-cta {
  margin-left: 18px; padding: 8px 16px; border-radius: 999px;
  background: var(--grad); color: #04120b; font-weight: 700;
}
.nav .nav-cta:hover { color: #04120b; opacity: .92; }
@media (max-width: 560px) { .nav a:not(.nav-cta) { display: none; } }

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 72px; }
main.wide { max-width: 1240px; }
main section { margin-top: clamp(48px, 8vw, 84px); }
section[id] { scroll-margin-top: 76px; }
h1 {
  font-size: clamp(30px, 8.5vw, 54px);
  line-height: 1.06; letter-spacing: -0.03em;
  margin: 0 0 14px; text-wrap: balance;
}
h2 { font-size: clamp(22px, 5.5vw, 30px); letter-spacing: -0.02em; margin: 0 0 10px; text-wrap: balance; }
.sec-title { font-size: clamp(24px, 6vw, 36px); letter-spacing: -0.02em; text-wrap: balance; }
h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
p.lede { color: var(--muted); font-size: 17px; margin: 0 0 18px; max-width: 640px; }
.sec-sub { color: var(--muted); max-width: 680px; margin: 0 0 24px; }
::selection { background: rgba(52, 211, 153, .35); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); font-size: 12px; font-weight: 800;
  margin: 0 0 12px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft);
}
.centered { text-align: center; max-width: 680px; margin-left: auto; margin-right: auto; }
.centered p.lede { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 80px); text-align: center; }
.hero .hero-sub { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.trust-row { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 12px;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  transition: transform .06s ease, opacity .15s ease;
}
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--grad); border: none; color: #04120b;
  box-shadow: 0 6px 24px rgba(52, 211, 153, .25);
}
.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn-danger { border-color: rgba(251, 113, 133, .5); color: var(--err); background: transparent; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- cards / grids ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.card .icon { font-size: 26px; display: block; margin-bottom: 10px; }
.card .tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px;
}
.card .tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- demo strip on landing ---------- */
.demo-strip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-top: 24px; overflow: hidden;
}
.demo-strip .strip-label {
  display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--accent-2); border: 1px dashed rgba(251, 191, 36, .6);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.mini-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.mini-col {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.mini-col h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.mini-card {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px;
}
.mini-card .meta { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; counter-reset: step; }
.steps li {
  counter-increment: step; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 18px 64px; position: relative;
}
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.steps li strong { display: block; margin-bottom: 4px; }
.steps li p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- pricing ---------- */
.pricing-card {
  max-width: 560px; margin: 24px auto 0; background: var(--surface);
  border: 1px solid rgba(52, 211, 153, .45); border-radius: 18px; padding: 34px;
  text-align: center; position: relative;
}
.pricing-card .price { font-size: 52px; font-weight: 800; letter-spacing: -2px; margin: 8px 0; }
.pricing-card .price small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.pricing-card ul { text-align: left; list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 10px; }
.pricing-card ul li { padding-left: 28px; position: relative; color: var(--text); font-size: 15px; }
.pricing-card ul li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 800; }
.pricing-card .guarantee { color: var(--muted); font-size: 13.5px; margin-top: 16px; }

/* ---------- faq ---------- */
.faq { max-width: 720px; margin: 24px auto 0; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 72px; }
footer .inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 20px; }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.footer-base a { color: var(--muted); text-decoration: none; margin: 0 8px; }
.footer-base a:hover { color: var(--text); }

/* ---------- legal ---------- */
.legal { max-width: 780px; margin: 0 auto; }
.legal-updated { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.legal-card h2 { font-size: 19px; margin-top: 0; }
.legal-card p { color: var(--muted); font-size: 14.5px; }
.legal-card a { color: var(--accent); }

/* ---------- dashboard shell ---------- */
.dash { padding-top: 20px; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-top h1 { font-size: clamp(24px, 5vw, 32px); margin: 0; }
.sync-note { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.tab {
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 10px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent-soft); border-color: rgba(52, 211, 153, .4); color: var(--accent); }
.tab-panel { animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius); margin-top: 16px;
}
.empty .big { font-size: 34px; display: block; margin-bottom: 10px; }

/* ---------- tables (clients, invoices) ---------- */
.table-wrap { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
table.data th {
  text-align: left; padding: 12px 14px; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px; background: var(--surface);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(52, 211, 153, .03); }

/* ---------- badges / pills ---------- */
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.pill-lead { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
.pill-active { background: rgba(52, 211, 153, .14); color: var(--accent); }
.pill-onhold { background: rgba(251, 191, 36, .14); color: var(--accent-2); }
.pill-done { background: rgba(148, 163, 184, .16); color: #94a3b8; }
.pill-draft { background: rgba(148, 163, 184, .16); color: #94a3b8; }
.pill-sent { background: rgba(56, 189, 248, .14); color: #7dd3fc; }
.pill-paid { background: rgba(52, 211, 153, .14); color: var(--accent); }
.pill-overdue { background: rgba(251, 113, 133, .14); color: var(--err); }
.pill-follow { background: rgba(251, 191, 36, .14); color: var(--accent-2); }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .6px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 11px 13px; font-size: 15px; font-family: var(--font);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 6, 12, .72); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; width: 100%; max-width: 520px;
  max-height: 88vh; overflow-y: auto;
}
.modal-card.wide { max-width: 720px; }
.modal-card h2 { margin-top: 0; }
.modal-close {
  position: absolute; top: 14px; right: 14px; background: transparent; border: none;
  color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 6px;
}
.modal-close:hover { color: var(--text); }
.status { font-size: 14px; margin-top: 10px; }
.status.error { color: var(--err); }
.status.busy { color: var(--accent); }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.kanban-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.kanban-col > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 0; display: flex; justify-content: space-between; align-items: center; }
.kanban-col > h3 .count { background: var(--surface-2); border-radius: 999px; padding: 1px 9px; font-size: 11px; }
.kcard { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kcard h4 { margin: 0 0 4px; font-size: 14.5px; }
.kcard .platform { font-size: 12px; color: var(--accent); font-weight: 700; }
.kcard p { font-size: 13px; color: var(--muted); margin: 6px 0 10px; white-space: pre-wrap; }
.kcard .moves { display: flex; gap: 6px; flex-wrap: wrap; }
.kcard .moves button {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; font-size: 12px; padding: 5px 10px; cursor: pointer;
}
.kcard .moves button:hover { border-color: var(--accent); color: var(--text); }

/* ---------- invoice builder ---------- */
.line-items { display: grid; gap: 10px; margin: 12px 0; }
.line-item { display: grid; grid-template-columns: 1fr 70px 90px 40px; gap: 8px; align-items: center; }
.line-item input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 9px 10px; font-size: 14px; width: 100%; }
.line-item .rm { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 8px; cursor: pointer; }
.line-item .rm:hover { color: var(--err); border-color: var(--err); }
.invoice-totals { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 14.5px; }
.invoice-totals .row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); }
.invoice-totals .row.grand { color: var(--text); font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.pipeline-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .n { font-size: 24px; font-weight: 800; letter-spacing: -1px; }
.stat .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* ---------- templates ---------- */
.template-cards { display: grid; gap: 14px; margin-top: 16px; }
.template-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.template-card h3 { margin-top: 0; }
.template-card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.template-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lock-note {
  margin-top: 16px; background: rgba(251, 191, 36, .08); border: 1px dashed rgba(251, 191, 36, .5);
  border-radius: 12px; padding: 18px; text-align: center;
}
.lock-note strong { color: var(--accent-2); }

/* ---------- demo banner / locked ---------- */
.demo-banner {
  background: linear-gradient(135deg, rgba(251,191,36,.14), rgba(52,211,153,.10));
  border: 1px solid rgba(251, 191, 36, .45); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 20px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
}
.demo-banner .txt { flex: 1; min-width: 220px; }
.demo-banner strong { color: var(--accent-2); }
.demo-banner p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.locked { text-align: center; padding: 80px 20px; }
.locked .big { font-size: 52px; margin-bottom: 16px; }
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-weight: 800; }

/* ---------- misc ---------- */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.section-head h2 { margin: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.search { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 10px 14px; font-size: 14.5px; min-width: 200px; }
.search:focus { outline: none; border-color: var(--accent); }
.reveal { opacity: 1; }
pre.payload { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; overflow-x: auto; font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .line-item { grid-template-columns: 1fr 60px 80px 36px; }
  .dash-top h1 { font-size: 24px; }
  .pricing-card { padding: 26px 20px; }
  #subscribe-form { flex-direction: column; }
  #subscribe-form .btn { width: 100%; }
}
