/* Homepage sections added after the Stitch design.
 *
 * home.css is generated from the design and is never edited by hand, so a new
 * export can replace it. Anything written for the homepage afterwards lives
 * here, with the reason it exists.
 *
 * The values below are the design's own. They are repeated as variables rather
 * than re-picked, so nothing here can drift away from the palette the design
 * compiled into home.css.
 */

/* The homepage's names for the shared tokens in ds/tokens.css. Kept, so
   this sheet reads as it did; the values live in one place now. */
:root {
  --hs-ink: var(--ds-ink);          /* primary ink, headlines and body */
  --hs-ink-soft: var(--ds-ink-soft);     /* on-surface-variant, secondary text */
  --hs-accent: var(--ds-accent);       /* the design's electric blue */
  --hs-accent-deep: var(--ds-accent-deep);  /* primary */
  --hs-accent-tint: var(--ds-accent-tint);  /* the soft blue wash behind chips */
  --hs-teal: var(--ds-teal);         /* the live / telemetry accent */
  --hs-teal-soft: var(--ds-teal-soft);    /* secondary-container */
  --hs-teal-ink: var(--ds-teal-ink);     /* secondary */
  --hs-surface: var(--ds-surface);      /* surface-container-lowest, cards */
  --hs-canvas: var(--ds-canvas);       /* surface */
  --hs-low: var(--ds-low);          /* surface-container-low */
  --hs-line: var(--ds-line);         /* outline-variant */
  --hs-outline: var(--ds-outline);      /* outline */
  --hs-error: var(--ds-error);
  --hs-error-tint: var(--ds-error-tint);
  --hs-radius-card: var(--ds-radius-card);
  --hs-radius-lg: var(--ds-radius-lg);
  --hs-shadow-1: var(--ds-shadow-1);
  --hs-shadow-2: var(--ds-shadow-2);


  /* 1.5rem is not a guess: .gap-gutter and .p-space-lg both compile to it in
     home.css, so a connector of exactly this height spans exactly one gap. */
  --hs-gutter: var(--ds-gutter);
}

/* ==========================================================================
   The tools strip, moving
   ==========================================================================

   The design already shipped this as a marquee: a track of pills, a hover
   pause, and faded edges. It stood still because the animation it asks for was
   never defined. The generated sheet carries
   .animate-[marquee_28s_linear_infinite], which resolves to "animation: 28s
   linear infinite marquee", and there is no @keyframes marquee in home.css, in
   styles.css or anywhere else. Six keyframes exist in that sheet and marquee is
   not one of them. So the keyframes are written here.

   The direction is the part worth explaining, because the obvious answer is
   wrong on this page. The page is right to left, so the track is laid out from
   the right edge and overflows to the LEFT. A translateX is not affected by
   direction: a negative value always moves an element visually left. Moving
   this track left therefore drags its right edge away from the right edge of
   its window and leaves a hole, measured at 1267px of a 1424px window by the
   end of one loop. It has to move RIGHT, so the overflow waiting on the left
   comes into view and the pills leave at the right. That also reads correctly
   here: right to left, each pill drifts the way the eye is already going.

   The distance is one cluster. The track holds four identical copies of the
   list, so one copy is 25% of it, and after shifting by exactly that the frame
   is pixel for pixel the frame it started on. Four copies rather than two
   because what stays behind has to keep covering the window: a cluster is
   1267px, four make a 5070px track, and 5070 - 1267 leaves 3803px of cover, so
   nothing tears on any screen up to 3803px wide. Two copies cover 1267px,
   which is already short of a 1440px laptop. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(25%); }
}

/* the design asks for 28s; the brief asks for a full loop in 30 to 40 seconds,
   and a loop is now one cluster passing rather than half the track */
#marquee-track {
  animation-duration: 36s;
  will-change: transform;
}

/* On a phone a tap counts as hover, and it also gives the strip focus, so
   both pauses fired on the first touch and the strip stayed frozen until
   something else was tapped. Measured on 15 October 2026: one tap, paused,
   and still paused 1.5 seconds later.

   So the design's hover pause is undone on devices that cannot really hover,
   and the focus pause is for keyboard focus only: :focus-visible matches a
   Tab, not a tap. The focus rule comes second so that a keyboard on a touch
   device still pauses it. */
@media (hover: none) {
  #marquee-track:hover { animation-play-state: running; }
}
#marquee-track:focus-visible {
  animation-play-state: paused;
}

/* Reduced motion is not handled here on purpose. styles.css already carries
   @media (prefers-reduced-motion:reduce){*{transition:none!important;
   animation:none!important}}, which stops this strip along with everything
   else, and a second copy of that rule here would be a rule nobody can tell
   is dead. Proved by tools/prove-home-sections.py, which breaks the styles.css
   rule and watches the strip start moving. */

