/*
Theme Name: Mich Folio
Theme URI: https://example.com/michelle-portfolio
Author: Michelle
Author URI: https://example.com/michelle-portfolio
Description: A minimal, airy photography portfolio theme inspired by minimalist photography portfolio sites — full-bleed fluid photo walls, generous whitespace, and a tiny typographic footer.
Version: 1.1.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mich-folio
Tags: photography, portfolio, minimal, custom-logo, featured-images
*/

/* ============ Fonts (Poppins — same family as the reference) ============ */
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 300;
	font-display: swap;
	src: url(assets/fonts/poppins-300.woff2) format('woff2');
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url(assets/fonts/poppins-400.woff2) format('woff2');
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url(assets/fonts/poppins-500.woff2) format('woff2');
}

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url(assets/fonts/poppins-600.woff2) format('woff2');
}

/* ============ Design tokens (measured from the reference site) ============
   Reference: light accent hsl(40,100%,98.82%) = #fffdf9 background, black text,
   Poppins everywhere, max page width 2626px, page padding 2vw (mobile 6vw).
   Type scale values: h1 3.3, h2 3.6, h3 2.0, h4 1.7, body 1.1, small 0.7.
   Desktop formula: min((v-1)*1.2vw+1rem, max((v-1)*0.012*2626+1rem, v*1rem)).
   Mobile portrait formula: (v-1)*0.012*min(100vh,900px)+1rem. */
:root {
	--mf-bg: #fffdf9;
	--mf-ink: #000;
	--mf-max-page-width: 2626px;
	--mf-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
	font-size: 16px; /* reference base font size */
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--mf-bg);
	color: var(--mf-ink);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-weight: 400;
	/* normal text, scale value 1.1 — resolves to ~17.6px on wide, fluid below */
	font-size: min(calc(0.12vw + 1rem), 1.1rem);
	line-height: 1.3;
	letter-spacing: 0.02em;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

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

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.03em;
	margin: 0;
}

/* Fluid heading scale — exact reference formulas baked to values:
   desktop: (v-1)*1.2vw + 1rem, capped to the reference's computed maxima. */
h1 {
	font-size: min(calc(2.76vw + 1rem), 88.48px);
}

h2 {
	font-size: min(calc(3.12vw + 1rem), 97.93px);
}

h3 {
	font-size: min(calc(1.2vw + 1rem), 47.51px);
}

h4 {
	font-size: min(calc(0.84vw + 1rem), 38.06px);
}

/* Mobile portrait: reference swaps vw for 0.012*min(100vh,900px). */
@media screen and (max-width: 767px) {
	h1 { font-size: calc(2.3 * calc(0.012 * min(100vh, 900px)) + 1rem); }
	h2 { font-size: calc(2.6 * calc(0.012 * min(100vh, 900px)) + 1rem); }
	h3 { font-size: calc(1.0 * calc(0.012 * min(100vh, 900px)) + 1rem); }
	h4 { font-size: calc(0.7 * calc(0.012 * min(100vh, 900px)) + 1rem); }
}

p {
	margin: 0 0 1.5em;
}

/* ============ Post body — balanced editorial hierarchy ============ */
/* Text reads in a 46rem measure on the left; images/columns keep the
   full content width so the grid stays aligned with the hero above. */
.page-content > p,
.page-content > h2,
.page-content > h3,
.page-content > .wp-block-quote {
	max-width: 46rem;
	margin-left: 0;
	margin-right: auto;
}

.page-content p {
	font-size: 1.125rem;
	line-height: 1.75;
	letter-spacing: 0.01em;
}

.page-content h2 {
	font-size: 1.55rem;
	letter-spacing: -0.02em;
	margin-top: 2.6em;
	margin-bottom: 0.9em;
}

.page-content h3 {
	font-size: 1.25rem;
	letter-spacing: -0.015em;
	margin-top: 2.2em;
	margin-bottom: 0.8em;
}

.page-content .wp-block-quote {
	font-size: 1.45rem;
	line-height: 1.4;
	letter-spacing: -0.02em;
	margin-top: 2.4em;
	margin-bottom: 2.4em;
	padding: 0.25em 0 0.25em 1.2em;
	border-left: 1px solid currentColor;
}

.page-content .wp-block-image {
	margin: 2em 0;
}

.page-content .wp-block-image.size-full img {
	width: 100%;
	height: auto;
}

.page-content .wp-block-columns {
	gap: 2vw;
	margin: 2em 0;
}

.page-content figcaption {
	font-size: 0.85rem;
	line-height: 1.45;
	letter-spacing: 0.03em;
	opacity: 0.6;
	margin-top: 0.85rem;
}

