/* The Home and CMS page components in one file (ADR 0138): the typewriter indicator, the stats indicator and the partner marquee, in the order the three files were loaded. Their JavaScript stays in typewriter.js and stats.js. */

/* Typewriter indicator (ported from the founder's design; no inline style, no external font). */
.live-indicator {
  display: inline-flex;
  align-items: center;
  position: relative;
  background-color: var(--tan);
  padding: 8px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--ink);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
  line-height: 1;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  font-family: var(--font-mono);
}
.live-text {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: pre;
  line-height: 1;
}
.live-cursor {
  color: var(--burnt-red);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  animation: blink 1s infinite step-end;
  transform: translateY(-1px);
}
.live-cursor.typing,
.live-indicator.paused .live-cursor {
  animation: none;
}
.live-measure {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
/* Dark mode: the light tan chip glares against a near-black page, so it becomes a dim tan. */
@media (prefers-color-scheme: dark) {
  .theme-base .live-indicator { background-color: #4a4530; border-color: var(--line); box-shadow: none; }
  .theme-base .live-text { color: #f6f3e2; }
  .theme-base .live-cursor { color: #ff9aa0; }
}
@media (max-width: 480px) {
  .live-text, .live-cursor { font-size: 13px; }
}
@media (max-width: 360px) {
  .live-text, .live-cursor { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-cursor { animation: none; }
  .live-indicator { transition: none; }
}

/* Stats indicator (ported from the founder's design). The server renders the final numbers. */
.pg-stats { display: flex; flex-direction: column; align-items: center; }
.stats-note { margin: 0 0 6px; font-style: italic; font-size: 0.8125rem; text-align: center; }
.stats-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background-color: var(--tan);
  padding: 20px 12px;
  border-radius: 5px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--card-border);
  max-width: 100%;
  box-sizing: border-box;
  font-family: var(--font-mono);
}
.stat-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0 20px;
}
.stat-block:not(:last-child) { border-right: 1px solid var(--ink); }
.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 36px;
  color: var(--burnt-red);
  line-height: 1.1;
  letter-spacing: -0.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
}
.stat-value.is-counting { opacity: 0.85; }
@media (max-width: 600px) {
  .stat-value { font-size: 28px; }
  .stat-label { font-size: 11px; }
  .stat-block { padding: 0 14px; }
}
@media (max-width: 360px) {
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 10px; letter-spacing: 1px; }
  .stat-block { padding: 0 8px; }
}

/* Partner marquee (ported from the founder's design): CSS-only animation, paused on hover or focus,
   still when the visitor prefers reduced motion. The same list renders twice for a seamless loop. */
.marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}
.marquee-group {
  display: flex;
  align-items: center;
  gap: 75px;
  padding: 0 75px 0 0;
  margin: 0;
  list-style: none;
}
.marquee-group img {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}
.marquee-group a { display: block; color: inherit; text-decoration: none; }
.partner-name {
  display: block;
  font: 700 1.125rem var(--font-heading);
  white-space: nowrap;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; }
  .marquee-group { flex-wrap: wrap; justify-content: center; gap: 24px 40px; padding: 0; }
  .marquee-group[aria-hidden="true"] { display: none; }
}
