/* ============================================================
   AI at Qvantum — main stylesheet
   v2: Restyled to match the Qvantum NPI/CPI dashboard design.
   Brand palette per branding.qvantum.com (confirmed 2026-05-26).
   AUTHORITATIVE values:
     Off-black #232222 · Off-white #F2F2F2 · Brown #91877A
     Beige ≈ #EAE2D6 · Navy #00215C · White #FFFFFF
   Brand rule: brown is the dominant chrome, beige carries secondary
   surfaces, navy is reserved as accent.
   ============================================================ */

/*
   To enable Host Grotesk: drop the .ttf files into ../assets/fonts/
   and uncomment the @font-face block below + change --font-family.

@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/HostGrotesk-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/HostGrotesk-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/HostGrotesk-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Host Grotesk";
  src: url("../assets/fonts/HostGrotesk-SemiBoldItalic.ttf") format("truetype");
  font-weight: 600; font-style: italic; font-display: swap;
}
*/

/* ---------- Brand tokens (Qvantum palette, shared with the dashboard) ---------- */
:root {
  --q-brown:     #91877A;
  --q-brown-dk:  #6F665B;
  --q-brown-lt:  #B0A899;
  --q-offblack:  #232222;
  --q-offwhite:  #F2F2F2;
  --q-beige:     #EAE2D6;
  --q-beige-lt:  #F5EFE3;
  --q-navy:      #00215C;
  --q-white:     #FFFFFF;

  --q-success:   #4A7A4A;
  --q-warning:   #C18A2C;
  --q-danger:    #B23030;

  /* Legacy token names kept so existing pages restyle without HTML edits */
  --primary: var(--q-brown);
  --primary-text: var(--q-white);
  --accent: var(--q-navy);
  --surface: var(--q-white);
  --surface-alt: var(--q-beige-lt);
  --surface-warm: var(--q-beige);
  --surface-cool: var(--q-beige-lt);
  --text: var(--q-offblack);
  --text-muted: var(--q-brown-dk);
  --text-faint: var(--q-brown);
  --border: var(--q-beige);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max-width: 1100px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(35,34,34,0.06);
  --shadow-hi: 0 6px 18px rgba(35,34,34,0.10);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: .35em; }

/* ---------- Top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--q-beige);
  background: var(--q-beige-lt);
  padding: 12px 24px;
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--q-brown-dk);
}
.brand a { color: inherit; }
.topnav {
  margin-left: auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.topnav a {
  color: var(--q-brown-dk);
  font-size: 0.95rem;
}
.topnav a:hover { color: var(--accent); }

/* ---------- Layout helpers ---------- */
.band {
  padding: 48px 24px;
}
.band-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.band-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--q-brown-dk);
  margin-bottom: 8px;
  font-weight: 700;
}

