/* ==========================================================================
   Explain8 home: the edit suite.
   hero (headline over the program monitor) / shapes (aspect switch) /
   board (storyboard strip) / runtimes (pricing on the ruler) / process slip /
   commands (what's included) / languages / bands (FAQ) / word CTA
   ========================================================================== */

/* Hero ---------------------------------------------------------------------- */

.hero {
  padding-block: clamp(1.5rem, 2.5vw, 2.5rem) clamp(3rem, 6vw, 5.5rem);
}

.hero-title {
  margin: 0;
  color: #fff;
  /* Two authored lines that must never wrap: size from the longest line
     ("easier to understand." measures about 7.1em at this tracking), and
     cap near 8vw so the monitor rises into the first screen on laptops. */
  font-size: min(calc((100vw - 2 * var(--gutter)) / 7.45), 7.5rem);
  font-stretch: 75%;
  letter-spacing: -0.022em;
  line-height: 0.88;
}

.lines .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.09em;
  margin-bottom: -0.09em;
  white-space: nowrap;
}

.lines [data-line] {
  display: block;
}

.hero-row {
  display: grid;
  gap: 1.5rem 3rem;
  margin-top: clamp(1.25rem, 2.4vw, 2rem);
  grid-template-columns: minmax(0, 1fr);
}

.hero-lead {
  max-width: 36rem;
  margin: 0;
  font-size: var(--step-h3);
  line-height: 1.38;
  color: var(--on-suite);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-fact {
  margin: 1rem 0 0;
  color: var(--on-suite-soft);
}

.hero-fact strong {
  color: #fff;
}

.hero-status {
  max-width: 52rem;
  margin: 1.25rem 0 0;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  background: var(--suite-2);
  color: var(--on-suite);
  font-size: 0.9688rem;
}

@media (min-width: 58rem) {
  .hero-row {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: end;
  }
}

/* The program monitor ---------------------------------------------------------- */

.monitor {
  --length: 90;
  display: grid;
  gap: 0.75rem;
  margin-top: clamp(1.25rem, 2.4vw, 2.25rem);
  padding: 0.75rem;
  border-radius: var(--radius);
  background: var(--suite-2);
}

.monitor-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.monitor-play {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--suite-3);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}

.monitor-play:hover {
  background: var(--signal);
}

.monitor-play:active {
  transform: scale(0.94);
}

.monitor-play .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.monitor-play .icon-play {
  fill: currentColor;
}

.monitor-play[aria-pressed="true"] .icon-play,
.monitor-play[aria-pressed="false"] .icon-pause {
  display: none;
}

.monitor-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

.monitor-sub {
  display: block;
  color: var(--on-suite-soft);
  font-size: var(--step-small);
  font-weight: 500;
}

.monitor-time {
  flex: none;
  margin: 0;
  color: var(--on-suite-soft);
  font-weight: 600;
}

.monitor-time span {
  color: var(--amber);
}

.monitor-stage {
  position: relative;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr);
}

.screen {
  margin: 0;
  min-width: 0;
}

.screen figcaption {
  margin-top: 0.45rem;
  color: var(--on-suite-soft);
  font-size: var(--step-small);
}

.screen-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--suite);
}

.screen-wide .screen-frame {
  aspect-ratio: 16 / 9;
}

.screen-tall .screen-frame {
  aspect-ratio: 9 / 16;
}

.screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms ease;
}

.screen-img.is-on {
  opacity: 1;
}

.screen-caption {
  position: absolute;
  left: 50%;
  bottom: 6%;
  z-index: 2;
  width: max-content;
  max-width: 82%;
  margin: 0;
  padding: 0.3em 0.65em;
  border-radius: var(--radius);
  background: rgba(16, 24, 40, 0.84);
  color: #fff;
  font-size: clamp(0.875rem, 0.6rem + 0.9vw, 1.375rem);
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  transform: translateX(-50%);
}

.screen-tall .screen-caption {
  top: 9%;
  bottom: auto;
  max-width: 88%;
  font-size: clamp(0.8125rem, 0.55rem + 0.55vw, 1.0625rem);
}

.inspector {
  display: none;
  margin: 0;
}

