/* THP Social Ticker — lightweight, embed-safe */
.thp-ticker {
  --thp-bg: rgba(10, 22, 40, 0.92);
  --thp-fg: #f5f7fa;
  --thp-muted: #a8b3c5;
  --thp-accent: #37ca37;
  --thp-sep: rgba(255, 255, 255, 0.18);
  --thp-speed: 55s; /* full loop duration; JS may override from data-speed */
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  background: var(--thp-bg);
  color: var(--thp-fg);
  border-top: 1px solid var(--thp-sep);
  border-bottom: 1px solid var(--thp-sep);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  z-index: 9998;
}

.thp-ticker *,
.thp-ticker *::before,
.thp-ticker *::after {
  box-sizing: border-box;
}

.thp-ticker__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: thp-ticker-scroll var(--thp-speed) linear infinite;
  will-change: transform;
}

.thp-ticker:hover .thp-ticker__track,
.thp-ticker:focus-within .thp-ticker__track {
  animation-play-state: paused;
}

@keyframes thp-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.thp-ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--thp-sep);
  max-width: min(92vw, 720px);
}

.thp-ticker__item:hover,
.thp-ticker__item:focus-visible {
  background: rgba(55, 202, 55, 0.12);
  outline: none;
}

.thp-ticker__logo {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #1d3557;
  padding: 2px;
}

.thp-ticker__logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.thp-ticker__meta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.thp-ticker__platform {
  font-weight: 700;
  color: var(--thp-accent);
}

.thp-ticker__name {
  font-weight: 600;
}

.thp-ticker__handle {
  color: var(--thp-muted);
  font-weight: 500;
}

.thp-ticker__sep {
  color: var(--thp-muted);
  flex: 0 0 auto;
  opacity: 0.85;
}

.thp-ticker__text {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--thp-fg);
  opacity: 0.95;
}

.thp-ticker__status {
  padding: 0.55rem 1rem;
  color: var(--thp-muted);
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .thp-ticker__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    max-height: 7.5rem;
    overflow-y: auto;
  }
  .thp-ticker__item {
    white-space: normal;
    border-right: none;
    border-bottom: 1px solid var(--thp-sep);
    max-width: 100%;
  }
}

/* ——— Phone hero fix (2026-10-08) ———
   The homepage hero photo has the gold "The Healthy Pitmaster" script baked into
   the left side of a wide 16:9 image. On phones the hero box was forced tall
   (~640px), so the photo was zoomed ~3x and centered: the script was cut off on
   the left and Jim was pushed off to the right. On screens 860px and narrower,
   show the whole photo across the top at its real shape, then the headline and
   Start Here button underneath. Desktop (wider than 860px) is untouched.
   Scoped to the homepage hero only (matched by its photo label). */
@media (max-width: 860px) {
  .hero:has(> .hero-bg[aria-label="Jim Grasser in a professional kitchen"]) {
    min-height: 0 !important;
    height: auto !important;
    padding-top: calc(100vw * 941 / 1672 - 1.25rem) !important;
    background: #050505 !important;
  }
  .hero > .hero-bg[aria-label="Jim Grasser in a professional kitchen"] {
    inset: 0 0 auto 0 !important;
    bottom: auto !important;
    height: auto !important;
    aspect-ratio: 1672 / 941 !important;
    background-size: 100% auto !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
  }
  .hero > .hero-bg[aria-label="Jim Grasser in a professional kitchen"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 32%;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.85) 75%, #050505 100%);
    pointer-events: none;
  }
}
