/* Component "coast" (around-the-coast 10-16): the coast road as a line of stops in drive time, the haciendas ringed in the
   middle; the inland day trips under it on a dashed branch. A vertical rail below 1024 px, a horizontal line from 1024.
   Tokens only; px only (rem = 10 px here). Motion: the rail draws in and the stops follow once (transform/opacity, coast.js). */
:is(#rmh-landing, .rmh-lc) .rmh-l-coast { --coast-bg: var(--l-white, #fff); --coast-time: 92px; --coast-dot-col: 26px; } /* fits "20 min" / "2 h 30" at the phone size */
:is(#rmh-landing, .rmh-lc) .rmh-l-coast.rmh-l__band--cream { --coast-bg: var(--l-cream); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast.rmh-l__band--shell { --coast-bg: var(--l-shell); }

:is(#rmh-landing, .rmh-lc) .rmh-l-coast__map { position: relative; margin-top: clamp(28px, 4vw, 56px); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__dir { display: none; }

/* ---------- Phones and tablets: a vertical rail, north at the top ---------- */
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line,
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line::before,
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list::before {
	content: ""; position: absolute; top: 24px; bottom: 24px; left: calc(var(--coast-time) + var(--coast-dot-col) / 2);
	border-left: 1px solid var(--l-ink-soft); transform-origin: top center;
}
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list::before { border-left-style: dashed; }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop {
	position: relative; display: grid; grid-template-columns: var(--coast-time) var(--coast-dot-col) minmax(0, 1fr);
	align-items: center; column-gap: 0; padding: 11px 0;
}
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__time {
	padding-right: 14px; text-align: right; white-space: nowrap; font-family: var(--l-serif); font-size: 22px; line-height: 1.1;
	font-variant-numeric: tabular-nums; color: var(--l-ink);
}
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__dot {
	justify-self: center; width: 11px; height: 11px; border-radius: 50%; background: var(--l-taupe-deep);
	box-shadow: 0 0 0 4px var(--coast-bg); /* the rail stops short of each dot */
}
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__place { display: grid; gap: 2px; padding-left: 14px; }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__name { font: 600 17px/1.3 var(--l-sans); color: var(--l-ink); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__note { font-size: 15px; line-height: 1.4; color: var(--l-ink-soft); }

/* the airports: quieter, an open dot */
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--air .rmh-l-coast__time,
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--air .rmh-l-coast__name { color: var(--l-ink-soft); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--air .rmh-l-coast__dot { background: var(--coast-bg); border: 1px solid var(--l-ink-soft); }

/* the haciendas: "Here", a ringed ink dot, the name in the serif */
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--home { padding: 18px 0; }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--home .rmh-l-coast__time { color: var(--l-taupe-deep); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--home .rmh-l-coast__dot {
	width: 19px; height: 19px; background: var(--l-ink); box-shadow: 0 0 0 4px var(--coast-bg), 0 0 0 5px var(--l-ink);
}
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--home .rmh-l-coast__name { font: 400 24px/1.15 var(--l-serif); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__stop--home .rmh-l-coast__note {
	font: 600 12px/1.5 var(--l-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--l-taupe-deep);
}

/* ---------- Inland, a day out ---------- */
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland { margin-top: clamp(36px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--l-sand); }
:is(#rmh-landing, .rmh-lc) h3.rmh-l-coast__inland-t:not(#_) {
	margin: 0 0 12px; font-family: var(--l-sans) !important; font-weight: 600; font-size: 12px; line-height: 1.5;
	letter-spacing: .16em; text-transform: uppercase; color: var(--l-taupe-deep);
}

:is(#rmh-landing, .rmh-lc) .rmh-l-coast__foot { margin-top: clamp(28px, 4vw, 48px); max-width: 62ch; font-size: 16px; line-height: 1.6; color: var(--l-ink-soft); }
:is(#rmh-landing, .rmh-lc) .rmh-l-coast__more { margin-top: 14px; }

@media (max-width: 359px) {
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast { --coast-time: 80px; --coast-dot-col: 22px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__time { font-size: 20px; padding-right: 10px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__place { padding-left: 10px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__name { font-size: 16px; }
}

/* ---------- From 1024 px: the coast as a line, north on the left ---------- */
@media (min-width: 1024px) {
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__dir {
		display: flex; justify-content: space-between; margin-bottom: 18px;
		font: 600 12px/1.5 var(--l-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--l-ink-soft);
	}
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__dir span:first-child::before { content: "\2190\00a0\00a0"; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__dir span:last-child::after { content: "\00a0\00a0\2192"; }

	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line { grid-template-columns: repeat(var(--coast-n, 9), minmax(0, 1fr)); }
	/* the rail runs through the dots: from the first column's centre to the last's */
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line::before {
		top: 63px; bottom: auto; left: calc(50% / var(--coast-n, 9)); right: calc(50% / var(--coast-n, 9));
		border-left: 0; border-top: 1px solid var(--l-ink-soft); transform-origin: left center;
	}
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line .rmh-l-coast__stop {
		grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px 30px auto; justify-items: center; align-items: center;
		padding: 0 6px; text-align: center;
	}
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line .rmh-l-coast__time { align-self: end; padding: 0; text-align: center; font-size: clamp(26px, 14px + 1.1vw, 34px); }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line .rmh-l-coast__place { padding: 8px 0 0; justify-items: center; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line .rmh-l-coast__name { font-size: 16px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line .rmh-l-coast__note { font-size: 14px; max-width: 16ch; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__line .rmh-l-coast__stop--home .rmh-l-coast__name { font-size: 22px; }

	/* inland: three day trips side by side, each on its own dashed branch */
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 32px; align-items: start; }
	:is(#rmh-landing, .rmh-lc) h3.rmh-l-coast__inland-t:not(#_) { margin-top: 10px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list::before { display: none; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list .rmh-l-coast__stop {
		grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: baseline; padding: 0;
	}
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list .rmh-l-coast__time { grid-row: 1; grid-column: 1 / -1; padding: 0 0 6px; text-align: left; font-size: 30px; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list .rmh-l-coast__dot { display: none; }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast__inland-list .rmh-l-coast__place { grid-row: 2; grid-column: 1 / -1; padding: 0; }
}

/* ---------- Motion: once, when the line scrolls into view (coast.js adds the classes) ---------- */
@media (prefers-reduced-motion: no-preference) {
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast--draw .rmh-l-coast__line::before { transform: scaleY(0); }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast--draw .rmh-l-coast__line .rmh-l-coast__stop { opacity: 0; transform: translateY(8px); }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast--draw.is-in .rmh-l-coast__line::before { transform: none; transition: transform 1.1s var(--l-ease); }
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast--draw.is-in .rmh-l-coast__line .rmh-l-coast__stop {
		opacity: 1; transform: none; transition: opacity .5s var(--l-ease), transform .5s var(--l-ease); transition-delay: calc(150ms + var(--i, 0) * 80ms);
	}
}
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
	:is(#rmh-landing, .rmh-lc) .rmh-l-coast--draw .rmh-l-coast__line::before { transform: scaleX(0); }
}
