/*=====
Theme Name: Pedro Gris
Author: Pedro Gris
Author URI: https://pedrogris.es
Description: A custom WordPress theme developed with ♥ by Pedro Gris. All rights reserved. This theme is not intended for redistribution, modification, or resale.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.6.1
Requires PHP: 7.0
License: Proprietary - All Rights Reserved
License URI: https://pedrogris.es/license
Text Domain: pedro-gris
Tags: custom, modern, responsive, SEO-friendly, accessible
=======*/



/* FONT */
@font-face {
	font-family: 'ClashGrotesk';
	src: url('assets/fonts/ClashGrotesk-Variable.woff2') format('woff2'),
		url('assets/fonts/ClashGrotesk-Variable.woff') format('woff'),
		url('assets/fonts/ClashGrotesk-Variable.ttf') format('truetype');
	font-weight: 200 700;
	font-display: swap;
	font-style: normal;
}

@font-face {
	font-family: 'Albert';
	src: url('assets/fonts/Albert-extrabold.woff2') format('woff2'),
		url('assets/fonts/Albert-extrabold.woff') format('woff');
	font-weight: 200 800;
	font-display: swap;
	font-style: normal;
}

/* BASIC */

:root {
	--black: #000;
	--white: #DFDFDF;
	--cubic-bezier: cubic-bezier(0.5, 0, 0.5, 1);
	--gap-big: 25svh;
	--gap-medium: 10svh;
	--gap-small: 5svh;
	--gap-tiny: 10px;
	interpolate-size: allow-keywords;

	@media (max-width:950px) {
		--gap-big: 17svh;
		--gap-medium: 5svh;
		--gap-small: 2svh;
		--gap-tiny: 5px;
	}
}


::-moz-selection {
	color: var(--black);
	background: var(--white);
}
  
::selection {
	color: var(--black);
	background: var(--white);
}

.nojq  {
	display: none;
}

* {
	/* Designer mode */
	/* outline: 1px solid blue; */
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: rgba(0,0,0,0);
}

body,
html {
	overflow-x:hidden;
}

body {
	width: 100%;
	height: 100%;
	font-family: 'ClashGrotesk', sans-serif;
	font-weight: 500;
	font-variation-settings: 'wght' 500;
	color: var(--black);
	background-color: var(--white);
	font-size: 14px;
	font-weight: 400;
	margin: 0;
	padding: 0;
	transition: color .3s, background-color .3s;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 700;
	line-height: 0.9;
}

h1 {
	font-size: 78.54px;
	font-family: 'Albert', sans-serif;
}

h2 {
	font-size: 58.92px;
}

h3 {  
	font-size: 44.2px;  
}

h4 {  
	font-size: 33.16px;  
}

h5 {  
	font-size: 24.88px;  
}

h6 {  
	font-size: 18.66px;  
}

p {
	font-size: 14px;
}

a {
	text-decoration: none;
	color: var(--white);
	width: fit-content;
	height: fit-content;
}

b {
	font-weight: 700;
}

/* ANIMATION */
@-webkit-keyframes noise {
	to { transform: translate3d(-7rem,0,0) }
}

@keyframes noise {
	0% { transform: translate3d(0,9rem,0) }
	10% { transform: translate3d(-1rem,-4rem,0) }
	20% { transform: translate3d(-8rem,2rem,0) }
	30% { transform: translate3d(9rem,-9rem,0) }
	40% { transform: translate3d(-2rem,7rem,0) }
	50% { transform: translate3d(-9rem,-4rem,0) }
	60% { transform: translate3d(2rem,6rem,0) }
	70% { transform: translate3d(7rem,-8rem,0) }
	80% { transform: translate3d(-9rem,1rem,0) }
	90% { transform: translate3d(6rem,-5rem,0) }
	to { transform: translate3d(-7rem,0,0) }
}

@keyframes float {
	0% { transform: translate3d(-77%, 0%, 0); }
	9% { transform: translate3d(-23%, -61%, 0); }
	18% { transform: translate3d(45%, -19%, 0); }
	27% { transform: translate3d(-67%, 54%, 0); }
	36% { transform: translate3d(33%, -72%, 0); }
	45% { transform: translate3d(-58%, 29%, 0); }
	54% { transform: translate3d(71%, -41%, 0); }
	63% { transform: translate3d(-39%, 68%, 0); }
	72% { transform: translate3d(56%, -83%, 0); }
	81% { transform: translate3d(-91%, 12%, 0); }
	90% { transform: translate3d(24%, -65%, 0); }
	100% { transform: translate3d(-77%, 0%, 0); }
}

