/* /portfolio/ — archive of projects. */

.s5p {
	--s5-green: #055750;
	--s5-green-91: rgba(5, 87, 80, 0.91);
	--s5-yellow: #ffb700;
	--s5-cream: #fbf1ce;
	--s5-light: #f3f7fc;
	--s5-card-h: 300px;
	--s5-card-border: 3px;
	font-family: "Ubuntu", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.s5p *,
.s5p *::before,
.s5p *::after {
	box-sizing: border-box;
}

.s5p-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.s5p-wrap {
	width: 70%;
	margin-inline: auto;
}

/* ---- hero ---- */

.s5p-hero {
	padding: 20px 0 9px;
	background: var(--s5-green-91);
}

.s5p-hero__in {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.s5p-hero__title {
	margin: 0 0 -10px;
	font-family: "Gunterz", "Ubuntu", sans-serif;
	font-size: 1.2vw;
	font-weight: 500;
	line-height: 1.4;
	color: var(--s5-light);
}

.s5p-offer {
	display: flex;
	width: 600px;
	max-width: 100%;
	padding: 10px;
	border-radius: 10px;
	background: var(--s5-cream);
}

.s5p-offer__input,
.s5p-offer__btn {
	width: 50%;
	height: 42px;
	border-radius: 7px;
}

.s5p-offer__input {
	width: calc(50% - 10px);
	margin: 0 10px 0 0;
	padding: 0 12px;
	border: 1px solid #dddedf;
	background: #fff;
	color: var(--s5-green);
	font: 15px/40px -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.s5p-offer__input::placeholder {
	color: var(--s5-green);
	opacity: 1;
}

.s5p-offer__input:focus-visible {
	outline: 2px solid var(--s5-yellow);
	outline-offset: 1px;
}

.s5p-offer__btn {
	padding: 0 18px;
	border: 0;
	background: var(--s5-green);
	color: var(--s5-light);
	font: 400 18px/1.15 "Ubuntu", sans-serif;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s;
}

.s5p-offer__btn:hover,
.s5p-offer__btn:focus-visible {
	background: #043f3a;
}

.s5p-offer__btn:focus-visible {
	outline: 2px solid var(--s5-yellow);
	outline-offset: 1px;
}

/* ---- breadcrumbs ---- */

.s5p-crumbs {
	padding: 10px 0;
	border-top: 3px solid var(--s5-green);
	background: var(--s5-green-91);
	color: var(--s5-light);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.7;
	text-align: center;
}

.s5p-crumbs a {
	color: inherit;
	text-decoration: none;
}

.s5p-crumbs a:hover,
.s5p-crumbs a:focus-visible {
	text-decoration: underline;
}

/* ---- projects ---- */

.s5p-projects {
	width: 98%;
	margin-inline: auto;
	padding: 50px 0;
}

.s5p-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.s5p-tab {
	padding: 5px 30px;
	border-radius: 45px;
	box-shadow: inset 0 0 0 2px var(--s5-yellow);
	color: #1b1811;
	font: 400 21px/35px "Ubuntu", sans-serif;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.s5p-tab:hover {
	background: var(--s5-cream);
	color: #1b1811;
}

.s5p-tab[aria-current="page"] {
	background: var(--s5-yellow);
	color: var(--s5-light);
}

.s5p-tab:focus-visible {
	outline: 2px solid var(--s5-green);
	outline-offset: 2px;
}

.s5p-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 20px;
	list-style: none;
}

.s5p-item {
	margin: 0;
	padding: 0;
}

.s5p-item[hidden] {
	display: none;
}

.s5p-card {
	display: block;
	height: var(--s5-card-h);
	overflow: hidden;
	border: var(--s5-card-border) solid var(--s5-green);
	box-shadow: 3px 3px 0 0 var(--s5-green);
	background: #fff;
}

.s5p-card:focus-visible {
	outline: 3px solid var(--s5-yellow);
	outline-offset: 3px;
}

/* The screenshot scrolls to its bottom edge; taller screenshots take longer. */
.s5p-card__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	transform: translateY(0);
	transition: transform 0.6s ease-out;
}

.s5p-card:hover .s5p-card__img,
.s5p-card:focus-visible .s5p-card__img,
.s5p-card.is-playing .s5p-card__img {
	transform: translateY(min(0px, calc(-100% + var(--s5-card-h) - 2 * var(--s5-card-border))));
	transition: transform clamp(1.2s, calc(var(--r, 2) * 1.4s), 6s) ease-in-out;
}

.s5p [hidden],
.s5p-item.is-collapsed {
	display: none !important;
}

/* ---- caption under a card: name, type, links ---- */

.s5p-cap {
	display: grid;
	gap: 6px;
	margin-top: 12px;
}

.s5p-cap__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
}

.s5p-cap__name {
	color: #1b1811;
	font-size: 17px;
	font-weight: 500;
	overflow-wrap: anywhere;
}

.s5p-chip {
	padding: 2px 10px;
	border-radius: 20px;
	background: var(--s5-cream);
	color: var(--s5-green);
	font-size: 13px;
	line-height: 1.5;
}

.s5p-chip--magazini {
	background: #dcefe9;
}

.s5p-cap__links a {
	color: var(--s5-green);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

.s5p-cap__links a:hover,
.s5p-cap__links a:focus-visible {
	text-decoration: underline;
}

/* ---- "want a site like this?" blocks ---- */

.s5p-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px 32px;
	padding: 26px 30px;
}

.s5p-cta__text {
	flex: 1 1 380px;
}

.s5p-cta__title {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.25;
}

.s5p-cta__lead {
	margin: 0;
	font-size: 17px;
	line-height: 1.55;
}

.s5p-cta__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 22px;
}

