/* Three homepage sections share one viewport; their contents own the space inside it. */
.cinematic-home :is(.product-film, #customer-outcomes, #possechat-demo) {
  height: 100svh;
  min-height: 0;
  box-sizing: border-box;
  /* Cancel the site's 24px anchor inset for these full-screen sections only. */
  scroll-margin-top: -24px;
}

/* Reserve the heading first, then fit the whole film into the remaining area. */
.cinematic-home .product-film {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3svh, 32px);
  padding: clamp(20px, 4svh, 48px) 6vw;
}
.cinematic-home .product-film-heading { width: 100%; margin: 0 auto; flex: none; }
.cinematic-home .product-film-heading .eyebrow { margin-bottom: clamp(8px, 1.5svh, 16px); }
.cinematic-home .product-film-heading h2 { font-size: clamp(26px, min(3.4vw, 5.5svh), 48px); }
.cinematic-home .product-film-heading > p { font-size: clamp(13px, 1.9svh, 16px); line-height: 1.5; }
.product-film-media { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.cinematic-home .product-film-frame {
  width: min(100%, 1440px, calc(100cqh * 16 / 9));
  max-width: none;
  margin: 0;
}
.cinematic-home .product-film-error { flex: none; margin: 0 auto; }

/* Keep every metric and its chart together in a compact, three-column panel. */
.cinematic-home #customer-outcomes { padding: clamp(16px, 3svh, 40px) 5vw; }
.cinematic-home .case-outcomes-inner {
  height: 100%;
  max-width: 1440px;
  padding: clamp(16px, 3svh, 36px) clamp(20px, 3vw, 48px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  container-type: size;
  position: relative;
}
.cinematic-home .case-outcomes .case-topline { margin-bottom: 2cqh; font-size: 11px; }
.cinematic-home .case-heading-row { gap: 24px; padding-bottom: 2.5cqh; }
.cinematic-home .case-heading-copy { padding-left: 24px; }
.cinematic-home .case-customer-name { font-size: clamp(32px, 7cqh, 58px); }
.cinematic-home .case-outcomes h2 { font-size: clamp(22px, 4cqh, 34px); margin-bottom: 1cqh; }
.cinematic-home .case-industry { font-size: 13px; line-height: 1.5; }
.cinematic-home .case-data-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .85fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(18px, 2.5vw, 36px);
  padding: 3cqh 0;
  min-height: 0;
}
.cinematic-home .case-measured { display: contents; }
.cinematic-home .case-estimate { padding-right: 0; border: 0; }
.cinematic-home .case-query-volume { padding: 0; border: 0; scroll-margin-top: 24px; }
.cinematic-home .case-metric-top { gap: 8px; flex-wrap: wrap; align-items: center; }
.cinematic-home .case-metric-top h3 { font-size: clamp(13px, 2.2cqh, 16px); line-height: 1.45; }
.cinematic-home .case-data-tag { font-size: 10px; padding: 2px 5px; }
.cinematic-home .case-stat-featured, .cinematic-home .case-stat-secondary { margin-top: 2cqh; gap: 4px 10px; }
.cinematic-home .case-stat > span { font-size: clamp(38px, 8.8cqh, 78px); }
.cinematic-home .case-stat-secondary > span { font-size: clamp(34px, 7cqh, 64px); }
.cinematic-home .case-stat small { font-size: 13px; }
.cinematic-home .case-stat-description { font-size: clamp(12px, 2cqh, 15px); line-height: 1.5; margin-top: 1.5cqh; }
.cinematic-home .case-time-chart { margin-top: 2.5cqh; }
.cinematic-home .case-time-chart > figcaption { margin-bottom: 2cqh; }
.cinematic-home .case-time-chart > figcaption > span { font-size: 11px; margin-bottom: 3px; }
.cinematic-home .case-time-chart > figcaption strong { font-size: clamp(23px, 4.5cqh, 32px); }
.cinematic-home .case-time-chart > figcaption small { font-size: 12px; }
.cinematic-home .case-chart-row-label { font-size: 12px; line-height: 1.4; padding-bottom: 6px; }
.cinematic-home .case-chart-row-label strong { font-size: 14px; }
.cinematic-home .case-comparison-row + .case-comparison-row { margin-top: 2cqh; }
.cinematic-home .case-comparison-track, .cinematic-home .query-main-plot .case-comparison-track { height: clamp(10px, 2.3cqh, 18px); }
.cinematic-home .case-comparison-plot { padding-bottom: 1.5cqh; }
.cinematic-home .case-chart-axis { font-size: 11px; margin-top: 5px; }
.cinematic-home .case-estimate-note { display: none; } /* Same estimate qualification remains in the shared footer. */
.cinematic-home .case-chart-note, .cinematic-home .case-query-chart > figcaption { font-size: 11px; line-height: 1.45; margin-top: 1.5cqh; }
.cinematic-home .case-daily-equivalent { display: block; margin-top: 3cqh; padding-left: 14px; }
.cinematic-home .case-daily-equivalent strong { font-size: clamp(30px, 6cqh, 44px); }
.cinematic-home .case-daily-equivalent p { margin-top: 1.5cqh; font-size: 12px; line-height: 1.5; }
.cinematic-home .case-query-chart { margin-top: 2cqh; }
.cinematic-home .query-time-saving { margin-bottom: 2.5cqh; gap: 4px 10px; }
.cinematic-home .query-time-saving > strong { font-size: clamp(32px, 6cqh, 48px); }
.cinematic-home .query-time-saving > span { font-size: 12px; }
.cinematic-home .query-scale-label { margin-bottom: 1.5cqh; }
.cinematic-home .case-outcomes-footer { padding-top: 2cqh; gap: 24px; align-items: center; }
.cinematic-home .case-source-note { font-size: 11px; line-height: 1.5; }
.cinematic-home .case-method summary { min-height: 30px; }
.cinematic-home .case-read-link { font-size: 14px; gap: 24px; }
/* Opening the source notes must not push the case section beyond the viewport. */
.cinematic-home .case-method[open] > div {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 90px;
  z-index: 5;
  max-width: 760px;
  max-height: 60cqh;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--case-rule);
  background: #142b22;
  box-shadow: 0 12px 36px #0006;
}