/* Timeline: filled tracks, no rules. */
.timeline {
  overflow-x: clip;
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0.25rem 0;
}

.track {
  position: relative;
  border-radius: var(--radius);
  background: var(--suite);
}

.track-scenes {
  height: 3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.track-scenes li,
.track-captions span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--from) / var(--length) * 100%);
  width: calc((var(--to) - var(--from)) / var(--length) * 100%);
  margin: 0;
}

.track-scenes li {
  padding-right: 3px;
}

.clip {
  min-width: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.3rem 0.55rem;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--suite-3);
  color: var(--on-suite);
  font: inherit;
  font-size: var(--step-small);
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.clip:hover {
  background: var(--suite-4);
  color: #fff;
}

.clip.is-current {
  background: var(--signal);
  color: #fff;
}

.clip-name,
.clip-time {
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-time {
  color: var(--on-suite-soft);
  font-weight: 500;
}

.clip.is-current .clip-time {
  color: #fff;
}

.track-voice {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 2.25rem;
  padding: 0 3px;
}

.track-voice i {
  flex: 1 1 0;
  height: calc(var(--h) * 100%);
  border-radius: 1px;
  background: var(--signal-bright);
  opacity: 0.55;
}

.track-captions {
  height: 0.875rem;
}

.track-captions span {
  top: 3px;
  bottom: 3px;
  border-radius: 2px;
  background: var(--on-suite-soft);
  opacity: 0.4;
}

.playhead {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

.playhead span {
  position: absolute;
  top: -0.25rem;
  bottom: -0.25rem;
  left: -1px;
  width: 2px;
  background: #fff;
}

.playhead span::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  width: 12px;
  height: 8px;
  border-radius: 2px;
  background: #fff;
}

/* Phone and tablet: the vertical layout floats over the wide one. */
@media (max-width: 67.99rem) {
  .screen-tall {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    width: 24%;
    max-width: 9rem;
  }

  .screen-tall .screen-frame {
    outline: 3px solid var(--suite-2);
  }

  .screen figcaption {
    display: none;
  }

  .screen-tall .screen-caption {
    display: none;
  }

  .screen-wide .screen-caption {
    left: 0.6rem;
    right: 30%;
    max-width: none;
    width: auto;
    text-align: left;
    transform: none;
  }
}

@media (max-width: 40rem) {
  .clip-name {
    display: none;
  }

  .clip {
    padding-inline: 0.35rem;
  }

  .monitor-time {
    display: none;
  }
}

@media (min-width: 68rem) {
  .monitor {
    padding: 1rem;
    gap: 1rem;
  }

  /* Heights match because the tall column is the wide column x (9/16)^2. */
  .monitor-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.3164fr) 14rem;
    gap: 1rem;
  }

  .inspector {
    display: grid;
    align-content: start;
    gap: 1.1rem;
    padding: 1.1rem;
    border-radius: var(--radius);
    background: var(--suite);
  }

  .inspector dt {
    color: var(--on-suite-soft);
    font-size: var(--step-small);
  }

  .inspector dd {
    margin: 0.1rem 0 0;
    color: #fff;
    font-weight: 650;
    line-height: 1.3;
  }

  .inspector div:first-child dd {
    font-family: var(--font-display);
    font-size: var(--step-h3);
    font-stretch: 85%;
    font-weight: 800;
  }
}

/* Shapes: the blown-up aspect switch ---------------------------------------- */

.shapes {
  padding-block: var(--section-y);
  background: var(--signal);
  color: #fff;
  transition: background-color 420ms ease;
}

.shapes[data-aspect="tall"] {
  background: var(--suite);
}

.shapes h2 {
  margin: 0;
  color: #fff;
}

.shapes-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.shapes-text {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  font-size: var(--step-h3);
  line-height: 1.38;
}

.aspect {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.35rem;
  margin: 2.25rem 0 0;
  padding: 0.35rem;
  border: 0;
  border-radius: var(--radius);
  background: rgba(16, 24, 40, 0.3);
  font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem);
}

.shapes[data-aspect="tall"] .aspect {
  background: var(--suite-2);
}

