/*
 * Wormsy Theme 526 — front-end utility classes.
 *
 * theme.json handles colors/fonts/spacing. This file handles the hand-drawn
 * effects that theme.json can't express, plus a few component styles that
 * would otherwise be inline (and trigger "invalid block content" warnings).
 *
 * Apply via the "Additional CSS class(es)" field on any block.
 */

/* ---------- Paper / page background --------------------------------- */

body {
	position: relative;
	background-color: var(--wp--preset--color--base);
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	opacity: 0.35;
	background-image: url("https://www.transparenttextures.com/patterns/cream-paper.png");
}

.wp-site-blocks { position: relative; z-index: 1; }

/* ---------- Hand-drawn borders -------------------------------------- */

.rounded-sketch {
	border-radius: 2% 98% 1% 99% / 99% 2% 98% 1% !important;
}

.rounded-sketch-btn .wp-block-button__link,
.rounded-sketch-btn > a,
button.rounded-sketch-btn,
.rounded-sketch-btn {
	border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px !important;
	transition: all 0.3s ease;
}

.rounded-sketch-btn:hover .wp-block-button__link,
.rounded-sketch-btn > a:hover,
button.rounded-sketch-btn:hover,
.rounded-sketch-btn:hover {
	border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px !important;
	transform: scale(1.04) rotate(-1deg);
}

.dashed-frame {
	padding: 1rem;
	background: var(--wp--preset--color--base);
	border: 3px dashed var(--wp--preset--color--pencil-light);
	border-radius: 6px;
}
.dashed-frame img { display: block; border-radius: 4px; }

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

/* "Differently" — rotated word with orange highlighter underline */
.wormsy-rotate-underline {
	display: inline-block;
	transform: rotate(-2deg);
	color: var(--wp--preset--color--primary);
	background-image: linear-gradient(120deg,
		var(--wp--preset--color--primary) 0%,
		var(--wp--preset--color--primary) 100%);
	background-repeat: no-repeat;
	background-size: 100% 0.2em;
	background-position: 0 92%;
	padding: 0 0.1em;
}

/* Generic scribble highlighter, optionally interactive */
.scribble-underline {
	background-image: linear-gradient(120deg,
		var(--wp--preset--color--primary) 0%,
		var(--wp--preset--color--primary) 100%);
	background-repeat: no-repeat;
	background-size: 100% 0.25em;
	background-position: 0 88%;
	transition: background-size 0.25s ease-in;
	padding: 0 0.1em;
}

.scribble-underline:hover {
	background-size: 100% 88%;
	color: var(--wp--preset--color--base);
}

.wavy-underline {
	color: var(--wp--preset--color--primary);
	text-decoration: underline wavy var(--wp--preset--color--primary);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.marker-highlight {
	background-color: #fef08a;
	padding: 0 0.25em;
	display: inline-block;
	transform: skewX(-6deg);
}

/* ---------- Section utilities --------------------------------------- */

.lift-on-hover { transition: transform 0.3s ease; }
.lift-on-hover:hover { transform: translateY(-6px) rotate(-0.5deg); }

.tilt-left  { transform: rotate(-1.5deg); }
.tilt-right { transform: rotate( 1.5deg); }

.section-divider-dashed {
	border-top: 4px dashed var(--wp--preset--color--pencil-light);
	border-bottom: 4px dashed var(--wp--preset--color--pencil-light);
}

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

/* Outline button (is-style-outline) — match the sketchy aesthetic */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border-width: 3px;
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* ---------- Team avatars ------------------------------------------- */

.avatar-circle img {
	width: 128px;
	height: 128px;
	object-fit: cover;
	border-radius: 9999px;
	border: 3px dashed var(--wp--preset--color--pencil-light);
	padding: 4px;
	background: var(--wp--preset--color--base);
}

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

.wormsy-nav {
	position: sticky;
	top: 0;
	z-index: 20;
	border-bottom: 2px dashed var(--wp--preset--color--pencil-light);
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 92%, transparent);
	backdrop-filter: blur(6px);
}

.wormsy-logo-icon {
	display: inline-flex;
	color: var(--wp--preset--color--primary);
}

@keyframes wormsy-bounce {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-4px); }
}
.wormsy-logo-icon { animation: wormsy-bounce 2.4s ease-in-out infinite; }

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

.wormsy-footer {
	border-top: 4px dashed var(--wp--preset--color--primary);
}
.wormsy-footer .wp-block-list { list-style: none; padding-left: 0; line-height: 2; }
.wormsy-footer .wp-block-list a { color: #d1d5db; text-decoration: none; }
.wormsy-footer .wp-block-list a:hover { color: var(--wp--preset--color--base); text-decoration: underline wavy var(--wp--preset--color--primary); }

/* ---------- Contact form (rendered via wp:html) ---------------------- */

.wormsy-contact-form {
	background: var(--wp--preset--color--base);
	border: 2px dashed var(--wp--preset--color--pencil-light);
	border-radius: 6px;
	padding: 2.5rem;
	box-shadow: 0 20px 40px rgba(17, 24, 39, 0.06);
	display: grid;
	gap: 1.5rem;
	font-family: var(--wp--preset--font-family--body);
}

.wormsy-contact-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}

.wormsy-contact-form label {
	display: grid;
	gap: 0.35rem;
}

.wormsy-contact-form label > span {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.125rem;
	font-weight: 700;
}

.wormsy-contact-form input[type="text"],
.wormsy-contact-form input[type="email"] {
	background: transparent;
	border: 0;
	border-bottom: 2px solid var(--wp--preset--color--pencil-light);
	font-size: 1.125rem;
	padding: 0.5rem 0.25rem;
	font-family: inherit;
}

.wormsy-contact-form textarea {
	background: transparent;
	border: 2px solid var(--wp--preset--color--pencil-light);
	border-radius: 6px;
	font-size: 1.125rem;
	padding: 0.75rem;
	line-height: 1.6;
	font-family: inherit;
	resize: vertical;
}

.wormsy-contact-form :focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
}

.wormsy-contact-submit { text-align: center; }

.wormsy-contact-form button[type="submit"] {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.5rem;
	font-weight: 700;
	padding: 0.85rem 2.5rem;
	border: 2px solid var(--wp--preset--color--contrast);
	cursor: pointer;
}

.wormsy-contact-form button[type="submit"]:hover {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}
