﻿/* ========== CSS VARIABLES — dark / light ========== */
:root {
	--bg: #0a0a0f;
	--bg2: #111118;
	--ink: #e8e4dc;
	--ink-dim: rgba(232, 228, 220, 0.5);
	--ink-faint: rgba(232, 228, 220, 0.15);
	--ember: #ff4d1c;
	--gold: #e8c96a;
	--ice: #c8e6ff;
	--line: rgba(255, 255, 255, 0.06);
	--card-bg: #111118;
	--card-border: rgba(255, 77, 28, 0.18);
	--hdr-h: 72px;
}
.light {
	--bg: #e7ecef; /* bardziej stonowane, neutralne tło */
	--bg2: #f3f6f8; /* sekcje / karty */
	--ink: #10161d; /* ciemny grafit */
	--ink-dim: rgba(16, 22, 29, 0.72);
	--ink-faint: rgba(16, 22, 29, 0.18);

	--ember: #e63b1d; /* czystszy brand red */
	--gold: #c99700; /* mniej brązu, więcej tech gold */
	--ice: #2563eb; /* nowoczesny blue (bardziej UI) */

	--line: rgba(16, 22, 29, 0.12);
	--card-bg: #f9fbfc;
	--card-border: rgba(230, 59, 29, 0.22);
}
.light .hdr {
	background: rgba(243, 246, 248, 0.9);
	backdrop-filter: blur(12px);
}
.light body::before {
	opacity: 0.16;
}
.light .btn-anim {
	background: var(--card-bg);
	box-shadow: 0 1px 0 rgba(16, 22, 29, 0.04);
}
.no-aos [data-aos] {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}
.no-aos.mobile-reveal-ready [data-aos] {
	opacity: 0 !important;
	transform: translateY(28px) !important;
	transition:
		opacity 0.62s cubic-bezier(0.23, 1, 0.32, 1),
		transform 0.62s cubic-bezier(0.23, 1, 0.32, 1) !important;
	transition-delay: var(--mobile-reveal-delay, 0ms) !important;
	will-change: opacity, transform;
}
.no-aos.mobile-reveal-ready [data-aos].is-revealed {
	opacity: 1 !important;
	transform: none !important;
}
.light .btn-anim:hover {
	color: var(--ink);
	background: #ffffff;
	transform: translateY(-1px);
	box-shadow:
		0 12px 28px rgba(16, 22, 29, 0.1),
		0 1px 0 rgba(16, 22, 29, 0.06);
}
.light .btn-ghost:hover {
	background: rgba(16, 22, 29, 0.065);
	border-color: rgba(16, 22, 29, 0.24);
	color: var(--ink);
}
.light .card:hover {
	border-color: rgba(230, 59, 29, 0.34);
	box-shadow: 0 16px 36px rgba(16, 22, 29, 0.055);
}
.light .nav-link:hover {
	color: var(--ink);
	border-color: rgba(16, 22, 29, 0.2);
	background: rgba(16, 22, 29, 0.065);
}
.light .nav-link.is-active,
.light .nav-link[aria-current='page'] {
	background: rgba(230, 59, 29, 0.08);
	border-color: rgba(230, 59, 29, 0.26);
}
.light .nav-btn:hover {
	color: var(--ember);
	border-color: rgba(230, 59, 29, 0.28);
	background: rgba(230, 59, 29, 0.08);
}
.light .step-row:hover {
	border-color: rgba(230, 59, 29, 0.24);
	background: rgba(16, 22, 29, 0.035);
}
.light .gradient-text {
	background: linear-gradient(
		135deg,
		#e63b1d 0%,
		#c99700 50%,
		#2563eb 100%
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	overflow-x: hidden;
	scrollbar-gutter: stable;
}
body {
	background: var(--bg);
	color: var(--ink);
	font-family: 'Crimson Pro', serif;
	min-height: 100vh;
	overflow-x: hidden;
	transition:
		background 0.3s ease,
		color 0.3s ease;
}
.container {
	max-width: 1120px;
	width: 100%;
}

/* ========== NOISE TEXTURE ========== */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
	pointer-events: none;
	z-index: 999;
	opacity: 0.3;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
	width: 4px;
}
::-webkit-scrollbar-track {
	background: var(--bg);
}
::-webkit-scrollbar-thumb {
	background: var(--ember);
	border-radius: 2px;
}