.aspect-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.38em 0.6em;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -0.03em;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--t-ui) var(--ease-out), color var(--t-ui) var(--ease-out);
}

.aspect-option input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.aspect-option:hover {
  color: #fff;
}

.aspect-option:has(input:checked) {
  background: #fff;
  color: var(--ink);
}

.aspect-option:has(input:focus-visible) {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.aspect-shape {
  display: inline-block;
  flex: none;
  border-radius: 2px;
  background: currentColor;
}

.aspect-shape-wide {
  width: 0.78em;
  height: 0.44em;
}

.aspect-shape-tall {
  width: 0.36em;
  height: 0.64em;
}

.aspect-note {
  max-width: 30rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.92);
}

.aspect-note-tall,
.shapes[data-aspect="tall"] .aspect-note-wide {
  display: none;
}

.shapes[data-aspect="tall"] .aspect-note-tall {
  display: block;
}

.shapes-frame {
  margin: 0;
}

/* One frame is shown at a time, in flow, so the caption always sits under
   the visible picture. The phone frame stands taller than the wide one. */
.shapes-wide,
.shapes-tall {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--suite);
}

.shapes-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shapes-wide {
  aspect-ratio: 16 / 9;
}

.shapes-tall {
  display: none;
  width: 55%;
  margin-inline: auto;
  aspect-ratio: 9 / 16;
}

.shapes-tall .screen-caption {
  top: 9%;
  bottom: auto;
  font-size: clamp(0.875rem, 0.6rem + 0.6vw, 1.125rem);
}

.shapes[data-aspect="tall"] .shapes-wide {
  display: none;
}

.shapes[data-aspect="tall"] .shapes-tall {
  display: block;
}

.shapes-frame figcaption {
  margin-top: 1rem;
  color: #fff;
  font-size: var(--step-small);
}

.shapes[data-aspect="tall"] .shapes-frame figcaption {
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .shapes[data-aspect] .shapes-wide,
  .shapes[data-aspect] .shapes-tall {
    animation: shape-in 480ms var(--ease-out);
  }
}

@keyframes shape-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
}

@media (min-width: 58rem) {
  .shapes-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  /* 47.5% of the column makes the phone frame 1.5x the wide frame's height. */
  .shapes-tall {
    width: 47.5%;
  }
}

/* Board: the storyboard strip --------------------------------------------------- */

.board-head {
  display: grid;
  gap: 1.5rem 4rem;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(2rem, 4.5vw, 3.5rem);
}

.board-head h2 {
  margin: 0;
}

.board-intro > * + * {
  margin-top: 1rem;
}

.board-strip {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  max-width: 84rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
}

/* Phone and tablet: each scene is a row, picture beside its words. */
.board-shot {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  grid-template-rows: auto auto auto 1fr;
  column-gap: 1rem;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--fog);
}

.board-shot img {
  grid-column: 1;
  grid-row: 1 / -1;
  height: 100%;
}

.board-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.board-shot > :not(img) {
  margin: 0;
  padding-inline: 1.1rem;
}

.board-time {
  margin-top: 0.2rem !important;
  color: var(--signal-deep);
  font-size: var(--step-small);
  font-weight: 700;
}

.board-shot h3 {
  padding-top: 1rem;
}

.board-question {
  margin-top: 0.4rem !important;
  color: var(--ink);
  font-weight: 650;
}

.board-line {
  margin-top: 0.5rem !important;
  padding-bottom: 1.25rem;
  color: var(--ink-soft);
}

.board-foot {
  margin-top: 2rem;
}

.board-foot p {
  max-width: 46rem;
}

@media (min-width: 58rem) {
  .board-head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: end;
  }
}

@media (min-width: 68rem) {
  .board-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .board-shot {
    display: flex;
    flex-direction: column;
  }

  .board-shot img {
    height: auto;
  }
}

@media (max-width: 67.99rem) {
  .board-shot > :not(img) {
    grid-column: 2;
    padding-inline: 0 0.9rem;
  }

  .board-shot h3 {
    padding-top: 0.85rem;
  }

  .board-line {
    padding-bottom: 0.9rem;
  }
}

