/* Home's flow pass (Lane C - Home flow, 10-30, issue #5; decision
   2026-10-30-simple-first-flow-words-visuals): plain labeled shapes where
   visuals will go, grey blocks where longer words will go, and the
   sections' layout. No art and no new motion. */

/* A shape where a visual will go: grey, its label in the middle. */
.jh-ph {
  display: grid; place-items: center; margin: 0; aspect-ratio: var(--ph-ratio, 4 / 3);
  border-radius: var(--radius-card); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--text-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); text-align: center; padding: var(--space-16);
}

/* A block where longer words will go. */
.jh-later {
  display: grid; align-content: center; min-height: var(--later-h, 96px); margin: 0; padding: var(--space-16) var(--space-20);
  border-radius: var(--radius-input); background: var(--surface);
  font-size: var(--text-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.hx-idea .jh-lead { margin-top: var(--space-20); }
.hx-idea .jh-later { margin-top: var(--space-32); max-width: 30rem; }

/* 3. Two ways: two big cards side by side. */
.jh-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-40); }
.jh-way { display: grid; gap: var(--space-16); align-content: start; }
.jh-way .jh-ph { --ph-ratio: 16 / 10; margin-bottom: var(--space-8); }
.jh-way .jh-h3, .jh-way p { margin: 0; }
.jh-way p { font-size: var(--text-lead); color: var(--text-muted); max-width: 32rem; }

/* The first card plays the websites loop (Loop.astro size="card", #25),
   drawn from Business's pick of the card review's Option B (11-09, HC-Q1 B
   and HC-Q2 A; orchestration-notes/lanes/review-home-card-2026-11-09/):
   from 560 px one 16:10 picture that only scales, the laptop at the left
   and the phone larger in front at the right, a little over the laptop;
   under 560 px a square, the laptop above and the phone at its lower right.
   No "Sample sites" label. Pause stays where Loop.astro and PlayPause.astro
   put it, the drawing's bottom-left corner, the same place as H3's beside
   it (Business, 11-13: "it needs to be in the same place as the 'we help
   you use ai answers' animation"). The comp is 800 wide; loop.js scales it
   to the stage. Every rule here needs .loop--card, which only Home's card
   has, so Websites' loop (whose page loads this file too) is unchanged. */
.loop--card .loop-stage { aspect-ratio: 16 / 10; }
.loop--card .loop-comp { height: 500px; }
.loop--card .loop-lid { left: 43px; top: 85px; width: 566px; height: 317px; }
.loop--card .loop-lid .loop-screen { left: 10px; top: 10px; width: 546px; height: 297px; border-radius: 7px; }
.loop--card .loop-base { left: 19px; top: 402px; width: 613px; height: 13px; }
.loop--card .loop-phone { left: 557px; top: 19px; width: 224px; height: 462px; border-radius: 38px; }
.loop--card .loop-phone .loop-screen { left: 8px; top: 8px; width: 208px; height: 446px; border-radius: 30px; }
.loop--card .loop-island { top: 17px; width: 62px; height: 17px; margin-left: -31px; border-radius: 9px; }
@media (max-width: 559px) {
  .loop--card .loop-stage { aspect-ratio: 1; }
  .loop--card .loop-comp { height: 800px; }
  .loop--card .loop-lid { left: 36px; top: 24px; width: 630px; height: 353px; }
  .loop--card .loop-lid .loop-screen { width: 610px; height: 333px; border-radius: 8px; }
  .loop--card .loop-base { left: 16px; top: 377px; width: 670px; height: 15px; }
  .loop--card .loop-phone { left: 476px; top: 164px; width: 300px; height: 618px; border-radius: 52px; }
  .loop--card .loop-phone .loop-screen { left: 11px; top: 11px; width: 278px; height: 596px; border-radius: 41px; }
  .loop--card .loop-island { top: 23px; width: 83px; height: 23px; margin-left: -41px; border-radius: 12px; }
}
.jh-way > .loop--card { margin-bottom: var(--space-8); }

/* 4. The menu: per group, a list with thin rules beside one tall shape;
   the second group's shape is on the left. On phones the shape sits on
   top of its list (option B, Business's pick 11-01; Lane E - Home page). */
