/* Poster statement: every line is sized to the full frame width; the section pins and the words fill one by one at eye level as the visitor scrolls. */

.statement {
  background: #fff;
  color: var(--rc-color-ink);
}

.statement-stage {
  padding: var(--rc-space-15) max(var(--rc-layout-gutter), calc((100% - 1392px) / 2));
}

.statement-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--rc-space-10);
}

/* Scroll mode: the section pins while the words fill; the track glides up so the line being read stays at eye level. */
.statement.is-scroll { height: 520svh; }

.statement.is-scroll .statement-stage {
  position: sticky;
  top: 69px;
  box-sizing: border-box;
  height: calc(100svh - 69px);
  overflow: hidden;
  padding-block: 0;
  /* Lines that have been read fade out as they rise past the top of the stage. */
  -webkit-mask-image: linear-gradient(transparent 0, #000 14%, #000 100%);
  mask-image: linear-gradient(transparent 0, #000 14%, #000 100%);
}

.statement.is-scroll .statement-track { will-change: transform; }

.statement-lines { width: 100%; text-align: center; }
.statement-lines[hidden] { display: none; }

.statement-line {
  display: block;
  font: 900 clamp(32px, 7vw, 120px)/.9 var(--rc-font-brand);
  letter-spacing: -.04em;
  text-transform: uppercase;
}

/* Once the script has sized a line, it stays on one row at exactly the frame width. */
.statement-lines.is-fitted .statement-line {
  width: max-content;
  margin-inline: auto;
  white-space: nowrap;
}

.statement-line + .statement-line { margin-top: .04em; }
.statement-line.is-turn { --ink: var(--rc-color-green); color: var(--ink); }
.statement .is-quiet { --ink: var(--rc-color-border); color: var(--ink); }

/* Scroll mode: outlined words fill left to right by their --w value (0 to 1). */
.statement.is-scroll .statement-fill {
  color: transparent;
  -webkit-text-stroke: max(1.5px, .018em) var(--ink, var(--rc-color-ink));
  padding-inline: .05em;
  margin-inline: -.05em;
  background: linear-gradient(var(--ink, var(--rc-color-ink)), var(--ink, var(--rc-color-ink))) 0 0 / calc(var(--w, 0) * 100%) 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}

.statement-cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  min-height: var(--rc-layout-control-height);
  padding-inline: var(--rc-space-8);
  border-radius: var(--rc-radius-control);
  color: var(--rc-color-ink);
  font: 900 var(--rc-type-small)/1 var(--rc-font-brand);
  text-decoration: none;
}

/* The outline is its own layer above the lime highlight, so the highlight sits behind both the stroke and the label. */
.statement-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--rc-color-ink);
  border-radius: inherit;
  pointer-events: none;
}

.statement-cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -10px -14px;
  background: var(--rc-color-lime);
  clip-path: var(--rc-marker-path);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--rc-motion-slow) var(--rc-motion-ease);
}

.statement-cta.is-lit::before,
.statement-cta:hover::before,
.statement-cta:focus-visible::before { transform: scaleX(1); }

.statement-cta:focus-visible {
  outline: var(--rc-layout-focus-width) solid var(--rc-color-green);
  outline-offset: 14px;
}

@media (max-width: 743px) {
  .statement-stage { padding-block: var(--rc-space-10); }
  .statement.is-scroll { height: 480svh; }
}

@media (prefers-reduced-motion: reduce) {
  .statement-cta::before { transform: scaleX(1); transition: none; }
}
