/* How Frank works: the dark spread, laid out still. The photograph runs
   from about a third of the way across to the right page edge under the
   field's rising top; the heading sits beside it in the open charcoal, its
   long line crossing into the photograph's fade; a standfirst follows under
   both, and the three stages run as columns beneath. The
   charcoal field, the photograph and the type each keep their own extent. */
.method {
  /* Rise of the field's top edge across the page width. */
  --rise: 3.2vw;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 31fr) minmax(0, 69fr);
  grid-template-areas:
    'head photo'
    'intro intro'
    'stages stages';
  column-gap: clamp(2rem, 3vw, 3.5rem);
  padding: 0 0 var(--section-y) var(--gutter);
  color: var(--on-char);
}

.method::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--char);
  clip-path: polygon(0 0, 100% var(--rise), 100% 100%, 0 100%);
}

/* At the image's own 2:1, so nothing is cropped from the scene. Its top
   follows the field's rising edge from where it starts, a third of the way
   across; its left and lower edges fade into the charcoal, short enough on the
   left to stay clear of the faces. */
.method__photo {
  grid-area: photo;
  position: relative;
  z-index: -1;
  aspect-ratio: 2 / 1;
  margin-left: -6vw;
  overflow: hidden;
  clip-path: polygon(0 calc(var(--rise) * 0.33), 100% var(--rise), 100% 100%, 0 100%);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%);
  mask-image: linear-gradient(to right, transparent, #000 18%);
}

.method__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A short settle into the charcoal, kept below the desk so the knight and the
   light on it stay clean. */
.method__photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--char), transparent 12%);
}

/* Set low beside the photograph, where its scene opens into the room. */
.method__head {
  grid-area: head;
  align-self: end;
  padding-bottom: clamp(1rem, 2vw, 2.5rem);
}

.method .eyebrow {
  color: var(--on-char-soft);
}

/* The second line runs past the column and over the photograph's fade. */
.method .section-title {
  width: max-content;
}

/* What he sees, as one standfirst set like the hero's: the serif at lede size
   in the soft ink, on the page's reading measure. How he steps in is the
   second stage's to say. */
.method__intro {
  grid-area: intro;
  max-width: 34em;
  margin-top: clamp(2.5rem, 3.5vw, 4rem);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.1vw, 1.25rem);
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--on-char-soft);
  text-wrap: pretty;
}

.stages {
  grid-area: stages;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 5rem);
  margin-top: clamp(3rem, 4.5vw, 5rem);
  padding-right: var(--gutter);
  list-style: none;
}

.stage {
  padding-top: clamp(1.5rem, 2vw, 2rem);
  border-top: 1px solid var(--on-char-rule);
}

.stage__num {
  display: flex;
  align-items: center;
  gap: 1rem;
  font: 600 0.8125rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  /* The brighter bar red: the page red sinks into charcoal. */
  color: var(--bar-red);
}

.stage__num::after {
  content: '';
  width: 2.75rem;
  height: 1px;
  background: var(--on-char-rule);
}

.stage__title {
  margin-top: 0.85rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 2.05vw, 2.375rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.stage__body {
  max-width: 30em;
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--on-char-soft);
}

/* ── Stacked: the photograph leads, then the heading, then the stages in turn ── */
@media (max-width: 960px) {
  .method {
    display: flex;
    flex-direction: column;
    padding: 0 var(--gutter) var(--section-y);
  }

  .method__photo {
    width: calc(100% + 2 * var(--gutter));
    margin-left: calc(-1 * var(--gutter));
    aspect-ratio: 4 / 3;
    max-height: 70svh;
    clip-path: polygon(0 0, 100% var(--rise), 100% 100%, 0 100%);
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Keeps the two of them, her pointing hand and the knight in a squarer frame. */
  .method__photo img {
    object-position: 55% 50%;
  }

  .method__photo::after {
    background: linear-gradient(to top, var(--char), transparent 40%);
  }

  .method__head {
    margin-top: -2.5rem;
    padding-bottom: 0;
  }

  .method .section-title {
    width: auto;
  }

  .method__intro {
    margin-top: 1.5rem;
    max-width: 30em;
  }

  .stages {
    display: block;
    padding-right: 0;
  }

  /* Each stage its own chapter, its text a step brighter on the charcoal. */
  .stage + .stage {
    margin-top: clamp(2.25rem, 8vw, 3rem);
  }

  .stage__body {
    font-size: 1.125rem;
    line-height: 1.65;
    color: rgba(241, 237, 230, 0.8);
  }
}

/* ── Phones: the photograph framed inside the charcoal, its right edge cut on
   the hero's 13deg seam, then the heading and the stages as one route: red
   numbers down a fine line that draws as each stage arrives (js/reveal.js). ── */
@media (max-width: 767px) {
  .method {
    padding-top: 2.75rem;
  }

  .method__photo {
    width: 100%;
    height: 15rem;
    margin-left: 0;
    aspect-ratio: auto;
    max-height: none;
    /* tan(13deg) of the frame's height. */
    clip-path: polygon(0 0, 100% 0, calc(100% - 3.46rem) 100%, 0 100%);
  }

  .method__photo::after {
    content: none;
  }

  .method__head {
    margin-top: 2rem;
  }

  .stages {
    margin-top: 2.5rem;
  }

  .stage {
    position: relative;
    padding: 0 0 0 3.25rem;
    border-top: 0;
  }

  .stage + .stage {
    margin-top: 1.75rem;
  }

  .stage__num {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 2rem;
    font: 400 1.75rem/1 var(--serif);
    letter-spacing: -0.01em;
    text-align: center;
  }

  .stage__num::after {
    content: none;
  }

  /* The route from this stage's number down to the next one's. */
  .stage:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 2.5rem;
    bottom: -1.25rem;
    left: calc(1rem - 0.5px);
    width: 1px;
    background: rgba(241, 237, 230, 0.28);
    transform-origin: 50% 0;
  }

  .stage__title {
    margin-top: 0;
    font-size: 1.5625rem;
  }

  .stage__body {
    margin-top: 0.6rem;
    font-size: var(--text-body);
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .stage::before {
    transition: transform 0.6s var(--ease) 0.1s;
  }

  .reveal-armed .stage:not(.is-seen)::before {
    transform: scaleY(0);
  }
}
