/*
Theme Name: Malena
Theme URI: http://malena.test
Author: Malena
Description: Artist portfolio with a full-bleed two-column grid, project pages, and a contact page.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: malena
*/

:root {
	--bg: #fafafa;
	--ink: #000;
	--font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--step: 0.9vw;
}

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

html {
	height: 100%;
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: calc((1.1 - 1) * var(--step) + 1rem);
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
}

button,
input,
textarea {
	font-family: inherit;
}

.site-main {
	flex: 1 0 auto;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 20;
	padding: 0.5rem 0.8rem;
	background: #000;
	color: #fff;
}

.skip-link:focus {
	top: 1rem;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.header-bar {
	display: flex;
	align-items: center;
	gap: 1.4vw;
	padding: 2.5vw 3vw;
}

.site-title {
	color: inherit;
	font-size: calc((2 - 1) * var(--step) + 1rem);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

.site-nav {
	display: flex;
	gap: 1.4vw;
	margin-left: auto;
}

.site-nav a {
	color: inherit;
	font-size: calc((1.1 - 1) * var(--step) + 1rem);
	line-height: 1.7;
	text-decoration: none;
}

.site-nav a:hover,
.social a:hover,
.work-next a:hover {
	opacity: 0.55;
}

.social {
	display: flex;
	align-items: center;
	gap: 1.4vw;
	margin-left: 1.5vw;
}

.social a {
	display: flex;
	width: 20px;
	height: 20px;
	color: inherit;
}

.social svg {
	width: 20px;
	height: 20px;
}

.menu-toggle {
	display: none;
	width: 28px;
	height: 16px;
	margin-left: auto;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
	display: block;
	width: 28px;
	height: 1.5px;
	background: #000;
	position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
	content: "";
	position: absolute;
	left: 0;
}

.menu-toggle span::before {
	top: -7px;
}

.menu-toggle span::after {
	top: 7px;
}

.mobile-nav {
	display: none;
	flex-direction: column;
	gap: 0.75rem;
	padding: 0.5rem 6vw 2.5rem;
}

.mobile-nav.is-open {
	display: flex;
}

.mobile-nav .mobile-link {
	font-size: clamp(2.2rem, 10vw, 4rem);
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none;
}

.mobile-nav .social {
	margin: 1rem 0 0;
}

.work-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 3.3vw 3vw 4vw;
}

.work-card {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	color: inherit;
	background: #e8e8e8;
	text-decoration: none;
}

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

.work-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8%;
	background: var(--bg);
	opacity: 0;
	transition: opacity 0.45s ease;
}

.work-card__title {
	font-size: calc((2 - 1) * var(--step) + 1rem);
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
}

@media (hover: hover) {
	.work-card:hover .work-card__overlay,
	.work-card:focus-visible .work-card__overlay {
		opacity: 1;
	}
}

@media (hover: none) {
	.work-card__overlay {
		top: auto;
		align-items: flex-end;
		justify-content: flex-start;
		padding: 1.25rem;
		background: linear-gradient(to top, rgba(250, 250, 250, 0.94), rgba(250, 250, 250, 0));
		opacity: 1;
	}

	.work-card__title {
		text-align: left;
	}
}

.work-hero {
	width: 100%;
	height: calc(100svh - 5vw - 4.5rem);
	min-height: 320px;
	object-fit: cover;
	background: #e4e4e4;
}

.work-intro {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 6.5vw;
	align-items: start;
	padding: 6vw 12vw 5vw;
}

.work-intro h1,
.expertise {
	margin: 0;
	font-size: calc((2.8 - 1) * var(--step) + 1rem);
	font-weight: 700;
	line-height: 1.15;
}

.expertise {
	font-size: calc((2 - 1) * var(--step) + 1rem);
}

.work-copy p:last-child {
	margin-bottom: 0;
}

.work-gallery {
	display: flex;
	flex-direction: column;
	gap: 2.5vw;
	padding: 0 12vw 4vw;
}

.work-gallery img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background: #e4e4e4;
}

.work-next {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	padding: 3vw;
}

.work-next a {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.work-next .is-next {
	margin-left: auto;
	align-items: flex-end;
	text-align: right;
}

.work-next .label {
	font-size: calc((1.1 - 1) * var(--step) + 1rem);
}

.work-next .name {
	font-size: calc((2 - 1) * var(--step) + 1rem);
	font-weight: 700;
	line-height: 1.3;
}

.contact-hero {
	width: calc(100% - 24vw);
	margin: 3.3vw 12vw 0;
	aspect-ratio: 1.93 / 1;
	object-fit: cover;
	background: #e4e4e4;
}

.contact-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 3.6vw;
	align-items: start;
	padding: 6vw 12vw 3vw;
}

.contact-layout p {
	margin-top: 0;
}

.contact-meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-top: 2.2rem;
}

.meta-label {
	margin: 0;
	font-weight: 700;
}

.contact-meta a {
	text-decoration: none;
}

.contact-meta a:hover {
	text-decoration: underline;
}

