/* ==========================================================================
   Shesmalificent theme styles (the parts theme.json can't express)
   ========================================================================== */

/* ---------- Basics ---------- */

html {
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--wp--preset--color--butter);
	color: var(--wp--preset--color--plum);
}

:where(a, button, input, summary, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--orchid);
	outline-offset: 3px;
	border-radius: 4px;
}

.has-plum-background-color :where(a, button, input, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--butter);
}

.wp-block-separator {
	border: 0;
	border-bottom: 2px solid currentColor;
	opacity: 1;
}

/* Links on dark sections */
.has-plum-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--white);
	text-decoration-color: var(--wp--preset--color--orchid-light);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.has-plum-background-color a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--butter);
}

/* Body copy links get a thicker, offset underline */
.entry-content a:where(:not(.wp-element-button)),
.wp-block-post-content a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Keep long reads comfortable */
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol {
	max-width: 68ch;
}

/* ---------- Header ---------- */

.sm-header {
	border-bottom: 2px solid var(--wp--preset--color--plum);
}

.sm-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--blush);
	color: var(--wp--preset--color--plum);
}

.sm-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.75rem;
	font-weight: 700;
}

.sm-header .sm-header-cta .wp-block-button__link {
	box-shadow: 4px 4px 0 var(--wp--preset--color--plum);
	padding: 0.55rem 1.1rem;
	font-size: 0.95rem;
}

@media (max-width: 600px) {
	.sm-header .sm-header-cta {
		display: none;
	}
}

/* ---------- Big sis note (handwritten) ---------- */

.is-style-big-sis-note {
	font-family: var(--wp--preset--font-family--handwritten);
	font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
	line-height: 1.2;
	color: var(--wp--preset--color--orchid);
	transform: rotate(-3deg);
	transform-origin: left center;
	display: block;
	width: fit-content;
	max-width: 100%;
	letter-spacing: 0;
}

.is-style-big-sis-note::after {
	content: "";
	display: inline-block;
	width: 2.4em;
	height: 0.9em;
	margin-left: 0.3em;
	vertical-align: -0.35em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22'%3E%3Cpath d='M2 6c12 10 30 13 50 8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M44 6l9 8-11 5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 22'%3E%3Cpath d='M2 6c12 10 30 13 50 8' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M44 6l9 8-11 5' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.is-style-big-sis-note.no-arrow::after {
	display: none;
}

.has-plum-background-color .is-style-big-sis-note {
	color: var(--wp--preset--color--orchid-light);
}

/* ---------- Polaroid image ---------- */

.wp-block-image.is-style-polaroid {
	background: var(--wp--preset--color--white);
	padding: 0.8rem 0.8rem 0;
	border-radius: 4px;
	box-shadow: var(--wp--preset--shadow--photo);
	transform: rotate(2.5deg);
	width: fit-content;
	max-width: 100%;
}

.wp-block-image.is-style-polaroid img {
	border-radius: 2px;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
	height: auto;
}

.wp-block-image.is-style-polaroid figcaption,
.wp-block-image.is-style-polaroid .wp-element-caption {
	font-family: var(--wp--preset--font-family--handwritten);
	font-size: 1.5rem;
	color: var(--wp--preset--color--plum);
	text-align: center;
	margin: 0;
	padding: 0.6rem 0 0.9rem;
}

.sm-tilt-left .wp-block-image.is-style-polaroid,
.wp-block-image.is-style-polaroid.sm-tilt-left {
	transform: rotate(-2.5deg);
}

@media (prefers-reduced-motion: no-preference) {
	.wp-block-image.is-style-polaroid {
		transition: transform 0.35s ease;
	}
	.wp-block-image.is-style-polaroid:hover {
		transform: rotate(0deg);
	}
}

/* ---------- Offset card ---------- */

.wp-block-group.is-style-offset-card {
	border: 2px solid var(--wp--preset--color--plum);
	border-radius: var(--wp--custom--radius--large);
	box-shadow: 8px 8px 0 var(--wp--preset--color--plum);
	padding: var(--wp--preset--spacing--40);
}

.wp-block-group.is-style-offset-card:not(.has-background) {
	background: var(--wp--preset--color--white);
}

/* ---------- Buttons ---------- */

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--plum);
	border-color: currentColor;
	box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--plum);
	color: var(--wp--preset--color--white);
}

.has-plum-background-color .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--wp--preset--color--white);
}

.has-plum-background-color .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--plum);
}

.has-plum-background-color .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	box-shadow: 6px 6px 0 var(--wp--preset--color--orchid-light);
	border-color: var(--wp--preset--color--plum);
}

.wp-block-button__link.has-butter-background-color:hover {
	background: var(--wp--preset--color--white) !important;
	color: var(--wp--preset--color--plum) !important;
}

@media (prefers-reduced-motion: no-preference) {
	.wp-element-button {
		transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	}
	.wp-element-button:active {
		transform: translate(3px, 3px);
		box-shadow: 2px 2px 0 var(--wp--preset--color--plum);
	}
}

/* ---------- Checklist ---------- */

.wp-block-list.is-style-checklist {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-checklist li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.6rem;
}

