/**
 * Timeline: decades that open like an accordion, each with a vertical line of milestones.
 * Mobile first. Colors come from the design tokens (see tokens.css) with fallbacks, so the
 * block also works if it is placed on a regular page.
 */

.f80-tl {
	--tl-gold: var(--f80-gold, #f2c14e);
	--tl-hairline: var(--f80-hairline, rgb(243 242 242 / 14%));
	--tl-line: var(--f80-line, rgb(243 242 242 / 42%));
	--tl-muted: var(--f80-ink-muted, rgb(243 242 242 / 62%));
	--tl-year-w: 0rem;
	--tl-spine: 0.6875rem;

	border-top: 2px solid var(--tl-hairline);
}

/* ───────── Decade header ───────── */
.f80-decade {
	border-bottom: 2px solid var(--tl-hairline);
}

.f80-decade__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 2.25rem;
	gap: 0.25rem 1rem;
	align-items: center;
	padding: 1.25rem 0;
	cursor: pointer;
	list-style: none;
}

.f80-decade__head::-webkit-details-marker {
	display: none;
}

.f80-decade__head:focus-visible {
	outline: 3px solid var(--tl-gold);
	outline-offset: 2px;
}

.f80-decade__name {
	grid-column: 1;
	font-size: clamp(2.25rem, 1.4rem + 4.5vw, 4.75rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
}

.f80-decade__intro {
	grid-column: 1;
	max-width: 56ch;
	color: var(--tl-muted);
	font-size: 1rem;
	line-height: 1.4;
}

.f80-decade__count {
	grid-column: 1;
	color: var(--tl-muted);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.f80-decade__head:hover .f80-decade__name,
.f80-decade[open] .f80-decade__name {
	color: var(--tl-gold);
}

/* Plus that turns into a minus. */
.f80-decade__icon {
	position: relative;
	grid-column: 2;
	grid-row: 1 / span 3;
	align-self: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 2px solid var(--tl-line);
	border-radius: 50%;
}

.f80-decade__icon::before,
.f80-decade__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0.875rem;
	height: 2px;
	background: currentcolor;
	transform: translate(-50%, -50%);
}

.f80-decade__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.f80-decade[open] .f80-decade__icon {
	border-color: var(--tl-gold);
	color: var(--tl-gold);
}

.f80-decade[open] .f80-decade__icon::after {
	transform: translate(-50%, -50%) rotate(0deg);
}

@media (prefers-reduced-motion: no-preference) {

	.f80-decade__icon::after {
		transition: transform 0.2s ease;
	}

	.f80-decade__name {
		transition: color 0.2s ease;
	}
}

/* ───────── Milestones ───────── */
.f80-tl__list {
	position: relative;
	margin: 0;
	padding: 0.5rem 0 3rem;
	list-style: none;
}

/* The line that runs down the decade. */
.f80-tl__list::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 2.5rem;
	left: calc(var(--tl-year-w) + var(--tl-spine));
	width: 2px;
	background: var(--tl-line);
}

.f80-hito {
	display: grid;
	grid-template-columns: 1.5rem minmax(0, 1fr);
	grid-template-areas:
		"dot year"
		"dot card";
	gap: 0.25rem 1rem;
	padding: 0 0 2rem;
}

.f80-hito:last-child {
	padding-bottom: 0;
}

