/*
 * doui.pl: landing, sekcja hero i okno zapytania.
 * Bez zewnetrznych fontow i skryptow: strona o zgodach nie laduje niczego
 * od stron trzecich przed decyzja odwiedzajacego.
 */

/* Funnel Display i Funnel Sans (SIL OFL 1.1, assets/fonts/OFL.txt), z wlasnego serwera. */
@font-face {
	font-family: "Funnel Display";
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url("../fonts/funnel-display-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
	font-family: "Funnel Sans";
	font-style: normal;
	font-weight: 300 800;
	font-display: swap;
	src: url("../fonts/funnel-sans-latin-wght-normal.woff2") format("woff2-variations");
	unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
	--bg: #07060c;
	--text: #f4f2fa;
	--muted: #a39fb4;
	--line: rgba(255, 255, 255, 0.12);
	--line-strong: rgba(255, 255, 255, 0.22);
	--violet: #7c5cff;
	--violet-hover: #8d72ff;
	--violet-soft: #b3a4ff;
	--violet-glow: rgba(124, 92, 255, 0.35);
	--danger: #ff9aa8;
	--font: "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-display: "Funnel Display", var(--font);
	--gutter: clamp(20px, 5vw, 72px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	height: 100%;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

:focus-visible {
	outline: 2px solid var(--violet-soft);
	outline-offset: 3px;
}

.sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

/* Pasek gorny */

.topbar {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px var(--gutter);
}

.logo {
	display: inline-flex;
	align-items: baseline;
	color: var(--text);
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1;
	text-decoration: none;
}

/* Ikona stoi na linii bazowej i ma wysokosc wersalikow Funnel Display (0,7 em), jak litera O. */
.logo__cookie {
	width: 0.7em;
	height: 0.7em;
	margin: 0 0.06em 0 0.04em;
	fill: var(--violet-soft);
	transform: translateY(0.01em);
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.logo:hover .logo__cookie {
	transform: translateY(0.01em) rotate(-24deg);
}

/* Przyciski */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 40px;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: inherit;
	font-weight: 500;
	font-size: 14px;
	line-height: 1;
	letter-spacing: -0.005em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn__icon {
	flex: none;
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.btn--primary {
	background: var(--violet);
	color: #fff;
}

.btn--primary:hover {
	background: var(--violet-hover);
}

.btn--light {
	background: var(--text);
	color: var(--bg);
}

.btn--light:hover {
	background: #fff;
}

.btn--lg {
	height: 52px;
	padding: 0 26px;
	font-size: 15px;
}

/* Hero */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 100vh;
	min-height: 100svh;
	padding: 140px var(--gutter) 96px;
	overflow: hidden;
	isolation: isolate;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--bg);
}

.hero__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 50%;
}

/* Tekst stoi po lewej, wiec tam przyciemniamy, a fala zostaje widoczna po prawej. */
.hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(7, 6, 12, 0.94) 0%, rgba(7, 6, 12, 0.82) 32%, rgba(7, 6, 12, 0.25) 68%, rgba(7, 6, 12, 0.1) 100%),
		linear-gradient(180deg, rgba(7, 6, 12, 0.6) 0%, rgba(7, 6, 12, 0) 20%, rgba(7, 6, 12, 0) 72%, var(--bg) 100%);
}

