/* About: the stepped statement. Read top to bottom, in the order the page is read. */

/* The opening: a four-beat count in the narrow lane, with its sentence beside or under it. */
.Intro-count {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.Intro-count .Count, .Habits-count .Count { --size-of-a-beat: clamp(1.5rem, 4vw, 3.5rem); }
.Intro-tally {
  flex: 1 1 9rem;
  font-size: var(--size-of-small-type);
  line-height: 1.4;
}
.Intro .Intro-sentence { max-inline-size: 42ch; }
.Intro-keys { margin-block-start: 1.25rem; }
.Intro .Photo-frame { aspect-ratio: 4 / 3; }

/* The statement: seven sentences, one to a step, descending the lanes and returning left. */
.Statement { row-gap: 1.25rem; }
.Statement-head { display: contents; }
.Statement-lead { max-inline-size: 40ch; }
.Statement-line {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  column-gap: 0.875rem;
  font-size: clamp(1.3125rem, 1rem + 1.2vw, 1.875rem);
  line-height: 1.3;
}
.Statement-line::before {
  --depth-of-the-step: 0.3125rem;
  content: "";
  inline-size: 1rem;
  block-size: 1.25rem;
  margin-block-start: 0.2em;
  background: var(--colour-of-the-ochre);
  clip-path: polygon(0 0, calc(100% - var(--depth-of-the-step)) 0, calc(100% - var(--depth-of-the-step)) var(--depth-of-the-step), 100% var(--depth-of-the-step), 100% 100%, 0 100%);
}
.Statement-bar { max-inline-size: 100%; }

/* On a phone the steps become alternating indents. */
.Statement > p:nth-of-type(odd) { margin-inline-end: 12%; }
.Statement > p:nth-of-type(even) { margin-inline-start: 12%; }
.Statement > .Statement-bar { margin-inline-end: 0; }
.Statement-photo .Photo-frame { aspect-ratio: 16 / 9; }

/* How we work: the habits in the middle lane, the optional third left open on the count. */
.Habits-flow > * + * { margin-block-start: var(--space-between-paragraphs); }
.Habits-flow > .Heading + * { margin-block-start: 1.25rem; }
.Habits-flow .Beats { gap: 1rem; }
.Habits-flow strong { font-weight: 500; font-variation-settings: "wght" 500; }
.Habits-count { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; }

/* What this site does not print: the reasons, and a note on the pictures on its own deep ground. */
.Printed-words > * + * { margin-block-start: 1.25rem; }
.Printed-words p { max-inline-size: 60ch; }
.Printed-note {
  --depth-of-the-step: 1.5rem;
  padding: 1.75rem 1.5rem;
  background: var(--colour-of-the-deep-slate);
  color: var(--colour-of-the-pale-ink);
  clip-path: polygon(0 0, calc(100% - var(--depth-of-the-step)) 0, calc(100% - var(--depth-of-the-step)) var(--depth-of-the-step), 100% var(--depth-of-the-step), 100% 100%, 0 100%);
}
.Printed-note h3 {
  margin-block-end: 0.625rem;
  font-size: 1.25rem;
  font-weight: 500;
  font-variation-settings: "wght" 500;
  line-height: 1.3;
}
.Printed-note a { color: inherit; }

/* The hand-off keeps clear air above it. */
.Onward { margin-block-start: 0; }

/* On a phone the call key stops flying over the page and takes its own place in the flow,
   directly under the path, so no sentence on this spread can ever run beneath it. */
@media (max-width: 47.99em) {
  .Dial {
    position: static;
    inset: auto;
    order: 1;
    display: inline-flex;
    align-self: flex-start;
    inline-size: auto;
    max-inline-size: calc(100% - 2 * var(--space-at-the-page-edge));
    margin: 0.75rem var(--space-at-the-page-edge) 0;
    font-size: 1rem;
  }
  .Dial:hover { translate: none; }
}

@media (min-width: 56em) {
  .Intro .Spread-side { grid-column: 9 / span 4; }

  .Statement > p:nth-of-type(n) { margin-inline: 0; }
  .Statement-head > .Heading { grid-column: 1 / span 6; }
  .Statement-lead { grid-column: 8 / span 5; align-self: end; }
  .Statement > p:nth-of-type(1) { grid-column: 1 / span 6; }
  .Statement > p:nth-of-type(2) { grid-column: 4 / -1; }
  .Statement > p:nth-of-type(3) { grid-column: 8 / -1; }
  .Statement > p:nth-of-type(4) { grid-column: 4 / span 7; }
  .Statement > p:nth-of-type(5) { grid-column: 2 / span 6; }
  .Statement > p:nth-of-type(6) { grid-column: 1 / span 7; }
  .Statement > p:nth-of-type(7) { grid-column: 1 / span 7; }
  .Statement-photo { grid-column: 8 / -1; grid-row: 6 / span 3; align-self: start; }

  .Printed-words { grid-column: 1 / span 7; }
  .Printed-note { grid-column: 9 / span 4; }
}
