/* Caveat is the deck's one handwriting face, and it is used only for annotation:
   the "agentic AI" note across the cover timeline (.timeline__scribble) and the
   two skills either side of the Storybook grid (.layer--scribble). Imported here
   rather than in tokens.css because it is deck chrome — the product never sets
   type in it. */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500;600&display=swap');

/* Deck chrome only. Everything inside a .device / .crop iframe is the real
   prototype, styled by the real design system — nothing here reaches into it.

   Values marked (Figma) are read off the CE-refresh-Presentation frames and are
   deliberately raw numbers, not tokens: this is a 1920x1080 display canvas, and
   the system has no 360px type or 32px-radius surface to borrow. */

:root {
  --pres-navy: #21385c;        /* (Figma) every frame's fill */
  --pres-placeholder: #d9d9d9; /* (Figma) the rect standing in for the app */
  /* One duration and one curve for every move in the deck, so the type, the
     screen and the cards travel together instead of racing. */
  --pres-move: 760ms;
  --pres-ease: cubic-bezier(.33, 0, .15, 1);
  --pres-fade: 340ms;
  /* How far out of focus a blurred slide's own content goes (see
     .layer--blurred). Enough that a 64px heading is unreadable — the point is
     that the argument recedes, not that it dims — and no further, so the shapes
     under the number still read as the slide the audience was just looking at. */
  --pres-blur: 18px;
  /* And a step down in brightness with it. The blur alone left the recording's
     own white window as bright as the number standing on it; dimming what is out
     of focus is what puts the figure in front rather than in among it. A
     brightness filter rather than a scrim over the slide, so it rides on the same
     one flag and there is no extra element to keep in the right stacking order. */
  --pres-blur-dim: 0.5;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  /* The same fill as .stage, so the strip a non-16:9 window leaves around the
     stage is invisible rather than a dark frame down each side. */
  background: var(--pres-navy);
  overflow: hidden;
}

.viewport { position: fixed; inset: 0; overflow: hidden; }

/* Pinned to the viewport's top-left with a 0 0 origin, and centred by an
   explicit pixel translate from fit(). The usual
   `top:50%; left:50%; transform: translate(-50%,-50%) scale(s)` does NOT centre
   a scaled box: the percentages resolve against the unscaled 1920x1080, so the
   offset is a full-size one applied to a scaled element and the stage lands off
   centre on any window that is not exactly 16:9. That misplacement is invisible
   while everything is navy-on-navy, and very visible once a slide has to line
   its content up with the real viewport edge. */
.stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  background: var(--pres-navy);
  transform-origin: 0 0;
  overflow: hidden;
}

/* See render(). .viewport is the clip in this state. */
.stage--bleed { overflow: visible; }

/* ---------- Text layers -------------------------------------------------- */

/* A mark above a title (see the note in index.html). Fades with the slide like
   everything else; nothing here travels, because a mark belongs to one slide.
   NOT called .badge: ce-ui has an element class by that name — a pill with a
   white ground — and this deck loads elements.css for its cropped screens. */
.slide-mark {
  position: absolute;
  display: block;
  /* The box is square; the file inside it need not be. `contain` keeps the mark
     its own shape, and `left` puts its left edge on the box's — so a mark lines
     up with the type under it whatever proportion the logo is drawn in. */
  object-fit: contain;
  object-position: left center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--pres-fade) ease;
}

.slide-mark--on { opacity: 1; }

.layers { position: absolute; inset: 0; pointer-events: none; }

/* A layer is one line of type. It keeps the same DOM node for as long as the
   same words are on screen, so going from a slide to its "next" state animates
   size and position instead of swapping one block of text for another. */
.layer {
  position: absolute;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-sans);
  /* The frames set Figtree Regular throughout; split here on request. A
     supporting line — everything above and below a display word: "We", the feed
     words, every sub-line — takes Light, because at 32..80px it sits beside type
     set at 180 and up, where the same nominal weight carries far more visible
     stroke and the small lines read heavy against it. The display words keep
     Regular; see .layer--boxed, which is exactly the set of them.
     Figtree is a variable font over 300..900, so this is a real instance rather
     than a face the browser has to synthesise. */
  font-weight: 300;
  line-height: normal;
  white-space: nowrap;
  opacity: 0;
  transition:
    left var(--pres-move) var(--pres-ease),
    top var(--pres-move) var(--pres-ease),
    width var(--pres-move) var(--pres-ease),
    height var(--pres-move) var(--pres-ease),
    font-size var(--pres-move) var(--pres-ease),
    line-height var(--pres-move) var(--pres-ease),
    letter-spacing var(--pres-move) var(--pres-ease),
    filter var(--pres-move) var(--pres-ease),
    opacity var(--pres-fade) ease;
}

/* The last press of the "Powerful" section: the whole argument goes out of focus
   under the number that sums it up. A filter per element rather than one on
   #layers, because the number is a layer too and has to stay sharp — see the
   note in applyLayers(). --pres-blur is shared with .shot--blurred so the words
   and the plates soften by the same amount and cannot drift apart. */
.layer--blurred { filter: blur(var(--pres-blur)) brightness(var(--pres-blur-dim)); }

/* The layer that stays in focus on a blurred slide, lifted over the plates and
   the recording — see the note in applyLayers(). .layers is not a stacking
   context (no z-index of its own), so this counts against its siblings
   directly. */
.layer--sharp { z-index: 2; }

/* A wrapped block that is also centred — the text under the figure, and the only
   one in the deck. The transform centres the BOX; without this the lines inside
   it would still be ragged right against a centred number. */
.layer--centered.layer--wrap { text-align: center; }

/* The dash inside the 360px figure. An en dash at that size is a slab as wide as
   a digit and reads as a minus sign; at a fraction of it, it reads as the join
   in a range. An em-relative size, so it stays that fraction if the figure is
   ever set larger or smaller. `middle` rather than `baseline`: a dash sits on
   its own font's x-height, and at 0.22em that would put it near the digits'
   baseline instead of across their middle. The margins are the air the dash
   loses by shrinking — without them the digits close up around it. */
.layer__dash {
  font-size: 0.22em;
  /* A length, not `middle`: `middle` aligns the dash's own middle to the
     parent's baseline plus half ITS x-height, which at this size ratio lands the
     dash low, under the digits' middle. A length raises the dash's baseline, and
     it is in the DASH's own em (0.22 of the figure), so half the numerals' cap
     height — ~0.36em of the figure — comes out at ~1.6 of these. Less the ~0.3em
     the dash's own ink already sits above its baseline. */
  vertical-align: 1.3em;
  /* In the DASH's em, so it is 0.4 of a 0.22em glyph — around 32px against the
     360px figure, near enough a word space at the size the digits are set. 0.06
     was the air the dash lost by shrinking and no more, which left the digits
     closed up around it and the join invisible; the range has to read as two
     ends with something between them. */
  margin: 0 0.4em;
}

/* Applied for the single frame in which a layer is placed from hidden, then
   dropped — the same device as .crop--instant, for the same reason. Opacity is
   deliberately still transitioned: an arriving line fades, a line that is
   already up travels. */
.layer--instant { transition: opacity var(--pres-fade) ease; }

/* The display words are vertically centred inside a fixed box in Figma, so the
   box is the animated thing and the glyphs centre within it. That box is also
   what makes this class the display set exactly — a supporting line never states
   a height — so the weight the frames drew is restored here rather than being
   listed per layer in the slide data. */
.layer--boxed {
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-weight: 400;
}

/* An arriving layer that rises into place instead of only fading — the two
   answers on "Next?", which are revealed by pressing next rather than being on
   the slide when it opens. An ANIMATION, not a transition: .layer's transition
   list deliberately excludes transform (see .layer--centered), and an arriving
   layer is deliberately pinned by .layer--instant so it cannot travel or scale
   into place. This is the one case where the arrival itself is the point, so it
   is expressed as its own keyframes rather than by loosening either of those.

   `backwards` fill gives the hidden state during the delay, so a staggered line
   is not visible before its turn; nothing needs a resting opacity of 0 that would
   then have to be undone. The class is removed and re-added on each arrival (see
   applyLayers), which is what replays it. */
