.hero {
  min-height: 520px;
  background: #fff;
}
.hero-grid {
  min-height: 520px;
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  align-items: center;
  gap: 45px;
}
.hero-copy h1 {
  font-size: var(--own-site-hero-title-font-size);
  line-height: var(--own-site-hero-title-line-height);
  font-weight: var(--own-site-hero-title-font-weight);
  letter-spacing: var(--own-site-hero-title-letter-spacing);
}
.hero-copy > p:not(.eyebrow) {
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.52;
}
.hero-copy .button {
  margin-top: 28px;
}
.hero-spread {
  width: 760px;
  height: 450px;
  justify-self: end;
}
.hero-spread img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery {
  padding: 34px 0 42px;
  background: #fff;
}
h2 {
  font-size: var(--own-site-section-title-font-size);
  line-height: var(--own-site-section-title-line-height);
  font-weight: var(--own-site-section-title-font-weight);
  letter-spacing: var(--own-site-section-title-letter-spacing);
}
.filters {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filters button {
  min-height: 36px;
  padding: 7px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #30352f;
  background: #fff;
  cursor: pointer;
}
.filters button.active {
  color: var(--forest);
  border-color: var(--forest);
  background: #f3f8f5;
}
.gallery-result-status {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}
.gallery-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 390px);
  justify-content: space-between;
  gap: 0;
}
.direction-card[hidden] {
  display: none;
}
.preview {
  width: 390px;
  height: 470px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #aeb3ad;
}
.preview img {
  width: 390px;
  height: 470px;
  object-fit: cover;
  object-position: top;
}
.direction-card h3 {
  margin-top: 15px;
  font-size: var(--own-site-card-title-font-size);
  line-height: var(--own-site-card-title-line-height);
  font-weight: var(--own-site-card-title-font-weight);
  letter-spacing: var(--own-site-card-title-letter-spacing);
}
.direction-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.direction-card .category {
  color: #20251f;
}
.direction-card a {
  margin-top: 13px;
  display: inline-flex;
  gap: 8px;
  color: var(--blue);
  font-size: 14px;
}

.comparison {
  height: auto;
  min-height: 450px;
  padding: 27px 0 30px;
  background: #fff;
}
.comparison-table {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.comparison-table > div {
  min-height: 52px;
  display: grid;
  grid-template-columns: 180px repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.comparison-table > div:last-child {
  border-bottom: 0;
}
.comparison-table b,
.comparison-table span {
  padding: 13px 18px;
  border-right: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.4;
}
.comparison-table span:last-child {
  border-right: 0;
}
.comparison-head {
  background: #f4f5f3;
}
.emphasis-row {
  min-height: 102px !important;
}
.emphasis-row > span {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 10px;
}
.emphasis-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.emphasis-row img {
  width: 190px;
  height: 64px;
  object-fit: cover;
}
.character-row > span {
  display: flex;
  align-items: center;
  gap: 16px;
}

.multipage {
  min-height: 400px;
  height: auto;
  padding: 34px 0 40px;
  background: #fff;
}
.multipage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  gap: 42px;
}
.page-previews {
  display: grid;
  grid-template-columns: repeat(4, 224px);
  justify-content: space-between;
  gap: 0;
}
.page-previews figure {
  width: 224px;
  min-width: 0;
}
.page-previews img {
  width: 224px;
  height: 270px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px #aeb3ad;
}
.page-previews figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
}
.multipage-copy p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.decisions {
  height: 330px;
  padding: 15px 0;
  background: #fff;
}
.decision-layout {
  width: 1260px;
  height: 300px;
  display: grid;
  grid-template-columns: 240px 1020px;
  align-items: center;
}
.decision-copy {
  width: 235px;
  align-self: start;
  padding-top: 28px;
}
.decision-copy h2 {
  font-size: var(--own-site-section-title-font-size);
  line-height: var(--own-site-section-title-line-height);
  font-weight: var(--own-site-section-title-font-weight);
  letter-spacing: var(--own-site-section-title-letter-spacing);
}

.boundary {
  min-height: 430px;
  height: auto;
  padding: 30px 0 36px;
  background: #fff;
}
.boundary-eyebrow {
  width: 1180px;
  margin-inline: auto;
}
.boundary > .rail > h2 {
  width: 1180px;
  margin-inline: auto;
}
.boundary-flow {
  width: 1180px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: 480px 44px 1fr;
  align-items: center;
}
.boundary-flow article {
  min-height: 210px;
  padding: 24px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}