@media (max-width: 30rem) {
  .board-shot {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .board-shot img {
    grid-row: auto;
    height: auto;
  }

  .board-shot > :not(img) {
    grid-column: 1;
    padding-inline: 1rem;
  }
}

/* Runtimes: pricing on the ruler ------------------------------------------------- */

.runtimes-head {
  display: grid;
  gap: 1.5rem 4rem;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: clamp(2rem, 4.5vw, 3.5rem);
}

.runtimes-head h2 {
  margin: 0;
  color: #fff;
}

.ruler {
  display: flex;
  justify-content: space-between;
  margin: 0.6rem 1.5rem 0;
  color: var(--on-suite-soft);
  font-size: var(--step-small);
  font-variant-numeric: tabular-nums;
}

.runtime-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.runtime {
  display: grid;
  gap: 1rem 2rem;
  margin: 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--suite-2);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "bar bar"
    "name price"
    "text text"
    "cta cta";
  align-items: center;
}

.runtime-bar {
  grid-area: bar;
  position: relative;
  height: 0.75rem;
  border-radius: var(--radius);
  background: var(--suite-3);
}

.runtime-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--from) * 1%);
  width: calc((var(--to) - var(--from)) * 1%);
  border-radius: var(--radius);
  background: var(--signal-bright);
}

.runtime-name {
  grid-area: name;
}

.runtime-name h3 {
  margin: 0;
  color: #fff;
}

.runtime-length {
  margin: 0.3rem 0 0;
  color: var(--on-suite-soft);
}

.runtime-text {
  grid-area: text;
  max-width: 34rem;
  margin: 0;
  color: var(--on-suite);
}

.runtime-price {
  grid-area: price;
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.6rem + 3.4vw, 4.75rem);
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.runtime .button {
  grid-area: cta;
  justify-self: start;
}

.runtime.is-featured {
  background: var(--signal);
}

.runtime.is-featured .runtime-bar {
  background: rgba(16, 24, 40, 0.28);
}

.runtime.is-featured .runtime-bar span {
  background: #fff;
}

.runtime.is-featured .runtime-length,
.runtime.is-featured .runtime-text {
  color: #fff;
}

.runtimes-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 2rem;
}

.runtimes-foot p {
  max-width: 44rem;
  margin: 0;
  color: var(--on-suite);
}

@media (min-width: 58rem) {
  .runtimes-head {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: end;
  }

  .runtime {
    grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) auto 15rem;
    grid-template-areas:
      "bar bar bar bar"
      "name text price cta";
    padding: 1.5rem 1.75rem 1.75rem;
  }

  .ruler {
    margin-inline: 1.75rem;
  }

  .runtime .button {
    justify-self: stretch;
  }
}

/* Process: the call sheet ---------------------------------------------------------- */

.process {
  background: var(--fog);
}

.process-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.process .process-heading {
  max-width: 22ch;
  margin: 0 0 clamp(2.25rem, 4.5vw, 3.5rem);
}

@media (min-width: 58rem) {
  .process-copy {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

.process-copy > * + * {
  margin-top: 1.25rem;
}

.slip {
  width: 100%;
  max-width: 34rem;
  padding: 1.75rem 1.75rem 0;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  /* Straight top, zigzag bottom cut. */
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 12px) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 24px 12px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 12px) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 24px 12px repeat-x;
}