/* ==========================================================================
   How we work together: four numbered steps
   ==========================================================================

   The numbers straddle the top edge of their cards. That is not decoration,
   it is what makes the connecting line possible without measuring anything:
   a badge 3rem tall pulled up by half its height has its centre exactly on
   the card's top edge and its bottom exactly on the card's content, because
   .p-space-lg compiles to the same 1.5rem. So a rail at top: 0 runs straight
   through all four badge centres, on any screen, at any text size.

   The line is drawn once the steps come into view, from the right, because
   the page reads right to left. transform-origin percentages are physical
   rather than logical, so 100% is the right edge and is the correct value
   here even though 100% would be wrong on an English page.

   Without JavaScript the line is simply drawn: the undrawn state is applied
   by the script itself, so a page that never runs it shows the finished line
   rather than an invisible one. */
#process-steps { position: relative; }

.process-step {
  position: relative;
  background: var(--hs-surface);
  border-radius: var(--hs-radius-card);
  box-shadow: var(--hs-shadow-1);
  padding: 1.5rem;
}

.process-num {
  position: absolute;
  top: 0;
  /* inline-START, not end: this page reads right to left, so the start of a
     card is its right edge, which is where a step number belongs. Written as
     inset-inline-end first, which put all four numbers at the left. */
  inset-inline-start: 1.5rem;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hs-accent);
  color: #fff;
  font-family: var(--ds-font);  /* Rubik: monospace is for real code only (DESIGN.md) */
  font-weight: var(--ds-weight-strong);
  font-size: 0.9375rem;
  line-height: 1;
  box-shadow: var(--hs-shadow-2);
}

/* the rail through the badges, four across */
.process-line {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(to left, var(--hs-accent), var(--hs-accent-tint));
  transform-origin: 100% 50%;
  transition: transform 1.1s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: none;
}

/* stacked, so the connector runs down from one badge to the next instead. Its
   height is one gutter, which is what separates the cards. */
.process-step::after {
  content: "";
  position: absolute;
  top: 100%;
  /* under the centre of the number: 1.5rem of card padding plus half of a
     3rem badge, less half the connector's own width */
  inset-inline-start: calc(1.5rem + 1.5rem - 1px);
  width: 2px;
  height: var(--hs-gutter);
  background: var(--hs-accent-tint);
  transform-origin: 50% 0;
  transition: transform 0.5s ease-out;
}
.process-step:last-child::after { content: none; }

@media (min-width: 1024px) {
  .process-line { display: block; }
  .process-step::after { content: none; }
}

/* the undrawn state, applied by the script so that no script means drawn */
#process-steps[data-draw="pending"] .process-line { transform: scaleX(0); }
#process-steps[data-draw="pending"] .process-step::after { transform: scaleY(0); }
#process-steps[data-draw="done"] .process-line { transform: scaleX(1); }
#process-steps[data-draw="done"] .process-step::after { transform: scaleY(1); }

/* ==========================================================================
   Three points inside "who I am"
   ==========================================================================
   A list, because three parallel points are a list. The marker is removed
   rather than the element being changed to a div, so a screen reader still
   announces how many there are. The icons are decorative and hidden: the
   label beside each one already carries the meaning. */
.about-points {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 1rem;
}

/* On a wide screen this sits in an eight column block beside the photo, which
   is wide enough for the three to share a row. Below that they stack. */
@media (min-width: 1024px) {
  .about-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

/* ==========================================================================
   The before and after slider
   ==========================================================================

   One number drives it: --split, the share of the card measured from the RIGHT
   edge that shows the "before" side, because the page reads right to left and
   that is the side a reader starts on. Both panels are full size and stacked,
   so nothing is ever resized and nothing reflows while it is dragged. What the
   design shipped resized the top panel instead and had to pin its contents to
   896px to stop them moving, which only held at one screen width.

   clip-path takes its four insets as top right bottom left, so hiding the left
   (100 - split)% is what leaves the right split% of "before" showing. At 0 the
   left inset is the whole width and none of it shows; at 100 there is no inset
   and all of it does. Both ends are reachable, which the old 20px clamp made
   impossible. */
#comparison-slider-container {
  --split: 50;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#before-slider-layer {
  clip-path: inset(0 0 0 calc((100 - var(--split)) * 1%));
}

/* The design fixes the card at 420px and positions both panels absolutely, so
   the card cannot grow with what is in it. On a phone the four items stack in
   one column, and the panels need 589px ("after") and 629px ("before"): the
   last item on each side and the summary line under them were cut off.

   So the two panels share one grid cell instead of being taken out of the
   flow. They still sit exactly on top of each other, and the card is now as
   tall as the taller of the two, never less than the design's 420px. The
   handle stays absolutely positioned over both. */
