/* Search homepage (.s-) — also hosts the shared multicolour logo letters. */

/* ---------- logo (also used in the results header) ---------- */
.s-logo {
  display: inline-flex; align-items: baseline; justify-content: center;
  font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.04em;
  line-height: 1; white-space: nowrap; user-select: none;
}
.s-logo-l { display: inline-block; }
.s-logo-sp { display: inline-block; width: 0.28em; }
.s-c1 { color: var(--c-logo-1); }
.s-c2 { color: var(--c-logo-2); }
.s-c3 { color: var(--c-logo-3); }
.s-c4 { color: var(--c-logo-4); }

/* ---------- page ---------- */
body[data-view="search"] { background: var(--c-bg); }

.s-page {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.s-top {
  display: flex; justify-content: flex-end;
  padding: 14px var(--gutter) 0;
}
.s-top-pill {
  font-size: 13px; color: var(--c-muted);
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--c-surface); border: 1px solid var(--c-border);
}

.s-main {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 var(--gutter);
  padding-top: clamp(64px, 20vh, 190px);
}

.s-h1 { margin: 0 0 28px; font-size: clamp(56px, 18vw, 92px); line-height: 1; }
.s-h1 .s-logo-l {
  animation: s-bounce 720ms var(--ease-spring) both;
  animation-delay: calc(var(--i) * 60ms + 80ms);
}
@keyframes s-bounce {
  0% { opacity: 0; transform: translateY(-0.45em) scale(0.85); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* ---------- form ---------- */
.s-form { width: 100%; max-width: 584px; display: flex; flex-direction: column; align-items: center; }

.s-box {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 16px 0 18px;
  border: 1px solid var(--c-border); border-radius: var(--radius-pill);
  background: var(--c-bg);
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.s-box:hover, .s-box:focus-within { box-shadow: var(--shadow-1); border-color: transparent; }
.s-box--err { border-color: #f1b5ae; }
.s-box--err:focus-within { box-shadow: 0 1px 6px rgba(232, 87, 74, 0.35); }
.s-box--shake { animation: s-shake 520ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes s-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.s-ico { flex: none; color: #9aa0a6; }
.s-box--busy .s-ico { color: var(--c-logo-1); }

.s-input {
  flex: 1; min-width: 0;
  height: 50px; padding: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 17px; color: var(--c-text);
  -webkit-appearance: none; appearance: none;
}
.s-input::placeholder { color: #8c9196; }
.s-input::-webkit-search-cancel-button, .s-input::-webkit-search-decoration { -webkit-appearance: none; }
/* the box draws the focus ring for the input */
.s-input:focus-visible { outline: none; }
.s-box:has(.s-input:focus-visible) { box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.35), var(--shadow-1); }

.s-spin {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--c-border); border-top-color: var(--c-logo-1); border-right-color: var(--c-logo-2);
  animation: spin 0.7s linear infinite;
}

.s-btns {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 28px;
}
.s-btn {
  min-height: 40px; padding: 0 18px;
  border: 1px solid var(--c-surface); border-radius: 8px;
  background: var(--c-surface); color: #3c4043; font-size: 14px;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms var(--ease-out);
}
.s-btn:hover { border-color: var(--c-border); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); }
.s-btn:active { transform: scale(0.97); }
.s-btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- "no results" block ---------- */
.s-err { width: 100%; margin-top: 26px; }
.s-err-card {
  text-align: left; font-size: 15px; color: var(--c-text);
  padding: 4px 4px 0;
  animation: fade-up 380ms var(--ease-out) both;
}
.s-err-card p { margin: 0 0 10px; }
.s-err-q { overflow-wrap: anywhere; }
.s-err-q b { font-weight: 700; color: var(--c-link); }
.s-err-msg {
  padding: 12px 14px; border-radius: var(--radius);
  background: #fef6e0; color: #5c4400; border: 1px solid #f7e2a6;
}
.s-err-sub { color: var(--c-muted); margin-top: 14px !important; }
.s-err-list { margin: 0; padding-left: 22px; color: var(--c-muted); }
.s-err-list li { margin: 2px 0; }

/* ---------- footer ---------- */
.s-foot {
  margin-top: 48px;
  background: var(--c-surface); border-top: 1px solid var(--c-border);
  color: var(--c-muted); font-size: 13px;
  padding-bottom: env(safe-area-inset-bottom);
}
.s-foot-row { padding: 12px var(--gutter); }
.s-foot-row + .s-foot-row { border-top: 1px solid var(--c-border); }
.s-foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }

@media (min-width: 720px) {
  .s-foot { display: flex; justify-content: space-between; align-items: center; }
  .s-foot-row + .s-foot-row { border-top: 0; }
  .s-foot-row { padding: 14px 28px; }
}
