:root {
	--phage-reading-width: 72ch;
}

body:not(.home) #page-container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body:not(.home) #et-main-area {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}

body:not(.home) #main-content {
	flex: 1 0 auto;
}

.et_pb_section.phage-subpage-hero {
	background: var(--phage-color-forest);
	color: var(--phage-color-parchment);
	overflow: clip;
	padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5.5rem);
	position: relative;
}

.phage-subpage-hero::before {
	background: var(--phage-color-gold);
	bottom: 0;
	content: "";
	height: 4px;
	left: 0;
	position: absolute;
	width: min(42vw, 36rem);
}

.phage-subpage-hero .et_pb_row {
	align-items: center;
	display: flex;
	gap: clamp(2rem, 6vw, 6rem);
	padding: 0;
	width: min(88%, 1180px);
}

.phage-subpage-hero .et_pb_column {
	margin: 0;
}

.phage-subpage-hero-copy {
	flex: 1 1 62%;
	opacity: 1;
	transform: none;
	transition: opacity 420ms var(--phage-ease-out), transform 480ms var(--phage-ease-out);
	z-index: 1;
}

.phage-subpage-hero-art {
	align-items: center;
	display: flex;
	flex: 0 1 38%;
	justify-content: center;
	min-width: 15rem;
	position: relative;
}

.phage-subpage-hero-art::before {
	border: 1px solid color-mix(in srgb, var(--phage-color-gold) 72%, transparent);
	border-radius: 50%;
	content: "";
	inset: 8% 2% 3% 12%;
	position: absolute;
}

.phage-subpage-hero h1 {
	color: var(--phage-color-parchment);
	font-size: clamp(2.5rem, 6.25vw, 5.25rem);
	letter-spacing: -0.025em;
	margin: 0;
	max-width: 100%;
	padding: 0;
	text-wrap: balance;
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: break-word;
	word-break: normal;
}

.phage-subpage-hero--event h1,
.phage-subpage-hero--placeholder h1,
.phage-subpage-hero--legacy h1 {
	max-width: 16ch;
}

@media (min-width: 768px) {
	.phage-subpage-hero--placeholder h1 {
		font-size: clamp(2.5rem, 4.75vw, 4.25rem);
		overflow-wrap: normal;
	}
}

.phage-subpage-hero p {
	color: var(--phage-color-parchment);
	font-size: clamp(1.05rem, 1.8vw, 1.3rem);
	line-height: 1.55;
	margin: 1.4rem 0 0;
	max-width: 54ch;
	text-wrap: pretty;
}

.phage-chapter-label {
	color: var(--phage-color-gold) !important;
	font-family: var(--phage-font-display);
	font-size: 1rem !important;
	font-style: italic;
	margin-bottom: 0.8rem !important;
}

.phage-subpage-illustration img {
	display: block;
	height: auto;
	margin: 0 auto;
	max-height: clamp(14rem, 31vw, 27rem);
	object-fit: contain;
	position: relative;
	transition: opacity 700ms var(--phage-ease-out), transform 700ms var(--phage-ease-out);
	width: auto;
	z-index: 1;
}

@starting-style {
	.phage-subpage-hero-copy {
		opacity: 0;
		transform: translate3d(-1.25rem, 0.75rem, 0);
	}

	.phage-subpage-illustration img {
		opacity: 0;
		transform: translate3d(1.25rem, 1rem, 0) scale(0.98);
	}
}

.phage-subpage-hero--larp::after,
.phage-subpage-hero--event::after {
	background: var(--phage-color-terracotta);
	content: "";
	height: clamp(7rem, 16vw, 14rem);
	left: min(-3rem, -2vw);
	opacity: 0.9;
	position: absolute;
	top: 0;
	transform: skewX(-13deg);
	width: clamp(0.8rem, 1.5vw, 1.35rem);
}

.et_pb_section.phage-subpage-content {
	background: var(--phage-color-parchment);
	padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(4.5rem, 9vw, 8rem);
}

.phage-contact-page .phage-subpage-content > .et_pb_row {
	position: relative;
	z-index: 1;
}

.phage-contact-page .phage-subpage-content {
	isolation: isolate;
	overflow: clip;
	padding-bottom: clamp(29rem, 50vw, 40rem);
	padding-top: clamp(9rem, 20vw, 15rem);
	position: relative;
}

.phage-contact-page .phage-subpage-content::before,
.phage-contact-page .phage-subpage-content::after {
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	content: "";
	left: 50%;
	pointer-events: none;
	position: absolute;
	transform: translateX(-50%);
}

