/* Brand Systems page — page-scoped components.
   Loaded AFTER styles.css. Inherits all tokens from :root there. */

/* Dark typographic hero, matching the homepage treatment rather than the
   forest .page-hero used on the other subpages. */
.bs-hero {
  background:
    radial-gradient(1000px 560px at 72% 26%, rgba(31, 79, 168, 0.30) 0%, transparent 62%),
    var(--forest-deep);
  padding-bottom: clamp(56px, 7vw, 88px);
}

.bs-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.04;
  max-width: 20ch;
}

.bs-hero p {
  color: var(--fog);
  max-width: 62ch;
}

/* .section-warm moved to styles.css — /content-engine uses it too. */

/* ---------- 02 the packet ---------- */
.packet-list {
  margin: 40px 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-dark);
}

.packet-item {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(16px, 4vw, 48px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line-dark);
}

.packet-item dt {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0;
}

.packet-item dd {
  margin: 0;
  color: var(--fog);
  font-size: 1rem;
  max-width: 62ch;
}

.packet-close {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--white);
}

/* ---------- 04 client showcase ---------- */
.bs-card {
  margin-top: clamp(32px, 5vw, 52px);
  padding: clamp(22px, 3.5vw, 34px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
}

.bs-card-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
}

.bs-card-head h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0 0 6px;
}

.bs-problem {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  max-width: 58ch;
}

.bs-chip {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 6px;
}

/* Text chips for clients without a usable icon file */
.bs-chip-gw,
.bs-chip-pending {
  display: grid;
  place-items: center;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.bs-chip-gw {
  background: #23422b;
  border-color: #23422b;
  color: #faf7f0;
}

.bs-chip-pending {
  background: transparent;
  border-style: dashed;
  color: var(--ink-soft);
}

.bs-chip-evm {
  background: #1e3a2b;
  border-color: #1e3a2b;
  color: #f7f5f0;
}

/* AI-generated media — always visibly labeled. */
.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  margin-top: 36px;
}

.ai-item {
  margin: 0;
}

.ai-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.ai-media img,
.ai-media video {
  display: block;
  width: 100%;
  height: auto;
}

/* The video is 3:4 and the still is 16:9, so at equal column width the video
   column runs ~200px taller. Cap the video so the pair reads as a set. */
.ai-media:has(video) {
  max-width: 400px;
}

/* .ai-badge moved to styles.css — the generated-media label is a site-wide
   standard shared with /content-engine, not a Brand Systems component. */

.ai-item figcaption {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.ai-note {
  align-self: center;
}

.ai-note h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 0 0 12px;
}

.ai-note p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  max-width: 52ch;
}

.ai-note p:last-child {
  margin-bottom: 0;
}

@media (max-width: 780px) {
  .ai-grid {
    grid-template-columns: 1fr;
  }
}

.bs-visual {
  margin: 0 0 20px;
}

.bs-visual img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.bs-visual figcaption {
  margin-top: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

/* Knockout marks that only exist light-on-dark: the figure supplies the dark
   ground the system requires rather than faking a positive version.
   MUST come after `.bs-visual img` — equal specificity, so source order
   decides, and the white --surface background would otherwise win and render
   a white knockout invisible. */
.bs-visual-dark img {
  background: #1e3a2b;
  border-color: #1e3a2b;
  padding: 34px 26px;
  box-sizing: border-box;
  max-width: 460px;
}

.bs-reverse {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 22px;
  background: var(--ink);
  border-radius: var(--radius);
}

.bs-reverse img {
  flex: 0 0 auto;
  width: 140px;
  height: auto;
}

.bs-reverse p {
  margin: 0;
  color: var(--fog);
  font-size: 0.94rem;
}

/* spec blocks: palette rail + type system, side by side */
.bs-specs {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 4vw, 40px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bs-spec-title {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
}

/* Palette rendered live from documented hex values — never screenshotted, so
   the swatch and the published value cannot drift apart. */
.swatch-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
}

.swatch-rail li {
  display: grid;
  gap: 4px;
}

.swatch-rail span {
  display: block;
  height: 40px;
  border-radius: 5px;
  background: var(--sw);
  border: 1px solid rgba(10, 20, 36, 0.18);
}

.swatch-rail code {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.swatch-rail em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.type-spec {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.type-spec strong {
  color: var(--ink);
}

.type-spec code {
  font-family: var(--mono);
  font-size: 0.82em;
}

.type-note {
  font-size: 0.86rem;
  color: var(--clay);
}

/* fourth card: prose only, no image slot */
.bs-card-text {
  background: transparent;
  border-style: dashed;
}

.bs-card-text p {
  color: var(--ink-soft);
  max-width: 68ch;
}

.bs-pending-note {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- 05 what it plugs into ---------- */
.plugs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}

.plugs-grid h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.plugs-grid p {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- 06 our own house ---------- */
.house-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.house-layout p {
  color: var(--fog);
}

.house-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(228, 197, 112, 0.4);
  padding-bottom: 3px;
}

.house-link:hover,
.house-link:focus-visible {
  color: var(--white);
}

.house-spec {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

/* logo-full-transparent.png is dark-ink artwork, so it needs a light ground —
   on --ink it disappears. Set it on a paper chip rather than inventing a
   reversed version that does not exist in the asset set. */
.house-spec img {
  width: 100%;
  max-width: 240px;
  height: auto;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-sizing: border-box;
}

.house-spec .type-spec {
  color: var(--fog);
}

.house-spec .type-spec strong {
  color: var(--white);
}

.house-spec .type-spec code {
  color: var(--brass-soft);
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .plugs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .packet-item,
  .bs-specs,
  .house-layout {
    grid-template-columns: 1fr;
  }

  .packet-item {
    gap: 10px;
  }

  .bs-reverse {
    flex-direction: column;
    align-items: flex-start;
  }
}
