/**
 * Portfolio page.
 *
 * Uses the theme's existing design tokens throughout, so the layout from the
 * reference design lands in DAStek's palette and typography rather than
 * introducing a second visual language.
 */

.dk-portfolio {
	--dk-pf-radius: 10px;
	--dk-pf-card-bg: var(--dk-white);
	--dk-pf-border: #e6eae8;
	--dk-pf-surface: #f7f9f8;

	background: var(--dk-pf-surface);
}

/*
 * When a section is dropped into Elementor or a shortcode it sits inside
 * someone else's layout, so it must not paint its own page background or
 * re-apply the container padding.
 */
.dk-portfolio--embedded {
	background: transparent;
}

/*
 * The section keeps its own .dk-container, so an Elementor section holding one
 * of these widgets should be full width with no padding of its own.
 */
.dk-portfolio--embedded .dk-pf-customers,
.dk-portfolio--embedded .dk-pf-collab {
	background: transparent;
}

/* -------------------------------------------------------------------------
 * Hero
 * ---------------------------------------------------------------------- */

.dk-pf-hero {
	padding-block: calc(var(--dk-header-height) + 3rem) 3.5rem;
	background: linear-gradient(135deg, #0d2620 0%, var(--dk-ink) 55%, #06201b 100%);
	color: var(--dk-white);
}

.dk-pf-hero__inner {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: 1fr;
	align-items: center;
}

@media (min-width: 1024px) {
	.dk-pf-hero__inner {
		grid-template-columns: 1.05fr 1fr;
		gap: 3.5rem;
	}
}

.dk-pf-hero__eyebrow {
	margin-bottom: 0.75rem;
	color: var(--dk-primary);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.dk-pf-hero__title {
	margin-bottom: 1rem;
	color: var(--dk-white);
	font-size: clamp(2.25rem, 5vw, 3.5rem);
	line-height: 1.1;
}

.dk-pf-hero__accent {
	display: block;
	color: var(--dk-primary);
}

.dk-pf-hero__text {
	max-width: 34rem;
	margin-bottom: 2rem;
	color: rgba(255, 255, 255, 0.82);
	font-size: 16px;
}

.dk-pf-hero__actions {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	gap: 1rem;
}

.dk-pf-hero__btn {
	border-radius: 6px;
}

.dk-pf-hero__btn--ghost {
	background: transparent;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
	color: var(--dk-white);
}

.dk-pf-hero__btn--ghost:hover,
.dk-pf-hero__btn--ghost:focus {
	background: rgba(255, 255, 255, 0.1);
	color: var(--dk-white);
}

.dk-pf-hero__aside {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
	align-items: center;
}

@media (min-width: 600px) {
	.dk-pf-hero__aside {
		grid-template-columns: auto 1fr;
	}
}

.dk-pf-hero__stats {
	display: grid;
	margin: 0;
	padding: 0;
	gap: 1.25rem 2rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
}

@media (min-width: 600px) {
	.dk-pf-hero__stats {
		grid-template-columns: 1fr;
	}
}

.dk-pf-stat {
	display: flex;
	flex-direction: column;
}

.dk-pf-stat__value {
	color: var(--dk-white);
	font-family: var(--dk-font-heading);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
}

.dk-pf-stat__label {
	color: rgba(255, 255, 255, 0.72);
	font-size: 13px;
}

.dk-pf-hero__image {
	width: 100%;
	height: auto;
	border-radius: var(--dk-pf-radius);
}

/* -------------------------------------------------------------------------
 * Filter bar
 * ---------------------------------------------------------------------- */

.dk-pf-filter {
	padding-block: 1.75rem;
}

.dk-pf-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.dk-pf-filter__btn {
	padding: 0.65rem 1.15rem;
	border: 1px solid var(--dk-pf-border);
	border-radius: 6px;
	background: var(--dk-white);
	color: var(--dk-ink);
	font-family: var(--dk-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	transition: background-color var(--dk-transition), color var(--dk-transition), border-color var(--dk-transition);
}

.dk-pf-filter__btn:hover,
.dk-pf-filter__btn:focus-visible {
	border-color: var(--dk-primary);
	background: var(--dk-white);
	color: var(--dk-primary-dark);
}

.dk-pf-filter__btn.is-active {
	border-color: var(--dk-primary);
	background: var(--dk-primary);
	color: var(--dk-ink);
}

/* -------------------------------------------------------------------------
 * Category sections
 * ---------------------------------------------------------------------- */

.dk-pf-section {
	margin-bottom: 1.75rem;
	padding: 1.75rem;
	background: var(--dk-white);
	border: 1px solid var(--dk-pf-border);
	border-radius: var(--dk-pf-radius);
}

.dk-pf-section[hidden] {
	display: none;
}

.dk-pf-section__head {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
}

/*
 * A head with only an icon and a title must not spread across the row —
 * space-between pushed the two to opposite edges.
 */
.dk-pf-section__head--start {
	justify-content: flex-start;
	gap: 0.75rem;
}

.dk-pf-section__title {
	margin-bottom: 0.15rem;
	font-size: 22px;
}

.dk-pf-section__desc {
	margin-bottom: 0;
	color: var(--dk-muted);
	font-size: 14px;
}

.dk-pf-section__more {
	color: var(--dk-primary-dark);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.dk-pf-section__more::after {
	content: " \2192";
}

.dk-pf-section__icon {
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: rgba(48, 199, 181, 0.14);
	color: var(--dk-primary-dark);
}

.dk-pf-section__icon svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* -------------------------------------------------------------------------
 * Project cards
 * ---------------------------------------------------------------------- */

.dk-pf-grid {
	display: grid;
	margin: 0;
	padding: 0;
	gap: 1.25rem;
	grid-template-columns: 1fr;
	list-style: none;
}

@media (min-width: 640px) {
	.dk-pf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.dk-pf-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	/* Three cards look better wider than a quarter each. */
	.dk-pf-grid:has(> :last-child:nth-child(3)) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.dk-pf-card {
	display: flex;
	flex-direction: column;
	background: var(--dk-pf-card-bg);
	border: 1px solid var(--dk-pf-border);
	border-radius: var(--dk-pf-radius);
	overflow: hidden;
	transition: box-shadow var(--dk-transition), transform var(--dk-transition), border-color var(--dk-transition);
}

.dk-pf-card:hover,
.dk-pf-card:focus-within {
	border-color: var(--dk-primary);
	box-shadow: 0 8px 22px rgba(20, 38, 28, 0.1);
	transform: translateY(-2px);
}

.dk-pf-card > article {
	display: flex;
	height: 100%;
	flex-direction: column;
}

.dk-pf-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--dk-ink);
	overflow: hidden;
}

/*
 * Anchored to the top rather than the centre. These are product screenshots,
 * so the logo and header sit at the top — centring cropped them off entirely
 * on tall images such as the mobile app captures.
 */
.dk-pf-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.dk-pf-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #14261c, #1f3a2e);
}

.dk-pf-card__badge {
	position: absolute;
	top: 0.6rem;
	left: 0.6rem;
	padding: 0.2rem 0.6rem;
	border-radius: 4px;
	background: var(--dk-primary);
	color: var(--dk-ink);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.dk-pf-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1rem 1.1rem 1.1rem;
}

.dk-pf-card__title {
	margin-bottom: 0.2rem;
	font-size: 17px;
	line-height: 1.3;
}

.dk-pf-card__tagline {
	margin-bottom: 0.5rem;
	color: var(--dk-primary-dark);
	font-size: 13px;
	font-weight: 600;
}

.dk-pf-card__text {
	margin-bottom: 0.85rem;
	color: var(--dk-body);
	font-size: 13px;
	line-height: 1.55;
}

.dk-pf-card__techs {
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 1rem;
	padding: 0;
	gap: 0.35rem;
	list-style: none;
}

/*
 * Chips are styled as small buttons — white, bordered, with room for a logo —
 * rather than flat grey text, matching the technology buttons in the design.
 */
.dk-pf-chip {
	display: inline-flex;
	padding: 0.3rem 0.6rem;
	align-items: center;
	gap: 0.35rem;
	border: 1px solid var(--dk-pf-border);
	border-radius: 6px;
	background: var(--dk-white);
	color: var(--dk-ink);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(20, 38, 28, 0.05);
	transition: border-color var(--dk-transition), box-shadow var(--dk-transition);
}

.dk-pf-card:hover .dk-pf-chip {
	border-color: rgba(48, 199, 181, 0.5);
}

.dk-pf-chip__icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	object-fit: contain;
}

.dk-pf-card__links {
	display: flex;
	flex-wrap: wrap;
	margin: auto 0 0;
	padding-top: 0.85rem;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	border-top: 1px solid var(--dk-pf-border);
}

.dk-pf-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--dk-ink);
	font-size: 13px;
	font-weight: 600;
}

