/* goldie-web-v2.css: goldie-web-v1.css, with the home page's phone showing the whole
   app picture. Cloudflare keeps a stylesheet by its name for hours, so each change
   gets the next name; goldie-web-v1.css stays for pages that still ask for it, and
   goes in the release after. */
/* goldstraw.app: Goldie on the website (home, /test, /help and the guides).
   Loads last, after welcome-v2.css (and guides-v1.css or help-v1.css), which it
   never changes. Goldie always stands at a counter: each picture ends just below
   his basket, and that edge sits on a straight edge, never in mid-air.
   The CSP allows no inline styles, so everything lives here. */
.goldie-picture { display: block; }
.goldie-picture img { display: block; width: 100%; height: auto; }

/* Home: Goldie welcomes beside the real app, in one green panel whose lower edge
   is the counter. Narrow (or very large text): his caption runs across the top.
   He always keeps his own column: the phone, drawn on top, never covers his basket. */
.hero { container: hero / inline-size; }
.hero-shot { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "caption caption" "goldie phone"; align-items: end; gap: 12px 8px; padding: 20px 14px 0; }
.goldie-caption { grid-area: caption; max-width: 22em; color: var(--customer-ink); font-size: .9375rem; line-height: 1.35; text-wrap: balance; }
.goldie-caption strong { display: block; color: var(--customer-green-deep); font-size: 1.0625rem; font-weight: 700; }
.hero-shot .goldie-picture { grid-area: goldie; justify-self: start; width: 100%; max-width: 136px; }
.hero-shot .phone { grid-area: phone; position: relative; width: 236px; }
@container hero (min-width: 18.5em) {
  .hero-shot { grid-template-rows: 1fr auto; grid-template-areas: "caption phone" "goldie phone"; }
  .goldie-caption { align-self: end; }
}

/* Phones: the panel runs edge to edge. The phone shows the whole picture, down to
   the trolley's card with its gold tick and the paper below it, and stands at the
   same counter as Goldie. A shorter phone may end the picture only in one of its
   gaps, never through a row (tests/e2e/website-presentation.spec.js). */
@media (max-width: 639px) {
  .hero-shot { margin-inline: calc(-1 * var(--site-gutter)); border-radius: 0; }
  .hero-shot .goldie-picture { width: 100%; max-width: 150px; }
  .hero-shot .phone { width: 226px; height: auto; }
}
@media (max-width: 379px) {
  .hero-shot { padding-inline: 10px; }
  .hero-shot .phone { width: 218px; }
}
@media (min-width: 640px) {
  .hero-shot { grid-template-columns: auto auto; justify-content: center; column-gap: 24px; padding: 32px 28px 0; }
  .hero-shot .goldie-picture { width: 176px; max-width: none; }
  .goldie-caption { max-width: 176px; }
  .hero-shot .phone { width: 290px; }
}
@media (min-width: 900px) {
  /* The panel grows to 480px but leaves the headline at least 356px, so it keeps to three lines.
     Where that makes the panel narrower, the phone gives way first, so Goldie and his line keep their room. */
  .hero { grid-template-columns: minmax(0, 1fr) min(480px, calc(100% - 420px)); }
  .hero-shot { grid-template-columns: minmax(0, 1fr) min(256px, 58%); justify-content: stretch; column-gap: 8px; padding: 44px 20px 0; }
  .hero-shot .goldie-picture { width: 100%; max-width: 176px; }
  .goldie-caption { max-width: 160px; }
  .hero-shot .phone { width: 100%; }
}

/* Guides: Goldie stands behind the Try Goldstraw panel, at its right-hand end. */
.guide .guide-cta { position: relative; margin-top: 196px; }
.guide-cta .goldie-basket { position: absolute; right: 28px; bottom: 100%; width: 80px; }
@media (min-width: 640px) {
  .guide .guide-cta { margin-top: 236px; }
  .guide-cta .goldie-basket { right: 40px; width: 96px; }
}

/* Help: Goldie stands beside the title, behind the line that opens the answers.
   He takes no height of his own, so the title and answers keep their spacing. */
.help { display: grid; grid-template-columns: minmax(0, calc(40rem - 96px)) 88px; column-gap: 8px; justify-content: start; align-content: start; }
.help > * { grid-column: 1 / -1; }
.help > h1, .help > .help-lead { grid-column: 1; }
.help > .goldie-help { grid-column: 2; grid-row: 2; align-self: end; width: 68px; margin: -114px 0 -28px auto; }
/* Android tester page: Goldie gives a thumbs up, standing on the footer's top edge,
   his right edge on the buttons' right edge (they stop at 560px). */
.tester > .goldie-completion { width: 96px; margin: 24px 0 -64px max(0px, min(100%, 560px) - 96px); }
@media (min-width: 900px) {
  .tester { display: grid; grid-template-columns: minmax(0, 560px) 176px; grid-template-rows: repeat(6, auto); column-gap: 96px; justify-content: start; align-content: start; }
  .tester > * { grid-column: 1; }
  .tester > .goldie-completion { grid-column: 2; grid-row: 1 / -1; align-self: end; width: 128px; margin: 0 0 -96px; }
}
