/*
Theme Name: Avan & Peydaiesh
Theme URI: https://avanstudio.com
Author: Hamed
Description: Ultra-minimal brutalist architecture portfolio theme with multi-domain branding, Lottie splash intro, and Elementor-ready home canvas. Custom-coded, no page builder dependency required.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: avan-peydaiesh
Tested up to: 6.6
*/

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
	--bg: #000000;
	--fg: #ffffff;
	--bg-inverse: #ffffff;
	--fg-inverse: #000000;
	--line: rgba(255, 255, 255, 0.25);
	--gap: clamp(24px, 4vw, 64px);
	--ease: cubic-bezier(0.65, 0, 0.35, 1);
}

html, body { background: var(--bg); color: var(--fg); }

body {
	font-family: 'Suisse Intl', 'Helvetica Neue', Arial, -apple-system, sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: 0.01em;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ==========================================================================
   Layout shell
   ========================================================================== */
.site-header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 200;
	padding: var(--gap) var(--gap) 0;
	background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent 90%);
}

.site-header__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 18px;
}

.site-title {
	font-size: 13px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.site-title a { display: block; }

.menu-toggle {
	width: 28px; height: 18px;
	position: relative;
}
.menu-toggle span {
	position: absolute; left: 0; right: 0;
	height: 1px; background: var(--fg);
	transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; }
.menu-toggle span:nth-child(3) { bottom: 0; }
.menu-toggle.is-active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.site-header__line {
	height: 1px;
	width: 100%;
	background: var(--line);
}

/* ==========================================================================
   Overlay menu
   ========================================================================== */
.site-menu {
	position: fixed;
	inset: 0;
	z-index: 190;
	background: var(--bg);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: var(--gap);
	visibility: hidden;
	opacity: 0;
	transition: opacity .5s var(--ease), visibility 0s linear .5s;
}
.site-menu.is-open {
	visibility: visible;
	opacity: 1;
	transition: opacity .5s var(--ease);
}
.site-menu__inner {
	max-width: 420px;
	width: 100%;
	border-left: 1px dashed var(--line);
	padding-left: var(--gap);
}
.site-menu__list li {
	border-top: 1px solid var(--line);
}
.site-menu__list li:last-child { border-bottom: 1px solid var(--line); }
.site-menu__list a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 22px 0;
	font-size: clamp(20px, 2.4vw, 30px);
	font-weight: 300;
	opacity: 0;
	transform: translateX(24px);
	transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.site-menu.is-open .site-menu__list a {
	opacity: 1;
	transform: translateX(0);
}
.site-menu__list a .arrow { font-size: 14px; opacity: .6; }

/* ==========================================================================
   Splash screen
   ========================================================================== */
.splash {
	position: fixed;
	inset: 0;
	z-index: 500;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.splash__lottie {
	width: min(40vw, 420px);
	aspect-ratio: 1;
}
.splash__blink {
	position: fixed;
	inset: 0;
	z-index: 501;
	background: #000;
	opacity: 0;
	pointer-events: none;
}
.splash.is-leaving { transition: opacity .6s var(--ease); }

/* ==========================================================================
   Home
   ========================================================================== */
.home-canvas {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gap);
}

.home-canvas__stage {
	position: relative;
	width: min(60vw, 720px);
	aspect-ratio: 1;
}

.home-canvas__identity {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s var(--ease);
}
.home-canvas__identity.is-visible {
	opacity: 1;
	pointer-events: auto;
}
.home-canvas__identity h2 {
	font-size: clamp(20px, 2vw, 28px);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin-bottom: 12px;
}
.home-canvas__identity p {
	max-width: 360px;
	font-size: 14px;
	opacity: .7;
	margin: 0 auto;
}

.home-canvas__hover-zone {
	position: absolute;
	cursor: pointer;
}
.home-canvas__hover-zone--a { left: 0; top: 0; width: 55%; height: 60%; }
.home-canvas__hover-zone--p { right: 0; bottom: 0; width: 45%; height: 70%; }

.home-footer {
	position: fixed;
	bottom: var(--gap);
	left: var(--gap);
	right: var(--gap);
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	opacity: .5;
	z-index: 10;
}

@media (max-width: 768px) {
	.home-canvas__stage { width: 80vw; }
	.site-menu__inner { border-left: none; padding-left: 0; }
}

/* ==========================================================================
   Page transition loader
   ========================================================================== */
body.is-transitioning > .site-header,
body.is-transitioning > main,
body.is-transitioning > .site-menu,
body.is-transitioning > .home-footer {
	filter: blur(14px);
	transition: filter .5s var(--ease);
	pointer-events: none;
	user-select: none;
}

.ap-loader {
	position: fixed;
	inset: 0;
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.ap-loader.is-visible {
	opacity: 1;
	visibility: visible;
	transition: opacity .45s var(--ease);
}

.ap-loader__spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.18);
	border-top-color: #ffffff;
	animation: ap-spin .85s linear infinite;
}