.phage-contact-page .phage-subpage-content::before {
	aspect-ratio: 767 / 175;
	background-image: url("assets/contact/phage-zierlinie-narrenspiegel.webp");
	top: clamp(1.5rem, 3vw, 2.75rem);
	width: min(76vw, 47.9375rem);
}

.phage-contact-page .phage-subpage-content::after,
.phage-contact-page .phage-contact-decoration-marker {
	aspect-ratio: 2 / 3;
	bottom: 2.5rem;
	width: min(70vw, 24rem);
}

.phage-contact-page .phage-subpage-content::after {
	background-image: url("assets/brand/v12-review/phage-wappen-praechtig-sekundaermarke-review.webp");
}

@media (min-width: 768px) and (max-width: 980px) {
	.phage-contact-page .phage-subpage-content {
		/* Reserve the complete crest canvas below the contact text divider. */
		padding-bottom: calc(clamp(29rem, 50vw, 40rem) + 5rem);
	}
}

html.phage-contact-decoration-pending .phage-contact-page:not(.et-fb) .phage-subpage-content::after {
	background-image: none;
}

.phage-contact-page .phage-contact-decoration-marker {
	left: 50%;
	pointer-events: none;
	position: absolute;
	transform: translateX(-50%);
	visibility: hidden;
}

.phage-subpage-content > .et_pb_row {
	padding: 0;
	width: min(88%, var(--phage-content-width));
}

.phage-subpage-content .et_pb_text_inner,
.phage-subpage-content .single-entry-summary {
	font-size: clamp(1rem, 1.2vw, 1.1rem);
	line-height: 1.75;
	max-width: var(--phage-reading-width);
}

.phage-subpage-content p,
.phage-subpage-content li,
.phage-subpage-content td,
.phage-subpage-content th {
	text-align: left !important;
	text-wrap: pretty;
}

.phage-subpage-content p {
	margin: 0 0 1.15em;
}

.phage-subpage-content h2,
.phage-subpage-content h3,
.phage-subpage-content h4 {
	letter-spacing: -0.02em;
	padding: 0;
	text-align: left !important;
	text-wrap: balance;
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: break-word;
	word-break: normal;
}

.phage-subpage-content h2 {
	font-size: clamp(1.65rem, 3.3vw, 2.45rem);
	margin: clamp(2.5rem, 5vw, 4.5rem) 0 0.8rem;
}

.phage-subpage-content h3 {
	font-size: clamp(1.35rem, 2.4vw, 1.85rem);
	margin: clamp(2rem, 4vw, 3.25rem) 0 0.7rem;
}

.phage-subpage-content h4 {
	font-size: clamp(1.15rem, 1.8vw, 1.4rem);
	margin: clamp(1.6rem, 3vw, 2.5rem) 0 0.6rem;
}

.phage-subpage-content h2:first-child,
.phage-subpage-content h3:first-child,
.phage-subpage-content h4:first-child {
	margin-top: 0;
}

.phage-subpage-content a:not(.et_pb_button) {
	color: var(--phage-color-terracotta);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentcolor 55%, transparent);
	text-decoration-thickness: 0.1em;
	text-underline-offset: 0.2em;
	transition: color 160ms ease, text-decoration-color 160ms ease;
}

.phage-subpage-content a:not(.et_pb_button):hover {
	color: var(--phage-color-forest);
	text-decoration-color: var(--phage-color-gold);
}

.phage-subpage-content table {
	border: 0;
	border-collapse: collapse;
	display: block;
	font-size: 0.96em;
	margin: 2rem 0;
	max-width: 100%;
	overflow-x: auto;
	width: 100% !important;
}

.phage-subpage-content table:focus-visible {
	outline: 3px solid var(--phage-color-terracotta);
	outline-offset: 4px;
}

.phage-subpage-content caption {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.phage-table-scroll-hint {
	display: none;
}

.phage-subpage-content th,
.phage-subpage-content td {
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, var(--phage-color-forest) 22%, transparent);
	min-width: 9rem;
	padding: 0.85rem 1rem;
	vertical-align: top;
}

.phage-subpage-content tr:first-child td,
.phage-subpage-content th {
	background: var(--phage-color-forest);
	color: var(--phage-color-parchment);
	font-weight: 700;
}

.phage-subpage-content th,
.phage-subpage-content th * {
	color: var(--phage-color-parchment) !important;
}

.phage-subpage-content mark {
	background: transparent;
	color: var(--phage-color-terracotta);
}

