/*--------------------------------------------------------------
# Variables & Theme
--------------------------------------------------------------*/
html {
	--_br-larger: 1.125rem;
	/* Top-area background gradient opacity */
	--_color-splash-opacity: 0.4;
}

html[data-theme="dark"] {
	--_color-splash-opacity: 0.5;
}

body {
	background-image: none !important;
}

/*--------------------------------------------------------------
# Widgets
--------------------------------------------------------------*/
.widget-edit-area {
	position: relative;
}

.widget-edit-icon {
	position: absolute;
	right: 0;
	bottom: -40px;
	z-index: 1;

	display: flex;
	justify-content: center;
	align-items: center;

	width: 40px;
	height: 40px;
	padding: 10px;

	font-size: 1.1rem;
	text-decoration: none;

	color: var(--f-color-text-2);
	background-color: var(--f-color-bg-1);
	border-radius: 40px;

	opacity: 0;
	transition: opacity 0.2s ease;
}

/* Consolidated selectors using :is() (Supported 2020) */
:is(.widget-edit-icon:hover, body.is-mobile .widget-edit-icon, .widget-edit-area:hover .widget-edit-icon) {
	opacity: 1;
	color: var(--f-color-text-0);
}

/* Hover hierarchy */
:is(.widget-edit-icon, body.is-mobile .widget-edit-icon, .widget-edit-area:hover .widget-edit-icon)>i {
	transition: opacity 0.2s ease;
}

:is(.widget-edit-icon:hover, body.is-mobile .widget-edit-icon, .widget-edit-area:hover .widget-edit-icon)>i {
	opacity: 0.7 !important;
}

:is(.widget-edit-icon:hover:hover, body.is-mobile .widget-edit-icon:hover, .widget-edit-area:hover .widget-edit-icon:hover)>i {
	opacity: 1 !important;
}

.area-footer .widget-edit-icon {
	bottom: 0;
}

/*--------------------------------------------------------------
## Posts and Pages
--------------------------------------------------------------*/
.hentry {
	margin: 0 0 1.5em;
}

.byline,
.updated:not(.published) {
	display: none;
}

.page-links {
	clear: both;
	margin: 0 0 1.5em;
}

/*--------------------------------------------------------------
## Areas
--------------------------------------------------------------*/
.area {
	--_hero-padding-y: clamp(3rem, -14.0526rem + 37.8947vw, 12rem);
	--_video-offset-y: 2rem;
	position: relative;
}

.area:where(.has-widget) {
	padding-block: var(--_hero-padding-y);
}

.area .container-left-right {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(35ch, 100%), 1fr));
	column-gap: 2rem;
	row-gap: 4rem;
	justify-content: space-between;
	justify-items: center;
	margin: 0 auto;
}

/* Align first child left, second right */
.area .container-left-right> :where(:nth-child(1)) {
	justify-self: start;
}
.area .container-left-right> :where(:nth-child(2)) {
	justify-self: end;
}

.area-one {
	/* overflow: clip is not supported in 2020 */
	overflow: hidden;
	padding-block: var(--_hero-padding-y) calc(var(--_hero-padding-y) + var(--_video-offset-y));
}

.area-one .grid-container {
	max-width: 950px;
}

.area-one::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 0;
	top: calc(80% + 45vw);
	margin: auto;

	width: 100%;
	aspect-ratio: 1;

	background: radial-gradient(var(--f-color-brand), transparent 90%);
	border-radius: 100%;
	filter: blur(70px);
	opacity: var(--_color-splash-opacity);
}

.area-one .first-widget-area-left {
	width: 100%;
	max-width: 62ch;
}

.area-one .first-widget-area-right {
	width: 290px;
	justify-self: right;
}

.area-two {
	border-top: 1px solid var(--f-color-border-0);
	background: linear-gradient(to bottom, var(--f-color-bg-1), var(--f-color-bg-0));
	padding-block: calc(var(--_video-offset-y) / 2);
}

.area-two section {
	margin-top: calc(var(--_video-offset-y) * -1.5);
	padding-bottom: 0;
}

.area-two section .card {
	overflow: hidden;

	/* FALLBACK */
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
	box-shadow: 0 0.5rem 1rem color-mix(in oklab, var(--f-color-text-0) 5%, transparent 95%);
}

/*--------------------------------------------------------------
## Footer
--------------------------------------------------------------*/
.area-footer {
	margin-block-start: clamp(2rem, -1.7895rem + 8.4211vw, 4rem);
	padding-block: clamp(3rem, 1.1053rem + 4.2105vw, 4rem);
	background-color: var(--f-color-bg-1);
	border-top: 1px solid var(--f-color-border-0);
}

.area-footer ul {
	list-style-type: none;
	margin: 0;
}

.area-footer .accordion,
.area-footer .card {
	background: none;
	border: none;
}