/* CURSOR */
.cursor-1,
.cursor-2 {
	position: fixed;
	border-radius: 500px;
	mix-blend-mode: difference;
	pointer-events: none;
	transition: background-color .15s, border .15s, width .3s ease-out, height .3s ease-out;
}

.cursor-1 {
	width: 25px;
	height: 25px;
	background-color: var(--white);
	border: 1px solid var(--white);
	z-index: 10;
	animation: easeInCursorSmall .3s cubic-bezier(0.215, 0.610, 0.355, 1);

	&.hovering {
		background-color: transparent;
	}
}

.cursor-2 {
	width: 250px;
	height: 250px;
	background-color: var(--white);
	z-index: 9;
	filter: blur(10px);
	border: 10px solid #601010;
	animation: easeInCursorBig .6s cubic-bezier(0.215, 0.610, 0.355, 1);

	&.hovering {
		width: 150px;
		height: 150px;
	}
}

/* NAV */
header {
	position: fixed;
	inset: 0 0 auto 0;
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: var(--gap-tiny);
	padding: 10px;
	mix-blend-mode: difference;
	z-index: 9999;

	.logo {
		width: 10vw;
		max-width: 150px;
		min-width: 100px;
		height: fit-content;
	}

	.menu {
		grid-column: 4 / 10;
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		gap: var(--gap-tiny);

		a {
			text-transform: uppercase;

			&:nth-of-type(1) {
				grid-column: 1 / 3;
			}

			&:nth-of-type(2) {
				grid-column: 3 / 5;
			}

			&:nth-of-type(3) {
				grid-column: 5 / 7;
			}

			@media (min-width:950px) {
				&:hover {
					font-style: italic;
				}
			}
		}
	}

	.theme-toggle {
		grid-column: 13;
		justify-self: end;
		width: 25px;
		height: 25px;
		background-color: var(--white);
		border: none;
		border-radius: 50%;
		cursor: pointer;
	}

	@media (max-width:950px) {
		grid-template-columns: repeat(6, 1fr);

		.logo {
			width: 15vw;
			max-width: 120px;
			min-width: 80px;
		}

		.menu {
			grid-column: 3 / 5;
			display: flex;
			flex-direction: column;
			align-items: flex-end;
			gap: 0;

			a {
				padding: 2px;
			}
		}

		.theme-toggle {
			grid-column: 6;
		}
	}
}
.menu a {
    position: relative;
    display: inline-block;
}

.rope-effect {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0px;
    height: 2px;
    background: linear-gradient(90deg, 
        currentColor 0%, 
        transparent 100%);
    transform-origin: left center;
    opacity: 0.6;
}

/* Variante con línea punteada para simular cuerda */
.rope-effect::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--white);
}
/* MAIN CONTENT */
main {
	display: flex;
	flex-direction: column;
	gap: var(--gap-big);
}

.grain-overlay {
	position: fixed;
	inset: 0;
	pointer-events: none;

	&:before {
		content: "";
		top: -10rem;
		left: -10rem;
		width: calc(100% + 20rem);
		height: calc(100% + 20rem);
		z-index: 9999;
		position: fixed;
		background-image: url(assets/images/Image_gaussian_noise_example.png);
		opacity: 0.15;
		pointer-events: none;
		-webkit-animation: noise 1s steps(2) infinite;
		animation: noise 1s steps(2) infinite;
	}
}

.banner {
	width: calc(100% - 20px);
	height: calc(100svh - 20px)	;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	gap: 30svh;
	position: relative;
	padding: 10px;

	.headline {
		color: var(--white);
		mix-blend-mode: difference;
		z-index: 1;

		p {
			font-size: clamp(14px, 2vw, 18px);
			text-transform: uppercase;
			max-width: 30ch;
		}
	}

	.main-content {
		width: 100%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: flex-end;

		h1,
		h2 {
			color: var(--white);
			mix-blend-mode: difference;
			z-index: 2;

			.word {
				opacity: 0;
			}
		}

		h1 {
			font-size: 6vw;
			text-transform: uppercase;
			text-wrap: balance;
			max-width: 70vw;
		}

		h2 {
			text-transform: uppercase;
			font-size: 30px;
			text-wrap: nowrap;
			width: fit-content;
			text-align: right;
			display: flex;
			flex-direction: column;
			align-items: flex-end;
		}
	}

	.background {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		overflow: hidden;

		span {
			position: absolute;
			display: block;
			width: 120vw;
			transform: translate3d(-77%, 0%, 0);
			aspect-ratio: 1;
			background: var(--white);
			border-radius: 50%;
            mix-blend-mode: difference;
            filter: blur(50px);
			border: 15px solid #601010;
			animation: float 30s var(--cubic-bezier) infinite;
		}

		span:nth-child(2) {
			animation-delay: 2s;
		}
	}

	@media (max-width:950px) {
		& {
			flex-direction: column;
            justify-content: flex-end;
            align-items: flex-start;
			gap: 10svh;

			.main-content {
				flex-direction: column;
				gap: 30svh;
				align-items: flex-start;

				h1 {
					font-size: 7.5vw;
					max-width: 90vw;
					align-self: flex-end;
                    text-align: right;
				}

				h2 {
					align-items: flex-start;
					text-align: left;
					font-size: 18px;
				}
			}

			.background {
				span {
					width: 150vw;
				}
			}
		}
	}
}

