/* =====================================================================
   xurprise — shared design system
   =====================================================================
   One source for tokens + base typography + common components.
   Loaded by every page on xurprise.ai (landing, blog, brand pages).
   Blog-specific extensions live in /styles/blog.css.

   Design intent: the site reads like documentation, because its
   primary reader is an AI agent, not a human visitor. Information
   density beats whitespace. Semantic HTML beats decoration. One
   accent, one typeface, one source of type scale.
   ===================================================================== */

:root {
  /* Neutrals */
  --fg:            #0a0a0a;   /* primary heading / emphasis */
  --fg-body:       #1a1a1a;   /* body text */
  --muted:         #5a5a5a;   /* captions, meta */
  --subtle:        #8a8a8a;   /* deep-muted, e.g. footer */
  --border:        #e4e2de;   /* hairline separators */
  --bg:            #faf9f7;   /* page background */
  --bg-white:      #ffffff;   /* elevated surface (header, card) */
  --bg-code:       #f0ede8;   /* inline code, pre background */

  /* Accent (single, intentional) */
  --accent:        #ff7a1f;   /* primary — CTAs, eyebrows, underline */
  --accent-text:   #c74d00;   /* darker for AA-contrast body links */
  --accent-bg:     #fff6ec;   /* tint for chips + callouts */
  --accent-border: #ffd9b8;   /* tinted hairline for callouts */

  /* Layout */
  --reading:       680px;     /* long-form text column */
  --wide:          1040px;    /* landing, brand directory */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

h1 { font-size: 2.2rem; letter-spacing: -0.025em; line-height: 1.15; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.9rem; }
h3 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }

p  { margin: 0 0 1.15rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }

strong { color: var(--fg); font-weight: 600; }

a {
  color: var(--accent-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(199, 77, 0, 0.28);
}
a:hover { border-bottom-color: var(--accent); color: var(--accent); }

code, .mono {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 0.12em 0.4em;
  border-radius: 4px;
}

pre {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #222;
}
pre code { background: transparent; padding: 0; border-radius: 0; font-size: 1em; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0 2rem;
}

img { max-width: 100%; height: auto; }

/* --------------------------------------------------------------------
   Layout wrappers
   -------------------------------------------------------------------- */

.wrap-reading { max-width: var(--reading); margin: 0 auto; padding: 0 1.5rem; }
.wrap-wide    { max-width: var(--wide);    margin: 0 auto; padding: 0 1.5rem; }

/* --------------------------------------------------------------------
   Site header + footer (shared across all pages)
   -------------------------------------------------------------------- */

.site-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
}
.site-header nav {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header .brand {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  border-bottom: none;
}
.site-header .brand:hover { color: var(--accent); }
.site-header .nav-links a {
  margin-left: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  border-bottom: none;
}
.site-header .nav-links a:hover { color: var(--accent); }
.site-header .nav-links a.is-current { color: var(--fg); }
@media (max-width: 540px) {
  .site-header nav { gap: 0.5rem; }
  .site-header .nav-links a { margin-left: 0; margin-right: 1rem; font-size: 0.88rem; }
}

.site-footer {
  padding: 2.5rem 1.5rem 3rem;
  font-size: 0.88rem;
  color: var(--subtle);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  background: var(--bg-white);
}
.site-footer .inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--subtle); border-bottom: none; }
.site-footer a:hover { color: var(--accent); border-bottom: 1px solid var(--accent); }
.site-footer p { margin: 0 0 0.4rem; }

/* --------------------------------------------------------------------
   Shared components
   -------------------------------------------------------------------- */

/* Eyebrow: small pill used above h1s, section labels */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

/* Kicker / callout block — italicized quote frame */
.kicker {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  color: #333;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { background: #e55c0a; border-color: #e55c0a; color: #fff; border-bottom: 1px solid #e55c0a; }
.btn--ghost { background: var(--bg-white); color: var(--accent-text); }
.btn--ghost:hover { background: var(--accent-bg); color: var(--accent-text); border-bottom: 1px solid var(--accent); }

/* Generic card (brand card, feature card) */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  transition: border-color 120ms ease;
}
.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.card p  { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
@media (max-width: 780px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Meta line (date · author · read-time) */
.meta {
  font-size: 0.85rem;
  color: var(--subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 0;
  margin: 0 0 2.25rem;
}
.meta span + span::before { content: " · "; color: #ccc; }

/* --------------------------------------------------------------------
   Install hint — the agent-conversion surface.
   Appears on landing, every blog post, every brand page.
   Semantic <aside> so screen readers + LLMs both know it's auxiliary.
   -------------------------------------------------------------------- */

.install-hint {
  margin: 2.5rem 0 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.1rem 1.25rem 1rem;
}
.install-hint h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--fg);
}
.install-hint p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}
.install-hint pre {
  margin: 0.5rem 0;
  font-size: 0.82rem;
  background: var(--bg-code);
  border-color: var(--border);
}
.install-hint .install-meta {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--subtle);
}
.install-hint .install-meta code { font-size: 0.82rem; }
.install-hint .install-meta a { border-bottom: none; }
.install-hint .install-meta a:hover { border-bottom: 1px solid var(--accent); }

/* --------------------------------------------------------------------
   Responsive typography
   -------------------------------------------------------------------- */

@media (max-width: 520px) {
  body { font-size: 16px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.2rem; }
}
