/* BgAI sales surface styles.
   Scope: body.bgai-studio. Reads tokens only; no color literals.
   See docs/BRAND-ALIGNMENT.md for the closed-loop rationale.
*/

body.bgai-studio {
  font-family: var(--ui);
  background: var(--paper);
  color: var(--ink);
}

/* BeargrassAI wordmark.
   Beargrass reads in ink; AI reads in barn. Both tokens shift
   between Morning and Lamplight, so the wordmark follows mode.
*/
body.bgai-studio .bgai-wm {
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
  font-family: var(--fraunces);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.01em;
}

body.bgai-studio .bgai-wm .w-beargrass { color: var(--ink); }
body.bgai-studio .bgai-wm .w-ai {
  color: var(--barn);
  font-weight: 700;
}

body.bgai-studio main.sales-main {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 3rem var(--pad-x) 6rem;
}

body.bgai-studio .sales-hero {
  padding: 4rem 0 2rem;
}

body.bgai-studio .sales-hero .eyebrow {
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--barn);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

body.bgai-studio .sales-hero h1 {
  font-family: var(--fraunces);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  max-width: 28ch;
  margin: 0 0 1rem;
  color: var(--ink);
}

body.bgai-studio .sales-hero .deck {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 42rem;
  color: var(--ink-sec);
}

body.bgai-studio .pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

@media (max-width: 780px) {
  body.bgai-studio .pillars {
    grid-template-columns: 1fr;
  }
}

body.bgai-studio .pillar h3 {
  font-family: var(--fraunces);
  font-size: 1.375rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

body.bgai-studio .pillar .pillar-kw {
  text-transform: uppercase;
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--barn);
  font-weight: 600;
}

body.bgai-studio .pillar p {
  font-family: var(--serif);
  color: var(--ink-sec);
  line-height: 1.55;
}

body.bgai-studio .cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--barn);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--ui);
  font-weight: 600;
  border-radius: 2px;
  transition: filter 0.2s;
}

body.bgai-studio .cta:hover {
  filter: brightness(1.08);
}

body.bgai-studio .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

body.bgai-studio .bloom-promo {
  margin: 3rem 0;
  padding: 2rem;
  border: 1px solid var(--indigo);
  border-radius: 4px;
  background: var(--paper-elev);
}

body.bgai-studio .bloom-promo h2 {
  font-family: var(--fraunces);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

body.bgai-studio .pricing-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 780px) {
  body.bgai-studio .pricing-summary {
    grid-template-columns: 1fr;
  }
}

body.bgai-studio .pricing-summary .tier {
  padding: 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-elev);
}

body.bgai-studio .pricing-summary .tier h3 {
  font-family: var(--fraunces);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--indigo);
}

body.bgai-studio .pricing-summary .tier p {
  font-family: var(--serif);
  color: var(--ink-sec);
  line-height: 1.5;
}

body.bgai-studio h2 {
  font-family: var(--fraunces);
  color: var(--ink);
}

body.bgai-studio a {
  color: var(--indigo);
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}

body.bgai-studio a:hover {
  text-decoration-color: currentColor;
}

/* ----------------------------------------------------------------------
   Visual motion parity with the Almanac.
   The sales surface inherits .headline, .sheen-swell, .cover-flourish,
   .deck, .article-head, .fx-eyebrow, .sec-heading patterns so BgAI
   headlines breathe the same way Almanac essays do. Keyframes
   (sheenPan, axisSwell, pqShimmer, wmBreath) live in heritage.css
   and are globally available.
   ---------------------------------------------------------------------- */

body.bgai-studio .cover-flourish {
  max-width: var(--w-wide);
  margin: 1.5rem auto 0;
  padding: 0 var(--pad-x);
  color: var(--olive);
}
body.bgai-studio .cover-flourish svg { width: 220px; height: 58px; }

body.bgai-studio .article-head {
  max-width: var(--w-wide);
  margin: 2rem auto 1rem;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
}

body.bgai-studio .article-head .rail {
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--barn);
  font-weight: 600;
  padding: 0.35rem 0.75rem 0.35rem 0;
  border-right: 1px solid var(--rule);
  align-self: stretch;
}