/* ========== CUSTOM CURSOR ========== */
#cursor {
	display: none;
}
#cursor-ring {
	position: fixed;
	width: 56px;
	height: 56px;
	border-radius: 999px;
	pointer-events: none;
	z-index: 9998;
	opacity: 0.48;
	background: radial-gradient(
		circle,
		rgba(255, 77, 28, 0.36) 0%,
		rgba(255, 77, 28, 0.2) 34%,
		rgba(255, 77, 28, 0.08) 58%,
		transparent 80%
	);
	filter: blur(16px);
	transition:
		transform 0.28s ease,
		opacity 0.28s ease,
		background 0.28s ease;
}
.light #cursor-ring {
	background: radial-gradient(
		circle,
		rgba(217, 58, 12, 0.28) 0%,
		rgba(217, 58, 12, 0.14) 38%,
		rgba(217, 58, 12, 0.05) 62%,
		transparent 80%
	);
}
@media (hover: none) {
	#cursor,
	#cursor-ring {
		display: none;
	}
}

/* ========== SELECTION ========== */
::selection {
	background: rgba(255, 77, 28, 0.25);
}

/* ========== GRADIENT TEXT ========== */
.gradient-text {
	background: linear-gradient(
		135deg,
		var(--ember) 0%,
		var(--gold) 50%,
		var(--ice) 100%
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.light .gradient-text {
	background: linear-gradient(
		135deg,
		#d93a0c 0%,
		#b8960a 55%,
		#3a7ca5 100%
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ========== SECTION EYEBROW ========== */
.eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'DM Mono', monospace;
	font-size: 0.68rem;
	letter-spacing: 0.22em;
	color: var(--ember);
	text-transform: uppercase;
}
.eyebrow::before {
	content: '';
	display: block;
	width: 28px;
	height: 1px;
	background: var(--ember);
	flex-shrink: 0;
}


/* ========== ANIMATED BORDER BUTTON ========== */
@keyframes borderRot {
	from {
		background-position: 0% 50%;
	}
	to {
		background-position: 100% 50%;
	}
}
.btn-anim {
	position: relative;
	cursor: pointer;
	background: var(--bg2);
	color: var(--ember);
	font-family: 'DM Mono', monospace;
	font-size: 0.72rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	padding: 0.85rem 2rem;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition:
		color 0.3s ease,
		background 0.3s ease,
		box-shadow 0.3s ease,
		transform 0.3s ease;
	border: none;
	outline: none;
}
.btn-anim::before {
	content: '';
	position: absolute;
	inset: -1px;
	background: linear-gradient(
		90deg,
		var(--ember),
		var(--gold),
		var(--ice),
		var(--ember)
	);
	background-size: 300% 300%;
	animation: borderRot 3s linear infinite;
	z-index: -1;
}
.btn-anim:hover {
	color: var(--ink);
}

.btn-ghost {
	font-family: 'DM Mono', monospace;
	font-size: 0.72rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	padding: 0.85rem 2rem;
	border: 1px solid var(--ink-faint);
	color: var(--ink-dim);
	background: transparent;
	transition:
		border-color 0.3s ease,
		color 0.3s ease,
		background 0.3s ease;
	cursor: pointer;
}
.btn-ghost:hover {
	border-color: var(--ink-dim);
	color: var(--ink);
}

/* ========== DARK CARD ========== */
.card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	transition:
		border-color 0.4s ease,
		transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.card:hover {
	border-color: rgba(255, 77, 28, 0.4);
}
.card-lift:hover {
	transform: translateY(-5px);
}

/* ========== HEADER / NAV ========== */
.hdr {
	border-bottom: 1px solid var(--line);
	background: color-mix(in oklab, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Nav links */
.nav-link {
	font-family: 'DM Mono', monospace;
	font-size: 0.68rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink-dim);
	padding: 0.45rem 0.85rem;
	border: 1px solid transparent;
	transition:
		color 0.2s ease,
		border-color 0.2s ease,
		background 0.2s ease;
}
.nav-link:hover {
	color: var(--ink);
	border-color: var(--line);
}
.nav-link.is-active,
.nav-link[aria-current='page'] {
	color: var(--ember);
	border-color: var(--card-border);
}

.nav-btn {
	width: 2.25rem;
	height: 2.25rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line);
	color: var(--ink-dim);
	background: transparent;
	transition:
		color 0.2s ease,
		border-color 0.2s ease,
		background 0.2s ease;
	cursor: pointer;
}
.nav-btn:hover {
	color: var(--ember);
	border-color: var(--card-border);
}
.nav-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px var(--ember);
}

/* ========== TYPEWRITER ========== */
.brand {
	display: inline-block;
	width: calc(var(--n, 11) * 1ch);
}
.typew {
	display: inline-block;
	white-space: nowrap;
	overflow: hidden;
	width: 0;
	border-right: 2px solid var(--ember);
	animation:
		typeonce 1.15s steps(var(--n, 11)) 0.12s 1 forwards,
		caret 0.9s steps(1, end) 4;
	will-change: width;
}
.typew.is-done {
	border-right-color: transparent;
}
@keyframes typeonce {
	0% {
		width: 0;
	}
	100% {
		width: calc(var(--n, 11) * 1ch);
	}
}
@keyframes caret {
	50% {
		border-right-color: transparent;
	}
}

/* ========== MARQUEE ========== */
@keyframes marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-33.333%);
	} /* 3 bloki → przesuwamy o 1/3 */
}
.marquee-inner {
	display: flex;
	width: max-content;
	animation: marquee 22s linear infinite;
}