/* The dot on the line. */
.f80-hito::before {
	content: "";
	grid-area: dot;
	z-index: 1;
	box-sizing: border-box;
	justify-self: center;
	width: 0.875rem;
	height: 0.875rem;
	margin-top: 0.375rem;
	border: 3px solid var(--f80-night, #0a0908);
	border-radius: 50%;
	background: var(--tl-gold);
	box-shadow: 0 0 0 2px var(--tl-gold);
}

.f80-hito__year {
	grid-area: year;
	margin: 0;
	color: var(--tl-gold);
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

.f80-hito__card {
	grid-area: card;
	display: grid;
	gap: 1rem;
	padding: 1.25rem;
	border: 2px solid var(--tl-hairline);
	background: rgb(255 255 255 / 4%);
}

.f80-hito__thumb img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

.f80-tl .f80-hito__title {
	margin: 0 0 0.375rem;
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.f80-tl .f80-hito__text {
	max-width: 62ch;
	margin: 0;
}

@media (min-width: 40em) {

	.f80-hito__card.has-thumb {
		grid-template-columns: 11rem minmax(0, 1fr);
		align-items: start;
	}
}

@media (min-width: 60em) {

	.f80-tl {
		--tl-year-w: 9rem;
		--tl-spine: 1.9375rem;
	}

	.f80-decade__head {
		grid-template-columns: minmax(10rem, 22rem) minmax(0, 1fr) auto 2.5rem;
		gap: 0 2rem;
		padding: 1.75rem 0;
	}

	.f80-decade__name {
		grid-column: 1;
	}

	.f80-decade__intro {
		grid-column: 2;
	}

	.f80-decade__count {
		grid-column: 3;
		white-space: nowrap;
	}

	.f80-decade__icon {
		grid-column: 4;
		grid-row: 1;
	}

	.f80-hito {
		grid-template-columns: var(--tl-year-w) 1.5rem minmax(0, 1fr);
		grid-template-areas: "year dot card";
		gap: 0 1.25rem;
	}

	.f80-hito__year {
		text-align: right;
		font-size: 1.5rem;
	}

	.f80-hito__to {
		display: block;
		color: var(--tl-muted);
		font-size: 1rem;
	}

	.f80-tl .f80-hito__title {
		font-size: 1.375rem;
	}
}

/* ───────── "Add your milestone" form ───────── */
.f80-hito-form {
	margin: 4rem 0 0;
	padding: 2rem 0 0;
	border-top: 2px solid var(--f80-hairline, rgb(243 242 242 / 14%));
}

.f80-hito-form__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
}

.f80-hito-form__lead {
	max-width: 56ch;
	margin: 0 0 1.5rem;
	color: var(--f80-ink-muted, rgb(243 242 242 / 62%));
}

.f80-hito-form__notice {
	max-width: 56ch;
	margin: 0 0 1.5rem;
	padding: 0.875rem 1rem;
	border: 2px solid var(--f80-gold, #f2c14e);
	font-weight: 700;
}

.f80-hito-form__notice.is-error {
	border-color: var(--f80-red-text, #e0605a);
	color: var(--f80-red-text, #e0605a);
}

.f80-hito-form__form {
	display: grid;
	gap: 1.25rem;
	max-width: 40rem;
}

.f80-hito-form__row {
	display: grid;
	gap: 1.25rem;
}

.f80-hito-form__field {
	display: grid;
	gap: 0.375rem;
}

.f80-hito-form__label {
	color: var(--f80-ink-faint, rgb(243 242 242 / 55%));
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.f80-hito-form input[type="text"],
.f80-hito-form input[type="email"],
.f80-hito-form input[type="file"],
.f80-hito-form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.875rem;
	border: 2px solid var(--f80-line, rgb(243 242 242 / 42%));
	border-radius: 0;
	background: rgb(255 255 255 / 6%);
	color: inherit;
	font: inherit;
}

.f80-hito-form textarea {
	resize: vertical;
}

.f80-hito-form input:focus-visible,
.f80-hito-form textarea:focus-visible {
	outline: 2px solid var(--f80-gold, #f2c14e);
	outline-offset: 2px;
}

.f80-hito-form__hint {
	color: var(--f80-ink-muted, rgb(243 242 242 / 62%));
	font-size: 0.8125rem;
}

.f80-hito-form__check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
	font-size: 0.875rem;
}

.f80-hito-form .f80-hito-form__check input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.125rem 0 0;
	accent-color: var(--f80-gold, #f2c14e);
}

.f80-hito-form__error {
	margin: 0;
	color: var(--f80-red-text, #e0605a);
	font-weight: 700;
}

.f80-hito-form__form .f80-button {
	justify-self: start;
	cursor: pointer;
}

/* Bot trap: out of sight and out of the tab order. */
.f80-hito-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (min-width: 40em) {

	.f80-hito-form__row {
		grid-template-columns: 1fr 1fr;
	}
}
