@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;1,300&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;1,9..40,300&display=swap");

:root {
	--bg: #0a0a0f;
	--gold: #c9a96e;
	--gold-soft: rgba(201, 169, 110, 0.12);
	--gold-border: rgba(201, 169, 110, 0.4);
	--gold-hover-fill: rgba(201, 169, 110, 0.22);
	--gold-shimmer: rgba(201, 169, 110, 0.45);
	--violet-orb: rgba(82, 62, 105, 0.95);
	--sage-orb: rgba(58, 68, 62, 0.95);
	--gold-orb: rgba(160, 118, 62, 0.95);
	--card-bg: rgba(255, 255, 255, 0.03);
	--card-border: rgba(255, 255, 255, 0.07);
	--card-border-hover: rgba(201, 169, 110, 0.3);
	--text: rgba(245, 243, 238, 0.94);
	--muted: rgba(188, 182, 172, 0.82);
	--dim: rgba(130, 124, 116, 0.85);
	--success: #8faf8a;
	--danger: #c97a7a;
	--radius-card: 16px;
	--radius-input: 10px;
	--ease-lux: ease;
	--stagger: 80ms;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	margin: 0;
	font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
	font-weight: 300;
	font-size: 15px;
	line-height: 1.55;
	color: var(--text);
	background-color: var(--bg);
	position: relative;
	overflow-x: hidden;
}

/* ——— Rozmyte kule światła ——— */
.lux-backdrop {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

.lux-orb {
	position: absolute;
	width: min(52vw, 520px);
	height: min(52vw, 520px);
	border-radius: 50%;
	filter: blur(100px);
	will-change: opacity;
}

.lux-orb--gold {
	background: var(--gold-orb);
}

.lux-orb--gold-dim {
	background: rgba(201, 169, 110, 0.55);
	filter: blur(110px);
}

.lux-orb--violet {
	background: var(--violet-orb);
	filter: blur(120px);
}

.lux-orb--sage {
	background: var(--sage-orb);
	filter: blur(95px);
}

.lux-orb--tl {
	top: -18%;
	left: -12%;
}
.lux-orb--tr {
	top: -8%;
	right: -16%;
}
.lux-orb--bl {
	bottom: -20%;
	left: -10%;
}
.lux-orb--br {
	bottom: -14%;
	right: -12%;
}

code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.92em;
	color: var(--muted);
}

.container {
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(32px, 5vw, 56px) clamp(18px, 4vw, 40px) 48px;
	position: relative;
	z-index: 1;
}

.app-layout {
	display: flex;
	gap: clamp(20px, 3vw, 36px);
	align-items: flex-start;
}

/* ——— Karty: sidebar + panel ——— */
.sidebar {
	width: 240px;
	flex: 0 0 240px;
	position: sticky;
	top: 28px;
	border: 1px solid var(--card-border);
	background: var(--card-bg);
	border-radius: var(--radius-card);
	padding: 22px 18px;
	overflow: hidden;
	transition: border-color 0.3s var(--ease-lux);
}

.sidebar::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(201, 169, 110, 0.35) 45%,
		rgba(201, 169, 110, 0.55) 50%,
		rgba(201, 169, 110, 0.35) 55%,
		transparent 100%
	);
	pointer-events: none;
}

.sidebar:hover {
	border-color: var(--card-border-hover);
}

.sidebar-title {
	font-family: "DM Sans", sans-serif;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold);
	margin: 0 2px 14px;
}

.sidebar-hint {
	color: var(--dim);
	font-size: 12px;
	font-weight: 300;
	line-height: 1.5;
	margin: 0 2px 20px;
	letter-spacing: 0.02em;
}

.nav-item {
	width: 100%;
	text-align: left;
	appearance: none;
	border: 1px solid transparent;
	border-radius: 100px;
	padding: 11px 16px;
	margin-bottom: 8px;
	background: transparent;
	color: var(--muted);
	font-family: "DM Sans", sans-serif;
	font-weight: 400;
	font-size: 13px;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition:
		color 0.3s var(--ease-lux),
		background 0.3s var(--ease-lux),
		border-color 0.3s var(--ease-lux);
}

.nav-item:last-child {
	margin-bottom: 0;
}

.nav-item:hover {
	color: var(--text);
	border-color: rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.03);
}

.nav-item.is-active {
	color: var(--gold);
	background: var(--gold-soft);
	border-color: var(--gold-border);
}

.main {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 4px;
	max-width: calc(100% - 260px);
}

/* ——— Hero / nagłówki ——— */
.header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: clamp(28px, 4vw, 40px);
	max-width: 92%;
}

