/*
 * Home page only. Everything shared lives in tokens.css (type, colour, rhythm) and styles.css
 * (header, buttons, cards, the device frame). If a rule here would be useful on a second page
 * it belongs in styles.css instead.
 */

.hero { padding-top: var(--space-5); }

/*
 * THE HERO PHONE OUTRANKS EVERYTHING ELSE ON THE PAGE NOW, AND IT DID NOT BEFORE.
 *
 * Both cycle-2 reviewers measured the same thing without being told to: the hero shot rendered
 * about 416px wide on a 1440px page - 29% of the width - and the three supporting shots
 * rendered at 378px. Four near-identical phones down one page, each vertically centred against
 * a text column of roughly equal weight. One of them put it as "a type system and no
 * composition system", which is the sharpest thing either cycle said about this site.
 *
 * What the comparisons do: Apple's hero image is 1425x900, 99% of viewport width and 100% of
 * its height, directly under the nav. Teenage Engineering's is 1134x695 at top: 0, bleeding
 * behind the chrome. Oura's is 1515x964 - wider and taller than the viewport, deliberately
 * cropped by it. None of them is 29%.
 *
 * A split layout cannot reach 99% and should not try. What it can do is let ONE shot be clearly
 * the largest object on the page, which is what the ratio change and the 34rem cap buy. The
 * supporting shots stay where they are, so the gap between them is the hierarchy.
 */
@media (min-width: 52rem) {
  .hero { padding-top: var(--space-6); padding-bottom: var(--space-7); }
  .hero .split { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
}

.hero-copy .lead { margin-top: var(--space-3); }

.hero-pills { margin-top: var(--space-4); }

/* The hero phone is the first thing a golfer sees, so it gets the most presence of any shot
   on the page and sits slightly proud of the column on a wide screen.

   `.device--hero` is now on the <figure> and `.device` on an inner <div>, so these widths size
   the figure and the frame fills it. Before this the two classes shared one element and the
   bezel wrapped the caption. Same shape as `.device-row .device`. */
/*
 * THE HERO SHOT REACHES BOTH EDGES ON A PHONE, AND THAT IS ONE FIX FOR TWO PROBLEMS.
 *
 * Cycle 2 gave the hero a size step of its own and measured it at 1440px: 538px against 378px,
 * 1.42x. A cycle-3 reviewer re-measured at 390px and got 330px against 314px - **1.05x**. The
 * hierarchy existed only on the width P10 calls the adaptation, and not on the one it calls the
 * design. That is the same mistake P4 was corrected for.
 *
 * Bleeding to the viewport edge fixes the ranking and the legibility together. In-app text in
 * these captures renders at 16 x (displayed width / 390), so 330px -> 384px takes it from about
 * 13.5px to 15.8px - roughly body size, on the one shot every visitor sees - with no recapture
 * and no new binary. That is the legibility item both earlier cycles logged as unfixed.
 *
 * -1rem, not 100vw: `.wrap` is min(100% - 2rem, …), so a negative inline margin of exactly the
 * gutter reaches both edges. 100vw includes the scrollbar and would overflow.
 */
.device--hero { width: min(100%, 21rem); margin-inline: auto; }
.device--hero .device { width: 100%; }

@media (max-width: 51.999rem) {
  /* `.hero .split > .device--hero`, not `.device--hero`. `styles.css` carries
     `.split > figure { margin: 0 }` at (0,1,1), which outranks a bare class at (0,1,0) whatever
     the file order - so the negative margin was dropped, the width was not, and the hero ran 16px
     off the right edge. The first measurement after the change caught it: `scrollWidth` 406
     against `clientWidth` 390, which is the no-horizontal-scroll rule broken. */
  .hero .split > .device--hero {
    width: calc(100% + 2rem);
    max-width: none;
    margin-inline: -1rem;
  }
  .device--hero .device { border-radius: 0; }
  .device--hero .device-note,
  .device--hero .cta-note { padding-inline: 1rem; }
}

@media (min-width: 52rem) {
  .device--hero { width: min(100%, 28rem); margin-inline: 0 auto; }
}

/* The hero phone carries the whole first impression, so it gets the most of any shot. */
@media (min-width: 64rem) {
  .device--hero { width: min(100%, 34rem); }
}

.coming-row { margin-top: var(--space-4); justify-content: center; }


/* The hero shot's caption. Narrower than the column on purpose: a caption that runs the full
   measure stops reading as a caption and starts reading as another paragraph. */
/* Left at every width, because the price note underneath it is left at every width and the two
   sit in the same figure. Centred-then-left was the inconsistency the cycle-2 reviewers saw in
   the capture before they read any CSS.

   Cycle 3 then found that fixing the alignment had turned two mismatched blocks into one
   four-line grey smudge: same size, same colour, same alignment, 16px apart. They are different
   kinds of statement - one is scope, one is price - so the price gets the rule above it and the
   stronger colour. A price is not a caveat. */
.device--hero .device-note {
  margin: var(--space-2) 0 0;
  max-width: 34ch;
}

.device--hero .cta-note {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--ink-line);
  color: var(--on-ink);
}