.featured-project {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	padding: 0 10px;

	.video-container {
		grid-column: 1 / 3;
		width: 100%;
		height: 100%;

		video {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}

	.project-info {
		grid-column: 3;
		display: flex;
		flex-direction: column;
		gap: var(--gap-medium);

		.top-info {
			display: flex;
			flex-direction: column;
			gap: 20px;
			text-transform: uppercase;
			color: var(--white);
			mix-blend-mode: difference;

			h4 {
				font-family: 'Albert', sans-serif;
                font-size: 5vw;
			}

			h5 {
				font-size: clamp(14px, 2vw, 18px);
				max-width: 70%;
				text-wrap: balance;
			}
		}

		.bottom-info {
			display: flex;
			flex-direction: column;
			gap: 40px;

			.description {
				max-width: 50ch;
				color: var(--white);
				mix-blend-mode: difference;
			}

			.technologies {
				display: flex;
				flex-direction: row;
				flex-wrap: wrap;
				gap: 10px;

				.technology {
					border: 1px solid var(--white);
                    color: var(--white);
                    mix-blend-mode: difference;
					border-radius: 50px;
					padding: 5px;
					text-transform: uppercase;
					font-size: clamp(16px, 2.25vw, 26px);
				}
			}
		}
	}

	@media (max-width:950px) {
		& {
			grid-template-columns: repeat(1, 1fr);
			gap: var(--gap-small);

			.video-container {
				grid-column: 1;
			}

			.project-info {
				grid-template-columns: repeat(1, 1fr);
				grid-column: 1;

				.top-info,
				.bottom-info {
					grid-column: auto;
				}

				.top-info {
					gap: 10px;

					h4 {
						font-size: 7.5vw;
					}

					h5 {
						max-width: max-content;
					}
				}

				.bottom-info {
					gap: 10px;

					.technologies {
						gap: 5px;
					}
				}
			}
		}
	}
}

.visit-button {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	background-color: var(--white);
	color: var(--black);
	mix-blend-mode: difference;
	font-size: clamp(14px, 2vw, 18px);
	text-transform: uppercase;
	padding: 20px;
	border-radius: 50px;

	svg {
		transition: transform .3s var(--cubic-bezier);
	}

	@media (min-width:950px) {
		&:hover {
			svg {
				transform: translateX(5px);
			}
		}
	}
}

.projects {
	display: flex;
	flex-direction: column;
	gap: var(--gap-small);
	mix-blend-mode: difference;

	h3 {
		font-size: 11.25vw;
		text-transform: uppercase;
		font-family: 'Albert', sans-serif;
		text-align: center;
		color: var(--white);
	}

	.post-grid {
		display: flex;
		flex-direction: column;
		padding: 20px 10px;

		.post {
			display: grid;
			grid-template-columns: repeat(12, 1fr);
			border-top: 1px solid var(--white);
			padding: 5px 0;
			width: 100%;
			position: relative;
			transition: border .3s;

			&:last-of-type {
				border-bottom: 1px solid var(--white);
			}

			h4,
			span {
				mix-blend-mode: difference;
				text-transform: uppercase;
			}

			h4 {
				grid-column: 1 / 6;
				font-size: clamp(20px, 3vw, 36px);
			}

			.year {
				grid-column: 6 / 7;
			}

			.type {
				grid-column: 7 / 11;
			}

			img {
				grid-column: 12 / 13;
				width: 100%;
				height: auto;
				filter: saturate(0);
			}

			&:after {
				content: "";
				position: absolute;
				inset: -1px -10px;
				background-color: var(--white);
				pointer-events: none;
				z-index: -1;
				opacity: 0;
				transition: opacity .1s;
			}

			@media (min-width:950px) {
				&:hover {
					font-style: italic;

					&:after {
						opacity: 1;
					}
				}
			}

			@media (max-width:950px) {
				& {
					grid-template-columns: repeat(6, 1fr);

					h4 {
						grid-column: 1 / 4;
					}

					.year {
						grid-column: 4 / 5;
					}

					.type {
						grid-column: 5 / 6;
					}

					img {
						grid-column: 6 / 7;
					}
				}
			}

			@media (max-width:550px) {
				& {
					padding: 5px 0 0;
					gap: var(--gap-tiny);
					grid-template-areas:
						"a a a"
						"b c c"
						"b c c";

					h4 {
                        order: 1;
						grid-column: 1 / 4;
                        grid-row: 1 / 2;
					}

					.year {
                        order: 3;
						grid-column: 1 / 2;
                        align-self: end;
					}

					.type {
                        order: 4;
						grid-column: 2 / 4;
                        align-self: end;
						text-align: right;
					}

					img {
						order: 2;
                        grid-column: 4 / 7;
                        grid-row: 1 / 3;
					}
				}
			}
		}

		@media (max-width:950px) {
			& {
				padding: 0 10px;
			}
		}
	}

	@media (max-width: 950px) {
		& {
			h3 {
				font-size: 11vw;
			}
		}
	}
}

.about {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--gap-small);
	padding: 10px;

	h3 {
		grid-column: 1 / 3;
		font-size: 11.25vw;
		text-transform: uppercase;
		font-family: 'Albert', sans-serif;
		text-align: center;
		color: var(--white);
		mix-blend-mode: difference;
	}

	.about-content {
		display: flex;
		flex-direction: column;
		justify-content: space-between;

		.skills {
			display: flex;
			flex-direction: row;
			flex-wrap: wrap;
			gap: var(--gap-tiny);
			max-width: 60rem;
			
			span {
				mix-blend-mode: difference;
				font-size: 2.5vw;
				padding: 0.25vw 0.75vw;
				border-radius: 100px;
				border: 1px solid var(--white);
				color: var(--white);
				text-transform: uppercase;
			}
		}
	}

	.description {
		max-width: 80ch;
		color: var(--white);
		mix-blend-mode: difference;

		p {
			font-size: clamp(14px, 2vw, 18px);
			text-transform: uppercase;
		}
	}

	img {
		width: 100%;
        height: auto;
        max-height: 100svh;
        object-fit: cover;
	}

	@media (max-width:950px) {
		& {
			grid-template-columns: repeat(1, 1fr);

			h3 {
				grid-column: 1 / 2;
				font-size: 11vw;
			}

			.about-content {
				gap: 40px;
				padding: 0 10px;

				.skills {
					justify-content: center;

					span {
						font-size: clamp(20px, 3vw, 36px);
					}
				}

				.description {
					padding: 10vw;
					text-align: center;
				}
			}
		}
	}

	@media (max-width:550px) {
		& {
			.about-content {
				.description {
					padding: 5vw;
				}
			}
		}
	}
}