.layer--rise {
  animation: layer-rise 640ms var(--pres-ease) var(--rise-delay, 0ms) backwards;
}

/* The end frame is the layer's OWN opacity, not 1 — `--layer-opacity` is written
   inline next to `opacity` by applyLayers. A set-back line (the numbers beside
   the goals) would otherwise rise to full white and then, because the fill is
   `backwards` and not `forwards`, snap down to its stated opacity the frame the
   animation ended: it brightened and then dimmed. Now it arrives at the opacity
   it keeps. */
@keyframes layer-rise {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: var(--layer-opacity, 1); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .layer--rise { animation: none; }
}

/* A layer placed by its own middle rather than its left edge — the Complexity
   lockup, whose lines sit against a centred display word (see the note in
   applyLayers()). Deliberately NOT in .layer's transition list: the transform is
   constant for as long as the layer is up, because every slide it appears on
   centres it, so there is nothing here to animate — only `left` travelling
   between two centre points. */
.layer--centered { transform: translateX(-50%); }

/* The deck's one hand, borrowed by the layer system. Slide 2 writes "agentic AI"
   across the timeline in Caveat in the swoosh's orange (.timeline__scribble), and
   the two skills either side of the Storybook grid are the same kind of mark: a
   note ON the slide rather than a line OF it. Same face, same weight, same
   colour — the size is per layer, because these sit in a 200px gutter and that
   one sits in open space.

   A rotation, unlike .layer--centered's, IS stated per layer (--layer-rotate,
   written inline by applyLayers), so the two ends of the process can be turned
   independently. Composed onto the centring translate rather than replacing it:
   these are placed by their middle, and a bare `rotate()` here would drop them
   half their own width to the right. transform-origin stays the box's centre, so
   a turned label pivots where it stands. */
.layer--scribble {
  color: #FA8F2E;
  font-family: 'Caveat', 'Segoe Script', cursive;
  font-weight: 600;
}
.layer--scribble.layer--centered {
  transform: translateX(-50%) rotate(var(--layer-rotate, 0deg));
}

/* A layer that states a measure: the body paragraphs the "familiar" section
   introduces, and its 158px display word. `pre-line` rather than `normal`
   because both kinds are here — the paragraphs wrap to the width, and the
   display word's six lines are written out with \n so that where they break is
   the frame's decision and not a function of how a given machine happens to
   render Figtree at 158px. */
.layer--wrap { white-space: pre-line; }

/* The two verbatim quotes on "User evidence". Italic is doing a job here that no
   other line in the deck needs: everything else on a slide is the deck talking,
   and these two are a user talking. Figtree's italic is a real cut in the
   variable family, not a synthesised slant. */
.layer--italic { font-style: italic; }

/* ---------- Device (the live prototype at app scale) --------------------- */

.device {
  position: absolute;
  overflow: hidden;
  /* Navy, NOT the frames' placeholder grey. The grey is right for a box with
     nothing in it yet, but this box is never empty for more than a frame, and
     what it costs the other 99.9% of the time is a light hairline: a rounded
     overflow clip antialiases its edge, the iframe inside is a layer of its own
     and does not blend into that edge identically, and whatever the parent is
     painted shows through the difference. Grey shows as a white outline against
     navy; navy shows as nothing. The load beat keeps its grey on .device__frame
     below, which is inside the clip where it belongs. */
  background: var(--pres-navy);
  transition:
    left var(--pres-move) var(--pres-ease),
    top var(--pres-move) var(--pres-ease),
    width var(--pres-move) var(--pres-ease),
    height var(--pres-move) var(--pres-ease),
    border-radius var(--pres-move) var(--pres-ease),
    transform var(--pres-move) var(--pres-ease),
    opacity 400ms ease;
  transform: translateY(0);
}

/* The rise is what makes a delayed screen read as arriving rather than as
   having been there all along and merely faded up. */
.device--hidden { opacity: 0; transform: translateY(56px); pointer-events: none; }

/* The screen goes soft with the words on a blurred slide. Not covered by
   .layer--blurred / .shot--blurred: those are for type and flat plates, and until
   the commitment press no blurred slide had a live screen on it. Filter is added
   to the transition list above rather than snapping, so the product recedes at
   the same rate the type does. */
.device--blurred {
  filter: blur(var(--pres-blur)) brightness(var(--pres-blur-dim));
  transition:
    left var(--pres-move) var(--pres-ease),
    top var(--pres-move) var(--pres-ease),
    width var(--pres-move) var(--pres-ease),
    height var(--pres-move) var(--pres-ease),
    border-radius var(--pres-move) var(--pres-ease),
    transform var(--pres-move) var(--pres-ease),
    filter var(--pres-move) var(--pres-ease),
    opacity 400ms ease;
}

/* A full-bleed screen fades and nothing more. The 56px rise that makes an inset
   screen read as arriving would expose navy along its top edge, and this slide's
   whole point is that no navy shows. */
.device--bleed.device--hidden { transform: none; }

/* Neither the box nor the transform is transitioned for one frame — see
   placeDevice(). The transform has to be in here too: arriving at a full-bleed
   slide switches the hidden state's transform from the 56px rise to none, and
   with transform still transitioned that difference animates, sliding the whole
   page up from below exactly as if the rise had been left in.
   Opacity is kept, so an arriving screen fades. The rise, where it applies, is
   triggered later by dropping .device--hidden, well outside this frame. */
.device--instant {
  transition: opacity 400ms ease;
}

.device__frame {
  position: absolute;
  /* left/top are set in JS — see DEVICE_OVERSCAN. */
  border: 0;
  transform-origin: top left;
  background: var(--pres-placeholder);
  /* Width/height/transform are set per slide in JS: the app always renders at
     1600px wide (its --sidebar-width of 220px is then 13.75% of the viewport,
     which is the 167/1200 the frames draw) and is scaled down to the box. */
}

/* ---------- Crops (one real element of a page, enlarged) ----------------- */

/* Covers the whole stage and sits above .device in DOM order, so without this
   it would swallow every click meant for the embedded prototype. The crops are
   illustrative — nothing in them is meant to be operated. */
.crops { position: absolute; inset: 0; pointer-events: none; }

/* A crop moving between two slides animates — box and inner offset together,
   so the card travels and grows as one object rather than being uncovered.
   The box's own transition is only half of it: the inner offset carries the
   scale, and if that snapped while the box grew, the content would sit at its
   final size inside a box still catching up. */
.crop {
  position: absolute;
  overflow: hidden;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition:
    left var(--pres-move) var(--pres-ease),
    top var(--pres-move) var(--pres-ease),
    width var(--pres-move) var(--pres-ease),
    height var(--pres-move) var(--pres-ease),
    border-radius var(--pres-move) var(--pres-ease),
    opacity var(--pres-fade) ease;
}

.crop--visible { opacity: 1; }

.crop > iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: top left;
  transition: transform var(--pres-move) var(--pres-ease);
}

/* Applied for the single frame in which a crop is placed from hidden, then
   dropped. Without it the first reveal animates the inner transform up from
   `none` — the view sweeping from the page's top-left corner down to the card,
   which is not a transition anyone asked to watch. A crop arriving fades; only
   a crop already on screen travels. */
.crop--instant { transition: opacity var(--pres-fade) ease; }
.crop--instant > iframe { transition: none; }


/* ---------- screenshot plates ("Powerful") ------------------------------- */

.shots { position: absolute; inset: 0; pointer-events: none; }
/* ---- the Storybook loop -------------------------------------------------
   The cycle drawn around the plates on the Storybook slide's second press: see
   the note on #loop in index.html for the geometry and why it is drawn rather
   than typeset.

   Same treatment as the cover timeline's arrow — #FA8F2E, round caps, a stroke
   that draws itself in — which is what makes the two read as the same hand. The
   stroke is 5 rather than the timeline's 3: that one is drawn in a 120px box and
   scaled up with the slide, this one is in stage pixels at 1:1, so the same
   apparent weight is a bigger number here.

   It sits UNDER the plates — #loop is before #shots in the markup, see the note
   there — so nothing here needs a z-index: the stage's children have none, and
   DOM order is the whole of the stacking. What that hides is the middle of each
   arc, which is the intent: the loop runs behind the repository.

   pointer-events off, like every other overlay on the stage: a click anywhere on
   the slide advances the deck. */
