/* Home · Hero on phones (≤ 600 px), layered on variants/hero-launch-1/hero-launch-1.css.
   Goal: the first screen holds the headline, the laptop and the offer down to the download button
   (checked at 393 × 659, an iPhone 15/16 with Safari's bars showing, and 375 × 629, a 13 mini).
     - the long line under the headline is gone (the sections below tell that story)
     - the headline is set smaller, two short lines
     - the offer is the phone CTA (mobile/cta.html, picked from variant B "No card, inline", 2026-11-13):
       no card, one centred line of type (yellow pill, launch price, struck regular price), a quiet qualifier that
       ties the price to Pro and says the download is free, then the green button. The desktop card is hidden.
   Phone rules are inside the media queries; the photo block at the top is not (see its note). */

/* ---------- Photo: tree frog (from hero-trial-frog.html) ----------
   build.sh swaps the ladybird images for the frog in the markup; these are the matching light and card rules.
   Not phone-scoped: they belong with the frog markup, at every width. Cards are one sharp photo, no blur yet. */
.h1l::before { background: radial-gradient(closest-side, rgba(80, 160, 125, 0.15), rgba(80, 160, 125, 0.04) 60%, transparent); }
/* The glow, pre-blurred (2026-11-16 perf pass: no live blur on phones). Baked from assets/hero-trial/frog-glow.webp with
   this box's blur, saturate and radial mask by mobile/tools/bake-hero-glow.mjs: re-run it when the frog glow changes. */
.h1l-glow {
  background-image: url("../../assets/hero-trial/frog-glow-baked.webp?v=1");
  filter: none; -webkit-mask-image: none; mask-image: none;
}
/* The laptop's contact shadow: the same soft ellipse as a radial gradient, not a blurred box (no live blur). */
.h1l-device::after {
  left: calc(5% - 32px); right: calc(5% - 32px); bottom: calc(-1.5% - 30px); height: calc(5% + 60px);
  border-radius: 0; filter: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0.08) 75%, transparent);
}
/* The focus sweep, compositor-only (2026-11-16, the phone CTA "bouncing" during the sweep): every 0.9 s the variant
   sheet moved filter: brightness() and box-shadow on the cards, so Safari repainted the hero and made and dropped
   layers round it each step. Here nothing in the hero is repainted while it runs: each card keeps one layer, its
   brightness is a black veil whose opacity moves (the photo is drawn once at brightness 1.1, the brightest state:
   veil 0.1455 = 0.94 at rest, 0.3636 = 0.7 when another frame is up, 0 = 1.1 for the active one), the active card's
   brighter edge is a ring that fades in, and its number fades rather than changing colour. The lift was already a
   transform. The glow and the phone CTA (below) keep a layer of their own for good. */
