/* ==========================================================================
   TRACE — home page
   The .hero-wash background-image itself is declared in home.html because
   it needs the {% static %} tag. Everything else lives here.
   ========================================================================== */

.fade-in { animation: fadeIn .3s ease-in; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-inner {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Hero wash ---------- */
.hero-wash {
  width: 100%;
  padding-bottom: 2.4rem;
  /* background-image: set in home.html via {% static %} */
}

.hero-block {
  text-align: center;
  padding-top: clamp(3rem, 12vh, 7rem);
  margin-bottom: 1.75rem;
}
.hero-block h1 {
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -.02em;
  margin-bottom: .4rem;
}
.hero-block h1 .accent {
  background: linear-gradient(135deg, var(--trace-blue-dark), var(--trace-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-block p {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0;
}

/* ---------- Prompt search ---------- */
.prompt-wrap { position: relative; }

.prompt-box {
  border: 1px solid #d0d5dd;
  border-radius: 1.15rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.prompt-box:focus-within {
  border-color: var(--trace-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12), 0 8px 24px rgba(16, 24, 40, .10);
}

.prompt-input-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .75rem .55rem 1.05rem;
}
.prompt-input-row i.bi-search {
  color: var(--text-muted);
  font-size: 1.05rem;
}
.prompt-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1.02rem;
  padding: .55rem 0;
}
.prompt-input::placeholder { color: #98a2b3; }

.prompt-send {
  width: 40px;
  height: 40px;
  border-radius: .8rem;
  border: 0;
  background: linear-gradient(135deg, var(--trace-blue-dark), var(--trace-blue));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: filter .15s ease;
}
.prompt-send:disabled { background: #e4e7ec; color: #98a2b3; }
.prompt-send:not(:disabled):hover { filter: brightness(1.1); }

/* Results expand inside the prompt box */
.prompt-results {
  border-top: 1px solid #eef1f5;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.prompt-results.open {
  max-height: 420px;
  overflow-y: auto;
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .8rem 1.05rem;
  text-decoration: none;
  color: var(--text-main);
  border-bottom: 1px solid #f2f4f7;
  transition: background .12s ease;
}
.result-item:last-child { border-bottom: 0; }
.result-item:hover { background: #f8fafc; }

.result-icon {
  width: 36px;
  height: 36px;
  border-radius: .5rem;
  flex-shrink: 0;
  background: #eef2ff;
  color: var(--trace-blue-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.result-title {
  font-weight: 600;
  font-size: .93rem;
  margin-bottom: .1rem;
}
.result-meta {
  font-size: .78rem;
  color: var(--text-muted);
}
.result-meta .sep { margin: 0 .35rem; }

.results-footer {
  padding: .6rem 1.05rem;
  font-size: .82rem;
  background: #f8fafc;
  border-top: 1px solid #eef1f5;
}
.results-empty {
  padding: 1.2rem 1.05rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
}

/* Suggestion chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: 1rem;
}
.chip {
  border: 1px solid #d0d5dd;
  background: #fff;
  color: var(--text-main);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover {
  border-color: var(--trace-blue);
  color: var(--trace-blue-dark);
  background: #f5f8ff;
}

/* ---------- Stats ---------- */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2.6rem 0 0;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--trace-blue-dark), var(--trace-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  font-size: .84rem;
  color: var(--text-muted);
}

/* ---------- About rows ---------- */
.about-card {
  margin-top: 2.6rem;
  border: 1px solid var(--sidebar-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  scroll-margin-top: 1.5rem;
}
.about-card .about-body { padding: 1.6rem 1.75rem; }
.about-card h5 { font-weight: 700; }
.about-card p {
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: .9rem;
}

/* ---------- Mobile ---------- */
@media (max-width: 991.98px) {
  .hero-block { padding-top: 2.2rem; }
  .prompt-results.open { max-height: 300px; }  /* leave room for the keyboard */
  .stats-row { gap: 1.75rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in { animation: none; }
  .prompt-results,
  .prompt-box,
  .chip { transition: none; }
}