.jh-menu-group + .jh-menu-group { margin-top: var(--section-space); }
.jh-menu-group > .jh-h3 { margin: 0 0 var(--space-24); scroll-margin-top: calc(var(--header-height) + var(--space-24)); }
.jh-menu-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-72); align-items: stretch; }
.jh-menu-shape { aspect-ratio: auto; min-height: 480px; }
.jh-menu-group[data-route="ai"] .jh-menu-shape { order: -1; }
/* Side by side (700 px up), the picture stays in view beside its list as the
   visitor scrolls the list, and stops with the list's last row (Business,
   11-16). It sits under the header: 80 px above 900 px, 72 from 900 down. */
@media (min-width: 700px) {
  /* min-height 0: the box is the drawing's own height (the 480 px floor left
     the visible drawing, 407 px at 1024, ending above the box's bottom, so it
     stopped short of the last row; Business, 11-16). */
  .jh-menu-shape { align-self: start; min-height: 0; position: sticky; top: calc(var(--header-height) + var(--space-24)); }
}
@media (min-width: 700px) and (max-width: 900px) {
  .jh-menu-shape { top: calc(var(--header-height-compact) + var(--space-24)); }
}
.jh-svc-list { margin: 0; padding: 0; list-style: none; border-top: var(--stroke-hairline) solid var(--line); }
.jh-svc-list > li { border-bottom: var(--stroke-hairline) solid var(--line); }
.jh-svc { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-24); row-gap: var(--space-8); padding-block: var(--space-32); color: inherit; text-decoration: none; }
.jh-svc-name { font-weight: var(--weight-emphasis); font-size: var(--text-subheading); }
.jh-svc-line { font-size: var(--text-body-lg); line-height: var(--leading-body); color: var(--text-muted); text-wrap: pretty; }
.jh-svc-arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: var(--text-lead); color: var(--text-muted); transition: transform .2s var(--ease-out), color .2s var(--ease-out); }
.jh-svc:hover .jh-svc-arrow, .jh-svc:focus-visible .jh-svc-arrow { transform: translateX(4px); color: var(--text); }
/* Each row's icon tile and its hover, as the Services page's rows
   (components.css .jh-service; #117): the icon left of the words, the row
   inset 4 px from its lines with soft corners, and on hover the surface
   color behind the row and the raised color behind the icon. Keyboard focus
   takes the site's outline (components.css :focus-visible), as there. The
   row's own padding gives back the 4 px, so each row keeps its height. */
.jh-menu-body .jh-svc-list > li { padding-block: var(--space-4); }
.jh-svc {
  grid-template-columns: auto minmax(0, 1fr) auto; padding: calc(var(--space-32) - var(--space-4)) var(--space-16);
  border-radius: var(--radius-input); transition: background-color var(--duration-control) var(--ease-standard);
}
.jh-svc > .jh-tile { grid-column: 1; grid-row: 1 / 3; align-self: center; }
.jh-svc-name, .jh-svc-line { grid-column: 2; }
.jh-svc-arrow { grid-column: 3; }
.jh-svc:hover { background: var(--surface); }
.jh-svc:hover .jh-tile { background: var(--raised); }
/* Narrow rows take the Services page's phone spacing (components.css,
   .jh-service at 520 px and under): on phones, and from 700 to 1023 px,
   where the list is half the page and only about 300 px wide. */
@container jh (max-width: 520px) {
  .jh-svc { column-gap: var(--space-16); padding-inline: var(--space-8); }
  .jh-svc > .jh-tile { align-self: start; }
}
@media (min-width: 700px) and (max-width: 1023px) {
  .jh-svc { column-gap: var(--space-16); padding-inline: var(--space-8); }
  .jh-svc > .jh-tile { align-self: start; }
}

/* 5. How it works: one wide shape, then three numbered columns. */
.jh-how-visual { --ph-ratio: 21 / 6; margin-bottom: var(--block-gap); }
.jh-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-40); margin: 0; padding: 0; list-style: none; }
.jh-how li { display: grid; gap: var(--space-12); align-content: start; padding-top: var(--space-24); border-top: 1px solid var(--line); }
.jh-how-number { font-size: var(--text-label); font-weight: 600; letter-spacing: .08em; color: var(--text-muted); }
.jh-how .jh-h3, .jh-how p { margin: 0; }
.jh-how p { color: var(--text-muted); }
/* The price under How it works: one forest band, the price on the left and
   the way to Plans & Pricing on the right; stacked on phones (S1-Q2 A). */
