/*
Theme Name: 7t Photos
Theme URI: https://7tphotos.com
Author: Tony L. Tuberville
Description: A minimal, full-window photography theme for 7t Photos. The front page is an edge-to-edge slideshow that always fills the browser window, with a centered logo, split menu, thin arrows and a caption. Inner pages open with a full-width photo.
Version: 1.0.4
Requires at least: 6.6
Tested up to: 6.9
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: 7tphotos
*/

/* ---------- Base ---------- */
html, body { margin: 0; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.t7-front > *, .t7-front > main > * { margin-block: 0 !important; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
img { height: auto; max-width: 100%; }

.t7-caps {
	font-family: var(--wp--preset--font-family--serif);
	font-weight: 500;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.32em;
	text-transform: uppercase;
}

/* ---------- Header ---------- */
.t7-header {
	position: absolute !important;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 30;
	color: var(--wp--preset--color--contrast);
	background: transparent;
}
.t7-header.t7-header--light { color: #fff; }
.t7-header--static { position: relative; top: 0; }

.t7-header__inner {
	display: grid !important;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	column-gap: clamp(1.5rem, 5vw, 5rem);
	padding: clamp(1.5rem, 4.5vh, 3.25rem) clamp(1.25rem, 4vw, 3rem) !important;
	margin: 0 !important;
	max-width: none !important;
}
.t7-header__inner > * { margin: 0 !important; }
.t7-nav-left { justify-self: end; }
.t7-nav-right { justify-self: start; }
.t7-nav-mobile { display: none !important; justify-self: end; }
.t7-header .wp-block-navigation__container { column-gap: clamp(1.5rem, 4vw, 4.5rem); }
.t7-header .wp-block-navigation-item__content { padding: 0.4em 0; }
.t7-header .wp-block-navigation a:hover { color: inherit; opacity: 0.65; }

.t7-header .wp-block-site-logo,
.t7-header .wp-block-site-title { justify-self: center; text-align: center; }
.t7-header .wp-block-site-title {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.9rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	line-height: 1;
}

/* dropdowns */
.t7-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: #fff !important;
	color: var(--wp--preset--color--contrast) !important;
	border: 0 !important;
	min-width: 230px !important;
	padding: 0.9rem 0 !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	left: 50% !important;
	transform: translateX(-50%);
}
.t7-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.55rem 1.6rem !important;
	letter-spacing: 0.24em;
}
.t7-header .wp-block-navigation .wp-block-navigation__submenu-icon { display: none; }

/* mobile overlay */
.t7-header .wp-block-navigation__responsive-container.is-menu-open {
	color: var(--wp--preset--color--contrast) !important;
	background: #fff !important;
	padding: 4rem 2rem !important;
}
.t7-header .is-menu-open .wp-block-navigation__container { row-gap: 1.25rem; }
.t7-header .is-menu-open .wp-block-navigation__submenu-container { box-shadow: none; transform: none; left: auto !important; padding: 0.5rem 0 0 !important; }

@media (max-width: 960px) {
	.t7-nav-left, .t7-nav-right { display: none !important; }
	.t7-nav-mobile { display: flex !important; }
	.t7-header__inner { grid-template-columns: 1fr auto 1fr; }
	.t7-header__inner::before { content: ""; }
	.t7-header .wp-block-site-logo { grid-column: 2; }
	.t7-nav-mobile { grid-column: 3; }
}

/* ---------- Full-window slideshow ---------- */
.t7-slider {
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	margin: 0 !important;
	max-width: none !important;
	padding: 0 !important;
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--contrast);
}
body.admin-bar .t7-slider { height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)); height: calc(100svh - var(--wp-admin--admin-bar--height, 32px)); }
.t7-slider.t7-light { color: #fff; }

.t7-slider > .wp-block-cover {
	min-height: 100% !important;
	height: 100%;
	margin: 0 !important;
	padding: 0 0 clamp(4.5rem, 10vh, 6.5rem) !important;
}
.t7-slider.is-ready > .wp-block-cover {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.4s ease, visibility 0s linear 1.4s;
	color: inherit;
}
.t7-slider.is-ready > .wp-block-cover.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity 1.4s ease, visibility 0s;
}
.t7-slider > .wp-block-cover .wp-block-cover__inner-container { color: inherit; width: 100%; }
.t7-slider .t7-caption { margin: 0; color: inherit; text-align: center; }

.t7-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	transform: translateY(-50%);
	background: none;
	border: 0;
	padding: 1rem;
	margin: 0;
	color: inherit;
	cursor: pointer;
	line-height: 0;
	transition: opacity 0.2s ease, transform 0.3s ease;
}
.t7-arrow svg { width: 52px; height: 12px; display: block; }
.t7-arrow--prev { left: clamp(0.5rem, 2.5vw, 2.5rem); }
.t7-arrow--next { right: clamp(0.5rem, 2.5vw, 2.5rem); }
.t7-arrow--prev:hover { transform: translate(-4px, -50%); }
.t7-arrow--next:hover { transform: translate(4px, -50%); }
.t7-arrow:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
@media (max-width: 600px) { .t7-arrow svg { width: 34px; } }