.wp-block-list.is-style-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: var(--wp--preset--color--orchid);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-list.is-style-checklist li::after {
	content: "";
	position: absolute;
	left: 0.36rem;
	top: calc(0.3em + 0.26rem);
	width: 0.42rem;
	height: 0.25rem;
	border-left: 2px solid var(--wp--preset--color--white);
	border-bottom: 2px solid var(--wp--preset--color--white);
	transform: rotate(-45deg);
}

.has-plum-background-color .wp-block-list.is-style-checklist li::before {
	background: var(--wp--preset--color--orchid-light);
}

.has-plum-background-color .wp-block-list.is-style-checklist li::after {
	border-color: var(--wp--preset--color--plum);
}

/* ---------- Hero ---------- */

.sm-hero h1 {
	line-height: var(--wp--custom--line-height--tight);
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.sm-hero .sm-hero-photo {
	display: flex;
	justify-content: center;
}

/* ---------- Post lists ---------- */

.sm-post-list .wp-block-post {
	border-top: 2px solid var(--wp--preset--color--plum);
	padding-top: var(--wp--preset--spacing--30);
}

.sm-post-list .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--orchid);
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}

.sm-post-list .wp-block-post-terms a {
	color: var(--wp--preset--color--orchid);
	text-decoration: none;
}

.wp-block-post-featured-image img {
	border-radius: var(--wp--custom--radius--small);
}

/* ---------- Single post ---------- */

.sm-single-header .wp-block-post-terms a {
	display: inline-block;
	background: var(--wp--preset--color--butter);
	color: var(--wp--preset--color--plum);
	border: 2px solid var(--wp--preset--color--plum);
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.15rem 0.7rem;
	text-decoration: none;
}

.sm-single-header .wp-block-post-terms .wp-block-post-terms__separator {
	display: inline-block;
	width: 0.3rem;
	color: transparent;
}

.wp-block-post-content h2 {
	margin-top: 2.6rem;
}

.wp-block-post-content h3 {
	margin-top: 2rem;
}

.wp-block-post-content blockquote.wp-block-quote p {
	font-weight: 700;
}

.sm-author-box {
	border: 2px solid var(--wp--preset--color--plum);
	border-radius: var(--wp--custom--radius--large);
	box-shadow: 8px 8px 0 var(--wp--preset--color--orchid);
}

.sm-post-nav a {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-decoration: none;
	color: var(--wp--preset--color--plum);
}

.sm-post-nav a:hover {
	color: var(--wp--preset--color--orchid);
}

/* ---------- Signup form (styles the Toolkit plugin's markup) ---------- */

.sm-signup-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	max-width: 36rem;
}

.sm-signup-form .sm-signup-field {
	flex: 1 1 14rem;
	min-width: 0;
}

.sm-signup-form label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.sm-signup-form input[type="email"],
.sm-signup-form input[type="text"] {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--plum);
	background: var(--wp--preset--color--white);
	border: 2px solid var(--wp--preset--color--plum);
	border-radius: var(--wp--custom--radius--pill);
	padding: 0.8rem 1.2rem;
}

.sm-signup-form input::placeholder {
	color: var(--wp--preset--color--plum-soft);
	opacity: 1;
}

.sm-signup-form .sm-signup-actions {
	flex: 0 0 auto;
}

.sm-signup-form button {
	cursor: pointer;
}

.sm-signup-note {
	font-size: var(--wp--preset--font-size--small);
	margin-top: 0.75rem;
	opacity: 0.85;
}

.sm-admin-reminder {
	background: var(--wp--preset--color--butter);
	color: var(--wp--preset--color--plum);
	border: 2px dashed var(--wp--preset--color--plum);
	border-radius: var(--wp--custom--radius--small);
	padding: 0.75rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- Footer ---------- */

.sm-footer .sm-footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sm-footer .sm-footer-links li {
	margin-bottom: 0.4rem;
}

.sm-footer .sm-footer-links a {
	text-decoration: none;
	font-family: var(--wp--preset--font-family--display);
}

.sm-footer .sm-footer-links a:hover {
	text-decoration: underline;
}

.sm-footer .wp-block-site-title {
	font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem);
}

/* ---------- Numbered steps (Work With Me) ---------- */

.sm-steps {
	counter-reset: sm-step;
}

.sm-steps > .wp-block-column {
	counter-increment: sm-step;
	position: relative;
	padding-top: 3.6rem;
}

.sm-steps > .wp-block-column::before {
	content: counter(sm-step);
	position: absolute;
	top: 0;
	left: 0;
	width: 2.6rem;
	height: 2.6rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--butter);
	border: 2px solid var(--wp--preset--color--plum);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--wp--preset--color--plum);
}

/* ---------- Details / FAQ ---------- */

.wp-block-details {
	border-top: 2px solid var(--wp--preset--color--plum);
	padding: 1rem 0;
}

.wp-block-details summary {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.2rem;
	cursor: pointer;
}

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	.wp-block-image.is-style-polaroid {
		transform: rotate(1.5deg);
		margin-inline: auto;
		max-width: min(100%, 280px) !important;
	}
	.wp-block-image.is-style-polaroid img {
		width: 100% !important;
	}
	.wp-block-group.is-style-offset-card {
		box-shadow: 5px 5px 0 var(--wp--preset--color--plum);
	}
}
