/* Proud Of Us · Finder
   Shared hero and search/filter bar for the Archive and For Teachers pages.
   Desktop: a sticky bar with search plus dropdown filters.
   Phones: search stays sticky, filters open in a bottom sheet. */

/* ---------- Hero ---------- */
.fhero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(460px, 68vh, 680px);
  display: flex; align-items: flex-end;
  background: var(--bg-deep);
}
.fhero__media, .fhero__media > img, .fhero__media > video {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.fhero__media { z-index: -2; }
.fhero__media > img, .fhero__media > video { object-fit: cover; object-position: var(--fhero-pos, 60% 50%); }
.fhero__media > video { opacity: 0; transition: opacity 1.2s ease; }
.fhero__media > video.is-playing { opacity: 1; }
.fhero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6,6,10,0.92) 0%, rgba(6,6,10,0.72) 34%, rgba(6,6,10,0.15) 66%, rgba(6,6,10,0) 100%),
    linear-gradient(180deg, rgba(6,6,10,0.35) 0%, rgba(6,6,10,0) 30%, rgba(6,6,10,0) 62%, var(--bg-deep) 100%);
}
.fhero__in {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 140px 32px 110px;
}
.fhero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px;
  color: var(--gold); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
}
.fhero__eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
.fhero h1 {
  font-size: clamp(2.5rem, 6vw, 4.6rem); line-height: 1; margin: 0 0 16px; max-width: 13ch;
  text-wrap: balance; text-shadow: 0 4px 30px rgba(0,0,0,0.55);
}
.fhero__lead { max-width: 560px; color: var(--text-primary); opacity: 0.92; font-size: 1.05rem; line-height: 1.6; text-shadow: 0 2px 14px rgba(0,0,0,0.6); }
.fhero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.fhero__fact {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 100px;
  background: rgba(6,6,10,0.55); border: 1px solid rgba(232,184,74,0.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary); font-size: 0.82rem;
}
.fhero__fact[hidden] { display: none; }
.fhero__fact b { color: var(--heading); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Finder bar ---------- */
.finder-wrap { position: sticky; top: 70px; z-index: 60; margin-top: -58px; padding: 0 24px; }
.finder {
  max-width: 1192px; margin: 0 auto; padding: 12px;
  border-radius: 20px; background: rgba(14,14,21,0.9); border: 1px solid var(--border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.finder__top { display: flex; gap: 10px; align-items: center; }
.fsearch { position: relative; flex: 1 1 auto; min-width: 0; }
.fsearch svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.fsearch input {
  width: 100%; height: 50px; padding: 0 92px 0 46px; border-radius: 14px;
  background: var(--bg-elevated); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-primary); font: 400 1rem/1 Inter, system-ui, sans-serif;
  -webkit-appearance: none; appearance: none;
}
.fsearch input::-webkit-search-cancel-button { display: none; }
.fsearch input::placeholder { color: var(--text-muted); }
.fsearch input:focus { outline: none; border-color: var(--gold-glow); box-shadow: 0 0 0 3px rgba(232,184,74,0.12); }
.fsearch__clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: none; padding: 6px 10px; border-radius: 9px; border: 0; cursor: pointer;
  background: rgba(255,255,255,0.08); color: var(--text-secondary); font: 600 0.74rem/1 Inter, sans-serif;
}
.fsearch.has-value .fsearch__clear { display: block; }
.fsearch__key {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.14);
  color: var(--text-muted); font: 600 0.72rem/1 Inter, sans-serif; pointer-events: none;
}
.fsearch.has-value .fsearch__key { display: none; }
.fbtn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 18px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); background: var(--bg-elevated);
  color: var(--text-primary); font: 600 0.88rem/1 Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.fbtn:hover { border-color: var(--gold-glow); color: var(--gold); }
.fbtn--gold { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%); color: #14110a; border-color: transparent; }
.fbtn--gold:hover { color: #14110a; transform: translateY(-1px); }
.fbtn__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: #14110a; font-size: 0.72rem; }
.fbtn__n:empty { display: none; }
.fsheet-open { display: none; }

.finder__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fdrop { position: relative; }
.fdrop__btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px 0 14px; border-radius: 11px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: var(--text-secondary); font: 500 0.84rem/1 Inter, system-ui, sans-serif; cursor: pointer; white-space: nowrap;
}
.fdrop__btn:hover, .fdrop.is-open .fdrop__btn { border-color: var(--gold-glow); color: var(--heading); }
.fdrop.is-set .fdrop__btn { border-color: var(--gold); background: var(--gold-dim); color: var(--gold); }
.fdrop__btn b { font-weight: 600; color: var(--heading); }
.fdrop.is-set .fdrop__btn b { color: var(--gold); }
.fdrop__btn svg { opacity: 0.6; transition: transform 0.2s; }
.fdrop.is-open .fdrop__btn svg { transform: rotate(180deg); }
.fdrop__menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 80; min-width: 230px; max-height: min(420px, 60vh); overflow-y: auto;
  padding: 6px; border-radius: 14px; background: #12121a; border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.fdrop__menu[hidden] { display: none; }
