/*
Theme Name: Too Many Lenses
Theme URI: https://toomanylenses.com
Author: Too Many Lenses
Description: A magazine-style photography theme for Too Many Lenses: a lead story, latest photoshoots, a Random Lens Generator showcase and a reviews list, with large photos and exposure-style captions.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: too-many-lenses
*/

/* ---------- Shared bits ---------- */

.tml-kicker,
.tml-kicker a,
.tml-kicker .wp-block-post-date,
.tml-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.tml-kicker { gap: 0.6rem !important; align-items: baseline; }
.tml-kicker .wp-block-post-terms a { color: var(--wp--preset--color--accent); }
.tml-kicker .wp-block-post-terms a:hover { color: var(--wp--preset--color--accent-dark); }
.tml-kicker .wp-block-post-terms__separator { color: var(--wp--preset--color--muted); }
.tml-kicker .wp-block-post-date::before { content: "· "; }

.tml-readmore,
a.tml-readmore,
.tml-more a {
	display: inline-block;
	padding: 0.6rem 0 0.2rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-bottom: 2px solid var(--wp--preset--color--accent);
}

.tml-section-head {
	border-top: 1px solid var(--wp--preset--color--ink);
	padding-top: 0.9rem;
	margin-bottom: 1.75rem !important;
	align-items: baseline !important;
}
.tml-section-head h2 {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.tml-section-head p { margin: 0; font-size: var(--wp--preset--font-size--small); font-weight: 600; }

.wp-block-post-featured-image { margin-bottom: 0; }
.wp-block-post-featured-image img { display: block; }
.wp-block-post-featured-image a { display: block; overflow: hidden; }
.wp-block-post-featured-image a img { transition: transform 0.5s ease; }
.wp-block-post-featured-image a:hover img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) {
	.wp-block-post-featured-image a img { transition: none; }
	.wp-block-post-featured-image a:hover img { transform: none; }
}

/* ---------- Header ---------- */

.tml-strip {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
}
.tml-strip p {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.tml-masthead { padding-top: 2.5rem; }
.tml-masthead__top {
	border-bottom: 3px solid var(--wp--preset--color--ink);
	padding-bottom: 1.25rem;
	gap: 1rem 2.5rem !important;
}
.tml-masthead .wp-block-site-title {
	margin: 0;
	max-width: 6.4em;
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 700;
	line-height: 0.92;
	letter-spacing: -0.03em;
}
.tml-masthead .wp-block-site-title a { color: var(--wp--preset--color--ink); }
.tml-masthead .wp-block-site-title a::after,
.tml-footer .wp-block-site-title a::after {
	content: ".";
	color: var(--wp--preset--color--accent);
}
.tml-tagline {
	margin: 0;
	max-width: 21rem;
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.35;
	color: var(--wp--preset--color--graphite);
}

nav.tml-nav {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding: 0.35rem 0;
	margin-top: 0 !important;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	column-gap: 1.75rem !important;
}
.tml-nav .wp-block-navigation-item__content { padding: 0.65rem 0; }
.tml-nav .current-menu-item > a,
.tml-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent-dark); }
.tml-nav .wp-block-navigation__responsive-container.is-menu-open {
	font-size: var(--wp--preset--font-size--large);
	text-transform: none;
	letter-spacing: 0;
}

/* ---------- Homepage: lead ---------- */

.tml-lead { padding-top: 2.5rem; padding-bottom: 3.5rem; }
.tml-lead .wp-block-post-template { margin: 0; }
.tml-lead__cols { gap: 2rem 3rem !important; }
.tml-lead__text > * + * { margin-top: 1.1rem; }
.tml-lead__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.02;
	letter-spacing: -0.02em;
}
.tml-lead__excerpt { font-size: 1.125rem; line-height: 1.55; }
.tml-lead__excerpt .wp-block-post-excerpt__excerpt { margin: 0; }

/* ---------- Story cards ---------- */

