/* Austin AI Hub, AI Readiness Check. Palette taken from austinaihub.org:
   blue hsl(217 91% 60%) primary, orange hsl(25 95% 53%) accent, with teal,
   emerald and purple as supporting signal colors. */
:root {
  --bg: #0a1020; --bg-2: #0e1730; --card: #16213f; --card-2: #131d38;
  --line: #26356a; --ink: #eef2fb; --muted: #9aa8c7;
  --blue: #3b82f6; --blue-dim: #2563eb; --blue-deep: #1d4ed8;
  --accent: #f97316; --accent-dim: #ea580c;
  --teal: #20e3b2; --green: #10b981; --purple: #a855f7; --amber: #f59e0b; --red: #f87171;
  --shadow: 0 10px 30px rgba(0,0,0,0.4); --radius: 14px;
}
* { box-sizing: border-box; }
/* The hidden attribute must win over display rules like .dashboard{display:grid}
   and .scanner{display:flex}, so panels stay hidden until a check runs. */
[hidden] { display: none !important; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 700px at 70% -10%, #16255a 0%, var(--bg) 55%);
  color: var(--ink); min-height: 100vh; line-height: 1.5;
}
h1, h2, .p-title, .brand-name, .r-domain, .cta-title, .roi-num, .rstat-num, .ring-inner span {
  font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Accessibility: skip link + visible keyboard focus. */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--accent); color: #10131f; padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 12px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}

/* Outline line-icons. currentColor drives the color. */
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: inline-block; flex: none; }
.ptico { width: 20px; height: 20px; color: var(--accent); }
.p-title, .ai-head h2 { display: flex; align-items: center; gap: 9px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--line); gap: 14px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(150deg, var(--blue), var(--blue-deep)); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 23px; height: 23px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; }
.brand-name { font-weight: 700; letter-spacing: 0.3px; }
.brand-sub { font-size: 12px; color: var(--muted); }
.site-link { color: var(--accent); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.site-link:hover { text-decoration: underline; }
.site-link .ico { width: 13px; height: 13px; }
.status .ico { width: 16px; height: 16px; vertical-align: -0.18em; }

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(59,130,246,0.6), transparent 70%); filter: blur(4px); animation: pulse 3.5s ease-in-out infinite; }
.ai-orb span { border: 1px solid rgba(32,227,178,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(249,115,22,0.2); 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(--accent); 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(--blue), var(--teal), var(--accent), var(--blue)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite; }
@keyframes shimmer { to { background-position: 200% center; } }
.lede { position: relative; max-width: 700px; margin: 0 auto 30px; color: var(--muted); font-size: 16px; }
.reassure { position: relative; margin: 16px 0 0; color: var(--muted); font-size: 13px; }

/* Check 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(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }
.scan-globe { opacity: 0.7; display: flex; align-items: center; color: var(--muted); }
.scan-globe .ico { width: 18px; height: 18px; }
.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: #6b7a9e; }
#scan-btn { background: linear-gradient(150deg, var(--accent), var(--accent-dim)); color: #10131f; 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.06); }
#scan-btn:active { transform: translateY(1px); }
#scan-btn:disabled { opacity: 0.6; cursor: progress; }

/* 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), #0b1428); 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(59,130,246,0.2)); }
@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(--accent); }
.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 #33447f; 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(--blue); 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: #08111f; animation: none; }

/* Dashboard shell */
.dashboard { margin-top: 24px; display: grid; gap: 20px; }
.panel { background: linear-gradient(180deg, var(--bg-2), #0b1428); 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(--blue) calc(var(--v)*1%), #1e2a52 0); display: grid; place-items: center; }
.ring::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(32,227,178,0.3); 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(--accent); }
.r-orgtype { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--teal); margin-top: 4px; }
.r-orgtype .ico { width: 15px; height: 15px; }
.r-band { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 6px; }
.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; }

