/* Tenon Partners AI Opportunity Dashboard. Dark, finance-grade, AI-forward. */
:root {
  --bg: #0a1614; --bg-2: #0f201d; --card: #14302b; --card-2: #103029;
  --line: #1e463e; --ink: #eaf3f0; --muted: #93b0a9;
  --gold: #d9b26a; --gold-dim: #b8975a; --green: #3fbf8f; --red: #e0736a; --amber: #e0b45a;
  --cyan: #5fd0c4; --shadow: 0 10px 30px rgba(0,0,0,0.35); --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 70% -10%, #123029 0%, var(--bg) 55%);
  color: var(--ink); min-height: 100vh; line-height: 1.5;
}

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(150deg, #0b2e2a, #16463d); border: 1px solid var(--gold-dim); color: var(--gold); font-family: Georgia, serif; font-size: 22px; font-weight: 700; display: grid; place-items: center; }
.brand-name { font-weight: 700; letter-spacing: 0.3px; }
.brand-sub { font-size: 12px; color: var(--muted); }
.site-link { color: var(--gold); text-decoration: none; font-size: 14px; }
.site-link:hover { text-decoration: underline; }

main { max-width: 1040px; margin: 0 auto; padding: 0 22px 60px; }

/* Hero */
.hero { padding: 52px 0 26px; text-align: center; position: relative; }
.ai-orb { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 200px; height: 200px; pointer-events: none; opacity: 0.5; }
.ai-orb span, .ai-orb b { position: absolute; inset: 0; margin: auto; border-radius: 50%; }
.ai-orb b { width: 70px; height: 70px; background: radial-gradient(circle, rgba(217,178,106,0.55), transparent 70%); filter: blur(4px); animation: pulse 3.5s ease-in-out infinite; }
.ai-orb span { border: 1px solid rgba(95,208,196,0.25); }
.ai-orb span:nth-child(1) { width: 90px; height: 90px; animation: spin 14s linear infinite; }
.ai-orb span:nth-child(2) { width: 140px; height: 140px; border-style: dashed; animation: spin 22s linear infinite reverse; }
.ai-orb span:nth-child(3) { width: 190px; height: 190px; border-color: rgba(217,178,106,0.18); animation: spin 30s linear infinite; }
@keyframes pulse { 0%,100% { opacity: 0.5; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.1); } }
.eyebrow { position: relative; color: var(--gold); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.hero h1 { position: relative; font-size: clamp(28px, 4.4vw, 46px); margin: 0 0 16px; letter-spacing: -0.5px; line-height: 1.1; }
.grad { background: linear-gradient(90deg, var(--gold), var(--cyan), var(--gold)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 4s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.lede { position: relative; max-width: 680px; margin: 0 auto 30px; color: var(--muted); font-size: 16px; }

/* Scan form */
.scan { position: relative; display: flex; gap: 10px; justify-content: center; max-width: 660px; margin: 0 auto; flex-wrap: wrap; }
.scan-input { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.scan-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,178,106,0.12); }
.scan-globe { opacity: 0.7; }
.scan-input input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--ink); font-size: 16px; padding: 15px 0; }
.scan-input input::placeholder { color: #5f7d76; }
#scan-btn { background: linear-gradient(150deg, var(--gold), var(--gold-dim)); color: #10201d; font-weight: 700; font-size: 15px; border: 0; border-radius: 12px; padding: 0 24px; cursor: pointer; min-height: 52px; transition: transform 0.12s, filter 0.12s; }
#scan-btn:hover { filter: brightness(1.05); }
#scan-btn:active { transform: translateY(1px); }
#scan-btn:disabled { opacity: 0.6; cursor: progress; }
.examples { position: relative; margin-top: 16px; color: var(--muted); font-size: 14px; }
.chip { background: var(--card-2); border: 1px solid var(--line); color: var(--gold); border-radius: 999px; padding: 5px 12px; margin: 0 4px; cursor: pointer; font-size: 13px; }
.chip:hover { border-color: var(--gold); }

/* Scanner with 3D data-model canvas */
.scanner { display: flex; gap: 26px; align-items: center; max-width: 680px; margin: 26px auto 0; padding: 24px; background: linear-gradient(180deg, var(--bg-2), #0c1d1a); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.ai-canvas { width: 150px; height: 150px; flex: none; filter: drop-shadow(0 0 12px rgba(95,208,196,0.15)); }
@keyframes spin { to { transform: rotate(360deg); } }
.scanner-body { flex: 1; min-width: 0; }
.scanner-title { font-size: 15px; margin-bottom: 12px; }
.scanner-title strong { color: var(--gold); }
.scan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.scan-steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); transition: color 0.3s; }
.scan-steps li .dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2a4f47; flex: none; display: grid; place-items: center; font-size: 10px; }
.scan-steps li.active { color: var(--ink); }
.scan-steps li.active .dot { border-color: var(--gold); border-top-color: transparent; animation: spin 0.7s linear infinite; }
.scan-steps li.done { color: var(--ink); }
.scan-steps li.done .dot { border-color: var(--green); background: var(--green); color: #0a1614; animation: none; }

/* Dashboard shell */
.dashboard { margin-top: 24px; display: grid; gap: 20px; }
.panel { background: linear-gradient(180deg, var(--bg-2), #0c1d1a); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.reveal { opacity: 0; transform: translateY(14px); animation: reveal 0.5s ease forwards; animation-delay: calc(var(--d, 0) * 90ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }
.p-title { margin: 0 0 4px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.p-sub { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }

/* AI Readiness hero */
.readiness { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.readiness-left { flex: none; }
.ring { --v: 0; position: relative; width: 148px; height: 148px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--v)*1%), #21453d 0); display: grid; place-items: center; }
.ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(217,178,106,0.25); animation: pulseGlow 2.6s ease-in-out infinite; }
@keyframes pulseGlow { 0%,100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.04); } }
.ring-inner { width: 118px; height: 118px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-align: center; position: relative; }
.ring-inner span { font-size: 40px; font-weight: 800; line-height: 1; }
.ring-inner small { color: var(--muted); font-size: 13px; }
.readiness-right { flex: 1; min-width: 260px; }
.r-domain { font-size: 22px; font-weight: 700; color: var(--gold); }
.r-band { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 2px; }
.r-band span { color: var(--ink); font-weight: 700; }
.r-verdict { font-size: 15.5px; margin: 12px 0 16px; }
.r-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.rstat { display: flex; flex-direction: column; }
.rstat-num { font-size: 26px; font-weight: 800; }
.rstat-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Projected ROI */
.roi-panel { background: linear-gradient(180deg, #17332b, #0e2420); border-color: #2c5a4e; }
.roi-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.roi-stat { flex: 1 1 160px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; text-align: center; }
.roi-stat.roi-hero { flex: 1 1 200px; border-color: var(--gold-dim); background: linear-gradient(180deg, #1c3a30, #12302a); }
.roi-stat.roi-hero .roi-num { font-size: 40px; }
.roi-num { display: block; font-size: 32px; font-weight: 800; background: linear-gradient(90deg, var(--gold), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.roi-lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Briefing with typewriter */
.briefing { background: linear-gradient(180deg, #163730, #0e2420); border-color: #2c5a4e; }
.ai-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.ai-head h2 { margin: 0; font-size: 18px; }
.spark { color: var(--gold); animation: sparkle 2.2s ease-in-out infinite; display: inline-block; }
@keyframes sparkle { 0%,100% { opacity: 0.6; transform: scale(0.9) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(90deg); } }
.ai-badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #0e2420; border: 1px solid var(--gold-dim); color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; position: relative; overflow: hidden; }
.ai-badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(217,178,106,0.35) 50%, transparent 70%); transform: translateX(-100%); animation: sweepShine 3s ease-in-out infinite; }
@keyframes sweepShine { to { transform: translateX(100%); } }
.ai-badge.alt { border-color: var(--line); color: var(--muted); }
.ai-badge.alt::after { display: none; }
.briefing-text { font-size: 16.5px; line-height: 1.65; margin: 14px 0 0; min-height: 3em; white-space: pre-wrap; }
.tw-cursor { display: inline-block; width: 8px; height: 1.05em; background: var(--gold); vertical-align: text-bottom; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Systems (connection problem) */
.systems { display: flex; flex-wrap: wrap; gap: 10px; }
.sysnode { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px dashed var(--line); border-radius: 10px; padding: 9px 13px; font-size: 13.5px; opacity: 0; transform: scale(0.9); animation: pop 0.4s ease forwards; }
.sysnode small { color: var(--muted); font-size: 11px; }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
.systems .empty { color: var(--muted); font-size: 13.5px; font-style: italic; }

/* Signals */
.signals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.signal { display: flex; gap: 11px; background: var(--card); border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; padding: 12px 14px; }
.signal.strength { border-left-color: var(--green); }
.signal.opportunity { border-left-color: var(--gold); }
.signal.risk { border-left-color: var(--amber); }
.signal.compliance { border-left-color: var(--cyan); }
.sig-ic { font-size: 15px; }
.signal.strength .sig-ic::before { content: "✓"; color: var(--green); }
.signal.opportunity .sig-ic::before { content: "◆"; color: var(--gold); }
.signal.risk .sig-ic::before { content: "◆"; color: var(--amber); }
.signal.compliance .sig-ic::before { content: "⚖"; color: var(--cyan); }
.sig-label { font-weight: 700; font-size: 14px; }
.sig-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Recommended services */
.referral { background: linear-gradient(180deg, #14322b, #0e2420); border-color: #2c5a4e; }
.referral-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.rcard-top { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.rcard-icon { font-size: 20px; }
.rcard-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.rcard-blurb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.rcard-reason { font-size: 11.5px; color: var(--ink); opacity: 0.85; border-top: 1px solid #14322b; padding-top: 8px; }
.fitbar { height: 5px; border-radius: 3px; background: #21453d; margin: 4px 0 10px; overflow: hidden; }
.fitbar > i { display: block; height: 100%; width: var(--fit, 0%); border-radius: 3px; background: linear-gradient(90deg, var(--gold-dim), var(--gold)); animation: fitGrow 0.9s cubic-bezier(.2,.8,.2,1); }
@keyframes fitGrow { from { width: 0; } }
.rcard-fit { font-size: 11px; color: var(--gold); float: right; font-weight: 700; }

/* AI capabilities */
.caps-panel { background: linear-gradient(180deg, #14322b, #0e2420); border-color: #2c5a4e; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.caps li { display: flex; align-items: center; gap: 10px; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; opacity: 0; transform: translateX(-8px); animation: capIn 0.45s ease forwards; }
.caps li .cap-check { width: 20px; height: 20px; border-radius: 50%; background: rgba(63,191,143,0.18); color: var(--green); display: grid; place-items: center; font-size: 12px; flex: none; }
@keyframes capIn { to { opacity: 1; transform: none; } }

/* Roadmap */
.roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.phase { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.phase-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #10201d; background: var(--gold); border-radius: 6px; padding: 2px 8px; }
.phase-title { font-size: 16px; font-weight: 700; margin: 8px 0 2px; }
.phase-window { font-size: 12px; color: var(--muted); }
.phase-blurb { font-size: 12.5px; color: var(--muted); margin: 8px 0 12px; }
.phase-svc { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.phase-svc + .phase-svc { border-top: 1px solid #14322b; }
.phase-svc .fit { margin-left: auto; font-size: 11px; color: var(--gold); }

/* CTA */
.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(150deg, #1a3f36, #0f2622); border-color: var(--gold-dim); }
.cta-title { font-size: 18px; font-weight: 700; }
.cta-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.cta { background: linear-gradient(150deg, var(--gold), var(--gold-dim)); color: #10201d; font-weight: 700; border: 0; border-radius: 12px; padding: 14px 24px; cursor: pointer; font-size: 15px; white-space: nowrap; transition: filter 0.12s, transform 0.12s; }
.cta:hover { filter: brightness(1.05); }
.cta:active { transform: translateY(1px); }

.scan-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; padding-top: 4px; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 13px; }
.ghost:hover { border-color: var(--gold); color: var(--gold); }
.status { margin: 24px auto; max-width: 660px; text-align: center; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.status.error { border-color: #5a2c2a; background: #2a1614; color: var(--red); }
.page-foot { text-align: center; color: #5f7d76; font-size: 12px; padding: 20px; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .topbar { padding: 14px 18px; }
  .brand-sub { display: none; }
  .scanner { flex-direction: column; text-align: center; }
  .readiness { justify-content: center; text-align: center; }
  .r-stats { justify-content: center; }
  .caps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-orb, .spark, .grad, .ring::after, .ai-badge::after, .fitbar > i { animation: none !important; }
}
