/* effects-one.css — chrome for the ONE effects library page (2026-10-05).
   Jump bar, stars on every tile, the sticky "reach out" bar + form, and the
   off-screen pause. Tokens come from effects.html (--bg, --accent-1, ...). */

/* lab tiles sit in a display:contents wrapper: it is the @scope root for that
   lab's CSS, and stays invisible to the grid. */
.fxl { display: contents; }
@media (max-width: 720px) { .fx-grid > .fxl > .fx-tile { margin-bottom: 0.7rem; } }

/* scroll demos lock inside their tile (Eric 09-29) */
.fx-tile .sc-lock { overscroll-behavior: contain; }

/* off-screen tiles: CSS loops pause (the JS conductors already pause theirs) */
.one-off *, .one-off *::before, .one-off *::after { animation-play-state: paused !important; }

.one-count {
  margin-top: 1.1rem; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted);
}

/* ---------- category jump bar ---------- */
.one-jump {
  position: sticky; top: 0; z-index: 20;
  padding: 0.6rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-block: 1px solid var(--edge);
}
.one-jump-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem; max-width: 96rem; margin: 0 auto; }
.one-jump-row a {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 40px;
  padding: 0.35rem 0.85rem; border: 1px solid var(--edge); border-radius: var(--radius-btn, 0);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-muted); text-decoration: none; white-space: nowrap;
  transition: color var(--dur-quick) var(--ease), border-color var(--dur-quick) var(--ease), background var(--dur-quick) var(--ease);
}
.one-jump-row a .n { font-size: 0.64rem; opacity: 0.65; }
.one-jump-row a:hover { color: var(--ink); border-color: var(--accent-edge); }
.one-jump-row a.is-on { background: var(--accent-1); border-color: var(--accent-1); color: var(--btn-ink, #0d0d12); }
.one-jump-btn { display: none; }
@media (max-width: 720px) {
  .one-jump { padding: 0.5rem 1rem; }
  .one-jump-row { display: none; }
  .one-jump-btn {
    display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 0.6rem;
    padding: 0.4rem 0.9rem; border: 1px solid var(--edge); background: var(--surface); color: var(--ink);
    font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  }
  .one-jump-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.one-cat { scroll-margin-top: var(--jump-h, 64px); }
main#lab .fx-tile { scroll-margin-top: calc(var(--jump-h, 64px) + 12px); }

/* ---------- star on every tile ---------- */
.one-star {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; margin: -0.35rem 0;
  border: 1px solid var(--edge); background: var(--surface-2); color: var(--ink-muted);
  cursor: pointer; transition: transform 0.15s var(--ease), border-color 0.15s, background 0.15s, color 0.15s;
}
.one-star svg { width: 18px; height: 18px; display: block; }
.one-star svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.one-star:hover { color: #ffd166; border-color: #ffd166; transform: scale(1.06); }
.one-star[aria-pressed="true"] { background: #ffd166; border-color: #ffd166; color: #1d1600; }
.one-star[aria-pressed="true"] svg path { fill: currentColor; }
.one-star.pop { animation: one-pop 0.35s var(--ease); }
@keyframes one-pop { 40% { transform: scale(1.22); } }
.fx-tile.is-starred { border-color: color-mix(in srgb, #ffd166 55%, var(--edge)); }
.fx-tile.one-shared { outline: 2px solid #ffd166; outline-offset: 3px; }

/* ---------- sticky "reach out" bar ---------- */
.one-bar {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  width: min(760px, calc(100% - 24px)); transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.55rem 0.55rem 1rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid #ffd166; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease); opacity: 0; pointer-events: none;
}
.one-bar.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.one-bar-count {
  flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px;
  border-radius: 50%; background: #ffd166; color: #1d1600; font: 700 0.85rem/1 var(--mono);
}
.one-bar-text { flex: 1 1 auto; min-width: 0; font-size: 0.9rem; line-height: 1.3; color: var(--ink); }
.one-bar-text small { display: block; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.one-bar-go {
  flex: 0 0 auto; min-height: 44px; padding: 0 1.1rem; border: 0; background: #ffd166; color: #1d1600;
  font: 700 0.78rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.one-bar-go:hover { filter: brightness(1.08); }
@media (max-width: 520px) {
  .one-bar { gap: 0.6rem; padding-left: 0.6rem; }
  .one-bar-text { font-size: 0.8rem; }
  .one-bar-text small { display: none; }
  .one-bar-go { padding: 0 0.8rem; font-size: 0.7rem; }
}
body.one-has-bar .lab-footer { padding-bottom: 6.5rem; }

/* ---------- modals (form + phone category list) ---------- */
.one-ov {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  padding: clamp(10px, 3vw, 28px); background: rgba(4, 4, 9, 0.78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); overscroll-behavior: contain;
}
.one-ov.on { display: flex; }
.one-panel {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--edge); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: clamp(18px, 4vw, 30px); animation: one-in 0.24s var(--ease);
}
@keyframes one-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
.one-x {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; border: 1px solid var(--edge); background: transparent;
  color: var(--ink-muted); font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.one-x:hover { color: var(--ink); border-color: var(--accent-edge); }
.one-panel h2 {
  margin: 0 46px 0.35rem 0; font-family: var(--display); font-weight: var(--display-weight, 800);
  letter-spacing: var(--display-tracking, -0.02em); font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.05;
}
.one-panel .one-lede { margin: 0 0 1.1rem; color: var(--ink-muted); font-size: 0.92rem; }
.one-picks { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.one-picks li {
  display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%;
  padding: 0.2rem 0.25rem 0.2rem 0.65rem; border: 1px solid color-mix(in srgb, #ffd166 60%, var(--edge));
  font-size: 0.8rem; color: var(--ink);
}
.one-picks li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.one-picks button {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 0.9rem; line-height: 1;
}
.one-picks button:hover { color: var(--accent-2); }
.one-picks .one-none { border: 0; padding: 0; color: var(--ink-muted); }
.one-form { display: grid; gap: 0.8rem; }
.one-form label { display: grid; gap: 0.3rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.one-form input, .one-form textarea {
  width: 100%; min-height: 44px; padding: 0.6rem 0.75rem; border: 1px solid var(--edge); border-radius: 0;
  background: var(--bg); color: var(--ink); font: 400 0.95rem/1.4 var(--body, system-ui, sans-serif);
  text-transform: none; letter-spacing: 0;
}
.one-form textarea { min-height: 96px; resize: vertical; }
.one-form input:focus, .one-form textarea:focus { outline: 2px solid var(--accent-1); outline-offset: 1px; border-color: transparent; }
.one-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.one-send {
  min-height: 48px; border: 0; background: var(--accent-1); color: var(--btn-ink, #0d0d12); cursor: pointer;
  font: 700 0.82rem var(--mono); letter-spacing: 0.07em; text-transform: uppercase;
}
.one-send:disabled { opacity: 0.6; cursor: progress; }
.one-msg { min-height: 1.2em; margin: 0; font-size: 0.86rem; color: var(--ink-muted); }
.one-msg.err { color: var(--accent-2); }
.one-done { text-align: center; padding: 1rem 0 0.4rem; }
.one-done b { display: block; font-family: var(--display); font-size: 1.5rem; margin-bottom: 0.4rem; }
.one-done p { color: var(--ink-muted); margin: 0 0 1rem; }
.one-cats { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.one-cats a {
  display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 0.9rem;
  border: 1px solid var(--edge); color: var(--ink); text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.07em; text-transform: uppercase;
}
.one-cats a.is-on { border-color: var(--accent-1); color: var(--accent-1); }
.one-cats a .n { color: var(--ink-muted); font-size: 0.7rem; }
button.lab-cta { cursor: pointer; font: inherit; }

/* the media lab's scroll-locked wiping row is a full-width feature, as on its old page */
#fx-scroll-wipe-row { grid-column: 1 / -1; }

/* star sits in the top-right corner of every tile foot */
main#lab .fx-tile-foot { position: relative; padding-right: 3.7rem; }
main#lab .one-star { position: absolute; top: 0.5rem; right: 0.6rem; margin: 0; }
