/* ==========================================================================
   real-method.css — /be-real-method only.
   Feature layer. Colour and type come from tokens.css; .wrap .stack .rule
   .eyebrow .lede .figure .btn .panel and the .pg-* furniture come from dea.css
   and pages.css. Nothing here hard-codes a colour.
   ========================================================================== */

/* ---------------------------------------------------------------- stages */
/* Positioned because the rail below is absolutely positioned against it. */
.rm-stages {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Ruled rather than boxed. Four cards would read as four products to choose
   between; four rules read as one list you go down, which is what the arc is. */
.rm-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: clamp(var(--space-6), 6vw, var(--space-8));
  border-top: 1px solid var(--color-haze);
}
.rm-stage:last-child { border-bottom: 1px solid var(--color-haze); }

/* Positioned so it paints over the rail: both are positioned, and the mark
   comes later in the document, so its opaque ground masks the line. That is
   what makes the letters read as nodes ON the rail rather than beside it. */
.rm-stage__mark {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
}

/* Decorative — the markup hides it from assistive tech, so nothing here has a
   contrast case to answer and the letter is free to sit back. It is still the
   display face, and it never resolves below 4rem, so the 20px Didone floor is
   not in play either. */
.rm-stage__letter {
  font-family: var(--font-display);
  font-weight: var(--weight-display-black);
  font-size: clamp(4rem, 15vw, 7rem);
  line-height: .78;
  letter-spacing: var(--tracking-display);
  color: color-mix(in srgb, var(--color-bolt) 28%, var(--color-sand));
}

.rm-stage__index {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: var(--weight-mono-medium);
  letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase;
  color: var(--color-sun-ink);
}

.rm-stage__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* .lede's own measure is set for a hero standing alone; inside a stage it sits
   above a two-column list and wants to be the narrower of the two. */
.rm-stage__meaning { max-width: 42ch; }

/* The paragraph under each phase's question. */
.rm-stage__text {
  margin: 0;
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
}

@media (min-width: 52rem) {
  .rm-stage {
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: clamp(var(--space-5), 4vw, var(--space-7));
  }
  .rm-stage__mark {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    /* The page ground, repeated, because this is what hides the rail behind the
       letter. If the section ever gets a background of its own, this has to
       change with it. */
    background: var(--color-sand);
    padding-block: var(--space-2) var(--space-3);
  }

  /* The rail. It is the whole reason four stages read as one arc instead of
     four sections, and it only exists at this width — below it the mark column
     is gone and a vertical line would just be a stripe down the left margin. */
  .rm-stages::before {
    content: "";
    position: absolute;
    left: 2.4rem;
    top: 3.5rem;
    bottom: 3.5rem;
    width: 1px;
    background: linear-gradient(var(--color-haze), var(--color-sun) 20%,
                                var(--color-sun) 80%, var(--color-haze));
  }
}

/* ---------------------------------------------------------------- closing */
.rm-close { border-top: 1px solid var(--color-haze); }

/* The four words are the page's last beat, so they are set as one heading and
   not as four. Display face, so the floor is the 2rem end of the clamp. */
.rm-close__line {
  font-size: clamp(2rem, 6vw, var(--scale-step-5));
  line-height: 1.06;
  max-width: 22ch;
  margin-inline: auto;
}
/* .section--deep paints every heading in deep-ink at 0,1,1; this needs 0,2,0 to
   beat it. Sun on the deep plum measures 6.15:1, which is why the accent here
   is the sun and not the bolt (2.7:1 on that ground). */
.section--deep .rm-close__welcome {
  display: block;
  letter-spacing: .04em;
  color: var(--color-sun);
}

.rm-close__sub {
  max-width: 52ch;
  margin-inline: auto;
  color: var(--color-deep-ink);
}
.rm-close__go { margin: 0; }

/* dea.css paints every link inside a deep surface in the sun at 0,1,1, which
   beats .btn--primary's own 0,1,0 and repainted this button's label sun-on-
   crimson: measured 2.05:1, against the 4.5 it needs. Scoped to this page
   rather than to .section--deep, because the same collision on another page is
   that page's to measure and fix. Sand on crimson is the button's designed
   pairing and measures 4.94:1 at its 15.2px label. */
.rm-close .btn--primary { color: var(--color-sand); }
/* The stock hover swaps the ground to ink, which on the deep plum is very
   nearly the ground itself — the button appears to vanish under the cursor.
   The sun is the accent this section already uses, and deep on sun is 6.15:1. */
.rm-close .btn--primary:hover,
.rm-close .btn--primary:focus-visible {
  background: var(--color-sun);
  color: var(--color-deep);
}

/* The seam dea.css already documents for .film: .footer carries a 72px
   margin-top, which between two surfaces of the identical plum reads as a
   full-bleed cream stripe rather than as spacing. Same fix, same shape, for the
   one other page that now ends on a dark section. */
main:has(> .rm-close:last-child) + .footer { margin-top: 0; }