.loop {
  position: absolute;
  inset: 0;
  fill: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
}

.loop path {
  stroke: #FA8F2E;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Long enough to clear either arc with room to spare — a dash shorter than the
   path would repeat and the line would draw in segments instead of one stroke.
   The arcs ride an ellipse of rx 484 / ry 510; measured, they run 1527 and 1295
   stage px, so 1800 clears the longer of them and the offset keyframes below
   state the same number. */
.loop__arc { stroke-dasharray: 1800; }
.loop__head { stroke-dasharray: 200; }

.loop--on { opacity: 1; }

/* The two arcs draw in sequence, each one's head landing before the next arc
   starts: ux-design goes over the repository, arrives, and then the return
   underneath it is a second stroke of the pen rather than the same one
   continuing. Reusing tl-draw's shape but not tl-draw itself — that one is
   written against a 400 dash — so each length has its own keyframes.

   Delays are off the press, not off a slide-wide lead like the timeline's: this
   press changes nothing else on the slide, so the drawing is the only thing
   waiting on anything. */
.loop--on .loop__arc { animation: loop-draw 950ms var(--pres-ease) 120ms backwards; }
.loop--on .loop__head { animation: loop-head 260ms var(--pres-ease) 970ms backwards; }
.loop--on .loop__arc + .loop__head + .loop__arc { animation-delay: 1190ms; }
.loop--on .loop__arc + .loop__head + .loop__arc + .loop__head { animation-delay: 2040ms; }

@keyframes loop-draw {
  from { stroke-dashoffset: 1800; }
  to   { stroke-dashoffset: 0; }
}

@keyframes loop-head {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .loop--on .loop__arc,
  .loop--on .loop__head { animation: none; }
}


/* Same contract as .crop, one level simpler: a plate never travels between
   slides here, it only arrives. So the box has no geometry transitions to run —
   what it needs is the ARRIVAL, and that is the same rise the goals and the
   "Next?" answers use, so the images land with the words of their group rather
   than fading in behind them. */
.shot {
  position: absolute;
  overflow: hidden;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition:
    filter var(--pres-move) var(--pres-ease),
    opacity var(--pres-fade) ease;
}

/* Softened with the words around it — see .layer--blurred. */
.shot--blurred { filter: blur(var(--pres-blur)) brightness(var(--pres-blur-dim)); }

.shot--on { opacity: 1; }

/* The crop. Figma states an image's placement inside its box as four
   percentages of the BOX, which is exactly an absolutely positioned img in an
   overflow-hidden parent — so the numbers in SHOTS are the frame's own, not a
   re-derivation of them. max-width:none because a percentage width above 100 is
   the whole point here and the UA default would clamp it. */
.shot__img {
  position: absolute;
  max-width: none;
  display: block;
}

/* An arriving plate rises with its group. Kept as its own keyframes rather than
   reusing layer-rise, because a plate ends at full opacity always — there is no
   set-back state for an image — so it does not need --layer-opacity. */
.shot--rise {
  animation: shot-rise 640ms var(--pres-ease) var(--rise-delay, 0ms) backwards;
}

@keyframes shot-rise {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .shot--rise { animation: none; }
}


/* ---------- the research reel ("User evidence") -------------------------- */

/* The frame's rectangle, which is a video well rather than a placeholder for a
   screen: this is the one slide where the evidence is a recording of a real user
   and not a rendering of the product. Black rather than the frame's grey — the
   well is now bigger than the clip's own aspect (see .reel__video, which
   contains rather than covers), so the background is a letterbox, and a
   letterbox is black. It is also what shows behind a video that has not painted
   its first frame.

   Unlike the crops and the board, this one DOES take clicks — it is the play
   button for the recording inside it. It is the second interactive thing in the
   deck after the theme toggle, and it costs the click-to-advance the left third
   of one slide; the arrow keys, the chevrons and the right side of the stage all
   still advance, so the presenter is never stuck. Only when it is on: an
   invisible well must not eat clicks on the twenty slides it is not part of. */
.reel {
  position: absolute;
  overflow: hidden;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition:
    filter var(--pres-move) var(--pres-ease),
    opacity var(--pres-fade) ease;
}

.reel--on { opacity: 1; pointer-events: auto; cursor: pointer; }

/* Softened with the quotes beside it — see .layer--blurred. Pointer events go
   with it: the well is a play button, and a blurred slide is past the point of
   starting the recording. */
.reel--blurred {
  filter: blur(var(--pres-blur)) brightness(var(--pres-blur-dim));
  pointer-events: none;
}

/* The play affordance: a scrim and a triangle drawn on the well itself rather
   than the browser's own controls, which would put a grey chrome bar across a
   composition the frame drew as one clean rectangle. It is the whole well, so
   the target is the size of the video and cannot be missed from the back of a
   room. Gone while it plays, and back the moment it pauses or ends. */
.reel::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* the triangle, centred: a 0-width border trick would not scale with the
       stage, so it is an SVG data URI sized in the same px as everything else */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cpath d='M36 28 L72 48 L36 68 Z' fill='white'/%3E%3C/svg%3E") center / 96px 96px no-repeat,
    rgba(33, 56, 92, 0.45);
  opacity: 1;
  transition: opacity var(--pres-fade) ease;
  pointer-events: none;
}

.reel--playing::after { opacity: 0; }

/* `contain`, so the whole recording is on screen: the clip is a browser window
   with a UI in it, and `cover` cropped the sides off the very thing the slide is
   asking the room to look at. What is left over reads as one rectangle anyway,
   because the letterbox is the well's own black. */
/* Cropped to the browser window only: the 1920×1080 recording holds it at
   x 0–1440, y 108–972 (5:3), with the participant's webcam to the right and
   black bands above and below. The video is scaled so that region fills the
   well exactly, and .reel's overflow:hidden cuts off the rest. */
.reel__video {
  position: absolute;
  left: 0;
  top: -12.5%;      /* 108 / 864 */
  width: 133.3333%; /* 1920 / 1440 */
  height: 125%;     /* 1080 / 864 */
  object-fit: fill;
  display: block;
}


/* ---------- "connect" illustration -------------------------------------- */

.illustration {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  /* This duration is the EXIT only — a transition is read from the state being
     entered, and leaving .illustration--visible lands here. Deliberately much
     shorter than the entry: on the way out the screen is arriving behind it and
     the feeds should clear the stage rather than linger over it. */
  transition: opacity 200ms ease;
}

/* Entry is instant on the container, because the staggered per-feed animations
   below are the entry — fading the container in as well would double it up. */
.illustration--visible { opacity: 1; transition-duration: 0ms; }

.illustration__feeds { position: absolute; inset: 0; width: 100%; height: 100%; }

/* (Figma) the outlined strokes measure 3px wide with a 3-on-3 dash, and their
   fill is #51ACF6 — which is --color-connector, the token the dashboard's own
   GMV connectors already use. */
.illustration__feed path {
  fill: none;
  stroke: var(--color-connector);
  stroke-width: 3;
  stroke-dasharray: 3 3;
  /* The feeds drift towards the mark. One dash period per step, so the loop is
     seamless; slow enough to read as flow rather than as motion. */
  animation: feed-flow 3s linear infinite;
}

@keyframes feed-flow {
  to { stroke-dashoffset: -6; }
}

/* (Figma) each feed terminates in an r=8 disc at the word end. */
.illustration__feed circle { fill: var(--color-connector); }

/* The entry runs top feed to bottom feed, then the mark. `backwards` fill is
   what makes this restartable: the hidden state comes from the animation's own
   0% frame during its delay, so nothing needs a resting opacity of 0 that
   would snap the illustration off when the slide is left. Re-adding
   .illustration--visible replays the whole sequence. */
