.cbb-factory {
  --factory-ink: #142e29;
  --factory-muted: #415f55;
  --factory-line: #d7e1db;
  --factory-paper: #f6f5ef;
  color: var(--factory-ink);
  width: 100%;
  max-width: 100%;
  padding: clamp(2.85rem, 6vw, 6rem) 0;
}
.cbb-factory--home, .cbb-factory--contact { background: var(--factory-paper); }
.cbb-factory--contact {
  padding: clamp(2.25rem, 4vw, 3.75rem) 0;
  border-top: 1px solid var(--factory-line);
}
.cbb-factory > .cbb-factory__inner {
  width: min(1280px, calc(100% - 2.5rem));
  margin-inline: auto;
}
.cbb-factory__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .68fr);
  align-items: end;
  column-gap: clamp(1.35rem, 6vw, 6rem);
  row-gap: .85rem;
  margin-block-end: clamp(1.25rem, 2.8vw, 2.25rem);
}
.cbb-factory__intro h2 {
  margin: 0;
  color: var(--factory-ink);
  font-size: clamp(1.9rem, 3.25vw, 3.55rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.048em;
  text-wrap: balance;
}
.cbb-factory__intro p {
  color: var(--factory-muted);
  margin: 0;
  font-size: clamp(.96rem, 1.35vw, 1.125rem);
  line-height: 1.57;
}
.cbb-factory__intro .cbb-factory__place {
  margin: 0 0 .58rem;
  color: #31584d;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.cbb-factory__intro a, .cbb-factory__example-copy a {
  display: inline-block;
  margin-block-start: .62rem;
  color: #194e3d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .23em;
}
.cbb-factory__intro a:hover, .cbb-factory__example-copy a:hover { color: #12362c; }
.cbb-factory__photos, .cbb-factory__steps, .cbb-factory__examples {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .95rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.cbb-factory__photos > li, .cbb-factory__steps > li { min-width: 0; }
.cbb-factory__photos figure, .cbb-factory__steps figure { margin: 0; }
.cbb-factory__photo-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: .65rem;
  background: #dce6e1;
}
.cbb-factory__photo-link img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: var(--factory-crop, 50% 50%);
  transition: transform 220ms ease;
}
.cbb-factory__photo-link::after {
  content: '↗';
  position: absolute;
  inset: auto .48rem .48rem auto;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  color: #153831;
  background: #fffffff0;
  font: 700 .9rem / 1 system-ui, sans-serif;
}
.cbb-factory__photo-link:focus-visible, .cbb-factory__close:focus-visible {
  outline: 3px solid #14684e;
  outline-offset: 3px;
}
@media (hover: hover) {
  .cbb-factory__photo-link:hover img { transform: scale(1.035); }
}
.cbb-factory__photos figcaption {
  color: var(--factory-ink);
  margin: .55rem 0 .1rem;
  font-size: clamp(.79rem, 1vw, .94rem);
  font-weight: 680;
  line-height: 1.36;
}
.cbb-factory--contact .cbb-factory__intro h2 { font-size: clamp(1.65rem, 2.6vw, 2.65rem); }
.cbb-factory--contact .cbb-factory__photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cbb-factory--contact .cbb-factory__photo-link { aspect-ratio: 16 / 10; }
.cbb-factory-hero-photo { position: relative; }
.cbb-factory-hero-photo img { object-position: 50% 52%; }
.cbb-factory-hero-photo figcaption {
  position: absolute;
  inset: auto auto .85rem .85rem;
  color: #fff;
  background: #0c2c24ec;
  padding: .42rem .68rem;
  font-size: .76rem;
  font-weight: 650;
  line-height: 1.25;
  border-radius: .3rem;
}
.cbbg.gx-page .cbb-factory--about { --gx-section: #edf4ef; }
.cbbg.gx-page .cbb-factory--examples { --gx-section: #faf8f3; }
.cbbg.gx-page .cbb-factory > .g-inner.cbb-factory__inner {
  width: min(1120px, calc(100% - 2.5rem));
  display: block;
}
.cbbg.gx-page .cbb-factory .cbb-factory__intro h2 {
  margin: 0;
  max-width: 16ch;
}
.cbbg.gx-page .cbb-factory .cbb-factory__intro p { margin: 0; }
.cbbg.gx-page .cbb-factory .cbb-factory__intro .cbb-factory__place { margin-bottom: .64rem; }
.cbb-factory__steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  counter-reset: factory-step;
}
.cbb-factory__steps > li {
  counter-increment: factory-step;
  border-top: 2px solid #49927a;
  padding-top: .74rem;
}
.cbb-factory__steps h3 {
  margin: .82rem 0 .35rem;
  font-size: clamp(1rem, 1.36vw, 1.23rem);
  color: var(--factory-ink);
  font-weight: 740;
  line-height: 1.27;
}
.cbb-factory__steps h3::before {
  content: counter(factory-step, decimal-leading-zero) ' ';
  color: #366956;
  font-size: .78em;
  margin-inline-end: .25em;
  font-variant-numeric: tabular-nums;
}
.cbb-factory__steps p, .cbb-factory__example-copy p {
  margin: 0;
  max-width: 55ch;
  color: var(--factory-muted);
  font-size: .92rem;
  line-height: 1.55;
}
.cbb-factory__examples { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.2rem; }
.cbb-factory__example {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--factory-line);
  border-radius: .85rem;
  background: #fff;
}
.cbb-factory__example .cbb-factory__photo-link { aspect-ratio: 16 / 8.25; border-radius: 0; }
.cbb-factory__example-copy { padding: 1rem 1.15rem 1.2rem; }
.cbb-factory__example-copy h3 { font-size: clamp(1.15rem,1.64vw,1.65rem); margin: 0 0 .42rem; line-height: 1.2; color: var(--factory-ink); }
.cbbg.gx-page .cbb-factory-figure img { object-position: var(--factory-crop,50% 50%); }
.cbbg.gx-page .cbb-factory-figure figcaption { color: #35554a; }
.cbbg.gx-page .cbb-factory-figure--supplement { max-width: 36rem; margin-block-start: .9rem; }
.cbb-factory-dialog {
  width: min(100% - 2rem, 74rem);
  max-width: none;
  max-height: calc(100% - 2rem);
  margin: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  overflow: auto;
}
.cbb-factory-dialog::backdrop { background: #10251fee; }
.cbb-factory-dialog section {
  position: relative;
  margin: 0;
  padding: .65rem;
  border-radius: .8rem;
  background: #142e29;
}
.cbb-factory-dialog img {
  display: block;
  max-width: 100%;
  max-height: min(72vh,780px);
  max-height: min(72dvh,780px);
  width: auto;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: .45rem;
}
.cbb-factory-dialog p { margin: .65rem .5rem .3rem; color: #fff; font-size: .93rem; line-height: 1.4; }
.cbb-factory__close {
  position: absolute;
  inset: .9rem .9rem auto auto;
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0;
  border: 0;
  border-radius: 100%;
  background: #fff;
  color: #12332b;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 950px) {
  .cbb-factory--home .cbb-factory__photos { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .cbb-factory > .cbb-factory__inner, .cbbg.gx-page .cbb-factory > .g-inner.cbb-factory__inner { width: calc(100% - 2rem); }
  .cbb-factory__intro { grid-template-columns: minmax(0,1fr); }
  .cbb-factory--home .cbb-factory__photos, .cbb-factory--contact .cbb-factory__photos, .cbb-factory__steps { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
  .cbb-factory__examples { grid-template-columns: minmax(0,1fr); }
  .cbb-factory-hero-photo figcaption { inset: auto auto .57rem .57rem; font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .cbb-factory__photo-link img { transition: none; }
  .cbb-factory__photo-link:hover img { transform: none; }
}

.cbbg.gx-page .cbb-factory__steps > li { list-style: none; }
.cbbg.gx-page .cbb-factory__steps > li::marker { content: ""; }

@media (max-width: 1279px) {
  .template-contacts .cbb-contact-page f-contact > .f-row { flex-flow: column nowrap; }
  .template-contacts .cbb-contact-page .f-contact-form__main { order: -1; }
}
@media (max-width: 950px) {
  .cbbg.gx-page .cbb-factory__intro { grid-template-columns: minmax(0,1fr); }
  .cbbg.gx-page .cbb-factory__intro h2 { max-width: 26ch; }
  .cbbg.gx-page .cbb-factory__intro p { max-width: 55ch; }
  .cbbg.gx-page .cbb-factory__steps {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 1.4rem .95rem;
  }
}
