/* ff-public.css — the look every public page shares (Daniel, 2026-11-12 and 2026-11-15).

   The Instagram carousels, the handout and these pages are read one after the other, so
   they are one look: a white ground with a fine blue grid, one glowing forecast line, cards
   the line shows through, and depth from layers that move at different speeds.

   Flat means the colours: every fill is one colour, and the only soft light on the page is
   the forecast line's glow. The cards are frosted on purpose, as a film the line glows
   through, without the grain, sheen and corner splashes the frost era carried.

   It was a block at the foot of index.html's sheet and a second, different copy in
   waitlist.html. It is a file so a new public page gets the look by loading it:

     <link rel="stylesheet" href="ff-public.css" />     after the page's own styles
     <body class="ff-pub">
     class="card" (or ff-glass) on anything that is a card
     the #scribble svg and ff-line.js for the line: see the head of ff-line.js

   It reads --accent, --surface and --bg, which index.html's own sheet and ff-theme.css
   both define, and nothing else from either. */

:root {
  --grid: color-mix(in oklab, var(--accent) 8%, transparent);
  --frost: color-mix(in oklab, var(--surface) 70%, transparent);
  --glow: 0 1px 2px color-mix(in oklab, var(--accent) 10%, transparent), 0 16px 48px color-mix(in oklab, var(--accent) 14%, transparent);
}

/* ─── the ground ────────────────────────────────────────────────────────────
   The grid is fixed to the window, under the line (z -1) and under every section. Taller
   than the window by the distance it drifts, so its edge never shows. overflow-x is
   clipped because the line's svg may be stretched to the window's full width, and 100vw is
   wider than the page by the scrollbar; clip, not hidden, so sticky headers still stick. */
body.ff-pub { background-color: var(--bg); background-image: none; overflow-x: clip; }
/* background-image and mask-image are reset, not assumed: an ff-theme.css that still paints
   the ambient wash on body and masks body::before into a centre circle (production's, until
   the flat page ships there) would otherwise show through and fade the grid at the edges. */
body.ff-pub::before {
  content: ""; position: fixed; inset: -24vh 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: none; mask-image: none;
  filter: none; mix-blend-mode: normal; opacity: 1;
}
body.ff-pub::after { content: none; }

/* ─── the cards ─────────────────────────────────────────────────────────────
   One film for everything that is a card on a public page. The names are the ones the
   pages already use; ff-glass is for anything new. */
.ff-glass,
.ff-pub :is(.card, .democard, .qcard, .sheet, .hero-copy, .closer) {
  background: var(--frost);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-color: transparent; border-radius: 20px;
  box-shadow: var(--glow);
}

/* ─── the line ──────────────────────────────────────────────────────────────
   Drawn by ff-line.js into #scribble. Three copies of one path: the whole route, quiet;
   a wide blurred halo; and the bright core. On a page that scrolls, halo and core show one
   travelling segment, the stretch beside what you are reading. With data-lit="all" they
   show the whole line.

   BEHIND everything. The svg's parent is positioned but sets no z-index, so it is not a
   stacking context: a negative-z child paints above the page ground and below every
   in-flow section and card. The line runs under the cards, glows through their frost, and
   comes out clear in the gaps between them. */
#scribble {
  position: absolute; top: 0; left: 0; width: 100%;
  z-index: -1; pointer-events: none;
}
#scribble path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Quiet on purpose (Daniel, 2026-11-15, twice): the line is background. It is a thin
   pen line at part strength with a faint breath of glow, and the copy always wins. If it
   is the first thing you see on the page, it is too strong. */
#scribble .route { stroke: color-mix(in oklab, var(--accent) 12%, transparent); stroke-width: 1; }
#scribble .halo { stroke: color-mix(in oklab, var(--accent) 12%, transparent); stroke-width: 7; filter: blur(6px); }
#scribble .lit { stroke: color-mix(in oklab, var(--accent) 50%, transparent); stroke-width: 1.5; }
/* Decorative and non-informational: reduced motion keeps the route and drops both
   travelling layers, so nothing moves and nothing is lost. A line that is lit all over
   does not travel, so it keeps them. */
@media (prefers-reduced-motion: reduce) {
  #scribble:not([data-lit="all"]) :is(.lit, .halo) { display: none; }
}

/* The page-white outline under each letter (it cut the line where it passed behind copy)
   is gone: Daniel read it as a white border round every letter (2026-11-17). The line is
   quiet enough to pass behind words; where it must not, route it with data-line marks. */