.boundary-flow article.complete {
  background: #f4f8f5;
}
.boundary-icon {
  align-self: start;
}
.boundary-flow h3 {
  font-size: var(--own-site-small-title-font-size);
  line-height: var(--own-site-small-title-line-height);
  font-weight: var(--own-site-small-title-font-weight);
  letter-spacing: var(--own-site-small-title-letter-spacing);
}
.boundary-flow p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.flow-arrow {
  text-align: center;
  font-size: 28px;
}
.boundary-previews {
  grid-column: 1/-1;
  height: 102px;
  object-fit: contain;
  object-position: center;
  justify-self: center;
  border-radius: 4px;
}
.direction-previews {
  width: 410px;
}
.complete-previews {
  width: 550px;
}

.demo {
  height: 240px;
  padding: 18px 0;
  background: #f7f8f6;
}
.demo-band {
  height: 204px;
  position: relative;
  display: grid;
  grid-template-columns: 440px 1fr;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f2ef url("../images/concepts/cta-portfolio-1308x204.png")
    center/1308px 204px no-repeat;
}
.demo-copy {
  z-index: 2;
  padding-left: 28px;
}
.demo-copy h2 {
  font-size: var(--own-site-section-title-font-size);
  line-height: var(--own-site-section-title-line-height);
  font-weight: var(--own-site-section-title-font-weight);
  letter-spacing: var(--own-site-section-title-letter-spacing);
}
.demo-copy p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}
.demo-copy .button {
  height: 44px;
  min-width: 160px;
  margin-top: 15px;
}

/* Body section intros share one readable centered measure. Page hero, closing
 * CTA and component-level copy deliberately keep their own compositions. */
.gallery > .rail > .eyebrow,
.comparison > .rail > .eyebrow,
.boundary > .rail > .eyebrow {
  width: min(950px, 100%);
  margin-inline: auto;
  justify-content: center;
}
.gallery > .rail > h2,
.comparison > .rail > h2,
.boundary > .rail > h2 {
  width: min(950px, 100%);
  margin-inline: auto;
  text-align: center;
}
.multipage-grid {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}
.multipage-copy {
  grid-row: 1;
  width: min(950px, 100%);
  margin-inline: auto;
  text-align: center;
}
.multipage-copy .eyebrow {
  margin-top: 0;
  justify-content: center;
}
.page-previews {
  grid-row: 2;
  width: min(1016px, 100%);
  margin-inline: auto;
}
.decisions {
  height: auto;
  padding: 30px 0;
}
.decision-layout {
  height: auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}
.decision-copy {
  width: min(950px, 100%);
  margin-inline: auto;
  align-self: auto;
  padding-top: 0;
  text-align: center;
}
.decision-copy .eyebrow {
  justify-content: center;
}
.decision-layout > picture > img {
  justify-self: center;
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 390px 1fr;
    gap: 35px;
  }
  .hero-spread {
    width: 100%;
  }
  .emphasis-row > span {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1365px) {
  .comparison,
  .multipage,
  .decisions,
  .boundary,
  .demo {
    height: auto;
  }
  .hero-grid {
    padding: 42px 0 30px;
    display: block;
  }
  .hero-copy h1 {
    font-size: var(--own-site-hero-title-font-size);
    line-height: var(--own-site-hero-title-line-height);
    font-weight: var(--own-site-hero-title-font-weight);
    letter-spacing: var(--own-site-hero-title-letter-spacing);
  }
  .hero-spread {
    width: 100%;
    height: auto;
    aspect-ratio: 760/450;
    margin-top: 24px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .preview {
    height: auto;
    aspect-ratio: 390/470;
  }
  .comparison-table {
    overflow-x: auto;
  }
  .comparison-table > div {
    min-width: 850px;
  }
  .multipage-grid {
    display: flex;
    flex-direction: column;
  }
  .page-previews {
    width: 100%;
    overflow-x: auto;
  }
  .page-previews figure {
    min-width: 180px;
  }
  .multipage-copy {
    order: -1;
  }
  .decision-layout {
    height: 190px;
    overflow-x: auto;
  }
  .boundary > .rail > h2 {
    width: 100%;
  }
  .boundary-flow {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
  .demo-band {
    height: 340px;
    display: block;
    padding: 24px;
    background-position: center bottom;
    background-size: auto 204px;
  }
  .demo-copy {
    padding: 0;
  }
}

/* Approved copy must determine the closing section height in both languages. */
@media (min-width: 1366px) {
  .demo { height: auto; }
  .demo-band {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 54%) minmax(0, 1fr);
    background-color: #fff;
    background-image: url("../images/concepts/cta-portfolio-v3-600x200.png");
    background-size: auto;
    background-position: right center;
  }
  .demo-copy { min-width: 0; padding: 16px 0 16px 28px; }
}