.title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 300;
	font-style: italic;
	font-size: clamp(52px, 7vw, 72px);
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0;
}

.subtitle {
	font-family: "DM Sans", sans-serif;
	font-weight: 300;
	font-size: clamp(15px, 1.5vw, 17px);
	color: var(--muted);
	letter-spacing: 0.04em;
	max-width: 36em;
}

.panel {
	display: none;
	position: relative;
	margin-top: 0;
	border: 1px solid var(--card-border);
	background: var(--card-bg);
	border-radius: var(--radius-card);
	padding: 28px 26px;
	overflow: hidden;
	transition: border-color 0.3s var(--ease-lux);
}

.panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 5%,
		rgba(201, 169, 110, 0.25) 42%,
		rgba(201, 169, 110, 0.6) 50%,
		rgba(201, 169, 110, 0.25) 58%,
		transparent 95%
	);
	pointer-events: none;
}

.panel.is-active {
	display: block;
}

.panel:hover {
	border-color: var(--card-border-hover);
}

.form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 20px;
}

.field-full {
	grid-column: 1 / -1;
}

@media (max-width: 720px) {
	.app-layout {
		flex-direction: column;
	}
	.sidebar {
		width: 100%;
		flex: 0 0 auto;
		position: relative;
		top: auto;
	}
	.main {
		max-width: 100%;
	}
	.grid {
		grid-template-columns: 1fr;
	}
	.header {
		max-width: 100%;
	}
}

.field {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.label {
	font-family: "DM Sans", sans-serif;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(201, 169, 110, 0.78);
}

.help {
	color: var(--dim);
	font-size: 12px;
	font-weight: 300;
	line-height: 1.4;
}

.input {
	width: 100%;
	padding: 14px 16px;
	min-height: 48px;
	border-radius: var(--radius-input);
	border: 1px solid var(--card-border);
	background: rgba(0, 0, 0, 0.35);
	color: var(--text);
	font-family: "DM Sans", sans-serif;
	font-size: 14px;
	font-weight: 300;
	outline: none;
	transition: border-color 0.3s var(--ease-lux), box-shadow 0.3s var(--ease-lux);
}

.textarea {
	resize: vertical;
	line-height: 1.45;
	min-height: 100px;
}

.input::placeholder {
	color: var(--dim);
	opacity: 0.85;
}

.input:hover {
	border-color: rgba(255, 255, 255, 0.12);
}

.input:focus {
	border-color: rgba(201, 169, 110, 0.45);
	box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.15);
}

.actions {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	margin-top: 4px;
}

/* ——— Przyciski pill / złote ——— */
.btn {
	appearance: none;
	border-radius: 100px;
	padding: 12px 22px;
	font-family: "DM Sans", sans-serif;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.06em;
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.04);
	color: var(--muted);
	transition:
		background 0.3s var(--ease-lux),
		border-color 0.3s var(--ease-lux),
		color 0.3s var(--ease-lux),
		transform 0.2s var(--ease-lux);
}

.btn:hover {
	color: var(--text);
	border-color: rgba(255, 255, 255, 0.18);
	background: rgba(255, 255, 255, 0.07);
}

.btn:active {
	transform: scale(0.98);
}

.btn.primary {
	border: 1px solid var(--gold-border);
	background: var(--gold-soft);
	color: var(--gold);
}

.btn.primary:hover {
	background: var(--gold-hover-fill);
	border-color: rgba(201, 169, 110, 0.55);
	color: #dcc598;
}

.btn.danger {
	border-color: rgba(201, 122, 122, 0.45);
	background: rgba(201, 122, 122, 0.08);
	color: #e8b4b4;
}

.btn.danger:hover {
	background: rgba(201, 122, 122, 0.14);
	border-color: rgba(201, 122, 122, 0.55);
}

.footer {
	margin-top: 28px;
	color: var(--dim);
	font-weight: 300;
	font-size: 13px;
}

.status {
	min-height: 24px;
	font-weight: 400;
	white-space: pre-wrap;
	letter-spacing: 0.02em;
}

.status.ok {
	color: var(--success);
}

.status.err {
	color: var(--danger);
}

.checkbox-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 22px;
	margin-top: 8px;
}

.check {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	color: var(--muted);
	font-family: "DM Sans", sans-serif;
	font-weight: 400;
	font-size: 13px;
	letter-spacing: 0.02em;
}

.check:hover {
	color: var(--text);
}

.check input {
	width: 17px;
	height: 17px;
	accent-color: var(--gold);
	border-radius: 4px;
}

/* ——— Modal ——— */
.modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.modal.is-open {
	display: block;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 5, 8, 0.75);
	backdrop-filter: blur(8px);
}