.phage-subpage-content mark.has-inline-color {
	color: var(--phage-color-terracotta) !important;
}

.phage-subpage-content--team .et_pb_text_inner,
.phage-subpage-content--team .single-entry-summary {
	max-width: none;
}

.phage-subpage-content--team .wp-block-media-text {
	align-items: center;
	display: grid;
	gap: clamp(1.8rem, 5vw, 5rem);
	grid-template-columns: minmax(0, 1.15fr) minmax(15rem, 0.85fr);
	margin: 0 0 clamp(3.5rem, 8vw, 7rem);
}

.phage-subpage-content--team .wp-block-media-text.has-media-on-the-right {
	grid-template-columns: minmax(15rem, 0.85fr) minmax(0, 1.15fr);
}

.phage-subpage-content--team .wp-block-media-text__media,
.phage-subpage-content--team .wp-block-media-text__content {
	margin: 0;
	padding: 0;
}

.phage-subpage-content--team .wp-block-media-text__media {
	background: var(--phage-color-forest);
	border-radius: var(--phage-radius);
	box-shadow: 0 0.5rem 0.5rem color-mix(in srgb, var(--phage-color-forest) 14%, transparent);
	min-height: 18rem;
	overflow: hidden;
}

.phage-subpage-content--team .wp-block-media-text__media img {
	border-radius: var(--phage-radius);
	display: block;
	height: clamp(20rem, 42vw, 34rem);
	object-fit: cover;
	width: 100%;
}

.phage-subpage-content--team .wp-block-media-text__content p:first-child {
	font-family: var(--phage-font-display);
	font-size: clamp(2rem, 4vw, 3.4rem) !important;
	line-height: 1.05;
	margin-bottom: 1.2rem;
}

.phage-subpage-content--team .wp-block-media-text__content p:not(:first-child) {
	border-bottom: 1px solid color-mix(in srgb, var(--phage-color-gold) 65%, transparent);
	display: table;
	font-size: 1rem !important;
	margin: 0 0 0.65rem;
	padding-bottom: 0.25rem;
}

.phage-subpage-content--team .wp-block-media-text:nth-child(odd) .wp-block-media-text__content {
	padding-right: clamp(0rem, 3vw, 2rem);
}

.phage-subpage-content--team .wp-block-media-text:nth-child(even) .wp-block-media-text__content {
	padding-left: clamp(0rem, 3vw, 2rem);
}

.phage-subpage-content--event .et_pb_text_inner,
.phage-subpage-content--event .single-entry-summary {
	max-width: 78ch;
}

.phage-subpage-content--event .single-entry-summary > div:first-child,
.phage-subpage-content--event .wp-block-column {
	max-width: 100%;
}

.phage-subpage-content--larp > .et_pb_row {
	width: min(88%, 1120px);
}

.phage-subpage-content--larp .et_pb_text_inner {
	max-width: none;
}

.phage-larp-project {
	align-items: center;
	background: var(--phage-color-forest);
	border-radius: var(--phage-radius);
	box-shadow: 0 0.5rem 0.5rem color-mix(in srgb, var(--phage-color-forest) 16%, transparent);
	color: var(--phage-color-parchment);
	display: grid;
	gap: clamp(2rem, 7vw, 6rem);
	grid-template-columns: minmax(0, 1.2fr) minmax(15rem, 0.8fr);
	overflow: hidden;
	padding: clamp(2.5rem, 6vw, 5.25rem);
	position: relative;
}

.phage-larp-project::before {
	border: 1px solid color-mix(in srgb, var(--phage-color-gold) 62%, transparent);
	border-radius: calc(var(--phage-radius) - 2px);
	content: "";
	inset: 0.75rem;
	pointer-events: none;
	position: absolute;
}

.phage-larp-project h2,
.phage-larp-project p {
	color: var(--phage-color-parchment);
}

.phage-larp-project h2 {
	font-size: clamp(2.5rem, 6vw, 4.75rem);
	margin-top: 0;
}

.phage-larp-project .et_pb_button {
	display: inline-flex;
	margin-top: 1rem;
	text-decoration: none;
}

.phage-larp-project__copy,
.phage-larp-project__art {
	position: relative;
	z-index: 1;
}

.phage-larp-project__art {
	margin: 0;
}

.phage-larp-project__art img {
	border-radius: var(--phage-radius);
	box-shadow: 0 0.45rem 0.5rem rgb(0 0 0 / 16%);
	display: block;
	height: auto;
	margin: 0 auto;
	max-height: 24rem;
	transform-origin: center;
	transition: transform 240ms var(--phage-ease-in-out);
	width: auto;
}