footer {
	display: flex;
	flex-direction: column;
	gap: 20svh;
	mix-blend-mode: difference;
	padding: 20svh 10px 10px;
	position: relative;

	.social-links {
		display: flex;
		flex-direction: column;
		align-items: center;

		h4 {
			color: var(--white);
			text-transform: uppercase;
			font-size: clamp(20px, 3vw, 36px);
			max-width: 25ch;
			margin: auto;
			text-align: center;
			padding: 0 var(--gap-tiny);
			text-wrap: balance;
			margin-bottom: 50px;
		}

		.social-link {
			font-size: 11.25vw;
			text-transform: uppercase;
			font-family: 'Albert', sans-serif;
			text-align: center;

			@media (min-width:950px) {
				&:hover {
					font-style: italic;
				}
			}

			@media (max-width: 950px) {
				& {
					font-size: 11vw;
				}
			}
		}
	}

	.wpcf7 {
		margin-top: var(--gap-small);
		width: 100%;

		form {
			display: grid;
			grid-template-columns: repeat(2, 1fr);
			width: 100%;
			gap: var(--gap-tiny);

			.input-fields {
				display: flex;
				flex-direction: column;
				gap: calc(var(--gap-tiny) - 4px);

				p {
					display: block;
				}

				label {
					color: var(--white);
					position: relative;
					width: 100%;
					display: block;
					text-transform: uppercase;

					br {
						display: none;
					}

					input {
						padding: 20px;
						width: calc(100% - 40px);
					}

					input:-webkit-autofill,
					input:-webkit-autofill:hover, 
					input:-webkit-autofill:focus, 
					input:-webkit-autofill:active{
						-webkit-box-shadow: 0 0 0 300px var(--white) inset !important;
						color: var(--black);
					}

					textarea {
						padding: 20px;
						width: calc(100% - 40px);
						resize: none;
						height: 100%;
						max-height: 300px;
					}

					input,
					textarea {
						font-family: 'ClashGrotesk', sans-serif;
						font-weight: 500;
						display: block;
						background: transparent;
						color: var(--white);
						border: 1px solid var(--white);
						border-radius: 40px;
						font-size: clamp(14px, 2vw, 18px);

						&:focus-visible {
							outline: none;
						}
					}

					.wpcf7-not-valid-tip {
						margin-left: var(--gap-tiny);
						color: var(--white);
					}
				}
			}

			.wpcf7-submit {
				display: block;
				width: 100%;
				height: 100%;
				min-height: 50px;
				font-family: 'Albert', sans-serif;
				font-size: 6vw;
				text-transform: uppercase;
				color: var(--white);
				background-color: transparent;
				cursor: pointer;
				position: relative;
				border: 1px solid var(--white);
				border-radius: 40px;
				transition: color .3s;
				transition: background-color .3s, color .3s, border-radius .3s var(--cubic-bezier);

				@media (min-width: 950px) {
					&:hover {
						color: var(--black);
						background-color: var(--white);
						border-radius: 300px;
					}
				}

				@media (max-width: 950px) {
					background-color: var(--white);
					color: var(--black);
					border-radius: 300px;
				}
			}

			.wpcf7-response-output {
				color: var(--white);
				border: 1px solid var(--white);
				border-color: var(--white) !important;
				border-radius: 20px;
			}

			@media (max-width:950px) {
				& {
					grid-template-columns: repeat(1, 1fr);

					.input-fields {
						gap: 4px;
					}
				}
			}
		}
	}

	.legal {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;

		.volver-arriba,
		a {
			text-transform: uppercase;
			font-size: clamp(20px, 3vw, 36px);
			color: var(--white);
			cursor: pointer;
			line-height: 105%;

			&:last-of-type {
				text-align: right;
			}

			@media (min-width:950px) {
				&:hover {
					font-style: italic;
				}
			}

			@media (max-width:950px) {
				& {
					font-size: clamp(14px, 2vw, 18px);
					padding: 5px 0;
				}
			}
		}
	}
}

