/*
Typewriter effect: https://css-tricks.com/snippets/css/typewriter-effect/
*/

.swiper-button-prev,
.swiper-button-next {
	top: unset;
	bottom: 20px;
}

.index-main {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex: 1;
}

.index-main-content {
	display: flex;
	flex-direction: column;
	padding: 1em;
}

.index-main-content__before-waves {
	gap: 1em;
}

.swiper-container.index-slideshow {
	width: 95vw;
	max-width: 800px;
}

.index-slideshow img {
	width: 100%;
	max-height: 60vh;
}

.index-slideshow figcaption {
	text-align: center;
	font-size: 0.8em;
	font-style: italic;
	padding-bottom: 1em;
}

.index-main-content__after-waves {
	background-color: rgb(58, 57, 58);
	color: white;
	align-items: center;
	width: 100%;
	padding-bottom: 1em;
	flex: 1;
	overflow: hidden;
}

.index-typewriter-text-container {
	display: flex;
	font-size: 1rem;
	margin-left: auto;
	margin-right: auto;
	max-width: 600px;
}

.index-get-started-container {
	display: flex;
	margin-top: 0.5rem;
	margin-left: auto;
	margin-right: auto;
}

.index-get-started-link {
	color: white;
	background-color: rgb(88, 87, 88);
	border: 1px solid rgb(88, 87, 88);
	border-radius: 5px;
	padding: 0.75rem 3rem;
	font-variant-caps: small-caps;
	font-size: 1.1rem;
	transition: color 250ms ease, background-color 250ms ease;
}

.index-get-started-link:hover {
	color: rgb(88, 87, 88);
	background-color: transparent;
}

/*
 * Only apply typewriter effect on widescreen devices
 * (gets clipped on smaller screens)
 */
@media (min-width: 700px) {
	@keyframes index-typing {
		from { width: 0}
		to { width: 100% }
	}

	@keyframes index-typing-caret {
		from, to { border-color: transparent }
		50% { border-color: black; }
	}

	.index-typewriter-text {
		overflow: hidden;
		white-space: nowrap;
		border-right: .15em solid black;
		animation: index-typing 2s steps(40, end) 0.5s, index-typing-caret .75s step-end infinite;
		animation-fill-mode: forwards;
		width: 0;
	}

	@keyframes index-program-img-reveal {
		from { opacity: 0 }
		to { opacity: 1 }
	}

	.index-slideshow {
		opacity: 0;
		animation: index-program-img-reveal 2s ease 3s;
		animation-fill-mode: forwards;
	}

	@keyframes index-get-started-reveal {
		from {
			transform: scaleY(0);
			visibility: hidden;
		}

		to {
			transform: scaleY(1);
			visibility: visible;
		}
	}

	.index-get-started-container {
		transform-origin: bottom;
		transform: scaleY(0);
		visibility: hidden;
		animation: index-get-started-reveal 300ms ease-in 4.5s;
		animation-fill-mode: forwards;
	}
}

.index-text-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 600px;
	align-items: center;
}