.slip-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-stretch: 88%;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.slip-list {
  display: grid;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slip-list li {
  display: grid;
  gap: 0.15rem 0.85rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  background: var(--fog);
  grid-template-columns: 2.75rem minmax(0, 1fr);
  grid-template-areas:
    "who what"
    "who when";
}

.slip-who {
  grid-area: who;
  align-self: start;
  padding: 0.15rem 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: var(--step-small);
  font-weight: 700;
  text-align: center;
}

.slip-list li:nth-child(odd) .slip-who {
  background: var(--wash);
  color: var(--signal-deep);
}

.slip-what {
  grid-area: what;
  font-weight: 650;
  line-height: 1.35;
}

.slip-when {
  grid-area: when;
  color: var(--slate);
  font-size: 0.9688rem;
}

.slip-list .slip-gate {
  background: var(--signal);
  color: #fff;
}

.slip-list .slip-gate .slip-who {
  background: #fff;
  color: var(--signal-deep);
}

.slip-list .slip-gate .slip-when {
  color: #fff;
  font-weight: 700;
}

.slip-final {
  /* The ink bar runs into the zigzag cut, so the torn edge reads clearly. */
  margin: 0.75rem -1.75rem 0;
  padding: 1rem 1.75rem calc(1rem + 12px);
  background: var(--ink);
  color: #fff;
  font-weight: 650;
}

@media (min-width: 40rem) {
  .slip-list li {
    grid-template-columns: 2.75rem minmax(0, 1fr) auto;
    grid-template-areas: "who what when";
    align-items: baseline;
  }

  .slip-when {
    text-align: right;
  }
}

@media (min-width: 58rem) {
  .process-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .slip {
    justify-self: end;
    max-width: 38rem;
  }
}

/* Commands: what's included ------------------------------------------------------- */

.commands .commands-heading {
  margin: 0 0 clamp(2rem, 3.5vw, 3rem);
  color: #fff;
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.1rem;
  border-radius: var(--radius);
  background: var(--suite-2);
  color: var(--on-suite-soft);
  font-size: clamp(1.25rem, 0.9rem + 1.4vw, 2.25rem);
  transition: background-color var(--t-hover) ease;
}

.palette-search:focus-within {
  background: var(--suite-3);
  outline: 3px solid var(--signal-bright);
  outline-offset: 2px;
}

.palette-search .icon {
  width: 0.9em;
  height: 0.9em;
}

.palette-search input {
  min-height: 2.3em;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: inherit;
  font-weight: 600;
}

.palette-search input:focus {
  box-shadow: none;
}

.palette-search input::placeholder {
  color: var(--on-suite-soft);
}

.palette-list {
  display: grid;
  gap: 2px;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.palette-row {
  margin: 0;
  border-radius: var(--radius);
  transition: background-color var(--t-hover) ease;
}

.palette-item {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.12em 0.3em;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--on-suite);
  font-family: var(--font-display);
  font-size: clamp(2rem, 1rem + 3.9vw, 4.5rem);
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}

.palette-item:hover {
  background: var(--suite-2);
  color: #fff;
}

.palette-key {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: var(--suite-3);
  color: var(--on-suite);
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0;
}

.palette-text {
  max-width: 40rem;
  margin: 0;
  padding: 0 0.55em 1.1rem;
  padding-left: clamp(0.6rem, 0.3rem + 0.9vw, 1.35rem);
  color: #fff;
  font-size: var(--step-h3);
  line-height: 1.38;
}

.palette-row.is-selected {
  background: var(--signal);
}

.palette-row.is-selected .palette-item {
  background: none;
  color: #fff;
}

.palette-row.is-selected .palette-key {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.js .palette-row:not(.is-selected) .palette-text {
  display: none;
}

.palette-empty {
  margin: 1.25rem 0 0;
  color: var(--on-suite);
}

@media (max-width: 40rem) {
  .palette-key {
    display: none;
  }

  /* No shortcuts on a phone: a plus mark shows the row opens. */
  .palette-item::after {
    content: "";
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    background-color: currentColor;
    opacity: 0.7;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .palette-row.is-selected .palette-item::after {
    opacity: 0;
  }
}

/* Languages --------------------------------------------------------------------- */

.languages-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1fr);
}

/* On one column the words come first, so the track labels never read as a kicker. */
@media (max-width: 57.99rem) {
  .languages-frame {
    order: 2;
  }
}

.languages-grid {
  align-items: center;
}

.languages-frame {
  margin: 0;
}

.languages-shot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--suite);
}

.languages-frame figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: var(--step-small);
}

.languages-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.languages-tracks {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.lt {
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius);
  background: rgba(16, 24, 40, 0.84);
  color: #fff;
  font-size: var(--step-small);
  font-weight: 650;
}

.lt-on {
  background: var(--signal);
}

.languages-copy h2 {
  margin: 0 0 1.25rem;
}

.languages-copy > * + * {
  margin-top: 1rem;
}

@media (min-width: 58rem) {
  .languages-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  }
}

/* Bands: one per question --------------------------------------------------------- */

