/* Feature bento and language ticker. Tokens live in base.css. */

/* Feature bento ---------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tile-official {
  grid-column: span 7;
}

.tile-languages {
  grid-column: span 5;
}

.tile-purchase,
.tile-explain,
.tile-mistakes {
  grid-column: span 4;
}

.tile-images {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

.tile-images > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tile-label {
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
}

.tile-number {
  color: var(--ink);
  font-size: clamp(3.5rem, 2.5rem + 3vw, 5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.tile-title {
  max-width: 22em;
  color: var(--ink);
  font-size: clamp(1.1875rem, 1.05rem + 0.4vw, 1.375rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

:lang(zh-CN) .tile-title {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.tile-body {
  max-width: 34em;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.source-list {
  margin-top: auto;
  padding-top: 12px;
}

.source-list li {
  display: grid;
  grid-template-columns: 4.5em minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.source-list strong {
  color: var(--ink);
  font-weight: 600;
}

.source-list span {
  color: var(--muted);
}

.source-list em {
  color: var(--ink);
  font-style: normal;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.language-stack {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.language-stack li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--canvas);
}

.language-stack li:nth-child(2) {
  margin-left: 14px;
}

.language-stack li:nth-child(3) {
  margin-left: 28px;
  background: var(--brand-soft);
}

.lang-tag {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: var(--brand-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--line);
}

.language-stack p {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.check-list {
  margin-top: auto;
  padding-top: 8px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 11px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.check-list li::before,
.extras li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.3 2.2 2.2 4.8-5' fill='none' stroke='%23126dcc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat,
    var(--brand-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  color: var(--text);
  background: var(--canvas-warm);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.chip-brand {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.chip-error {
  color: var(--error-strong);
  background: var(--error-soft);
}

.chip-aegean {
  color: var(--aegean);
  background: var(--aegean-soft);
  font-weight: 600;
}

.sign-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.sign-row li {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.sign-row img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.extras {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin-top: 40px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.extras li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}


/* Language ticker -------------------------------------------------------- */

.ticker {
  display: grid;
  gap: 14px;
  margin-top: clamp(56px, 7vw, 88px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-row {
  display: flex;
  width: max-content;
}

.ticker-track {
  display: flex;
  flex: none;
  gap: 14px;
  padding-right: 14px;
}

.ticker-track li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.ticker-row-reverse .ticker-track li {
  background: transparent;
}

.ticker-tag {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 700;
}

.ticker-row-reverse .ticker-tag {
  color: var(--aegean);
  background: var(--aegean-soft);
}
