/* ─── papillon/index.html — Papillon desktop app page ────────────────────── */
/*
  Papillon uses a darker palette and Inter as body font.
  Colors are overridden here on top of shared.css tokens.
*/
:root {
  --violet:  #8b5cf6;
  --indigo:  #6366f1;
  --emerald: #10b981;
  --amber:   #f59e0b;
  --red:     #ef4444;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
}
::selection { background: rgba(139,92,246,.3); }
a { color: var(--violet); transition: color .2s; }
a:hover { color: #a78bfa; }

.container { max-width: 1080px; }

/* ─── Nav override ────────────────────────────────────────────────────────── */
nav { background: rgba(6,6,9,.85); }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn { padding: 8px 16px; font-size: .88rem; font-weight: 500; }
.btn-primary {
  padding: 14px 32px; font-size: 1rem;
  background: var(--violet); color: #fff; font-weight: 600; border: none;
  transition: transform .15s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(139,92,246,.35); color: #fff; }
.btn-secondary {
  padding: 14px 32px; font-size: 1rem;
  background: transparent; color: var(--muted); font-weight: 600;
  border: 1px solid var(--border);
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--faint); color: var(--text); }
.btn-outline:hover { border-color: var(--indigo); color: var(--indigo); }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero-icon {
  width: 80px; height: 80px; border-radius: 16px;
  margin: 0 auto 20px; display: block;
}
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px; position: relative;
}
.hero::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(ellipse, rgba(139,92,246,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800;
  line-height: 1.1; letter-spacing: -.03em; margin-bottom: 24px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--violet) 0%, #c084fc 50%, var(--indigo) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .subtitle { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--muted); max-width: 540px; margin: 0 auto 48px; line-height: 1.6; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px;
  background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.2);
  color: var(--violet); font-size: .75rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 20px;
}
.section h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 20px; }
.section .lead { font-size: 1.15rem; color: var(--muted); max-width: 600px; line-height: 1.7; }

/* ─── Problem cards ───────────────────────────────────────────────────────── */
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 48px; }
.problem-card { padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color .2s; }
.problem-card:hover { border-color: rgba(239,68,68,.3); }
.problem-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 16px; background: rgba(239,68,68,.08); }
.problem-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.problem-card p  { color: var(--muted); font-size: .95rem; }

/* ─── Shift steps ─────────────────────────────────────────────────────────── */
.shift-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.shift-step { padding: 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.shift-step:hover { border-color: rgba(139,92,246,.3); }
.step-number { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--indigo)); color: #fff; font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.shift-step h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.shift-step p  { color: var(--muted); font-size: .9rem; }

/* ─── Rules list ──────────────────────────────────────────────────────────── */
.rules-list { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; max-width: 560px; }
.rule-item { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 1.05rem; font-weight: 500; transition: border-color .2s; }
.rule-item:hover { border-color: rgba(16,185,129,.3); }
.rule-check { width: 28px; height: 28px; border-radius: 8px; background: rgba(16,185,129,.1); color: var(--emerald); display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; flex-shrink: 0; }

/* ─── Demo ────────────────────────────────────────────────────────────────── */
.demo-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.demo-header  { text-align: center; margin-bottom: 48px; }
.demo-container { max-width: 680px; margin: 0 auto; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.demo-topbar { padding: 14px 20px; background: var(--surface2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.demo-topbar-title  { font-size: .85rem; font-weight: 600; color: var(--muted); }
.demo-topbar-status { font-size: .75rem; color: var(--faint); }
.demo-body { padding: 32px 28px; min-height: 400px; }

.demo-progress { display: flex; gap: 4px; margin-bottom: 32px; }
.demo-progress-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--border); transition: background .4s; }
.demo-progress-bar.active { background: var(--violet); }
.demo-progress-bar.done   { background: var(--emerald); }

.demo-step        { display: none; animation: fadeUp .4s ease; }
.demo-step.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.demo-step-label  { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); margin-bottom: 16px; }
.demo-step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.demo-step p  { color: var(--muted); margin-bottom: 16px; }

.demo-rules { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.demo-rule { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; }
.demo-rule-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .7rem; flex-shrink: 0; }
.demo-rule-icon.budget   { background: rgba(139,92,246,.15); color: var(--violet); }
.demo-rule-icon.vendor   { background: rgba(99,102,241,.15);  color: var(--indigo); }
.demo-rule-icon.approval { background: rgba(245,158,11,.15);  color: var(--amber); }

.demo-filter-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.demo-filter-row:last-child { border-bottom: none; }
.demo-filter-count { font-weight: 600; }
.demo-filter-count.red   { color: var(--red); }
.demo-filter-count.green { color: var(--emerald); }

