/**
 * Kanoa Fleet Accordion
 *
 * Breakpoints: phone < 768px, tablet 768-1199px, desktop >= 1200px.
 * Selectors are prefixed with .kfa so the theme kit's button, link and
 * heading styles don't leak in.
 */

.kfa {
	--kfa-sand: #ead6bf;
	--kfa-closed: #3b3b3b;
	--kfa-body: #3f3f3f;
	--kfa-gallery: #4d4d4d;
	--kfa-gold: #d9c49a;
	--kfa-gold-edge: #e7d0ba;
	--kfa-ink: #111;
	--kfa-light: #fff;
	--kfa-font: "CallunaSans", Georgia, serif;
	--kfa-speed: 0.4s;

	font-family: var(--kfa-font);
	font-weight: 400;
	color: var(--kfa-light);
	text-align: left;
	overflow-anchor: none;
}

.kfa * {
	box-sizing: border-box;
	overflow-anchor: none;
}

.kfa img {
	display: block;
	max-width: 100%;
}

.kfa img[hidden] {
	display: none;
}

.kfa-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Item and header
   ===================================================================== */

.kfa-item {
	margin: 0 0 20px;
	border-radius: 2px;
	background: var(--kfa-closed);
	overflow: hidden;
}

.kfa-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 15px 10px 15px 16px;
	color: var(--kfa-light);
	transition: background-color var(--kfa-speed) ease, color var(--kfa-speed) ease;
}

.kfa-item.is-open .kfa-header {
	background: var(--kfa-sand);
	color: #000;
}

.kfa-strip {
	display: flex;
	flex: none;
	align-items: center;
}

.kfa-strip-frame {
	width: 160px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #2b2b2b;
}

