/* Horse AI™ — shared styles for the Mr. Horse reuse pages
   (/characters/, /characters/<slug>/, /license/).

   Mirrors the design tokens and core components defined inline in index.html so
   these standalone static pages match the SPA without modifying it. The one new
   signature element is .legal-card — the deliberately plain, high-contrast
   "the joke stops here" container that breaks the site's maximalist voice. */

:root {
  --bg: #070a12;
  --bg-2: #0c111c;
  --panel: rgba(255,255,255,0.025);
  --panel-border: rgba(255,255,255,0.07);
  --text: #eef1f7;
  --muted: #7e8699;
  --violet: #5b7cfa;
  --cyan: #4fb3e0;
  --grad: linear-gradient(110deg, #5b7cfa 0%, #4f93e0 55%, #5fc7d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(91,124,250,0.10), rgba(79,179,224,0.06));
  --radius: 14px;
  --maxw: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1100px 760px at 82% -12%, rgba(91,124,250,0.12), transparent 62%),
              radial-gradient(900px 700px at -5% 6%, rgba(79,147,224,0.06), transparent 58%),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .4em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
p { color: var(--muted); margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
section { padding: 56px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: .72rem; color: var(--cyan); font-weight: 800; margin-bottom: 14px; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid var(--panel-border);
  font-size: .8rem; font-weight: 600; color: #cdd2f5; letter-spacing: .02em;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #4fb3e0; box-shadow: 0 0 12px #4fb3e0; }

/* ---------- NAV (static replica of the SPA header) ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7,10,18,0.6);
  border-bottom: 1px solid var(--panel-border);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; letter-spacing: -0.03em; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 16px; box-shadow: 0 4px 20px rgba(91,124,250,.5); }
.logo sup { font-size: .55em; color: var(--cyan); font-weight: 700; }
nav.links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.links a { padding: 9px 14px; border-radius: 10px; font-size: .92rem; font-weight: 600; color: #b9bee0; transition: .18s; }
nav.links a:hover { background: var(--panel); color: #fff; }
nav.links a.active { color: #fff; background: var(--grad-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none;
  padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: .95rem; font-family: inherit;
  background: var(--grad); color: #06070f; transition: .2s; box-shadow: 0 8px 30px rgba(91,124,250,.35);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(91,124,250,.5); }
.btn.ghost { background: var(--panel); color: #fff; border: 1px solid var(--panel-border); box-shadow: none; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }

/* ---------- CARDS / GRID ---------- */
.grid { display: grid; gap: 22px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 26px; transition: .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(91,124,250,.5); background: rgba(91,124,250,.06); }
.card h3 { font-size: 1.15rem; }
.card p { font-size: .94rem; margin: 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin: 0 auto 44px; text-align: center; }

/* ---------- CHARACTER CARD ---------- */
.char-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.char-card .thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-2); }
.char-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; display: block; }
.char-card .body { padding: 20px 22px; }
.char-card h3 { margin-bottom: 6px; }

/* ---------- "HOW REUSE WORKS" STRIP ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps .step { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 22px; }
.steps .step .n { font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
.steps .step h4 { margin: 8px 0 6px; font-size: 1.05rem; }
.steps .step p { font-size: .9rem; margin: 0; }

/* ---------- THE "JOKE STOPS HERE" LEGAL CARD ---------- */
/* Deliberately plain + high-contrast: white card, dark text, no gradient.
   The contrast against the site's maximalist dark voice IS the design. */
.legal-card {
  background: #f6f7fb; color: #11151f; border: 1px solid #d7dbe6;
  border-radius: var(--radius); padding: 30px 32px; box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.legal-card * { color: inherit; }
.legal-card h2, .legal-card h3 { color: #0a0d15; }
.legal-card p { color: #2a3040; }
.legal-card a { color: #2b49c8; text-decoration: underline; }
.legal-card strong { color: #0a0d15; }
.legal-card .tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #5a6273; margin-bottom: 14px; }
.legal-card hr { border: none; border-top: 1px solid #d7dbe6; margin: 20px 0; }
.legal-card.tldr { background: #fff; border-color: #c7ccdb; }
.legal-card.tldr p { font-size: 1.08rem; }

/* CC badge — text fallback styled with site tokens; works with or without the png */
.cc-badge { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; }
.cc-badge img { display: block; height: 31px; width: 88px; border-radius: 3px; }
.cc-badge .txt { font-size: .8rem; font-weight: 800; letter-spacing: .04em; padding: 5px 10px; border-radius: 8px; border: 1px solid #c7ccdb; color: #11151f; background: #fff; }

/* ---------- PROVENANCE / DOWNLOADS ---------- */
.provenance { font-size: .9rem; color: var(--muted); border-left: 3px solid; border-image: var(--grad) 1; padding-left: 16px; margin: 8px 0 4px; }
.todo { color: #ffb454; font-weight: 700; }
.dl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dl-list li { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: .92rem; }
.dl-list .ext { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- CHARACTER PAGE LAYOUT ---------- */
.char-hero { display: grid; grid-template-columns: .85fr 1.15fr; gap: 44px; align-items: start; }
.char-hero img.portrait { width: 100%; border-radius: 20px; border: 1px solid var(--panel-border); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.pullquote { font-size: 1.15rem; font-weight: 700; color: var(--text); border-left: 4px solid; border-image: var(--grad) 1; padding-left: 20px; margin: 26px 0; }

/* ---------- FOOTER ---------- */
footer { border-top: 1px solid var(--panel-border); padding: 48px 0 40px; margin-top: 48px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
footer h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 14px; }
footer a { display: block; color: #b9bee0; font-size: .9rem; padding: 4px 0; }
footer a:hover { color: #fff; }
.foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--panel-border); font-size: .8rem; color: #6b6f92; }

@media (max-width: 900px) {
  .char-hero { grid-template-columns: 1fr; }
  .g3, .g2, .steps, .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .g3, .g2, .steps, .foot-grid { grid-template-columns: 1fr; }
  nav.links { display: none; }
}