.demo-approval-box { padding: 24px; background: rgba(245,158,11,.04); border: 1px solid rgba(245,158,11,.2); border-radius: var(--radius); text-align: center; margin: 20px 0; }
.demo-approval-box .price  { font-size: 2rem; font-weight: 800; margin: 12px 0 4px; }
.demo-approval-box .reason { color: var(--amber); font-size: .85rem; margin-bottom: 20px; }
.demo-approval-actions { display: flex; gap: 12px; justify-content: center; }
.demo-btn-approve { padding: 10px 28px; border-radius: 8px; background: var(--emerald); color: #fff; font-weight: 600; border: none; cursor: pointer; font-size: .9rem; transition: transform .15s; }
.demo-btn-approve:hover { transform: translateY(-1px); }
.demo-btn-reject  { padding: 10px 28px; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; border: 1px solid var(--border); cursor: pointer; font-size: .9rem; }

.demo-receipt { border: 1px solid rgba(16,185,129,.2); border-radius: var(--radius); overflow: hidden; }
.demo-receipt-header { padding: 16px 20px; background: rgba(16,185,129,.06); border-bottom: 1px solid rgba(16,185,129,.15); display: flex; align-items: center; gap: 10px; }
.demo-receipt-header .icon { color: var(--emerald); font-size: 1.1rem; }
.demo-receipt-header span  { font-weight: 600; color: var(--emerald); }
.demo-receipt-body  { padding: 20px; }
.demo-receipt-row   { display: flex; justify-content: space-between; padding: 8px 0; font-size: .9rem; }
.demo-receipt-row .label { color: var(--muted); }
.demo-receipt-row .value { font-weight: 500; }
.demo-receipt-rules { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.demo-receipt-rules h4 { font-size: .8rem; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.demo-receipt-rule-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; margin: 0 6px 6px 0; border-radius: 6px; background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.15); color: var(--emerald); font-size: .8rem; font-weight: 500; }

.demo-controls { display: flex; justify-content: center; padding: 20px; border-top: 1px solid var(--border); background: var(--surface2); gap: 8px; }
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background .2s, transform .15s; }
.demo-dot.active { background: var(--violet); transform: scale(1.3); }
.demo-dot.done   { background: var(--emerald); }
.demo-nav-btn { padding: 10px 24px; border-radius: 8px; background: var(--surface2); color: var(--text); font-weight: 600; border: 1px solid var(--border); cursor: pointer; font-size: .85rem; transition: border-color .2s; margin-top: 24px; }
.demo-nav-btn:hover { border-color: var(--violet); }

/* ─── Why / Trust ─────────────────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 48px; }
.pillar { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: center; }
.pillar-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 1.3rem; }
.pillar-icon.control  { background: rgba(139,92,246,.1); }
.pillar-icon.visible  { background: rgba(99,102,241,.1); }
.pillar-icon.safe     { background: rgba(16,185,129,.1); }
.pillar-icon.delegate { background: rgba(245,158,11,.1); }
.pillar h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.pillar p  { color: var(--muted); font-size: .9rem; }

.trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; margin-top: 40px; }
@media (max-width: 640px) { .trust-list { grid-template-columns: 1fr; } }
.trust-item { display: flex; align-items: center; gap: 14px; font-size: 1.05rem; font-weight: 500; }
.trust-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(139,92,246,.08); display: flex; align-items: center; justify-content: center; color: var(--violet); font-size: .9rem; flex-shrink: 0; }

/* ─── Tech grid ───────────────────────────────────────────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 48px; }
.tech-card { padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 12px; transition: border-color .2s; }
.tech-card:hover { border-color: rgba(139,92,246,.25); }
.tech-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; width: fit-content; }
.tech-badge-emerald { background: rgba(16,185,129,.1);  color: var(--emerald); border: 1px solid rgba(16,185,129,.2); }
.tech-badge-violet  { background: rgba(139,92,246,.1);  color: var(--violet);  border: 1px solid rgba(139,92,246,.2); }
.tech-badge-indigo  { background: rgba(99,102,241,.1);  color: var(--indigo);  border: 1px solid rgba(99,102,241,.2); }
.tech-badge-amber   { background: rgba(245,158,11,.1);  color: var(--amber);   border: 1px solid rgba(245,158,11,.2); }
.tech-badge-teal    { background: rgba(20,184,166,.08); color: #5ee7d0;        border: 1px solid rgba(20,184,166,.15); }
.tech-badge-rose    { background: rgba(244,63,94,.08);  color: #fb7185;        border: 1px solid rgba(244,63,94,.15); }
.tech-icon  { font-size: 1.5rem; line-height: 1; }
.tech-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.tech-desc  { color: var(--muted); font-size: .9rem; line-height: 1.65; flex: 1; }
.tech-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tech-fact  { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); padding: 3px 8px; border-radius: 5px; background: var(--surface2); border: 1px solid var(--border); }

/* ─── Footer CTA + override ───────────────────────────────────────────────── */
.footer-cta { text-align: center; padding: 120px 24px; }
.footer-cta h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 16px; }
.footer-cta p  { color: var(--muted); font-size: 1.1rem; margin-bottom: 40px; }
footer .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
footer .built-on { color: var(--faint); font-size: .85rem; }
footer .built-on a { color: var(--faint); }
footer .built-on a:hover { color: var(--muted); }
footer .footer-links { display: flex; gap: 24px; }
footer .footer-links a { color: var(--faint); font-size: .85rem; }
footer .footer-links a:hover { color: var(--muted); }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .shift-steps { grid-template-columns: 1fr; }
  .hero         { padding: 100px 20px 60px; }
  .section      { padding: 64px 0; }
  .demo-body    { padding: 24px 20px; }
}
