/*
Theme Name: Folio
Theme URI: https://example.com/folio
Author: Folio
Description: A clean, responsive portfolio theme for photographers. Includes Home, About, Gallery and Contact page templates, a filterable gallery with lightbox, and a built-in contact form.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: folio
Tags: photography, portfolio, one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--paper: #f1f2f0;
	--mat: #e3e5e2;
	--ink: #16181b;
	--slate: #5b6168;
	--cyan: #1e4d7b;
	--cyan-deep: #143656;
	--mist: #aab0b7;
	--line: rgba(22, 24, 27, 0.16);
	--focus: var(--cyan);
	--gutter: clamp(1.25rem, 4vw, 3rem);
	--wide: 1320px;
	--font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

[hidden] {
	display: none !important;
}

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

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
}

:focus-visible {
	outline: 2px solid var(--focus);
	outline-offset: 3px;
}

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

.skip-link:focus {
	position: fixed !important;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.1rem;
	clip: auto;
	background: var(--ink);
	color: var(--paper);
}

.wrap {
	width: min(100% - 2 * var(--gutter), var(--wide));
	margin-inline: auto;
}

.section {
	padding-block: clamp(4rem, 9vw, 8rem);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
	margin: 0;
	font-weight: 300;
	font-stretch: 115%;
	line-height: 1.08;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.page-title {
	font-size: clamp(2.6rem, 7vw, 5.5rem);
	font-weight: 200;
	font-stretch: 125%;
	line-height: 1.02;
	letter-spacing: -0.025em;
}

h2,
.h2 {
	font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}

h3 {
	font-size: 1.25rem;
	font-weight: 500;
	font-stretch: 100%;
	letter-spacing: 0;
}

p {
	margin: 0;
}

.prose > * + * {
	margin-top: 1.2em;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
	max-width: 62ch;
}

.prose h2,
.prose h3 {
	margin-top: 2em;
}

.prose ul,
.prose ol {
	padding-left: 1.3em;
}

.prose blockquote {
	margin-inline: 0;
	padding-left: 1.25rem;
	border-left: 2px solid var(--cyan);
	color: var(--slate);
}

.prose a {
	color: var(--cyan);
}

/* WordPress core alignment + captions */
.alignleft {
	float: left;
	margin: 0.4rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.4rem 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption,
.wp-block-image figcaption,
figcaption {
	color: var(--slate);
	font-size: 0.9rem;
}

.alignwide {
	max-width: var(--wide);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
	display: inline-block;
	padding: 0.95em 1.7em;
	border: 1px solid var(--ink);
	border-radius: 2px;
	background: var(--ink);
	color: var(--paper);
	font: 500 1rem/1.2 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
	border-color: var(--cyan);
	background: var(--cyan);
}

.btn--light {
	border-color: var(--paper);
	background: var(--paper);
	color: var(--ink);
}

.btn--light:hover {
	border-color: var(--paper);
	background: transparent;
	color: var(--paper);
}

/* ==========================================================================
   Header and navigation
   ========================================================================== */
.site-header {
	position: relative;
	z-index: 20;
}

.site-header--overlay {
	position: absolute;
	inset: 0 0 auto 0;
	color: var(--paper);
	--focus: #fff;
}

.admin-bar .site-header--overlay {
	top: 32px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	width: min(100% - 2 * var(--gutter), var(--wide));
	margin-inline: auto;
	padding-block: 1.6rem;
}

.brand {
	position: relative;
	z-index: 2;
	color: inherit;
	font-size: 1.05rem;
	font-weight: 500;
	font-stretch: 125%;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.brand .custom-logo {
	width: auto;
	max-height: 2.75rem;
}

.site-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	display: inline-block;
	padding-block: 0.3rem;
	font-size: 0.97rem;
	font-weight: 450;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
	border-bottom-color: currentColor;
}

.nav-toggle {
	display: none;
	position: relative;
	z-index: 2;
	padding: 0.45rem 0;
	border: 0;
	background: none;
	color: inherit;
	font: 500 0.97rem/1 var(--font);
	cursor: pointer;
}

@media (max-width: 860px) {
	.js .nav-toggle {
		display: block;
	}

	.js .site-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 5rem var(--gutter) 3rem;
		background: var(--ink);
		color: var(--paper);
		--focus: #fff;
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s, visibility 0.25s;
	}

	.js .site-nav .menu {
		flex-direction: column;
		gap: 0.75rem;
	}

	.js .site-nav a {
		font-size: clamp(2rem, 9vw, 3rem);
		font-weight: 250;
		font-stretch: 120%;
	}

	.nav-open {
		overflow: hidden;
	}

	.nav-open .site-nav {
		opacity: 1;
		visibility: visible;
	}

	.nav-open .site-header {
		color: var(--paper);
		--focus: #fff;
	}
}

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