#comparison-slider-container {
  display: grid;
  height: auto;
  min-height: 420px;
}
#comparison-slider-container > :not(#slider-handle) {
  grid-area: 1 / 1;
  position: relative;
  inset: auto;
  height: auto;
}

#slider-handle {
  /* inline-start is the right edge here, which is where the value is measured
     from, so the handle and the clip move together by construction */
  inset-inline-start: calc(var(--split) * 1%);
}

/* the focus ring has to clear the thin bar, or it is invisible on it */
#slider-handle:focus-visible {
  outline: 3px solid var(--hs-ink);
  outline-offset: 2px;
}

/* ==========================================================================
   "This is an illustration"
   ==========================================================================
   Said out loud rather than implied, because the numbers in these panels are
   made up to show a shape, not measured from anyone's business. */
.demo-chip {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--hs-low);
  color: var(--hs-ink-soft);
  border: 1px solid var(--hs-line);
  font-size: 0.75rem;
  font-weight: var(--ds-weight-strong);
  line-height: 1.4;
}

/* ==========================================================================
   The worked demonstration
   ==========================================================================
   Four tasks, and for each one a prompt being typed and an answer coming
   back. What replaced four cards of "live data" counting up to numbers
   nothing on the page was measuring.

   The text of every panel is in the markup. The script lifts it out, empties
   the element and types it back, so a visitor whose scripts never run reads
   the first panel in full, and anyone who has asked for less motion gets all
   of it at once. */
.demo-shell { max-width: 56rem; margin-inline: auto; }

.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--hs-line);
  background: var(--hs-surface);
  color: var(--hs-ink-soft);
  font: inherit;
  font-size: 0.875rem;
  font-weight: var(--ds-weight-strong);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.demo-tab:hover { border-color: var(--hs-accent); color: var(--hs-accent-deep); }
.demo-tab[aria-selected="true"] {
  background: var(--hs-accent);
  border-color: var(--hs-accent);
  color: #fff;
}

.demo-window {
  background: var(--hs-surface);
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius-lg);
  box-shadow: var(--hs-shadow-1);
  padding: 1.25rem;
  /* A window that resizes on every typed character drags the page up and down
     under the reader. This is the tallest the four panels get, so the box is
     the same height whichever one is open and whatever it is part way through
     saying. */
  min-height: 21rem;
}

.demo-chrome { display: flex; gap: 0.375rem; margin-bottom: 1rem; }
.demo-chrome i {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  background: var(--hs-low);
  border: 1px solid var(--hs-line);
}

.demo-panel[hidden] { display: none; }

.demo-prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  background: var(--hs-accent-tint);
  border-radius: var(--hs-radius-card);
  padding: 0.75rem 0.875rem;
  margin: 0 0 1rem;
  color: var(--hs-ink);
  line-height: 1.6;
}

.demo-reply { display: flex; align-items: flex-start; gap: 0.625rem; }
.demo-reply-body { flex: 1; min-width: 0; }

.demo-who {
  flex: none;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--hs-surface);
  border: 1px solid var(--hs-line);
  color: var(--hs-ink-soft);
  font-family: var(--ds-font);  /* Rubik: monospace is for real code only (DESIGN.md) */
  font-size: 0.6875rem;
  font-weight: var(--ds-weight-strong);
  line-height: 1.6;
}
.demo-who-ai {
  background: var(--hs-teal-soft);
  border-color: var(--hs-teal);
  color: var(--hs-teal-ink);
}

.demo-line {
  margin: 0 0 0.5rem;
  color: var(--hs-ink);
  line-height: 1.7;
}
.demo-line:last-child { margin-bottom: 0; }
.demo-line[hidden] { display: none; }

.demo-flow {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.demo-step {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  background: var(--hs-canvas);
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius-card);
  padding: 0.625rem 0.75rem;
}
.demo-step[hidden] { display: none; }

.demo-step-num {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hs-accent);
  color: #fff;
  font-family: var(--ds-font);  /* Rubik: monospace is for real code only (DESIGN.md) */
  font-size: 0.75rem;
  font-weight: var(--ds-weight-strong);
  line-height: 1;
}

.demo-step-text { line-height: 1.5; color: var(--hs-ink-soft); }
.demo-step-text strong { display: block; color: var(--hs-ink); }

/* the pause before the answer starts */
.demo-dots { display: inline-flex; gap: 0.25rem; padding: 0.25rem 0; }
.demo-dots[hidden] { display: none; }
.demo-dots i {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
  background: var(--hs-outline);
  animation: demo-dot 1s ease-in-out infinite;
}
.demo-dots i:nth-child(2) { animation-delay: 0.15s; }
.demo-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes demo-dot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(-2px); }
}

@media (min-width: 640px) {
  .demo-window { padding: 1.5rem; }
}