.band {
  background: var(--paper);
}

.band:nth-child(odd) {
  background: var(--fog);
}

.band-head {
  display: flex;
  align-items: flex-end;
  min-height: 30svh;
  padding-block: 3rem 2.5rem;
  background: var(--wash) !important;
}

.band-head h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.5rem, 1.2rem + 5vw, 6.5rem);
}

.band-grid {
  display: grid;
  gap: 1rem 4rem;
  padding-block: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
}

.band-grid h3 {
  margin: 0;
  font-size: clamp(1.375rem, 1rem + 1.2vw, 2.125rem);
}

.band-answer {
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.55;
}

.band-answer > :last-child {
  margin-bottom: 0;
}

.band-more {
  background: var(--suite) !important;
  color: var(--on-suite);
}

.band-more h3 {
  color: #fff;
}

.band-more .actions {
  margin-top: 1.5rem;
}

@media (min-width: 58rem) {
  .band-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* The close: one word is the button ------------------------------------------------ */

.word-cta {
  position: relative;
  display: block;
  min-height: max(46svh, calc((100vw - 2 * var(--gutter)) / 2.05 * 0.8 + 7rem));
  padding: 1.25rem var(--gutter) 0;
  overflow: hidden;
  background: var(--signal);
  color: #fff;
  text-decoration: none;
}

.word-cta:hover,
.word-cta:focus-visible {
  background: #fff;
  color: var(--signal);
}

.word-cta:focus-visible {
  outline: 4px solid var(--suite);
  outline-offset: -4px;
}

.word-cta-line {
  display: block;
  max-width: 30rem;
  padding-right: 3.5rem;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.45;
}

.word-cta-arrow {
  position: absolute;
  top: 1.25rem;
  right: var(--gutter);
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.5;
  stroke-linecap: square;
}

.word-cta-word {
  position: absolute;
  left: calc(var(--gutter) - 0.04em);
  bottom: 1.25rem;
  font-family: var(--font-display);
  /* "Create" measures about 1.98em at this tracking: fill the content width. */
  font-size: calc((100vw - 2 * var(--gutter)) / 2.05);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.025em;
  line-height: 0.74;
  white-space: nowrap;
}

@media (min-width: 48rem) {
  .word-cta {
    min-height: calc((100vw - 2 * var(--gutter)) / 2.05 * 0.8 + 8rem);
  }

  .word-cta-line {
    font-size: 1.25rem;
  }

  .word-cta-arrow {
    width: 3rem;
    height: 3rem;
  }
}

/* Motion ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-line] {
    transform: translateY(105%);
    animation: line-up 900ms var(--ease-expo) forwards;
    animation-delay: calc(var(--i) * 110ms + 120ms);
  }

  .js .hero [data-load] {
    opacity: 0;
    transform: translateY(12px);
    animation: load-rise 520ms var(--ease-out) forwards;
    animation-delay: var(--d);
  }

  .js .monitor {
    clip-path: inset(0 0 100% 0 round var(--radius));
    animation: open-up 1050ms var(--ease-in-out) 260ms forwards;
  }

  .screen-img.is-on {
    animation: drift var(--shot-ms, 4200ms) linear forwards;
  }

  .screen-caption.is-swap {
    animation: caption-in 420ms var(--ease-out);
  }

  .js [data-inview] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out);
  }

  .js [data-inview].is-in {
    opacity: 1;
    transform: none;
  }

  .js .board-shot[data-inview]:nth-child(2) { transition-delay: 60ms; }
  .js .board-shot[data-inview]:nth-child(3) { transition-delay: 120ms; }
  .js .board-shot[data-inview]:nth-child(4) { transition-delay: 180ms; }
  .js .board-shot[data-inview]:nth-child(5) { transition-delay: 240ms; }

  .palette-row.is-selected .palette-text {
    animation: caption-in 260ms var(--ease-out);
  }
}

@keyframes line-up {
  to {
    transform: none;
  }
}

@keyframes load-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes open-up {
  to {
    clip-path: inset(0 0 0 0 round var(--radius));
  }
}

@keyframes drift {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.06);
  }
}

@keyframes caption-in {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}