/* ==========================================================================
   Home: hero
   ========================================================================== */
.hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: end;
	min-height: 100vh;
	min-height: 100svh;
	background: linear-gradient(160deg, var(--cyan) 0%, #0d2740 100%);
	color: var(--paper);
	--focus: #fff;
}

.hero__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero--image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		to top,
		rgba(10, 14, 18, 0.74) 0%,
		rgba(10, 14, 18, 0.06) 55%,
		rgba(10, 14, 18, 0.38) 100%
	);
}

.hero__inner {
	width: min(100% - 2 * var(--gutter), var(--wide));
	margin-inline: auto;
	padding-bottom: clamp(2rem, 6vw, 5rem);
}

.hero__name {
	overflow: hidden;
	padding-bottom: 0.08em;
	font-size: clamp(3rem, 11.5vw, 10.5rem);
	font-weight: 200;
	font-stretch: 125%;
	line-height: 0.96;
	letter-spacing: -0.035em;
}

.hero__name span {
	display: inline-block;
	animation: folio-rise 1.1s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.hero__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 3rem;
	margin-top: clamp(1.25rem, 3vw, 2.25rem);
}

.hero__tagline {
	max-width: 38ch;
	font-size: 1.2rem;
	line-height: 1.5;
}

@keyframes folio-rise {
	from {
		transform: translateY(105%);
	}

	to {
		transform: translateY(0);
	}
}

/* ==========================================================================
   Home: selected work, about teaser, call to action
   ========================================================================== */
.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 2rem;
	margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-head a {
	font-weight: 500;
}

.teaser {
	display: grid;
	grid-template-columns: 5fr 6fr;
	gap: clamp(2rem, 6vw, 6rem);
	align-items: center;
}

.teaser--solo {
	grid-template-columns: minmax(0, 46rem);
}

.teaser__img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: var(--mat);
}

.teaser__body > * + * {
	margin-top: 1.4rem;
}

.teaser__body p {
	max-width: 52ch;
	font-size: 1.15rem;
}

.cta {
	background: var(--cyan);
	color: var(--paper);
	--focus: #fff;
}

.cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 2rem 4rem;
}

.cta h2 {
	max-width: 18ch;
	font-size: clamp(2rem, 5vw, 4rem);
	font-weight: 200;
	font-stretch: 125%;
}

.empty {
	padding: 3rem 1.5rem;
	border: 1px dashed var(--mist);
	color: var(--slate);
	text-align: left;
}

/* ==========================================================================
   Photo grid (shared by Home and Gallery)
   ========================================================================== */
.masonry {
	column-count: 3;
	column-gap: 1rem;
}

.tile {
	margin: 0 0 1rem;
	break-inside: avoid;
	background: var(--mat);
}

.tile a {
	display: block;
}

.tile img {
	width: 100%;
	height: auto;
}

[data-gallery] .tile a {
	cursor: zoom-in;
}

@media (max-width: 900px) {
	.masonry {
		column-count: 2;
	}
}

@media (max-width: 520px) {
	.masonry {
		column-count: 1;
	}
}

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-head {
	padding-top: clamp(2.5rem, 7vw, 5.5rem);
	padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.page-head .prose {
	margin-top: 1.5rem;
	font-size: 1.15rem;
}

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.75rem;
	margin-bottom: 2rem;
}

.filters button {
	padding: 0.4rem 0;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: var(--slate);
	font: 500 1rem/1.2 var(--font);
	cursor: pointer;
}

.filters button:hover {
	color: var(--ink);
}

.filters button[aria-pressed="true"] {
	border-bottom-color: var(--cyan);
	color: var(--ink);
}

.filter-status {
	margin-bottom: 1.25rem;
	color: var(--slate);
	font-size: 0.95rem;
}

/* About */
.about__grid {
	display: grid;
	grid-template-columns: 5fr 6fr;
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
	padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(4rem, 9vw, 8rem);
}

.about__grid--solo {
	grid-template-columns: minmax(0, 46rem);
}

.about__portrait {
	position: sticky;
	top: 2rem;
}

.about__portrait img {
	width: 100%;
	background: var(--mat);
}

.about__body .prose {
	margin-top: 2rem;
}

.about__body .prose > p:first-of-type {
	font-size: 1.3rem;
	line-height: 1.5;
}

.about__body .btn {
	margin-top: 2.5rem;
}

/* Contact */
.contact__grid {
	display: grid;
	grid-template-columns: 5fr 6fr;
	gap: clamp(2.5rem, 7vw, 7rem);
	align-items: start;
	padding-bottom: clamp(4rem, 9vw, 8rem);
}

