/*
Theme Name: Pack-Out Spot
Theme URI: https://packout.spot
Description: Pack-Out Spot child theme. Spot it. Pack it out. Leave it better.
Author: CampDads Digital
Author URI: https://campdads.digital
Template: astra
Version: 0.2.0
Text Domain: packout-spot
*/

/*
 * Colors come from the Astra global palette in astra-settings.json. The order
 * matches campdads.com:
 *
 *   0 forest   1 river   2 rust (accent)   3 deep rust   4 white
 *   5 sand     6 light gray   7 gray       8 charcoal
 *
 * Section classes go in a block's "Additional CSS class(es)" field:
 *
 *   bg-8  charcoal section      bg-4  white section      bg-5  sand section
 *   bg-0  forest section        jagged, jagged-top, jagged-bottom  torn edge
 *   pos-card  bordered card     pos-topo  contour-line overlay
 *   pos-hero  page-opening section under the transparent header
 */

:root {
	--pos-rule: rgba(47, 50, 50, 0.14);
	--pos-rule-on-dark: rgba(237, 234, 229, 0.18);
	--pos-radius: 4px;
}

/* Section surfaces
-------------------------------------------------------------- */

.bg-8 {
	background-color: var(--ast-global-color-8);
	background-image: url(assets/img/texture-dark.png);
	color: var(--ast-global-color-5);
}

.bg-0 {
	background-color: var(--ast-global-color-0);
	color: var(--ast-global-color-5);
}

.bg-4 {
	background-color: var(--ast-global-color-4);
	background-image: url(assets/img/texture-light.png);
}

.bg-5 {
	background-color: var(--ast-global-color-5);
}

body .bg-8 h1,
body .bg-0 h1 {
	color: var(--ast-global-color-4);
}

body .bg-8 :is(h2, h3, h4, h5, h6),
body .bg-0 :is(h2, h3, h4, h5, h6) {
	color: var(--ast-global-color-5);
}

body .bg-8 :is(p, li, figcaption, .uagb-ifb-desc, .uagb-desc-text, .uagb-icon-list__label),
body .bg-0 :is(p, li, figcaption, .uagb-ifb-desc, .uagb-desc-text, .uagb-icon-list__label) {
	color: var(--ast-global-color-5);
}

/* Rust on charcoal is too faint for running text, so links go light and keep the underline. */
body .bg-8 :is(p, li, figcaption) a,
body .bg-0 :is(p, li, figcaption) a {
	color: var(--ast-global-color-4);
	text-decoration: underline;
}

body .bg-8 :is(p, li, figcaption) a:hover,
body .bg-0 :is(p, li, figcaption) a:hover {
	color: var(--ast-global-color-6);
}

/* A light section set inside a dark one, such as a card, takes the light rules back. */
body :is(.bg-8, .bg-0) .bg-4 :is(h2, h3, h4, h5, h6) {
	color: var(--ast-global-color-8);
}

body :is(.bg-8, .bg-0) .bg-4 :is(p, li, figcaption, .uagb-ifb-desc, .uagb-desc-text, .uagb-icon-list__label) {
	color: #5a5d5d;
}

/* Contour lines over a section. */
.pos-topo {
	background-image: url(assets/img/topo-light.webp), url(assets/img/texture-dark.png);
	background-position: center top, left top;
	background-repeat: no-repeat, repeat;
	background-size: cover, auto;
}

/* Torn edges
-------------------------------------------------------------- */

.jagged,
.jagged-top,
.jagged-bottom {
	position: relative;
}

.jagged > .uagb-container-inner-blocks-wrap,
.jagged-top > .uagb-container-inner-blocks-wrap,
.jagged-bottom > .uagb-container-inner-blocks-wrap {
	position: relative;
	z-index: 2;
}

/* Spectra draws a section's image overlay in ::before, so only use the top edge on sections without one. */
.jagged-top::before,
.jagged::before {
	background-image: url(assets/img/torn-edge-top.webp);
	background-position: center top;
	background-repeat: repeat-x;
	content: "";
	display: block;
	height: 74px;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	top: -1px;
	z-index: 1;
}

.jagged-bottom::after,
.jagged::after {
	background-image: url(assets/img/torn-edge-bottom.webp);
	background-position: center bottom;
	background-repeat: repeat-x;
	bottom: -1px;
	content: "";
	display: block;
	height: 75px;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
	z-index: 1;
}

/* Type details
-------------------------------------------------------------- */