.s5p-cta__phone {
	flex-basis: 100%;
	margin: 0;
	font-size: 16px;
}

.s5p-cta__phone a {
	color: inherit;
	font-weight: 500;
}

.s5p-btn {
	display: inline-block;
	padding: 11px 26px;
	border-radius: 7px;
	background: var(--s5-green);
	color: var(--s5-light);
	font-size: 18px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.s5p-btn:hover,
.s5p-btn:focus-visible {
	background: #043f3a;
	color: var(--s5-light);
}

.s5p-arrow {
	color: var(--s5-green);
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
}

.s5p-arrow::after {
	content: " →";
}

.s5p-arrow:hover,
.s5p-arrow:focus-visible {
	text-decoration: underline;
}

/* In the grid: a full-width row, framed like the cards. */
.s5p-cta--grid {
	grid-column: 1 / -1;
	border: var(--s5-card-border) solid var(--s5-green);
	box-shadow: 3px 3px 0 0 var(--s5-green);
	background: var(--s5-cream);
	color: #363636;
}

.s5p-cta--grid .s5p-cta__title {
	color: var(--s5-green);
}

/* After the grid: the yellow band (the footer below it is green). */
.s5p-cta--end {
	margin: 30px 20px 0;
	border-radius: 10px;
	background: var(--s5-yellow);
	color: #1b1811;
}

.s5p-cta--end .s5p-cta__title {
	color: var(--s5-green);
	font-size: 30px;
}

.s5p-cta--end .s5p-arrow {
	color: #043f3a;
}

.s5p-cta--end .s5p-btn:focus-visible,
.s5p-cta--end .s5p-arrow:focus-visible,
.s5p-cta--end .s5p-cta__phone a:focus-visible {
	outline-color: var(--s5-green);
}

.s5p-btn:focus-visible,
.s5p-arrow:focus-visible,
.s5p-cta__phone a:focus-visible,
.s5p-cap__links a:focus-visible {
	outline: 2px solid var(--s5-yellow);
	outline-offset: 2px;
}

/* ---- show more ---- */

.s5p-more {
	margin-top: 10px;
	text-align: center;
}

.s5p-more__btn {
	padding: 10px 32px;
	border: 2px solid var(--s5-green);
	border-radius: 45px;
	background: transparent;
	color: var(--s5-green);
	font: 400 18px/1.4 "Ubuntu", sans-serif;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.s5p-more__btn:hover,
.s5p-more__btn:focus-visible {
	background: var(--s5-green);
	color: var(--s5-light);
}

.s5p-more__btn:focus-visible {
	outline: 2px solid var(--s5-yellow);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.s5p-card__img,
	.s5p-card:hover .s5p-card__img,
	.s5p-card:focus-visible .s5p-card__img {
		transition: none;
	}
}

/* ---- breakpoints (same as the rest of the site) ---- */

@media (max-width: 1600px) {
	.s5p-wrap {
		width: 80%;
	}
}

@media (max-width: 1400px) {
	.s5p-hero__title {
		font-size: 1.7vw;
	}
}

@media (max-width: 1100px) {
	.s5p-wrap {
		width: 85%;
	}
	.s5p-hero__title {
		font-size: 2vw;
	}
	.s5p-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.s5p-wrap {
		width: 95%;
	}
	.s5p-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 800px) {
	.s5p-hero__title {
		font-size: 4vw;
	}
	.s5p-offer {
		flex-direction: column;
	}
	.s5p-offer__input,
	.s5p-offer__btn {
		width: 100%;
	}
	.s5p-offer__input {
		margin: 0 0 10px;
	}
	.s5p-offer__btn {
		height: 39px;
	}
	.s5p-crumbs {
		font-size: 14px;
	}
	.s5p-tabs {
		gap: 8px;
	}
	.s5p-cta {
		padding: 20px 18px;
	}
	.s5p-cta__title,
	.s5p-cta--end .s5p-cta__title {
		font-size: 22px;
	}
	.s5p-cta__text {
		flex-basis: 100%;
	}
	.s5p-cta--end {
		margin: 24px 4px 0;
	}
	.s5p-tab {
		padding: 4px 18px;
		font-size: 17px;
		line-height: 30px;
	}
	.s5p-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
