/* ============================================================================
   Floom — the four products
   ----------------------------------------------------------------------------
   One rail, four large cards, the middle one in focus and its neighbours
   standing back. Built on a scroll-snap scroller rather than a bespoke
   carousel: the swipe, the trackpad and the keyboard all come with it. The
   script adds what a scroller lacks — a mouse drag, the arrows, and one eased
   glide that every move ends in — and says which card is in the middle. The
   section itself scrolls past like any other — nothing holds the page.

   Each card plays a recording of its product in the real app, then says what
   the product is and the way in. The pull along its bottom edge on hover is
   the Threadline card's own.
   ========================================================================== */

.prod{
  /* Positioned and opaque, like .cl and .mcp above it. The hero carries a
     transform while it hangs back, which puts it in the positioned paint
     layer; a static section paints BELOW that layer whatever its background. */
  position: relative;
  background: var(--ap-cream);
  padding: var(--fl-pad-section) 0;
  /* The card's own width, in one place: the track's end padding is derived
     from it so the first and last card can reach the middle. Large — three
     quarters of the window up to 1080 — so the recording on it reads as the
     app rather than a thumbnail of it, with a neighbour's edge either side to
     say there are more. */
  /* Columns 2–11 of the grid, one column gap from its neighbours. The rail
     is full-bleed and centres cards on the window (50vw), so the grid is
     worked out from the window here rather than from a containing block. */
  --prod-grid: min(100vw - 2 * var(--fl-gutter), var(--fl-grid-max));
  --prod-w: calc((var(--prod-grid) + var(--fl-col-gap)) * 10 / 12 - var(--fl-col-gap));
  --prod-gap: var(--fl-col-gap);
}

/* ── the head ─────────────────────────────────────────────────────────────
   The three gaps every other head on the site uses. */
.prod-head{
  display: grid; text-align: center;
  width: var(--fl-span-10);   /* columns 2–11: room for the standfirst on one line */
  margin-inline: auto;
  margin-bottom: var(--fl-gap-head);
}
.prod-head .ap-eyebrow{ margin: 0 0 var(--fl-gap-eyebrow); }
.prod-head h2{
  justify-self: center;
  max-width: var(--fl-span-8);   /* the heading keeps its two lines; only the standfirst takes the wider head */
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fl-head-size);
  font-weight: var(--fl-head-weight);
  letter-spacing: var(--fl-head-track);
  line-height: var(--fl-head-lead);
  text-transform: uppercase;
  color: var(--black);
  text-wrap: balance;
}
.prod-stand{
  margin: var(--fl-gap-stand) 0 0;
  font-family: var(--font);
  /* 20px and 46ch, which is what every other standfirst on the site carries */
  font-size: clamp(15.79px, 1.7vw, 20px);
  font-weight: 450;
  line-height: 1.3;    /* the body leading the rest of the page uses */
  color: var(--text-secondary);
  text-wrap: balance;
}
/* One line on a desk (the head's ten columns hold it); where it must wrap,
   on a tablet or a phone, the balancer evens the two lines. */