.kfa .kfa-strip-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.kfa .kfa-heading {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.kfa .kfa-toggle,
.kfa .kfa-toggle:hover,
.kfa .kfa-toggle:focus,
.kfa .kfa-toggle:active {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"title icon"
		"subtitle icon";
	align-items: center;
	column-gap: 12px;
	width: 100%;
	min-height: 60px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	text-align: left;
	white-space: normal;
	cursor: pointer;
}

.kfa-title {
	grid-area: title;
	font-size: 28px;
	line-height: 34px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.kfa-subtitle {
	grid-area: subtitle;
	margin-top: 2px;
	font-size: 15px;
	line-height: 23px;
	letter-spacing: 0.02em;
}

.kfa-icon {
	grid-area: icon;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
}

.kfa-icon .kfa-svg {
	width: 28px;
	height: 28px;
}

.kfa-icon-bar--v {
	transform-origin: center;
	transform-box: fill-box;
	transition: transform var(--kfa-speed) ease;
}

.kfa-item.is-open .kfa-icon-bar--v {
	transform: scaleY(0);
}

/* Buttons: arrows and thumbnails
   ===================================================================== */

.kfa .kfa-arrow,
.kfa .kfa-arrow:hover,
.kfa .kfa-arrow:focus,
.kfa .kfa-arrow:active {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
}

.kfa .kfa-arrow:hover {
	background: rgba(0, 0, 0, 0.12);
}

.kfa-arrow .kfa-svg {
	width: 22px;
	height: 22px;
}

.kfa .kfa-arrow--stage,
.kfa .kfa-arrow--stage:hover,
.kfa .kfa-arrow--stage:focus,
.kfa .kfa-arrow--stage:active {
	position: absolute;
	top: 50%;
	display: none;
	background: rgba(0, 0, 0, 0.55);
	color: var(--kfa-light);
	transform: translateY(-50%);
}

.kfa .kfa-arrow--stage[data-kfa-step="-1"] {
	left: 8px;
}

.kfa .kfa-arrow--stage[data-kfa-step="1"] {
	right: 8px;
}

.kfa .kfa-thumb,
.kfa .kfa-thumb:hover,
.kfa .kfa-thumb:focus,
.kfa .kfa-thumb:active {
	display: block;
	width: 88px;
	height: 66px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: 3px;
	background: #2b2b2b;
	box-shadow: none;
	cursor: pointer;
}

.kfa .kfa-thumb[aria-pressed="true"] {
	border-color: var(--kfa-light);
}

.kfa .kfa-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.kfa .kfa-toggle:focus-visible,
.kfa .kfa-arrow:focus-visible,
.kfa .kfa-thumb:focus-visible,
.kfa .kfa-button:focus-visible {
	outline: 3px solid var(--kfa-gold);
	outline-offset: 3px;
}

.kfa-item.is-open .kfa-header .kfa-toggle:focus-visible,
.kfa-item.is-open .kfa-header .kfa-arrow:focus-visible {
	outline-color: #000;
}

/* Panel
   ===================================================================== */

.kfa-panel {
	display: grid;
	grid-template-rows: 0fr;
	background: var(--kfa-body);
	transition: grid-template-rows var(--kfa-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
}

.kfa-item.is-open .kfa-panel {
	grid-template-rows: 1fr;
}

.kfa-panel-clip {
	min-height: 0;
	overflow: hidden;
}

/* Closed panels drop out of layout once the close animation ends (the
   display transition is discrete), so their photos never start lazy-loading.
   Browsers without discrete transitions just close without the animation. */
.kfa-item:not(.is-open) .kfa-body {
	display: none;
}

.kfa-body {
	transition: display var(--kfa-speed) allow-discrete;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
	grid-template-areas: "details gallery";
}

.kfa-details {
	grid-area: details;
	padding: 40px 10px 40px 40px;
}

.kfa-gallery {
	grid-area: gallery;
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	grid-template-areas: "thumbs stage";
	gap: 15px;
	align-self: start;
	margin: 40px 40px 40px 5px;
	padding: 20px;
	border-radius: 12px;
	background: var(--kfa-gallery);
}

/* Fixed proportions, so the box never changes size between photos. Each
   photo is fitted whole inside it (contain), centred on the box background. */
.kfa-stage {
	grid-area: stage;
	position: relative;
	align-self: start;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 7px;
	background: #2b2b2b;
}

.kfa .kfa-stage-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.kfa-gallery--single {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "stage";
}

.kfa-thumbs {
	grid-area: thumbs;
	display: flex;
	flex-direction: column;
	gap: 11px;
}

.kfa-blurb {
	margin: 0 0 28px;
	font-size: 17px;
	line-height: 26px;
}

.kfa-section {
	margin: 0 0 24px;
}

.kfa .kfa-label {
	margin: 0 0 14px;
	padding: 0;
	font-family: var(--kfa-font);
	font-size: 20px;
	line-height: 24px;
	font-weight: 500;
	letter-spacing: normal;
	text-transform: uppercase;
	color: var(--kfa-light);
}

.kfa .kfa-label::after {
	content: ":";
}

.kfa .kfa-list {
	margin: 0;
	padding: 0 0 0 20px;
	list-style: disc;
}

/* Column-first order: the first half of the items runs down the left. */
.kfa .kfa-list--columns {
	columns: 2;
	column-gap: 24px;
}

.kfa .kfa-list li {
	break-inside: avoid;
	margin: 0;
	padding: 0 0 5px;
	font-size: 15px;
	line-height: 23px;
	overflow-wrap: anywhere;
}

.kfa .kfa-list li::marker {
	color: var(--kfa-sand);
}

.kfa .kfa-text p {
	margin: 0 0 0.9em;
	font-size: 15px;
	line-height: 23px;
}

.kfa .kfa-text p:last-child {
	margin-bottom: 0;
}

.kfa .kfa-text a {
	color: var(--kfa-sand);
	text-decoration: underline;
}

.kfa-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 32px;
}

.kfa .kfa-button,
.kfa .kfa-button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 14px 28px;
	border: 1px solid var(--kfa-light);
	border-radius: 1px;
	font-family: var(--kfa-font);
	font-size: 15px;
	line-height: 1.2;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.kfa .kfa-button--solid,
.kfa .kfa-button--solid:visited {
	border-color: var(--kfa-gold-edge);
	background: var(--kfa-gold);
	color: var(--kfa-ink);
}

.kfa .kfa-button--outline,
.kfa .kfa-button--outline:visited {
	background: transparent;
	color: var(--kfa-light);
}

/* Hover, focus and press: both buttons turn to gold text and border on the
   panel background (about 6:1 contrast). */
.kfa .kfa-button--solid:hover,
.kfa .kfa-button--solid:focus,
.kfa .kfa-button--solid:active,
.kfa .kfa-button--outline:hover,
.kfa .kfa-button--outline:focus,
.kfa .kfa-button--outline:active {
	border-color: var(--kfa-gold);
	background: transparent;
	color: var(--kfa-gold);
}

/* Tablet: gallery above the details, thumbnails in a row
   ===================================================================== */

@media (max-width: 1199px) {

	.kfa-body {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"gallery"
			"details";
	}

	.kfa-gallery {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"stage"
			"thumbs";
		gap: 12px;
		width: calc(100% - 48px);
		max-width: 560px;
		margin: 24px 24px 0;
		padding: 16px;
	}

	.kfa-stage {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}

	.kfa-thumbs {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 88px);
		gap: 10px;
	}

	.kfa .kfa-thumb,
	.kfa .kfa-thumb:hover,
	.kfa .kfa-thumb:focus,
	.kfa .kfa-thumb:active {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
	}

	.kfa-details {
		padding: 28px 24px 32px;
	}

	.kfa-title {
		font-size: 24px;
		line-height: 30px;
	}
}

/* Phone: compact header, arrows on the photo
   ===================================================================== */

@media (max-width: 767px) {

	.kfa-header {
		gap: 10px;
		padding: 10px 4px 10px 10px;
	}

	.kfa .kfa-arrow--strip {
		display: none;
	}

	.kfa-strip-frame {
		width: 84px;
	}

	.kfa .kfa-toggle,
	.kfa .kfa-toggle:hover,
	.kfa .kfa-toggle:focus,
	.kfa .kfa-toggle:active {
		column-gap: 8px;
		min-height: 48px;
	}

	.kfa-title {
		font-size: 16px;
		line-height: 21px;
		font-weight: 500;
		letter-spacing: 0.03em;
	}

	.kfa-subtitle {
		font-size: 13px;
		line-height: 18px;
	}

	.kfa-icon {
		width: 44px;
		height: 44px;
	}

	/* A ring keeps the bare minus from reading as an underscore after the title. */
	.kfa-icon .kfa-svg {
		width: 30px;
		height: 30px;
		padding: 5px;
		border: 1.5px solid currentColor;
		border-radius: 50%;
	}

	.kfa-gallery {
		width: calc(100% - 32px);
		margin: 16px 16px 0;
		padding: 12px;
		border-radius: 10px;
	}

	.kfa-stage {
		aspect-ratio: 4 / 3;
	}

	.kfa .kfa-arrow--stage,
	.kfa .kfa-arrow--stage:hover,
	.kfa .kfa-arrow--stage:focus,
	.kfa .kfa-arrow--stage:active {
		display: flex;
	}

	.kfa-thumbs {
		grid-auto-columns: minmax(0, 1fr);
		gap: 8px;
	}

	.kfa .kfa-thumb,
	.kfa .kfa-thumb:hover,
	.kfa .kfa-thumb:focus,
	.kfa .kfa-thumb:active {
		min-height: 44px;
	}

	.kfa-details {
		padding: 20px 16px 24px;
	}

	.kfa-blurb {
		margin-bottom: 20px;
		font-size: 16px;
		line-height: 24px;
	}

	.kfa .kfa-label {
		margin-bottom: 8px;
		font-size: 17px;
		line-height: 22px;
	}

	.kfa .kfa-list--columns {
		columns: 1;
	}

	.kfa-actions {
		margin-top: 20px;
	}

	.kfa .kfa-button {
		flex: 1 1 140px;
		padding: 12px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.kfa-header,
	.kfa-panel,
	.kfa-body,
	.kfa-icon-bar--v,
	.kfa .kfa-button {
		transition: none;
	}
}
