/*
Theme Name: MySammys
Theme URI: https://mysammys.com
Author: Stitch Design Co
Author URI: https://stitchdesignco.com
Description: Custom FSE block theme for MySammys.com — a WordPress Multisite with 1 parent site and 13 location microsites. Built entirely with native WordPress Full Site Editing: theme.json design tokens, block templates, template parts, and block patterns. No ACF, no page builders, minimal custom CSS.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 8.0
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: mysammys
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, wide-blocks, block-styles
*/

/* ==========================================================================
   MySammys — Minimal CSS Overrides
   theme.json handles 95% of styling. Only add CSS here when absolutely
   necessary and when theme.json block styles cannot achieve the result.
   ========================================================================== */

/* Global design tokens */
:root {
	--mysammys-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
	--mysammys-duration: 0.25s;
}

/* Global box-sizing reset */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* Page frame — 2rem tan border around all content */
body {
	padding: 2rem;
}

/* Smooth scroll for anchor links */
html {
	scroll-behavior: smooth;
}

/* Video cover block — ensure video fills container */
.wp-block-cover .wp-block-cover__video-background {
	object-fit: cover;
}

/* Gravity Forms — use brand red for accents */
.gf_progressbar_percentage.percentbar_blue {
	background-color: var(--wp--preset--color--red) !important;
}

.gform_wrapper .gfield_required {
	color: var(--wp--preset--color--red);
}

.gform_wrapper .ginput_container_date .ui-datepicker-trigger {
	display: none !important;
}

.gform_wrapper .ginput_container_date input.datepicker {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23585e6a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	background-size: 1.25rem;
	padding-right: 2.5rem !important;
}

.gform_wrapper.gform-theme {
	--gf-color-primary: var(--wp--preset--color--red) !important;
	--gf-color-primary-rgb: 223, 35, 29 !important;
}