/* Give the product its own full-height stage beside a concise heading. */
.cinematic-home #possechat-demo {
  display: grid;
  grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas: 'heading demo' 'download demo' '. demo';
  column-gap: 4vw;
  padding: clamp(24px, 5svh, 60px) 4vw;
}
.cinematic-home #possechat-demo .showcase-heading { grid-area: heading; align-self: end; margin: 0 0 24px; max-width: none; }
.cinematic-home #possechat-demo .showcase-heading .eyebrow { font-size: 12px; margin: 0; }
.cinematic-home #possechat-demo .showcase-heading h2 { font-size: clamp(30px, min(3.7vw, 6.6svh), 56px); margin: 16px 0 22px; line-height: 1.16; text-wrap: balance; }
.cinematic-home #possechat-demo .showcase-heading > p:last-child { font-size: 15px; line-height: 1.6; }
.cinematic-home #possechat-demo .showcase-download { grid-area: download; margin: 0; }
.cinematic-home #possechat-demo .showcase-download .text-link { margin-top: 0; font-size: 14px; gap: 16px; }
.cinematic-home #possechat-demo .tour-layout { grid-area: demo; width: 100%; height: 100%; min-height: 0; padding: 0; container-type: size; }
.cinematic-home #possechat-demo .tour-desktop-column { position: absolute; inset: 0 65px 35px 0; display: flex; flex-direction: column; padding: 0; overflow: visible; }
.cinematic-home #possechat-demo .tour-device-label { flex: none; margin-bottom: 10px; }
.cinematic-home #possechat-demo .pc-preview { height: auto; flex: 1; min-height: 0; min-width: 0; }
.cinematic-home #possechat-demo .pc-layout { grid-template-columns: 150px minmax(0, 1fr); }
.cinematic-home #possechat-demo .pc-profile { background: #faf9f6; box-shadow: 0 -12px 12px #faf9f6; }
.cinematic-home #possechat-demo .showcase-heading h2 .headline-phrase { display: block; }
.cinematic-home #possechat-demo .tour-footnote { flex: none; margin: 10px 0 0; }
.cinematic-home #possechat-demo .tour-mobile-column { position: absolute; right: 0; bottom: 0; margin: 0; width: min(210px, calc((100cqh - 60px) / 2.15)); }

