/**
 * Homepage 06: Process ("The First 12 Months").
 * Desktop: design C timeline. Phone: stage stepper (assets/js/home/06-process.js).
 * Desktop and phone share class names, so layout rules sit in their own media query.
 */

.gs-home .gh-06 .s06c-head { display: flex; flex-direction: column; align-items: flex-start; }
.gs-home .gh-06 .s06c-title { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 26px; color: var(--text-high-em); }

/* ---------- Desktop (1024px and up) ---------- */

@media (min-width: 1024px) {
	.gs-home .gh-06 {
		/* how far the dashed "keeps going" line runs past the container (96px at 1440, less when the side margin is smaller) */
		--s06-out: clamp(0px, calc((100vw - min(1200px, 100vw - 2 * var(--gh-gutter))) / 2 - 24px), 96px);
		box-sizing: border-box;
		min-height: 880px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 160px 0;
		background: var(--surface-foreground);
	}

	.gs-home .gh-06 .s06c-head { max-width: 620px; }
	.gs-home .gh-06 .s06c-h2 { margin-top: 18px; }
	.gs-home .gh-06 h2.disp { font-size: 44px; line-height: 1.15; }
	.gs-home .gh-06 p.s06c-intro { margin-top: 16px; max-width: 560px; font-size: 18px; line-height: 28px; text-wrap: pretty; }

	.gs-home .gh-06 .s06c-track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
	.gs-home .gh-06 .s06c-track::before { content: ""; position: absolute; left: 0; right: calc((100% - 60px) / 4); top: 14px; height: 1px; background: var(--outline-high-em); }
	.gs-home .gh-06 .s06c-stage { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
	.gs-home .gh-06 .s06c-tag { position: relative; z-index: 1; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--outline-high-em); border-radius: var(--radius-6); background: var(--surface-foreground); font-size: 13px; font-weight: 600; line-height: 18px; letter-spacing: .02em; color: var(--text-med-em); white-space: nowrap; }
	.gs-home .gh-06 .s06c-card { flex: 1; width: 100%; margin-top: 20px; padding: 24px; background: var(--card-bg); border: 1px solid var(--outline-med-em); border-radius: var(--radius-12); }
	.gs-home .gh-06 .s06c-card p { margin-top: 10px; text-wrap: pretty; }
	.gs-home .gh-06 .s06c-pay .s06c-tag { border-color: var(--outline-brand-high-em); color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-pay .s06c-card { border-color: var(--outline-brand-high-em); transform: translateY(-8px); }
	.gs-home .gh-06 .s06c-run { position: absolute; top: 14px; left: 0; right: calc(-1 * var(--s06-out)); height: 0; border-top: 1px dashed var(--brand-tan); }
	.gs-home .gh-06 .s06c-arrow { position: absolute; top: 8px; right: calc(-1 * var(--s06-out) - 10px); width: 14px; height: 14px; color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-commit { padding-right: 320px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--outline-med-em); font-size: 16px; line-height: 24px; color: var(--text-med-em); }
}

@media (min-width: 1024px) and (max-width: 1279px) {
	.gs-home .gh-06 .s06c-commit { padding-right: 160px; }
}

/* ---------- Phone (below 1024px): stage stepper ---------- */

@media (max-width: 1023px) {
	.gs-home .gh-06 { width: 100%; background: var(--surface-foreground); padding: 112px 0; }
	.gs-home .gh-06 .w.s06c-wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 24px; }
	.gs-home .gh-06 .s06c-h2 { font-size: 32px; line-height: 1.15; margin-top: 18px; }
	.gs-home .gh-06 .s06c-intro.lead { margin-top: 16px; font-size: 16px; line-height: 26px; text-wrap: pretty; }

	.gs-home .gh-06 .s06c-strip { position: relative; margin: 36px -24px 0; padding: 4px 24px 6px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; transition: -webkit-mask-position .2s ease; }
	.gs-home .gh-06 .s06c-strip::-webkit-scrollbar { display: none; }
	.gs-home .gh-06 .s06c-strip.s06c-fe { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent); }
	.gs-home .gh-06 .s06c-strip.s06c-fs { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px); mask-image: linear-gradient(to right, transparent, #000 48px); }
	.gs-home .gh-06 .s06c-strip.s06c-fs.s06c-fe { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 64px), transparent); }
	.gs-home .gh-06 .s06c-track { display: flex; width: max-content; padding-right: 8px; }
	.gs-home .gh-06 .s06c-step { position: relative; flex: none; padding-right: 24px; }
	.gs-home .gh-06 .s06c-step:last-child { padding-right: 30px; }
	.gs-home .gh-06 .s06c-seg { position: absolute; left: 14px; width: 100%; top: 13px; height: 2px; background: var(--outline-high-em); border-radius: 2px; overflow: hidden; }
	.gs-home .gh-06 .s06c-seg::after { content: ""; position: absolute; inset: 0; background: var(--brand-tan); transform: scaleX(0); transform-origin: left center; transition: transform .26s ease; }
	.gs-home .gh-06 .s06c-done .s06c-seg::after { transform: scaleX(1); }
	.gs-home .gh-06 .s06c-run { position: absolute; top: 13px; left: 14px; right: 16px; height: 0; border-top: 2px dashed var(--brand-tan); }
	.gs-home .gh-06 .s06c-arrow { position: absolute; top: 7px; right: 4px; width: 14px; height: 14px; color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-btn { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 44px; margin: 0; padding: 6px 0 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
	.gs-home .gh-06 .s06c-btn:focus-visible { outline: none; }
	.gs-home .gh-06 .s06c-btn:focus-visible .s06c-tag { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
	.gs-home .gh-06 .s06c-node { display: block; width: 16px; height: 16px; margin-left: 6px; border: 2px solid var(--outline-high-em); border-radius: 50%; background: var(--surface-foreground); transition: background-color .26s ease, border-color .26s ease, box-shadow .26s ease; }
	.gs-home .gh-06 .s06c-done .s06c-node,
	.gs-home .gh-06 .s06c-on .s06c-node { border-color: var(--brand-tan); background: var(--brand-tan); }
	.gs-home .gh-06 .s06c-on .s06c-node { box-shadow: 0 0 0 4px var(--surface-foreground), 0 0 0 5px var(--brand-tan); }
	.gs-home .gh-06 .s06c-tag { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--outline-high-em); border-radius: var(--radius-6); background: var(--surface-foreground); font-size: 14px; font-weight: 600; line-height: 18px; letter-spacing: .02em; color: var(--text-med-em); white-space: nowrap; transition: border-color .26s ease, color .26s ease, background-color .26s ease; }
	.gs-home .gh-06 .s06c-on .s06c-tag { border-color: var(--text-high-em); background: var(--card-bg); color: var(--text-high-em); }
	.gs-home .gh-06 .s06c-pay .s06c-node { border-color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-pay .s06c-tag { border-color: var(--outline-brand-high-em); color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-pay.s06c-on .s06c-tag { background: var(--card-bg); }

	/* cards: a readable list without JS; stacked with one shown under html.gh-js */
	.gs-home .gh-06 .s06c-cards { display: grid; gap: 12px; margin-top: 20px; }
	.gs-home .gh-06 .s06c-card { padding: 22px 22px 24px; background: var(--card-bg); border: 1px solid var(--outline-med-em); border-radius: var(--radius-12); }
	html.gh-js .gs-home .gh-06 .s06c-cards { gap: 0; }
	html.gh-js .gs-home .gh-06 .s06c-card { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .24s ease, transform .26s ease, visibility 0s linear .26s; }
	html.gh-js .gs-home .gh-06 .s06c-card.s06c-show { opacity: 1; visibility: visible; transform: none; transition: opacity .24s ease, transform .26s ease, visibility 0s; }
	.gs-home .gh-06 .s06c-card.s06c-pay { border-color: var(--outline-brand-high-em); }
	.gs-home .gh-06 .s06c-when { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-med-em); }
	.gs-home .gh-06 .s06c-card.s06c-pay .s06c-when { color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-card p.sm { margin-top: 10px; font-size: 14px; line-height: 22px; text-wrap: pretty; }

	.gs-home .gh-06 .s06c-nav { display: none; align-items: center; justify-content: space-between; margin-top: 14px; }
	html.gh-js .gs-home .gh-06 .s06c-nav { display: flex; }
	.gs-home .gh-06 .s06c-count { font-size: 14px; font-weight: 600; line-height: 20px; color: var(--text-med-em); font-variant-numeric: tabular-nums; }
	.gs-home .gh-06 .s06c-count b { color: var(--text-high-em); }
	.gs-home .gh-06 .s06c-arrows { display: flex; gap: 10px; }
	.gs-home .gh-06 .s06c-nb { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--outline-high-em); border-radius: 50%; background: transparent; color: var(--brand-tan); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .2s ease, opacity .2s ease; }
	.gs-home .gh-06 .s06c-nb:hover,
	.gs-home .gh-06 .s06c-nb:focus { background: transparent; color: var(--brand-tan); }
	.gs-home .gh-06 .s06c-nb:focus-visible { border-radius: 50%; }
	.gs-home .gh-06 .s06c-nb svg { width: 18px; height: 18px; }
	.gs-home .gh-06 .s06c-nb[aria-disabled="true"] { opacity: .35; cursor: default; }

	/* the commitment note as a 12px footnote */
	.gs-home .gh-06 .s06c-commit { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--outline-med-em); font-size: 12px; line-height: 19px; color: var(--text-med-em); text-wrap: pretty; }
}

@media (prefers-reduced-motion: reduce) {
	.gs-home .gh-06 .s06c-strip { scroll-behavior: auto; }
}