.hm-price {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-24) var(--space-40);
  margin: var(--block-gap) 0 0; padding: var(--space-32) var(--space-40);
  border-radius: var(--radius-card); background: var(--canvas); color: var(--text);
}
.hm-price p { margin: 0; }
.hm-price .hm-price-title { margin-top: var(--space-8); font: var(--weight-display) 48px/1.05 var(--font-display); letter-spacing: -.03em; }
.hm-price .hm-price-line { margin-top: var(--space-12); font-size: var(--text-lead); color: var(--text-muted); text-wrap: balance; }
@media (max-width: 699px) {
  .hm-price { padding: var(--space-24); }
  .hm-price .hm-price-title { font-size: 36px; }
  .hm-price > .jh-button { width: 100%; }
}

/* 6. Why us: one calm statement. */
.jh-whyus { display: grid; justify-items: center; gap: var(--space-24); text-align: center; }
.jh-whyus .jh-lead { margin: 0; }
.jh-whyus .jh-later { width: min(100%, 36rem); margin-top: var(--space-16); }

@media (max-width: 699px) {
  .jh-ways, .jh-how { grid-template-columns: 1fr; }
  .jh-how-visual { --ph-ratio: 4 / 3; }
  .jh-menu-body { grid-template-columns: 1fr; gap: var(--space-24); }
  .jh-menu-shape, .jh-menu-group[data-route="ai"] .jh-menu-shape { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .jh-svc { padding-block: calc(var(--space-20) - var(--space-4)); }
  .jh-svc-name { font-size: var(--text-body-lg); }
  .jh-svc-line { font-size: var(--text-body-sm); }
}

/* Home only (#84; decision 2026-10-18-design-system-light-leads, changed
   11-09): the whole page takes the theme of the band at the reading line.
   site.js's initPageTheme sets .is-page-theme on .jh-site, only on Home,
   and puts the band's theme on .jh-site. Home's sections keep their own
   data-theme (their spacing keys on it) but take the page's 38 tokens; so
   does the header while it is over them (.is-page-follow), except its nav
   ink, which keeps its own rules (the open phone menu reads as before). */
.jh-site.is-page-theme > main > section[data-theme]:not(.hx-end) {
  color-scheme: inherit;
  --canvas: inherit; --surface: inherit; --raised: inherit; --overlay: inherit;
  --overlay-hover: inherit; --text: inherit; --text-muted: inherit; --text-on-image: inherit;
  --text-on-image-muted: inherit; --line: inherit; --border: inherit; --action: inherit;
  --action-hover: inherit; --action-pressed: inherit; --on-action: inherit;
  --secondary: inherit; --secondary-hover: inherit; --secondary-pressed: inherit;
  --focus: inherit; --link: inherit; --link-hover: inherit; --accent: inherit; --error: inherit;
  --success: inherit; --hairline: inherit; --selection: inherit; --on-selection: inherit;
  --nav-ink: inherit; --nav-ink-strong: inherit; --hero-base: inherit; --ill-paper: inherit;
  --ill-ink: inherit; --ill-quiet: inherit; --ill-fill: inherit; --ill-green: inherit;
  --ill-accent: inherit; --hero-shade: inherit; --shadow-panel: inherit;
}
.jh-site.is-page-theme > .jh-header.is-page-follow {
  color-scheme: inherit;
  --canvas: inherit; --surface: inherit; --raised: inherit; --overlay: inherit;
  --overlay-hover: inherit; --text: inherit; --text-muted: inherit; --text-on-image: inherit;
  --text-on-image-muted: inherit; --line: inherit; --border: inherit; --action: inherit;
  --action-hover: inherit; --action-pressed: inherit; --on-action: inherit;
  --secondary: inherit; --secondary-hover: inherit; --secondary-pressed: inherit;
  --focus: inherit; --link: inherit; --link-hover: inherit; --accent: inherit; --error: inherit;
  --success: inherit; --hairline: inherit; --selection: inherit; --on-selection: inherit;
  --hero-base: inherit; --ill-paper: inherit; --ill-ink: inherit; --ill-quiet: inherit;
  --ill-fill: inherit; --ill-green: inherit; --ill-accent: inherit; --hero-shade: inherit;
  --shadow-panel: inherit;
}
/* The fade: the theme's colors (registered by site.js) ease over half a
   second on .jh-site alone, and everything inside inherits them, so
   background, text and rules fade together. Timed, not tied to the
   scroll; none under reduced motion. */
.jh-site.is-page-theme.is-page-fade {
  transition-property: --canvas, --surface, --raised, --overlay, --overlay-hover, --text,
    --text-muted, --text-on-image, --text-on-image-muted, --line, --border, --action,
    --action-hover, --action-pressed, --on-action, --secondary, --secondary-hover,
    --secondary-pressed, --focus, --link, --link-hover, --accent, --error, --success,
    --hairline, --selection, --on-selection, --nav-ink, --nav-ink-strong, --hero-base,
    --ill-paper, --ill-ink, --ill-quiet, --ill-fill, --ill-green, --ill-accent;
  transition-duration: 500ms;
  transition-timing-function: var(--ease-standard);
}
@media (prefers-reduced-motion: reduce) {
  .jh-site.is-page-theme.is-page-fade { transition: none; }
}
/* How it works' three pictures (H6) carry an SVG grain and shadow that
   Safari on a phone draws on the CPU. Painted with the page around them,
   every frame of the fade into the dark band redrew one, 100 to 160 ms a
   frame (#120, Business's Safari timeline, 11-14). Each goes on a layer
   of its own, and takes fixed values for everything the fade changes
   (color, color-scheme and the theme's tokens); a picture drawn with any
   of them would redraw its layer every frame (the second timeline, 50 to
   100 ms a frame), and one that switches at once, as --shadow-panel does,
   redraws it once as the fade starts (the third, one 90 ms frame). The pictures use none of them (fixed fills, no var()
   or currentColor), so they look the same, drawn once; the fade repaints
   only the page around them. Not with reduced motion: no fade there. */
@media (prefers-reduced-motion: no-preference) {
  .jh-site.is-page-theme .hm-how .hm-art > svg {
    will-change: transform; color: initial; color-scheme: light;
    --canvas: initial; --surface: initial; --raised: initial; --overlay: initial;
    --overlay-hover: initial; --text: initial; --text-muted: initial; --text-on-image: initial;
    --text-on-image-muted: initial; --line: initial; --border: initial; --action: initial;
    --action-hover: initial; --action-pressed: initial; --on-action: initial;
    --secondary: initial; --secondary-hover: initial; --secondary-pressed: initial;
    --focus: initial; --link: initial; --link-hover: initial; --accent: initial; --error: initial;
    --success: initial; --hairline: initial; --selection: initial; --on-selection: initial;
    --nav-ink: initial; --nav-ink-strong: initial; --hero-base: initial; --ill-paper: initial;
    --ill-ink: initial; --ill-quiet: initial; --ill-fill: initial; --ill-green: initial;
    --ill-accent: initial; --hero-shade: initial; --shadow-panel: initial;
  }
}
/* During a fade (site.js sets .is-page-fading while the page fades), the
   elements on Home with their own color transitions take the page's fading
   colors as they are; otherwise they chase them and lag about a second.
   Only their color transitions stop: they are named one by one, and the
   menu arrow keeps its nudge. Everything else (Apply now's fade, the
   Services chevron, the phone menu icon, section reveals, the hero, the
   websites loop) keeps its motion. */
.jh-site.is-page-theme.is-page-fading :is(.jh-header, .jh-nav-link, .jh-nav-trigger, .jh-panel-item, .jh-tile, .jh-svc, .jh-link, .jh-button:not(.jh-header-cta)):not(.hx *, .loop *) {
  transition: none;
}
.jh-site.is-page-theme.is-page-fading .jh-svc-arrow:not(.hx *, .loop *) { transition-property: transform; }

/* The launch safety net (Home only, #84): with .is-hiding-empty (site.js,
   HIDE_EMPTY_SLOTS) a picture slot that is still an empty placeholder
   (.jh-ph) is hidden and its section falls back to text: the menu to one
   column, How it works to its three steps. A filled slot isn't .jh-ph, so
   it always shows. */
.jh-site.is-page-theme.is-hiding-empty :is(.jh-way .jh-ph, .jh-menu-shape.jh-ph, .jh-how-visual.jh-ph) { display: none; }
.jh-site.is-page-theme.is-hiding-empty .jh-menu-body:has(> .jh-ph) { grid-template-columns: 1fr; }
