/*
Theme Name: blur.photography
Theme URI: https://blur.photography
Author: Jon Lopez
Author URI: https://jonlopezphotography.com
Description: Life is a blur. Photography is forever. A literary essay-and-image block theme — generous space, a still anchored frame, and one signature interaction: blur resolving to sharp.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blur-photography
Tags: blog, photography, full-site-editing, block-patterns, one-column
*/

/* ------------------------------------------------------------------
   Motion tokens
   One idea only: blur (motion, unresolved) -> sharp (stillness, resolved).
   No other decorative animation belongs in this file.
------------------------------------------------------------------- */
:root {
	--blur-resolve-duration: 1.1s;
	--blur-resolve-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--blur-rest-amount: 3px;
	--blur-media-amount: 16px;
}

::selection {
	background: var(--wp--preset--color--indigo);
	color: var(--wp--preset--color--paper);
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--wp--preset--color--indigo);
	outline-offset: 3px;
}

a {
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

/* ------------------------------------------------------------------
   Wordmark — signature interaction #1
   At rest the mark sits faintly out of focus. It resolves to sharp on
   page load, settles back, and resolves again on hover. This CSS is
   the fallback / stand-in for the Rive state machine; when a
   wordmark.riv ships, assets/js/rive-wordmark.js takes over and these
   rules are bypassed via .blur-wordmark--rive.
------------------------------------------------------------------- */
.blur-wordmark a {
	text-decoration: none;
}

.blur-wordmark .wp-block-site-title__inner,
.blur-wordmark a,
.blur-wordmark {
	filter: blur(var(--blur-rest-amount));
	transition: filter var(--blur-resolve-duration) var(--blur-resolve-ease);
	will-change: filter;
}

.blur-wordmark.is-resolved,
.blur-wordmark:hover,
.blur-wordmark:focus-within {
	filter: blur(0);
}

.blur-wordmark--rive {
	filter: none !important;
}

/* ------------------------------------------------------------------
   Post header media — signature interaction #2
   Every post opens the same way: the full-bleed frame resolves from
   blurred to sharp. Identical treatment for image and video.
------------------------------------------------------------------- */
.blur-post-header-media {
	position: relative;
	margin: 0 0 var(--wp--preset--spacing--50);
	overflow: hidden;
	background: var(--wp--preset--color--midnight);
}

.blur-post-header-media img,
.blur-post-header-media video {
	display: block;
	width: 100%;
	height: min(78vh, 56.25vw);
	min-height: 320px;
	object-fit: cover;
}

.blur-resolve img,
.blur-resolve video {
	filter: blur(var(--blur-media-amount));
	transform: scale(1.04);
	transition:
		filter var(--blur-resolve-duration) var(--blur-resolve-ease),
		transform var(--blur-resolve-duration) var(--blur-resolve-ease);
	will-change: filter, transform;
}

.blur-resolve.is-resolved img,
.blur-resolve.is-resolved video {
	filter: blur(0);
	transform: scale(1);
}

/* Poster-frame-with-play mode: same frame, one quiet control. */
.blur-header-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 4.5rem;
	height: 4.5rem;
	display: grid;
	place-items: center;
	border: 1px solid var(--wp--preset--color--paper);
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--midnight) 45%, transparent);
	color: var(--wp--preset--color--paper);
	cursor: pointer;
	transition: background var(--blur-resolve-duration) var(--blur-resolve-ease);
}

.blur-header-play:hover {
	background: color-mix(in srgb, var(--wp--preset--color--midnight) 70%, transparent);
}

.blur-header-play svg {
	width: 1.25rem;
	height: 1.25rem;
	fill: currentColor;
	margin-left: 3px;
}

.blur-post-header-media.is-playing .blur-header-play {
	display: none;
}

/* ------------------------------------------------------------------
   Site chrome — near-monochrome so the images carry all the color.
------------------------------------------------------------------- */
.blur-site-header {
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}

.blur-site-footer {
	border-top: 1px solid var(--wp--preset--color--hairline);
}

.blur-tagline {
	font-style: italic;
	color: var(--wp--preset--color--slate);
}

/* Column tag — a whisper, not a badge. */
.blur-column-tag,
.blur-column-tag a {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	text-decoration: none;
}

.blur-column-tag a:hover {
	color: var(--wp--preset--color--indigo);
}

/* Post meta line */
.blur-post-meta,
.blur-post-meta a {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--slate);
	text-decoration: none;
}

/* ------------------------------------------------------------------
   Reading surface
------------------------------------------------------------------- */
.wp-block-pullquote {
	border-top: 1px solid var(--wp--preset--color--hairline);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	padding: var(--wp--preset--spacing--40) 0;
}

.wp-block-pullquote blockquote p {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--xl);
	font-style: italic;
	line-height: 1.35;
}

.wp-block-pullquote cite {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	font-style: normal;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
}

hr.wp-block-separator {
	border: none;
	border-top: 1px solid var(--wp--preset--color--hairline);
}

hr.wp-block-separator:not(.is-style-wide):not(.alignfull) {
	width: 4rem;
	margin-left: auto;
	margin-right: auto;
}

/* Reply by email — the comments section this site doesn't have. */
.blur-reply-email {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	color: var(--wp--preset--color--slate);
}

.blur-reply-email a {
	color: var(--wp--preset--color--indigo);
}

/* Guest contributor byline — infrastructure, quiet by design. */
.blur-contributor-byline {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	border-top: 1px solid var(--wp--preset--color--hairline);
	padding-top: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--40);
}

.blur-contributor-byline img {
	border-radius: 50%;
	width: 56px;
	height: 56px;
	flex: none;
}

.blur-contributor-byline .blur-contributor-label {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--slate);
	margin: 0 0 0.25rem;
}

.blur-contributor-byline .blur-contributor-name {
	font-weight: 600;
	margin: 0 0 0.35rem;
}

.blur-contributor-byline .blur-contributor-bio {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--slate);
	margin: 0;
}

/* Flodesk placeholder box — replaced by the real inline embed. */
.blur-flodesk-placeholder {
	border: 1px dashed var(--wp--preset--color--hairline);
	padding: var(--wp--preset--spacing--30);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.04em;
	color: var(--wp--preset--color--slate);
	text-align: center;
}

/* ------------------------------------------------------------------
   Accessibility: if the reader prefers reduced motion, everything is
   simply, immediately sharp. Stillness is the point anyway.
------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.blur-wordmark,
	.blur-wordmark a,
	.blur-wordmark .wp-block-site-title__inner,
	.blur-resolve img,
	.blur-resolve video {
		filter: none !important;
		transform: none !important;
		transition: none !important;
	}
}