.hero__content {
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__title {
	max-width: 11.5em;
	margin: 0 0 28px;
	font-family: var(--font-display);
	font-size: clamp(44px, 6.6vw, 96px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 0.98;
	text-wrap: balance;
}

.hero__lead {
	max-width: 34em;
	margin: 0 0 40px;
	color: var(--muted);
	font-size: clamp(16px, 1.35vw, 19px);
	line-height: 1.55;
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Okno zapytania (pelny ekran) */

.inquiry {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--text);
	overflow-y: auto;
	/* Tlo: rozmyta fala z hero pod spodem i dwie poswiaty, bez karty i ramek. */
	background:
		radial-gradient(55% 60% at 88% 8%, rgba(124, 92, 255, 0.32), transparent 70%),
		radial-gradient(45% 55% at 62% 105%, rgba(214, 74, 255, 0.2), transparent 70%),
		rgba(7, 6, 12, 0.84);
}

.inquiry::backdrop {
	background: rgba(4, 3, 8, 0.4);
	backdrop-filter: blur(64px) saturate(1.3);
	-webkit-backdrop-filter: blur(64px) saturate(1.3);
}

.inquiry[open] {
	animation: fade 0.3s ease both;
}

.inquiry__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(40px, 8vw, 140px);
	align-content: center;
	align-items: start;
	width: 100%;
	max-width: 1280px;
	min-height: 100%;
	margin: 0 auto;
	padding: 120px var(--gutter) 72px;
}

.inquiry__done[hidden],
.inquiry__form[hidden] {
	display: none;
}

/* Po wysylce zostaje samo podziekowanie, bez naglowka zachety obok. */
.inquiry__inner:has(.inquiry__form[hidden]) .inquiry__intro {
	display: none;
}

.inquiry__done {
	grid-column: 1 / -1;
	max-width: 640px;
}

.inquiry__title,
.inquiry__done-title {
	margin: 0 0 24px;
	font-family: var(--font-display);
	font-size: clamp(40px, 4.6vw, 68px);
	font-weight: 500;
	letter-spacing: -0.035em;
	line-height: 1;
	text-wrap: balance;
}

.inquiry__lead {
	max-width: 26em;
	margin: 0 0 28px;
	color: var(--muted);
	font-size: 17px;
	line-height: 1.55;
}

.inquiry__alt {
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

.inquiry__alt a {
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: var(--violet);
	text-underline-offset: 4px;
}

.inquiry__alt a:hover {
	color: var(--violet-soft);
}

.inquiry__close {
	position: absolute;
	top: 28px;
	right: var(--gutter);
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: var(--text);
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.inquiry__close:hover {
	background: rgba(255, 255, 255, 0.16);
}

.inquiry__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.inquiry__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 40px;
}

.field {
	margin-bottom: 36px;
}

.field label {
	display: block;
	color: var(--muted);
	font-size: 13px;
	letter-spacing: 0.01em;
}

/* Pola bez ramek i tla: sama linia pod spodem, fiolet przy fokusie. */
.field input,
.field textarea {
	width: 100%;
	padding: 8px 0 12px;
	border: 0;
	border-bottom: 1px solid var(--line-strong);
	border-radius: 0;
	background: transparent;
	color: var(--text);
	font: inherit;
	font-size: 21px;
	line-height: 1.4;
	transition: border-color 0.2s ease;
}

.field textarea {
	display: block;
	min-height: 96px;
	resize: none;
}

.field input::placeholder,
.field textarea::placeholder {
	color: rgba(244, 242, 250, 0.28);
}

.field input:focus,
.field textarea:focus {
	border-bottom-color: var(--violet-soft);
	outline: none;
}

.field input:-webkit-autofill {
	-webkit-text-fill-color: var(--text);
	transition: background-color 9999s ease 0s;
}

.field [aria-invalid="true"] {
	border-bottom-color: var(--danger);
}

.field--hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.inquiry__foot {
	display: flex;
	gap: 24px 40px;
	align-items: center;
	justify-content: space-between;
	margin-top: 8px;
}

.check {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	max-width: 22em;
	margin: 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}

.check input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--violet);
}

.check[data-invalid] span {
	color: var(--danger);
}

.inquiry__error {
	margin: 20px 0 0;
	color: var(--danger);
	font-size: 14px;
}

.inquiry__form button[type="submit"][disabled] {
	opacity: 0.6;
	cursor: progress;
}

@media (max-width: 900px) {
	.inquiry__inner {
		grid-template-columns: 1fr;
		gap: 40px;
		align-content: start;
		padding-top: 96px;
	}
}

@keyframes fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Ruch: odwiedzajacy, ktory go nie chce, dostaje kadr zamiast filmu */

@media (prefers-reduced-motion: reduce) {
	.hero__content,
	.inquiry[open] {
		animation: none;
	}

	.btn,
	.logo__cookie {
		transition: none;
	}
}

@media (max-width: 520px) {
	.topbar {
		padding: 16px 18px;
	}

	.logo {
		font-size: 22px;
	}

	.hero {
		align-items: flex-end;
		padding-bottom: 56px;
	}

	/* Na pionowym ekranie fala z prawej strony kadru wypada poza widok, wiec przesuwamy kadr. */
	.hero__video {
		object-position: 78% 50%;
	}

	.hero__shade {
		background: linear-gradient(180deg, rgba(7, 6, 12, 0.55) 0%, rgba(7, 6, 12, 0.35) 30%, rgba(7, 6, 12, 0.92) 62%, var(--bg) 100%);
	}

	.btn--primary.btn--lg {
		white-space: normal;
		text-align: center;
	}

	.hero__actions .btn {
		width: 100%;
	}

	.inquiry__inner {
		padding-top: 88px;
		padding-bottom: 40px;
	}

	.inquiry__close {
		top: 18px;
	}

	.inquiry__row {
		grid-template-columns: 1fr;
	}

	.field {
		margin-bottom: 28px;
	}

	.field input,
	.field textarea {
		font-size: 18px;
	}

	.inquiry__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.inquiry__foot .btn {
		width: 100%;
	}
}
