/**
 * Apollon Events
 *
 * Loaded on single events only (includes/class-assets.php)
 *
 *  1. Fonts
 *  2. Variables
 *  3. Base
 *  4. Layout
 *  5. Site header
 *  6. Page header
 *  7. Introduction
 *  8. Schedule
 *  9. Gallery
 * 10. About
 *
 * Base and layout rules are scoped to .apw-event, section rules to
 * .section--{name}.
 *
 * Breakpoints
 *  640px   Schedule time stacks above the Description
 *  800px   Avada mobile header limit, Floating header from 801px
 *  992px   Page header two-column
 * 1024px   Larger type scale, gallery 4-up, About two-column
 */


/* =========================================================================
   1. Fonts
   ========================================================================= */

/* Self-hosted, regular faces preloaded by Assets::preload_fonts() */

@font-face {
	font-display: swap;
	font-family: "Geist Alt";
	font-style: normal;
	font-weight: 400;
	src: url("../fonts/GeistAlt-Regular.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "Geist Alt";
	font-style: italic;
	font-weight: 400;
	src: url("../fonts/GeistAlt-Italic.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "Geist Alt";
	font-style: normal;
	font-weight: 700;
	src: url("../fonts/GeistAlt-Bold.woff2") format("woff2");
}

@font-face {
	font-display: swap;
	font-family: "Tiempos Text";
	font-style: normal;
	font-weight: 400;
	src: url("../fonts/TiemposText-Regular.woff2") format("woff2");
}


/* =========================================================================
   2. Variables
   ========================================================================= */

.apw-event {
	/* Colour */
	--apw-navy: #0f3251;
	--apw-accent: #0d9ddb;
	--apw-surface: #ffffff;
	--apw-surface-muted: #f9f9fb;
	--apw-rule: rgba(0, 0, 0, 0.12);
	--apw-ink: #3a3b3a;
	--apw-color-type-base: #003142;
	--apw-color-type-light: #8c9a9f;

	/* Type */
	--apw-font-heading: "Tiempos Text", Georgia, "Times New Roman", serif;
	--apw-font-base: "Geist Alt", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--apw-font-weight-base: 400;
	--apw-font-weight-bold: 700;

	/* Layout */
	--apw-gutter: 24px;
	--apw-measure: 1200px;
	--apw-section-space: 56px;
	--apw-border-dotted: 3px dotted var(--apw-rule);

	/* Page header: overlay end colour doubles as the background below 992px,
	   top space clears the floating site header, form overlap = card padding
	   + fixed button height so the button's top edge meets the section edge */
	--apw-overlay-end: #031b23;
	--apw-header-top-space: 184px;
	--apw-form-padding: clamp(24px, 3vw, 36px);
	--apw-button-height: 56px;
	--apw-form-overlap: calc(var(--apw-form-padding) + var(--apw-button-height));
}

@media (min-width: 1024px) {
	.apw-event {
		--apw-section-space: 96px;
	}
}


/* =========================================================================
   3. Base
   ========================================================================= */

.apw-event {
	color: var(--apw-color-type-base);
	font-family: var(--apw-font-base);
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Type scale
   ------------------------------------------------------------------------- */

/* Element and class for each level */

.apw-event h1,
.apw-event .h1 {
	color: var(--apw-color-type-base);
	font-family: var(--apw-font-heading);
	font-size: 40px;
	font-weight: var(--apw-font-weight-base);
	line-height: 48px;
	margin: 0 0 24px;
}

.apw-event h2,
.apw-event .h2 {
	color: var(--apw-color-type-base);
	font-family: var(--apw-font-heading);
	font-size: 32px;
	font-weight: var(--apw-font-weight-base);
	line-height: 40px;
	margin: 0 0 20px;
}

.apw-event h3,
.apw-event .h3 {
	color: var(--apw-color-type-base);
	font-family: var(--apw-font-heading);
	font-size: 24px;
	font-weight: var(--apw-font-weight-base);
	line-height: 32px;
	margin: 0 0 16px;
}

.apw-event h4,
.apw-event .h4 {
	color: var(--apw-color-type-base);
	font-family: var(--apw-font-base);
	font-size: 17px;
	font-weight: var(--apw-font-weight-bold);
	line-height: 1.5;
	margin: 0 0 12px;
}

.apw-event h5,
.apw-event .h5 {
	color: var(--apw-color-type-base);
	font-family: var(--apw-font-base);
	font-size: 15px;
	font-weight: var(--apw-font-weight-bold);
	letter-spacing: 0.96px;
	line-height: 23px;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.apw-event p {
	font-size: 17px;
	line-height: 1.5;
	margin: 0 0 16px;
}

.apw-event .text--small {
	font-size: 15px;
	line-height: 1.5;
	margin: 0 0 12px;
}

@media (min-width: 1024px) {
	.apw-event h1,
	.apw-event .h1 {
		font-size: 56px;
		line-height: 64px;
	}

	.apw-event h2,
	.apw-event .h2 {
		font-size: 40px;
		line-height: 48px;
	}

	.apw-event h3,
	.apw-event .h3 {
		font-size: 28px;
		line-height: 36px;
	}
}

/* Links
   ------------------------------------------------------------------------- */

/* Text link at the foot of a section */
.apw-event .section__link {
	color: var(--apw-accent);
	display: inline-block;
	font-weight: var(--apw-font-weight-bold);
	margin-top: 24px;
	text-decoration: none;
}

.apw-event .section__link:hover,
.apw-event .section__link:focus {
	text-decoration: underline;
}

/* Section themes
   ------------------------------------------------------------------------- */

/* White type on dark backgrounds */
.apw-event .theme--dark h1, .apw-event .theme--dark .h1,
.apw-event .theme--dark h2, .apw-event .theme--dark .h2,
.apw-event .theme--dark h3, .apw-event .theme--dark .h3,
.apw-event .theme--dark h4, .apw-event .theme--dark .h4,
.apw-event .theme--dark h5, .apw-event .theme--dark .h5,
.apw-event .theme--dark p {
	color: #ffffff;
}


/* =========================================================================
   4. Layout
   ========================================================================= */

/* Avada page wrapper
   ------------------------------------------------------------------------- */

/* Avada pads #main and caps .fusion-row, event is full bleed */
.single-apollon_event #main {
	padding: 0 !important;
}

.single-apollon_event #main > .fusion-row {
	max-width: none;
}

/* Constant space under the last section */
.apw-event {
	padding-bottom: 48px;
}

/* Section spacing
   ------------------------------------------------------------------------- */

/* Default vertical padding, full-bleed sections opt out */
.apw-event .section {
	padding-block: var(--apw-section-space);
}

.apw-event .section:has(> .section--header),
.apw-event .section:has(> .section--gallery) {
	padding-block: 0;
}

/* Clear the RSVP card overhang, outranks the opt-out above */
.apw-event .section:has(> .section--header) + .section {
	padding-top: calc(var(--apw-section-space) + var(--apw-form-overlap));
}

/* Intro then schedule: halve the gap between two white sections */
.apw-event .section:has(> .section--intro) + .section:has(> .section--schedule) {
	padding-top: calc(var(--apw-section-space) / 2);
}

/* Containers
   ------------------------------------------------------------------------- */

/* Centred column capped at the site measure */
.apw-event .container--grid {
	box-sizing: border-box;
	margin-inline: auto;
	max-width: var(--apw-measure);
	padding-inline: var(--apw-gutter);
	width: 100%;
}

/* Section root side padding */
.apw-event .container--wrap {
	padding-left: 4vw;
	padding-right: 4vw;
}

/* Inner width limits */
.apw-event .wrap--base {
	max-width: 1240px;
	width: 100%;
}

.apw-event .wrap--small {
	max-width: 800px;
	width: 100%;
}

.apw-event .push--center {
	margin-left: auto;
	margin-right: auto;
}


/* =========================================================================
   5. Site header
   ========================================================================= */

/* Keyed to body.apw-transparent-header, added by includes/class-header.php.
   Avada floats the header above 800px only. Outside .apw-event, so colours
   are literal */

@media (min-width: 801px) {
	/* Clear the floating header */
	.apw-transparent-header .section--header {
		padding-top: var(--apw-header-top-space);
	}

	/* Avada's cached dynamic CSS sets --header_bg_color on .fusion-header */
	.apw-transparent-header .fusion-header-wrapper:not(.fusion-is-sticky) .fusion-header {
		background-color: transparent;
	}

	/* White menu while floating */
	.apw-transparent-header .fusion-header-wrapper:not(.fusion-is-sticky) .fusion-main-menu > ul > li > a {
		color: #ffffff;
	}

	/* White logo while floating, Avada swaps its own once stuck */
	.apw-transparent-header .fusion-header-wrapper:not(.fusion-is-sticky) .fusion-standard-logo {
		content: url("../img/logo-white-1x.png");
	}

	@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
		.apw-transparent-header .fusion-header-wrapper:not(.fusion-is-sticky) .fusion-standard-logo {
			content: url("../img/logo-white-2x.png");
		}
	}
}


/* =========================================================================
   6. Page header
   ========================================================================= */

.section--header {
	background-color: var(--apw-navy);
	position: relative;
}

/* Background image
   ------------------------------------------------------------------------- */

.section--header .section__media {
	inset: 0;
	overflow: hidden;
	position: absolute;
}

/* Contrast overlay, fades to solid at the bottom edge */
.section--header .section__media::after {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.32) 0%, var(--apw-overlay-end) 100%);
	content: "";
	inset: 0;
	position: absolute;
}

