/* How we work on Home as cards (2026-11-01, Krishna: cards with concise text, nothing missed; was the five hairline
   columns in process.css, which About still uses). The heading sits on the left and stays in view; every fact kept.
   2026-11-02 (Krishna: cards that complement the site colours): the cards deepen with the journey, only from the
   palette: Focus on stone, Build on champagne (like the Services add-ons), Grow on ink (like the footer).
   Same day (Krishna: a little more innovative): the cards stack into a deck as you scroll. Each card sticks a little
   lower than the one before, so the next card slides up over it and leaves its name showing as a strip; the deck
   grows richer (stone, champagne, ink) as the journey goes on. Pure position: sticky, no script, nothing loops.
   Phones and short screens: a plain stack.
   Earlier versions: archive/journey-palette-grid-2026-11-02.css (the two column grid of the same cards),
   archive/journey-water-pools-2026-11-01.css, archive/journey-water-ribbon-2026-11-01.css. */

.journey-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: var(--space-md) clamp(2rem, 6vw, 5rem); align-items: start;
}
.journey-aside { position: sticky; top: 7rem; }   /* below the sticky site header */
.journey-aside .section-head { margin-bottom: 0; }

.journey-cards { display: grid; gap: 1rem; }   /* was until 2026-11-02 (Krishna: too long to scroll): clamp(1rem, 2vw, 1.5rem) */
/* Compact card (2026-11-02, Krishna: too long to scroll): the top row holds the name and phase on the left and the
   italic line on the right; the champagne rule sits above the points, which run in two columns.
   was until 2026-11-02: one column of name, phase, line over a rule, then the points; padding clamp(1.75rem, 3vw, 2.5rem); gap 1rem */
.journey-card {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .875rem 1.5rem; align-items: start;   /* start: the line sits level with the name, inside the strip */
  padding: clamp(1.25rem, 2.2vw, 1.75rem) clamp(1.5rem, 2.6vw, 2.25rem);
  background: var(--bg); color: var(--ink);
  border-radius: var(--radius-card);
}
.journey-card > * { margin: 0; }

/* Name over phase: this is the strip that stays visible when the next card covers the rest */
.journey-top { display: grid; gap: .25rem; }
.journey-top > * { margin: 0; }
.journey-name { font: italic 500 clamp(1.75rem, 2.8vw, 2.375rem)/1.05 var(--display); letter-spacing: var(--tracking-title); }   /* was clamp(2rem, 3.4vw, 2.75rem) */
.journey-when { color: var(--spark-deep); }
.journey-line { justify-self: end; margin-top: .6rem; text-align: right; font: italic 500 var(--text-intro)/1.3 var(--display); color: var(--primary); }
.journey-list {
  grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: .4rem 2.5rem;
  padding-top: .875rem; border-top: 1px solid var(--spark);
  font-size: .9375rem; line-height: 1.5; color: var(--ink);
}

/* The journey deepens: Focus stone, Build champagne, Grow ink */
.card-focus { background: var(--bg); }
.card-build { background: var(--glow); }
.card-build .journey-when, .card-build .journey-line { color: var(--ink); }          /* deep champagne and teal sit too close to the champagne ground */
.card-build .journey-list { border-top-color: var(--spark-deep); }
.card-build .service-features li::before { background: var(--spark-deep); }
.card-grow { background: var(--ink); color: var(--on-dark); }
.card-grow .journey-name { color: var(--on-dark); }
.card-grow .journey-when, .card-grow .journey-line { color: var(--spark); }         /* champagne on ink, like the footer headings */
.card-grow .journey-list { border-top-color: var(--line-dark); color: var(--on-dark-muted); }

/* The deck: on wide, tall screens each card sticks one strip lower than the card before it */
@media (min-width: 55.01rem) and (min-height: 46rem) {
  .journey-cards { --stack-top: 7rem; --stack-step: 5.5rem; gap: 1rem; }   /* 5.5rem: the strip shows the name, the phase and the line whole */   /* was until 2026-11-02 (too long to scroll): --stack-step 5.25rem; gap 2rem; padding-bottom 4rem */
  .journey-card { position: sticky; top: calc(var(--stack-top) + var(--k, 0) * var(--stack-step)); }
  .journey-card:nth-child(2) { --k: 1; }
  .journey-card:nth-child(3) { --k: 2; }
  .journey-card:nth-child(4) { --k: 3; }
  .journey-card:nth-child(5) { --k: 4; }
}

@media (max-width: 55rem) {
  .journey-layout { grid-template-columns: 1fr; }
  .journey-aside { position: static; }
}
@media (max-width: 35rem) {
  .journey-card { grid-template-columns: 1fr; }
  .journey-line { justify-self: start; margin-top: 0; text-align: left; }
  .journey-list { grid-template-columns: 1fr; }
}

/* 2026-11-04 (Krishna: too much scrolling to go through all of How we work; section was 2028 px on a 390 px phone, 1617 px on desktop):
   the five cards now sit side by side in one row that you swipe or scroll sideways, the heading above them.
   On wide screens (about 1280 px and up) all five fit with no sideways scroll; narrower, the next card peeks in at the edge.
   The scroll deck above (sticky cards, 2026-11-02) is switched off by this block, not removed. */
