/* ========== RESET Y BASE ========== */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-padding-top: 0px;
	scroll-behavior: smooth;
}

body {
	font-family: 'Hartone Softed', sans-serif;
	color: #e6d17a !important;
	font-weight: normal;
}

:root {
  --x: 20px;
  --y: 10px;
}

/* ========== FUENTES ========== */
@font-face {
	font-family: 'Hartone Softed';
	src: 
		url('./assets/fonts/HartoneSofted-Regular.woff2') format('woff2'),
		url('./assets/fonts/HartoneSofted-Regular.otf') format('opentype');
	font-display: swap;
}

@font-face {
	font-family: 'Snell';
	src: 
		url('./assets/fonts/subset-SnellBT-Regular.woff2') format('woff2'),
		url('./assets/fonts/subset-SnellBT-Regular.woff') format('woff');
	font-weight: normal;
	font-style: italic;
	font-display: swap;
}

a, .cursor {
  cursor: url("SVG/cursor.svg") 0 0, pointer;
}

/* ========== LOGO ========== */
.logo .gold {
	opacity: 0;
	transition: opacity 0.3s;
}

.logo .black {
	transition: transform 0.3s, fill 0.3s;
	fill: #e3d68e;
}

.logo:hover .black {
	transform: translate(0,0);
	fill: #262626;
}

.logo:hover .gold {
	opacity: 1;
}

#pupila2 {
	transition: cx 0.1s, cy 0.1s;
}

.logo:hover #pupila2 {
	cx: 50.83;
	cy: 10.59;
}

.logo-svg {
	width: 120px;
	height: auto;
	cursor: pointer;
}

.logo-svg .cls-1, 
.logo-svg .cls-2 {
	transition: all 0.4s ease;
}

.logo-svg .cls-1 { fill: #e3d68e; }
.logo-svg .cls-2 { fill: transparent; }
.logo-svg:hover .cls-1 { fill: #262626; }
.logo-svg:hover .cls-2 { fill: #e3d68e; }

/* ========== HEADER ========== */
.site-header {
	position: fixed;
	display: flex;
	justify-content: space-between;
	top: 0;
	left: 0;
	width: 100%;
	padding: 1rem 2rem;
	z-index: 10;
	transition: opacity .3s ease, transform .3s ease;
}

.site-header a {
	min-width: 100px;
}

body.video-open .site-header {
	opacity: 0;
	transform: translateY(-20px);
	pointer-events: none;
}

.overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* Capas triangulares */
.layer {
  position: absolute;
  inset: 0;
  transform-origin: top left;
  clip-path: polygon(var(--x) var(--y), var(--x) var(--y), var(--x) var(--y));
  transition: clip-path 0.5s ease;
}

@keyframes openClose {
  0% {
	clip-path: polygon(var(--x) var(--y), var(--x) var(--y), var(--x) var(--y));
  }
  30% {
	clip-path: polygon(var(--x) var(--y), 0 100%, 40% 100%);
  }
  100% {
	clip-path: polygon(var(--x) var(--y), var(--x) var(--y), var(--x) var(--y));
  }
}

.l1 { background: #f9eddc; transition-delay: 0s; }
.l2 { background: #ffd400; transition-delay: 0.01s; }
.l3 { background: #f59a00; transition-delay: 0.02s; }

body.active .layer {
  transition-duration: 0.3s;
}
/* Estado activo */
body.active .l1 {
  clip-path: polygon(var(--x) var(--y), 0 100%, 40% 100%);
}

body.active .l2 {
  clip-path: polygon(var(--x) var(--y), 40% 100%, 70% 100%);
}

body.active .l3 {
  clip-path: polygon(var(--x) var(--y), 70% 100%, 100% 100%);
}



.menu-toggle {
	cursor: pointer;
	padding-top: 10px;
	font-size: 1.4rem;
	line-height: 1.4rem;
	display: flex;
	flex-direction: row;
	gap: 3rem;
}

/* ========== MENÚ ========== */
.menu {
	position: fixed;
	top: 70px;
	right: 20px;
	display: none;
	flex-direction: column;
	gap: 10px;
	z-index: 99;
}

.menu-item {
	position: relative;
	display: inline-block;
	padding: 10px 20px;
	font-size: 1.5rem;
	font-weight: normal;
	text-decoration: none;
	text-align: center;
	background: #e6d88a;
	color: #1e1e1e;
	border: 2px solid #1e1e1e;
	transition: transform 0.2s ease;
}

.menu-item::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #e6d88a;
	z-index: -1;
	opacity: 0;
	transform: translate(-8px, 8px);
}

.menu-item:hover,
.menu-item.active {
	background: #1e1e1e;
	color: #e6d88a;
	border: 2px solid #e6d88a;
}

.menu-item:hover::before,
.menu-item.active::before {
	opacity: 1;
}

.menu.open {
	display: flex;
}

/* ========== HERO ========== */
.hero {
	will-change: transform;
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	overflow: hidden;
	background: blueviolet;
	scroll-margin-top: 0;
}

:target #hero {
	transform: translateY(0) !important;
}

.hero-content {
	position: relative;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 32px;
	transition: opacity .4s ease, transform .4s ease;
}

.hero-content img {
	display: block;
	margin: 0 auto 20px;
}

.hero-content h1 {
	margin-top: 1.7rem;
	line-height: 1.4rem;
	font-size: 1.5rem !important;
	text-transform: uppercase;
	max-width: 800px;
	font-weight: normal;
	letter-spacing: 0.1rem;
}

.hero-video {
	position: absolute;
	inset: 0;
	z-index: 1;
}

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

.hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-image:
		linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)),
		linear-gradient(rgba(0,0,0,0.15) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0,0,0,0.15) 1px, transparent 1px);
	background-size: 100% 100%, 3px 3px, 3px 3px;
	transition: opacity .4s ease;
}