.illustration--visible .illustration__feed {
  animation: feed-in 520ms var(--pres-ease) backwards;
}
.illustration--visible .illustration__feed:nth-child(1) { animation-delay: 80ms; }
.illustration--visible .illustration__feed:nth-child(2) { animation-delay: 200ms; }
.illustration--visible .illustration__feed:nth-child(3) { animation-delay: 320ms; }
.illustration--visible .illustration__feed:nth-child(4) { animation-delay: 440ms; }
.illustration--visible .illustration__feed:nth-child(5) { animation-delay: 560ms; }

@keyframes feed-in {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

.illustration__mark {
  position: absolute;
  left: 905px;
  top: 524px;
  width: 420px;
  height: 384px;
  transform-origin: 50% 58%;   /* where the three arrows meet, not the box centre */
}

/* Lands once the last feed has arrived. */
.illustration--visible .illustration__mark {
  animation: mark-in 760ms var(--pres-ease) 620ms backwards;
}

@keyframes mark-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .illustration__feed path { animation: none; }
  .illustration--visible .illustration__feed,
  .illustration--visible .illustration__mark { animation: none; }
}

/* ---------- Specimen board ("Consistency") ------------------------------- */

/* The one slide whose subject is the elements themselves rather than a screen
   they sit in. Everything inside a .spec__stage is real ce-ui markup styled by
   the real ce-ui CSS — this block only positions the board and dresses the navy
   around it. */
.board {
  position: absolute;
  left: 32px;   /* PAD_LEFT */
  top: 400px;
  width: 1856px;
  display: grid;
  /* Explicit, unequal tracks, in the order the specimens are now read:
     foundations + elements, then the toolbars, then the product. Each width is
     what its own content needs — the crops cannot go under 640 (a 560px band with
     32px of offset plus the panel's padding), and the product needs the most
     because it holds a tile and a list of rows side by side. Sums to 1856 with
     two 24px gaps. */
  grid-template-columns: 500px 640px 692px;
  gap: 24px;
  align-items: start;
  font-family: var(--font-sans);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--pres-fade) ease;
}

.board--on { opacity: 1; }

.spec { display: flex; flex-direction: column; }

/* --color-page, not white: it is the surface these components actually sit on in
   the product, and a specimen on the wrong ground is a specimen of something
   else. Fixed height so the three panels line up and the rules under them start
   on one line — 450 rather than the 320 they were, on request, which is what
   makes room for a third product row and for the foundations. */
.spec__stage {
  height: 450px;
  padding: 24px;
  border-radius: 24px;   /* PANEL_RADIUS */
  background: var(--color-page);
  overflow: hidden;
}

/* One panel centres its content: the crop stack is much shorter than the panel
   now that it is at real size, and would otherwise hang off the top edge. */
.spec__stage--center { display: flex; align-items: center; }

/* The three toolbar crops. Real pages in real iframes, each showing the same
   560x180 window of its own toolbar at SCALE 1 — see index.html. Positioned
   rather than flowed so they can overlap; later ones are later in the DOM and
   therefore on top, which is why the stack is written bottom card first.

   No transform scale at all now: at real size the window can be wide enough to
   hold each toolbar's whole control cluster, which is what the magnified version
   had to crop. Only the translate that moves each page's toolbar into view
   remains. 180 tall rather than the toolbar's own 56, because at 1:1 three 56px
   bands left most of the panel empty — the extra height carries the table head
   and the first rows under each toolbar, which is the pattern in its context
   rather than three stripes floating in a box. */
.specshots {
  position: relative;
  width: 592px;
  height: 400px;
  /* The stack fills its panel exactly at 1:1, which left it with no margin at
     all. Scaled down as a GROUP, on request, rather than by narrowing the crop
     window or moving the bands: the content and the overlap stay precisely as
     they were, and what changes is only the air around them. From the centre, so
     the breathing room is even on all four sides. */
  transform: scale(0.88);
  transform-origin: center;
}

.specshot {
  position: absolute;
  width: 560px;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  /* An edge and a lift, so three bands of the same white read as three separate
     screens rather than as one striped surface. */
  outline: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.specshot[data-shot="fields"]   { left: 0;    top: 0; }
.specshot[data-shot="products"] { left: 16px; top: 110px; }
.specshot[data-shot="orders"]   { left: 32px; top: 220px; }

/* The viewport the crop coordinates were measured against. Changing either number
   moves every rect above — the pages lay out differently at another size. */
.specshot > iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;
  height: 1100px;
  border: 0;
  transform-origin: top left;
}

/* 1.2 puts the system's 13/14px type at ~16/17px, which reads from the back of a
   room once the 1920 stage has been scaled down to a laptop screen. Only the two
   built specimens use it; the crops are at 1:1 (above). */
.spec__zoom { zoom: 1.2; }

/* The 16/9 crop products.html gives every tile in its grid — the ratified
   element's own wrap is taller, and a specimen should be the shape the product
   actually shows. min-height:0 for the same reason products.html needs it: as a
   flex item the wrap's automatic minimum is the image's own 320x200. */
.spec__zoom .product-card__thumb-wrap { aspect-ratio: 16 / 9; min-height: 0; }

/* elements.css leaves .product-card__main open at the bottom (padding 8/8/0),
   because it is .product-card__stats' own padding that closes the card off. This
   board renders no stats block, so without that the identifiers run into the
   card's bottom edge — which is what "the product card looks broken" was.
   products.html carries the same stand-in; the deck goes further on request, to
   12px at the sides and 16 at the bottom, because a specimen sitting on its own
   in a panel has no grid of neighbours to give it apparent margin. */
.spec__zoom .product-card__main {
  padding: var(--space-8) var(--space-12) var(--space-16);
}

/* Identifier pills flush with the title, not 4px left of it — products.html's own
   fix, verbatim, and its reasoning: .identifier-stack__row bleeds -4px
   horizontally (elements.css) and the label cell pads 4px back, so the TEXT lands
   on the container's left edge and the pill's FILL hangs 4px past it. The pill is
   the shape the eye aligns to here, not the text inside it. Left only: the -4px on
   the right is what lets the value's own padding sit inside the paint, and nothing
   lines up against that edge. */
.spec__zoom .product-card .identifier-stack__row { margin-left: 0; }

.spec__zoom--stack { display: flex; flex-direction: column; gap: var(--space-16); align-items: flex-start; }

/* Tile and rows side by side, so the two shapes of the same three facts are read
   against each other rather than one after the other. */
.spec__zoom--split { display: flex; gap: var(--space-16); align-items: flex-start; }
/* 240, up from 200, on request. Width is the lever for a product card's height:
   its thumbnail is a 16/9 crop of that width (below), so widening the tile is
   what makes it taller without inventing an aspect ratio the product does not
   use. */
.spec__zoom--split > .product-card { width: 240px; flex: none; }
.spec__zoom--split > .card { flex: 1; min-width: 0; }

/* A .card whose rows divide edge to edge. .card's own 16px padding would hold
   every divider inside it, leaving a rule that stops short of the corner at both
   ends — so the padding comes off the card and each row carries its own instead.
   Which is CLAUDE.md's rule anyway: a divider and the padding around it belong on
   the same element. */
.card--rows { padding: 0; gap: 0; }

/* Two controls that belong on one line inside the stack. */
.spec-row { display: flex; align-items: center; gap: var(--space-12); }

/* The image + name + identifier row. Page-local in every page that draws it
   (orders.html calls it .order-detail__item-thumb, products.html builds the same
   shape again) — which is the point of the tile, so the deck writes its own
   rather than pretending a shared class exists. Sizes are orders.html's. */
.spec-media {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12);
}
.spec-media + .spec-media { border-top: 1px solid var(--color-outline); }
.spec-media__thumb {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.spec-media__text { min-width: 0; }
/* --color-accent-primary and Medium, which is exactly .product-card__name's own
   treatment (elements.css): a product's name is a link to that product wherever
   it appears, and the two shapes of the same row should not disagree about it. */
.spec-media__name {
  font: var(--weight-medium) var(--text-body-md) var(--font-sans);
  color: var(--color-accent-primary);
  margin-bottom: var(--space-4);
}

/* ---- Foundations, ABOVE the elements ----
   The palette, the radius scale and the type scale, as the things the buttons
   below are drawn from. Ordered first on request: they are the reason the elements
   look the way they do, so they are read before, not as a footnote after.
   Every value is a token reference, never a literal: the point of showing them is
   that they are the same six colours and five sizes everywhere, and a hardcoded
   hex here would quietly stop being true.
   No rule between the two halves, on request — the gap does that job. The
   padding-bottom stays, since it was the divider's own spacing and the two groups
   still need to read as two. */
.spec-foundations {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-16);
  width: 100%;
}