.fopt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 9px; border: 0;
  background: none; color: var(--text-secondary); font: 500 0.88rem/1.25 Inter, system-ui, sans-serif; text-align: left; cursor: pointer;
}
.fopt:hover, .fopt:focus-visible { background: rgba(255,255,255,0.05); color: var(--heading); outline: none; }
.fopt[aria-selected="true"] { color: var(--gold); }
.fopt[aria-selected="true"]::after { content: "✓"; margin-left: auto; font-weight: 700; }
.fopt img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.fopt small { display: block; color: var(--text-muted); font-size: 0.74rem; margin-top: 2px; }

.fseg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.fseg button { height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: none; color: var(--text-secondary); font: 500 0.82rem/1 Inter, sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fseg button[aria-pressed="true"] { background: var(--gold-dim); color: var(--gold); font-weight: 600; }
.finder__spacer { flex: 1 1 auto; }
.finder__count { color: var(--text-muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.finder__count b { color: var(--heading); font-weight: 600; }

.factive { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.factive:empty { display: none; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 100px; border: 1px solid var(--gold-glow);
  background: var(--gold-dim); color: var(--gold); font: 600 0.78rem/1 Inter, sans-serif; cursor: pointer;
}
.fchip span { font-size: 0.95rem; line-height: 0.6; opacity: 0.8; }
.fclear { border: 0; background: none; color: var(--text-muted); font: 500 0.78rem/1 Inter, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.fclear:hover { color: var(--heading); }

/* ---------- Bottom sheet (phones) ---------- */
.fsheet { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; background: rgba(0,0,0,0.6); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.fsheet.is-open { opacity: 1; pointer-events: auto; }
.fsheet__panel {
  width: 100%; max-height: 86vh; display: flex; flex-direction: column;
  background: #101018; border-top: 1px solid var(--border); border-radius: 22px 22px 0 0;
  transform: translateY(100%); transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.fsheet.is-open .fsheet__panel { transform: none; }
.fsheet__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.fsheet__head h2 { font-size: 1.35rem; margin: 0; }
.fsheet__x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); background: none; color: var(--text-primary); font-size: 1.3rem; cursor: pointer; }
.fsheet__body { overflow-y: auto; padding: 4px 20px 16px; }
.fsheet__group { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.fsheet__group:last-child { border-bottom: 0; }
.fsheet__label { display: block; margin-bottom: 10px; color: var(--text-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.fsheet__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fsheet__chips .fopt { width: auto; padding: 9px 14px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); font-size: 0.86rem; }
.fsheet__chips .fopt[aria-selected="true"] { border-color: var(--gold); background: var(--gold-dim); }
.fsheet__chips .fopt[aria-selected="true"]::after { content: none; }
.fsheet__chips .fopt small { display: none; }
.fsheet__foot { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid rgba(255,255,255,0.06); }
.fsheet__foot .fbtn { flex: 1; justify-content: center; height: 48px; }
body.fsheet-lock { overflow: hidden; }

/* ---------- Results ---------- */
.fresults { max-width: 1240px; margin: 0 auto; padding: 34px 24px 40px; }
.fstrip { margin: 0 0 30px; }
.fstrip__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fstrip__head h2 { font-size: 1.4rem; margin: 0; display: flex; align-items: center; gap: 10px; }
.fstrip__head h2 em { font-style: normal; font-family: Inter, sans-serif; font-size: 0.64rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #14110a; background: var(--gold); padding: 4px 9px; border-radius: 100px; }
.fstrip__head span { color: var(--text-muted); font-size: 0.82rem; }
.fstrip__row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.fstrip__row > * { scroll-snap-align: start; }
.fmore { display: flex; justify-content: center; padding: 26px 0 6px; }
.fempty { text-align: center; padding: 70px 20px; color: var(--text-secondary); }
.fempty b { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.6rem; color: var(--heading); margin-bottom: 8px; }

@media (max-width: 860px) {
  .finder__row .fdrop, .finder__row .fseg--progress, .finder__row .fseg--sort { display: none; }
  .fsheet-open { display: inline-flex; }
}
@media (max-width: 640px) {
  .fhero { min-height: 0; }
  .fhero__in { padding: 120px 18px 92px; }
  .fhero::before { background: linear-gradient(180deg, rgba(6,6,10,0.35) 0%, rgba(6,6,10,0.25) 30%, rgba(6,6,10,0.82) 68%, var(--bg-deep) 100%); }
  .fhero__lead { font-size: 0.95rem; }
  .fhero__eyebrow { letter-spacing: 0.14em; font-size: 0.68rem; }
  .fhero__eyebrow::before { display: none; }
  .fhero__media > img { object-position: var(--fhero-pos-m, 50% 50%); }
  .fstrip__head span { display: none; }
  .fhero__fact { padding: 6px 11px; font-size: 0.76rem; }
  .finder-wrap { top: 62px; padding: 0 10px; margin-top: -46px; }
  .finder { padding: 8px; border-radius: 16px; }
  .fsearch input { height: 46px; font-size: 16px; padding-right: 64px; }
  .fsearch__key { display: none; }
  .fbtn { height: 46px; padding: 0 14px; }
  .finder__top .fbtn--gold .fbtn__txt { display: none; }
  .finder__row { margin-top: 8px; }
  .fresults { padding: 26px 14px 30px; }
  .fstrip__row { grid-auto-columns: 78%; }
}
@media (prefers-reduced-motion: reduce) {
  .fsheet, .fsheet__panel { transition: none; }
}