.hero-arrow {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	z-index: 2;
	animation: bounce 2s infinite;
}

@keyframes bounce {
	0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
	40% { transform: translateX(-50%) translateY(-10px); }
	60% { transform: translateX(-50%) translateY(-5px); }
}

.hero-close {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 4;
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s ease;
}

.hero.video-only {
	cursor: default;
}

.hero.video-only .hero-content {
	opacity: 0;
	transform: translateY(20px);
	pointer-events: none;
}

.hero.video-only .hero-overlay {
	opacity: 0;
}

.hero.video-only .hero-close {
	opacity: 1;
	pointer-events: auto;
}

/* ========== SECTIONS ========== */
section.content {
	padding: 60px 32px;
}

.section-2 {
	position: relative;
	top: 0;
	z-index: 5;
	background: #fff;
	height: 800px;
	padding: 60px 32px 120px;
	will-change: transform, clip-path;
	background: linear-gradient(
		to bottom,
		rgba(220, 63, 32, 0) 0%,
		rgba(220, 63, 32, 1) 15%,
		#DC3F20 100%
	);
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

.section-2-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	width: 100%;
	max-width: 1200px;
}

.section-3 {
	margin-top: -80px;
	position: relative;  
	min-height: 100vh;
	padding: 20px 32px;
	color: #fff;
	z-index: 6;
	background: linear-gradient(
		to bottom,
		#DC3F20 0%,
		#DC3F20 45%,
		#FAEFDB 45%,
		#FAEFDB 50%,
		#E69523 50%,
		#E69523 60%,
		#F2D037 60%,
		#F2D037 80%,
		#262626 80%,
		#262626 100%
	);
	background-attachment: scroll;
	background-size: 100% 100%;
	background-repeat: no-repeat;
}

/* ========== RULES ========== */
h2 {
	padding: 10px 30px;
	border: 2px solid #262626;
	color: #262626;
	text-transform: uppercase;
	font-size: 2rem;
	line-height: 2rem;
	background: #E3D68E;
	display: inline-flex;
	margin: 1.5rem 0;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-weight: normal;
}

h3 {
	margin: 0 auto;
}

.rules {
	font-size: 1.5rem;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.rules ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	text-align: center;
	width: 100%;
}

.rules li {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	font-size: 2rem;
	line-height: 2rem;
	opacity: 0; 
	transform: translateY(20px);
}