@media screen and (max-width: 767px) {
	.page-content h2 { font-size: 1.35rem; }
	.page-content .wp-block-quote { font-size: 1.25rem; }
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* Content wrapper: reference content-width--medium = 75% of the section
   container (wide/media sections = 100%). Capped at 2626px. */
.wrap {
	width: 75%;
	max-width: var(--mf-max-page-width);
	margin: 0 auto;
}

@media screen and (max-width: 767px) {
	.wrap {
		width: calc(100% - 12vw); /* mobile content: 6vw page padding each side */
	}
}

/* Full-width wrapper: for the hero question — matches the reference grid
   section padding (2vw desktop / 6vw mobile) on full bleed width. */
.wrap--full {
	width: 100%;
	max-width: 100%;
	padding: 0 2vw;
}

@media screen and (max-width: 767px) {
	.wrap--full {
		padding: 0 6vw;
	}
}

/* ============ Header (reference: padding 3vw top / 3vw sides / 0 bottom) ============ */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	width: 100%;
	max-width: var(--mf-max-page-width);
	margin: 0 auto;
	padding: 3vw 33px 0;
}

/* Reference header rule is universal: 3vw 3vw 0 at all widths. */
@media screen and (max-width: 476px) {
	.site-header {
		flex-wrap: wrap;
		gap: 1rem;
	}
}

.site-title,
.site-title a {
	font-size: 1.5rem; /* reference site-title font-size-value: 1.5 */
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.03em;
}

.site-title {
	margin: 0;
}

.site-branding .custom-logo-link img,
.site-title-logo a img {
	height: 34px;
	width: auto;
	display: block;
}

.site-title-logo a {
	text-decoration: none;
	line-height: 0;
	display: inline-block;
}

@media screen and (max-width: 767px) {
	.site-title-logo a img {
		height: 26px;
	}
}

.site-description {
	display: none;
}

.main-navigation ul {
	list-style: none;
	display: flex;
	margin: 0;
	padding: 0;
}

.main-navigation li {
	margin: 0 0.7vw; /* reference nav item side margins */
}

.main-navigation a {
	display: inline-flex;
	align-items: center;
	font-size: min(calc(0.12vw + 1rem), 1.1rem); /* nav = normal text size 1.1 */
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.02em;
	padding-bottom: 2px;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 300ms var(--mf-ease);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	border-bottom-color: currentColor;
	text-decoration: none;
}

/* ============ Home: hero question ============
   Reference hero: small-height section, padding 3.3vmax mobile / 6.6vmax
   desktop on the content wrapper; heading spans ~92% of the canvas. */
.fluid-question {
	width: 92%; /* block spans ~92% of the reference canvas */
	margin: 6.6vmax 0; /* section-height--small desktop padding */
}

@media screen and (max-width: 767px) {
	.fluid-question {
		width: 100%; /* mobile: block spans all 8 grid cells */
		margin: 3.3vmax 0; /* section-height--small mobile padding */
	}
}

/* ============ Home: four-column 4:3 photo grid ============
   Reference gallery: full width, section padding = page padding on all
   sides. Gap = 150px at 2626px max width = 5.709826% of container, 11px mobile. */
.fluid-section-full {
	width: 100%;
	padding: 2vw 33px 2vw; /* user-corrected: grid edges align to site grid (33px side padding) */
}

@media screen and (max-width: 767px) {
	.fluid-section-full {
		padding: 6vw 33px;
	}
}

.fluid-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-column-gap: 7.5vw;
	grid-row-gap: 7.5vw;
	width: 100%;
}

.fluid-item {
	margin: 0;
	opacity: 0;
	transform: scale(0.92); /* reference reveal: scale-up from 0.92 */
	transition:
		opacity 800ms var(--mf-ease),
		transform 800ms var(--mf-ease);
	will-change: opacity, transform;
}

.fluid-item.is-visible {
	opacity: 1;
	transform: scale(1);
}

.fluid-item a {
	display: block;
}

