/* ==========================================================================
   Start page and form refresh. Loaded after style.css on the home page and
   the intake forms, so these rules win. Matches the results page: one
   clean font, sentence case, calmer labels, a deeper red for buttons.
   ========================================================================== */

:root {
  --iq-red-text: #FF6B70;
  --iq-red-button: #C8102E;
  --iq-text-soft: #C8C8C8;
  --iq-text-meta: #A8A8A8;
}

/* ---------- Hero ---------- */
.hero { padding: 1.5rem 2rem 3.5rem; }
.hero::before { display: none; }

.hero .eyebrow {
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--iq-text-meta);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-transform: none;
  margin-bottom: 1rem;
}
.hero h1 .accent { color: var(--iq-red-text); }

.hero p.sub { font-size: 1.05rem; color: var(--iq-text-meta); }

/* ---------- Company search ---------- */
.unified-search-wrap { margin-top: 2.25rem; }
.unified-search-input {
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  border: 1px solid #333;
  border-radius: 12px;
  text-align: left;
}
.unified-search-input::placeholder { color: #8A8A8A; }
.unified-search-input:focus {
  border-color: var(--iq-red-text);
  box-shadow: 0 0 0 4px rgba(255, 107, 112, 0.12);
}
.unified-search-results .result-row { border-radius: 10px; }
.unified-search-results .rc { font-family: var(--font-body); font-size: 0.85rem; color: var(--iq-text-meta); }
.scratch-link { margin-top: 1.1rem; font-size: 0.9rem; color: var(--iq-text-meta); }
.scratch-link .arrow { color: var(--iq-red-text); }

.data-source {
  max-width: 560px;
  margin-top: 3rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #8A8A8A;
}
.data-source a { color: var(--iq-text-meta); }

/* ---------- Forms ---------- */
.flow-wrap .eyebrow {
  font-family: var(--font-body);
  font-size: 0.92rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--iq-text-meta);
}
.flow-h1 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  text-transform: none;
}
.flow-sub { color: var(--iq-text-meta); }

.flow-form { gap: 1.35rem; }
.field-label { font-size: 0.88rem; font-weight: 500; color: var(--off-white); }
.field-label .src,
.field-label.new .src,
.field-label.suggested .src,
.field-label.confirmed .src,
.field-label.info .src {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: var(--iq-text-meta);
}

.field-card { border-radius: 12px; padding: 1.35rem 1.5rem; }

select, input[type="text"], input[type="number"], input[type="email"], input[type="tel"] {
  border-color: #333;
  border-radius: 8px;
  min-height: 46px;
}
select:focus, input:focus { border-color: var(--iq-red-text); }

.checkbox-option { font-size: 0.92rem; }
.checkbox-option input[type="checkbox"]:checked {
  background: var(--iq-red-button);
  border-color: var(--iq-red-button);
}

.submit-btn {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  min-height: 50px;
  border-radius: 10px;
  background: var(--iq-red-button);
}
.submit-btn:hover { background: #A50D26; }

.flow-alt-link:hover { color: var(--white); }

/* ---------- Moving background on the start page ----------
   Columns of real programs drift upward behind the hero, and a few light
   up as a "match" now and then. Decorative only (aria-hidden), and it
   stops for anyone who has reduced motion turned on. */
.hero {
  max-width: none;
  min-height: calc(100vh - 78px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.hero h1, .hero .eyebrow, .hero p.sub { max-width: 780px; margin-left: auto; margin-right: auto; }
.hero .unified-search-wrap { width: 100%; }
.hero .data-source { width: 100%; }

.live-bg {
  position: absolute !important;
  inset: 0;
  z-index: 0 !important;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0 1.5rem;
  overflow: hidden;
  pointer-events: none;
}
.live-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 62% at 50% 50%, rgba(10,10,10,0.98) 0%, rgba(10,10,10,0.95) 50%, rgba(10,10,10,0.7) 80%, rgba(10,10,10,0.5) 100%),
    linear-gradient(to bottom, rgba(10,10,10,1) 0%, rgba(10,10,10,0) 18%, rgba(10,10,10,0) 82%, rgba(10,10,10,1) 100%);
}
.live-col { overflow: hidden; }
.live-track {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: liveScroll 70s linear infinite;
}
.live-col:nth-child(2) .live-track { animation-duration: 90s; }
.live-col:nth-child(3) .live-track { animation-duration: 80s; animation-delay: -20s; }
.live-col:nth-child(4) .live-track { animation-duration: 100s; animation-delay: -35s; }
@keyframes liveScroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

.live-card {
  background: #121212;
  border: 1px solid #242424;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}
.live-card .live-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.live-card .live-type { font-size: 0.72rem; color: #8A8A8A; }
.live-card .live-chip {
  font-size: 0.68rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--iq-red-button);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  opacity: 0;
}
.live-card .live-name { font-size: 0.86rem; font-weight: 500; color: #B0B0B0; line-height: 1.35; }
.live-card .live-where { font-size: 0.72rem; color: #8A8A8A; }

/* Every few cards "match" in turn */
.live-card.live-hit { animation: liveHit 12s ease-in-out infinite; }
.live-card.live-hit .live-chip { animation: liveChip 12s ease-in-out infinite; }
.live-col:nth-child(1) .live-hit { animation-delay: 0s; }
.live-col:nth-child(2) .live-hit { animation-delay: 3s; }
.live-col:nth-child(3) .live-hit { animation-delay: 6s; }
.live-col:nth-child(4) .live-hit { animation-delay: 9s; }
.live-col .live-hit .live-chip { animation-delay: inherit; }
@keyframes liveHit {
  0%, 62%, 100% { border-color: #242424; box-shadow: none; }
  70%, 86% { border-color: rgba(255, 107, 112, 0.7); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.18); }
}
@keyframes liveChip {
  0%, 64%, 100% { opacity: 0; }
  72%, 86% { opacity: 1; }
}

@media (max-width: 760px) {
  .live-bg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-col:nth-child(n+3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live-track, .live-card.live-hit, .live-card.live-hit .live-chip { animation: none; }
}
