/*
Theme Name: Powder
Theme URI: https://powder.design/
Author: Brian Gardner
Author URI: https://briangardner.com/
Description: The premier block theme for WordPress designers and agencies.
Version: 2.0
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 7.2
License: GNU General Public License v3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: powder
Tags: block-patterns, block-styles, custom-colors, custom-logo, editor-style, full-site-editing, one-column, two-columns, wide-blocks
*/

/* Base
---------------------------------------- */

:root {
	--powder-motion-distance: 30px;
	--powder-motion-ease: ease-out;
	--powder-motion-fast: 0.25s;
	--powder-motion-slow: 0.5s;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

b,
strong {
	font-weight: 600;
}

a,
button,
.wp-element-button {
	transition: background-color var(--powder-motion-fast) var(--powder-motion-ease),
	            color var(--powder-motion-fast) var(--powder-motion-ease);
}

/* Forms
---------------------------------------- */

input,
select,
textarea {
	box-sizing: border-box;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: var(--wp--custom--line-height--medium);
	width: 100%;
}

input:not([type="submit"]):focus,
textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: 1px solid var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
	width: auto;
}

::placeholder {
	color: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	opacity: 0.5;
}

/* Blocks
---------------------------------------- */

/* Group */

.is-style-fadeinup {
	opacity: 1;
	transform: none;
}

.has-motion .is-style-fadeinup {
	opacity: 0;
	transform: translateY(var(--powder-motion-distance));
}

.has-motion .is-style-fadeinup.is-inview {
	animation: fadeInUp var(--powder-motion-slow) var(--powder-motion-ease) forwards;
}

@keyframes fadeInUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.has-motion .is-style-fadeinup,
	.has-motion .is-style-fadeinup.is-inview {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* Navigation */

.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30);
}

.is-style-underline-slide .wp-block-navigation-item__content {
	position: relative;
}

.is-style-underline-slide .wp-block-navigation-item__content::after {
	background: currentColor;
	content: "";
	height: 1px;
	inset: auto 0 -2px 0;
	position: absolute;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform var(--powder-motion-fast) var(--powder-motion-ease);
}

.is-style-underline-slide .wp-block-navigation-item__content:is(:hover, :focus-visible)::after {
	transform: scaleX(1);
}

/* Navigation submenu */

.wp-block-navigation__submenu-container {
	min-width: 150px !important;
	padding: 10px !important;
}

.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 2px 10px !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	padding: 5px 10px 0 !important;
}

/* Utilities
---------------------------------------- */

/* Overflow */

.is-style-overflow-hidden {
	overflow: hidden;
}

/* Position */

.is-style-position-fixed {
	position: fixed;
}

.is-style-position-relative {
	position: relative;
}

/* Z-index */

.is-style-negative-zindex {
	z-index: -99;
}

.is-style-positive-zindex {
	z-index: 99;
}

/* Media Queries
---------------------------------------- */

@media (min-width: 600px) {

	/* Header */

	.site-header {
		position: sticky;
		top: 0;
		z-index: 1000;
	}

	.scroll-reveal .site-header {
		transition: transform var(--powder-motion-slow) var(--powder-motion-ease);
	}

	.scroll-reveal body.scroll-down .site-header {
		transform: translateY(-100%);
	}

	.scroll-reveal body.scroll-up .site-header {
		transform: translateY(0);
	}

}

@media (min-width: 600px) and (prefers-reduced-motion: reduce) {

	.scroll-reveal .site-header {
		transform: none !important;
		transition: none !important;
	}

}

@media (max-width: 600px) {

	/* Utilities */

	.is-style-hidden-mobile {
		display: none !important;
	}

}

@media (max-width: 782px) {

	/* Columns */

	.wp-block-columns.is-style-column-reverse {
		flex-direction: column-reverse;
	}

}