.rules ul.animate li {
  animation: fadeUp 0.6s ease forwards;
}

ul.animate li:nth-child(1) { animation-delay: 0.2s; }
ul.animate li:nth-child(2) { animation-delay: 0.6s; }
ul.animate li:nth-child(3) { animation-delay: 1s; }
ul.animate li:nth-child(4) { animation-delay: 1.4s; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;            
    transform: translateY(0);
  }
}

.rules li span {
	font-family: 'Snell', sans-serif;
	font-size: inherit;
	font-weight: bold;
}

span svg {
	max-height: 45px;
}

/* ========== EFECTO PUPILA ========== */
#pupila {
	transform-box: fill-box;
	transform-origin: center;
}

.mirar-derecha #pupila { transform: translateX(10px); }
.mirar-izquierda #pupila { transform: translateX(-10px); }
.mirar-arriba #pupila { transform: translateY(-6px); }
.mirar-abajo #pupila { transform: translateY(6px); }

/* ========== WORKS ========== */
.work-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	position: relative;
}

.works-title {
	position: sticky;
	top: 60px;
	z-index: 7;
	margin-bottom: 60px;
	background: transparent;
}

.works-title h2 {
	margin: 0;
	backdrop-filter: blur(8px);
	background: rgba(227, 214, 142, 0.95);
}

.works-title .subtitle {
	font-size: 1.2rem;
	color: #DC3F20;
	margin: 0 0 0 1rem;
	font-weight: normal;
}

.items-container {
	width: 100%;
	max-width: 850px;
	margin: 0 auto;
	position: relative;
	z-index: 5;
}

.items {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 0 auto;
	width: 100%;
	transition:
		filter 0.4s cubic-bezier(.4,0,.2,1),
		opacity 0.4s cubic-bezier(.4,0,.2,1);
}

.items:has(.wrapper:hover) .wrapper:not(:hover) {
	filter: blur(0px);
	opacity: 0.95;
}

.items:hover .wrapper:hover {
	filter: blur(0px);
	opacity: 1;
}

/* WRAPPER ORIGINAL */
.wrapper {
	position: relative;
	width: 100%;
	height: 260px;
}

.shadow {
	position: absolute;
	top: -20px;
	left: 0px;
	width: 440px;
	height: 280px;
	background: #262626;
	z-index: 0;
	clip-path: polygon(
		20px 0,
		100% 0,
		100% calc(100% - 20px),
		calc(100% - 20px) 100%,
		0 100%,
		0 20px
	);
	opacity: 0;
	transform: translate(-20px, 20px);
	transition: transform 0.3s ease, opacity 0.2s ease, z-index 0s;
}

.card {
	cursor: pointer;
	transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transform-style: preserve-3d;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	overflow: hidden;
	background: #aaa;
}

/* HOVER ORIGINAL */
.wrapper:hover .shadow {
	opacity: 1;
	transform: translate(0, 0);
	z-index: 50;
}

.wrapper:hover .card {
	transform: translate(20px, -20px);
	z-index: 100;
}

.card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.card-number {
	position: absolute;
	top: 10px;
	left: 10px;
	background: rgba(0,0,0,0.7);
	color: white;
	padding: 5px 10px;
	border-radius: 3px;
	z-index: 2;
	font-size: 14px;
}

.card-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 24px;
	background: linear-gradient(transparent, rgba(0,0,0,0.7));
	color: white;
	transform: translateY(10px);
	opacity: 0;
	transition: all 0.4s ease;
}

.card:hover .card-content {
	transform: translateY(0);
	opacity: 1;
}

.card-title {
	font-size: 1.5rem;
	font-weight: normal;
	margin-bottom: 8px;
	text-align: center;
}

/* BOTÓN LOAD MORE */
.load-more-container {
	margin-top: 80px;
	text-align: center;
	position: relative;
	z-index: 10;
}

.load-more-btn {
	padding: 15px 40px;
	background: #E3D68E;
	color: #262626;
	border: 2px solid #262626;
	font-size: 1.2rem;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-family: 'Hartone Softed', sans-serif;
}

