/* ==========================================================================
   Shadowdev – statyczna kopia shadowdev.pro (HTML + CSS + JS)
   ========================================================================== */

:root {
	--accent: #ec4e00;
	--bg: #111;
	--text: #fefefe;
	--white: #fff;
	--line: #272727;
	--font-body: "Roboto Condensed", sans-serif;
	--font-head: "Rajdhani", sans-serif;
	--font-logo: "Anton", sans-serif;
	--grid: 1000px;
	--header-mobile: 70px;
}

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

html { -webkit-text-size-adjust: 100%; overflow-y: scroll; }

strong { font-weight: 400; }

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 300;
	line-height: 26px;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img { max-width: 100%; height: auto; vertical-align: middle; border: 0; }

a { color: var(--white); text-decoration: none; transition: color .2s ease-out; }
a:hover { color: var(--accent); }

p { margin: 10px 0; }

h2, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: 700;
	letter-spacing: -.04em;
	text-transform: uppercase;
	color: var(--white);
	margin: 20px 0;
}
h2 { font-size: 55px; line-height: 55px; }
h4 { font-size: 35px; line-height: 35px; }
h5 { font-size: 25px; line-height: 30px; }
h6 { font-size: 25px; line-height: 1.45; }

.grid { width: var(--grid); margin: 0 auto; }

/* --------------------------------------------------------------------------
   Przejścia między stronami
   -------------------------------------------------------------------------- */
.page-wrapper { animation: page-in .4s ease both; transition: opacity .3s ease; }
.page-leaving .page-wrapper { opacity: 0; }

@keyframes page-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Nagłówek (desktop)
   -------------------------------------------------------------------------- */
.site-header { position: relative; z-index: 110; }

.logo-area {
	height: 145px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--bg);
}

.logo {
	position: relative;
	top: 18px;
	display: inline-block;
	color: var(--white);
	font-family: var(--font-logo);
	font-size: 55px;
	font-weight: 400;
	line-height: 55px;
	letter-spacing: -.04em;
	text-transform: uppercase;
}
.logo:hover { color: var(--white); }

/* Animowane logo – efekt "glitch" */
.glitch { position: relative; display: block; overflow: hidden; }
.glitch::before,
.glitch::after {
	content: attr(data-text);
	position: absolute;
	top: 0;
	height: 100%;
	color: inherit;
	clip-path: inset(0 0 100% 0);
	animation-duration: 3s;
	animation-timing-function: steps(1, end);
	animation-iteration-count: infinite;
	animation-direction: alternate-reverse;
}
.glitch::before {
	left: -1px;
	text-shadow: 1px 0 rgba(236, 78, 0, .3);
	animation-name: glitch-a;
}
.glitch::after {
	left: 3px;
	text-shadow: 3px 0 #000;
	animation-name: glitch-b;
}

@keyframes glitch-a {
	0%   { clip-path: inset(18% 0 70% 0); }
	7%   { clip-path: inset(62% 0 20% 0); }
	14%  { clip-path: inset(100% 0 0 0); }
	21%  { clip-path: inset(8% 0 76% 0); }
	28%  { clip-path: inset(44% 0 30% 0); }
	35%  { clip-path: inset(100% 0 0 0); }
	42%  { clip-path: inset(80% 0 4% 0); }
	49%  { clip-path: inset(26% 0 58% 0); }
	56%  { clip-path: inset(100% 0 0 0); }
	63%  { clip-path: inset(52% 0 40% 0); }
	70%  { clip-path: inset(4% 0 84% 0); }
	77%  { clip-path: inset(100% 0 0 0); }
	84%  { clip-path: inset(70% 0 12% 0); }
	91%  { clip-path: inset(34% 0 52% 0); }
	100% { clip-path: inset(100% 0 0 0); }
}
@keyframes glitch-b {
	0%   { clip-path: inset(74% 0 10% 0); }
	6%   { clip-path: inset(100% 0 0 0); }
	12%  { clip-path: inset(30% 0 46% 0); }
	18%  { clip-path: inset(88% 0 2% 0); }
	24%  { clip-path: inset(100% 0 0 0); }
	30%  { clip-path: inset(12% 0 72% 0); }
	36%  { clip-path: inset(58% 0 28% 0); }
	42%  { clip-path: inset(100% 0 0 0); }
	48%  { clip-path: inset(40% 0 44% 0); }
	54%  { clip-path: inset(2% 0 90% 0); }
	60%  { clip-path: inset(100% 0 0 0); }
	66%  { clip-path: inset(66% 0 16% 0); }
	72%  { clip-path: inset(22% 0 62% 0); }
	78%  { clip-path: inset(100% 0 0 0); }
	84%  { clip-path: inset(48% 0 36% 0); }
	90%  { clip-path: inset(84% 0 6% 0); }
	100% { clip-path: inset(100% 0 0 0); }
}