/* ─── parallax ──────────────────────────────────────────────────────────────
   The grid barely moves, the copy scrolls at the page's speed, and the cards run a little
   ahead of it, so the cards read as nearer than the line they sit over. Written on
   `translate`, which is its own property, so it never fights the `transform` an entrance
   animation uses. Scroll-driven in CSS, no script and no scroll listener. A browser without
   animation-timeline gets the still page, which is complete; so does reduced motion.
   ponytail: fixed pixel travel, the same on every screen. Scale it by viewport height if
   it reads as too much on a short laptop or too little on a tall monitor. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes ff-grid-drift { to { translate: 0 -20vh; } }
    @keyframes ff-float { from { translate: 0 28px; } to { translate: 0 -28px; } }
    body.ff-pub::before { animation: ff-grid-drift linear both; animation-timeline: scroll(root); }
    /* every card, across the time it is on screen */
    .ff-glass, .ff-pub :is(.card, .democard, .sheet) { animation: ff-float linear both; animation-timeline: view(); }
  }
}

/* ─── floating look (L1 landing redesign, 2026-11-17) ───────────────────────
   The taste target is the floating feel (Daniel, on usereach.ai): parts hover rather than
   sit. Soft layered shadows and no hard borders, a slow out-of-phase bob, wide air, long
   ease-out motion, and three depth layers at three scroll speeds. Glow is only ever on the
   line. Decisions: docs/decisions-landing-redesign-2026-11-17.md. ff-public.js moves it.

   THE SWITCH. Every rule below that hides, offsets, blurs or animates is scoped under
   html.ff-anim, which ff-public.js sets only when motion is allowed. Without the class the
   page is the final still state. ff-public-motion-check.js fails if a rule breaks that. */
:root {
  /* three soft steps in the page's slate ink: contact, near, far. No accent tint: the
     accent's light is the line's alone. */
  --float: 0 1px 2px rgba(37, 50, 72, 0.06), 0 8px 24px -6px rgba(37, 50, 72, 0.10), 0 32px 64px -24px rgba(37, 50, 72, 0.16);
  --ease-float: cubic-bezier(.15, 0, .01, 1);
}
.ff-glass,
.ff-pub :is(.card, .democard, .qcard, .sheet, .hero-copy, .closer) { box-shadow: var(--float); border-color: transparent; }

/* ── the forecast line (FFPub.lineMarkup) ──
   Host is any positioned box with a height. Two stacked svgs of the same curve: a blurred
   halo and the 2px core. Past is ink, forecast is the accent and dashed. */