.load-more-btn:hover {
	background: #262626;
	color: #E3D68E;
	border-color: #E3D68E;
	transform: translateY(-3px);
}

.load-more-btn.loading {
	opacity: 0.7;
	cursor: wait;
	pointer-events: none;
}

.loading-indicator {
	display: none;
	margin-top: 20px;
	color: #E3D68E;
	font-size: 0.9rem;
	font-family: 'Hartone Softed', sans-serif;
}

.loading-indicator.active {
	display: block;
	animation: pulse 1.5s infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 0.6; }
	50% { opacity: 1; }
}

/* ========== ABOUT SECTION ========== */
.about {
	position: relative;
	height: auto;
	background: #dc3f20;
	overflow: hidden;
	padding: 60px 0 0 0;
	display: flex;
	align-items: center;
	flex-direction: column;
}

.about-title {
	position: relative;
	z-index: 20;
	margin-top: 200px;
	text-align: center;
}

.about h2{
	margin: 0 auto;
	font-size: 4rem;
	background: transparent;
	border: none;
}

.about h3 {
	font-size: 1.5rem;
	font-weight: normal;
	border: 2px solid #262626;
	color: #E3D68E;
	background: #DC3F20;
	padding: 0.5rem 1rem;
	letter-spacing: 0.05rem;
}

.beam {
	position: absolute;
	top: 80px;
	/*inset: 0;*/
	width: 100%;
	height: 100%;
	display: block;
}

/* CONTENEDOR */
.about .about-content {
	display: grid;
	grid-template-columns: 1fr;
	row-gap: 4rem;
	max-width: 1200px;
	margin: 5rem auto 2rem;
	padding: 4rem 1rem;
	position: relative;
}

/* ITEM */
.profile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 2rem 0;
}

/* VIDEO OVALADO */
.profile .media {
	width: 220px;
	height: 300px;
	overflow: hidden;
	margin-bottom: 2rem;
	clip-path: ellipse(50% 50% at 50% 50%);
}

.profile .media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: blueviolet;
}

/* NOMBRE */
.profile .name {
	font-size: 4rem;
	font-weight: normal;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.75rem;
}

/* DESCRIPCIÓN */
.profile .role {
	font-family: 'Montserrat';
	color: #262626;
	font-size: 0.95rem;
	line-height: 1.5;
	max-width: 260px;
	margin-bottom: 1.5rem;
}

/* EMAIL */
.profile .email {
	display: inline-block;
	font-size: 0.9rem;
	letter-spacing: 0.05rem;
	font-weight: normal;
	text-transform: uppercase;
	padding: 0.5rem 1rem;
	border: 2px solid currentColor;
	margin-bottom: 1.5rem;
	text-decoration: none;
}

/* REDES */
.profile .social {
	display: flex;
	gap: 0.75rem;
}

.profile .social a {
	width: 36px;
	height: 36px;
	border: 2px solid currentColor;
	background: #262626;
	display: grid;
	place-items: center;
	text-decoration: none;
	font-size: 0.75rem;
}

/* ========== ODD/EVEN PROFILE STYLES ========== */
.profile:nth-child(odd) .name {
	color: #DC3F20;
}

.profile:nth-child(odd) .email {
	color: #E3D68E;
	background: #DC3F20;
	border-color: #262626;
}

.profile:nth-child(odd) .social a {
	border-color: #DC3F20;
}

.profile:nth-child(even) .name {
	color: #E3D68E;
}

.profile:nth-child(even) .email {
	color: #DC3F20;
	background: #E3D68E;
	border-color: #262626;
}

.profile:nth-child(even) .social a {
	border-color: #E3D68E;
}

/* ========== CLIENTS SECTION ========== */
.clients {
	background: linear-gradient(
		to bottom,
		rgba(38, 38, 38, 0) 0%,
		rgba(38, 38, 38, 1) 15%,
		#262626 100%
	);
	z-index: 10;
	position: relative;
	margin-top: -5rem;
	color: #E3D68E;
	padding: 8rem 0 6rem;
	overflow: hidden;
	min-height: 500px;
	align-items: center;
	display: flex;
	flex-direction: column;
}