.spec-swatches, .spec-radii { display: flex; gap: var(--space-8); }

.spec-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  /* The same 8% outline a card takes, so a light swatch still has an edge. */
  box-shadow: inset 0 0 0 1px var(--color-outline-card);
}

/* --color-info-tint, not --color-chip: a chip is a near-white wash, and a
   near-white square on the panel's own near-white ground shows no shape at all —
   which is the one thing a radius specimen has to show. */
.spec-radius {
  /* 36, not the swatches' 28: at 28px a --radius-md corner is already more than
     half the box, so 8 and 16 and full all read as the same round square. The
     scale only shows as a scale with room under it. */
  width: 36px;
  height: 36px;
  background: var(--color-info-tint);
}

/* The five sizes, each label set in the size it names. */
.spec-scale {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  color: var(--color-text-secondary);
}

/* The quoted rule under each specimen. Light, like every other supporting line in
   the deck, and a size down from them — this is the caption to a thing that is
   already on screen, not a statement in its own right. */
.spec__rule {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

/* Where the rule came from. On its own line, and dimmer than the rule itself —
   it is provenance, not part of the sentence. A document icon in front of it, on
   request, so the line reads as a file reference at a glance rather than as more
   caption. `flex`, not `inline-flex`: the icon has to sit on the same row as the
   path, but the whole thing still has to start its own line under the rule — an
   inline box flowed up onto the rule's last line instead. */
.spec__src {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.35);
}

/* mountIcons() carries the [data-icon] span's classes onto the <svg> it becomes,
   so this sizes the real element. 18px against 17px type: an icon set beside text
   reads level with it at about the type's own size, not at the 16px .icon
   default, which would look undersized here. currentColor comes from .spec__src
   above, so the icon dims with the line rather than needing its own value. */
.spec__src svg {
  flex: none;
  width: 18px;
  height: 18px;
}

/* ---------- Theme switcher ----------------------------------------------- */

/* Styled as deck chrome rather than as the app's own settings radios: those are
   ink-on-white and this sits on navy, so borrowing them would mean restating
   every one of their colours. What is borrowed is the shape — a radio column,
   read top to bottom — because that is what the setting IS in Settings, and a
   slide about the setting should not invent a different control for it. */
.switcher {
  position: absolute;
  left: 32px;   /* PAD_LEFT — the same margin every line of type on this slide takes */
  top: 680px;
  /* A row of columns: one group per setting, side by side. 88px between them is
     wide enough that "Dark" and "Shell" cannot be read as one line. */
  display: flex;
  flex-direction: row;
  gap: 88px;
  align-items: flex-start;
  font-family: var(--font-sans);
  opacity: 0;
  /* Off by default in both senses: invisible, and not clickable, so the
     clickzone underneath keeps working on every other slide. */
  pointer-events: none;
  transition: opacity var(--pres-fade) ease;
}

.switcher--on { opacity: 1; pointer-events: auto; }

.switcher__group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.switcher__label {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
}

.switcher__opt {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 160ms ease;
}

/* The ring. `currentColor` throughout, so the whole row — dot, label, hover,
   disabled — is carried by the one opacity above rather than by a colour per
   state. */
