/*
Theme Name: Cozy Grove: Camp Spirit
Theme URI:
Author: WP Special Projects
Author URI: https://wpspecialprojects.com
Description: Block theme for the Cozy Grove: Camp Spirit website.
Requires at least: 6.0
Tested up to: 6.5.2
Requires PHP: 5.7
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: cozy-grove
Tags:
*/

html {
	scroll-behavior: smooth;
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

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

:where(.wp-site-blocks) > * {
	margin-block-start: 0;
}

strong, b {
	font-weight: 800;
}


/*
 * Modified screen height.
 */

@supports (min-height: 100dvh) {
	[style*="min-height:100vh"] {
		min-height: calc( 100dvh - var( --wp-admin--admin-bar--height, 0px ) ) !important;
	}
}


/* FIXED HEADER */

html:not(.wp-toolbar) {
	scroll-padding-top: calc( clamp( 40px, 3.33vw, 96px ) + var( --wp-admin--admin-bar--height, 0px ) + 85px );
}

body:not(.editor-styles-wrapper) header.wp-block-template-part {
	position: absolute;
		left: 0;
		top: calc( min( var(--wp--preset--spacing--site-margin), 40px ) + var( --wp-admin--admin-bar--height, 0px ) );
		right: 0;
	z-index: 99;
}

body:not(.editor-styles-wrapper) header.wp-block-template-part.is-sticky {
	position: fixed;
		top: 0;
}

/* When the admin bar is fixed */

@media ( min-width: 601px ) {
	body:not(.editor-styles-wrapper) header.wp-block-template-part.is-sticky {
		top: var( --wp-admin--admin-bar--height, 0px );
	}
}

body:not(.editor-styles-wrapper) header.wp-block-template-part > .wp-block-group > .wp-block-group.has-background {
	transition: border-radius .1s linear;
}

body:not(.editor-styles-wrapper) header.wp-block-template-part.is-sticky > .wp-block-group > .wp-block-group.has-background {
	border-top-left-radius: 0 !important;
	border-top-right-radius: 0 !important;
}

header.wp-block-template-part > .wp-block-group > .wp-block-group.has-background {
	box-shadow: 0px 0px 4px rgba(28, 5, 3, 0.15);
}


/* PULL-UP EFFECT */

.cg-campspirit.pull-up {
	margin-bottom: max( -96px, calc( -4 * var(--wp--preset--spacing--site-margin) ) );
	position: relative;
	top: max( -96px, calc( -4 * var(--wp--preset--spacing--site-margin) ) );
	z-index: 1;
}

@media ( min-width: 1000px ) and ( min-height: 768px ) {
	.cg-campspirit.pull-up {
		margin-bottom: calc( -1 * clamp( 96px, 32.5dvh, 480px ) );
		top: calc( -1 * clamp( 96px, 32.5dvh, 480px ) );
	}
}


/* HERO */

@media( max-aspect-ratio: 1/1 ) {

	.hero.wp-block-cover * {
		background-attachment: scroll;
	}

	.hero.wp-block-cover,
	.hero .wp-block-cover {
		min-height: clamp( 390px, 100vw, 100vh ) !important;
	}
}


/* VIDEOPRESS */

.wp-block-jetpack-videopress iframe {
	border-radius: 8px;
}


/* FONT SIZES */

.has-large-font-size,
.has-x-large-font-size {
	letter-spacing: -0.01em;
}

.has-xx-large-font-size {
	letter-spacing: -0.02em;
}


/* PAGE.HTML */

.page-bg-parent-gradient {
	background-position: center calc( 72.5vw - var( --wp-admin--admin-bar--height, 0px ) ) !important;
}


/* 404.HTML */

.image-404 {
	position: relative;
}

@keyframes exclamation-intro {
	0% {
		opacity: 0;
		transform: translateY( 50% ) scale( 0 );
	}
	100% {
		opacity: 1;
		transform: translateY( 0% ) scale( 1 );
	}
}

.image-404:before {
	animation: exclamation-intro .3s 1.75s cubic-bezier(0.14, 0.4, 0.09, 0.99) both 1;
	aspect-ratio: 112 / 124;
	background: url( ./assets/images/exclamation-bubble@2x.png ) no-repeat center;
	background-size: contain;
	content: "";
	display: block;
	position: absolute;
		right: 69%;
		top: -28%;
	width: 40%;
	z-index: 1;
}

@keyframes image-flip {
	45% {
		transform: rotateY( 0deg );
	}
	55% {
		transform: rotateY( 180deg );
	}
	100% {
		transform: rotateY( 180deg );
	}
}

.image-404 img {
	animation: image-flip 3s forwards alternate infinite;
}


/* EDITOR STYLES */

.wp-block-post-title.editor-post-title {
	text-transform: none;
}