/* ========== HERO: bez clip-path — używamy padding-bottom zamiast ========== */
/* clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%) powodował że border-top
       sekcji marquee był widoczny przez przezroczystą część — usunięte */

/* ========== STAT NUMBERS ========== */
.stat-num {
	font-family: 'Bebas Neue', sans-serif;
	font-size: clamp(2.8rem, 6vw, 4.5rem);
	line-height: 1;
	color: var(--ember);
}

/* ========== BROWSER BAR (project cards) ========== */
.browser-bar .dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: 1px solid var(--line);
}

/* ========== FORM INPUTS ========== */
.field {
	width: 100%;
	background: var(--bg);
	border: 1px solid var(--card-border);
	color: var(--ink);
	font-family: 'Crimson Pro', serif;
	font-size: 1rem;
	padding: 0.45rem 0.85rem;
	outline: none;
	transition: border-color 0.25s ease;
}
.field:focus {
	border-color: var(--ember);
}

.recaptcha-shell {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
}

.recaptcha-shell .g-recaptcha {
	transform-origin: left top;
}

.contact-card {
	min-width: 0;
}

.copy-mail-btn {
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

@media (max-width: 480px) {
	.contact-card {
		padding: 1.25rem;
	}

	.contact-stats {
		grid-template-columns: 1fr !important;
	}

	.contact-stats > div {
		padding: 0.85rem !important;
	}
}

@media (max-width: 380px) {
	.contact-stats > div .font-mono {
		font-size: 0.54rem !important;
		letter-spacing: 0.06em !important;
		line-height: 1.35 !important;
	}
}

/* ========== STEP ROW ========== */
.step-row {
	border: 1px solid var(--line);
	transition:
		border-color 0.4s ease,
		background 0.4s ease;
	cursor: default;
}
.step-row:hover {
	border-color: var(--card-border);
	background: var(--bg2);
}
.step-num {
	font-family: 'Bebas Neue', sans-serif;
	font-size: clamp(3.5rem, 7vw, 5rem);
	line-height: 1;
	color: rgba(255, 77, 28, 0.15);
	transition: color 0.4s ease;
	flex-shrink: 0;
}
.step-row:hover .step-num {
	color: rgba(255, 77, 28, 0.45);
}

/* ========== PROCESS: arrow ========== */
.step-arrow {
	font-family: 'DM Mono', monospace;
	font-size: 0.65rem;
	letter-spacing: 0.2em;
	color: transparent;
	transition: color 0.4s ease;
}
.step-row:hover .step-arrow {
	color: var(--ember);
}

/* ========== FOCUS ========== */
.focusable:focus-visible {
	outline: 2px solid var(--ember);
	outline-offset: 2px;
}

/* ========== ACCORDION (FAQ fake) ========== */
details summary {
	cursor: pointer;
	list-style: none;
}
details summary::-webkit-details-marker {
	display: none;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
	}
	.typew {
		border-right: 0;
		width: auto;
	}
}

/* ========== LIGHT OVERRIDES ========== */
.light body {
	cursor: auto;
}
	.light .btn-anim {
		background: var(--bg2);
	}
