/* El visual ocupa el centro de la frase; la categoría aparece debajo. */
.statement-sequence {
  --statement-surface: #ffffff;
  --statement-font-size: clamp(20px, 3.15vw, 48px);
  --statement-visual-size: 274px;
  --statement-visible-rows: 3;
  --statement-row-height: calc(var(--statement-font-size) * 1.166666667);
  --statement-list-edge: clamp(6px, calc(var(--statement-row-height) * 0.22), 12px);
  --statement-list-height: calc(var(--statement-row-height) * var(--statement-visible-rows)
    + var(--statement-list-edge));
  --statement-list-gap: 16px;
  --statement-text-primary: var(--text-primary, #282834);
  --statement-text-rating: #000000;
  --statement-text-muted-rgb: 208 212 230;
  --statement-text-active-rgb: 67 76 228;
  --statement-rating-shadow: 0 2px 4px rgba(40, 40, 52, 0.1);
  --statement-ease-split: linear;
  --statement-ease-onscreen: var(--motion-ease-onscreen, cubic-bezier(0.4, 0.4, 0, 1));
  --statement-duration-category: var(--motion-duration-slow-700, 700ms);
  --statement-duration-color: var(--motion-duration-fast-150, 150ms);
  position: relative;
  height: 100svh;
  overflow: visible;
  background: var(--statement-surface);
}

.statement-stage {
  position: relative;
  z-index: 1;
  top: 0;
  height: 100svh;
  padding: 0;
  overflow: hidden;
  background: var(--statement-surface);
}

.statement-split {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.auto-screen {
  --statement-usage-width: calc(var(--statement-font-size) * 9.5);
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: var(--statement-surface);
  color: var(--statement-text-primary);
}

.auto-screen__sentence {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: max-content var(--statement-visual-size) max-content;
  grid-template-rows: var(--statement-visual-size);
  width: max-content;
  /* Include the list in the centered block, even though it sits below the image. */
  padding-bottom: calc(var(--statement-list-gap) + var(--statement-list-height));
  align-items: center;
  gap: calc(var(--statement-font-size) * 0.5);
  transform: translate(-50%, -50%);
}

.auto-screen__headline {
  display: contents;
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--statement-font-size);
  font-weight: 700;
  font-feature-settings: "salt" 1;
  letter-spacing: -0.0553em;
  line-height: 56px;
  white-space: nowrap;
}

.auto-screen__phrase {
  display: block;
  grid-row: 1;
  will-change: transform, opacity;
}

.auto-screen__phrase:first-child {
  grid-column: 1;
}

.auto-screen__phrase:last-child {
  grid-column: 3;
}

.auto-screen__usage {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  width: var(--statement-visual-size);
  height: var(--statement-visual-size);
}

.auto-screen__example-label {
  will-change: transform, opacity;
}

.auto-visual {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--statement-visual-size);
  height: var(--statement-visual-size);
  overflow: hidden;
  background: transparent;
  will-change: transform, opacity;
}

.auto-visual__reveal {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 274px;
  overflow: hidden;
  background: var(--statement-surface);
  will-change: transform, opacity;
}

.auto-visual__track {
  display: flex;
  width: 274px;
  flex-direction: column;
  will-change: transform;
}

.auto-visual__panel {
  position: relative;
  display: block;
  width: 274px;
  height: 274px;
  flex: 0 0 274px;
  overflow: hidden;
}

.auto-visual__category {
  display: block;
  width: 274px;
  height: 274px;
  object-fit: contain;
}

/* Match the occupied visual area of the online-shopping illustration. */
.auto-visual__category--food {
  transform: scale(0.7);
  transform-origin: center;
}

.auto-visual__car {
  position: absolute;
  top: 64.046px;
  left: 32.415px;
  display: block;
  width: 233.256px;
  height: 155.504px;
  object-fit: cover;
  transform: scaleX(-1);
}

.auto-visual__rating {
  position: absolute;
  top: 136.083px;
  left: 35.461px;
  display: block;
  width: 61.072px;
  height: 66.164px;
}

.auto-visual__avatar {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 60.58px;
  height: 60.58px;
}

.auto-visual__score {
  position: absolute;
  top: 44.79px;
  left: 0;
  display: flex;
  width: 61.072px;
  height: 21.375px;
  align-items: center;
  border-radius: 20.357px;
  background: var(--statement-surface);
  box-shadow: var(--statement-rating-shadow);
  color: var(--statement-text-rating);
  font-family: var(--font-body);
  font-size: 19.998px;
  font-weight: 500;
  font-feature-settings: "salt" 1, "calt" 0;
  letter-spacing: -0.04em;
  line-height: 1;
}

.auto-visual__score > span:first-child {
  margin-left: 8.15px;
}

.auto-visual__star {
  width: 14.25px;
  height: 14.25px;
  margin-left: 3.54px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 14.25px;
  text-align: center;
}

.auto-screen__examples {
  position: absolute;
  z-index: 4;
  top: calc(100% + var(--statement-list-gap));
  left: 50%;
  display: flex;
  width: var(--statement-usage-width);
  height: var(--statement-list-height);
  overflow: hidden;
  /* Three complete rows at rest; only movement is revealed in the extra edge. */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 4px,
    #000 calc(100% - var(--statement-list-edge)), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 4px,
    #000 calc(100% - var(--statement-list-edge)), transparent);
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: var(--statement-font-size);
  font-weight: 700;
  font-feature-settings: "salt" 1;
  letter-spacing: -0.0553em;
  line-height: var(--statement-row-height);
  list-style: none;
  text-align: center;
  transform: translateX(-50%);
  white-space: nowrap;
}

