/* RHS '77 Reunion: site-wide styles that Divi's module settings don't cover.
   Author: Got2Web, LLC (https://www.got2web.com)
   Colors match the Divi global colors (gcid-rhs-*). */

:root {
	--rhs-red: #b23a3a;
	--rhs-ink: #1e1c1a;
	--rhs-paper: #faf7f0;
	--rhs-gold: #c9a227;
}

/* ---------- Skip link (added by functions.php) ---------- */
.rhs77-skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100000;
	padding: 12px 18px;
	background: var(--rhs-ink);
	color: #fff;
	font: 700 15px/1.2 Archivo, Arial, sans-serif;
	text-decoration: none;
}
.rhs77-skip-link:focus {
	top: 16px;
}

/* ---------- Focus that is easy to see ---------- */
a:focus-visible,
button:focus-visible,
.et_pb_button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--rhs-gold);
	outline-offset: 3px;
}

/* ---------- Links in body copy are underlined; the header nav is not ---------- */
.et_pb_text a {
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}
.et-l--header .et_pb_text a {
	text-decoration: none;
}
.et-l--header .et_pb_text a:hover {
	color: var(--rhs-red) !important;
}

/* ---------- Header stays above page content (dropdowns, transitions) ---------- */
.et-l--header {
	position: relative;
	z-index: 1000;
}

/* ---------- Header: desktop text links step down on small laptops so they stay on one line ---------- */
@media (min-width: 981px) and (max-width: 1169px) {
	.rhs-desktop-nav p {
		font-size: 13px !important;
	}
	.rhs-desktop-nav a {
		margin: 0 5px !important;
	}
	/* The button is wider than its column here; trim it so it doesn't run into the links */
	.rhs-header-cta .et_pb_button {
		font-size: 12px !important;
		letter-spacing: 0.08em !important;
		padding-left: 14px !important;
		padding-right: 14px !important;
	}
}
@media (min-width: 981px) and (max-width: 1060px) {
	.rhs-desktop-nav p {
		font-size: 12px !important;
	}
	.rhs-desktop-nav a {
		margin: 0 4px !important;
	}
}
.rhs-header-cta .et_pb_button {
	white-space: nowrap;
}

/* ---------- Header on tablets and phones: logo | hamburger, Register Now full width below ---------- */
@media (max-width: 980px) {
	/* Divi sets buttons to max-width: max-content, which would cap the width */
	.rhs-header-cta .et_pb_button_module_wrapper,
	.rhs-header-cta .et_pb_button {
		display: block;
		width: 100%;
		max-width: none !important;
		text-align: center;
	}
	/* 48px tap target */
	.rhs-header-cta .et_pb_button {
		min-height: 48px;
		padding-top: 15px !important;
		padding-bottom: 15px !important;
		font-size: 14px !important;
	}
	.rhs-mobile-menu .et_pb_menu__wrap {
		justify-content: flex-end;
	}
	.rhs-mobile-menu .mobile_menu_bar::before {
		color: var(--rhs-red);
	}
	/* The menu column sits above the Register Now column, so the open menu covers the button */
	.rhs-header-nav {
		position: relative;
		z-index: 30;
	}
	/* The dropdown opens under the header, right-aligned, instead of squeezing into the narrow menu column */
	.rhs-mobile-menu .et_mobile_nav_menu {
		position: static;
	}
	.rhs-mobile-menu .et_mobile_menu {
		left: auto !important;
		right: 0;
		width: min(320px, calc(100vw - 32px)) !important;
		padding: 8px 0 !important;
		border-top: 3px solid var(--rhs-red) !important;
		box-shadow: 0 12px 28px -10px rgba(30, 28, 26, 0.35);
		z-index: 9999;
	}
	.rhs-mobile-menu .et_mobile_menu li a {
		padding: 12px 20px !important;
		border-bottom: 0 !important;
		text-decoration: none !important;
	}
	.rhs-mobile-menu .et_mobile_menu li a:hover,
	.rhs-mobile-menu .et_mobile_menu .current-menu-item > a {
		color: var(--rhs-red) !important;
		background: transparent !important;
		opacity: 1 !important;
	}
}