.ff-fl { position: absolute; inset: 0; }
.ff-fl-draw, .ff-fl-draw svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ff-fl path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ff-fl-core .ff-fl-past { stroke: var(--fg-2, #3a4456); stroke-width: 1.75; }
.ff-fl-core .ff-fl-ahead { stroke: var(--accent); stroke-width: 2.25; stroke-dasharray: 6 5; }
.ff-fl-band { fill: var(--accent); fill-opacity: 0.08; }
.ff-fl-halo { filter: blur(6px); opacity: 0.55; }
.ff-fl-halo .ff-fl-past { stroke: transparent; }
.ff-fl-halo .ff-fl-ahead { stroke: var(--accent); stroke-width: 8; opacity: 0.35; }
/* the divider: a hairline where the data stops and the forecast starts */
.ff-fl-div { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed color-mix(in oklab, var(--accent) 45%, transparent); }
.ff-fl-div span {
  position: absolute; top: 2px; right: 6px; white-space: nowrap; /* left of the divider: the chip rides the forecast side */
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--accent);
}
/* the point the chip rides, and the riding glow */
.ff-fl-dot, .ff-fl-comet { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; }
.ff-fl-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }
.ff-fl-comet { opacity: 0; background: var(--surface, #fff); box-shadow: 0 0 0 2px var(--accent), 0 0 14px 4px color-mix(in oklab, var(--accent) 55%, transparent); }
/* the value chip: frosted, floating above its point, allowed past the card's edge */
.ff-chip { position: absolute; z-index: 2; width: 0; height: 0; }
.ff-chip-in {
  position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 16px));
  display: grid; gap: 2px; padding: 8px 12px; border-radius: 14px; white-space: nowrap;
  background: var(--frost); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--float);
}
.ff-chip-in.ff-chip-l { transform: translate(calc(-100% + 18px), calc(-100% - 16px)); }
.ff-chip-k { font-size: 12px; color: var(--muted); }
.ff-chip-v { font-size: 14px; color: var(--fg); }
/* count-up figures use the mono face; sentences stay in the body face */
.ff-chip-v b, [data-count] { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── the pinned story (.ff-story) ── still state: one block, all words sharp, line drawn */
.ff-story { position: relative; }
.ff-story-pin { display: grid; align-content: center; gap: 28px; padding-block: clamp(56px, 8vw, 120px); }
.ff-story-text { margin: 0; max-width: 26ch; font-size: clamp(22px, 3.4vw, 46px); line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
.ff-story-stage { position: relative; height: clamp(120px, 18vw, 220px); }
.ff-story-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ff-story-line path { fill: none; stroke: var(--accent); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.ff-story-line .glow { stroke-width: 4; opacity: .22; filter: blur(5px); }
.ff-story-chip {
  position: absolute; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; font-size: clamp(12px, 1vw, 14px);
  background: var(--frost); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--float);
}

/* ── motion: all of it behind the switch ── */
@keyframes ff-fl-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ff-rise { from { opacity: 0; scale: .94; } to { opacity: 1; scale: 1; } }
@keyframes ff-bob { from { transform: translate3d(0, calc(var(--drift, 4px) * -1), 0); } to { transform: translate3d(0, var(--drift, 4px), 0); } }
html.ff-anim .ff-fl-draw { animation: ff-fl-draw 1.8s var(--ease-float) .35s both; }
html.ff-anim .ff-fl-div { animation: ff-rise .9s var(--ease-float) 1.1s both; }
html.ff-anim .ff-fl-dot { animation: ff-rise .8s var(--ease-float) 1.5s both; }
/* a re-render (branch switch) arrives drawn: the crossfade is its one transition */
html.ff-anim .ff-fl-drawn :is(.ff-fl-draw, .ff-fl-div, .ff-fl-dot) { animation: none; }
/* the bob: a few px over 6 to 10s, each part out of phase by --drift-at */
html.ff-anim .ff-drift { animation: ff-bob var(--drift-t, 8s) ease-in-out var(--drift-at, 0s) infinite alternate; }
/* the chip bobs and rises: two animations on two properties, so neither cancels the other */
html.ff-anim .ff-chip { animation: ff-bob var(--drift-t, 7s) ease-in-out var(--drift-at, 0s) infinite alternate, ff-rise .9s var(--ease-float) 1.5s both; }
html.ff-anim.ff-still .ff-drift { animation-play-state: paused; }
/* the story, wide screens: a tall track, the words blurred until lit, the line by --p */
@media (min-width: 769px) {
  html.ff-anim .ff-story { height: 260vh; }
  html.ff-anim .ff-story-pin { position: sticky; top: var(--nav-h, 72px); height: calc(100vh - var(--nav-h, 72px)); height: calc(100svh - var(--nav-h, 72px)); padding-block: 0; gap: 20px; }
  html.ff-anim .ff-story-text { font-size: clamp(24px, 2.8vw, 40px); }
  html.ff-anim .ff-story-stage { height: clamp(110px, 14vh, 170px); }
  html.ff-anim .ff-story .sw { opacity: .14; filter: blur(8px); transition: opacity .5s ease, filter .6s var(--ease-float); }
  html.ff-anim .ff-story .sw.on { opacity: 1; filter: none; }
  html.ff-anim .ff-story-line path { stroke-dashoffset: calc(1 - var(--p, 0)); }
}
/* phones and wide alike: chips wait for their point; phone lines draw once on reveal */
html.ff-anim .ff-story-chip { opacity: 0; translate: 0 8px; transition: opacity .8s var(--ease-float), translate .9s var(--ease-float); }
html.ff-anim .ff-story-chip.on { opacity: 1; translate: 0 0; }
@media (max-width: 768px) {
  html.ff-anim .ff-story-line path { stroke-dashoffset: calc(1 - var(--p, 0)); transition: stroke-dashoffset 1.6s var(--ease-float); }
}

/* ── depth: three layers, three scroll speeds, over the first screen ──
   data-depth="back" falls behind, "mid" leads a little, "front" leads most. Written on
   `translate` so it never fights the bob (`transform`) or the rise (`scale`). Scroll-driven
   CSS, no listener. Wide screens only: nothing is scrubbed on a phone. */
.ff-back-grid {
  position: absolute; inset: -8% -6%; pointer-events: none; z-index: -1;
  background-image: linear-gradient(color-mix(in oklab, var(--accent) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklab, var(--accent) 7%, transparent) 1px, transparent 1px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent); mask-image: radial-gradient(closest-side, #000 30%, transparent);
}
@media (min-width: 769px) {
  @supports (animation-timeline: scroll()) {
    @keyframes ff-depth-back { to { translate: 0 64px; } }
    @keyframes ff-depth-mid { to { translate: 0 -32px; } }
    @keyframes ff-depth-front { to { translate: 0 -80px; } }
    html.ff-anim [data-depth="back"] { animation: ff-depth-back linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    html.ff-anim [data-depth="mid"] { animation: ff-depth-mid linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    /* the chip keeps its bob and rise and adds the front speed as a third animation */
    html.ff-anim .ff-chip[data-depth="front"] {
      animation: ff-bob var(--drift-t, 7s) ease-in-out var(--drift-at, 0s) infinite alternate, ff-rise .9s var(--ease-float) 1.5s both, ff-depth-front linear both;
      animation-timeline: auto, auto, scroll(root); animation-range: normal, normal, 0 100vh;
    }
    html.ff-anim.ff-still .ff-chip[data-depth="front"] { animation-play-state: paused, running, running; }
  }
}
html.ff-anim.ff-still .ff-chip { animation-play-state: paused, running; }

/* ─── L1b: app windows, the tabbed demo, the highlighter, the hand note ──────────
   Mock screens are viewports, not cards (Daniel, 2026-11-17): a top bar with the mark, a
   breadcrumb and a status pill, real app rows, a quiet footer. Same switch rule as above:
   anything hidden, offset or animated is under html.ff-anim. */
@font-face {
  font-family: "Caveat"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/caveat-500.woff2?v=edbfb1a7") format("woff2");
}
.ff-win {
  position: relative; border-radius: 18px; overflow: hidden;
  background: var(--surface, #fff); box-shadow: var(--float), 0 0 0 1px rgba(37, 50, 72, 0.05);
}
.ff-win-top {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px;
  border-bottom: 1px solid color-mix(in oklab, var(--fg, #1a1f29) 7%, transparent);
  font-size: 13px; color: var(--muted);
}
.ff-win-mark { width: 20px; height: 20px; border-radius: 5px; }
.ff-win-crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-win-crumb i { font-style: normal; margin: 0 6px; opacity: .5; }
.ff-win-crumb b { font-weight: 500; color: var(--fg); }
.ff-win-status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; color: var(--fg-2, var(--fg));
  background: color-mix(in oklab, var(--fg, #1a1f29) 5%, transparent);
}
.ff-spin { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid color-mix(in oklab, var(--fg, #1a1f29) 20%, transparent); border-top-color: var(--accent); }
.ff-done .ff-spin, .ff-spin.done { border-color: var(--success-ink, #1f7a4a); background: var(--success-ink, #1f7a4a); }
.ff-win-body { padding: 18px 20px; }
.ff-win-foot {
  padding: 10px 20px; border-top: 1px solid color-mix(in oklab, var(--fg, #1a1f29) 7%, transparent);
  font-size: 12px; color: var(--meta, var(--muted)); text-align: right;
}
/* app rows inside a window: name and sub on the left, a mono figure and a tick on the right */
.ff-row { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed color-mix(in oklab, var(--fg, #1a1f29) 10%, transparent); }
.ff-row:last-child { border-bottom: 0; }
.ff-row b { display: block; font-size: 14px; font-weight: 500; color: var(--fg); }
.ff-row small { display: block; font-size: 12px; color: var(--muted); }
.ff-row .n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; text-align: right; }
.ff-row .n.bad { color: var(--danger-ink, #b42318); }
.ff-tick { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--success-ink, #1f7a4a); }
.ff-tick::after { content: ""; display: block; width: 100%; height: 100%; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.ff-tick.warn { background: var(--danger-ink, #b42318); }
.ff-tick.warn::after { -webkit-mask: none; mask: none; background: none; content: "!"; color: #fff; font: 700 12px/18px var(--font-mono); text-align: center; }
/* tall enough that the chip over the busiest day stays inside the plot, not over the rows */
.ff-plot { position: relative; height: 190px; margin-top: 14px; }

/* the tabbed demo */
.ff-tabs-row {
  display: grid; grid-template-columns: repeat(var(--tabs, 3), minmax(0, 1fr)); gap: 6px;
  padding: 6px; border-radius: 18px; background: color-mix(in oklab, var(--fg, #1a1f29) 4%, transparent);
}
.ff-tab {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center;
  padding: 12px 14px 16px; border: 0; border-radius: 13px; background: transparent; cursor: pointer;
  text-align: left; font: inherit; color: var(--muted);
}
.ff-tab-ic { grid-row: span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in oklab, var(--accent) 10%, transparent); color: var(--accent); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.ff-tab b { font-size: 14px; font-weight: 500; color: inherit; }
.ff-tab small { font-size: 12px; }
.ff-tab[aria-selected="true"] { background: var(--surface, #fff); color: var(--fg); box-shadow: var(--float); }
.ff-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ff-tab-bar { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px; border-radius: 2px; background: color-mix(in oklab, var(--fg, #1a1f29) 8%, transparent); overflow: hidden; }
.ff-tab-bar::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.ff-tab[aria-selected="true"] .ff-tab-bar::after { transform: none; }
.ff-tabs-stage { position: relative; margin-top: 18px; }
.ff-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ff-panel-side > h4 { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.ff-panel-side.fix > h4 { color: var(--accent); }
.ff-panel-side > p { margin: 0 0 10px; font-size: 14px; color: var(--fg-2, var(--fg)); max-width: 46ch; }
@media (max-width: 768px) {
  .ff-tabs-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .ff-tab { flex: 0 0 78%; scroll-snap-align: start; }
  .ff-panel-grid { grid-template-columns: 1fr; gap: 20px; }
  .ff-win-body { padding: 14px; }
}
/* the hand note: Caveat, right-aligned over the window it points into, with a drawn arrow
   down to it. It sits in the flow, so it can never run off the side of a narrow window. */
.ff-note-wrap { display: flex; justify-content: flex-end; align-items: flex-end; gap: 6px; margin: 0 clamp(8px, 4vw, 56px) -4px 0; }
.ff-note { font-family: "Caveat", cursive; font-weight: 500; font-size: 23px; line-height: 1.12; color: var(--fg); max-width: 22ch; margin: 0 0 10px; }
.ff-note em { font-style: normal; color: var(--accent); }
.ff-note-arrow { order: -1; flex: none; width: 54px; height: 70px; }
.ff-note-arrow path { fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 576px) { .ff-note-arrow { display: none; } .ff-note { font-size: 21px; } }

/* the highlighter: a hand-drawn brush (rough ends, two dry streaks) in ForeFlux's own
   colours, the accent blue through indigo to the brand violet, with rounded ends. The
   band is .8em tall, set a little low: shorter than any line-height these pages use, so
   the band on one line never reaches the one below and two lines never stack into a
   double highlight. A phrase that wraps is ONE stroke across its lines (slice), so
   the gradient runs once per phrase instead of restarting on every line. Keep a phrase
   whole, comma included, rather than two highlights side by side. Flat paint, not glow. */
.ff-hl {
  padding: 0 .1em; margin: 0 -.05em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g'%3E%3Cstop offset='0' stop-color='%23156bff' stop-opacity='.2'/%3E%3Cstop offset='.5' stop-color='%235a3dff' stop-opacity='.2'/%3E%3Cstop offset='1' stop-color='%23b100ff' stop-opacity='.18'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' d='M7 2.6 C 3.2 2.8 1.2 6 1.4 10.2 C 1.6 14.2 3.6 17.2 7.4 17.3 C 50 18.4 95 16.9 140 17.6 C 165 18 182 17.2 192.6 17.4 C 196.8 17.3 198.8 14 198.6 9.8 C 198.4 5.6 196.4 2.7 192.4 2.5 C 150 1.6 105 3 60 2.2 C 35 1.9 18 2.4 7 2.6 Z'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='.28' stroke-width='.5' stroke-linecap='round' d='M10 6.4 C 60 5.4 120 6.8 188 5.8 M14 13.6 C 70 12.6 130 14.2 184 12.9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0 62%; background-size: 100% .8em;
  -webkit-box-decoration-break: slice; box-decoration-break: slice;
}

/* motion for the above, behind the switch */
@keyframes ff-tab-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ff-spin { to { rotate: 1turn; } }
@keyframes ff-step-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes ff-hl-wipe { from { background-size: 0% .8em; } to { background-size: 100% .8em; } }
html.ff-anim .ff-tab[aria-selected="true"] .ff-tab-bar::after { transform: scaleX(0); animation: ff-tab-fill var(--tab-t, 7s) linear forwards; }
html.ff-anim [data-ff-tabs].ff-manual .ff-tab[aria-selected="true"] .ff-tab-bar::after { animation: none; transform: none; }
html.ff-anim.ff-still [data-ff-tabs] .ff-tab-bar::after, html.ff-anim [data-ff-tabs].ff-off .ff-tab-bar::after { animation-play-state: paused; }
html.ff-anim .ff-spin { animation: ff-spin .9s linear infinite; }
html.ff-anim .ff-done .ff-spin, html.ff-anim .ff-spin.done { animation: none; }
html.ff-anim .ff-panel .ff-step { opacity: 0; }
html.ff-anim .ff-panel.run .ff-step { animation: ff-step-in .7s var(--ease-float) calc(var(--i, 0) * 260ms + 150ms) both; }
html.ff-anim .ff-panel.run .fix .ff-step { animation-delay: calc(var(--i, 0) * 260ms + 1500ms); }
html.ff-anim .ff-panel .fix .ff-fl-draw { animation: none; clip-path: inset(0 100% 0 0); }
html.ff-anim .ff-panel.run .fix .ff-fl-draw { animation: ff-fl-draw 1.6s var(--ease-float) 1.9s both; }
html.ff-anim .ff-hl { background-size: 0% .8em; }
html.ff-anim .ff-hl.on { animation: ff-hl-wipe 1.1s var(--ease-float) .2s both; }

/* ─── L1b: the story as text beside a live app window ──────────────────────────
   Wide: two columns in the pin, the heading alone first, then the sentence and the
   window's three states by scroll (--p). Phone: stacked, everything lands on reveal. */
.ff-story-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 992px) { .ff-story-cols { grid-template-columns: 1fr; } }
.ff-story .ff-win-body { display: grid; gap: 14px; }
.ff-story .st-block { border-radius: 12px; padding: 4px 0; }
.ff-story .st-block > h5 { margin: 0; font-size: 12px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; }
.ff-story .ff-plot { height: 150px; margin-top: 0; }
html.ff-anim .ff-story .st-block { opacity: .28; transition: opacity .7s var(--ease-float); }
html.ff-anim .ff-story .st-block.on { opacity: 1; }
html.ff-anim .ff-story .st-row { opacity: 0; translate: 0 10px; transition: opacity .6s var(--ease-float), translate .7s var(--ease-float); }
html.ff-anim .ff-story .st-row.on { opacity: 1; translate: 0 0; }
html.ff-anim .ff-story .st-plot .ff-fl-draw { animation: none; clip-path: inset(0 calc(100% - clamp(0, (var(--p, 1) - .4) / .26, 1) * 100%) 0 0); }
html.ff-anim .ff-story .st-plot :is(.ff-fl-div, .ff-fl-dot) { animation: none; }
html.ff-anim .ff-story .st-plot .ff-chip { animation: ff-bob var(--drift-t, 7s) ease-in-out var(--drift-at, 0s) infinite alternate; opacity: 0; transition: opacity .6s var(--ease-float); }
html.ff-anim .ff-story .st-block.on .st-plot .ff-chip { opacity: 1; }
@media (max-width: 768px) {
  html.ff-anim .ff-story .st-plot .ff-fl-draw { transition: clip-path 1.6s var(--ease-float); }
}

/* a window that wraps a live demo body (How it works, Built for): the body keeps its own
   renderer, the window gives it the app frame and the float */
.ff-win.demo-win { margin-top: var(--space-5); }
.ff-win.demo-win .ff-win-body { padding: 14px 18px; }

/* ─── the drag carousel ([data-ff-car], ff-public.js initCar) ─────────────────────────
   A full-bleed track of snap slides that peek past the container edge. Each slide is a
   photo with an app window floating over its foot. The track lines its first slide up with
   the page's container (--container-max, --gutter), so it reads as part of the column. */
.ff-car-ctl { display: flex; align-items: center; gap: 14px; font-size: var(--text-sm); color: var(--muted); }
.ff-car-drag { padding: 4px 12px; border-radius: 999px; background: var(--surface, #fff); box-shadow: var(--float); color: var(--fg); font-size: 12px; }
.ff-car-track {
  --car-w: min(340px, 72vw); --car-pad: calc(50% - var(--car-w) / 2);
  display: flex; gap: clamp(14px, 2vw, 24px); margin: 0; list-style: none;
  padding: 12px var(--car-pad) 40px; scroll-padding-inline: var(--car-pad);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab;
}
.ff-car-track::-webkit-scrollbar { display: none; }
.ff-car-track.ff-drag, .ff-car-track.ff-gliding { scroll-snap-type: none; }
.ff-car-track.ff-drag { cursor: grabbing; user-select: none; }
/* the edges fade, so only the slides near the middle read at full strength */
.ff-car-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
/* the drag cursor (fine pointers): a frosted disc that follows the mouse */
/* a ForeFlux-blue pill: arrows either side of the word, and they spread while you drag */
.ff-car-cursor { position: fixed; left: 0; top: 0; z-index: 30; height: 40px; margin: -20px 0 0 -52px; width: 104px; border-radius: 999px;
  align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: #fff; pointer-events: none;
  background: linear-gradient(100deg, var(--accent, #156bff), color-mix(in oklab, var(--accent, #156bff) 70%, #b100ff));
  box-shadow: 0 10px 24px -8px color-mix(in oklab, var(--accent, #156bff) 55%, transparent), 0 2px 6px rgba(20, 30, 60, .14);
  display: none; }
.ff-car-cursor i { display: grid; opacity: .85; }
[data-ff-car].ff-cursor .ff-car-cursor { display: flex; }
[data-ff-car].ff-cursor:has(.ff-drag) .ff-car-cursor { scale: .92; }
[data-ff-car]:has(.ff-drag) .ff-car-cursor .l { translate: -3px 0; }
[data-ff-car]:has(.ff-drag) .ff-car-cursor .r { translate: 3px 0; }
@media (pointer: fine) { [data-ff-car] .ff-car-track { cursor: none; } .ff-car-drag { display: none; } }
.ff-car-track:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.ff-car-slide { flex: 0 0 var(--car-w); scroll-snap-align: center; transform-origin: 50% 60%; will-change: transform, opacity; }
.ff-car-fig { position: relative; margin: 0; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; box-shadow: var(--float); background: var(--fg-soft, #eef1f5); }
.ff-car-fig > img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ff-car-fig .ff-win { position: absolute; left: 12px; right: 12px; bottom: 12px; font-size: 13px; }
.ff-car-fig .ff-win-body { padding: 10px 14px; display: grid; gap: 6px; }
.ff-car-row { display: flex; justify-content: space-between; gap: 10px; }
.ff-car-row b { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.ff-car-slide h3 { margin: 18px 0 4px; font-size: var(--text-base); }
.ff-car-slide p { margin: 0; color: var(--muted); font-size: var(--text-sm); max-width: 34ch; }
html.ff-anim .ff-car-cursor { transition: scale .35s cubic-bezier(.2,.8,.2,1); }
html.ff-anim .ff-car-cursor i { transition: translate .35s cubic-bezier(.2,.8,.2,1); }

/* ─── the Ask ForeFlux chat ([data-ff-ask], ff-public.js initAsk) ───────────────────── */
.ff-ask { display: flex; flex-direction: column; gap: 12px; min-height: 340px; justify-content: flex-end; }
.ff-ask-q, .ff-ask-a { margin: 0; padding: 11px 15px; border-radius: 16px; font-size: var(--text-sm); line-height: 1.45; max-width: 86%; min-height: 1.45em; }
.ff-ask-q { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.ff-ask-a { align-self: flex-start; background: var(--fg-soft, #eef1f5); color: var(--fg); border-bottom-left-radius: 5px; }
.ff-ask-dots { display: none; align-self: flex-start; width: 46px; height: 30px; border-radius: 14px; background: var(--fg-soft, #eef1f5);
  background-image: radial-gradient(circle, var(--muted) 2.5px, transparent 3px), radial-gradient(circle, var(--muted) 2.5px, transparent 3px), radial-gradient(circle, var(--muted) 2.5px, transparent 3px);
  background-repeat: no-repeat; background-size: 8px 8px; background-position: 11px 50%, 19px 50%, 27px 50%; }
.ff-ask-card { align-self: flex-start; width: min(100%, 320px); padding: 12px 14px; border-radius: 14px; background: var(--surface, #fff); box-shadow: var(--float), 0 0 0 1px rgba(37, 50, 72, 0.05); display: grid; gap: 6px; font-size: var(--text-sm); }
.ff-ask-card b { font-family: var(--font-mono); font-weight: 500; }
.ff-ask-card .ff-ask-ok { display: flex; align-items: center; gap: 8px; color: var(--success-ink, #1f7a4a); }
html.ff-anim [data-ff-ask].run:not(.done) .ff-ask-a:empty { display: none; }
html.ff-anim [data-ff-ask].run.asked:not(.answering) .ff-ask-dots { display: block; animation: ff-ask-dots 1s ease-in-out infinite; }
html.ff-anim [data-ff-ask]:not(.done) .ff-ask-card { opacity: 0; transform: translateY(10px); }
html.ff-anim [data-ff-ask]:not(.run) .ff-ask-q, html.ff-anim [data-ff-ask]:not(.run) .ff-ask-a { opacity: 0; }
html.ff-anim [data-ff-ask] .ff-ask-card { transition: opacity .6s ease-out, transform .8s cubic-bezier(.16,1,.3,1); }
@keyframes ff-ask-dots { 50% { opacity: .45; } }

/* ─── the prism ([data-ff-prism], ff-public.js initPrism) ─────────────────────────────
   Still state (phone, reduced motion, no script): one column, each step above its screen,
   by `order` (--o) across the two lists. Wide screens with motion: steps left, a prism of
   screens right, the stage pinned while the block scrolls past. */
.ff-prism-grid { display: flex; flex-direction: column; gap: var(--space-6, 24px); }
.ff-prism-steps, .ff-prism-view, .ff-prism-rot { display: contents; }
.ff-prism-steps { list-style: none; margin: 0; padding: 0; }
.ff-prism-step, .ff-prism-face { order: var(--o); }
.ff-prism-step { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: baseline; }
.ff-prism-step .step-n { grid-row: span 2; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); }
.ff-prism-step h3 { margin: 0; }
.ff-prism-step p { margin: 6px 0 0; color: var(--muted); max-width: 44ch; }
.ff-prism-bar { display: none; }
.ff-prism-face .ff-win { margin: 0; }
@media (max-width: 576px) { .ff-prism-face .ff-win-status { display: none; } }
.ff-prism-in > .sec-head { margin-bottom: var(--space-6, 24px); }
@media (min-width: 769px) {
  html.ff-anim .ff-prism { height: calc((var(--n) - 1) * 45vh + 100vh); }
  html.ff-anim .section:has(> .ff-prism) { padding-block: var(--space-6, 24px); }
  html.ff-anim .ff-prism-stage { position: sticky; top: 72px; height: calc(100vh - 72px); display: flex; align-items: flex-start; padding-top: clamp(16px, 5vh, 56px); }
  html.ff-anim .ff-prism-in { width: 100%; }
  html.ff-anim .ff-prism-in > .sec-head { margin-bottom: clamp(16px, 4vh, 40px); }
  html.ff-anim .ff-prism-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: center; width: 100%; }
  html.ff-anim .ff-prism-steps { display: grid; gap: 8px; }
  html.ff-anim .ff-prism-step { padding: 18px 20px 22px; border-radius: 16px; cursor: pointer; opacity: .45; transition: opacity .5s ease-out, background-color .5s ease-out, box-shadow .5s ease-out; }
  html.ff-anim .ff-prism-step.on { opacity: 1; background: var(--surface, #fff); box-shadow: var(--float); }
  html.ff-anim .ff-prism-bar { display: block; position: absolute; left: 20px; right: 20px; bottom: 9px; height: 2px; border-radius: 2px; overflow: hidden; background: color-mix(in oklab, var(--fg, #1a1f29) 8%, transparent); }
  html.ff-anim .ff-prism-bar::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 0)); }
  html.ff-anim .ff-prism-view { display: block; perspective: 1800px; perspective-origin: 50% 40%; }
  html.ff-anim .ff-prism-rot { display: block; position: relative; transform-style: preserve-3d; transform: translateZ(calc(var(--r, 300px) * -1)) rotateY(calc(var(--p, 0) * -360deg / var(--n))); }
  html.ff-anim .ff-prism-face > .ff-win { height: 100%; display: flex; flex-direction: column; }
  html.ff-anim .ff-prism-face > .ff-win > .ff-win-body { flex: 1; }
  html.ff-anim .ff-prism-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--r, 300px)); }
}