.dk-pf-card__link:hover,
.dk-pf-card__link:focus-visible {
	color: var(--dk-primary-dark);
}

.dk-pf-card__link--case {
	color: var(--dk-primary-dark);
}

/* Placeholder shown until the project's URL is filled in. */
.dk-pf-card__link--pending {
	color: var(--dk-muted);
	cursor: default;
	opacity: 0.65;
}

.dk-pf-card__link-icon svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

/* -------------------------------------------------------------------------
 * Technologies
 * ---------------------------------------------------------------------- */

.dk-pf-tech {
	margin-bottom: 1.75rem;
	padding: 1.75rem;
	background: var(--dk-white);
	border: 1px solid var(--dk-pf-border);
	border-radius: var(--dk-pf-radius);
}

/*
 * Left-aligned so every row starts on the same edge. Centring left the last
 * row floating in the middle, which read as broken indentation.
 */
.dk-pf-tech__grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	gap: 0.75rem;
	justify-content: flex-start;
	list-style: none;
}

/* Same button treatment as the card chips, one size up. */
.dk-pf-tech__item {
	display: inline-flex;
	padding: 0.55rem 1rem;
	align-items: center;
	gap: 0.5rem;
	border: 1px solid var(--dk-pf-border);
	border-radius: 6px;
	background: var(--dk-white);
	color: var(--dk-ink);
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(20, 38, 28, 0.05);
	transition: border-color var(--dk-transition), box-shadow var(--dk-transition);
}