.area-footer .footer-widget-area-right {
	display: flex;
}

.area-footer .footer-logos {
	--_logo-height: 2.5rem;
	display: flex;
	align-items: center;
	gap: calc(var(--_logo-height) * 0.75);
	margin-inline: 0 auto;
}

.area-footer .footer-logos svg {
	height: var(--_logo-height);
}

.area-footer .footer-logos svg.logo-spaces {
	height: calc(var(--_logo-height) * 0.75);
}

.area-footer .logo-spaces {
	fill: var(--f-color-text-2);
}

.area-footer #menu-footer a {
	border-radius: var(--f-radius);
	transition: all var(--f-transition-medium) var(--f-transition-timing);
}

.footer-widget-area {
	display: flex;
	width: 100%;
}

/* Mobile Adjustments */
@media screen and (max-width: 719px) {
	.area .container-left-right>* {
		justify-self: center;
	}

	.area-one::after {
		bottom: -50%;
		right: -50%;
		/* dvh fallback */
		width: min(900px, 80vh);
		width: min(900px, 80dvh);
	}

	.area-one .first-widget-area-right {
		order: -1;
	}

	.area-footer .grid-x {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2rem;
	}

	.area-footer .grid-x>div {
		width: fit-content;
	}

	.area-footer .footer-logos {
		margin-inline: auto;
	}
}

/*--------------------------------------------------------------
## Login Box
--------------------------------------------------------------*/
#log-in-box {
	display: flex;
	flex-direction: column;
	gap: 15px;

	padding-inline: clamp(1.25rem, -0.1711rem + 3.1579vw, 2rem);
	padding-block: clamp(1.5rem, -0.3947rem + 4.2105vw, 2.5rem);

	border-radius: var(--_br-larger);
}

/* Mobile specific for login box */
@media screen and (max-width: 720px) {
	#log-in-box {
		width: initial;
		margin-right: auto;
	}
}

#log-in-box .message {
	margin: 15px 0 0;
	font-size: 12px;
	color: var(--f-color-text-2);
}

#log-in-box #log-in-box-logo {
	width: 30px;
	margin: 0 auto 0.5rem auto;
}

#log-in-box #log-in-box-logo path {
	opacity: 0.35;

	/* FALLBACK */
	fill: var(--f-color-neutral-400);
	fill: color-mix(in srgb, var(--f-color-brand) 12%, var(--f-color-neutral-400));
}

/* Switch Toggle */
#log-in-box .switch {
	isolation: isolate;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;

	width: 100%;
	margin-block: 0.75rem 1.2rem;
	cursor: pointer;
}

#log-in-box .switch>span:first-child {
	color: var(--f-color-text-2);
	transition: all var(--f-transition-medium) var(--f-transition-timing);
}

#log-in-box .switch:hover>span:first-child {
	color: var(--f-color-text-1);
}

#log-in-box .switch input {
	inset: 0;
	z-index: 2;
	pointer-events: all;
}

.log-in-form .message a {
	color: var(--f-color-success);
	text-decoration: none;
}

/*--------------------------------------------------------------
## User Cards / Misc
--------------------------------------------------------------*/
h2 {
	font-size: clamp(1.25rem, 1rem + 0.76vw, 1.8rem);
	line-height: 1.3;
	margin-block-end: 0.55em;
	text-wrap: balance;
}

.card-user {
	--_br: var(--_br-larger);
	--_padding: 0.5rem;
	--_br-inner: calc(var(--_br) - var(--_padding));

	border-radius: var(--_br);
	padding: var(--_padding);
}

.card-user .avatar-container {
	border-radius: var(--_br-inner);
	overflow: hidden;
}

.card-user .user-card-header {
	gap: var(--_padding);
}

.card-user .card-title {
	padding-block: var(--_padding);
}

.card-user .user-name {
	margin-bottom: 0.5em;
	font-size: 1rem;
	color: var(--f-color-text-0);
}

.card-user .user-info {
	font-size: 0.9rem;
}

/* SVG Fills */
.logo-th .logo-th-red {
	fill: #c60c0f;
}
.logo-th .logo-th-orange {
	fill: #ea5b0c;
}
.logo-th .logo-th-purple {
	fill: #b62584;
}
.logo-th .logo-th-neutral {
	fill: var(--f-color-text-1);
}
.logo-kisd {
	fill: var(--f-color-text-1);
}

.widget-add-container {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 10vh;
}

.widget-add-container>a {
	display: inline-block;
	font-size: 2.2rem;
	opacity: 0.1;
	text-decoration: none;
}

/* Videos */
iframe[src*="vimeo.com"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: var(--_br-larger);
}

.textwidget p {
	max-width: min(600px, 100%);
}

.card-section {
	padding: 0;
}

.theme-toggle-container {
	min-width: 200px;
	max-width: 200px;
}