.journey-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
.journey-aside { position: static; }
.journey-aside .section-intro { max-width: var(--measure); }
.journey-cards {
  display: flex; gap: 1rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 1rem;   /* the row runs to the screen edge; the first card still lines up with the page */
  scrollbar-width: thin; scrollbar-color: var(--spark) transparent;
}
.journey-cards:focus-visible { outline-offset: -.25rem; }
.journey-card,
.journey-cards .journey-card { position: static; flex: 1 0 15rem; scroll-snap-align: start; grid-template-columns: minmax(0, 1fr); align-content: start; gap: .75rem; }
.journey-line { justify-self: start; margin-top: 0; text-align: left; }
.journey-list { grid-template-columns: minmax(0, 1fr); gap: .375rem; }
@media (max-width: 55rem) {
  .journey-cards .journey-card { flex-basis: min(82%, 20rem); }   /* the next card peeks in, so it is clear there is more */
}
@media (min-width: 75rem) {   /* all five fit side by side: no sideways scroll on wide screens */
  .journey-cards { overflow-x: visible; }
  .journey-cards .journey-card { flex: 1 1 0; min-width: 0; padding: 1.5rem 1.25rem; }
  .journey-name { font-size: clamp(1.75rem, 2.2vw, 2rem); }
}

/* 2026-11-04 (Krishna: do not make these sliders): no sideways scrolling anywhere. Wide screens (1200 px and up) keep
   all five in one row; below that the cards stack, two columns on tablets, one on phones. The sideways rules above stay as history. */
@media (max-width: 74.99rem) {
  .journey-cards {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem;
    overflow: visible; scroll-snap-type: none; margin-inline: 0; padding: 0;
  }
  .journey-cards .journey-card { flex: none; }
  .journey-cards .journey-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 35rem) {
  .journey-cards { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .journey-cards .journey-card { padding: 1.25rem; gap: .5rem; }
  .journey-list { padding-top: .625rem; font-size: .875rem; gap: .25rem; }
}

/* 2026-11-05 (Krishna: work on the next section; like the sections before it, more concise and less scrolling):
   the points are shorter (index.html, old lists commented out); on phones the phase sits on the same line as the name. */
@media (max-width: 35rem) {
  .journey-top { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
  .journey-cards .journey-card { padding: 1.125rem 1.25rem 1.25rem; }
}

/* 2026-11-05 (Krishna: on phones the cards should arrive the same way as on desktop): where the cards stack, each one
   slides in from the section's side when it is scrolled to (site.js adds .is-card, then .card-in), the same slide and
   timing as desktop, without the Services page's grow. */
.js .reveal-scroll .enter-part.card-in.card-slide-left { animation-name: enter-left; }
.js .reveal-scroll .enter-part.card-in.card-slide-right { animation-name: enter-right; }

/* 2026-11-05 (Krishna: the cards on phones should close over each other like on the desktop site): where the cards
   stack (below 1200 px) they form the deck again: one column, each card sticks a strip lower than the one before, so the
   next card slides up over it and leaves its name and phase showing. Pure position: sticky, no script. */
@media (max-width: 74.99rem) {
  .journey-cards { grid-template-columns: minmax(0, 1fr); --stack-top: 3.5rem; --stack-step: 3.25rem; }
  .journey-cards .journey-card:last-child { grid-column: auto; }
  .journey-cards .journey-card { position: sticky; top: calc(var(--stack-top) + var(--k, 0) * var(--stack-step)); }
  .journey-cards .journey-card:nth-child(2) { --k: 1; }
  .journey-cards .journey-card:nth-child(3) { --k: 2; }
  .journey-cards .journey-card:nth-child(4) { --k: 3; }
  .journey-cards .journey-card:nth-child(5) { --k: 4; }
}
@media (min-width: 35.01rem) and (max-width: 74.99rem) {
  .journey-cards { --stack-top: 4rem; --stack-step: 3.75rem; }
}
/* was until 2026-11-05 (same day: a spacer let the next section slide over the deck):
@media (max-width: 74.99rem) {
  [ room at the end of the deck ]
  .journey-cards::after { content: ""; height: 8rem; }
  .journey-cards { margin-bottom: -8rem; }
}
*/
/* The deck leaves together: each card carries an invisible margin below it (cancelled by the next card's negative top
   margin, so nothing moves), which keeps the earlier cards stuck until the last card scrolls away. Without it the last
   card left first and covered the other strips. Tablets show the phase on the name's line too, so each strip shows both. */
@media (max-width: 74.99rem) {
  .journey-cards .journey-card:nth-child(1) { margin-bottom: calc(4 * var(--stack-step)); }
  .journey-cards .journey-card:nth-child(2) { margin-top: calc(-4 * var(--stack-step)); margin-bottom: calc(3 * var(--stack-step)); }
  .journey-cards .journey-card:nth-child(3) { margin-top: calc(-3 * var(--stack-step)); margin-bottom: calc(2 * var(--stack-step)); }
  .journey-cards .journey-card:nth-child(4) { margin-top: calc(-2 * var(--stack-step)); margin-bottom: var(--stack-step); }
  .journey-cards .journey-card:nth-child(5) { margin-top: calc(-1 * var(--stack-step)); }
  .journey-top { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
}