/* ── the rail ─────────────────────────────────────────────────────────────*/
.prod-rail{
  position: relative;      /* the cards measure their place from the rail */
  margin-inline: round(calc(50% - 50vw), 4px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* The cards scale, and a scaled card's corner would be clipped by the
     scroller's own box without this. */
  padding-block: 24px;
}
.prod-rail::-webkit-scrollbar{ display: none; }
/* A mouse can hold the rail and pull it, as a finger can; the hand says so.
   While it is held nothing on the cards selects. */
@media (hover: hover) and (pointer: fine){
  .prod-rail{ cursor: grab; }
  .prod-rail.is-dragging,
  .prod-rail.is-dragging *{ cursor: grabbing; }
}
.prod-rail.is-dragging{ user-select: none; -webkit-user-select: none; }
.prod-rail:focus-visible{ outline: 2px solid var(--ap-orange); outline-offset: -4px; }

.prod-track{
  display: flex;
  gap: var(--prod-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The air either side that lets the FIRST and LAST card reach the middle.
   It is two flex items rather than the track's own padding: a scroll
   container's end padding is left out of its scrollable overflow, so with
   padding the fourth card stopped 432px short of centre and the rail simply
   would not go any further. The gap sits between a spacer and its card, so it
   comes off the spacer's own width. */
.prod-track::before,
.prod-track::after{
  content: "";
  flex: none;
  width: calc(50vw - var(--prod-w) / 2 - var(--prod-gap));
}

.prod-card{
  flex: none;
  width: var(--prod-w);
  scroll-snap-align: center;
  /* One swipe, one card: a hard flick on a trackpad stops at the next card
     rather than flying past two. */
  scroll-snap-stop: always;
  /* Standing back: smaller and quieter until it is the one in the middle. */
  transform: scale(.94);
  opacity: .5;
  transition: transform .52s var(--th-ease, cubic-bezier(.2,.7,.2,1)),
              opacity   .52s var(--th-ease, cubic-bezier(.2,.7,.2,1));
}
.prod-card.is-active{ transform: scale(1); opacity: 1; }
.prod-card:not(.is-active) article{ cursor: pointer; }

/* The whole card is the target, so the whole card lands the action: hovering
   anywhere on it grows the thread and fills the cell, the same as hovering the
   link itself. The thread rules key off the link, so the card hands its own
   hover down. :focus-within covers the keyboard, where the link is what is
   focused and the card never knows. */
.prod-card article:hover .th-arrow .th-ln,
.prod-card article:focus-within .th-arrow .th-ln{ width: 24px; }
.prod-card article:hover .th-arrow .th-cl,
.prod-card article:focus-within .th-arrow .th-cl{ background: var(--th-ink); }
.prod-card article:hover .prod-cta,
.prod-card article:focus-within .prod-cta{ color: var(--ap-orange); }
.prod-cta{ transition: color .24s var(--th-ease, cubic-bezier(.2,.7,.2,1)); }

/* The whole card is the link (2026-10-16, at the user's request), not only
   its words: the Explore link's box is stretched over the article, so a press
   anywhere on the card — the picture, the name, the line — is a press on the
   link itself, with everything a real link does (a new tab on a modifier or a
   middle click, the address on hover). A card off to one side still slides in
   first: floom-products.js cancels that click before it reaches the link, and
   a drag never lands one. The rail's grab hand gives way to the link's. */
.prod-cta::before{ content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.prod-card.is-active .prod-cta{ cursor: pointer; }

.prod-card article{
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;      /* the four cards stand one height: the rail's */
  height: 100%;
  gap: round(clamp(20px, 2.2vw, 32px), 4px);
  padding: round(clamp(12px, 1.3vw, 16px), 4px) round(clamp(12px, 1.3vw, 16px), 4px) round(clamp(24px, 2.4vw, 32px), 4px);
  background: #FFFFFF;
  border: 1px solid color-mix(in srgb, var(--ap-ink) 10%, transparent);
  border-radius: 20px;
  overflow: hidden;
  /* The <li> carries the rail's own transform; the hover lives on the
     <article> inside it so the two never write to the same property. No
     shadow under it — flat paper and a hairline is what this site is. */
  transition: transform .34s var(--th-ease, cubic-bezier(.2,.7,.2,1)),
              border-color .24s ease;
}
.prod-card article:hover,
.prod-card article:focus-within{
  transform: scale(1.006);
  border-color: color-mix(in srgb, var(--ap-ink) 20%, transparent);
}

/* ── the recording ───────────────────────────────────────────────────────
   The app as it was recorded: 1760 by 1000, so the frame takes that shape and
   nothing is cropped. Its corner sits 8px inside the card's 20 — concentric
   with the card at the inset the padding gives it. */
.prod-shot{
  position: relative;
  aspect-ratio: 1760 / 1000;
  border-radius: 12px;
  overflow: hidden;
  background: #FFFFFF;
}
.prod-vid{
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}
/* a still in the frame instead of a recording or a scene: each product's
   card image (assets/app/card-*.webp), drawn at the frame's shape. Not
   .prod-vid — floom-products.js plays and pauses anything with that class. */
.prod-still{
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* the hairline is drawn over the picture, not under it, so it holds at the edge */
.prod-shot::after{
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ap-ink) 8%, transparent);
  pointer-events: none;
}
/* ── the words ───────────────────────────────────────────────────────────
   Under the recording, in two columns on a wide card: the name and what it
   is on the left, what it does and the way in on the right. One column on a
   narrow one. */
.prod-copy{
  display: grid;
  gap: 16px round(clamp(28px, 4vw, 64px), 4px);
  padding-inline: round(clamp(8px, 1.3vw, 16px), 4px);
}
/* Side by side, the name and the line share a baseline (the name's first
   line, the line's first line), so the two columns read as one row. */
@media (min-width: 900px){
  .prod-copy{ grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: baseline; }
}
.prod-id{ display: grid; gap: 8px; }
.prod-body{ display: grid; }

/* The product's name, and the line that says what it is. They were a mono
   label on top and a sentence underneath; the name carries more weight set
   once, large, with its overview under it. */
.prod-card h3{
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fl-t-title2);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--black);
  text-wrap: balance;
}
.prod-desc{
  margin: 0;
  font-family: var(--font);
  font-size: 13px; font-weight: 500; line-height: 1.3;
  color: var(--text-secondary);
}
.prod-line{
  margin: 0;
  font-family: var(--font);
  font-size: clamp(14px, 1.2vw, 16.5px);
  font-weight: 450;
  line-height: 1.3;
  color: var(--text-secondary);
}
.prod-cta{
  margin-top: 16px;            /* 26px: the furthest, because it is the action */
  display: inline-flex; align-items: center; gap: 12px;
  justify-self: start;
  font-family: var(--font);
  font-size: 15px; font-weight: 600; line-height: 1;
  color: var(--black);
}

/* the note under the rail: these figures are made up, and say so */
.prod-note{
  margin: round(clamp(16px, 2vw, 24px), 4px) 0 0;
  text-align: center;
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text-secondary);
  opacity: .85;
}