/* The hashtag line above a heading. */
.uagb-ifb-title-prefix {
	color: var(--ast-global-color-7);
	display: block;
	font-family: Roboto, sans-serif;
	font-size: 17px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.4;
	text-transform: none;
}

body :is(.bg-8, .bg-0) .uagb-ifb-title-prefix {
	color: var(--ast-global-color-6);
}

body :is(.bg-8, .bg-0) .bg-4 .uagb-ifb-title-prefix {
	color: var(--ast-global-color-7);
}

.uagb-ifb-desc,
.uagb-desc-text {
	max-width: 62ch;
}

.uagb-infobox__content-wrap.uagb-infobox-icon-above-title[class*="uagb-infobox"] .uagb-ifb-content:has(.uagb-ifb-desc) {
	width: 100%;
}

.wp-block-uagb-info-box[style*="center"] .uagb-ifb-desc,
.pos-center :is(.uagb-ifb-desc, .uagb-desc-text) {
	margin-left: auto;
	margin-right: auto;
}

.pos-lede,
.pos-lede p {
	font-size: 1.2rem;
	line-height: 1.5;
}

/* A word or phrase in a heading picked out in rust, as on campdads.com. */
.pos-accent {
	color: var(--ast-global-color-2);
}

/* Cards
-------------------------------------------------------------- */

.wp-block-uagb-container.pos-card {
	background-color: var(--ast-global-color-4);
	border: 1px solid var(--pos-rule);
	border-radius: var(--pos-radius);
	border-top: 4px solid var(--ast-global-color-2);
}

.wp-block-uagb-container.pos-card.pos-card-forest {
	border-top-color: var(--ast-global-color-0);
}

.wp-block-uagb-container.pos-card.pos-card-river {
	border-top-color: var(--ast-global-color-1);
}

body :is(.bg-8, .bg-0) .wp-block-uagb-container.pos-card:not(.bg-4) {
	background-color: rgba(255, 255, 255, 0.04);
	border-color: var(--pos-rule-on-dark);
	border-top-color: var(--ast-global-color-2);
}

.pos-card .uagb-ifb-icon-wrap svg,
.pos-feature .uagb-ifb-icon-wrap svg {
	fill: var(--ast-global-color-2);
}

/* Photographs
-------------------------------------------------------------- */

.wp-block-uagb-image img {
	border-radius: var(--pos-radius);
}

.wp-block-uagb-image.pos-photo img {
	box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.55);
}

.wp-block-uagb-image figcaption,
.wp-block-uagb-image .uagb-image-caption {
	color: var(--ast-global-color-7);
	font-size: 14px;
	line-height: 1.4;
	margin-top: 10px;
}

/* Buttons
-------------------------------------------------------------- */

/* The second action in a pair: outline, no fill. */
.wp-block-uagb-buttons-child.pos-button-outline .uagb-buttons-repeater {
	background-color: transparent;
	border: 1px solid currentColor;
	color: var(--ast-global-color-8);
}

.wp-block-uagb-buttons-child.pos-button-outline .uagb-buttons-repeater:hover,
.wp-block-uagb-buttons-child.pos-button-outline .uagb-buttons-repeater:focus {
	background-color: var(--ast-global-color-8);
	border-color: var(--ast-global-color-8);
	color: var(--ast-global-color-4);
}

body :is(.bg-8, .bg-0) .wp-block-uagb-buttons-child.pos-button-outline .uagb-buttons-repeater {
	color: var(--ast-global-color-4);
}

body :is(.bg-8, .bg-0) .wp-block-uagb-buttons-child.pos-button-outline .uagb-buttons-repeater:hover,
body :is(.bg-8, .bg-0) .wp-block-uagb-buttons-child.pos-button-outline .uagb-buttons-repeater:focus {
	background-color: var(--ast-global-color-4);
	border-color: var(--ast-global-color-4);
	color: var(--ast-global-color-8);
}

.uagb-buttons-repeater:focus-visible,
.ast-custom-button-link:focus-visible .ast-custom-button {
	outline: 2px solid var(--ast-global-color-4);
	outline-offset: 2px;
}

/* Lists, notices, questions
-------------------------------------------------------------- */

.wp-block-uagb-icon-list .uagb-icon-list__source-wrap svg {
	fill: var(--ast-global-color-2);
}

.wp-block-uagb-icon-list .uagb-icon-list__label {
	line-height: 1.45;
}

.wp-block-uagb-inline-notice.pos-status {
	border-radius: var(--pos-radius);
	box-shadow: 0 0 0 1px var(--pos-rule);
	overflow: hidden;
	width: 100%;
}

