/* The Android steps page (/open-beta/android). It loads tokens.css and open-beta.css, so the poster's
   ground, wordmark, foot, QR code and rise are shared; this file lays the three steps on the band and
   lets the page scroll, which the poster never does. Every value is a token. */

/* ---------------------------------------------------------------- The band */
.steps-page {
  position: relative;
  isolation: isolate;
  display: grid;
  /* The poster's header and foot place themselves by area name, so the page names the same rows. */
  grid-template-areas: "top" "copy" "foot";
  grid-template-rows: auto 1fr auto;
  gap: var(--space-8) 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-4) max(var(--pad), calc((100% - var(--page-max)) / 2)) var(--space-6);
  color: var(--on-band);
  background:
    radial-gradient(70% 110% at 88% 118%, color-mix(in srgb, var(--attention) 40%, transparent) 0%, transparent 62%),
    linear-gradient(150deg, var(--band-start) 0%, var(--band-end) 100%);
}
.steps-page .top { min-height: var(--nav-bar); }
/* The other store, top right, for anyone who scanned the code on the wrong phone. */
.other-store {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  font: var(--label-sm);
  color: var(--on-band);
  text-decoration: none;
  text-underline-offset: 3px;
}
.other-store:hover { color: var(--on-band); text-decoration: underline; }

/* One reading column, left-aligned inside, centred on the band. */
.steps-wrap {
  grid-area: copy;
  width: min(100%, 40rem);
  margin-inline: auto;
  align-self: start;
}
.steps-title {
  font: var(--display-lg);
  letter-spacing: var(--display-lg-tracking);
  color: var(--on-band);
  text-wrap: balance;
}
.steps-sub {
  margin-top: var(--space-4);
  font: var(--body-lg);
  color: var(--on-band);
  max-width: 34rem;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- The steps */
.steps {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
/* A card: the number in a ring, then the title, the line and the button. */
.step {
  display: grid;
  grid-template-columns: var(--tile-sm) minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
}
.step-n {
  display: grid;
  place-items: center;
  width: var(--tile-sm);
  height: var(--tile-sm);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  font: var(--title-lg);
  /* Lining figures on a one-line box, so the numeral centres in the ring. Cormorant's default
     figures are old-style: 1 and 2 stop at the x-height and 3 drops below the baseline, which
     left them sitting low. */
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  color: var(--ink);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.step-n svg {
  display: none;
  width: var(--icon-md);
  height: var(--icon-md);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.step-title { font: var(--title-lg); color: var(--ink); }
.step-text { margin-top: var(--space-2); font: var(--body); color: var(--ink-muted); text-wrap: pretty; }
/* The name of the button on Google's page, set the way the page's own buttons are set: DM Sans at
   500 in ink. The site ships no bold or italic DM Sans, and the system reads at 400 and acts at 500. */
.step-text b { font-weight: 300; color: var(--ink); }
/* "(done)" for the screen reader once a step is tapped; the eye gets the check in the ring. */
.step-done { display: none; }
.step.is-done .step-done {
  display: inline-block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Button, primary: the accent fill, with the arrow that says the tap leaves for Google's page. */
.step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-md);
  margin-top: var(--space-4);
  padding: 0 var(--space-5);
  border: 1px solid var(--accent);
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  font: var(--label);
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.step-btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.step-btn svg {
  width: var(--icon-sm);
  height: var(--icon-sm);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A step already tapped (open-beta-android.js): the ring fills with a check, and its button steps
   back to the secondary outline so the next step leads. */
.step.is-done .step-n { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.step.is-done .step-n .n { display: none; }
.step.is-done .step-n svg { display: block; }
.step.is-done .step-btn { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.step.is-done .step-btn:hover { background: var(--fill); border-color: var(--line-strong); color: var(--ink); }

/* The lines after the steps, on the band. */
.steps-note {
  margin-top: var(--space-6);
  font: var(--body-sm);
  color: var(--ink-muted);
  max-width: 34rem;
  text-wrap: pretty;
}
.steps-note + .steps-note { margin-top: var(--space-3); }
.steps-note a { color: var(--accent); }
.steps-note a:hover { color: var(--accent-strong); }
/* A 44px hit area around the small links, without moving the line. */
.steps-note a { display: inline-block; padding-block: 0.8rem; margin-block: -0.8rem; }

/* The desktop QR code (open-beta.css draws it) sits under the notes here. */
.steps-wrap .qr { margin-top: var(--space-8); }

/* ---------------------------------------------------------------- Wider windows */
@media (min-width: 720px) {
  .step { padding: var(--space-6); gap: var(--space-5); }
  .steps-sub { margin-top: var(--space-5); }
}