.auto-screen__examples li {
  width: 100%;
  height: var(--statement-row-height);
  flex: 0 0 var(--statement-row-height);
  color: rgb(var(--statement-text-muted-rgb));
  text-align: center;
  transform-origin: 50% 50%;
}

.auto-screen__example-label {
  display: block;
  width: max-content;
  height: 100%;
  margin-inline: auto;
}

.auto-screen__examples .is-active {
  color: rgb(var(--statement-text-active-rgb));
}

.mobile-auto-screen {
  display: none;
}

@media (min-width: 641px) {
  .statement-sequence,
  .statement-stage {
    /* A short embedded viewport must scroll instead of clipping the last row. */
    min-height: calc(var(--statement-visual-size) + var(--statement-list-gap)
      + var(--statement-list-height) + 128px);
  }
}

@media (max-width: 767px) {
  .statement-sequence {
    height: 100svh;
  }

  .statement-stage {
    position: relative;
    inset: auto;
    height: 100svh;
  }
}

@media (max-width: 640px) {
  .auto-screen {
    border-radius: 0;
  }

  .statement-stage {
    padding: 0;
  }

  .auto-screen__sentence {
    display: none;
  }

  .mobile-auto-screen {
    position: absolute;
    inset: 0;
    display: flex;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(56px, 9svh, 92px) 24px;
    overflow: hidden;
  }

  .mobile-auto-screen__headline {
    display: flex;
    width: 100%;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    color: var(--statement-text-primary);
    font-family: var(--font-display);
    font-size: clamp(30px, 9.2vw, 42px);
    font-weight: 700;
    font-feature-settings: "salt" 1;
    letter-spacing: -0.0553em;
    line-height: 1.04;
    text-align: left;
    white-space: nowrap;
    will-change: transform, opacity;
  }

  .mobile-auto-screen__phrase {
    display: block;
    width: 100%;
    transform: none !important;
  }

  .mobile-auto-visual {
    position: relative;
    display: block;
    width: 274px;
    height: 274px;
    flex: 0 0 274px;
    margin-top: clamp(30px, 5svh, 52px);
    overflow: hidden;
    opacity: 1 !important;
    transform: none !important;
    will-change: transform, opacity;
  }

  .mobile-auto-visual__reveal {
    position: absolute;
    inset: 0;
    display: block;
    width: 274px;
    overflow: hidden;
    background: var(--statement-surface);
    will-change: transform, opacity;
  }

  .mobile-auto-visual__track {
    display: flex;
    width: 274px;
    flex-direction: column;
    will-change: transform;
  }

  .mobile-auto-screen__category-window {
    position: relative;
    width: 100%;
    height: 56px;
    flex: 0 0 56px;
    margin-top: clamp(28px, 5svh, 48px);
    overflow: hidden;
    opacity: 1 !important;
  }

  .mobile-auto-screen__categories {
    position: relative;
    display: flex;
    width: 100%;
    height: auto;
    flex-direction: column;
    margin: 0;
    padding: 0;
    color: rgb(var(--statement-text-muted-rgb));
    font-family: var(--font-display);
    font-size: clamp(28px, 8.7vw, 40px);
    font-weight: 700;
    font-feature-settings: "salt" 1;
    letter-spacing: -0.0553em;
    line-height: 56px;
    list-style: none;
    text-align: left;
    white-space: nowrap;
    will-change: transform;
  }

  .mobile-auto-screen__categories li {
    position: relative;
    width: max-content;
    height: 56px;
    flex: 0 0 56px;
    color: rgb(var(--statement-text-muted-rgb));
  }

  .mobile-auto-screen__categories li span {
    display: block;
    width: 100%;
    height: 56px;
  }

  .mobile-auto-screen__categories .is-active {
    color: rgb(var(--statement-text-active-rgb));
  }
}

.statement-sequence:not(.is-motion-active) .auto-screen__headline,
.statement-sequence:not(.is-motion-active) .auto-screen__phrase,
.statement-sequence:not(.is-motion-active) .auto-screen__example-label,
.statement-sequence:not(.is-motion-active) .auto-screen__examples li,
.statement-sequence:not(.is-motion-active) .auto-visual,
.statement-sequence:not(.is-motion-active) .auto-visual__reveal,
.statement-sequence:not(.is-motion-active) .auto-visual__track,
.statement-sequence:not(.is-motion-active) .mobile-auto-screen__headline,
.statement-sequence:not(.is-motion-active) .mobile-auto-visual,
.statement-sequence:not(.is-motion-active) .mobile-auto-visual__reveal,
.statement-sequence:not(.is-motion-active) .mobile-auto-visual__track,
.statement-sequence:not(.is-motion-active) .mobile-auto-screen__category-window,
.statement-sequence:not(.is-motion-active) .mobile-auto-screen__categories,
.statement-sequence:not(.is-motion-active) .mobile-auto-screen__categories li {
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .statement-sequence {
    height: 100svh;
  }

  .statement-stage {
    position: relative;
    inset: auto;
  }

  .statement-split {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
  }

  .auto-screen__headline,
  .auto-screen__phrase,
  .auto-visual__reveal,
  .auto-screen__example-label {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
  }

  .auto-screen__examples li {
    opacity: 1 !important;
    will-change: auto;
  }

  .mobile-auto-screen__headline,
  .mobile-auto-screen__phrase,
  .mobile-auto-visual,
  .mobile-auto-screen__category-window,
  .mobile-auto-screen__categories,
  .mobile-auto-visual__reveal {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
  }

  .auto-visual {
    opacity: 1 !important;
    will-change: auto;
  }
}
