/*
 * Perepaik Theme — front page layout.
 */

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

.pp-hero {
	position: relative;
	overflow: hidden;
	padding: 8px 0 0;
}

.pp-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
	grid-template-areas:
		"content art"
		"filters art";
	grid-template-rows: auto 1fr;
	column-gap: 24px;
}

.pp-hero__content {
	grid-area: content;
	padding-top: 22px;
}

.pp-hero__title {
	margin: 0;
	color: var(--pp-ink);
	font-family: var(--pp-font-heading);
	font-size: clamp(34px, 3.2vw, 46px);
	font-weight: 600;
	font-variation-settings: "opsz" 72;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.pp-hero__title-line {
	display: block;
}

.pp-hero__accent {
	color: var(--pp-coral);
	font-style: normal;
}

.pp-hero__intro {
	max-width: 31ch;
	margin: 22px 0 0;
	color: var(--pp-ink-soft);
	font-size: 18px;
	line-height: 1.6;
}

.pp-hero__filters {
	grid-area: filters;
	margin-top: 32px;
}

.pp-hero__art {
	grid-area: art;
	position: relative;
	min-height: 360px;
	pointer-events: none;
}

.pp-hero__rainbow {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: auto;
	overflow: visible;
}

.pp-hero__cloud {
	filter: drop-shadow(0 8px 14px rgba(150, 120, 100, 0.12));
}

.pp-hero__illustration {
	position: absolute;
	right: 2%;
	bottom: -4px;
	width: auto;
	max-width: 52%;
	height: 100%;
	object-fit: contain;
	object-position: bottom right;
}

.pp-hero .pp-ai-card {
	grid-area: art;
	align-self: center;
	justify-self: start;
	z-index: 2;
	width: 272px;
	margin: 40px 0 0 12%;
}

/* ---------------------------------------------------------
   Content grid below the hero
   --------------------------------------------------------- */

.pp-front__grid {
	display: grid;
	grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
	align-items: start;
	gap: 20px;
	margin-top: 8px;
}

.pp-front__main,
.pp-front__aside {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.pp-front__content:empty {
	display: none;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 1080px) and (min-width: 768px) {
	.pp-hero .pp-ai-card {
		margin-left: 4%;
	}

	.pp-hero .pp-quick-filter {
		min-width: 0;
		padding: 0 16px;
	}

	.pp-front__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 767px) {
	/* Room above the illustration so the child's head clears the header. */
	.pp-hero {
		padding-top: 28px;
	}

	.pp-hero__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
		grid-template-areas:
			"content art"
			"ai ai"
			"filters filters";
		grid-template-rows: auto;
		column-gap: 0;
	}

	.pp-hero__content {
		position: relative;
		z-index: 1;
		padding-top: 18px;
		padding-bottom: 28px;
	}

	.pp-hero__title {
		font-size: clamp(25px, 7.4vw, 31px);
		line-height: 1.16;
	}

	.pp-hero__title-line {
		margin-top: 2px;
	}

	.pp-hero__intro {
		display: none;
	}

	.pp-hero__art {
		min-height: 0;
		margin-right: calc(-1 * var(--pp-gutter));
	}

	.pp-hero__rainbow {
		left: -12%;
		width: 125%;
		bottom: 10px;
	}

	.pp-hero__illustration {
		right: 6%;
		bottom: 4px;
		max-width: 92%;
		height: 112%;
	}

	.pp-hero .pp-ai-card {
		grid-area: ai;
		justify-self: stretch;
		width: auto;
		margin: 0;
	}

	.pp-hero__filters {
		margin-top: 14px;
	}

	.pp-front__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		margin-top: 26px;
	}
}

/* ---------------------------------------------------------
   "Lisa oma ettevõte" + newsletter cards
   --------------------------------------------------------- */

.pp-promo {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 24px;
	margin-top: 56px;
}

.pp-promo__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	padding: 40px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 32px;
}