@keyframes visible-reveal {
	from {
		transform: translateY(50px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.index-feature-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 1rem;
}

/* 800px so two columns */
@media (min-width: 800px) {
	.index-feature-container {
		display: grid;
		max-width: 1200px;
		grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
		grid-auto-rows: 1fr;
	}

	/* Apply animations */
	.index-feature-container {
		opacity: 0;
	}

	.index-feature-container.visible {
		animation: visible-reveal 750ms ease-in;
		animation-fill-mode: forwards;
	}
}

.index-feature {
	display: flex;
	height: 100%;
	gap: 3ch;
	background-color: white;
	color: rgb(58, 57, 58);
	padding: 1em 3ch;
	border-radius: 5px;
	line-height: 1.5;
}

.index-feature:last-of-type {
	margin-bottom: 1em;
}

.index-feature-img {
	display: flex;
	align-items: center;
	font-size: 1.5rem;
}

.index-feature-main {
	display: flex;
	flex-direction: column;
	border-left: 1px solid gainsboro;
	padding-left: 1em;
}

.index-feature-title {
	font-weight: bold;
}

.index-feature-description {
	font-size: 0.9em;
	flex: 1;
}

.index-feature-aside {
	margin-top: 1em;
	font-size: 0.7em;
	font-style: italic;
	text-align: right;
}

.index-main-showcase {
	width: 100%;
	margin-left: auto;
	margin-right: auto;
	margin-top: 2rem;
	margin-bottom: 3rem;
}

.index-main-showcase > p {
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	font-size: smaller;
	padding: 16px;
	background-color: white;
	margin-bottom: 1em;
	border-radius: 16px;
	border: 1px solid rgb(122 121 122 / 50%);
}

.index-showcase-heading-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	text-align: center;
	padding-bottom: 0.5rem;
	margin-bottom: 0.5rem;
	position: relative;
}

.index-showcase-heading-container h2 {
	margin-bottom: 0;
}

.index-showcase-heading-container::after {
	content: "";
	position: absolute;
	left: 5%;
	right: 5%;
	bottom: 0;
	height: 1px;
	background: linear-gradient(to right, transparent, rgb(88, 87, 88), transparent);
}

.index-showcase-slideshow-container {
	background-color: white;
	padding: 2rem;
	border-radius: 5px;
	user-select: none;
	box-shadow: 2px 2px 5px 2px rgb(58, 57, 58, 40%);
}

.index-showcase-item {
	margin-left: 5%;
	margin-right: 5%;
	display: flex;
	flex-direction: column;
	gap: 3ch;
	max-width: 1000px;
	margin-left: auto;
	margin-right: auto;
	padding: 0 0.5rem;
	padding-bottom: calc(var(--swiper-navigation-size) + 30px);
}

.index-showcase-item-overview {
	flex: 1;
}

.index-showcase-youtube {
	width: 560px;
	height: 315px;
	max-width: none;
	width: 100%;
	align-self: center;
}

@supports (aspect-ratio: 4 / 3) {
	.index-showcase-youtube {
		height: unset;
		max-height: 60vh;
		aspect-ratio: 4 / 3;
	}
}

@media (min-width: 800px) {
	.index-main-showcase {
		width: 90%;
	}

	.index-showcase-item {
		flex-direction: row;
	}

	.index-showcase-youtube {
		max-width: 70%;
	}
}

.index-showcase-item-key {
	color: rgb(58, 57, 58);
}

.index-showcase-item-value {
	align-self: center;
}

.index-showcase-item-title {
	text-align: center;
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
	margin-top: 0;
}

.index-showcase-item-author {
	font-size: 0.8rem;
	text-align: center;
	margin-bottom: 1.5rem;
}

.index-showcase-item-details {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75em 2ch;
	font-size: 0.85rem;
}

.index-showcase-item-key {
	font-weight: bold;
}

.why-make-this-container {
	display: flex;
	width: calc(90% - 2rem);
	margin-left: auto;
	margin-right: auto;
	background-color: white;
	margin-bottom: 2rem;
	box-shadow: 2px 2px 5px 2px rgba(58, 57, 58, 40%);
}

.why-make-this-heading {
	min-width: 25%;
	min-height: 150px;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-color: rgb(58, 57, 58);
	color: white;

	transition: transform 500ms ease-in;
	transform: translateX(-100%);
}

.why-make-this-container.visible .why-make-this-heading {
	transform: translateX(0);
}

.why-make-this-heading h2 {
	margin-top: 1rem;
	margin-bottom: 1rem;
}

@keyframes text-indent-1 { to { text-indent: -4ch; } }
@keyframes text-indent-2 { to { text-indent: 0; }}
@keyframes text-indent-3 { to { text-indent: 4ch; }}


.why-make-this-heading h2 span {
	display: block;
}

.why-make-this-container.visible .why-make-this-heading h2 span:nth-child(1) {
	animation: text-indent-1 250ms ease 750ms;
	animation-fill-mode: forwards;
}

.why-make-this-container.visible .why-make-this-heading h2 span:nth-child(2) {
	animation: text-indent-2 250ms ease 1000ms;
}

.why-make-this-container.visible .why-make-this-heading h2 span:nth-child(3) {
	animation: text-indent-3 250ms ease 1250ms;
	animation-fill-mode: forwards;
}

.why-make-this-content {
	padding: 2rem;
	width: 100%;
	line-height: 1.75;
	font-size: 0.9rem;
	columns: 450px;
}

.why-make-this-content > * {
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: 1rem;
}

.ff-text {
	display: flex;
	justify-content: flex-end;
}

#ff {
	--f1-draw-time: 2s;
	--f2-draw-time: 2s;
	--studio-draw-time: 500ms;
	--delay: 2s;
}

#f1, #f2 {
	--strokes: 0;
	visibility: hidden;
	stroke: rgb(58, 57, 58) !important;
}

#ff.visible #f1 {
	stroke-dasharray: var(--strokes);
	stroke-dashoffset: var(--strokes);
	animation: dash var(--f1-draw-time) linear forwards;
	animation-delay: var(--delay);
	visibility: visible;
}

#ff.visible #f2 {
	stroke-dasharray: var(--strokes);
	stroke-dashoffset: var(--strokes);
	animation: dash var(--f2-draw-time) linear forwards;
	animation-delay: calc(var(--delay) + var(--f1-draw-time));
	visibility: visible;
}

#studio {
	transform: translateX(100%);
	visibility: hidden;
}

#ff.visible #studio {
	animation: studio-anim var(--studio-draw-time) linear forwards;
	animation-delay: calc(var(--delay) + var(--f1-draw-time) + var(--f2-draw-time));
}

@keyframes dash {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes studio-anim {
	from {
		transform: translateX(100%);
		visibility: hidden;
	}

	to {
		transform: translateX(0);
		visibility: visible;
	}
}

@media (max-width: 800px) {
	.why-make-this-container {
		flex-direction: column;
		width: calc(100% - 2rem);
	}

	.why-make-this-heading {
		transform: unset;
	}

	.why-make-this-heading h2 span {
		display: unset;
	}

	.why-make-this-heading h2 span:nth-child(1) {
		text-indent: unset;
	}

	.why-make-this-heading h2 span:nth-child(2) {
		text-indent: unset;
	}

	.why-make-this-heading h2 span:nth-child(3) {
		text-indent: unset;
	}
}