/* ==========================================================================
   "Who I am": the photo
   ==========================================================================
   A thin border that slowly turns, in the design's blue and teal, a soft glow
   in the same colours, and a pool of light behind it drifting very slowly.
   The border is a conic gradient twice the size of the frame, turning behind
   the photo and clipped by the frame, so only a 3px edge of it shows. Twice
   the size so its corners never come into view as it turns: the frame's
   diagonal is about 1.41 of its side. */
#about-photo-col {
  position: relative;
  isolation: isolate;          /* keeps the pool behind the photo, not behind the page */
}

/* The pool's blur reaches past the edge of the screen on a phone, and this
   section sits outside the overflow-x-hidden wrapper the other sections are
   in: it made the page 398px wide at 390. clip, not hidden: hidden would turn
   the section into a scroll container, and the sticky photo inside it would
   stop sticking. */
#about-section { overflow-x: clip; }

/* Wide screens: the photo stays in view through the long story. The header
   is h-20, 5rem, so the photo stops 1.5rem below it. The grid already aligns
   its items to the start, so the column is the photo's own height and leaves
   no empty space under it. */
@media (min-width: 1024px) {
  #about-photo-col {
    position: sticky;
    top: 6.5rem;
  }
}

.about-photo-frame {
  position: relative;
  padding: 3px;
  border-radius: calc(1rem + 3px);
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 18px 50px -18px rgba(31, 91, 255, 0.35),
    0 10px 44px -22px rgba(0, 191, 166, 0.40);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-photo-frame::before {
  content: "";
  position: absolute;
  inset: -50%;
  z-index: -1;
  background: conic-gradient(
    from 0deg,
    var(--hs-accent),
    var(--hs-teal),
    var(--hs-accent-tint),
    var(--hs-accent),
    var(--hs-teal-soft),
    var(--hs-accent-tint),
    var(--hs-accent));
  animation: about-frame-turn 8s linear infinite;
}

@keyframes about-frame-turn {
  to { transform: rotate(1turn); }
}

.about-photo-frame:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 60px -18px rgba(31, 91, 255, 0.50),
    0 14px 52px -20px rgba(0, 191, 166, 0.55);
}

.about-photo-pool {
  position: absolute;
  inset: -8%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 35% 40%, rgba(31, 91, 255, 0.55), transparent),
    radial-gradient(closest-side at 65% 62%, rgba(0, 191, 166, 0.50), transparent);
  filter: blur(36px);
  opacity: 0.35;
  pointer-events: none;
  animation: about-pool-drift 18s ease-in-out infinite alternate;
}

@keyframes about-pool-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(4%, -3%) scale(1.04); }
  100% { transform: translate(-3%, 4%) scale(0.98); }
}

/* ==========================================================================
   "Who I am": labels, pull quotes, the link, the reveal
   ========================================================================== */
.about-eyebrow { margin-bottom: 0.75rem; }

/* The second label follows a paragraph, so it needs the gap above it that the
   design's mt-space-lg on the heading below it was meant to give and never
   did: that class is not compiled into home.css. */
.about-eyebrow ~ .about-eyebrow { margin-top: 2rem; }

/* Two lines of the story, set large. The face, size and weight are the
   design's own headline-lg classes on the element; this adds the short accent
   line beside them and the room around them. */
.about-pull {
  position: relative;
  margin: 1.75rem 0;
  padding-inline-start: 1rem;
  line-height: 1.35;
}
.about-pull::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.2em;
  width: 3px;
  height: 1.1em;
  border-radius: 2px;
  background: linear-gradient(var(--hs-accent), var(--hs-teal));
}

.about-more { margin: 0.5rem 0 0; }

#about-section .about-points { margin: 2rem 0 0; }

/* The guides' reveal, the same 16px over half a second. Armed by the script,
   which also leaves it unarmed for anyone who asked for less motion. */
.about-reveal-on .about-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.about-reveal-on .about-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  /* styles.css stops every animation with *{animation:none!important}, and *
     does not match pseudo-elements. The turning border is a ::before, so it
     kept turning for anyone who had asked for less motion. */
  .about-photo-frame::before { animation: none; }
  .about-photo-frame:hover { transform: none; }
  /* calm: the paragraphs still fade in as they are reached, without the
     slide. The transition has to be !important to get past styles.css. */
  .about-reveal-on .about-reveal,
  .about-reveal-on .about-reveal.is-visible { transform: none; transition: opacity 0.5s ease !important; }
}

/* ==========================================================================
   The websites card: a mini page that builds itself
   ==========================================================================
   Built to the old wireframe's exact height, 116px, so the card does not
   change size: 26 + 8 + 26 + 8 + 24, inside 12px of padding top and bottom.
   The headline bar is the design's light accent tint with the site's own
   font; the button is the accent. */