.switcher__opt::before {
  content: '';
  flex: none;
  width: 26px;
  height: 26px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.switcher__opt:hover:not(:disabled) { opacity: 0.8; }
.switcher__opt[aria-pressed="true"] { opacity: 1; }

/* Filled, with the navy punched back out of the middle — the gap between dot and
   ring is the background rather than a third colour. */
.switcher__opt[aria-pressed="true"]::before {
  background: currentColor;
  box-shadow: inset 0 0 0 4px var(--pres-navy);
}

/* Dark is a name on a list: the palette behind it does not exist yet (see the
   THEMES note in ce-ui/js/shell.js). Disabled rather than hidden, because the
   point of the slide is the set of choices, and one of them not being ready is
   part of the honest answer. */
.switcher__opt:disabled { opacity: 0.28; cursor: default; }

.switcher__wip {
  margin-left: 14px;
  padding: 3px 12px 4px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Flow diagram ("Next flow version Next") --------------------- */

/* (Figma) frame 1:199. Two kinds of panel and five feeds between them. Every
   number is the frame's own — see index.html for why this one composition is not
   normalised to the deck's margins. */
.flow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
  /* The whole composition, 77px up. Since the claim and the diagram were folded
     onto one slide the two share the stage, and the Products panel's top edge is
     what the eye lines the diagram up by — so it goes on the ink top of
     "centred", the title's middle line.

     77 is that measured: the line box runs 212..378 (top 46, three lines of 166),
     Figtree's 180px Medium puts the baseline 146 into that box and the ink 126
     above the baseline, so the ink starts at 232 — and the panel was drawn at 309.

     A transform on the container rather than 77 subtracted from every panel, rect
     and path: this is one composition being placed, not eleven things being
     moved, and the frame's own internal numbers stay readable as the frame's. */
  transform: translateY(-77px);
}

/* Held back a beat, so the title above resolves from three lines to one before
   the diagram arrives under it. The delay is on the entered state only — leaving
   the slide drops it and the diagram clears at once, the same device .lockup and
   .illustration use for their own exits. */
.flow--on { opacity: 1; transition-delay: 220ms; }

.flow__panel {
  position: absolute;
  /* (Figma) 19px, which is the one radius in the deck that is NOT PANEL_RADIUS:
     these are diagram nodes rather than screens or specimens, and 19 is what the
     frame drew for a box of this size. */
  border-radius: 19px;
}

/* (Figma) #1f4075 — a navy one step lighter than the stage, so the panel reads as
   a surface without introducing a colour. */
.flow__panel--solid { background: #1f4075; }

/* The outline itself is an SVG rect in .flow__links (see index.html) so its
   dashes can travel. What is left here is a transparent border, which does
   nothing visible but keeps the box model identical — the labels inside are
   absolutely positioned against the padding box, so dropping the border outright
   would shift every one of them 3px up and left. It stays at 3px even though the
   stroke is now 4: this number is holding the labels where the frame put them,
   and it is not the border anyone sees. */
.flow__panel--open {
  border: 3px solid transparent;
}

.flow__area,
.flow__item {
  position: absolute;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-sans);
  line-height: normal;
  white-space: nowrap;
  /* Placed by their own middles — the frame centres every one of these vertically
     in its own box, and a diagram's labels are easier to check against it as
     centre lines than as box tops. */
  transform: translateY(-50%);
  /* (Figma) -2%, not the deck's -5%. A scoped exception, and a deliberate one:
     -5% is for display type set at 100px and up, and these are 24/64px labels
     inside a diagram. */
  letter-spacing: -0.02em;
}

.flow__area {
  font-size: 64px;
  font-weight: 400;
}

.flow__item {
  font-size: 24px;
  font-weight: 400;
  /* Quiet inside the solid panel, where they are a list under a heading. */
  opacity: 0.6;
}

/* Full strength in the dashed panels, as the frame has them: there are only two
   or three of them and they are the whole content of the box, not a list under
   something bigger. */
.flow__item--bright { opacity: 1; }

/* Above the panels, not under them — on request, so the hub dot at (1024,533)
   reads as sitting ON the Products & Strategy card rather than being clipped by
   its right edge, which is exactly where it lands. The lines themselves all leave
   that point heading right, so nothing else here paints over a panel. */
.flow__links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* The same stroke the "connect" illustration uses — this is the same idea at the
   end of the deck as at its start, so it should not be a second visual language.
   The MOTION is different, though: see .flow--on below. */
.flow__link path {
  fill: none;
  stroke: var(--color-connector);
  stroke-width: 4;
  /* 6-4, not the "connect" illustration's 3-3. Both are 3px wide, but a 3px dash
     on a 3px stroke is a square — it reads as a dotted line, visibly lighter than
     the 3px box outlines beside it. A 6px dash reads as a line of the weight it
     actually is. It also keeps the period at 10, so flow-exchange's 30px of
     travel is three whole dashes on the links and the outlines alike. */
  stroke-dasharray: 6 4;
}

.flow__link circle,
.flow__hub { fill: var(--color-connector); }

/* A feed with nothing on the end of it. Dimmed as a pair — line and dot — so it
   reads as undecided rather than as a box that failed to draw. */
.flow__link--open { opacity: 0.45; }

/* Two-way, on request. The illustration on slide 4 drifts one way for ever, which
   is right for feeds arriving; these carry an exchange, so the dashes run out to
   Channels / Orders / Analytics, hold, and then run the same paths back into
   Products & Strategy. Direction is the only thing saying which way data is going
   — there are no arrowheads — so the hold at each end matters: without it the
   reversal reads as a stutter rather than as a turn.
   30px of travel is exactly five 3-3 dash periods, so the dashes land in phase at
   both ends of the cycle instead of jumping when it loops. 3s per leg is 10px/s:
   fast enough to read as live, slow enough not to fidget behind someone talking.
   On .flow--on rather than on the path itself, so the cycle starts when the
   diagram arrives and restarts every time the slide is reached. */
.flow--on .flow__link path {
  animation: flow-exchange 7s linear infinite;
}

@keyframes flow-exchange {
  0%, 7%   { stroke-dashoffset: 0; }    /* hold, having arrived */
  50%, 57% { stroke-dashoffset: -30; }  /* out, then hold */
  100%     { stroke-dashoffset: 0; }    /* and back in */
}

/* Staggered so the three do not move as one bar. On top of a base delay that
   waits for .flow--on's own 220ms + fade, so the first movement happens on a
   diagram that is already fully on screen. */
.flow--on .flow__link:nth-child(1) path { animation-delay: 600ms; }
.flow--on .flow__link:nth-child(2) path { animation-delay: 800ms; }
.flow--on .flow__link:nth-child(3) path { animation-delay: 1000ms; }

/* The destinations' outlines, on request: their dashes travel with the feed that
   reaches them, so a box reads as receiving rather than as sitting there. Same
   stroke and the SAME keyframes as the connectors — a 6-4 dash is a 10px period,
   so flow-exchange's 30px of travel is exactly three of them and the dashes land
   in phase at both ends of the cycle without needing their own animation.
   Each outline carries its own connector's delay, so the box turns when its line
   does rather than on a beat of its own. */
.flow__outline {
  fill: none;
  stroke: var(--color-connector);
  stroke-width: 4;
  /* Kept at a 10px period even at this weight: it is what makes flow-exchange's
     30px of travel three whole dashes, so the loop stays in phase. */
  stroke-dasharray: 6 4;
}

.flow--on .flow__outline { animation: flow-exchange 7s linear infinite; }
.flow--on .flow__outline[data-outline="channels"]  { animation-delay: 600ms; }
.flow--on .flow__outline[data-outline="orders"]    { animation-delay: 800ms; }
.flow--on .flow__outline[data-outline="analytics"] { animation-delay: 1000ms; }

/* The two open feeds run one way only, at the same 10px/s. Nothing is on the end
   of them, so there is nothing to send back — the asymmetry is the point, and it
   is the same distinction the 45% opacity above is already making. Declared after
   the rule it overrides: same specificity, so source order decides. */
.flow--on .flow__link--open path {
  animation: flow-out 3s linear 600ms infinite;
}

@keyframes flow-out {
  to { stroke-dashoffset: -30; }
}

@media (prefers-reduced-motion: reduce) {
  .flow--on .flow__link path,
  .flow--on .flow__link--open path,
  .flow--on .flow__outline { animation: none; }
}

/* ---------- Direction cards ---------------------------------------------- */

.dircards { position: absolute; inset: 0; pointer-events: none; }

/* A surface, not a box: no border, no shadow, and no bottom edge. It is lit from
   the top with white at 10% and falls back to the navy by its own bottom, and it
   runs off the stage — so it reads as the slide's own ground rising under the
   words rather than as a card sitting on it, and the eye loses where it ends.

   The gradient stops short of the stage floor (the card is taller than what is
   visible) so the last of it fades before the edge rather than at it. */
.dircard {
  position: absolute;
  border-radius: var(--pres-panel-radius, 24px) var(--pres-panel-radius, 24px) 0 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.055) 38%,
    rgba(255, 255, 255, 0.018) 68%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
}

.dircard--on { opacity: 1; }


/* ---------- Cover shine -------------------------------------------------- */

/* A light blue lit into the navy from the top, fading out before the middle.
   Top-to-bottom rather than a corner glow: the cover's title sits at the centre
   of the stage and a directional light would pull the eye off it.

   The colour is the navy's own hue taken up in lightness rather than a new blue,
   so this reads as the background being lit rather than as a second colour laid
   over it. It bottoms out at transparent well above the title — the shine is the
   top of the slide, and the title is meant to sit in the dark part of it. */
.shine {
  position: fixed;
  inset: 0;
  /* Above the stage, which paints its own navy — see the note in index.html. */
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
  background: linear-gradient(
    180deg,
    rgba(126, 178, 255, 0.30) 0%,
    rgba(126, 178, 255, 0.13) 22%,
    rgba(126, 178, 255, 0.04) 42%,
    rgba(126, 178, 255, 0) 60%
  );
}

.shine--on { opacity: 1; }


/* ---------- The "channelengine refresh" lockup -------------------------- */

/* One element, two placements — see index.html. A box of the group's own size
   (Figma node 10:292: 679x79 at x=621), with its parts positioned INSIDE it
   rather than against the stage, so a variant can move or scale the whole title
   by touching this element alone. 621 + 679/2 is 960.5, the stage's own centre,
   which is what lets .lockup--cover scale about its middle and stay centred. */
.lockup {
  position: absolute;
  /* 627/667, not the frame's 621/679: "refresh" was pulled 12px closer to the
     wordmark on request, which shortens the group by the same 12, so the box is
     narrowed and re-centred on 960.5 with it. */
  left: 627px;
  top: var(--lockup-top, 110px);
  width: 667px;
  height: 79px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
}

.lockup--on { opacity: 1; }

/* The two cover placements are one title in two states, and the press between
   them is the only place in the deck where the lockup MOVES rather than cuts.
   So the transition lives on these two classes and nowhere else: leaving the
   cover drops both, the transition goes with them, and the reset to the default
   placement happens instantly behind the fade instead of sliding out of frame.
   Same duration and curve as every other move in the deck, and `top` rides the
   same curve as the scale so the box travels on one path. */
.lockup--cover,
.lockup--cover-small {
  transition:
    opacity var(--pres-fade) ease,
    top var(--pres-move) var(--pres-ease),
    transform var(--pres-move) var(--pres-ease);
}

/* The cover: the title alone, centred in the stage and set large. 500 puts the
   box's own middle on y=540; scale is about the centre by default, so the
   position needs no correction for it. */
.lockup--cover {
  --lockup-top: 500px;
  transform: scale(1.8);
}

/* The cover's second press: the same title taken off the centre of the stage and
   set small at the top of it, so the timeline below has the room. Smaller than
   the closing plate's placement as well as the cover's — on this slide the title
   is a header, not the subject. It stays on the stage's centre line because the
   box is already centred on 960.5 and scale is about the middle. */
.lockup--cover-small {
  --lockup-top: 150px;
  transform: scale(0.78);
}

/* The closing plate: the frame's 62 dropped 48px on request, above the product. */
.lockup--finale { --lockup-top: 110px; }

/* The title recedes with the plate under it — see .device--blurred. */
.lockup--blurred {
  filter: blur(var(--pres-blur)) brightness(var(--pres-blur-dim));
  transition: opacity var(--pres-fade) ease, filter var(--pres-move) var(--pres-ease);
}