.gform_wrapper .gform_next_button.gform-theme-button,
.gform_wrapper .gform_previous_button.gform-theme-button,
.gform_wrapper .gform_page_footer .gform_button,
.gform_wrapper button[type="submit"].gform_button {
	font-family: "MD Nichrome", Georgia, serif !important;
	font-weight: 700 !important;
	font-size: var(--wp--preset--font-size--button) !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	border: none !important;
	border-radius: 100px !important;
	padding: 1rem 2.5rem !important;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gform_wrapper .gform_next_button.gform-theme-button,
.gform_wrapper .gform_page_footer .gform_button,
.gform_wrapper button[type="submit"].gform_button {
	background-color: var(--wp--preset--color--red) !important;
	color: #fff !important;
}

.gform_wrapper .gform_next_button.gform-theme-button:hover,
.gform_wrapper .gform_page_footer .gform_button:hover,
.gform_wrapper button[type="submit"].gform_button:hover {
	background-color: var(--wp--preset--color--gold) !important;
	color: var(--wp--preset--color--red) !important;
}

.gform_wrapper .gform_previous_button.gform-theme-button {
	background-color: var(--wp--preset--color--gold) !important;
	color: var(--wp--preset--color--red) !important;
}

.gform_wrapper .gform_previous_button.gform-theme-button:hover {
	background-color: var(--wp--preset--color--red) !important;
	color: #fff !important;
}

/* Primary button hover — red bg, white text */
.wp-block-button .wp-block-button__link,
.wp-block-button .wp-element-button,
.gform_wrapper .gform_button,
.gform_wrapper button[type="submit"] {
	box-shadow: none !important;
	transition: background-color var(--mysammys-duration) var(--mysammys-ease),
	            color var(--mysammys-duration) var(--mysammys-ease);
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-element-button:hover {
	background-color: var(--wp--preset--color--red) !important;
	color: #fff !important;
}

/* Red section / footer / mega-menu button hover — white bg, red text */
.is-style-section-secondary .wp-block-button .wp-block-button__link:hover,
.is-style-section-secondary .wp-block-button .wp-element-button:hover,
.is-style-section-secondary-bordered .wp-block-button .wp-block-button__link:hover,
.is-style-section-secondary-bordered .wp-block-button .wp-element-button:hover,
.site-footer .wp-block-button .wp-block-button__link:hover,
.site-footer .wp-block-button .wp-element-button:hover,
.wp-block-mysammys-mega-menu .wp-block-button .wp-block-button__link:hover,
.wp-block-mysammys-mega-menu .wp-block-button .wp-element-button:hover {
	background-color: #fff !important;
	color: var(--wp--preset--color--red) !important;
}

/* Gravity Forms submit button — match theme button style */
.gform_wrapper .gform_button,
.gform_wrapper button[type="submit"] {
	background: var(--wp--preset--color--gold) !important;
	color: var(--wp--preset--color--red) !important;
	font-family: "MD Nichrome", Georgia, serif !important;
	font-size: var(--wp--preset--font-size--button) !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	border: none !important;
	border-radius: 100px !important;
	padding: 1rem 2.5rem !important;
	cursor: pointer;
}

.gform_wrapper .gform_button:hover,
.gform_wrapper button[type="submit"]:hover {
	background: var(--wp--preset--color--red) !important;
	color: #fff !important;
}

/* Gravity Forms labels */
.gform_wrapper .gfield_label,
.gform_wrapper .gfield legend {
	color: var(--wp--preset--color--red) !important;
	font-family: "Albert Sans", sans-serif !important;
	font-weight: 600 !important;
}

/* Gravity Forms inputs */
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper input[type="tel"],
.gform_wrapper input[type="url"],
.gform_wrapper textarea,
.gform_wrapper select {
	background: #fff !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 10px !important;
}

/* Navigation — Order Now CTA button in header */
.wp-block-navigation .order-now-cta .wp-block-button__link {
	border-radius: 0;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
}

/* ==========================================================================
   Decorative dot border — wraps header + main, excludes footer
   .site-frame is added as a wrapper in every template
   ========================================================================== */

.site-frame {
	position: relative;
	padding: 0 42px calc(42px + 2rem);
}

@media (max-width: 1398px) {
	.site-frame {
		padding-left: 84px;
		padding-right: 84px;
	}
}

@media (max-width: 768px) {
	.site-frame {
		padding-top: 0;
		padding-bottom: 1rem;
	}
}


/* Section: Red Bordered — red bg with offset top/bottom borders */
.is-style-section-secondary-bordered {
	position: relative;
}

.is-style-section-secondary-bordered::before,
.is-style-section-secondary-bordered::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	height: 0;
	border-top: 3px solid var(--wp--preset--color--red);
	pointer-events: none;
    z-index: -1;
}

.is-style-section-secondary-bordered .wp-block-group {
	position: relative;
	z-index: 1;
}

.is-style-section-secondary-bordered::before {
	top: -0.75rem;
	z-index: 0;
}

.is-style-section-secondary-bordered::after {
	bottom: -0.75rem;
	z-index: 0;
}

/* Headline style — MD Nichrome 700, title case */
.is-style-headline {
	font-family: "MD Nichrome", Georgia, serif;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: capitalize;
}

/* Annotated style — Albert Sans 800, uppercase, rounded border */
.is-style-annotated {
	font-family: "Albert Sans", sans-serif;
	font-weight: 800;
	font-size: 1.125rem;
	text-transform: uppercase;
	border: 2px solid currentColor;
	border-radius: 100px;
	padding: 0.25em 1em;
	display: inline-block;
}

/* Subheadline style — Albert Sans 800, uppercase, underlined with offset */
.is-style-subheadline {
	font-family: "Albert Sans", sans-serif;
	font-weight: 800;
	font-size: 1.125rem;
	text-transform: uppercase;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.5rem;
}

/* Photograph style — white border, slightly rounded, layered shadow */
.is-style-photograph img:not(.mysammys-ornament) {
	border: 0.8rem solid #fff;
	border-radius: 0.25rem;
	box-shadow: 0px 4px 4px 0px #00000040, 10px 10px 20px 0px #00000040;
}

.is-style-photograph .mysammys-ornament {
	border: none;
	box-shadow: none;
}

@media (max-width: 768px) {
	.is-style-photograph {
		max-width: calc(100% - 8rem);
		margin-left: auto;
		margin-right: auto;
	}

	.is-style-photograph[style*="rotate(5deg)"] {
		transform: rotate(-5deg) !important;
	}

	.is-style-photograph[style*="rotate(-3deg)"] {
		transform: rotate(3deg) !important;
	}

	.is-style-photograph[style*="rotate(4deg)"] {
		transform: rotate(-4deg) !important;
	}
}

/* Photographs gallery style — overlapping stack of 4 */
.is-style-photographs {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	overflow: visible;
}

.is-style-photographs .wp-block-image {
	min-width: 0;
}

.is-style-photographs .wp-block-image.is-landscape {
	flex: 0 0 28%;
	align-self: flex-end;
}

.is-style-photographs .wp-block-image.is-portrait {
	flex: 0 0 18%;
}

.is-style-photographs .wp-block-image img {
	border: 0.8rem solid #fff;
	border-radius: 0.25rem;
	box-shadow: 0px 4px 4px 0px #00000040, 10px 10px 20px 0px #00000040;
	filter: grayscale(100%);
}

/* Image 1 */
.is-style-photographs .wp-block-image:nth-child(1) {
	z-index: 1;
	transform: rotate(-1.73deg) translateY(-5%);
}

/* Image 2: on top of 1 and 3 */
.wp-block-gallery.is-style-photographs figure.wp-block-image:not(#individual-image):nth-child(2) {
	margin-left: -7.5%;
	z-index: 3;
	transform: rotate(4deg) translateY(30%);
}

/* Image 3: on top of 4 */
.wp-block-gallery.is-style-photographs figure.wp-block-image:not(#individual-image):nth-child(3) {
	margin-left: -7.5%;
	z-index: 2;
	transform: rotate(-1.73deg) translateY(-10%);
}

/* Image 4 */
.wp-block-gallery.is-style-photographs figure.wp-block-image:not(#individual-image):nth-child(4) {
	margin-left: -7.5%;
	z-index: 1;
	transform: rotate(4deg) translateY(15%);
}

/* Stacked Photographs gallery style — 2 images vertically overlapping */
.is-style-stacked-photographs {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wp-block-gallery.is-style-stacked-photographs figure.wp-block-image:not(#individual-image) {
	width: 100% !important;
	max-width: 100% !important;
}

.is-style-stacked-photographs .wp-block-image img {
	border: 0.8rem solid #fff;
	border-radius: 0.25rem;
	box-shadow: 0px 4px 4px 0px #00000040, 10px 10px 20px 0px #00000040;
}

.wp-block-gallery.is-style-stacked-photographs figure.wp-block-image:not(#individual-image):nth-child(1) {
	transform: rotate(-5.76deg);
	z-index: 1;
}

.wp-block-gallery.is-style-stacked-photographs figure.wp-block-image:not(#individual-image):nth-child(2) {
	transform: rotate(2.44deg);
	z-index: 2;
	margin-top: -15%;
}

/* Rounded image style — force square aspect ratio */
.is-style-rounded img {
	aspect-ratio: 1;
	object-fit: cover;
}

/* Callout image — overflows container on desktop, resets on mobile */
.callout-image {
	transform: scale(1.1);
}

@media (max-width: 768px) {
	.callout-image {
		transform: none;
		margin-top: var(--wp--preset--spacing--40) !important;
		margin-bottom: 0 !important;
	}
}

/* Reverse columns on desktop */
.is-style-reverse {
	flex-direction: row-reverse !important;
}

@media (max-width: 768px) {
	.is-style-reverse {
		flex-direction: column !important;
	}

	.wp-block-columns {
		row-gap: var(--wp--preset--spacing--40);
	}
}

/* Video block */
.site-frame .wp-block-video {
	border-radius: 1rem;
	overflow: hidden;
}

/* Full width blocks break out of site-frame padding */
@media (min-width: 1399px) {
	.site-frame > * > .alignfull,
	.site-frame > * > * > .alignfull {
		margin-left: -42px !important;
		margin-right: -42px !important;
		max-width: none !important;
		width: auto !important;
		box-sizing: border-box;
	}
}


/* Full bleed backgrounds at all screen sizes */
.red-banner-cta,
.photographs-banner {
	margin-left: calc(-1 * (84px + 2rem)) !important;
	margin-right: calc(-1 * (84px + 2rem)) !important;
	padding-left: var(--wp--preset--spacing--50) !important;
	padding-right: var(--wp--preset--spacing--50) !important;
	max-width: none !important;
	width: auto !important;
	box-sizing: border-box;
}

@media (min-width: 1399px) {
	.red-banner-cta,
	.photographs-banner {
		margin-left: -42px !important;
		margin-right: -42px !important;
	}
}

@media (max-width: 1024px) {
	.red-banner-cta .wp-block-image img {
		max-width: 150px;
		height: auto;
	}
}

@media (max-width: 768px) {
	.red-banner-cta .wp-block-image img {
		max-width: 100px;
	}

	.red-banner-cta,
	.photographs-banner {
		margin-left: -2rem !important;
		margin-right: -2rem !important;
	}

	.red-banner-cta {
		align-items: center !important;
		justify-content: center !important;
	}

	.red-banner-cta > .alignwide {
		padding-top: var(--wp--preset--spacing--40) !important;
		padding-bottom: var(--wp--preset--spacing--40) !important;
	}

	.red-banner-cta > .is-layout-flex {
		flex-wrap: wrap !important;
		justify-content: center !important;
		text-align: center;
		gap: var(--wp--preset--spacing--10) !important;
	}

	.red-banner-cta .wp-block-heading,
	.red-banner-cta .wp-block-buttons,
	.red-banner-cta .is-content-justification-right {
		width: 100% !important;
		text-align: center !important;
	}

	.red-banner-cta .wp-block-image {
		display: none;
	}

	.red-banner-cta .wp-block-buttons,
	.red-banner-cta .is-content-justification-right {
		justify-content: center !important;
	}
}

/* Prevent horizontal scroll from full-width breakout */
html {
	overflow-x: clip;
}

/* Inset group style — sits inside the dot border with gap equal to outer body padding */
.is-style-inset {
	padding-left: calc(42px + 2rem);
	padding-right: calc(42px + 2rem);
	overflow: hidden;
}

/* Ensure video and figure fill the inset container and respect border-radius */
.is-style-inset .wp-block-video,
.is-style-inset .wp-block-video video {
	display: block;
	margin: 0;
	width: 100%;
	border-radius: 1rem;
}

@media (max-width: 768px) {
	body {
		padding: 1rem;
	}

	.site-frame::before {
		display: none;
	}

	.site-frame {
		padding-left: 0;
		padding-right: 0;
	}

	.is-style-inset {
		padding-left: 0;
		padding-right: 0;
	}

	.alignwide {
		max-width: 100% !important;
	}
}

.site-frame::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: -1;

	/*
	 * border-image handles the corner-to-corner dot border cleanly.
	 * Source SVG (98×98): 21px border, slice 21 for half-size dots.
	 */
	border: 42px solid transparent;
	border-image: url('assets/images/dot-border.svg') 42 round;
}

/* ==========================================================================
   Our Story — overlapping photo stack
   ========================================================================== */

.our-story-ornament {
	max-width: 200px;
	margin-left: auto;
	margin-bottom: 0;
}

.our-story-ornament + .is-style-photograph {
	max-width: 75%;
}

.our-story-photos-overlap {
	margin-top: -12rem;
}

.our-story-photos-overlap .wp-block-image {
	max-width: 80%;
}

.our-story-photos-overlap .wp-block-image:nth-child(2) {
	margin-left: auto;
	margin-top: -4rem;
}