.wp-block-uagb-inline-notice.pos-status .uagb-notice-title {
	font-size: 22px;
	padding-bottom: 0;
}

.wp-block-uagb-inline-notice.pos-status .uagb-notice-text p:last-child {
	margin-bottom: 0;
}

.wp-block-uagb-inline-notice.pos-status .uagb-notice-text p {
	max-width: 78ch;
}

.wp-block-uagb-faq .uagb-question {
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.5px;
	text-transform: uppercase;
}

/* Header
-------------------------------------------------------------- */

.site-header .site-title,
.site-header .site-title a {
	font-weight: 800;
	letter-spacing: -0.5px;
	line-height: 1;
	text-transform: uppercase;
}

.main-header-menu > .menu-item > .menu-link {
	position: relative;
}

.ast-desktop .main-header-menu > .menu-item > .menu-link::after {
	background-color: var(--ast-global-color-2);
	bottom: 22px;
	content: "";
	height: 2px;
	left: 1em;
	opacity: 0;
	position: absolute;
	right: 1em;
	transition: opacity 0.15s ease;
}

.ast-desktop .main-header-menu > .menu-item:hover > .menu-link::after,
.ast-desktop .main-header-menu > .menu-item > .menu-link:focus::after,
.ast-desktop .main-header-menu > .current-menu-item > .menu-link::after {
	opacity: 1;
}

.ast-header-break-point .ast-mobile-header-wrap .ast-mobile-header-content,
.ast-header-break-point .ast-mobile-header-content .main-header-menu,
.ast-header-break-point .ast-mobile-header-content .menu-item,
.ast-header-break-point .ast-mobile-header-content .menu-link {
	background-color: var(--ast-global-color-8);
	border-color: var(--pos-rule-on-dark);
}

.ast-header-break-point .ast-mobile-header-content .menu-link {
	font-size: 15px;
	text-transform: uppercase;
}

.ast-header-break-point .ast-mobile-header-content .ast-builder-layout-element[data-section="section-hb-button-1"] {
	padding: 16px 20px 24px;
}

.ast-header-break-point .ast-mobile-header-content .ast-builder-button-wrap {
	padding: 0;
}

/* The menu button sits on the charcoal bar or on a photograph, so it is always white. */
.ast-header-break-point [data-section="section-header-mobile-trigger"] .ast-button-wrap .menu-toggle,
.ast-header-break-point [data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
	color: var(--ast-global-color-4);
	fill: var(--ast-global-color-4);
}

/* Pages that open with a photo let the header sit on the image. */
.ast-theme-transparent-header .pos-hero {
	padding-top: 150px;
}

/* Footer
-------------------------------------------------------------- */

.site-footer .site-primary-footer-wrap,
.site-footer .site-below-footer-wrap {
	background-image: url(assets/img/texture-dark.png);
}

.site-footer .site-primary-footer-wrap {
	padding-bottom: 56px;
	padding-top: 72px;
}

.site-footer .pos-wordmark {
	color: var(--ast-global-color-4);
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: 34px;
	font-weight: 800;
	letter-spacing: -1px;
	line-height: 1;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.site-footer .pos-tagline {
	color: var(--ast-global-color-6);
	font-family: "Barlow Semi Condensed", sans-serif;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -0.5px;
	margin-bottom: 20px;
	text-transform: uppercase;
}

.site-footer .ast-footer-html-1 p:last-child {
	margin-bottom: 0;
	max-width: 56ch;
}

.site-footer .footer-nav-wrap .menu-link {
	font-size: 14px;
	font-weight: 900;
	padding-bottom: 6px;
	padding-top: 6px;
	text-transform: uppercase;
}

.site-footer .ast-footer-copyright a {
	color: var(--ast-global-color-4);
}

/* A short note under a map or a form. */
.pos-small {
	margin: 0;
	color: #5b6060;
	font-size: 0.95rem;
}

/* Small screens
-------------------------------------------------------------- */

@media (max-width: 767px) {
	.jagged-top::before,
	.jagged::before,
	.jagged-bottom::after,
	.jagged::after {
		background-size: auto 44px;
		height: 44px;
	}

	.ast-theme-transparent-header .pos-hero {
		padding-top: 120px;
	}

	.pos-lede,
	.pos-lede p {
		font-size: 1.1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ast-desktop .main-header-menu > .menu-item > .menu-link::after {
		transition: none;
	}
}