/* Capacity panel */
.roi-panel { background: linear-gradient(180deg, #17255180, #0d1830); border-color: #33447f; }
.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(--accent-dim); background: linear-gradient(180deg, #1d2a52, #16213f); }
.roi-stat.roi-hero .roi-num { font-size: 40px; }
.roi-num { display: block; font-size: 32px; font-weight: 800; background: linear-gradient(90deg, var(--teal), var(--blue)); -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, #16255a80, #0d1830); border-color: #33447f; }
.ai-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.ai-head h2 { margin: 0; font-size: 18px; }
.spark { color: var(--accent); animation: sparkle 2.2s ease-in-out infinite; display: inline-flex; }
.spark .ico { width: 18px; height: 18px; }
@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: #0d1830; border: 1px solid var(--accent-dim); color: var(--accent); 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(249,115,22,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(--accent); vertical-align: text-bottom; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Systems */
.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; }
.sys-ic { display: flex; align-items: center; color: var(--teal); }
.sys-ic .ico { width: 17px; height: 17px; }
@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(--blue); }
.signal.risk { border-left-color: var(--amber); }
.signal.responsibility { border-left-color: var(--purple); }
.sig-ic { display: flex; align-items: center; padding-top: 1px; }
.sig-ic .ico { width: 16px; height: 16px; }
.signal.strength .sig-ic { color: var(--green); }
.signal.opportunity .sig-ic { color: var(--blue); }
.signal.risk .sig-ic { color: var(--amber); }
.signal.responsibility .sig-ic { color: var(--purple); }
.sig-label { font-weight: 700; font-size: 14px; }
.sig-detail { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Free next steps */
.referral { background: linear-gradient(180deg, #16255a80, #0d1830); border-color: #33447f; }
.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 { display: flex; color: var(--accent); }
.rcard-icon .ico { width: 22px; height: 22px; }
.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 var(--line); padding-top: 8px; }
.fitbar { height: 5px; border-radius: 3px; background: #1e2a52; margin: 4px 0 10px; overflow: hidden; }
.fitbar > i { display: block; height: 100%; width: var(--fit, 0%); border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--teal)); animation: fitGrow 0.9s cubic-bezier(.2,.8,.2,1); }
@keyframes fitGrow { from { width: 0; } }
.rcard-fit { font-size: 11px; color: var(--accent); float: right; font-weight: 700; }

/* Capabilities */
.caps-panel { background: linear-gradient(180deg, #16255a80, #0d1830); border-color: #33447f; }
.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(16,185,129,0.18); color: var(--green); display: grid; place-items: center; flex: none; }
.caps li .cap-check .ico { width: 13px; height: 13px; stroke-width: 2.4; }
@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: #10131f; background: var(--accent); 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 var(--line); }
.phase-svc .fit { margin-left: auto; font-size: 11px; color: var(--accent); }
.phase-svc .ico { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* CTA */
.cta-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(150deg, #1e3a8a, #0f1c3a); border-color: var(--accent-dim); }
.cta-title { font-size: 18px; font-weight: 700; }
.cta-sub { color: #b9c6e2; font-size: 14px; margin-top: 2px; }
.cta { background: linear-gradient(150deg, var(--accent), var(--accent-dim)); color: #10131f; 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.06); }
.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; gap: 12px; flex-wrap: wrap; }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; }
.ghost .ico { width: 15px; height: 15px; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.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: #7f2d2d; background: #2a1620; color: var(--red); }

/* Partial-analysis warning: the target refused our request. */
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--amber); border-left-width: 3px; background: #2a2113; color: #f4d9a6; font-size: 13.5px; line-height: 1.55; }
.notice .ico { width: 17px; height: 17px; color: var(--amber); margin-top: 1px; }

/* FAQ */
.faq { max-width: 760px; margin: 20px auto 0; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; margin-left: 12px; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.page-foot { text-align: center; color: #7c8ab0; font-size: 12px; padding: 20px; border-top: 1px solid var(--line); line-height: 1.8; }
.page-foot a { color: var(--muted); }
.page-foot .updated { color: #93a3c9; }

@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-orgtype { justify-content: 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; }
}
