/* Brand V2 page styles — externalized from templates/brand-v2.html (RZ-109).
   Moving CSS out of inline <style> blocks drops ~50KB of per-page HTML tax for agents. */

html, body { margin: 0; padding: 0; }
body.site-page { background: #fafafa !important; color: #0f0f0f !important; font-family: Inter, system-ui, sans-serif !important; }

main.site-brand-v2 {
  display: block !important;
  max-width: 1120px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 13rem 1.5rem 2rem !important;
  box-sizing: border-box !important;
}

main.site-brand-v2 .site-crumbs {
  font-family: "Roboto Mono", ui-monospace, monospace !important;
  font-size: 0.75rem !important; text-transform: uppercase !important; letter-spacing: 0.08em !important;
  color: #6e6e73 !important; margin: 0 0 1.25rem !important;
}
main.site-brand-v2 .site-crumbs a { color: #6e6e73 !important; text-decoration: none !important; }
main.site-brand-v2 .site-crumbs-sep { color: #e5e5e6 !important; margin: 0 0.35rem !important; }

.site-agent-ribbon {
  display: flex; align-items: center; gap: 0.6rem;
  background: #efecff; border: 1px solid #d9d3ff; color: #2b218f;
  padding: 0.6rem 1rem; border-radius: 8px;
  font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.78rem; letter-spacing: 0.02em;
  margin-bottom: 2rem;
}
.site-agent-ribbon strong { font-weight: 600; }
.site-agent-ribbon a { color: #2b218f; }

.site-brand-header { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 2.5rem; }
.site-brand-header .site-brand-logo {
  width: 84px; height: 84px; border-radius: 12px; background: #fff;
  border: 1px solid #e5e5e6; flex: 0 0 84px; object-fit: cover;
}
.site-brand-header h1 {
  font-family: Epilogue, Inter, sans-serif !important;
  font-size: 2.25rem !important; line-height: 1.1 !important; font-weight: 600 !important;
  margin: 0 0 0.4rem !important; color: #0f0f0f !important;
}
.site-brand-header .site-brand-meta {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: #6e6e73;
  margin: 0 0 0.6rem;
}
.site-brand-header .site-brand-meta a { color: #6e6e73; text-decoration: none; border-bottom: 1px dashed #c8c8cc; }
.site-brand-header .site-brand-meta a:hover { color: #5047eb; border-bottom-color: #5047eb; }
.site-brand-header .site-brand-lede {
  font-size: 1.0625rem; color: #3e3e41; line-height: 1.6; margin: 0; max-width: 70ch;
}

/* Section headings */
.site-section { background: #fff; border: 1px solid #e5e5e6; border-radius: 12px; padding: 1.75rem; margin: 0 0 2rem; }
.site-section h2 {
  font-family: Epilogue, Inter, sans-serif;
  font-size: 1.4rem; font-weight: 600; letter-spacing: 0; margin: 0 0 1.25rem; color: #0f0f0f;
}
.site-section-note { font-size: 0.9rem; color: #6e6e73; line-height: 1.5; margin: 0 0 1.5rem; }
/* Bare modifier — drops the card styling so the section flows as page content. */
.site-section-bare { background: transparent; border: none; padding: 0; margin: 0 0 1.5rem; }

/* "About this page" source sheet — compact provenance block for agents. */
.site-about {
  background: #fafafa;
  border: 1px solid #ececef;
  border-left: 3px solid #5047eb;
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0 2rem;
}
.site-about-label {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #5047eb; font-weight: 600;
  margin: 0 0 0.4rem;
}
.site-about-body {
  font-size: 0.85rem; line-height: 1.6; color: #3a3a3c;
  margin: 0;
}
.site-about-body strong { color: #0f0f0f; font-weight: 600; }
.site-about-body a { color: #5047eb; text-decoration: none; }
.site-about-body a:hover { text-decoration: underline; }

/* Small monospace kicker above the intro paragraph — anchors the section and exposes the data freshness date. */
.site-intro-kicker {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #6e6e73; margin: 0 0 0.6rem;
}

/* Agent-rich brand intro paragraph — prose TL;DR of the brand's paid social approach.
   One paragraph, scannable, cite-ready for LLMs. Folds in positioning, volume,
   cadence, and top visual formats. Sits directly under the hero. */
.site-brand-intro {
  font-size: 1.05rem; color: #2a2a2c; line-height: 1.7;
  margin: 0 0 1rem;
}
.site-intro-source {
  font-size: 0.82rem; color: #6e6e73; line-height: 1.55;
  margin: 0 0 2.25rem;
}
.site-gallery-caption {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #6e6e73; margin: -0.5rem 0 1.25rem;
}
.site-intro-source a { color: #5047eb; text-decoration: none; }
.site-intro-source a:hover { text-decoration: underline; }
.site-intro-source strong { color: #3a3a3c; font-weight: 600; }
.site-brand-intro strong { color: #0f0f0f; font-weight: 600; }
.intro-fmt {
  text-decoration: none;
  padding: 0 0.1rem;
  border-bottom: 1px dashed rgba(80,71,235,0.4);
  transition: border-color 0.12s;
  white-space: nowrap;
}
.intro-fmt:hover { border-bottom-color: #5047eb; }
.intro-fmt-unlinked { border-bottom: none; cursor: default; }
.intro-pct {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.82rem; color: #6e6e73;
  margin-left: 0.25rem; font-weight: 400;
}

/* Gallery */
.site-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.gallery-item {
  background: #fff; border: 1px solid #e5e5e6; border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column;
}
.gallery-media {
  background: #f0f0f1; aspect-ratio: 4/5; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.gallery-media img, .gallery-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.gallery-active-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: #2a7e3b; font-weight: 500;
}
.gallery-active-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2a7e3b;
  box-shadow: 0 0 0 3px rgba(42, 126, 59, 0.18);
  display: inline-block;
}
.gallery-meta-sep { color: #c8c8cc; margin: 0 0.1rem; }
.gallery-meta {
  font-family: "Roboto Mono", ui-monospace, monospace; font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: #6e6e73;
}
.gallery-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.tag-pill {
  background: #f3f3f4; color: #3e3e41;
  font-size: 0.72rem; padding: 2px 8px; border-radius: 100px; line-height: 1.5;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.tag-pill.vf { background: #efecff; color: #2b218f; }
.tag-pill.ht { background: #e7f5ea; color: #1f6f34; }
.tag-pill.ia { background: #fff2e6; color: #8a4500; }
/* Visual format pills use Motion's native glossary palette (inline style) and link to /formats/ pages. */
.tag-pill-link {
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
  transition: box-shadow 0.12s;
}
.tag-pill-link:hover { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); }
.tag-pill-arrow { font-size: 0.62rem; opacity: 0.7; }

/* AI breakdown is always visible inline — this is an agent-first page, not behind a click. */
.gallery-ai-inline {
  margin-top: 0.55rem;
}

/* Light gray scrollable markdown block — structured data for agents, compact. */
.ai-markdown {
  position: relative;
  background: #f3f3f5;
  color: #2a2a2c;
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  margin-top: 0.5rem;
  max-height: 180px;
  overflow-y: auto;
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
}
.ai-markdown::-webkit-scrollbar { width: 8px; }
.ai-markdown::-webkit-scrollbar-track { background: transparent; }
.ai-markdown::-webkit-scrollbar-thumb { background: #d0d0d4; border-radius: 4px; }
.ai-md-content {
  white-space: pre-wrap; word-break: break-word;
}
.ai-md-content .md-h { color: #5047eb; font-weight: 600; display: block; margin: 0.85rem 0 0.2rem; letter-spacing: 0.03em; }
.ai-md-content .md-h:first-child { margin-top: 0; }
.ai-md-content .md-dim { color: #8e8e93; }

/* Peer brands — lateral nav into the broader library */
.site-peer-brands h2 { font-size: 1.4rem; }
.peer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem; margin-top: 0.5rem;
}
.peer-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 0.85rem 0.95rem; background: #fafafa;
  border: 1px solid #ececef; border-radius: 10px;
  text-decoration: none; transition: border-color 0.12s, background 0.12s;
}
.peer-card:hover { border-color: #5047eb; background: #fff; }
.peer-logo {
  width: 40px; height: 40px; border-radius: 8px;
  object-fit: contain; background: #fff; padding: 4px;
  border: 1px solid #ececef;
  margin-bottom: 0.55rem;
}
.peer-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: Epilogue, Inter, sans-serif; font-weight: 700;
  color: #5047eb; font-size: 1.1rem;
}
.peer-name {
  font-family: Inter, sans-serif; font-size: 0.95rem; font-weight: 600;
  color: #0f0f0f; margin-bottom: 0.2rem;
}
.peer-category {
  font-family: "Roboto Mono", ui-monospace, monospace;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #6e6e73;
}

/* Compact upsell banner — one-line gentle Motion promo */
.site-upsell-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.5rem; margin: 2.5rem 0 1rem;
  background: #f5f4ff; border: 1px solid #dcdaf8;
  border-radius: 10px;
}
.site-upsell-copy {
  font-size: 0.95rem; color: #2b218f; line-height: 1.55;
}
.site-upsell-copy strong { color: #2b218f; font-weight: 600; }
.site-upsell-cta {
  background: #5047eb; color: #fff;
  padding: 0.55rem 1.1rem; border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.site-upsell-cta:hover { background: #2b218f; }
@media (max-width: 640px) {
  .site-upsell-banner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  main.site-brand-v2 { padding: 10rem 1rem 2rem !important; }
  .site-scorecard { grid-template-columns: 1fr; }
  .site-distributions { grid-template-columns: 1fr; }
  .site-brand-header h1 { font-size: 1.8rem !important; }
}