.mini-head {
  height: 26px;
  width: 75%;
  display: flex;
  align-items: center;
  padding-inline: 8px;
  border-radius: 6px;
  background: var(--hs-accent-tint);
  color: var(--hs-accent-deep);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.mini-button {
  height: 26px;
  width: 64px;
  border-radius: 999px;
  background: var(--hs-accent);
}

/* Each block fades and rises into place, in order. Armed by the script, so
   without it, or with reduced motion, the page is shown finished. */
.mini-armed .mini-step { opacity: 0; transform: translateY(6px); }
.mini-armed.is-built .mini-step {
  animation: mini-in 0.4s ease-out forwards;
  animation-delay: var(--mini-delay, 0s);
}
.mini-head { --mini-delay: 0s; }
.mini-button { --mini-delay: 0.15s; }
.mini-card:nth-child(1) { --mini-delay: 0.3s; }
.mini-card:nth-child(2) { --mini-delay: 0.38s; }
.mini-card:nth-child(3) { --mini-delay: 0.46s; }
@keyframes mini-in { to { opacity: 1; transform: none; } }

/* calm: each block still appears in order, as a fade with no rise */
@media (prefers-reduced-motion: reduce) {
  .mini-armed .mini-step { transform: none; }
  html:not(.reduce-motion) .mini-armed.is-built .mini-step {
    animation: mini-fade 0.4s ease-out forwards !important;
    animation-delay: var(--mini-delay, 0s) !important;
  }
}
@keyframes mini-fade { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   The AI card: a live chat
   ==========================================================================
   166.5px is the old static chat's height, measured on 19 October 2026, so the
   card keeps its size; the script raises it if an exchange ever needs more. */
.ai-chat { min-height: 166.5px; }
.ai-chat .ai-ex { transition: opacity 0.4s ease; }
.ai-chat .ai-ex.is-out { opacity: 0; }

/* bubbles rise in; armed by the script, so without it the first exchange
   simply shows */
.ai-armed .ai-q,
.ai-armed .ai-a { opacity: 0; transform: translateY(4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.ai-armed .ai-q.is-on,
.ai-armed .ai-a.is-on { opacity: 1; transform: none; }

/* typing dots, in the bubble's own text colour */
.ai-dots { display: inline-flex; align-items: center; gap: 3px; height: 14px; vertical-align: middle; }
.ai-dots[hidden] { display: none; }
.ai-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.3;
             animation: ai-dot 1s ease-in-out infinite; }
.ai-dots i:nth-child(2) { animation-delay: 0.15s; }
.ai-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-dot { 0%, 100% { opacity: 0.25; transform: none; } 50% { opacity: 0.9; transform: translateY(-2px); } }

/* ==========================================================================
   The automation card: a live flow
   ==========================================================================
   The strip under the nodes holds the statuses: 30px of bottom padding
   instead of 12px. The dot passes behind each node (z-index 5 against the
   nodes' 10), so it looks as if the node takes it in. */
.flow { padding-bottom: 30px; }
.flow-dot {
  position: absolute; left: 0; top: 50%; z-index: 5;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--hs-accent);
  box-shadow: 0 0 0 3px rgba(31, 91, 255, 0.18), 0 0 12px 2px rgba(31, 91, 255, 0.55);
  opacity: 0;
  transform: translate(0, -50%);
  transition: transform 1s ease-in-out, opacity 0.3s ease;
}
.flow-dot.is-on { opacity: 1; }
.flow-dot.no-move { transition: opacity 0.3s ease; }

.flow-node.is-pulsing { animation: flow-pulse 0.7s ease-out; }
@keyframes flow-pulse {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(31, 91, 255, 0.35); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1);    box-shadow: 0 0 0 8px rgba(31, 91, 255, 0); }
}

/* Each status under its node. These are the places with no script; the
   script then measures each node and centres its status under it. */
.flow-status {
  position: absolute; bottom: 8px;
  font-size: 0.625rem; font-weight: var(--ds-weight-strong); line-height: 1.2;
  color: var(--hs-ink-soft);
  white-space: nowrap;
}
.flow-status[data-step="1"] { right: 12px; }
.flow-status[data-step="2"] { left: 0; right: 0; margin-inline: auto; width: max-content; }
.flow-status[data-step="3"] { left: 12px; }
.flow-armed .flow-status { opacity: 0; transition: opacity 0.35s ease; }
.flow-armed .flow-status.is-on { opacity: 1; }

/* off screen, the CSS loops stop too, not only the script's clock */
.is-paused .ai-dots i,
.is-paused .flow-node { animation-play-state: paused; }

/* ==========================================================================
   The course teaser: a live course preview
   ==========================================================================
   Everything that moves here moves by transform or opacity, nothing else.
   The progress ring is two half rings that rotate into view behind two
   half-width clips, and the check marks are revealed by a mask that slides
   off them; the usual stroke-dashoffset way would be a repaint every frame.

   The visual keeps the old 256px box, so the card keeps its size. The markup
   is the finished state, all five lessons done and the ring full, which is
   what shows with no script and with reduced motion. */