/* ── which one ────────────────────────────────────────────────────────────
   Back and forward in the round arrows the video tour uses: side by side
   under the card on a phone, either side of the card from 761px wide (the
   stage, below). At either end the arrow that has nowhere to go fades. No
   dots (removed 2026-11-05, at the user's request): the neighbours either
   side already say there are more. */
.prod-stage{ position: relative; }   /* the arrows' place is measured from the rail's top */
.prod-ctl{
  display: flex; align-items: center; justify-content: center;
  gap: round(clamp(20px, 2.6vw, 32px), 4px);
  margin-top: round(clamp(24px, 3vw, 40px), 4px);
}
.prod-arrow{
  appearance: none;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  /* see-through and borderless (2026-11-05, at the user's request): the ink
     at 10%, so the next card shows through the arrow that stands over it;
     the ink glyph alone draws the button */
  background: color-mix(in srgb, var(--ap-ink) 10%, transparent);
  color: var(--ap-ink);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease;
}
.prod-arrow svg{ width: 20px; height: 20px; }
/* Hover deepens the same see-through ink to 20%, the arrow staying ink —
   never a solid disc. Keyboard focus is the site's orange ring, not the
   browser's blue one. */
.prod-arrow:not([aria-disabled="true"]):hover{ background-color: color-mix(in srgb, var(--ap-ink) 20%, transparent); }
.prod-arrow:focus-visible{ outline: 2px solid var(--ap-orange); outline-offset: 2px; }
.prod-arrow:not([aria-disabled="true"]):active{ transform: scale(.94); }
.prod-arrow[aria-disabled="true"]{ opacity: .3; cursor: default; }

/* ── one screen ───────────────────────────────────────────────────────────
   On a wide window the whole section — heading, card and note — holds
   to the window's height. The card takes its width from the room the rest
   leaves: the section's padding, the heading, the card's own frame and the
   words under its picture, the note (--prod-reserve, measured), the
   picture keeping its 1760:1000. Never wider than its ten columns, and
   never under 512px: a very short window (720px tall or less) scrolls a
   little rather than shrink the app to a thumbnail. Tablets and phones were
   already within the screen. */