.tml-cards { padding-bottom: 4rem; }
.tml-cards .wp-block-post-template { gap: 2.5rem 2rem; }
.tml-card { gap: 0.75rem !important; }
.tml-card > * { margin: 0 !important; }
.tml-card .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); line-height: 1.12; }
.tml-card .wp-block-post-excerpt { font-size: 1rem; line-height: 1.55; }
.tml-card .wp-block-post-excerpt__excerpt { margin: 0; }

/* ---------- Random Lens Generator band ---------- */

.tml-band {
	background: var(--wp--preset--color--night);
	color: var(--wp--preset--color--night-text);
	padding-top: 4rem;
	padding-bottom: 4.5rem;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
.tml-band a { color: var(--wp--preset--color--night-text); }
.tml-band a:hover { color: #FFB4A6; }
.tml-band__intro { gap: 1.5rem 4rem !important; margin-bottom: 2.5rem; }
.tml-band__intro .tml-label { color: #FF7A63; margin: 0; }
.tml-band__intro h2 {
	margin: 0.6rem 0 0;
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--wp--preset--color--night-text);
}
.tml-band__intro p.tml-band__blurb { margin: 0; font-size: 1.0625rem; color: #C9C4BA; }
.tml-band .wp-block-post-template { gap: 2rem 1.5rem; }
.tml-roll {
	border-top: 1px solid #3A3A3A;
	padding-top: 1rem;
	gap: 0.65rem !important;
}
.tml-roll > * { margin: 0 !important; }
.tml-roll .wp-block-post-title { font-size: 1.375rem; line-height: 1.15; }
.tml-roll .wp-block-post-date { color: var(--wp--preset--color--night-muted); }
.tml-roll-no {
	display: block;
	margin-bottom: 0.75rem;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 4rem;
	font-weight: 700;
	line-height: 0.9;
	color: #FF7A63;
}
.tml-band .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--night-text);
	border: 1px solid var(--wp--preset--color--night-text);
	padding: 0.9rem 1.4rem;
}
.tml-band .wp-block-button__link:hover {
	background: var(--wp--preset--color--night-text);
	color: var(--wp--preset--color--night);
}
.tml-band .wp-block-buttons { margin-top: 2.5rem; }

/* ---------- Reviews list + About ---------- */

.tml-lower { padding-top: 4rem; padding-bottom: 4.5rem; }
.tml-lower__cols { gap: 3rem 4rem !important; }
.tml-review {
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--rule);
	gap: 1rem 1.5rem !important;
	align-items: flex-start !important;
}
.tml-review .wp-block-post-featured-image { flex: 0 0 200px; width: 200px; }
.tml-review__text { flex: 1 1 260px; min-width: 0; gap: 0.5rem !important; }
.tml-review__text > * { margin: 0 !important; }
.tml-review .wp-block-post-title { font-size: 1.625rem; line-height: 1.15; }
.tml-review .wp-block-post-excerpt { font-size: 0.95rem; }
.tml-review .wp-block-post-excerpt__excerpt { margin: 0; }

.tml-about {
	background: var(--wp--preset--color--sand);
	padding: 2rem;
}
.tml-about > * { margin-top: 0; }
.tml-about h2 {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}
.tml-about .tml-about__hello {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.375rem;
	line-height: 1.3;
	margin-bottom: 0.75rem;
}
.tml-about p { font-size: 0.95rem; line-height: 1.6; color: var(--wp--preset--color--graphite); }

/* ---------- Footer ---------- */