/* front page: footer sits over the bottom of the slideshow */
.t7-front { position: relative; }
.t7-front .t7-footer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 20;
	background: transparent !important;
	color: var(--wp--preset--color--contrast);
}
.t7-front.t7-light .t7-footer { color: #fff; }

/* ---------- Inner page hero ---------- */
.t7-page-hero { margin-top: 0 !important; margin-bottom: 0 !important; }
.t7-page-hero.wp-block-cover { min-height: 78vh; min-height: 78svh; }
.t7-page-label { margin-top: var(--wp--preset--spacing--60) !important; text-align: center; color: var(--wp--preset--color--muted); }
.t7-page-plain-top { padding-top: var(--wp--preset--spacing--50); }

.t7-headline { font-weight: 300; text-align: center; }
.t7-intro {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 300;
	line-height: 1.55;
	text-align: center;
}

/* photo grid */
.t7-grid .wp-block-image { margin: 0; }
.t7-grid .wp-block-image img { width: 100%; height: auto; display: block; }

/* Masonry gallery (v1.0.4): photos keep their own shape, stacked in columns */
.wp-block-gallery.t7-masonry {
	display: block !important;
	column-count: 2;
	column-gap: var(--wp--preset--spacing--30);
}
.wp-block-gallery.t7-masonry > .wp-block-image,
.wp-block-gallery.t7-masonry > figure.wp-block-image {
	display: block;
	width: 100% !important;
	margin: 0 0 var(--wp--preset--spacing--30) !important;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
}
.wp-block-gallery.t7-masonry > .wp-block-image img {
	width: 100% !important;
	height: auto !important;
	object-fit: initial !important;
	aspect-ratio: auto !important;
	display: block;
}
@media (max-width: 600px) { .wp-block-gallery.t7-masonry { column-count: 1; } }

/* ---------- Footer ---------- */
.t7-footer {
	padding: 1.4rem clamp(1.25rem, 4vw, 3rem) !important;
	margin: 0 !important;
	max-width: none !important;
}
.t7-footer .wp-block-social-links { gap: 1.1rem; margin: 0; }
.t7-footer .wp-block-social-links .wp-social-link { color: inherit; background: none !important; }
.t7-footer .wp-block-social-links .wp-social-link a { padding: 0; color: inherit; }
.t7-footer .wp-block-social-links .wp-social-link svg { width: 17px; height: 17px; }
.t7-footer p { margin: 0; }
.t7-footer a:hover { color: inherit; opacity: 0.65; }
.t7-footer-links a + a::before { content: "·"; display: inline-block; margin: 0 1.2em; }
@media (max-width: 700px) {
	.t7-footer { flex-direction: column; gap: 0.6rem !important; text-align: center; }
	.t7-front .t7-footer .t7-copy { display: none; }
}

/* header that sits above the content instead of over a photo */
.t7-static .t7-header { position: relative !important; top: 0; }

/* center the mobile menu */
.t7-header .is-menu-open .wp-block-navigation__responsive-container-content,
.t7-header .is-menu-open .wp-block-navigation__container,
.t7-header .is-menu-open .wp-block-navigation-item,
.t7-header .is-menu-open .wp-block-navigation__submenu-container { align-items: center !important; text-align: center; }
.t7-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.35rem 0 !important; color: var(--wp--preset--color--muted); }

/* ---------- Readability over photos (v1.0.3) ----------
   Front page and pages with a hero photo: white menu, arrows, caption and footer,
   with a soft shade at the top and bottom of the photo so text reads on any image. */
.t7-front .t7-header,
.t7-front .t7-slider,
.t7-front .t7-footer,
body:has(.t7-page-hero .wp-block-cover__image-background) .t7-header:not(.t7-static .t7-header) {
	color: #fff !important;
}
.t7-front .t7-header .wp-block-navigation-item__content,
.t7-front .t7-caption,
.t7-front .t7-footer,
body:has(.t7-page-hero .wp-block-cover__image-background) .t7-header .wp-block-navigation-item__content {
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.t7-front .t7-arrow svg { filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4)); }

.t7-slider > .wp-block-cover::after,
.t7-page-hero.wp-block-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to bottom,
		rgba(0, 0, 0, 0.50) 0%,
		rgba(0, 0, 0, 0.18) 18%,
		rgba(0, 0, 0, 0) 32%,
		rgba(0, 0, 0, 0) 74%,
		rgba(0, 0, 0, 0.40) 100%);
}
.t7-page-hero.wp-block-cover::after {
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.15) 20%, rgba(0, 0, 0, 0) 34%);
}
.t7-slider > .wp-block-cover .wp-block-cover__inner-container { z-index: 2; }

/* dropdowns and the mobile menu keep dark text on white */
.t7-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
.t7-header .is-menu-open .wp-block-navigation-item__content { text-shadow: none !important; }

/* let page content use the full width so wide galleries can be wide (text stays narrow) */
main.is-layout-constrained > .wp-block-post-content { max-width: none !important; }