/* (Figma) node 9:230's own two parts, at their own offsets inside the 469x71 logo
   box that opens the group — the mark flush to the top-left, the wordmark inset to
   sit on the mark's optical baseline. Absolute numbers rather than the frame's
   percentages: two images that have to stay locked together are easier to check
   as pixels. */
.lockup__mark {
  position: absolute;
  left: 0;
  top: 0;
  width: 78px;
  height: 71px;
}

.lockup__type {
  position: absolute;
  left: 97px;
  top: 14px;
  width: 372px;
  height: 55px;
}

/* Medium (500), which no other type in the deck uses — the supporting lines are
   Light and the display words Regular. It is the frame's own weight and it is
   doing a different job: this is a product name, not a sentence. */
.lockup__refresh {
  position: absolute;
  /* 489, the frame's 501 less 12: the gap to the wordmark's right edge (469) was
     tightened on request, from 32px to 20. The swoosh under it moves by the same
     12 — it is drawn under this word, not at a position of its own. */
  left: 489px;
  top: 3px;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 53px;
  line-height: normal;
  white-space: nowrap;
}

/* 182x20 for a 178x16 mark: the 4px stroke overhangs its own box by half its
   width on every side, so the viewBox carries 2px of bleed and the left/top are
   pulled back by the same 2. */
.lockup__swoosh {
  position: absolute;
  left: 487px;
  top: 61px;
  width: 182px;
  height: 20px;
  overflow: visible;
}

/* Drawn on rather than faded in, and held back until the lockup has arrived — the
   last thing to land on either slide that shows it. The dash length is comfortably
   longer than the path, which doubles back on itself, so one offset sweep draws
   the whole stroke. `backwards` fill gives the hidden state during the delay, so
   nothing needs a resting opacity that would have to be undone; re-entering the
   slide replays it. */
.lockup__swoosh path { stroke-dasharray: 800; }

.lockup--on .lockup__swoosh path {
  animation: swoosh-in 760ms var(--pres-ease) 900ms backwards;
}

@keyframes swoosh-in {
  from { stroke-dashoffset: 800; }
  to   { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lockup--on .lockup__swoosh path { animation: none; }
}

/* ---------- Cover timeline ----------------------------------------------- */

/* Three steps on one line, drawn left to right on arrival. Colour is borrowed
   wholesale from the direction cards: white at a low percentage over the navy,
   nothing with a hue of its own. The only exception is the handwritten note,
   which is the deck's hand-drawn orange (see .timeline__scribble).

   Geometry lives in the markup as literal stage pixels; this file only says how
   the parts are drawn and in what order they arrive. */

.timeline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
  /* Every delay on this slide is measured from here rather than from the press,
     because the title is still on its way up when the press lands (see
     .lockup--cover-small). Roughly half the lockup's own move: the line starts
     as the space is opening, not after it has finished opening, so the two read
     as one gesture instead of a queue. Changing this shifts the whole slide;
     the per-step numbers in the markup stay relative to it. */
  --tl-lead: 400ms;
}

.timeline--on { opacity: 1; }

/* The rail. Edge to edge, on request: it starts at x=0 rather than on the deck's
   own margin and ends 100px PAST the stage's right edge, so it crosses the whole
   screen and leaves the frame rather than stopping in it. It thins toward that
   edge — the line is not finished, and a line that held full
   strength to the crop would read as one that had simply been cut. */
.timeline__rail {
  position: absolute;
  left: 0;
  top: 619px;
  width: 2020px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.30) 70%,
    rgba(255, 255, 255, 0.07) 100%
  );
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Drawn, not faded: one sweep from the left margin to past the right edge.
   `both`, not `backwards` like the rest of the slide: the resting state here is
   scaleX(0), so the line has to KEEP the end of its own animation rather than
   fall back to the geometry it started from. The
   step delays in the markup are read off this duration — each node lands as the
   line reaches it — so changing this number means re-reading them. */
.timeline--on .timeline__rail {
  animation: tl-rail 1600ms var(--pres-ease) calc(var(--tl-lead) + 120ms) both;
}

@keyframes tl-rail {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* A step is placed by its dot's x; everything in it hangs off that one number. */
/* A step is placed by its dot's x, and its top is the rail's CENTRE (619 + 4/2)
   rather than the rail's top edge — so a dot of any size is centred on the line
   by the same -half offsets. */
.timeline__step {
  position: absolute;
  left: var(--tl-x);
  top: 621px;
}

/* On the rail, not beside it — hence the half-size offset against a step origin
   that is already the line's centre. Filled at the same white as the rail's
   start, so the point reads as a thickening of the line.

   Horizontally it is centred on its CARD rather than sitting at the step's own x,
   on request: 180 is the card's middle (its -40 left plus half of 440), less half
   the dot. The cards did not move for this — only the dots did. */
.timeline__dot {
  position: absolute;
  left: 168px;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

/* The middle step is where we are, and it is the one thing on the slide allowed
   to be brighter than its neighbours: a solid dot in a soft ring. */
.timeline__dot--now {
  background: #ffffff;
  box-shadow: 0 0 0 16px rgba(255, 255, 255, 0.10);
}

/* The surface under each step, lifted straight off .dircard: lit from the top
   with white at 10% and falling away to nothing, so it reads as the ground
   rising under the words rather than as a card on top of them. Rounded on all
   four corners here, unlike the direction cards, because these do not run off
   the bottom of the stage — they sit on a line. */
.timeline__card {
  position: absolute;
  left: -40px;
  top: 56px;
  width: 440px;
  padding: 34px 36px 36px;
  box-sizing: border-box;
  border-radius: var(--pres-panel-radius, 24px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.055) 46%,
    rgba(255, 255, 255, 0.02) 100%
  );
}

/* The step we are on, one stop up the same scale. No border and no accent — the
   difference is light, the way it is everywhere else in the deck. */
.timeline__card--now {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.085) 46%,
    rgba(255, 255, 255, 0.03) 100%
  );
}

