/* ==========================================================================
   Ritual — the 30-day protocol page.
   Sits on the default dark ground. Page hero / timeline / tips are transparent
   bands; phases is the dark band; cta-band is the oxblood accent band. Section
   padding (`.section`), typography and ink all come from the shared token
   classes — this file carries only the per-section layout, the hairline rules
   that structure each band, and the two serif accent marks.
   ========================================================================== */

/* Page hero (shared section, extended with an alignment control) ------------- */
.pagehero--center {
  text-align: center;
}

.pagehero--center .title-xl,
.pagehero--center .prose {
  margin-inline: auto;
}

/* Timeline — eyebrow + heading + four timed steps divided by hairline rules --- */
.timeline__head {
  margin-block: var(--sp-3) var(--sp-7);
}

.timeline__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.timeline__row > li {
  padding: var(--sp-5) var(--sp-5) 0;
  border-left: 1px solid var(--rule);
}

.timeline__row > li:first-child {
  padding-left: 0;
  border-left: 0;
}

.timeline__t {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--accent-text);
  margin-bottom: var(--sp-3);
}

.timeline__row .title-sm {
  margin-bottom: var(--sp-2);
}

/* Phases — dark band, three alternating media + copy rows, rule between each -- */
.phases__head {
  margin-block: var(--sp-3) var(--sp-8);
}

.phases__stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.phase {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--sp-7);
  align-items: center;
  padding-top: var(--sp-7);
  border-top: 1px solid var(--band-dark-rule);
}

.phase:first-child {
  padding-top: 0;
  border-top: 0;
}

.phase__media {
  margin: 0;
}

.phase__media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.phase__numeral {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1;
  color: var(--gold-line);
  margin-bottom: var(--sp-3);
}

.phase__copy .label {
  margin-bottom: 0;
}

.phase__copy .title-lg {
  margin-block: var(--sp-2) var(--sp-4);
}

.phase:nth-child(2n) .phase__media {
  order: 2;
}

/* Tips — eyebrow + heading + four text cells, each capped by a hairline rule -- */
.tips__head {
  margin-block: var(--sp-3) var(--sp-7);
}

.tips__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}

.tips__grid .title-sm {
  margin-bottom: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}

/* CTA band — oxblood accent, copy left + ghost button right ------------------ */
.cta-band__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.cta-band__in .title-lg {
  margin-top: var(--sp-3);
}

.cta-band__btn {
  color: var(--band-accent-ink);
  border-color: color-mix(in srgb, var(--band-accent-ink) 45%, transparent);
}

.cta-band__btn:hover {
  border-color: var(--band-accent-ink);
  background: color-mix(in srgb, var(--band-accent-ink) 10%, transparent);
}

/* Responsive — stack the grids and re-hang the rules at tablet / mobile ------- */
@media (max-width: 860px) {
  .timeline__row,
  .tips__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline__row > li {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .timeline__row > li:first-child {
    border-top: 0;
  }

  .phase,
  .phase:nth-child(2n) .phase__media {
    grid-template-columns: minmax(0, 1fr);
    order: 0;
  }
}