.details {
	display: grid;
	gap: 1.4rem;
	margin: 2.5rem 0 0;
}

.details dt {
	color: var(--slate);
	font-size: 0.95rem;
}

.details dd {
	margin: 0.15rem 0 0;
	font-size: 1.15rem;
}

.form {
	display: grid;
	gap: 1.4rem;
}

.field label {
	display: block;
	margin-bottom: 0.4rem;
	font-weight: 500;
}

.field input,
.field select,
.field textarea {
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(22, 24, 27, 0.4);
	border-radius: 2px;
	background: #fff;
	color: var(--ink);
	font: inherit;
}

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

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
	outline: 2px solid var(--cyan);
	outline-offset: 1px;
	border-color: var(--cyan);
}

.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.notice {
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--cyan);
	background: var(--mat);
}

.notice--error {
	border-left-color: #9b2c2c;
}

/* Single photo */
.single-photo {
	padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 9vw, 7rem);
}

.single-photo__img {
	width: 100%;
	max-height: 82vh;
	object-fit: contain;
	object-position: left top;
}

.single-photo__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1.5rem 4rem;
	margin-top: 1.75rem;
}

.single-photo__meta h1 {
	font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.pager {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.pager a {
	font-weight: 500;
}

/* Blog / generic */
.entry + .entry {
	margin-top: 3.5rem;
	padding-top: 3.5rem;
	border-top: 1px solid var(--line);
}

.entry__title a {
	text-decoration: none;
}

.entry__title {
	margin-bottom: 1rem;
	font-size: clamp(1.7rem, 3.5vw, 2.6rem);
}

/* Gallery collections */
.collections {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem) 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.collection a {
	display: block;
	text-decoration: none;
}

.collection__img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--mat);
}

.collection__name {
	display: block;
	margin-top: 0.9rem;
	font-size: 1.5rem;
	font-weight: 300;
	font-stretch: 115%;
	line-height: 1.15;
}

.collection__count {
	display: block;
	color: var(--slate);
	font-size: 0.95rem;
}

.collection a:hover .collection__name {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

@media (max-width: 900px) {
	.collections {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.collections {
		grid-template-columns: 1fr;
	}
}

.filters a {
	padding: 0.4rem 0;
	color: var(--slate);
	font-weight: 500;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.filters a:hover {
	border-bottom-color: var(--cyan);
	color: var(--ink);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	background: var(--ink);
	color: var(--paper);
	--focus: #fff;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 2.5rem 4rem;
	padding-block: clamp(3rem, 7vw, 5.5rem);
}

.site-footer__name {
	font-size: clamp(1.8rem, 4vw, 3rem);
	font-weight: 200;
	font-stretch: 125%;
}

.site-footer__list {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__list span {
	color: var(--mist);
}

.site-footer__base {
	padding-block: 1.5rem 2rem;
	border-top: 1px solid rgba(241, 242, 240, 0.18);
	color: var(--mist);
	font-size: 0.9rem;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lb-open {
	overflow: hidden;
}

.lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	background: rgba(12, 14, 16, 0.96);
	color: var(--paper);
	--focus: #fff;
}

.lb__figure {
	display: grid;
	justify-items: center;
	gap: 0.9rem;
	max-width: 100%;
	margin: 0;
	padding: 4rem 4.5rem;
}

.lb__img {
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 10rem);
	max-height: calc(100svh - 10rem);
	object-fit: contain;
}

.lb__cap {
	min-height: 1.4em;
	color: var(--mist);
	font-size: 0.95rem;
	text-align: center;
}

.lb__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.lb__btn svg {
	width: 1.6rem;
	height: 1.6rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}

.lb__close {
	top: 0.75rem;
	right: 0.75rem;
}

.lb__prev {
	top: 50%;
	left: 0.75rem;
	transform: translateY(-50%);
}

.lb__next {
	top: 50%;
	right: 0.75rem;
	transform: translateY(-50%);
}

@media (max-width: 600px) {
	.lb__figure {
		padding: 4rem 0.75rem 3.5rem;
	}

	.lb__prev,
	.lb__next {
		top: auto;
		bottom: 0.5rem;
		transform: none;
	}

	.lb__prev {
		left: 1rem;
	}

	.lb__next {
		right: 1rem;
	}
}

/* ==========================================================================
   Responsive layout
   ========================================================================== */
@media (max-width: 860px) {
	.teaser,
	.about__grid,
	.contact__grid,
	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.about__portrait {
		position: static;
	}

	.about__portrait img {
		max-height: 70vh;
		object-fit: cover;
	}
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.hero__name span {
		animation: none;
	}

	.btn,
	.js .site-nav {
		transition: none;
	}
}