/* ---------- Home: the school photo as a snapshot pinned beside the letter ---------- */
/* A white-framed print, tilted, with two strips of gold tape across the top corners. */
.rhs-snapshot {
	position: relative;
	overflow: visible !important;
	margin-left: auto;
	margin-right: auto;
	transform: rotate(2.5deg);
}
.rhs-snapshot::before,
.rhs-snapshot::after {
	content: "";
	position: absolute;
	top: -14px;
	z-index: 2;
	width: 110px;
	height: 30px;
	background: rgba(235, 203, 107, 0.55);
	box-shadow: 0 1px 2px rgba(30, 28, 26, 0.15);
	pointer-events: none;
}
.rhs-snapshot::before {
	left: -22px;
	transform: rotate(-38deg);
}
.rhs-snapshot::after {
	right: -22px;
	transform: rotate(38deg);
}
.rhs-snapshot .et_pb_image {
	margin-bottom: 12px !important;
}
@media (max-width: 980px) {
	.rhs-snapshot {
		max-width: 460px !important;
		transform: rotate(1.5deg);
	}
}
@media (max-width: 767px) {
	.rhs-snapshot::before,
	.rhs-snapshot::after {
		width: 84px;
		height: 24px;
	}
	.rhs-snapshot::before {
		left: -8px;
	}
	.rhs-snapshot::after {
		right: -8px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.rhs-snapshot {
		transform: none;
	}
}

/* ---------- Images: clip to their wrapper so borders and corners hold on phones ---------- */
.et_pb_image_wrap {
	overflow: hidden;
	display: block;
}

/* ---------- Got2Grow embeds fill their column ---------- */
.rhs-got2grow-placeholder iframe {
	width: 100% !important;
	max-width: 100%;
	border: 0;
}

/* ---------- Motion (rhs-motion.js), only when html has .motion ---------- */
/* Uses the separate translate property, so it adds to any transform an element
   already has (the tilted snapshot keeps its tilt). Nothing moves more than 16px. */
html.motion .rhs-settle,
html.motion .rhs-reveal {
	opacity: 0;
	translate: 0 16px;
	transition:
		opacity 0.7s ease,
		translate 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
	transition-delay: var(--rhs-delay, 0ms);
}
html.motion .rhs-settle {
	translate: 0 10px;
	transition-duration: 0.8s;
}
html.motion .rhs-settle.is-in,
html.motion .rhs-reveal.is-in {
	opacity: 1;
	translate: 0 0;
}

/* Page to page: a quick cross-fade where the browser supports it. The header
   stays put during the fade and keeps its own layer above the page. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition {
		navigation: auto;
	}
	::view-transition-old(root),
	::view-transition-new(root) {
		animation-duration: 0.25s;
	}
	.et-l--header {
		view-transition-name: rhs-header;
	}
	::view-transition-group(rhs-header) {
		animation-duration: 0s;
	}

	/* Hover: buttons lift a little; cards lift and their shadow deepens;
	   the Home snapshot straightens slightly. */
	.et_pb_button {
		transition:
			translate 0.2s ease,
			box-shadow 0.2s ease,
			background-color 0.2s ease,
			color 0.2s ease,
			border-color 0.2s ease !important;
	}
	.et_pb_button:hover,
	.et_pb_button:focus-visible {
		translate: 0 -2px;
		box-shadow: 0 8px 18px -8px rgba(30, 28, 26, 0.45);
	}
	.rhs-card {
		transition:
			translate 0.25s ease,
			box-shadow 0.25s ease;
	}
	.rhs-card:hover {
		translate: 0 -4px;
		box-shadow: 0 16px 30px -16px rgba(30, 28, 26, 0.4);
	}
	.rhs-snapshot {
		transition: transform 0.4s ease;
	}
	.rhs-snapshot:hover {
		transform: rotate(0.75deg);
	}
	/* Once an item has appeared (rhs-motion.js adds .is-done), hover transitions take over */
	html.motion .rhs-reveal.is-done,
	html.motion .rhs-settle.is-done {
		transition:
			translate 0.25s ease,
			box-shadow 0.25s ease,
			transform 0.4s ease;
		transition-delay: 0ms;
	}
}

/* ---------- Anchor links (#share-a-memory, #contact-form) land with some room ---------- */
[id] {
	scroll-margin-top: 24px;
}
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