.dk-pf-tech__item:hover {
	border-color: var(--dk-primary);
	box-shadow: 0 2px 8px rgba(20, 38, 28, 0.08);
}

.dk-pf-tech__icon {
	width: 20px;
	height: 20px;
	object-fit: contain;
}

/* -------------------------------------------------------------------------
 * Body content + closing CTA
 * ---------------------------------------------------------------------- */

.dk-pf-body {
	padding-block: 1rem 2rem;
}

.dk-pf-empty {
	padding-block: 3rem;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Our Customers
 * ---------------------------------------------------------------------- */

.dk-pf-customers {
	padding-block: 3.5rem;
	background: var(--dk-white);
}

.dk-pf-customers__head {
	max-width: 52rem;
	margin: 0 auto 2.5rem;
	text-align: center;
}

.dk-pf-customers__eyebrow {
	margin-bottom: 0.25rem;
	color: var(--dk-primary);
	font-family: var(--dk-font-heading);
	font-size: 20px;
	font-weight: 700;
}

.dk-pf-customers__title {
	margin-bottom: 0.75rem;
	font-size: var(--dk-h2);
}

.dk-pf-customers__text {
	margin-bottom: 0;
	color: var(--dk-body);
}

/* Carousel shell: arrows sit either side of the scrolling viewport. */
.dk-pf-carousel {
	position: relative;
}

.dk-pf-carousel__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.dk-pf-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.dk-pf-carousel__viewport:focus-visible {
	outline: var(--dk-focus);
	outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.dk-pf-carousel__viewport {
		scroll-behavior: auto;
	}
}

.dk-pf-logos {
	display: flex;
	margin: 0;
	padding: 0;
	gap: 1.5rem;
	align-items: stretch;
	list-style: none;
}

.dk-pf-logos__item {
	display: flex;
	min-height: 88px;
	flex: 0 0 calc(50% - 0.75rem);
	padding: 0.75rem;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--dk-pf-border);
	border-radius: var(--dk-pf-radius);
	background: var(--dk-white);
	scroll-snap-align: start;
}

@media (min-width: 600px) {
	.dk-pf-logos__item {
		flex-basis: calc(33.333% - 1rem);
	}
}

@media (min-width: 900px) {
	.dk-pf-logos__item {
		flex-basis: calc(20% - 1.2rem);
	}
}

/* Arrows */
.dk-pf-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	width: 40px;
	height: 40px;
	padding: 0;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
	border: 1px solid var(--dk-pf-border);
	border-radius: 50%;
	background: var(--dk-white);
	color: var(--dk-ink);
	box-shadow: 0 2px 10px rgba(20, 38, 28, 0.12);
	cursor: pointer;
	transition: background-color var(--dk-transition), color var(--dk-transition);
}

.dk-pf-carousel__nav:hover,
.dk-pf-carousel__nav:focus-visible {
	background: var(--dk-primary);
	color: var(--dk-ink);
}

.dk-pf-carousel__nav[hidden] {
	display: none;
}

.dk-pf-carousel__nav svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.dk-pf-carousel__nav--prev {
	left: -14px;
}

.dk-pf-carousel__nav--next {
	right: -14px;
}

/* Dots */
.dk-pf-carousel__dots {
	display: flex;
	margin-top: 1.5rem;
	justify-content: center;
	gap: 0.5rem;
}

.dk-pf-carousel__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(48, 199, 181, 0.35);
	cursor: pointer;
	transition: background-color var(--dk-transition), transform var(--dk-transition);
}

.dk-pf-carousel__dot.is-active {
	background: var(--dk-primary);
	transform: scale(1.25);
}

.dk-pf-carousel__dot:focus-visible {
	outline: var(--dk-focus);
	outline-offset: 3px;
}

.dk-pf-logos__image {
	width: auto;
	max-width: 100%;
	max-height: 56px;
	height: auto;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.75;
	transition: filter var(--dk-transition), opacity var(--dk-transition);
}

.dk-pf-logos__item:hover .dk-pf-logos__image {
	filter: none;
	opacity: 1;
}

/* -------------------------------------------------------------------------
 * Let's collaborate
 * ---------------------------------------------------------------------- */

.dk-pf-collab {
	padding-block: 3rem 4rem;
	background: var(--dk-pf-surface);
}

.dk-pf-collab__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 2.5rem;
}

.dk-pf-collab__body {
	flex: 1 1 22rem;
}

.dk-pf-collab__heading {
	margin-bottom: 0.4rem;
	font-size: var(--dk-h3);
}

.dk-pf-collab__text {
	max-width: 42rem;
	margin-bottom: 0;
	color: var(--dk-body);
}

.dk-pf-collab__button {
	flex-shrink: 0;
	border-radius: 4px;
}
