/* /featured — the wall of directory badges. Builds on site.css (tokens, nav, topo, cta, footer). */

/* ---------- hero ---------- */
.fd-hero { position: relative; overflow: hidden; margin-top: -60px; padding: 168px 0 56px; text-align: center; }
.fd-hero__bg { position: absolute; inset: 0; --topo: url(../assets/topo/summit.svg); --hx: 50%; --hy: 78%; --hw: 44%; --hh: 66%; }
.fd-hero__bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(46% 40% at 50% 34%, rgba(19, 17, 28, 0.9), transparent), linear-gradient(180deg, rgba(19, 17, 28, 0.6), transparent 22%, transparent 70%, var(--bg)); }
.fd-hero__bg .survey { top: 104px; left: 32px; }
.fd-hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.fd-hero .eyebrow { --chip: 255 167 102; }
.fd-hero__title { font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 500; max-width: 14ch; text-wrap: balance; }
.fd-hero__title .text-ember { font-style: italic; padding-right: 0.06em; }
.fd-hero__sub { margin-top: 20px; max-width: 520px; color: var(--text-muted); font-size: clamp(16px, 1.4vw, 18px); font-weight: 500; text-wrap: pretty; }

/* ---------- filters ---------- */
.fd-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.fd-filter { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(19, 17, 28, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
.fd-filter span { font-family: var(--mono); font-size: 12px; color: var(--text-dim); transition: color 0.2s; }
.fd-filter:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.fd-filter[aria-pressed='true'] { color: #160a02; background: var(--ember-500); border-color: rgba(255, 255, 255, 0.15); }
.fd-filter[aria-pressed='true'] span { color: rgba(22, 10, 2, 0.6); }

/* ---------- wall ---------- */
.fd-wall { padding: 8px 0 clamp(64px, 8vw, 104px); }
.fd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }

/* Each card is a dark plate. The ember edge (same conic ring as the hero launch box) lights up on hover. */
.fd-card { --edge: conic-gradient(from var(--launch-a), rgba(255, 255, 255, 0.08) 0 55%, rgba(255, 107, 0, 0.9) 70%, #ffc98f 76%, rgba(255, 107, 0, 0.9) 82%, rgba(255, 255, 255, 0.08) 97%); position: relative; border-radius: 14px; padding: 1px; background: var(--border); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); animation: fd-rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
.fd-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--edge); opacity: 0; transition: opacity 0.35s var(--ease); }
.fd-card[hidden] { display: none; }
.fd-card__link { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 13px; background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated)); overflow: hidden; }
/* a faint heat glow under the badge, warmer on hover */
.fd-card__link::before { content: ''; position: absolute; left: 50%; top: 52%; width: 120%; height: 90%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 107, 0, 0.1), transparent); opacity: 0.6; transition: opacity 0.35s var(--ease); pointer-events: none; }
.fd-card__plate { position: relative; display: grid; place-items: center; height: 116px; padding: 20px 22px 12px; }
.fd-card__badge { max-width: 100%; max-height: 58px; width: auto; height: auto; object-fit: contain; transition: transform 0.35s var(--ease), filter 0.35s var(--ease); filter: saturate(0.9); }
.fd-card__badge--invert { filter: invert(1) hue-rotate(180deg) saturate(0.9); }
.fd-card__name { font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; text-align: center; color: rgba(255, 255, 255, 0.88); }
.fd-card__plate:has(img) .fd-card__name { display: none; }
.fd-card__meta { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); }
.fd-card__domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.fd-card__cat { margin-left: auto; flex: none; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.fd-card__out { flex: none; color: var(--text-dim); transition: color 0.2s, transform 0.3s var(--ease); }

.fd-card:hover, .fd-card:focus-within { transform: translateY(-3px); }
.fd-card:hover::before, .fd-card:focus-within::before { opacity: 1; animation: launch-spin 3.2s linear infinite; }
.fd-card:hover .fd-card__link::before { opacity: 1; }
.fd-card:hover .fd-card__badge { transform: scale(1.04); filter: none; }
.fd-card:hover .fd-card__badge--invert { filter: invert(1) hue-rotate(180deg); }
.fd-card:hover .fd-card__out { color: var(--ember-400); transform: translate(1px, -1px); }
.fd-card__link:focus-visible { outline-offset: 3px; border-radius: 13px; }

/* spotlight: the rest of the wall dims while you point at one card */
@media (hover: hover) {
  .fd-grid:has(.fd-card:hover) .fd-card:not(:hover) { opacity: 0.45; }
}

.fd-note { margin-top: 40px; text-align: center; color: var(--text-dim); font-size: 14px; }
.fd-note a { color: var(--text-muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 4px; }
.fd-note a:hover { color: var(--text); }

@keyframes fd-rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .fd-card { animation: none; transition: none; }
  .fd-card:hover, .fd-card:focus-within { transform: none; }
  .fd-card:hover::before, .fd-card:focus-within::before { animation: none; }
}

@media (max-width: 560px) {
  .fd-hero { padding: 128px 0 40px; }
  .fd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fd-card__plate { height: 92px; padding: 14px 12px 8px; }
  .fd-card__badge { max-height: 44px; }
  .fd-card__name { font-size: 18px; }
  .fd-card__cat { display: none; }
}

/* logo-only badges get the directory name beside the logo */
.fd-card__plate--label { display: flex; align-items: center; justify-content: center; gap: 12px; }
.fd-card__plate--label .fd-card__badge { max-height: 40px; }
.fd-card__plate--label:has(img) .fd-card__name { display: block; }
@media (max-width: 560px) {
  .fd-card__out { margin-left: auto; }
  .fd-card__plate--label { gap: 8px; }
  .fd-card__plate--label .fd-card__badge { max-height: 28px; }
  .fd-card__plate--label .fd-card__name { font-size: 16px; }
}