.menu-area { height: 69px; background-color: var(--bg); }
.home .menu-area { background-color: transparent; }

.menu-area .grid {
	height: 100%;
	display: flex;
	justify-content: center;
	box-shadow: inset 0 -2px 0 var(--line);
	background-color: var(--bg);
}

.main-menu ul { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }

.main-menu a {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 23px;
	color: var(--white);
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 700;
	line-height: 23px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.main-menu a:hover,
.main-menu a.current { color: var(--accent); }

/* --------------------------------------------------------------------------
   Nagłówek (mobile)
   -------------------------------------------------------------------------- */
.mobile-header {
	display: none;
	position: sticky;
	top: 0;
	z-index: 110;
	background-color: var(--bg);
	transition: transform .3s ease;
}
.mobile-header.is-hidden { transform: translateY(-100%); }

.mobile-header-holder .grid {
	position: relative;
	height: var(--header-mobile);
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-menu-opener {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	display: flex;
	align-items: center;
	padding: 0 10px 0 0;
	color: var(--white);
	background: none;
	border: 0;
	cursor: pointer;
}
.mobile-menu-opener svg { display: block; fill: currentColor; }
.mobile-menu-opener:hover,
.mobile-menu-opener.is-open { color: var(--accent); }

.mobile-logo {
	color: var(--text);
	font-family: var(--font-logo);
	font-size: 42px;
	line-height: 42px;
	letter-spacing: -.04em;
	text-transform: uppercase;
}
.mobile-logo:hover { color: var(--text); }

.mobile-nav {
	height: 0;
	overflow: hidden;
	background-color: var(--bg);
	transition: height .3s ease-in-out;
}
.mobile-nav.is-open { border-bottom: 1px solid var(--line); }
.mobile-nav ul { margin: 0; padding: 0; list-style: none; }
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav a {
	display: block;
	padding: 9px 0 9px 4px;
	border-bottom: 1px solid var(--line);
	color: var(--text);
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 700;
	line-height: 23px;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.mobile-nav a:hover,
.mobile-nav a.current { color: var(--accent); }

/* --------------------------------------------------------------------------
   Treść
   -------------------------------------------------------------------------- */
.content { position: relative; z-index: 100; background-color: var(--bg); }
.content.overlap-menu { margin-top: -69px; }

.container { padding: 0 0 40px; }
.home .container { padding: 70px 0 40px; }
.single-project .container { padding: 50px 0; }
.portfolio-page .container { padding: 0; }

/* Przycisk "View Project" */
.btn {
	position: relative;
	display: inline-block;
	vertical-align: top;
	overflow: hidden;
	padding: 9px 51px;
	border: 2px solid var(--white);
	background-color: transparent;
	color: var(--white);
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 700;
	line-height: 34px;
	letter-spacing: .12em;
	text-transform: uppercase;
	transition: color .2s ease-in-out;
}
.btn-overlay {
	position: absolute;
	top: 0;
	left: -22px;
	display: block;
	width: 123%;
	height: 100%;
	background-color: var(--white);
	transform: translateX(-100%) skew(-30deg);
	transition: transform .5s cubic-bezier(.76, .49, .25, 1);
}
.btn-text { position: relative; z-index: 2; transition: color .4s; }
.btn:hover { color: #000; }
.btn:hover .btn-overlay { transform: translateX(0) skew(-30deg); }

/* --------------------------------------------------------------------------
   Strona główna – sekcje z grami
   -------------------------------------------------------------------------- */
.game-section { display: table; width: 100%; table-layout: fixed; }

.game-image,
.game-info { display: table-cell; vertical-align: top; }
.game-image { width: 52%; }

.game-image a { position: relative; display: block; margin: 0 0 0 105px; }
.game-image img { display: block; width: 100%; }
.game-image a::after {
	content: "";
	position: absolute;
	inset: 0;
	transition: background .2s;
}
.game-image a:hover::after { background: rgba(255, 255, 255, .1); }

.game-info { padding: 2.5% 0 0 7%; }

.game-title-holder { margin: 0 0 57px; }
.game-title {
	position: relative;
	margin: 20px 0;
	color: var(--accent);
}
.game-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -27px;
	display: block;
	width: 100%;
	height: 5px;
	background-color: currentColor;
}

.game-text { margin: 10px 0; font-size: 20px; line-height: 29px; letter-spacing: -.02em; }
.game-button { margin-top: 45px; }

.game-section.is-right .game-image a { margin: 0 105px 0 0; }
.game-section.is-right .game-info { padding: 4% 7% 0 0; text-align: right; }
.game-section.is-right .game-title::after { left: auto; right: 0; }

/* Odstępy sekcji (procent szerokości kontenera) */
.game-row-1 { padding: 10% 0 17% 0; }
.game-row-2 { padding: 7% 0 19% 0; }
.game-row-3 { padding: 5% 0 20% 0; }
.game-row-4 { padding: 6% 0 20% 0; }
.game-row-5 { padding: 6% 0 20% 0; }

@media (min-width: 1367px) {
	.game-image a { margin-left: 66px; }
	.game-section.is-right .game-image a { margin: 0 66px 0 0; }
	.game-row-1 { padding: 13% 20px 17% 5px; }
	.game-row-2 { padding: 5% 5px 18% 30px; }
	.game-row-3 { padding: 3% 0 5% 0; }
	.game-row-4,
	.game-row-5 { padding: 0 0 16.5% 0; }
}
@media (min-width: 1601px) {
	.game-row-1 { padding: 10.5% 0 20% 0; }
	.game-row-2 { padding: 0 0 23% 0; }
	.game-row-3 { padding: 2% 0 23% 0; }
}

/* --------------------------------------------------------------------------
   My Games – siatka portfolio
   -------------------------------------------------------------------------- */
.portfolio-list { padding: 100px 0 150px; }
.portfolio-list .grid-inner { display: flex; flex-wrap: wrap; margin: 0 -15px -30px; }

.portfolio-item {
	position: relative;
	width: 33.3333%;
	padding: 0 15px 26px;
	margin: 0 0 30px;
	transition: opacity .8s cubic-bezier(.34, .52, .57, 1.04), transform .8s cubic-bezier(.34, .52, .57, 1.04);
}
/* Ukrywamy tylko, gdy działa JS (klasa .js na <html>) – bez JS wszystko jest widoczne */
.js .portfolio-item { opacity: 0; transform: translateY(80px); }
.js .portfolio-item.is-shown { opacity: 1; transform: translateY(0); }

.portfolio-image { position: relative; padding-bottom: 5px; border: 2px solid var(--line); }
.portfolio-image img { display: block; width: 100%; }
.portfolio-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, .4);
	opacity: 0;
	transition: opacity .2s ease-in-out;
}
.portfolio-item:hover .portfolio-image::after { opacity: 1; }
.portfolio-link { position: absolute; inset: 0; z-index: 2; }

/* --------------------------------------------------------------------------
   Strony tekstowe (About / Contact / Privacy)
   -------------------------------------------------------------------------- */
.text-row { padding: 35px 0 82px; }
.text-row h4 { margin: 20px 0; }
.text-row p { margin: 10px 0 0; }
.text-row p a { color: var(--white); }
.text-row p a:hover { color: var(--accent); }

.about-intro { padding: 35px 0 70px; }
.about-intro p { margin: 10px 0 0; }

.columns { display: flex; margin: 0 -15px; }
.columns > .col { width: 33.3333%; padding: 0 15px; }

.counters { margin-top: -30px; }
.counter-holder { text-align: center; transition: opacity .2s ease-in; }
.js .counter-holder { opacity: 0; }
.js .counter-holder.is-visible { opacity: 1; }
.counter {
	display: inline-block;
	color: var(--accent);
	font-family: var(--font-head);
	font-size: 90px;
	font-weight: 700;
	line-height: 90px;
	letter-spacing: -.04em;
}
.counter-title { margin: 1px 0 0; }

.separator-row { padding-top: 30px; }
.separator { margin: 10px 0; border-bottom: 5px solid #ebebeb; }

.skills-title { margin-top: 41px; }
.about-page .container { padding-bottom: 0; }
.skills { margin-top: 45px; padding-bottom: 100px; }
.skill { text-align: center; }
.skill img { width: 150px; height: 150px; }
.skill-content { padding-top: 33px; }
.skill-title { margin: 0; color: var(--accent); line-height: 1.2em; }
.skill-text { margin: 8px 0 0; line-height: 29px; }

/* --------------------------------------------------------------------------
   Pojedynczy projekt
   -------------------------------------------------------------------------- */
.project-row { display: flex; margin: 0 -15px; align-items: flex-start; }
.project-gallery { width: 66.6667%; padding: 0 15px; }
.project-info-col { width: 33.3333%; padding: 0 15px; }

.slider { position: relative; overflow: hidden; }
.slider-track { display: flex; transition: transform .6s ease; will-change: transform; }
.slider-track.no-anim { transition: none; }
.slide { flex: 0 0 100%; }
.slide img { display: block; width: 100%; }

.slider-nav {
	position: absolute;
	top: 50%;
	z-index: 3;
	padding: 0;
	margin-top: -14px;
	width: 10px;
	height: 28px;
	background: none;
	border: 0;
	color: var(--white);
	cursor: pointer;
	transition: color .2s ease-out;
}
.slider-nav svg { display: block; width: 10px; height: 21px; margin: 3px 0; }
.slider-nav:hover { color: var(--accent); }
.slider-prev { left: 75px; }
.slider-prev svg { transform: scaleX(-1); }
.slider-next { right: 75px; }

.project-info { padding-top: 19px; margin: 0 -18px 0 18px; }
.project-description { padding-bottom: 7px; margin-bottom: 30px; }
.project-description h4 { margin: 20px 0; }
.project-description p { margin: 30px -15px 0 0; }

.project-field { margin: 0 0 10px; font-size: 20px; line-height: 26px; }
.project-field h5 { display: inline-block; margin: 0 15px 0 0; }
.project-field p { display: inline-block; margin: 0; }

.project-nav { display: table; width: 100%; margin-top: 42px; table-layout: fixed; }
.project-nav a { display: table-cell; color: var(--white); }
.project-nav .nav-prev { text-align: left; }
.project-nav .nav-next { text-align: right; }
.project-nav .nav-thumb { display: block; }
.project-nav .nav-thumb img { width: 150px; height: 150px; vertical-align: baseline; }
.project-nav .nav-label {
	display: block;
	margin: 20px 0;
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 700;
	line-height: 26px;
	text-transform: uppercase;
	transition: color .2s ease-out;
}
.project-nav a:hover .nav-label { color: var(--accent); }

/* --------------------------------------------------------------------------
   Back to Top
   -------------------------------------------------------------------------- */
.back-to-top {
	position: fixed;
	right: 25px;
	bottom: 25px;
	z-index: 10000;
	display: block;
	width: 41px;
	border: 1px solid var(--accent);
	background-color: rgba(0, 0, 0, .9);
	color: var(--white);
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease, visibility 0s .15s;
}
.back-to-top.is-on { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.back-to-top:hover { color: var(--white); }

.btt-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	margin-bottom: 0;
	transition: margin .2s;
}
.btt-icon svg { width: 14px; height: 8px; fill: currentColor; }
.btt-text {
	position: absolute;
	bottom: -13px;
	left: 9px;
	display: block;
	width: 100px;
	height: 25px;
	opacity: 0;
	color: var(--white);
	font-family: var(--font-head);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 1px;
	text-transform: uppercase;
	transform: rotate(-90deg);
	transform-origin: 0 0;
	transition: opacity .2s;
}
.back-to-top:hover .btt-icon { margin-bottom: 89px; }
.back-to-top:hover .btt-text { opacity: 1; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-page { padding: 120px 0 160px; text-align: center; }
.error-page h2 { color: var(--accent); }
.error-page p { margin: 20px 0 45px; font-size: 20px; line-height: 29px; }

/* --------------------------------------------------------------------------
   Responsywność
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	:root { --grid: 950px; }
}

@media (max-width: 1024px) {
	:root { --grid: 768px; }

	.site-header { display: none; }
	.mobile-header { display: block; }
	.content.overlap-menu { margin-top: 0; }
	.home .container { padding: 0; }

	.game-section,
	.game-image,
	.game-info { display: block; width: 100%; }

	.game-row-1 { padding: 15.5% 0 17% 0; }
	.game-row-2 { padding: 0 0 40% 0; }
	.game-row-3 { padding: 0 0 16% 0; }
	.game-row-4,
	.game-row-5 { padding: 0 0 32% 0; }

	.project-row { flex-wrap: wrap; }
	.project-gallery,
	.project-info-col { width: 100%; }
	.portfolio-list { padding-top: 120px; }
	.project-gallery { margin-bottom: 11px; }
	.project-info-col { margin-bottom: 30px; }
	.project-info { margin: 0; }
}

@media (max-width: 768px) {
	:root { --grid: 600px; }

	.game-image { display: none; }
	.game-row-1, .game-row-2, .game-row-3, .game-row-4, .game-row-5 { padding: 0 0 15% 0; }

	.portfolio-item { width: 50%; }

	.columns { flex-wrap: wrap; }
	.columns > .col { width: 100%; }
}

@media (max-width: 680px) {
	:root { --grid: 420px; }

	h2 { font-size: 45px; line-height: 45px; }
	.portfolio-item { width: 100%; }
}

@media (max-width: 480px) {
	:root { --grid: 300px; }
}

@media (prefers-reduced-motion: reduce) {
	.glitch::before,
	.glitch::after { animation: none; }
	.page-wrapper,
	.portfolio-item { transition: none; }
}
