/* assets/finder.css — the hidden search on the landing page.
   Invisible until someone types; then the page fades to 50% and the box appears dead center. */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Everything behind the search fades to 50% while searching */
.wrap { transition: opacity .35s ease; }
body.finding .wrap { opacity: .5; }

/* Full-screen layer that holds the search box in the exact middle */
.finder {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
body.finding .finder { opacity: 1; pointer-events: auto; }

/* Search box (Vice Advice gold on black) */
.search {
  position: relative;
  width: 100%;
  max-width: 584px;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 24px;
  transform: translateY(-50%);
  color: var(--fg);
  opacity: .7;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 48px;
  padding: 0 20px 0 48px;
  font-family: var(--font-text);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: .03em;
  color: var(--fg);
  caret-color: var(--fg);
  background: #0b0a08;
  border: 1px solid rgba(201, 172, 96, .35);
  border-radius: 24px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(201, 172, 96, .14);
}
.search input::-webkit-search-cancel-button { display: none; }

/* Suggestions float below the box and never push it */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(40vh, 420px);
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0b0a08;
  border: 1px solid rgba(201, 172, 96, .2);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
}
.search-results:empty { display: none; }
.search-results a.result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
}
.search-results a.result:hover,
.search-results a.result:focus,
.search-results a.result.active {
  background: rgba(201, 172, 96, .08);
  outline: none;
}
.result-name { color: #ece2c6; font-size: 15px; font-weight: 300; }
.result-addr { color: var(--fg); opacity: .65; font-size: 12px; letter-spacing: .04em; }
/* "did you mean" / "nothing here yet" — small tracked capitals, like the site's headings */
.search-results .note {
  margin: 0;
  padding: 12px 16px 8px;
  font-family: var(--font-text);
  font-weight: 300;
  font-style: normal;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(201, 172, 96, .75);
}

/* Glow hint: a soft gold light runs once around the outline of the hidden box (timing in assets/finder.js) */
.trace { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; }
.trace svg:not(.trace-icon) { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trace-icon { position: absolute; width: 18px; height: 18px; transform: translateY(-50%); color: var(--fg); opacity: .45; }
/* the hint line, typed where the visitor's own text would go */
.trace-text { position: absolute; box-sizing: border-box; display: flex; align-items: center; padding: 0 20px 0 48px; overflow: hidden; white-space: nowrap;
  font-family: var(--font-text); font-weight: 300; font-size: 16px; letter-spacing: .03em; color: #ece2c6; }
.trace-text[hidden] { display: none; }
.trace-caret { display: inline-block; width: 1px; height: 1.1em; margin-left: 2px; background: var(--fg); animation: trace-blink 1s steps(1) infinite; }
@keyframes trace-blink { 50% { opacity: 0; } }
.trace path { fill: none; stroke-linecap: round; }
/* dark glass box, like the real search box, so the sample search reads on any image */
.trace path.trace-ghost { fill: rgba(11, 10, 8, .82); stroke: rgba(201, 172, 96, .35); stroke-width: 1; }
.trace-glow { stroke: rgba(201, 172, 96, .35); stroke-width: 6; filter: blur(4px); }
.trace-tail { stroke: rgba(201, 172, 96, .75); stroke-width: 1.2; }
.trace-head { stroke: #ece2c6; stroke-width: 1.6; filter: drop-shadow(0 0 3px rgba(236, 226, 198, .8)); }
body.finding .trace { display: none; }

@media (prefers-reduced-motion: reduce) {
  .wrap, .finder { transition: none; }
}