/* ---- the aurora behind the card */
.cv-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.cv-aurora span {
  position: absolute; border-radius: 50%;
  filter: blur(90px);                      /* fixed; only the transform moves */
  will-change: transform;
}
.cv-aurora span:nth-child(1) { width: 420px; height: 420px; top: -150px; left: -130px; background: var(--hs-accent-deep); opacity: 0.5;
  animation: cv-blob-1 26s ease-in-out infinite alternate; }
.cv-aurora span:nth-child(2) { width: 440px; height: 440px; bottom: -170px; right: -140px; background: var(--hs-accent); opacity: 0.32;
  animation: cv-blob-2 32s ease-in-out infinite alternate; }
.cv-aurora span:nth-child(3) { width: 320px; height: 320px; top: 30%; left: 30%; background: var(--hs-teal); opacity: 0.2;
  animation: cv-blob-3 38s ease-in-out infinite alternate; }
@keyframes cv-blob-1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(120px, 60px) scale(1.15); } 100% { transform: translate(40px, 120px) scale(0.95); } }
@keyframes cv-blob-2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-140px, -50px) scale(0.9); } 100% { transform: translate(-60px, -110px) scale(1.1); } }
@keyframes cv-blob-3 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-90px, 40px) scale(1.2); } 100% { transform: translate(70px, -30px) scale(0.9); } }

/* ---- the badge dot: a soft live pulse, never fading out */
.cv-live { animation: cv-live 2.4s ease-in-out infinite; }
@keyframes cv-live { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.35); opacity: 1; } }

/* ---- the stage: the old 256px box, with depth for the tilt and the orbit */
.cv-stage { position: relative; width: 256px; height: 256px; perspective: 900px; }
.cv-float { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2;
  animation: cv-float 6s ease-in-out infinite; }
.cv-float.is-hover { animation-play-state: paused; }
@keyframes cv-float { 0%, 100% { transform: translateY(-5px); } 50% { transform: translateY(5px); } }

/* ---- the window */
.cv-window {
  position: relative; width: 216px; padding: 12px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, 0.6), 0 0 44px -12px rgba(31, 91, 255, 0.5), 0 0 64px -24px rgba(0, 191, 166, 0.4);
  color: #fff; text-align: right;
  transition: transform 0.3s ease-out;
}
/* the glow pulse when the course is complete */
.cv-window::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(104, 250, 222, 0.6), 0 0 42px 6px rgba(0, 191, 166, 0.45);
  opacity: 0; transition: opacity 0.5s ease;
}
.cv-window.is-complete::after { opacity: 1; }

.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cv-title { font-size: 0.75rem; font-weight: 700; line-height: 1.2; }

/* ---- the progress ring: two halves. Each half-width clip holds a half ring
   that starts out of view and rotates into it: 0 to 180 degrees fills the
   right half, then the second fills the left. */
.cv-ring { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.14); }
.cv-half { position: absolute; inset: 0; }
.cv-half-a { clip-path: inset(0 0 0 50%); }
.cv-half-b { clip-path: inset(0 50% 0 0); }
.cv-half i { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 4px var(--hs-teal);
  transition: transform 0.6s ease; }
.cv-half-a i { clip-path: inset(0 50% 0 0); transform: rotate(180deg); }
.cv-half-b i { clip-path: inset(0 0 0 50%); transform: rotate(180deg); }
/* the instant reset when the script takes over, before the card is seen */
.cv-window.no-anim *, .cv-window.no-anim *::before, .cv-window.no-anim *::after { transition: none !important; }
.cv-pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.59375rem; font-weight: 700; }

/* ---- the lessons */
.cv-lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cv-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 9px;
  font-size: 0.71875rem; line-height: 1.2; color: rgba(255, 255, 255, 0.8); }
.cv-row::before { content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: rgba(31, 91, 255, 0.3); box-shadow: inset 0 0 0 1px rgba(104, 250, 222, 0.35);
  opacity: 0; transition: opacity 0.35s ease; }
.cv-row.is-active::before { opacity: 1; }
.cv-num { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.625rem; font-weight: 700; background: rgba(255, 255, 255, 0.1); }
.cv-name { position: relative; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the status: an empty circle, then a teal one with a check that draws in.
   The mask (.cv-wipe) starts one width to the left and slides into place
   while the check inside it slides the other way, so the check stays put and
   is uncovered from left to right, the way a check mark is drawn. */
.cv-mark { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); color: var(--hs-ink); }
.cv-mark::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--hs-teal);
  opacity: 0; transition: opacity 0.3s ease; }
.cv-row.is-done .cv-mark::before { opacity: 1; }
.cv-wipe { position: relative; display: block; width: 16px; height: 16px; overflow: hidden;
  transform: translateX(-100%); transition: transform 0.45s ease 0.1s; }