.modal-card {
	position: relative;
	max-width: 640px;
	margin: 12vh auto 0;
	border: 1px solid var(--card-border);
	background: var(--card-bg);
	border-radius: var(--radius-card);
	padding: 28px 26px;
	backdrop-filter: blur(20px);
	overflow: hidden;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
	transition: border-color 0.3s var(--ease-lux);
}

.modal-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(201, 169, 110, 0.5),
		transparent
	);
	pointer-events: none;
}

.modal-title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 300;
	font-style: italic;
	font-size: 28px;
	letter-spacing: -0.02em;
	margin-bottom: 12px;
	color: var(--text);
}

.modal-body {
	white-space: pre-wrap;
	line-height: 1.5;
	color: var(--muted);
	font-weight: 300;
	font-size: 15px;
}

.modal-body.is-danger {
	color: #e8b4b4;
	font-weight: 400;
}

.modal-actions {
	margin-top: 22px;
	display: flex;
	justify-content: flex-end;
}

/* ——— Wejście: fade + slide + stagger ——— */
@keyframes lux-fade-in {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes lux-orb-gold {
	from {
		opacity: 0;
	}
	to {
		opacity: 0.19;
	}
}

@keyframes lux-orb-violet {
	from {
		opacity: 0;
	}
	to {
		opacity: 0.17;
	}
}

@keyframes lux-orb-sage {
	from {
		opacity: 0;
	}
	to {
		opacity: 0.15;
	}
}

@keyframes lux-orb-warm {
	from {
		opacity: 0;
	}
	to {
		opacity: 0.14;
	}
}

.lux-page .lux-backdrop .lux-orb {
	opacity: 0;
	animation-duration: 1.5s;
	animation-timing-function: var(--ease-lux);
	animation-fill-mode: forwards;
}

.lux-page .lux-orb--tl.lux-orb--gold {
	animation-name: lux-orb-gold;
	animation-delay: 0ms;
}

.lux-page .lux-orb--tr.lux-orb--violet {
	animation-name: lux-orb-violet;
	animation-delay: 100ms;
}

.lux-page .lux-orb--bl.lux-orb--sage {
	animation-name: lux-orb-sage;
	animation-delay: 200ms;
}

.lux-page .lux-orb--br.lux-orb--gold-dim {
	animation-name: lux-orb-warm;
	animation-delay: 150ms;
}

.lux-page .sidebar > * {
	opacity: 0;
	animation: lux-fade-in 0.85s var(--ease-lux) forwards;
}

.lux-page .sidebar > *:nth-child(1) {
	animation-delay: calc(var(--stagger) * 1);
}
.lux-page .sidebar > *:nth-child(2) {
	animation-delay: calc(var(--stagger) * 2);
}
.lux-page .sidebar > *:nth-child(3) {
	animation-delay: calc(var(--stagger) * 3);
}
.lux-page .sidebar > *:nth-child(4) {
	animation-delay: calc(var(--stagger) * 4);
}
.lux-page .sidebar > *:nth-child(5) {
	animation-delay: calc(var(--stagger) * 5);
}
.lux-page .sidebar > *:nth-child(6) {
	animation-delay: calc(var(--stagger) * 6);
}
.lux-page .sidebar > *:nth-child(7) {
	animation-delay: calc(var(--stagger) * 7);
}
.lux-page .sidebar > *:nth-child(8) {
	animation-delay: calc(var(--stagger) * 8);
}
.lux-page .sidebar > *:nth-child(9) {
	animation-delay: calc(var(--stagger) * 9);
}

.lux-page .main .title {
	opacity: 0;
	animation: lux-fade-in 0.9s var(--ease-lux) forwards;
	animation-delay: calc(var(--stagger) * 2);
}

.lux-page .main .subtitle {
	opacity: 0;
	animation: lux-fade-in 0.85s var(--ease-lux) forwards;
	animation-delay: calc(var(--stagger) * 3);
}

.lux-page .main .panel {
	opacity: 0;
	animation: lux-fade-in 0.9s var(--ease-lux) forwards;
	animation-delay: calc(var(--stagger) * 4);
}

.lux-page .footer .status {
	opacity: 0;
	animation: lux-fade-in 0.75s var(--ease-lux) forwards;
	animation-delay: calc(var(--stagger) * 5);
}

@media (prefers-reduced-motion: reduce) {
	.lux-page .sidebar > *,
	.lux-page .main .title,
	.lux-page .main .subtitle,
	.lux-page .main .panel,
	.lux-page .footer .status,
	.lux-page .lux-backdrop .lux-orb {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
	.lux-orb {
		opacity: 0.18 !important;
	}
}