.pp-promo__card--business {
	background: linear-gradient(135deg, #e7f5e5 0%, #e5f4e8 55%, #d9f0ee 100%);
}

.pp-promo__card--newsletter {
	justify-content: center;
	background: linear-gradient(135deg, #fdeee0 0%, #fdeadf 60%, #fde2dc 100%);
}

.pp-promo__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 28px;
	background: #fff;
	border-radius: 50%;
	color: #1f6b47;
}

.pp-promo__card--newsletter .pp-promo__icon {
	color: #9a4513;
}

.pp-promo__icon .pp-icon {
	width: 28px;
	height: 28px;
}

.pp-promo__title {
	margin: 0;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: clamp(26px, 2.5vw, 36px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.pp-promo__text {
	max-width: 46ch;
	margin: 14px 0 0;
	color: var(--pp-ink-soft);
	font-size: 17px;
	line-height: 1.7;
}

.pp-promo__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin-top: 26px;
	padding: 0 30px;
	background: #6f55a8;
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-family: var(--pp-font-body);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 140ms ease;
}

.pp-promo__button:hover,
.pp-promo__button:focus-visible {
	background: #5d4592;
	color: #fff;
}

.pp-promo__form {
	display: flex;
	gap: 12px;
	width: 100%;
	margin-top: 32px;
}

.pp-promo__form .pp-promo__button {
	flex: none;
	min-height: 54px;
	margin-top: 0;
}

.pp-promo__input {
	flex: 1;
	min-width: 0;
	min-height: 54px;
	padding: 0 22px;
	background: #fffaf6;
	border: 1px solid #f6dcc9;
	border-radius: 999px;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: 16px;
	box-shadow: 0 2px 6px rgba(154, 69, 19, 0.05);
}

.pp-promo__input::placeholder {
	color: var(--pp-muted);
}

.pp-promo__input:focus {
	border-color: #6f55a8;
	outline: 3px solid rgba(111, 85, 168, 0.25);
	outline-offset: 0;
}

.pp-promo__status {
	margin: 20px 0 0;
	padding: 12px 18px;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 16px;
	color: var(--pp-ink);
	font-weight: 600;
}

.pp-promo__status--viga {
	color: #a33a22;
}

.pp-promo__admin {
	margin: 22px 0 0;
	padding: 10px 14px;
	background: rgba(255, 255, 255, 0.7);
	border: 1px dashed #b9a7e0;
	border-radius: 12px;
	color: var(--pp-ink-soft);
	font-size: 14px;
}

.pp-promo__admin a {
	color: #6f55a8;
	font-weight: 600;
}

/* ---------------------------------------------------------
   Statistics row
   --------------------------------------------------------- */

.pp-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin: 48px 0 64px;
	padding: 36px 40px;
	list-style: none;
	background: var(--pp-surface);
	border: 1px solid var(--pp-line);
	border-radius: 32px;
}

.pp-stats__item {
	display: flex;
	align-items: center;
	gap: 20px;
	min-width: 0;
}

.pp-stats__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
}

.pp-stats__icon .pp-icon {
	width: 26px;
	height: 26px;
}

.pp-stats__icon--yellow {
	background: #fdf3d8;
	color: #9a6b0c;
}

.pp-stats__icon--green {
	background: #e2f4e7;
	color: #1f6b47;
}

.pp-stats__icon--purple {
	background: #efe9fb;
	color: #6f55a8;
}

.pp-stats__icon--blue {
	background: #e1f0fb;
	color: #2a6fa8;
}

.pp-stats__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pp-stats__value {
	color: var(--pp-ink);
	font-size: clamp(26px, 2.5vw, 36px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

a.pp-stats__value:hover {
	color: #6f55a8;
}

.pp-stats__label {
	margin-top: 4px;
	color: var(--pp-ink-soft);
	font-size: 16px;
}

@media (max-width: 1080px) {
	.pp-promo__card {
		padding: 32px;
	}

	.pp-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 28px;
	}
}

@media (max-width: 767px) {
	.pp-promo {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		margin-top: 36px;
	}

	.pp-promo__card {
		padding: 26px 22px;
		border-radius: 26px;
	}

	.pp-promo__icon {
		width: 52px;
		height: 52px;
		margin-bottom: 18px;
	}

	.pp-promo__text {
		font-size: 16px;
		line-height: 1.6;
	}

	.pp-promo__form {
		flex-direction: column;
		margin-top: 22px;
	}

	.pp-promo__form .pp-promo__button,
	.pp-promo__input {
		min-height: 50px;
	}

	/* One column: icon, then number and label, like on desktop. */
	.pp-stats {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
		margin: 28px 0 40px;
		padding: 24px 22px;
		border-radius: 26px;
	}

	.pp-stats__item {
		gap: 16px;
	}

	.pp-stats__icon {
		width: 46px;
		height: 46px;
	}

	.pp-stats__icon .pp-icon {
		width: 22px;
		height: 22px;
	}

	.pp-stats__value {
		font-size: 24px;
	}

	.pp-stats__label {
		font-size: 14px;
	}
}

/* ---------------------------------------------------------
   Contact block (last block on the front page)
   --------------------------------------------------------- */

.pp-contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	align-items: center;
	gap: 56px;
	padding: 56px;
	background: linear-gradient(135deg, #f1ecfb 0%, #f4edf8 55%, #fbeef0 100%);
	border-radius: 36px;
	scroll-margin-top: calc(var(--pp-header-height) + 16px);
}

.pp-contact__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin-bottom: 26px;
	background: #fff;
	border-radius: 50%;
	color: #6f55a8;
}