.tml-footer {
	border-top: 3px solid var(--wp--preset--color--ink);
	padding-top: 1.75rem;
	padding-bottom: 2.5rem;
	margin-top: 0 !important;
}
.tml-footer .wp-block-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.75rem;
	font-weight: 700;
}
.tml-footer p:not(.wp-block-site-title) {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

/* ---------- Single posts and pages ---------- */

.tml-article { padding-top: 3rem; padding-bottom: 4rem; }
.tml-article__head { margin-bottom: 2.25rem; }
.tml-article__head .wp-block-post-title { margin-top: 0.75rem; }
.tml-article .wp-block-post-featured-image { margin-bottom: 2.5rem; }

/* Photos in posts run wider than the text column, like a magazine spread */
.tml-article .wp-block-post-content > .wp-block-image,
.tml-article .wp-block-post-content > .wp-block-gallery {
	max-width: min(1040px, 100%) !important;
	margin-top: 2.25rem;
	margin-bottom: 2.25rem;
}
.tml-article .wp-block-post-content > .wp-block-image img {
	display: block;
	margin-left: auto;
	margin-right: auto;
	max-height: 88vh;
	width: auto;
	height: auto;
	max-width: 100%;
}
.tml-article .wp-block-post-content figcaption,
.tml-article .wp-block-post-content .wp-element-caption {
	text-align: center;
	margin-top: 0.6rem;
}
.tml-article .wp-block-post-content > p { font-size: 1.125rem; line-height: 1.7; }
.tml-article .wp-block-post-content > p:first-child::first-letter {
	float: left;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 4.2em;
	font-weight: 700;
	line-height: 0.8;
	padding: 0.08em 0.1em 0 0;
	color: var(--wp--preset--color--accent);
}

.tml-tags { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--wp--preset--color--rule); }
.tml-tags a {
	display: inline-block;
	margin: 0 0.35rem 0.5rem 0;
	padding: 0.35rem 0.7rem;
	background: var(--wp--preset--color--sand);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.tml-tags .wp-block-post-terms__separator { display: none; }

.tml-postnav { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 3px solid var(--wp--preset--color--ink); gap: 1.5rem !important; }
.tml-postnav .post-navigation-link-previous,
.tml-postnav .post-navigation-link-next {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.25rem;
	font-weight: 600;
	max-width: 22rem;
}
.tml-postnav .wp-block-post-navigation-link__label {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	margin-bottom: 0.25rem;
}

.tml-comments { margin-top: 3rem; }
.tml-comments .comment-reply-title,
.tml-comments .wp-block-comments-title { font-size: var(--wp--preset--font-size--x-large); }
.tml-comments input[type="text"],
.tml-comments input[type="email"],
.tml-comments input[type="url"],
.tml-comments textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem;
	border: 1px solid #8C877D;
	background: #FFFFFF;
	font: inherit;
}

/* ---------- Archives ---------- */

.tml-archive { padding-top: 3rem; padding-bottom: 4rem; }
.tml-archive__head { border-bottom: 3px solid var(--wp--preset--color--ink); padding-bottom: 1.25rem; margin-bottom: 2.5rem; }
.tml-archive__head .wp-block-query-title { margin: 0.5rem 0 0; }
.tml-archive__head .wp-block-term-description p { margin: 0.75rem 0 0; max-width: 40rem; color: var(--wp--preset--color--graphite); }
.tml-pagination { margin-top: 3rem; font-weight: 600; gap: 1rem !important; }
.tml-pagination .page-numbers { padding: 0.5rem 0.75rem; }
.tml-pagination .page-numbers.current { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }

/* ---------- Small screens ---------- */

@media (max-width: 781px) {
	.tml-masthead { padding-top: 1.75rem; }
	.tml-review .wp-block-post-featured-image { flex-basis: 100%; width: 100%; }
	.tml-about { padding: 1.5rem; }
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* Stacked cards: children fill the card width (photos would otherwise collapse) */
.tml-card,
.tml-roll,
.tml-review__text { align-items: stretch !important; min-width: 0; }
.tml-card .wp-block-post-featured-image,
.tml-roll .wp-block-post-featured-image { width: 100%; }
.wp-block-post-template.is-layout-grid > li { min-width: 0; }
.tml-roll .wp-block-post-title,
.tml-card .wp-block-post-title { overflow-wrap: anywhere; }

/* Consistent photo crops, whatever shape the featured image is */
.tml-lead .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }
.tml-card .wp-block-post-featured-image img,
.tml-roll .wp-block-post-featured-image img,
.tml-review .wp-block-post-featured-image img { aspect-ratio: 3 / 2; }
.tml-lead .wp-block-post-featured-image img,
.tml-card .wp-block-post-featured-image img,
.tml-roll .wp-block-post-featured-image img,
.tml-review .wp-block-post-featured-image img {
	width: 100% !important;
	height: auto !important;
	object-fit: cover;
}