.legal-content {
	display: flex;
	flex-direction: column;
	max-width: 600px;
	margin: auto;
	padding: 100px 10px 10px;

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		padding-top: 20px;
	}

	ul,
	p {
		padding-top: 10px;
	}

	a {
		color: var(--white);
		mix-blend-mode: difference;
		text-decoration: underline;
	}

	ul {
		padding-left: 30px;
	}
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-animation: autofill 0s forwards;
    animation: autofill 0s forwards;
}

.dark-mode {
	background-color: var(--black);
	color: var(--white);

	/* .projects .post {
		border-top: 1px solid var(--white);

		&:last-of-type {
			border-bottom: 1px solid var(--white);
		}

		&:after {
			background-color: var(--white);
		}
	} */
}

.notification {
	position: fixed;
	left: 50%;
	bottom: 50%;
	transform: translateX(-50%);
	margin: 0;
	background-color: var(--black);
	color: var(--white);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 20px;
	border-radius: 10px;
	height: fit-content;
	width: fit-content;
	transform-origin: center center !important;
	animation: notificationIn .3s var(--cubic-bezier);

	p {
		font-size: 16px;
		white-space: nowrap;
		text-transform: uppercase;
	}

	svg {
		display: block;
		width: 25px;
		height: 25px;

		path {
		fill: var(--white);
		}
	}
}

@keyframes autofill {
    100% {
        background: transparent;
        color: inherit;
    }
}

@-webkit-keyframes autofill {
    100% {
        background: transparent;
        color: inherit;
    }
}

@keyframes notificationIn {
	from {
		transform: translateX(-50%) scale(0.7);
		filter: blur(10px);
		opacity: 0;
	}
	to {
		transform: translateX(-50%) scale(1);
		filter: blur(0);
		opacity: 1;
	}
}

@keyframes notificationOut {
	from {
		transform: translateX(-50%) scale(1);
		filter: blur(0);
		opacity: 1;
	}
	to {
		transform: translateX(-50%) scale(0.7);
		filter: blur(10px);
		opacity: 0;
	}
}

@keyframes easeInCursorSmall {
	from {
		width: 0;
		height: 0;
	}
	to {
		width: 25px;
		height: 25px;
	}
}

@keyframes easeInCursorBig {
	from {
		width: 0;
		height: 0;
	}
	to {
		width: 250px;
		height: 250px;
	}
}