@media (max-width: 1100px) {
  .cinematic-home #possechat-demo { grid-template-columns: 1fr auto; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'heading download' 'demo demo'; gap: 24px; }
  .cinematic-home #possechat-demo .showcase-heading { margin: 0; align-self: center; }
  .cinematic-home #possechat-demo .showcase-heading h2 { font-size: clamp(26px, 4svh, 36px); margin: 10px 0; }
  .cinematic-home #possechat-demo .showcase-download { align-self: center; max-width: 250px; }
  .cinematic-home #possechat-demo .tour-mobile-column { width: min(210px, calc((100cqh - 60px) / 2.15)); }
  .cinematic-home .case-data-grid { gap: 20px; }
}
@media (max-width: 700px) {
  .cinematic-home .product-film-heading > p { margin-top: 12px; }
  .cinematic-home #customer-outcomes { padding: 16px; }
  .cinematic-home .case-outcomes-inner { padding: 18px; }
  .cinematic-home .case-outcomes .case-topline { font-size: 10px; }
  .cinematic-home .case-heading-row { display: flex; gap: 16px; }
  .cinematic-home .case-heading-copy { padding-left: 16px; border-left: 1px solid var(--case-rule); }
  .cinematic-home .case-outcomes h2 { font-size: 20px; line-height: 1.25; }
  .cinematic-home .case-customer-name { font-size: 30px; }
  .cinematic-home .case-industry { font-size: 11px; }
  .cinematic-home .case-outcomes-footer { flex-direction: row; gap: 14px; padding-top: 1.5cqh; }
  .cinematic-home .case-read-link { align-self: center; font-size: 12px; gap: 10px; flex: 0 0 105px; }
  .cinematic-home .case-source-note { font-size: 10px; }
  .cinematic-home #possechat-demo { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: 'heading' 'download' 'demo'; gap: 16px; padding: 24px 20px; }
  .cinematic-home #possechat-demo .showcase-heading h2 { font-size: 30px; margin: 10px 0; }
  .cinematic-home #possechat-demo .showcase-heading > p:last-child { font-size: 13px; }
  .cinematic-home #possechat-demo .showcase-download { max-width: none; }
  .cinematic-home #possechat-demo .showcase-download p { margin-top: 4px; font-size: 11px; }
  .cinematic-home #possechat-demo .tour-desktop-column { right: 22px; bottom: 30px; }
  .cinematic-home #possechat-demo .pc-layout { grid-template-columns: minmax(0, 1fr); }
  .cinematic-home #possechat-demo .pc-sidebar { display: none; }
  .cinematic-home #possechat-demo .pc-room-title { padding: 12px 10px; }
  .cinematic-home #possechat-demo .pc-room-title strong { font-size: 11px; }
  .cinematic-home #possechat-demo .pc-tabs { padding: 0 10px 10px; }
  .cinematic-home #possechat-demo .pc-top-search { display: none; }
  .cinematic-home #possechat-demo .pc-top button { margin-left: auto; }
  .cinematic-home #possechat-demo .tour-mobile-column { width: min(145px, calc((100cqh - 60px) / 2.15)); }
  .cinematic-home #possechat-demo .faithful-board { grid-template-columns: 1fr 1fr; }
  .cinematic-home #possechat-demo .faithful-board .pc-widget { grid-column: auto; padding: 12px; }
  .cinematic-home #possechat-demo .pc-milestone-widget { grid-column: 1 / -1; }
}
@media (max-height: 550px) and (min-width: 701px) {
  .cinematic-home .product-film { padding-block: 16px; gap: 12px; }
  .cinematic-home .product-film-heading { display: flex; align-items: center; }
  .cinematic-home .product-film-heading h2 { font-size: 26px; }
  .cinematic-home .product-film-heading > p { max-width: 280px; margin: 0; font-size: 12px; }
  .cinematic-home #customer-outcomes { padding: 12px 3vw; }
  .cinematic-home .case-outcomes-inner { padding: 14px 20px; }
  .cinematic-home #possechat-demo { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); grid-template-rows: 1fr auto 1fr; grid-template-areas: 'heading demo' 'download demo' '. demo'; gap: 16px; padding: 20px 3vw; }
  .cinematic-home #possechat-demo .showcase-heading h2 { font-size: 28px; }
  .cinematic-home #possechat-demo .showcase-heading > p:last-child { font-size: 12px; }
  .cinematic-home #possechat-demo .showcase-download .text-link { font-size: 12px; }
}

