/*
Theme Name: Julia Wentzel
Description: Child theme of Profolio FSE for juliawentzel.com.
Template: profolio-fse
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: julia-wentzel
*/

/*
 * Portfolio cards: functions.php adds .portfolio-card-link over the card image.
 * The cover's content layer sits above it, so it ignores clicks except on the arrow.
 */
.portfolio-card {
	overflow: hidden;
}

.portfolio-card .portfolio-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.portfolio-card > .wp-block-cover__inner-container {
	pointer-events: none;
}

.portfolio-card > .wp-block-cover__inner-container a {
	pointer-events: auto;
}

.portfolio-card .wp-block-read-more.portfolio-card__arrow {
	display: inline-flex;
	padding: 5px 10px;
	border-radius: 5px;
	background: var(--wp--preset--color--secondary);
	font-size: 0;
	line-height: 0;
}

.portfolio-card .portfolio-card__arrow::before {
	content: "";
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--primary);
	-webkit-mask: url(../profolio-fse/assets/images/arrow-up.png) center / contain no-repeat;
	mask: url(../profolio-fse/assets/images/arrow-up.png) center / contain no-repeat;
}

/* White text on the yellow fails contrast; match the "View My Work" button. */
.wp-element-button.has-secondary-background-color:not(.has-text-color),
.contact-form input.wpcf7-submit {
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}

/* The parent's orange hover with light text fails contrast; swap green and yellow instead. */
body .wp-element-button:hover,
body .wp-element-button:focus-visible,
body .wp-block-button__link:hover,
body .wp-block-button__link:focus-visible,
body a.wp-block-post-excerpt__more-link:hover,
body a.wp-block-post-excerpt__more-link:focus-visible {
	background-color: var(--wp--preset--color--secondary) !important;
	border-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--primary) !important;
}

body .wp-element-button.has-secondary-background-color:hover,
body .wp-element-button.has-secondary-background-color:focus-visible,
body .contact-form input.wpcf7-submit:hover,
body .contact-form input.wpcf7-submit:focus-visible {
	background-color: var(--wp--preset--color--primary) !important;
	border-color: var(--wp--preset--color--white) !important;
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--white);
	color: var(--wp--preset--color--white) !important;
}

/* The home page arch is sized by Julia's photo; core's default 430px cover height would leave a gap. */
.wp-block-cover.hero-photo {
	min-height: 0;
}

/*
 * WOW.js hides not-yet-revealed elements with inline visibility:hidden, which also removes them
 * from screen readers. Clip them out of sight instead so the content stays readable; clip-path also
 * isn't touched by the entrance animations, unlike opacity. The same applies while the page loads
 * (see the wow-pending note in functions.php).
 */
.wow-pending .wow,
.wow[style*="visibility: hidden"] {
	visibility: visible !important;
	clip-path: inset(50%);
}

@media (prefers-reduced-motion: reduce) {
	.wow,
	.wow-pending .wow,
	.wow[style*="visibility: hidden"] {
		animation: none !important;
		visibility: visible !important;
		clip-path: none !important;
	}
}

/* Button text in rem so it follows the visitor's browser text-size setting. */
body .wp-element-button,
body .wp-block-button__link,
body .wp-block-search__button {
	font-size: 1rem;
}

/* 32px social icons with a 44px tap target; the negative margins keep them aligned with the text. */
.wp-block-social-links.is-style-logos-only.has-normal-icon-size {
	font-size: 32px;
}

.wp-block-social-links.is-style-logos-only {
	gap: 12px;
	margin-left: -6px;
}

.wp-block-social-links.is-style-logos-only .wp-social-link .wp-block-social-link-anchor {
	padding: 6px;
	margin: -6px 0;
}

/* Below 600px core collapses the menu into the hamburger; keep it at the far right, after Contact. */
@media (max-width: 599px) {
	#sticky-header .header-btn {
		margin-left: auto;
	}

	#sticky-header .wp-block-navigation {
		order: 3;
	}
}

/* Small uppercase labels above section headings; yellow and orange fail contrast on light backgrounds. */
p.has-secondary-color.has-sml-medium-font-size:not(.has-background) {
	color: #a85400 !important;
}

.portfolio-card .wp-block-cover__image-background {
	transition: transform 0.4s ease;
}

.portfolio-card:hover .wp-block-cover__image-background {
	transform: scale(1.03);
}

/* Previous / next links at the bottom of Writing Sample pages. */
.writing-sample-nav {
	display: flex;
	justify-content: space-between;
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

.writing-sample-nav__next {
	margin-left: auto;
	text-align: right;
}

.writing-sample-nav a {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-decoration: none;
	color: var(--wp--preset--color--tertiary);
}

.writing-sample-nav__label {
	font-size: var(--wp--preset--font-size--sml-medium);
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.writing-sample-nav__title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.2;
}

.writing-sample-nav a:hover .writing-sample-nav__title,
.writing-sample-nav a:focus-visible .writing-sample-nav__title {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.writing-sample-nav {
		flex-direction: column;
	}
}