@media (min-width: 761px){
  .prod{
    --prod-pad: round(clamp(32px, 4svh, 80px), 8px);
    /* measured 389px from 1280 to 2560 wide, tall and short windows alike
       (the short one's tighter head is spent on the narrower card's longer
       lines), and 3 to spare; the arrows stand beside the card, so only the
       note is under it */
    --prod-reserve: calc(2 * var(--prod-pad) + 392px);
    --prod-fit: calc((100svh - var(--prod-reserve)) * 1.76 + 34px);
    --prod-w: min((var(--prod-grid) + var(--fl-col-gap)) * 10 / 12 - var(--fl-col-gap), max(var(--prod-fit), 512px));
    padding-block: var(--prod-pad);
  }
  /* One rhythm, closest first (HIG › Layout: group by space). Inside the
     head 16; the head to the card it introduces 48 (40 + the rail's 8), the
     widest gap in the section; the picture 16 inside the card; the words 24
     under it and 32 from the card's sides and bottom alike; the note 24
     under the card (16 + the rail's 8), closing the section. */
  .prod-head{ margin-bottom: var(--sp-10); }
  .prod-rail{ padding-block: var(--sp-2); }
  .prod-card article{ gap: var(--sp-6); padding: var(--sp-4) var(--sp-4) var(--sp-8); }
  .prod-copy{ padding-inline: var(--sp-4); }
  .prod-ctl{ margin-top: 0; }   /* holds only the arrows, which stand beside the card */
  .prod-note{ margin-top: var(--sp-4); }
  /* The arrows stand either side of the card (2026-11-05, from the user's
     sketch): each in the middle of the room between the card and the
     window's edge, level with the middle of the card's picture. The card is
     centred on the stage, so that room is 50% − half the card, and its
     middle 25% − a quarter of the card; the picture starts under the rail's
     8 and the card's 1 + 16, and is (card − 34) / 1.76 tall. On the right
     the arrow sits over the next card, which a press there also brings in,
     and lets it show through. `translate`, not `transform`, so the press's
     scale still composes. */
  .prod-arrow{
    position: absolute; z-index: 2;
    top: calc(var(--sp-2) + 17px + (var(--prod-w) - 34px) / 3.52);
  }
  .prod-arrow[data-prod-step="-1"]{ left: calc(25% - var(--prod-w) / 4); translate: -50% -50%; }
  .prod-arrow[data-prod-step="1"]{ right: calc(25% - var(--prod-w) / 4); translate: 50% -50%; }
  /* the words' two columns are spaced by the card's own width, not the
     window's: a narrower card keeps room for its line instead of a wide gap */
  .prod-card article{ container-type: inline-size; }
  .prod-copy{ column-gap: round(clamp(16px, 6cqi, 64px), 4px); }
}
/* A short window (920px tall or less; a laptop's browser is about 790)
   tightens the head — its standfirst one size down, its gaps one step in —
   so the card keeps a usable size and the section still fits. The heading itself keeps the size every section head on the
   page has. */
@media (min-width: 761px) and (max-height: 920px){
  .prod-stand{ font-size: 15.79px; }
  .prod-head .ap-eyebrow{ margin-bottom: var(--sp-2); }
  .prod-head{ margin-bottom: var(--sp-8); }   /* 40 with the rail's 8: still the widest gap */
}

@media (max-width: 760px){
  /* A slide you can see is one: the card stops short of the margins so the
     next one shows at the edge, as the neighbours do on a wide screen. At the
     full twelve columns the card filled the phone and nothing said there were
     three more a swipe away. 390 wide: a 310px card, 28px of the next. */
  .prod{
    --prod-peek: var(--sp-6);
    --prod-w: calc(100vw - 2 * (var(--fl-gutter) + var(--prod-peek)));
    --prod-gap: var(--sp-3);
  }
  .prod-arrow{ width: 44px; height: 44px; }
  .prod-arrow svg{ width: 18px; height: 18px; }
}
@media (prefers-reduced-motion: reduce){
  .prod-rail{ scroll-behavior: auto; }
  .prod-card, .prod-card article, .prod-arrow{ transition: none; }
  /* no lift; the thread and the pull still answer the hover */
  .prod-card article:hover,
  .prod-card article:focus-within{ transform: none; }
}