.cv-wipe-in { display: block; transform: translateX(100%); transition: transform 0.45s ease 0.1s; }
.cv-wipe-in svg { display: block; }
.cv-row.is-done .cv-wipe,
.cv-row.is-done .cv-wipe-in { transform: none; }

/* ---- "בקרוב", on the window's top corner */
.cv-soon { position: absolute; top: -10px; left: 14px; z-index: 2; padding: 2px 9px; border-radius: 999px;
  font-size: 0.625rem; font-weight: 700; line-height: 1.5; color: var(--hs-ink); background: var(--hs-teal-soft);
  box-shadow: 0 6px 16px -6px rgba(0, 191, 166, 0.6); }

/* ---- the shimmer: a diagonal light band crossing every few seconds */
.cv-gloss { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.cv-shine { position: absolute; top: -40%; bottom: -40%; left: 0; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.16) 50%, transparent);
  transform: translateX(-130%) rotate(12deg);
  animation: cv-shine 6.5s ease-in-out infinite; }
@keyframes cv-shine { 0%, 64% { transform: translateX(-130%) rotate(12deg); } 88%, 100% { transform: translateX(300%) rotate(12deg); } }

/* ---- the tool chips, orbiting. These are their places with no script; the
   script then moves them around the window. In front they sit above it, at
   full size; behind it, below it, smaller, dimmer and a little blurred. The
   blur is switched when a chip crosses, never animated frame by frame. */
.cv-chip { position: absolute; left: 50%; top: 50%; z-index: 1; padding: 4px 10px; border-radius: 999px;
  font-size: 0.6875rem; font-weight: 700; line-height: 1.4; white-space: nowrap; color: #fff;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
  will-change: transform, opacity; }
.cv-chip.is-front { z-index: 3; }
.cv-chip.is-behind { filter: blur(1.2px); }
/* Resting places, above and below the window and clear of it: where the
   chips stand with no script, with less motion asked for at either level,
   and for the moment before the orbit starts. The first version put them
   beside the window, and standing still there they covered its lessons. */
.cv-chip[data-chip="0"] { transform: translate(-50%, -50%) translate(-130px, -150px); }
.cv-chip[data-chip="1"] { transform: translate(-50%, -50%) translate(130px, -150px); }
.cv-chip[data-chip="2"] { transform: translate(-50%, -50%) translate(-130px, 150px); }
.cv-chip[data-chip="3"] { transform: translate(-50%, -50%) translate(130px, 150px); }
.cv-chip[data-chip="4"] { transform: translate(-50%, -50%) translate(0, -150px); }

/* ---- off screen, everything CSS drives stops too */
#course.is-paused .cv-aurora span,
#course.is-paused .cv-live,
#course.is-paused .cv-float,
#course.is-paused .cv-shine { animation-play-state: paused; }

/* ---- a phone: the visual above the text, a little smaller, three chips.
   Scaled with transform, so the box it takes in the layout stays 256px and
   the card keeps its height. */
@media (max-width: 1023px) {
  .course-visual { order: -1; }
  .cv-stage { transform: scale(0.9); }
  .cv-chip[data-chip="3"], .cv-chip[data-chip="4"] { display: none; }
  .cv-chip[data-chip="0"] { transform: translate(-50%, -50%) translate(-90px, -150px); }
  .cv-chip[data-chip="1"] { transform: translate(-50%, -50%) translate(90px, -150px); }
  .cv-chip[data-chip="2"] { transform: translate(-50%, -50%) translate(0, 150px); }
}


/* ==========================================================================
   Less motion: calm and strict
   ==========================================================================
   Two levels (Moshe's rule, 20 October 2026; the script's MOTION says the
   same thing).

   Calm is the browser asking for reduced motion, which an iPhone does more
   often than its owner knows. styles.css stops every animation and
   transition for it with *{...!important}. Here, under html:not(.reduce-
   motion), a few gentle ones are given back, all opacity or colour: the
   typing dots, the live dots, the chat bubbles and flow statuses fading in,
   the course's check marks. Everything that travels stays off: the strip,
   the floats, the orbit, the aurora, the gloss, the flow's moving dot, hover
   lifts. The rules beat styles.css by being !important and more specific.

   Strict is "הפחתת תנועה" in the site's own accessibility menu: html gets
   .reduce-motion, styles.css stops every element, and the rule below adds
   the pseudo-elements that * never matched, so nothing moves at all. */