.fluid-item .fluid-frame {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

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

@media (max-width: 767px) {
	.fluid-grid {
		grid-template-columns: 1fr;
		column-gap: 0;
		row-gap: 11px;
	}

	.fluid-item .fluid-frame {
		aspect-ratio: auto;
	}

	.fluid-item .fluid-frame img {
		height: auto;
		object-fit: initial;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fluid-item {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ============ Text reveal (fade-up, measured 25px/800ms) ============ */
.mf-reveal-text {
	opacity: 0;
	transform: translateY(25px);
	transition:
		opacity 800ms var(--mf-ease),
		transform 800ms var(--mf-ease);
	will-change: opacity, transform;
}

.mf-reveal-text.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.mf-reveal-text {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ============ Photo captions (reference gallery hides them) ============ */
.fluid-caption {
	display: none;
}

/* ============ Single photograph ============ */
.single-photo-hero {
	margin-top: clamp(1rem, 4vw, 3rem);
}

.single-photo-hero img {
	width: 100%;
	max-height: 88vh;
	object-fit: contain;
	object-position: center top;
}

.single-photo-meta {
	margin: 1rem 0 4rem;
	font-size: min(calc(0.12vw + 1rem), 1.1rem);
	letter-spacing: 0.02em;
}

/* ============ Pages ============ */
.page-content {
	margin: 6.6vmax 0;
	font-size: min(calc(0.12vw + 1rem), 1.1rem);
	line-height: 1.3;
	letter-spacing: 0.02em;
}

@media screen and (max-width: 767px) {
	.page-content {
		margin: 3.3vmax 0;
	}
}

.page-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.page-title {
	margin: 0 0 2rem;
}

/* ============ Homepage bottom rule (thin hairline above marquee) ============ */
.mf-hr-wrap {
	width: 100%;
	max-width: var(--mf-max-page-width);
	margin: 0 auto;
	padding: 6.6vmax 2vw 0;
}

@media screen and (max-width: 767px) {
	.mf-hr-wrap {
		padding: 3.3vmax 6vw 0;
	}
}

.mf-lg-rule {
	border: 0;
	border-top: 1px solid currentColor;
	width: 100%;
	margin: 0;
	opacity: 1;
}

/* ============ Marquee band (reference scrolling block) ============
   Text style heading-1 rendered via item font-size value 3.0 (48px),
   items separated by right-padding 1.4em, band padding 3% top/bottom,
   direction: right, engine speed 0.5 (see footer.php for px/s note). */
.mf-marquee {
	width: 100%;
	overflow: hidden;
	margin: 0;
	padding: 3% 0;
}

.mf-marquee-track {
	display: flex;
	width: max-content;
	animation: mf-marquee-scroll 42s linear infinite;
	will-change: transform;
	backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.mf-marquee-track { animation: none; }
}

.mf-marquee:hover .mf-marquee-track {
	animation-play-state: paused; /* reference: paused-on-hover true */
}

.mf-marquee-item {
	display: block;
	white-space: nowrap;
	padding-right: 1.4em;
	font-size: min(calc(2.4vw + 1rem), 79.36px); /* marquee size value 3.0 */
	line-height: 1.4;
	font-weight: 400;
	letter-spacing: -0.03em;
}

@media screen and (max-width: 767px) {
	.mf-marquee-item {
		font-size: calc(2 * calc(0.012 * min(100vh, 900px)) + 1rem);
	}
}

/* Direction: right — track slides from -50% back to 0 and loops. */
@keyframes mf-marquee-scroll {
	from {
		transform: translate3d(-50%, 0, 0);
	}
	to {
		transform: translate3d(0, 0, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mf-marquee-track {
		animation: none;
	}
}

/* ============ Copyright / meta line below the marquee ============ */
.footer-meta {
	width: 100%;
	max-width: var(--mf-max-page-width);
	margin: 0 auto;
	padding: 6.6vmax 2vw;
	letter-spacing: 0.02em;
}

@media screen and (max-width: 767px) {
	.footer-meta {
		padding: 3.3vmax 6vw;
	}
}

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

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75em 1.25em;
	background: #000;
	color: var(--mf-bg);
	z-index: 100;
	font-size: 0.875rem;
}

::selection {
	background: #000;
	color: var(--mf-bg);
}

/* ============ Block editor support ============ */
.page-content .alignwide,
.front-page-content .alignwide {
	margin-left: calc(50% - 38vw);
	margin-right: calc(50% - 38vw);
	max-width: 76vw;
}

.page-content .alignfull,
.front-page-content .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
}

.page-content .alignfull img {
	width: 100vw;
	max-width: 100vw;
}

@media (max-width: 767px) {
	.page-content .alignwide,
	.front-page-content .alignwide {
		margin-left: 0;
		margin-right: 0;
		max-width: 100%;
	}
}

.mf-minimal-caption {
	font-size: 1rem;
	letter-spacing: 0.02em;
}

.mf-grid-row {
	gap: clamp(0.75rem, 2vw, 1.75rem);
	align-items: flex-start;
}

.mf-contact-block {
	max-width: 52ch;
}

.wp-block-image figcaption,
.wp-caption .wp-caption-text {
	font-size: 1rem;
	letter-spacing: 0.02em;
	margin-top: 0.75rem;
}

/* ============ Expand viewer (FLIP overlay) ============ */
.mf-expandable {
	cursor: zoom-in;
	touch-action: manipulation; /* prevent double-tap zoom interference */
}

.mf-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	contain: layout style; /* isolate overlay from page layout */
}

.mf-overlay[hidden] {
	display: none;
}

.mf-overlay-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 9, 0.88);
	opacity: 0;
}

.mf-overlay-figure {
	position: absolute; /* FLIP: JS positions at fit-rect; transforms fly it */
	margin: 0;
	transform-origin: center center;
	touch-action: manipulation;
	outline: none;
}

.mf-overlay-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.mf-overlay-caption {
	position: absolute;
	left: 0;
	bottom: 0;
	padding: 1rem 1.25rem;
	max-width: min(70ch, 85%);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	font-size: 1rem;
	letter-spacing: 0.02em;
	color: rgba(255, 253, 249, 0.92);
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity 800ms var(--mf-ease),
		transform 800ms var(--mf-ease);
	pointer-events: none;
}

.mf-overlay-caption.is-visible {
	opacity: 1;
	transform: none;
}

.mf-overlay-close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 44px; /* ≥44px tap target */
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(255, 253, 249, 0.9);
	cursor: pointer;
}

@media (max-width: 767px) {
	.mf-overlay-close {
		top: max(0.5rem, env(safe-area-inset-top, 0px));
		right: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mf-overlay-caption {
		transition: none;
		opacity: 1;
		transform: none;
	}
}