.clients h2{
	border: 2px solid #E3D68E;
	color: #E3D68E;
	background: transparent;
	margin: 2rem auto 5rem;
}

.clients-marquee {
	overflow: hidden;
	width: 100%;
}

.clients-track {
	display: flex;
	gap: 4rem;
	width: max-content;
	animation: scroll 35s linear infinite;
}

.clients-marquee:hover .clients-track {
	animation-play-state: paused;
}

.clients-track img {
	height: 45px;
	width: 100%;
	opacity: 0.9;
	pointer-events: none;
	user-select: none;
}

@keyframes scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

/* ========== FOOTER ========== */
.footer {
	background: #E3D68E;
	color: #262626;
	display: flex;
	flex-direction: row;
	align-items: center;
	padding: 1rem 2rem;
	gap: 1rem;
	justify-content: space-between;
}

.footer-left {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.footer-contact {
	display: flex;
	gap: inherit;
}

.footer-btn {
	border: 2px solid #262626;
	padding: 0.5rem 1rem;
	text-transform: uppercase;
}

.footer-mail {
	border: 2px solid #DC3F20;
	padding: 0.5rem 1rem;
	color: #DC3F20;
}

.footer-social {
	display: flex;
	gap: 0.5rem;
}

.footer-social span {
	width: 36px;
	height: 36px;
	border: 2px solid #DC3F20;
	display: grid;
	place-items: center;
}

.footer-info {
	font-family: 'Montserrat', sans-serif;
	font-size: 0.75rem;
	text-align: left;
}

.footer-logo {
	font-size: 3rem;
	text-align: right;
}

/* ========== BOTONES SVG ========== */
.btn-svg {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 45px;
	height: 45px;
}

/* ---------- BG ---------- */
.btn-svg .bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* BACK */
.btn-svg .back {
	opacity: 0;
	transition: opacity 0.25s ease;
}

/* FRONT */
.btn-svg .front {
	transition: transform 0.25s ease;
}

/* ---------- CONTENT ---------- */
.btn-svg .icon {
	position: relative;
	z-index: 1;
	transition: transform 0.25s ease;
}

/* ---------- HOVER ---------- */
.btn-svg:hover .back {
	opacity: 1;
}

.btn-svg:hover .front {
	transform: translate(7px, -5.5px);
}

/* ========== MEDIA QUERIES ========== */

/* TABLET + DESKTOP */
@media (min-width: 768px) {
	.about .about-content {
		grid-template-columns: repeat(3, 1fr);
		column-gap: 3rem;
		row-gap: 0;
	}
}

@media (max-width: 900px) {
	.items {
		grid-template-columns: 1fr;
		max-width: 420px;
	}
	
	.wrapper {
		height: 260px;
	}
	
	.shadow {
		width: 100%;
		height: calc(100% + 20px);
	}
}

@media (max-width: 768px) {
	.site-header {
		padding: 1rem 1rem;
	}
	.menu {
		right: 10px;
	}
	h2{
		max-width: 90%;
	}
	h3{
		max-width: 90%;
	}
	.section-2 {
		padding: 80px 20px;
	}
	
	.rules {
		font-size: 1.2rem;
	}
	
	.rules h2 {
	   /* font-size: 1.5rem;
		line-height: 1.5rem;
		padding: 8px 20px;*/
	}
	
	.rules ul {
		gap: 1rem;
	}
	
	.works-title {
		top: 60px;
	}
	
	.works-title h2 {
		/*font-size: 1.5rem;
		line-height: 1.5rem;
		padding: 8px 20px;*/
	}
	
	.works-title .subtitle {
		font-size: 0.8rem;
		margin: 0 0 0 0.5rem;
	}
	
	.section-3 {
		padding: 100px 20px;
	}

	.about .about-content {
		padding: 4rem 0;
	}
	.profile:nth-child(odd) {
		background: #DC3F20;
	}

	.profile:nth-child(odd) {
		background: #E3D68E;
	}

	.footer {
		flex-direction: column;
		padding: 2rem 1rem;
	}
	.footer-left {
		flex-direction: column;
	}
	.footer-contact , .footer-info{
		width: 100%;
		text-align: center;
	}
}