.pp-contact__icon .pp-icon {
	width: 28px;
	height: 28px;
}

.pp-contact__title {
	margin: 0;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: clamp(28px, 3vw, 40px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.pp-contact__text {
	max-width: 44ch;
	margin: 16px 0 0;
	color: var(--pp-ink-soft);
	font-size: 17px;
	line-height: 1.7;
}

.pp-contact__card {
	padding: 36px;
	background: var(--pp-surface);
	border-radius: 28px;
	box-shadow: var(--pp-shadow-md);
}

.pp-contact__form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.pp-contact__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.pp-contact__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.pp-contact__label {
	color: var(--pp-ink);
	font-size: 15px;
	font-weight: 600;
}

.pp-contact__input {
	width: 100%;
	min-height: 52px;
	padding: 0 18px;
	background: var(--pp-bg);
	border: 1px solid var(--pp-line);
	border-radius: 16px;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: 16px;
	transition: border-color 140ms ease;
}

.pp-contact__textarea {
	min-height: 150px;
	padding-top: 14px;
	padding-bottom: 14px;
	line-height: 1.6;
	resize: vertical;
}

.pp-contact__input:focus {
	border-color: #6f55a8;
	outline: 3px solid rgba(111, 85, 168, 0.25);
	outline-offset: 0;
}

.pp-contact__input[aria-invalid="true"] {
	border-color: #d1573c;
}

.pp-contact__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	align-self: flex-start;
	min-height: 52px;
	padding: 0 30px;
	background: #6f55a8;
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-family: var(--pp-font-body);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 140ms ease;
}

.pp-contact__button .pp-icon {
	width: 20px;
	height: 20px;
}

.pp-contact__button:hover,
.pp-contact__button:focus-visible {
	background: #5d4592;
}

.pp-contact__error {
	margin: 0;
	padding: 12px 16px;
	background: #fdece7;
	border-radius: 14px;
	color: #a33a22;
	font-weight: 600;
}

.pp-contact__done {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 28px 8px;
	text-align: center;
}

.pp-contact__done-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 18px;
	background: var(--pp-green-soft);
	border-radius: 50%;
	color: #3f7a3a;
}

.pp-contact__done-title {
	margin: 0;
	color: var(--pp-ink);
	font-size: 24px;
	font-weight: 800;
}

.pp-contact__done-text {
	max-width: 36ch;
	margin: 10px 0 0;
	color: var(--pp-ink-soft);
	line-height: 1.6;
}

@media (max-width: 1080px) {
	.pp-contact {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.pp-contact {
		padding: 40px;
	}

	.pp-contact__text {
		max-width: 60ch;
	}
}

@media (max-width: 767px) {
	.pp-contact {
		gap: 24px;
		padding: 30px 18px 18px;
		border-radius: 28px;
	}

	.pp-contact__intro {
		padding: 0 4px;
	}

	.pp-contact__icon {
		width: 52px;
		height: 52px;
		margin-bottom: 18px;
	}

	.pp-contact__text {
		font-size: 16px;
	}

	.pp-contact__card {
		padding: 22px 18px;
		border-radius: 22px;
	}

	.pp-contact__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.pp-contact__button {
		align-self: stretch;
	}
}

.pp-contact__alt {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
	margin: 24px 0 0;
	color: var(--pp-ink-soft);
	font-size: 16px;
}

.pp-contact__mail {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	background: #fff;
	border-radius: 999px;
	color: #6f55a8;
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--pp-shadow-sm);
	transition: background-color 140ms ease;
}

.pp-contact__mail .pp-icon {
	width: 20px;
	height: 20px;
}

.pp-contact__mail:hover,
.pp-contact__mail:focus-visible {
	background: #f6f2fd;
	color: #5d4592;
}