/* Compact case layouts show one complete metric at a time, not smaller text. */
.case-metric-controls { display: none; }
.cinematic-home .case-paged .case-outcomes-inner { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.cinematic-home .case-paged .case-metric-controls { display: flex; gap: 6px; padding-top: 12px; }
.case-metric-controls button { flex: 1; background: transparent; border: 1px solid var(--case-rule); padding: 8px 5px; color: var(--case-muted); font-size: 12px; line-height: 1.3; border-radius: 3px; }
.case-metric-controls button[aria-pressed="true"] { background: #f7ecd2; color: #1c352c; border-color: #f7ecd2; }
.cinematic-home .case-paged .case-data-grid { display: grid; grid-template-columns: minmax(0, 1fr); padding: 12px 0; align-items: center; }
.cinematic-home .case-paged .case-data-grid article[hidden] { display: none; }
.cinematic-home .case-paged .case-query-volume { border: 0; padding: 0; }
.cinematic-home .case-paged .case-stat-featured small { flex-basis: auto; }
.cinematic-home .case-paged .case-metric-top { flex-wrap: nowrap; }
.cinematic-home .case-paged .case-time-chart > figcaption { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cinematic-home .case-paged .case-time-chart > figcaption > span { margin: 0; }
.cinematic-home .case-paged .case-time-chart > figcaption strong { font-size: 23px; }
.cinematic-home .case-paged .case-time-chart { margin-top: 14px; }
.cinematic-home .case-paged .case-stat > span { font-size: 48px; }
.cinematic-home .case-paged .case-stat-secondary > span { font-size: 44px; }
.cinematic-home .case-paged .case-query-chart { display: block; }
.cinematic-home .case-paged .query-time-saving { display: flex; }
@media (max-height: 700px) {
  .cinematic-home .case-topline { margin-bottom: 8px; }
  .cinematic-home .case-data-grid { padding-block: 10px; }
  .cinematic-home .case-stat-featured, .cinematic-home .case-stat-secondary { margin-top: 8px; }
  .cinematic-home .case-stat-featured small { flex-basis: auto; }
  .cinematic-home .case-stat > span { font-size: 42px; }
  .cinematic-home .case-stat-secondary > span { font-size: 38px; }
  .cinematic-home .case-time-chart { margin-top: 12px; }
  .cinematic-home .case-time-chart > figcaption { margin-bottom: 10px; }
  .cinematic-home .case-time-chart > figcaption strong { font-size: 24px; }
  .cinematic-home .case-stat-description { margin-top: 8px; }
  .cinematic-home .case-comparison-row + .case-comparison-row { margin-top: 10px; }
  .cinematic-home .case-chart-note, .cinematic-home .case-query-chart > figcaption { margin-top: 6px; }
  .cinematic-home .case-outcomes-footer { padding-top: 10px; }
}
@media (max-height: 520px) and (min-width: 701px) {
  .cinematic-home .case-paged .case-topline { display: none; }
  .cinematic-home .case-paged .case-outcomes-inner { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .cinematic-home .case-paged .case-heading-row { padding-bottom: 8px; }
  .cinematic-home .case-paged .case-heading-copy { display: flex; align-items: baseline; gap: 14px; }
  .cinematic-home .case-paged .case-outcomes h2 { font-size: 22px; margin: 0; }
  .cinematic-home .case-paged .case-customer-name { font-size: 32px; }
  .cinematic-home .case-paged .case-industry { font-size: 11px; }
  .cinematic-home .case-paged .case-metric-controls { padding-top: 8px; }
  .cinematic-home .case-paged .case-data-grid { padding: 10px 0; }
  .cinematic-home .case-paged .case-estimate { display: grid; grid-template-columns: .8fr 1.2fr; column-gap: 24px; align-content: center; }
  .cinematic-home .case-paged .case-estimate .case-time-chart { grid-column: 2; grid-row: 1 / 4; margin: 0; }
  .cinematic-home .case-paged .case-estimate .case-time-chart > figcaption { gap: 5px; margin-bottom: 6px; }
  .cinematic-home .case-paged .case-estimate .case-time-chart > figcaption strong { font-size: 20px; }
  .cinematic-home .case-paged .case-query-volume { display: grid; grid-template-columns: .65fr 1.35fr; gap: 24px; }
  .cinematic-home .case-paged .case-query-chart { display: grid; grid-template-columns: .7fr 1.3fr; margin: 0; gap: 8px 16px; }
  .cinematic-home .case-paged .query-time-saving { display: block; }
  .cinematic-home .case-paged .query-time-saving > strong { font-size: 32px; }
  .cinematic-home .case-paged .query-time-saving > span { display: block; margin-top: 6px; }
  .cinematic-home .case-paged .case-query-chart > figcaption { grid-column: 1 / -1; margin: 0; }
  .cinematic-home .case-paged .query-scale-label { margin-bottom: 4px; }
  .cinematic-home .case-paged .case-query-chart .case-chart-row-label { padding-bottom: 3px; }
  .cinematic-home .case-paged .case-query-chart .case-comparison-row + .case-comparison-row { margin-top: 6px; }
  .cinematic-home .case-paged .case-run-volume { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .cinematic-home .case-paged .case-daily-equivalent { grid-column: 2; grid-row: 1 / 4; margin: 0; }
  .cinematic-home .case-paged .case-source-note { font-size: 10px; }
  .cinematic-home .case-paged .case-outcomes-footer { padding-top: 8px; }
  .cinematic-home .case-paged .case-method summary { min-height: 24px; }
}
@media (max-height: 700px) and (max-width: 700px) {
  .cinematic-home #customer-outcomes { padding: 12px; }
  .cinematic-home .case-paged .case-outcomes-inner { padding: 14px; grid-template-rows: auto auto minmax(0, 1fr) auto; }
  .cinematic-home .case-paged .case-topline { display: none; }
  .cinematic-home .case-paged .case-heading-row { padding-bottom: 10px; }
  .cinematic-home .case-paged .case-heading-copy { padding-block: 0; }
  .cinematic-home .case-paged .case-outcomes h2 { font-size: 18px; }
  .cinematic-home .case-paged .case-stat > span { font-size: 40px; }
  .cinematic-home .case-paged .case-time-chart > figcaption strong { font-size: 20px; }
}