@media (prefers-reduced-motion: reduce) {
  /* the strip stands still; the list shows once, centred when it fits and
     scrollable by finger when it does not */
  #marquee-track > span[aria-hidden="true"] { display: none; }
  #marquee-track { margin-inline: auto; }
  #marquee-track:not(:focus-visible) { outline: none; }
  section > div:has(> #marquee-track) { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  section > div:has(> #marquee-track)::-webkit-scrollbar { display: none; }

  /* live dots: a soft blink in place of a ping or a swell */
  html:not(.reduce-motion) .animate-ping,
  html:not(.reduce-motion) .cv-live { animation: hs-blink 2.4s ease-in-out infinite !important; transform: none; }

  /* the typing dots blink without bobbing */
  html:not(.reduce-motion) .ai-dots i { animation: hs-blink 1s ease-in-out infinite !important; }
  html:not(.reduce-motion) .ai-dots i:nth-child(2) { animation-delay: 0.15s !important; }
  html:not(.reduce-motion) .ai-dots i:nth-child(3) { animation-delay: 0.3s !important; }

  /* chat bubbles and flow statuses fade in, without rising */
  html:not(.reduce-motion) .ai-armed .ai-q,
  html:not(.reduce-motion) .ai-armed .ai-a { transform: none; transition: opacity 0.3s ease !important; }
  html:not(.reduce-motion) .flow-armed .flow-status { transition: opacity 0.35s ease !important; }

  /* the flow: no travelling dot; each node lights up in turn and stays lit
     until the round ends */
  .flow-dot { display: none; }
  html:not(.reduce-motion) .flow-node.is-pulsing {
    animation: none !important;
    box-shadow: 0 0 0 3px var(--hs-accent-tint), 0 0 0 4px var(--hs-accent);
  }

  /* the course: the check appears by fading, not by the sliding mask */
  .cv-wipe, .cv-wipe-in { transform: none !important; }
  html:not(.reduce-motion) .cv-wipe-in svg { opacity: 0; transition: opacity 0.35s ease !important; }
  html:not(.reduce-motion) .cv-row.is-done .cv-wipe-in svg { opacity: 1; }
}


/* ==========================================================================
   Speed on phones (20 October 2026)
   ==========================================================================
   Frosted glass (backdrop-filter) and large blurs (filter: blur) are cheap
   on a desktop GPU and expensive on an iPhone's: each is repainted whenever
   anything under or inside it moves, the fixed header on every scroll. On
   touch screens only, so a desktop is unchanged:
   - frosted glass goes; the header gets an almost opaque white instead, the
     rest were already nearly opaque
   - a blurred blob becomes the same colour, unblurred, faded to its edge by
     a radial mask, which is painted once
   - the orbit's blur on a chip passing behind the window goes; it is
     already smaller and dimmer there */
@media (hover: none) and (pointer: coarse) {
  /* the generic half is in ds/components.css; these are this page's own */
  .cv-aurora > span, .about-photo-pool {
    filter: none !important;
    -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
    mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  }
  .cv-chip.is-behind { filter: none; }
}

/* ---- The English homepage (en/index.html, dir="ltr", tools/build-en-home.mjs):
   the rules above that are tied to the right edge, mirrored. Scoped to
   html[dir="ltr"], so the Hebrew page does not change. */
@keyframes marquee-ltr {
  from { transform: translateX(0); }
  to   { transform: translateX(-25%); }
}
/* the track starts at the left and overflows to the right, so it moves left */
html[dir="ltr"] #marquee-track { animation-name: marquee-ltr; }
/* the process line is drawn from the left, where English starts reading */
html[dir="ltr"] .process-line { background: linear-gradient(to right, var(--hs-accent), var(--hs-accent-tint)); transform-origin: 0% 50%; }
/* the slider's "before" share is measured from the left edge */
html[dir="ltr"] #before-slider-layer { clip-path: inset(0 calc((100 - var(--split)) * 1%) 0 0); }
html[dir="ltr"] .cv-window { text-align: left; }
html[dir="ltr"] .cv-soon { left: auto; right: 14px; }
/* the mirror images of the design's utilities the Hebrew page uses; Tailwind
   compiled only those, so the English page's own are written here */
.text-left { text-align: left; }
.left-4 { left: 1rem; }
.-left-4 { left: -1rem; }
.-right-6 { right: -1.5rem; }
.pl-0\.5 { padding-left: 0.125rem; }
.group:hover .group-hover\:translate-x-1 { --tw-translate-x: 0.25rem; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
@media (min-width: 640px) {
  .sm\:-right-12 { right: -3rem; }
  .sm\:-left-8 { left: -2rem; }
  .sm\:left-6 { left: 1.5rem; }
}
/* "onward" points right in English: the arrows the design draws pointing
   left, flipped; the Hebrew guide cards keep theirs */
html[dir="ltr"] svg[data-icon="arrow_back"]:not([dir="rtl"] *) { transform: scaleX(-1); }
/* the course preview's lesson names are longer in English: a name may wrap
   inside the fixed window instead of pushing past the card (WCAG text spacing) */
html[dir="ltr"] .cv-name { white-space: normal; }