.h1l-card__in,
.h1l[data-sweep="on"] .h1l-card__in,
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in {
  filter: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 -6px 26px rgba(0, 0, 0, 0.55);
  transition: transform 0.7s var(--h1l-ease);
  will-change: transform;
}
.h1l-card__in img { transform: none; filter: brightness(1.1); }
.h1l-card__in::after,
.h1l-card__in::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.7s ease;
  will-change: opacity;
}
.h1l-card__in::after { z-index: 1; background: #000; opacity: 0.1455; }
.h1l[data-sweep="on"] .h1l-card__in::after { opacity: 0.3636; }
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in::after { opacity: 0; }
.h1l-card__in::before { z-index: 2; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36); opacity: 0; }
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in::before { opacity: 1; }
.h1l-card__in span,
.h1l[data-sweep="on"] .h1l-card__in span,
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in span { color: #fff; opacity: 0.8; transition: opacity 0.7s ease; will-change: opacity; }
.h1l[data-sweep="on"] .h1l-card__in span { opacity: 0.45; }
.h1l[data-sweep="on"] .h1l-card.is-active .h1l-card__in span { opacity: 1; }
.h1l-glow { will-change: opacity; }
@media (prefers-reduced-motion: reduce) {
  .h1l-card__in, .h1l-card__in::after, .h1l-card__in::before, .h1l-card__in span { transition: none; }
}

/* ---------- One page, two heroes (the live index.html, site/build.sh, 2026-11-16) ----------
   The hero slot holds hero B (.cu, stacking/hero-b.html) and this phone hero (.h1l): hero B above 600 px, the phone
   hero at 600 px and below. The hidden hero's images are never fetched (blank <picture> source). */
/* site/build.sh wraps each hero image in <picture class="hero-pic"> (blank at the other width): out of layout. */
.hero-pic { display: contents; }
@media (min-width: 601px) { .sb-slot--hero > .h1l { display: none; } }
@media (max-width: 600px) { .sb-slot--hero > .cu { display: none; } }
/* The Stacking section's alignment JSON sits between its slot and Edit's on the live page (the phone preview drops it):
   at phone width, Edit still overlaps Stacking by the sheet corner,
   as on the approved phone page. */
@media (max-width: 600px) {
  #page-home > script + .sb-slot { margin-top: calc(var(--sb-r) * -1); }
}
/* Every width: the JSON takes a child index, so the Export slot fell outside sep-b.css's nth-child z-indexes (z auto)
   and Retouch painted over its rounded top corners (a straight seam on desktop too, fixed 2026-11-16). */
#page-home > .sb-slot--last { z-index: 6; }

/* Desktop and tablet: the phone CTA does not exist. */
.h1l-mb { display: none; }

@media (max-width: 600px) {
  /* One spacing scale for the hero. --m-gap is the gap between the blocks, measured on what you see:
       top bar pill → headline → top of the photo fan · laptop → offer · button → next sheet's edge.
     Inside the offer: the three facts, then 18 px to the button.
     The offsets below turn box edges into visible edges: the top bar's pill ends 13 px above --topbar-h,
     the headline's line box sits 2 px above its glyphs, and the rotated cards rise 4.9 % of the laptop
     width above the media box. */
  .h1l {
    --m-gap: clamp(24px, 4.2svh, 36px);
    --h1l-pad-b: var(--m-gap);
    padding-top: 0;
  }

  /* No logo anywhere on the phone's first screen (user, 2026-11-13: more breathing room):
     the hero's brand lockup and the top bar's separate icon + name are both gone; the top bar keeps only the
     glass section row (same 38 px height, so the --m-gap rhythm below is unchanged). Since 2026-11-16 (user) the
     row's first segment is the icon + ReeStack, standing for Home (css/site.css).
     The screen keeps only headline, laptop and offer: nothing else competes for the eye. */
  .h1l-brand,
  .nav__brand,
  .nav__brand:has(.t3-wordmark) { display: none; }   /* hero-t3.css shows the wordmark brand with this selector */

  /* Headline (hero B's words): "Focus stacking." big, "Native on Mac." under it, smaller and muted, as on desktop.
     43 px on a 393 phone, the size of hero B's phone title. */
  .h1l-title {
    margin-top: calc(var(--m-gap) - 0.04em);
    max-width: none;
    font-family: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(38px, 11vw, 48px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.94;
  }
  .h1l-title__line {
    margin-top: 10px;
    font-size: 0.4em;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--muted);
  }

  .h1l-sub { display: none; }

  /* Laptop: full width; the fan's room above the lid goes from 19 to 15 % of the width. */
  .h1l-media { margin-top: calc(var(--m-gap) + 0.049 * (100vw - 2 * var(--gutter))); }
  .h1l-device { margin-top: 15cqi; }
  .h1l-card { --lift: -27cqi; top: calc(15cqi + 27cqi); }

  /* ---------- Phone CTA ---------- */

  /* The desktop offer card and its facts are gone on phones; the phone CTA takes the deal row. */
  .h1l-deal { display: none; }

  .h1l-mb {
    grid-area: deal;
    display: grid; justify-items: center;
    width: 100%; max-width: 380px;
    margin-top: var(--m-gap);
    position: relative; z-index: 2;
    text-align: center;
    will-change: transform;            /* its own layer for good: the sweep above never re-renders it (2026-11-16) */
  }
  .h1l-mb > * { animation: h1l-rise 0.9s var(--h1l-ease) 0.2s backwards; }
  .h1l-mb > .h1l-mb__btn { animation-delay: 0.3s; }

  /* Three facts in a row, like stats (option C of cta-variants.html): a big word over a quiet caption each,
     hairlines between. The launch discount is the yellow one. */
  .h1l-mb__facts {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 0; padding: 0; list-style: none;
  }
  .h1l-mb__facts li { display: grid; justify-items: center; gap: 4px; margin: 0; padding: 0; }
  .h1l-mb__facts li + li { border-left: 1px solid rgba(255, 255, 255, 0.1); }
  .h1l-mb__facts b {
    font-family: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(24px, 6.8vw, 28px); font-weight: 650; letter-spacing: -0.03em; line-height: 1;
    color: var(--text);
  }
  .h1l-mb__facts b.h1l-mb__deal { color: #ffd60a; }
  .h1l-mb__facts span { color: var(--muted); font-size: 12.5px; line-height: 1.2; }

  .h1l-mb__btn { width: 100%; margin-top: 18px; min-height: 50px; }
}


/* ---------- The sticky Download dock (../stacking/sticky-cta.html, 2026-11-16) ----------
   On phones the dock spans most of the width, so the footer at the page end gets room under it:
   its own 24 px + the dock (58 px) + its 20 px from the bottom edge + 12 px of air. */
@media (max-width: 600px) {
  .footer { padding-bottom: calc(24px + 58px + 20px + 12px + env(safe-area-inset-bottom)); }
}