@media (hover: hover) and (pointer: fine) {
	.phage-larp-project:has(.et_pb_button:hover) .phage-larp-project__art img {
		transform: translate3d(6px, -3px, 0) scale(1.025);
	}
}

.phage-subpage-hero--placeholder .phage-subpage-illustration img {
	max-height: 18rem;
}

.phage-event-primary-action {
	margin-top: clamp(3rem, 7vw, 5.5rem) !important;
}

.phage-event-primary-action .et_pb_button {
	color: #fff;
	font-size: 1rem;
	letter-spacing: 0;
	text-decoration: none;
	text-transform: none;
}

.phage-subpage-content--placeholder > .et_pb_row {
	min-height: clamp(13rem, 28vw, 20rem);
}

.phage-subpage-content--placeholder .et_pb_text_inner {
	border-bottom: 2px solid var(--phage-color-gold);
	font-size: clamp(1.15rem, 2vw, 1.4rem);
	max-width: 52ch;
	padding: 0 0 2rem;
}

@media (max-width: 980px) {
	.phage-subpage-hero .et_pb_row {
		gap: 1.5rem;
	}

	.phage-subpage-hero-art {
		min-width: 12rem;
	}

	.phage-subpage-content--team .wp-block-media-text,
	.phage-subpage-content--team .wp-block-media-text.has-media-on-the-right {
		gap: 2rem;
		grid-template-columns: minmax(0, 1.05fr) minmax(13rem, 0.95fr);
	}
}

@media (max-width: 767px) {
	.phage-subpage-hero {
		padding-top: 2.75rem;
	}

	.phage-subpage-hero .et_pb_row {
		align-items: flex-start;
		flex-direction: column;
		width: min(84%, 34rem);
	}

	.phage-subpage-hero-copy,
	.phage-subpage-hero-art {
		flex-basis: auto;
		width: 100%;
	}

	.phage-subpage-hero h1 {
		font-size: clamp(2.15rem, 10.5vw, 3.6rem);
		max-width: 100%;
	}

	.phage-subpage-hero--event h1,
	.phage-subpage-hero--placeholder h1,
	.phage-subpage-hero--legacy h1 {
		font-size: clamp(2.15rem, 10.5vw, 3.4rem);
	}

	.phage-subpage-hero-art {
		justify-content: flex-end;
		margin: -0.25rem 0 -2rem;
		min-width: 0;
	}

	.phage-subpage-hero-art::before {
		inset: 10% 0 1% 28%;
	}

	.phage-subpage-illustration {
		margin-right: 0 !important;
	}

	.phage-subpage-illustration img {
		margin: 0 0 0 auto;
		max-height: 15rem;
		max-width: 78%;
	}

	.phage-larp-project {
		gap: 2rem;
		grid-template-columns: 1fr;
		padding: 2rem;
	}

	.phage-larp-project__art {
		order: -1;
	}

	.phage-larp-project__art img {
		max-height: 12rem;
	}

	.phage-table-scroll-hint {
		align-items: center;
		color: var(--phage-color-terracotta);
		display: flex;
		font-size: 0.86rem;
		font-weight: 700;
		justify-content: flex-end;
		letter-spacing: 0.02em;
		margin: 1.5rem 0 -1.35rem;
	}

	.phage-subpage-content--event table {
		box-shadow: inset -1.2rem 0 1rem -1.1rem color-mix(in srgb, var(--phage-color-forest) 72%, transparent);
		scrollbar-color: var(--phage-color-gold) color-mix(in srgb, var(--phage-color-forest) 10%, transparent);
		scrollbar-width: thin;
	}

	.phage-subpage-content > .et_pb_row {
		width: min(84%, 34rem);
	}

	.phage-subpage-content--team .wp-block-media-text,
	.phage-subpage-content--team .wp-block-media-text.has-media-on-the-right {
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
	}

	.phage-subpage-content--team .wp-block-media-text__media {
		min-height: 0;
		order: 1;
		width: 100%;
	}

	.phage-subpage-content--team .wp-block-media-text__content {
		order: 2;
		padding: 0 !important;
		width: 100%;
	}

	.phage-subpage-content--team .wp-block-media-text__media img {
		height: min(112vw, 31rem);
	}

	.phage-subpage-content table {
		margin-inline: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.phage-subpage-hero-copy,
	.phage-subpage-illustration img,
	.phage-larp-project__art img,
	.phage-subpage-content a.et_pb_button {
		transition-duration: 0.01ms !important;
		transform: none !important;
	}
}