@keyframes ap-spin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   Projects page
   ========================================================================== */
.projects-page {
	padding: 160px var(--gap) 60px;
	min-height: 100vh;
}

.projects-page__filters {
	display: flex;
	gap: 14px;
	margin-bottom: 56px;
}
.projects-page__filter {
	width: 20px; height: 20px;
	display: flex; align-items: center; justify-content: center;
}
.projects-page__filter-dot {
	width: 14px; height: 14px;
	border-radius: 50%;
	background: rgba(255,255,255,0.25);
	transition: background .3s var(--ease), transform .3s var(--ease);
}
.projects-page__filter.is-active .projects-page__filter-dot,
.projects-page__filter:hover .projects-page__filter-dot {
	background: #fff;
}

.projects-page__body {
	display: grid;
	grid-template-columns: 48px 1fr 48px minmax(280px, 38%);
	align-items: center;
	gap: 24px;
}

.projects-page__nav {
	font-size: 20px;
	opacity: .6;
	transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.projects-page__nav:hover { opacity: 1; transform: scale(1.15); }

.projects-page__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: clamp(16px, 2vw, 32px);
}

.projects-page__thumb {
	aspect-ratio: 1;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255,255,255,0.08);
	position: relative;
	transition: opacity .4s var(--ease), transform .4s var(--ease), background .4s var(--ease);
}
.projects-page__thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
}
.projects-page__thumb.is-dimmed { opacity: .25; }
.projects-page__thumb.is-active {
	box-shadow: 0 0 0 1px rgba(255,255,255,0.7);
	transform: scale(1.04);
}
.projects-page__thumb:hover { transform: scale(1.06); }

.projects-page__preview {
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.projects-page__preview-image-wrap {
	width: 100%;
	aspect-ratio: 4/3;
	background: #eee;
	overflow: hidden;
}
.projects-page__preview-image {
	width: 100%; height: 100%;
	object-fit: cover;
}
.projects-page__preview-text h3 {
	font-size: 20px;
	font-weight: 400;
	margin-bottom: 10px;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.projects-page__preview-text p {
	font-size: 14px;
	opacity: .7;
	margin-bottom: 18px;
}
.projects-page__preview-btn {
	display: inline-block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .1em;
	border-bottom: 1px solid var(--fg);
	padding-bottom: 4px;
	transition: opacity .3s var(--ease);
}
.projects-page__preview-btn:hover { opacity: .6; }

.projects-page__empty { opacity: .6; }

@media (max-width: 900px) {
	.projects-page__body {
		grid-template-columns: 32px 1fr 32px;
		grid-template-areas:
			"prev grid next"
			"preview preview preview";
	}
	.projects-page__nav--prev { grid-area: prev; }
	.projects-page__grid { grid-area: grid; }
	.projects-page__nav--next { grid-area: next; }
	.projects-page__preview { grid-area: preview; margin-top: 40px; }
	.projects-page__grid { grid-template-columns: repeat(3, 1fr); }
}
