/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Description: Child theme of Twenty Twenty-Five with custom brand colors, typography, and homepage.
Author: Jacob Faulstich
Version: 1.0.0
Text Domain: twentytwentyfive-child
*/

/* Remove the focus outline on links when clicked with a mouse, keep it for keyboard navigation */
.wp-site-blocks a:focus:not(:focus-visible) {
	outline: none;
}

/* Remove the focus outline on the hamburger menu button when clicked with a mouse, keep it for keyboard navigation */
.main-nav button:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

/* Align the overlay's close (X) button with the hamburger (open) button's on-screen position.
   The exact offset is computed live in JS (see ttf_child_align_nav_close_button) since it
   varies with viewport width; this just switches the close button to viewport-relative
   positioning so a JS-set top/left in pixels lines up exactly. */
.main-nav .wp-block-navigation__responsive-container-close {
	position: fixed !important;
}

/* Hover color for all links (excluding button-styled links, which have their own hover treatment) */
.wp-site-blocks a:not(.wp-element-button):hover {
	color: var(--wp--preset--color--accent-1);
}

/* Superscripted ® (added sitewide via JS) renders 8px smaller than the surrounding text */
sup {
	font-size: calc(1em - 8px);
}

/* Sitewide staggered fade-up entrance animation. Add .jt-fade to any element;
   jt-fade.js picks up every instance in DOM order and staggers them 120ms apart. */
.jt-fade {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
.jt-fade.is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.jt-fade {
		transition: none;
		opacity: 1;
		transform: none;
	}
}

/* Main hamburger navigation: stagger each item's fade-in when the menu opens */
.main-nav .wp-block-navigation__responsive-container .wp-block-navigation-item {
	opacity: 0;
}
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	animation: fc-nav-item-fade-in 0.26s ease forwards;
}
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(1) { animation-delay: 0s; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: 0.166s; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: 0.332s; }
@keyframes fc-nav-item-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* About section image carousel */
.ttf-carousel {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background-color: var(--wp--preset--color--base);
}
.ttf-carousel-track {
	position: relative;
	width: 100%;
	height: 100%;
}
.ttf-carousel-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease;
}
.ttf-carousel-slide.is-active {
	opacity: 1;
	visibility: visible;
}
.ttf-carousel-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ttf-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.6);
	color: var(--wp--preset--color--accent-2);
	cursor: pointer;
	z-index: 2;
	transition: color 0.15s ease, background-color 0.15s ease;
}
.ttf-carousel-arrow:hover {
	color: var(--wp--preset--color--accent-1);
	background-color: rgba(255, 255, 255, 0.85);
}
.ttf-carousel-prev {
	left: 12px;
}
.ttf-carousel-next {
	right: 12px;
}

/* Lightbox for the About section carousel */
.ttf-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	margin: 0;
	z-index: 999999;
	background-color: rgba(0, 0, 0, 0.9);
	align-items: center;
	justify-content: center;
	padding: 40px;
	box-sizing: border-box;
}
.ttf-lightbox.is-open {
	display: flex;
}
.ttf-lightbox img {
	max-width: 100%;
	max-height: 100%;
	display: block;
}
.ttf-lightbox-close {
	position: fixed;
	top: 24px;
	right: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	cursor: pointer;
}
.ttf-lightbox-nav {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.ttf-lightbox-nav:hover {
	background-color: rgba(255, 255, 255, 0.3);
}
.ttf-lightbox-prev {
	left: 24px;
}
.ttf-lightbox-next {
	right: 24px;
}
body.ttf-lightbox-open {
	overflow: hidden;
}