/* ---------- Band 1 · Hero ---------- */
.hero {
  position: relative;
  background: var(--q-brown);
  color: var(--primary-text);
  padding: 80px 24px;
  text-align: center;
  border-bottom: 6px solid var(--q-navy);
}
.hero::before {
  content: "QVANTUM";
  position: absolute;
  top: 10px;
  right: 24px;
  font-size: 11px;
  letter-spacing: 0.4em;
  font-weight: 700;
  color: var(--q-beige);
  opacity: 0.7;
}
.hero h1 {
  font-size: 2.6rem;
  margin-bottom: .2em;
  letter-spacing: -0.01em;
}
.hero .subtitle {
  font-size: 1.15rem;
  color: var(--q-beige);
  opacity: .95;
  margin-bottom: 1.6em;
}
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid var(--q-navy);
  background: var(--q-navy);
  color: #fff;
  transition: all 0.12s;
}
.btn:hover { text-decoration: none; opacity: .88; }
.btn-inverse {
  background: var(--q-white);
  border-color: var(--q-white);
  color: var(--q-offblack);
}
.btn-inverse:hover {
  opacity: 1;
  background: var(--q-beige-lt);
  border-color: var(--q-beige-lt);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover {
  opacity: 1;
  background: var(--q-navy);
  color: #fff;
}

/* ---------- Band 2 · Quick Start tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--q-beige);
  border-left: 4px solid var(--q-brown);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: box-shadow .15s, transform .15s;
  display: block;
  color: var(--text);
}
.tile:hover {
  box-shadow: var(--shadow-hi);
  transform: translateY(-1px);
  text-decoration: none;
}
.tile-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.tile-title { font-weight: 600; margin-bottom: 4px; }
.tile-sub { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Band 3 · Featured use cases ---------- */
.featured {
  background: var(--q-beige-lt);
  border-top: 1px solid var(--q-beige);
  border-bottom: 1px solid var(--q-beige);
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--q-beige);
  border-left: 4px solid var(--q-navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: block;
  color: var(--text);
  transition: box-shadow .15s;
}
.card:hover { box-shadow: var(--shadow-hi); text-decoration: none; }
.card-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--q-brown-dk);
  font-weight: 700;
  margin-bottom: 6px;
}
.card-title { font-weight: 600; margin-bottom: 6px; }
.card-status {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.card.coming-soon { opacity: 0.7; border-left-color: var(--q-brown-lt); }

/* ---------- Band 4 · For managers ---------- */
.managers {
  background: var(--q-beige);
  border-top: 1px solid var(--q-brown-lt);
  border-bottom: 1px solid var(--q-brown-lt);
}
.managers h2 { margin-bottom: 8px; }
.managers .lede {
  max-width: 720px;
  font-size: 1.05rem;
}
.managers .actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ---------- Band 5 · Tutorials row ---------- */
.tutorials-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tutorial-chip {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--q-brown-lt);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.12s;
}
.tutorial-chip:hover {
  background: var(--q-beige-lt);
  text-decoration: none;
}
.tutorial-chip[aria-disabled="true"] { opacity: 0.6; font-weight: 400; }
.tutorial-chip .status {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 4px;
}

/* ---------- Band 6 · Community ---------- */
.community {
  background: var(--q-beige-lt);
}
.community-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* ---------- Sub-page bits ---------- */
.page-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}
.meta-strip {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--q-brown-dk);
  margin-bottom: 12px;
  font-weight: 700;
}
.byline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5em;
}
.callout {
  background: var(--q-beige-lt);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin: 1.5em 0;
}
.callout.warm {
  background: var(--q-beige);
  border-left-color: var(--q-warning);
}
.step {
  padding: 24px 0;
  border-bottom: 1px solid var(--q-beige);
}
.step:last-child { border-bottom: none; }
.step-title { font-weight: 600; margin-bottom: 8px; }
.step img {
  margin: 12px 0 6px;
  border: 1px solid var(--q-beige);
  border-radius: 6px;
}
.caption {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0;
}

/* Tutorial / use-case prompt blocks */
.prompt-block {
  background: var(--q-offblack);
  color: var(--q-offwhite);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 14px 16px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  position: relative;
  margin: 1em 0;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(255,255,255,0.15); }
.copy-btn.copied { background: var(--q-success); border-color: var(--q-success); }

/* People list (ambassadors) */
.people {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 1.5em;
}
.person {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.person-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--q-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--q-brown-dk);
  flex-shrink: 0;
}

/* Placeholder markers — deliberately loud, not brand-styled */
.fill {
  background: #fff3a8;
  color: #5a4500;
  padding: 1px 6px;
  border-radius: 3px;
  font-style: italic;
  font-size: 0.95em;
  border: 1px dashed #d4a900;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--q-beige);
  background: var(--q-beige-lt);
  padding: 24px;
  text-align: center;
  color: var(--q-brown-dk);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .tiles, .cards, .tutorials-row, .community-cols, .people {
    grid-template-columns: 1fr;
  }
  .hero { padding: 56px 20px; }
  .hero h1 { font-size: 2rem; }
  .band { padding: 36px 20px; }
  .topbar-inner { flex-wrap: wrap; }
  .topnav { width: 100%; }
}