/* Let the navy show through */
.section--header .section__image {
	display: block;
	height: 100%;
	object-fit: cover;
	opacity: 0.96;
	width: 100%;
}

/* Content column
   ------------------------------------------------------------------------- */

.section--header .container--grid {
	display: grid;
	gap: 56px;
	position: relative;
	z-index: 1;
}

.section--header .section__wrap--content {
	max-width: 448px;
	width: 100%;
}

.section--header .section__eyebrow {
	margin: 0 0 12px;
}

.section--header .section__content p:last-child {
	margin: 0;
}

/* Event details
   ------------------------------------------------------------------------- */

.section--header .section__details {
	color: var(--apw-surface);
	line-height: 1.5;
	margin-top: 32px;
}

/* 64% white per the design, qualified to outrank .theme--dark p */
.section--header .section__details .section__details-label {
	color: rgba(255, 255, 255, 0.64);
	font-size: 15px;
	margin: 0 0 24px;
}

.section--header .section__meta {
	display: grid;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.section--header .section__meta-item {
	align-items: start;
	display: grid;
	gap: 20px;
	grid-template-columns: 32px minmax(0, 1fr);
}

.section--header .section__meta-icon {
	display: block;
	height: 32px;
	width: 32px;
}

.section--header .section__meta-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.section--header .section__meta-label {
	font-weight: var(--apw-font-weight-bold);
}

.section--header .section__meta-link {
	align-self: flex-start;
	color: var(--apw-surface);
	font-size: 15px;
	font-weight: var(--apw-font-weight-bold);
	margin-top: 8px;
	text-decoration: none;
}

.section--header .section__meta-link:hover,
.section--header .section__meta-link:focus {
	text-decoration: underline;
}

/* RSVP card
   ------------------------------------------------------------------------- */

/* Pinned to the row bottom and pulled down by --apw-form-overlap */
.section--header .section__form {
	align-self: end;
	background-color: var(--apw-surface);
	box-shadow: 0 20px 48px rgba(9, 30, 50, 0.18);
	box-sizing: border-box;
	color: var(--apw-ink);
	margin-bottom: calc(var(--apw-form-overlap) * -1);
	padding: var(--apw-form-padding);
}

.section--header .section__form-title {
	color: var(--apw-navy);
	font-size: 24px;
	margin-bottom: 8px;
}

.section--header .section__form-intro {
	font-size: 14px;
	margin-bottom: 24px;
}

.section--header .section__form-intro p:last-child {
	margin-bottom: 0;
}

/* Editor notice when no form is chosen */
.section--header .section__form-notice {
	background-color: var(--apw-surface-muted);
	font-size: 14px;
	margin: 0;
	padding: 16px;
}

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

/* .gravity-theme and !important where needed to outrank the GF theme
   stylesheet (loads after this) and Avada's dynamic CSS */

.section__form .gform_wrapper {
	margin: 0;
}

.section__form .gform_wrapper .gform_required_legend {
	display: none;
}

/* Gap between fields */
.section__form .gform_wrapper.gravity-theme .gform_fields {
	row-gap: 16px;
}

/* Avada sets Montserrat on controls directly */
.section__form .gform_wrapper :is(input, select, textarea, button, label, legend, .gfield_label, .gform_button) {
	font-family: var(--apw-font-base);
}

.section__form .gform_wrapper.gravity-theme .gfield_label {
	font-size: 14px;
	font-weight: var(--apw-font-weight-bold);
	margin-bottom: 2px !important;
}

.section__form .gform_wrapper input[type="text"],
.section__form .gform_wrapper input[type="email"],
.section__form .gform_wrapper input[type="tel"],
.section__form .gform_wrapper input[type="number"],
.section__form .gform_wrapper select,
.section__form .gform_wrapper textarea {
	border: 1px solid var(--apw-rule);
	border-radius: 0;
	box-sizing: border-box;
	font-size: 14px;
	padding: 10px 12px;
	width: 100%;
}

.section__form .gform_wrapper :is(input, textarea)::placeholder {
	color: rgba(0, 0, 0, 0.48);
	opacity: 1; /* Firefox dims placeholders */
}

.section__form .gform_wrapper :is(input, select, textarea, button, .gform_button) {
	border-radius: 0 !important;
}

.section__form .gform_wrapper input:focus,
.section__form .gform_wrapper select:focus,
.section__form .gform_wrapper textarea:focus {
	border-color: #00a6e3 !important;
	outline: 2px solid transparent;
	outline-offset: 2px;
}

.section__form .gform_wrapper.gravity-theme .gform_footer {
	margin: 20px 0 0;
	padding: 0;
}

.section__form .gform_wrapper.gravity-theme .gform_button {
	background-color: var(--apw-accent);
	border: 0;
	border-radius: 0;
	box-sizing: border-box;
	color: var(--apw-surface);
	cursor: pointer;
	font-family: var(--apw-font-base);
	font-size: 15px;
	font-weight: var(--apw-font-weight-bold);
	height: var(--apw-button-height);
	line-height: 24px;
	padding: 16px 32px;
	text-transform: uppercase;
}

.section__form .gform_wrapper .gform_button:hover,
.section__form .gform_wrapper .gform_button:focus {
	background-color: var(--apw-navy);
}

/* Breakpoints
   ------------------------------------------------------------------------- */

/* Solid in-flow site header up to 800px, see 5 for 801px+ */
@media (max-width: 800px) {
	.section--header {
		padding-top: 56px;
	}
}

/* Single column: cap the image, background matches the overlay end */
@media (max-width: 991px) {
	.section--header {
		background-color: var(--apw-overlay-end);
	}

	.section--header .section__media {
		max-height: 480px;
	}
}

/* Two columns: content and RSVP card */
@media (min-width: 992px) {
	.section--header .container--grid {
		align-items: start;
		grid-template-columns: minmax(0, 1fr) 512px;
	}

	.section--header .section__wrap--content {
		padding-bottom: 72px;
	}
}


/* =========================================================================
   7. Introduction
   ========================================================================= */

.section--intro {
	text-align: center;
}

.section--intro .section__heading {
	color: var(--apw-navy);
	font-size: clamp(28px, 3.5vw, 40px);
	margin-bottom: 20px;
}

.section--intro .section__content {
	font-size: 15px;
}

.section--intro .section__content p:last-child {
	margin-bottom: 0;
}

/* Partner logo and credit, above the RSVP link */
.section--intro .section__partner {
	margin-top: 32px;
}

.section--intro .section__partner-logo {
	display: block;
	height: auto;
	margin: 0 auto;
	max-height: 72px;
	max-width: 200px;
	width: auto;
}

.section--intro .section__partner-logo--grayscale {
	filter: grayscale(100%);
}

/* Matches the gallery caption */
.section--intro .section__partner-credit {
	color: var(--apw-color-type-light);
	margin: 12px auto 0;
	max-width: 400px;
}


/* =========================================================================
   8. Schedule
   ========================================================================= */

.section--schedule .feed--schedule {
	display: grid;
}

/* Time beside body, dotted rule between items */
.section--schedule .item {
	align-items: start;
	border-top: var(--apw-border-dotted);
	display: grid;
	grid-template-columns: 1fr 3fr;
	padding: 32px 0;
}

.section--schedule .item__body {
	max-width: 640px;
}

.section--schedule .item__time {
	color: var(--apw-color-type-light);
	margin: 0;
	white-space: nowrap;
}

/* Meridiem as a small superscript */
.section--schedule .item__meridiem {
	font-size: 40%;
	margin-left: 4px;
	vertical-align: super;
}

.section--schedule .item__title {
	margin: 0 0 6px;
}

.section--schedule .item__content p:last-child {
	margin-bottom: 0;
}

/* Breakpoints
   ------------------------------------------------------------------------- */

/* Stack time above body */
@media (max-width: 639px) {
	.section--schedule .item {
		gap: 4px;
		grid-template-columns: 1fr;
	}
}


/* =========================================================================
   9. Gallery
   ========================================================================= */

/* Full bleed, gutter matches the grid gap */
.section--gallery {
	padding-left: 8px;
	padding-right: 8px;
}

.section--gallery .section__caption {
	color: var(--apw-color-type-light);
	margin: 0 0 24px;
	text-align: center;
}

.section--gallery .feed--gallery {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, 1fr);
}

/* Square tiles */
.section--gallery .item {
	aspect-ratio: 1 / 1;
}

.section--gallery .item__image {
	display: block;
	height: 100%;
	object-fit: cover;
	object-position: center;
	width: 100%;
}

/* Breakpoints
   ------------------------------------------------------------------------- */

@media (min-width: 1024px) {
	.section--gallery .feed--gallery {
		grid-template-columns: repeat(4, 1fr);
	}
}


/* =========================================================================
   10. About
   ========================================================================= */

.section--about .container--grid {
	align-items: center;
	display: grid;
	gap: 32px;
}

.section--about .section__eyebrow {
	margin: 0 0 20px;
}

.section--about .section__content p:last-child {
	margin-bottom: 0;
}

.section--about .section__image {
	display: block;
	height: auto;
	width: 100%;
}

/* Breakpoints
   ------------------------------------------------------------------------- */

/* Two columns, image-left swaps visually while the DOM stays content-first */
@media (min-width: 1024px) {
	.section--about .container--grid {
		gap: 96px;
		grid-template-columns: repeat(2, 1fr);
	}

	.section--about .section__wrap--content {
		max-width: 448px;
		width: 100%;
	}

	.section--about.section--image-left .container--content {
		order: 2;
	}
}