.button {
	display: inline-block;
	margin-top: 2.2rem;
	padding: 0.9em 1.35em;
	border: 0;
	background: #000;
	color: #fafafa;
	font-size: 1rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.button:hover {
	opacity: 0.82;
}

.site-footer {
	margin-top: auto;
	padding: 4vw 3vw 3vw;
	text-align: center;
}

.site-footer .social {
	justify-content: center;
	margin: 0 0 0.8rem;
}

.site-footer p {
	margin: 0;
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 40;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(0, 0, 0, 0.45);
}

.modal.is-open {
	display: flex;
}

.modal-panel {
	position: relative;
	width: min(640px, 100%);
	max-height: calc(100vh - 3rem);
	overflow: auto;
	padding: 2.2rem 2rem 2rem;
	background: #fff;
}

.modal-panel h2 {
	margin: 0 3rem 1.4rem 0;
	font-size: calc((2 - 1) * var(--step) + 1rem);
	font-weight: 700;
	line-height: 1.2;
}

.modal-close {
	position: absolute;
	top: 1.1rem;
	right: 1.1rem;
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 1rem;
}

.field span {
	font-size: 0.95rem;
}

.field .req {
	color: #666;
	font-weight: 400;
}

.field input,
.field textarea {
	width: 100%;
	padding: 0.75rem 0.8rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 0;
	background: #fff;
	font-size: 1rem;
}

.field textarea {
	min-height: 8rem;
	resize: vertical;
}

.hp {
	position: absolute;
	left: -9999px;
}

.form-note {
	min-height: 1.4em;
	margin: 0 0 0.8rem;
}

.form-note.is-error {
	color: #8a1f1f;
}

.plain-page {
	max-width: 42rem;
	padding: 6vw 12vw;
}

.plain-page h1 {
	margin-top: 0;
	font-size: calc((2.8 - 1) * var(--step) + 1rem);
	line-height: 1.15;
}

@media (prefers-reduced-motion: reduce) {
	.work-card__overlay {
		transition: none;
	}
}

@media (max-width: 768px) {
	.site-nav,
	.header-social {
		display: none;
	}

	.menu-toggle {
		display: inline-flex;
		align-items: center;
	}

	.site-title {
		font-size: 2rem;
	}

	.header-bar {
		padding: 5vw;
	}

	.work-grid {
		grid-template-columns: 1fr;
		padding: 4vw;
	}

	.work-intro,
	.contact-layout,
	.form-row,
	.contact-meta {
		grid-template-columns: 1fr;
	}

	.work-intro,
	.contact-layout {
		gap: 1.5rem;
		padding: 8vw 6vw;
	}

	.contact-hero {
		width: auto;
		margin: 4vw 4vw 0;
	}

	.work-gallery {
		padding: 0 4vw 8vw;
	}

	.work-hero {
		height: 70vw;
		min-height: 240px;
	}

	.tour-caption {
		left: 1rem;
		right: 1rem;
		bottom: 7.5rem;
	}

	.tour-controls {
		flex-wrap: wrap;
	}
}

body.is-tour {
	height: 100%;
	overflow: hidden;
}

body.is-tour .site-header {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 8;
	background: linear-gradient(to bottom, rgba(250, 250, 250, 0.96), rgba(250, 250, 250, 0));
}

body.is-tour .site-main {
	flex: none;
	height: 100svh;
}

body.is-tour .site-footer {
	display: none;
}

body.admin-bar.is-tour .site-header {
	top: 32px;
}

.tour {
	height: 100%;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.tour::-webkit-scrollbar {
	display: none;
}

.tour-slide {
	position: relative;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #111;
}

.tour-frame {
	height: 100%;
	overflow: hidden;
}

.tour-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.08);
	transition: transform 0.2s linear;
}

.tour-caption {
	position: absolute;
	left: 3vw;
	bottom: 6.6rem;
	max-width: 34rem;
	padding: 1rem 1.15rem 0.9rem;
	background: rgba(250, 250, 250, 0.9);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.tour-slide.is-active .tour-caption {
	opacity: 1;
	transform: none;
}

.tour-kicker {
	margin: 0 0 0.25rem;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tour-kicker span {
	margin-left: 0.7rem;
}

.tour-caption h2 {
	margin: 0 0 0.35rem;
	font-size: calc((2 - 1) * var(--step) + 1rem);
	font-weight: 700;
	line-height: 1.15;
}

.tour-caption h2 a {
	text-decoration: none;
}

.tour-caption p:last-child {
	margin-bottom: 0;
}

.tour-ui {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 8;
	padding: 0 3vw 0.85rem;
	background: rgba(250, 250, 250, 0.94);
}

.tour-hint {
	margin: 0;
	padding-top: 0.45rem;
	font-size: 0.92rem;
}

.tour-progress {
	height: 2px;
	margin: 0.45rem 0 0.7rem;
	background: rgba(0, 0, 0, 0.12);
}

.tour-progress span {
	display: block;
	height: 100%;
	background: #000;
	transform: scaleX(0);
	transform-origin: left center;
}

.tour-controls {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.tour-controls > button {
	border: 0;
	background: transparent;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.tour-controls > button:hover {
	opacity: 0.55;
}

.tour-thumbs {
	display: flex;
	flex: 1;
	gap: 0.4rem;
	overflow-x: auto;
	scrollbar-width: none;
}

.tour-thumbs::-webkit-scrollbar {
	display: none;
}

.tour-thumbs button {
	flex: 0 0 auto;
	width: 54px;
	height: 40px;
	padding: 0;
	border: 0;
	background: #ddd;
	cursor: pointer;
	opacity: 0.55;
}

.tour-thumbs button[aria-current="true"] {
	opacity: 1;
	outline: 2px solid #000;
	outline-offset: 1px;
}

.tour-thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 782px) {
	body.admin-bar.is-tour .site-header {
		top: 46px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tour {
		scroll-behavior: auto;
	}

	.tour-image,
	.tour-caption {
		transition: none;
	}
}