body.bgai-studio .headline {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 22ch;
  color: var(--ink);
  margin: 0;
}

body.bgai-studio .headline.sheen-swell {
  font-family: var(--fraunces);
  background: linear-gradient(100deg,
    var(--ink) 0%, var(--ink) 40%,
    var(--warm) 50%,
    var(--ink) 60%, var(--ink) 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheenPan 8s ease-in-out infinite, axisSwell 12s ease-in-out infinite;
}

body.bgai-studio .deck {
  font-family: var(--fraunces);
  font-variation-settings: "opsz" 36, "wght" 400, "SOFT" 40;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 0.9rem 0 0;
  max-width: 52ch;
  color: var(--ink-sec);
}

body.bgai-studio .fx-eyebrow {
  max-width: var(--w-read);
  margin: 2.25rem auto 0.25rem;
  padding: 0 var(--pad-x);
}

body.bgai-studio .fx-eyebrow .eyebrow {
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--barn);
  font-weight: 600;
  display: block;
  margin-bottom: 0.35rem;
}

body.bgai-studio .sec-heading {
  font-family: var(--fraunces);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  max-width: 26ch;
  color: var(--ink);
}

/* Sales-surface article body (used by the-website, the-agent, etc.). */
body.bgai-studio .article-body {
  max-width: var(--w-read);
  margin: 1rem auto 0;
  padding: 0 var(--pad-x);
}

body.bgai-studio .article-body p,
body.bgai-studio .article-body li {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-sec);
}

body.bgai-studio .article-body h2 {
  font-family: var(--fraunces);
  color: var(--ink);
  margin-top: 2.5rem;
}

/* Legacy sales-hero maps onto article-head typography when used in isolation. */
body.bgai-studio .sales-hero > h1,
body.bgai-studio .sales-hero .headline {
  font-family: var(--fraunces);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 28ch;
  margin: 0 0 1rem;
}

/* ---------------------------------------------------------------------
   Bloom Test result styling. Scoped to body.bgai-studio. Reads tokens
   only. Added 2026-04-22 as a Step 10 follow-up when the Worker wired.
   --------------------------------------------------------------------- */

body.bgai-studio .bloom-results:empty { display: none; }

body.bgai-studio .bloom-result {
  max-width: var(--w-read);
  margin: 2rem auto;
  padding: 1.5rem var(--pad-x);
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-elev);
}
body.bgai-studio .bloom-result--error { border-color: var(--barn); }

body.bgai-studio .bloom-result__head { margin-bottom: 1rem; }
body.bgai-studio .bloom-result__eyebrow {
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-ter);
}
body.bgai-studio .bloom-result__band {
  font-family: var(--fraunces);
  font-size: 1.75rem;
  margin: 0.25rem 0 0.5rem;
  color: var(--ink);
}
body.bgai-studio .bloom-result__score {
  font-family: var(--ui);
  font-size: 0.9375rem;
  color: var(--ink-sec);
  margin: 0;
}

body.bgai-studio .bloom-result--bloom .bloom-result__band { color: var(--olive); }
body.bgai-studio .bloom-result--bud   .bloom-result__band { color: var(--indigo); }
body.bgai-studio .bloom-result--stem  .bloom-result__band { color: var(--warm); }
body.bgai-studio .bloom-result--seed  .bloom-result__band { color: var(--barn); }

body.bgai-studio .bloom-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}
body.bgai-studio .bloom-check {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  grid-template-areas:
    "marker label"
    "marker detail";
  gap: 0.15rem 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
}
body.bgai-studio .bloom-check__marker {
  grid-area: marker;
  font-family: var(--ui);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  align-self: start;
}
body.bgai-studio .bloom-check__label { grid-area: label; font-weight: 600; color: var(--ink); }
body.bgai-studio .bloom-check__detail { grid-area: detail; color: var(--ink-sec); font-size: 0.9375rem; }
body.bgai-studio .bloom-check--ok   .bloom-check__marker { color: var(--olive); }
body.bgai-studio .bloom-check--miss .bloom-check__marker { color: var(--barn); }

body.bgai-studio .bloom-result__foot {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 0.9375rem;
  color: var(--ink-sec);
}