.timeline__title {
  margin: 0 0 14px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.timeline__body {
  margin: 0;
  max-width: 368px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 22px;
  line-height: 1.4;
}

/* Each step rises into place as the rail reaches it — the per-step delay is in
   the markup next to the x it is derived from. `backwards` gives the hidden
   state during the delay, so nothing needs a resting opacity to undo. */
.timeline--on .timeline__step {
  animation: tl-step var(--pres-move) var(--pres-ease) calc(var(--tl-lead) + var(--tl-in)) backwards;
}

@keyframes tl-step {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* The handwritten note, above the rail between Current and Refresh and set close
   to Refresh, on request. Placed by this block rather than by a step's x: it is
   not a step, and half its point is that it sits between two of them. */
.timeline__note {
  position: absolute;
  left: 580px;
  top: 396px;
  width: 300px;
  height: 224px;
}

/* Caveat, tilted, in the swoosh's orange — the deck's one hand. Everything else
   on this slide is set type in Figtree, which is what makes a written word read
   as an annotation on the timeline rather than a fourth label in it. */
.timeline__scribble {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  color: #FA8F2E;
  font-family: 'Caveat', 'Segoe Script', cursive;
  font-weight: 600;
  font-size: 62px;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-5deg);
}

/* Lands on the rail between the first and the middle step. Its own box, so the
   curve can be drawn after the words are up. */
.timeline__arrow {
  position: absolute;
  left: 46px;
  top: 84px;
  width: 120px;
  height: 130px;
  overflow: visible;
}

/* The note is the LAST thing on the slide, on request: it waits out the rail's
   whole sweep (120 + 1600) and the last card's rise with it, so the timeline is
   finished before anything is written on it. Then the words, then the arrow under
   them — the same read as the lockup's own swoosh. The dash length clears both
   paths comfortably. */
.timeline--on .timeline__scribble {
  animation: tl-step var(--pres-move) var(--pres-ease) calc(var(--tl-lead) + 2150ms) backwards;
}

.timeline__arrow path { stroke-dasharray: 400; }

.timeline--on .timeline__arrow path {
  animation: tl-draw 620ms var(--pres-ease) calc(var(--tl-lead) + 2500ms) backwards;
}

/* The arrowhead is a second path and follows the shaft rather than drawing with
   it, so the stroke arrives somewhere instead of sprouting a tip mid-flight. */
.timeline--on .timeline__arrow path + path {
  animation-delay: calc(var(--tl-lead) + 2980ms);
  animation-duration: 260ms;
}

@keyframes tl-draw {
  from { stroke-dashoffset: 400; }
  to   { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  /* The title cuts to its small placement instead of travelling to it. */
  .lockup--cover,
  .lockup--cover-small { transition: opacity var(--pres-fade) ease; }

  .timeline--on .timeline__rail,
  .timeline--on .timeline__step,
  .timeline--on .timeline__scribble,
  .timeline--on .timeline__arrow path { animation: none; }
  .timeline__rail { transform: none; }
}


/* ---------- Commitment (closing plate, second press) --------------------- */

/* Sharp over a blurred slide, so it sits AFTER #device and #lockup in the
   document and needs no z-index of its own. Colour is the timeline's and the
   direction cards': white at a low percentage over the navy, nothing with a hue.
   */
.commit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Above everything the press blurs, whatever order the stage's children are
     in. It has to beat two things in particular: .layer--sharp, which lifts the
     title of this very plate to 2, and #demo, which comes after this node in the
     document — without a z-index here the fork and the three items paint UNDER
     the blurred recording and read as ghosts of themselves. */
  z-index: 3;
  opacity: 0;
  transition: opacity var(--pres-fade) ease;
}

.commit--on { opacity: 1; }

.commit__fork {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  overflow: visible;
}

/* One weight for the whole diagram. 4px, up from the 2 it started at (on
   request): over a blurred screen a hairline disappears into it, and the fork
   has to read as the thing carrying the eye from the title to the three
   items. */
.commit__fork path {
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Drawn in three beats — trunk, then the elbows, then the heads — with the dash
   comfortably longer than any path so one offset sweep draws each whole. Delays
   are the numbers the items' own --c-in are read off. `backwards` gives the
   hidden state during the delay, so nothing needs a resting length to undo. */
.commit__fork path { stroke-dasharray: 1400; }

.commit--on .commit__trunk {
  animation: commit-draw 420ms var(--pres-ease) 520ms backwards;
}

.commit--on .commit__branch {
  animation: commit-draw 720ms var(--pres-ease) 900ms backwards;
}

/* The heads land after their own shaft, and each with its item. */
.commit--on .commit__head {
  animation: commit-draw 220ms var(--pres-ease) 1480ms backwards;
}

@keyframes commit-draw {
  from { stroke-dashoffset: 1400; }
  to   { stroke-dashoffset: 0; }
}

/* Three columns of the same width on one line, placed by their left edge — the
   markup states it, so the arrowhead above each one is the same number plus half
   the column. A surface, not decoration: the plate underneath is a blurred
   screen, and type straight onto it is the one thing in this deck that would be
   hard to read. */
.commit__item {
  position: absolute;
  left: var(--c-x);
  top: 576px;
  width: 480px;
  box-sizing: border-box;
  padding: 32px 36px;
  /* All three the same height whatever they say — one runs to two lines and the
     others to one, and three cards of different depths on one line read as a
     ragged row rather than as three equal commitments. 148 is what the two-line
     one measures (two 40px lines inside 64px of padding), so it is the floor the
     other two are raised to rather than a number they are squeezed into. */
  min-height: 148px;
  /* Centred both ways, on request: the flex box centres the paragraph in the
     card and text-align centres the lines inside it, so a card that runs to two
     lines still reads as one block on the card's own middle. */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: var(--pres-panel-radius, 24px);
  /* Denser than the timeline's and the direction cards' 10%, on request: those
     sit on flat navy, and this one sits on a blurred screen that is bright in
     places — at 10% the type was fighting whatever happened to be behind it.
     Still a wash of white rather than a flat fill, so it stays the same
     material as every other surface the deck draws. */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.16) 46%,
    rgba(255, 255, 255, 0.10) 100%
  );
}

/* Each item rises as its own arrowhead lands. Gated on the slide's class like
   every other reveal in the deck, so re-entering the press replays it. */
.commit--on .commit__item {
  animation: commit-item var(--pres-move) var(--pres-ease) var(--c-in) backwards;
}

@keyframes commit-item {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.commit__text {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
  .commit--on .commit__fork path,
  .commit--on .commit__item { animation: none; }
  .commit__fork path { stroke-dashoffset: 0; }
}


/* ---------- The POC demo recording --------------------------------------- */

/* One slide's video, placed and sized from the slide data (see `demo`). Rounded
   at the top only, like every screen in the deck that runs off the bottom edge,
   and clipped: the recording is wider than it is tall but not as wide as this
   box makes it, so the box shows the top of it and the rest goes past the
   stage. */
.demo {
  position: absolute;
  overflow: hidden;
  border-radius: var(--pres-panel-radius, 24px) var(--pres-panel-radius, 24px) 0 0;
  background: var(--pres-navy);
  opacity: 0;
  /* The same rise every screen in the deck arrives on — see .device--hidden. */
  transform: translateY(56px);
  transition:
    opacity 400ms ease,
    transform var(--pres-move) var(--pres-ease);
  pointer-events: none;
}

.demo--on {
  opacity: 1;
  transform: translateY(0);
  /* Clickable only once it is up: the whole box is a pause button (see
     toggleDemo). */
  pointer-events: auto;
  cursor: pointer;
}

/* Softened with the words over it on a blurred slide — see .layer--blurred. The
   recording is paused with it (applyDemo), so what blurs is a held frame rather
   than motion behind a plate that is being read. */
.demo--blurred { filter: blur(var(--pres-blur)) brightness(var(--pres-blur-dim)); }

/* Fills the box's WIDTH and is cropped by its height, pinned to the top — so
   what is lost is the bottom of the recording rather than either side of it, and
   nothing is squashed. */
.demo__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}


/* ---------- Controls ---------------------------------------------------- */

.controls {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-8);
  /* Above every box the deck draws, the full-bleed screens included. */
  z-index: 100;
  font-family: var(--font-sans);
  /* A dark chip of its own, not bare buttons on the stage. Every button and the
     count inside are styled translucent-white-on-navy, which is legible on
     .stage's own navy but disappears on a full-bleed slide (Home, Orders): that
     screen is the app's own white UI, and a ~8% white fill has nothing to read
     against there. This backing is what makes the bar legible regardless of
     what is under it, so a slide's own background is never a reason it can't be
     found once it IS showing. */
  padding: var(--space-4) var(--space-8);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 200ms ease;
}

/* The hover target, which is deliberately much bigger than the pill it reveals.
   The pill alone is ~110x36 and invisible until hovered, so finding it meant
   landing the pointer inside a box you cannot see. That is bearable on a slide
   whose bottom edge is navy and impossible on a full-bleed one: everything
   around the pill there belongs to the iframe, and a document never gets
   mousemove for a pointer that is over an iframe — only hit-testing on an
   element ABOVE it still works, which is what this is.
   A child counts as hover on its parent, so this zone reveals the pill without
   the pill having to grow. Centred and only 460x150 rather than a full-width
   band: the pages the deck embeds are live, and a strip across the bottom of the
   window would swallow hover and clicks meant for their own footers (the orders
   table's pagination sits down there). */
.controls::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -16px;
  transform: translateX(-50%);
  width: 460px;
  height: 150px;
  border-radius: 999px;
}

.controls:hover { opacity: 1; }

/* Toggled by the P key (presentation.js), independent of hover — a presenter's
   hands are on the keyboard, not the mouse. */
.controls--pinned { opacity: 1; }

.controls__btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 12px;
  cursor: pointer;
  transition: background 150ms ease;
}
.controls__btn:hover { background: rgba(255, 255, 255, 0.18); }
.controls__btn:disabled { opacity: 0.3; cursor: default; }

.controls__count {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  min-width: 32px;
  text-align: center;
}

/* Stage-relative, and behind the device — see the note in index.html. */
.clickzone { position: absolute; top: 0; bottom: 0; width: 28%; cursor: pointer; }
.clickzone--prev { left: 0; }
.clickzone--next { right: 0; }
