/**
 * Makyrie — components.css
 * Only what theme.json can't express. Tokens come from theme.json CSS vars
 * (--wp--preset--color--*, --wp--preset--font-family--*, --wp--custom--*).
 */

/* ---------------------------------------------------------------------------
   Warm paper grain on the page background (tune opacity 0.030–0.040)
--------------------------------------------------------------------------- */
body {
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-transparency: reduce) {
	body { background-image: none; }
}

/* ---------------------------------------------------------------------------
   Accessibility: skip link + visible focus rings
--------------------------------------------------------------------------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.6rem 1rem;
	border-radius: 0 0 8px 0;
	text-decoration: none;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
}
.skip-link:focus {
	left: 0;
}
:where(a, button, input, select, textarea, .wp-block-navigation-item a, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------------------------------------------------------------------------
   Handwritten accent (Caveat). Small x-height → bump size when applied.
--------------------------------------------------------------------------- */
.font-accent,
.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--accent) !important;
}
.font-accent { font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem); line-height: 1.25; }

/* Eyebrow label above headings (Caveat, madder, slight tilt).
   display:block (not inline-block) so the constrained-layout auto-margins
   apply and the eyebrow lines up with its heading inside wide groups.
   transform-origin left keeps the rotated text aligned to the heading's edge. */
.is-style-eyebrow {
	display: block;
	color: var(--wp--preset--color--secondary-deep);
	font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem);
	line-height: 1.1;
	transform: rotate(-1.2deg);
	transform-origin: left center;
	margin-bottom: 0;
}
/* centered eyebrows (hero, Love Letters, 404) rotate from center */
.is-style-eyebrow.has-text-align-center { transform-origin: center; }
/* when the eyebrow is a post-terms link (e.g. category kicker on a single post),
   strip the link underline + inherit the eyebrow color, and hide the separator */
.is-style-eyebrow a,
.wp-block-post-terms.is-style-eyebrow a {
	color: inherit;
	text-decoration: none;
}
.wp-block-post-terms.is-style-eyebrow .wp-block-post-terms__separator { display: none; }
/* pull the heading tight to the eyebrow above it (like the hero), overriding blockGap */
.is-style-eyebrow + h1,
.is-style-eyebrow + h2,
.is-style-eyebrow + h3,
.is-style-eyebrow + h4,
.is-style-eyebrow + .wp-block-heading,
.is-style-eyebrow + .wp-block-post-title {
	margin-top: 0.15rem !important;
}

/* ---------------------------------------------------------------------------
   Fraunces "wonk" display flourish (graceful: applies SOFT/WONK if the font
   exposes them; otherwise a harmless no-op on the bundled woff2).
--------------------------------------------------------------------------- */
.is-style-wonk {
	font-family: var(--wp--preset--font-family--heading);
	font-variation-settings: "SOFT" 60, "WONK" 1;
}

/* ---------------------------------------------------------------------------
   Cards (group block style "card") + hover lift
--------------------------------------------------------------------------- */
.wp-block-group.is-style-card {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--surface-2);
	border-radius: var(--wp--custom--radius--card, 10px);
	padding: var(--wp--preset--spacing--60);
	overflow: hidden;
	transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.wp-block-group.is-style-card:hover {
	box-shadow: var(--wp--custom--shadow--soft, 0 8px 22px -18px rgba(42, 37, 33, 0.5));
	transform: translateY(-2px);
}
.wp-block-group.is-style-panel-oat {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--card, 10px);
	padding: var(--wp--preset--spacing--70);
}

/* Card image flush to rounded corners when first child */
.is-style-card > figure:first-child img,
.is-style-card > .wp-block-image:first-child img {
	border-radius: 8px;
}

/* ---------------------------------------------------------------------------
   Stitched / dashed divider (separator block style "stitched")
--------------------------------------------------------------------------- */
.wp-block-separator.is-style-stitched {
	border: none;
	border-top: 2px dashed var(--wp--preset--color--surface-2);
	background: none;
	opacity: 1;
	max-width: 100%;
	margin-block: var(--wp--preset--spacing--80);
}

/* ---------------------------------------------------------------------------
   The "×" combination device
--------------------------------------------------------------------------- */
.makyrie-cross {
	font-family: var(--wp--preset--font-family--heading);
	color: var(--wp--preset--color--secondary);
	font-weight: 600;
	font-size: 2.6rem;
	line-height: 1;
	display: inline-block;
	transform: rotate(6deg);
}

/* before / after × block layout */
.makyrie-beforeafter {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: var(--wp--preset--spacing--60);
	align-items: center;
}
@media (max-width: 600px) {
	.makyrie-beforeafter { grid-template-columns: 1fr; }
	.makyrie-beforeafter .makyrie-cross { transform: rotate(6deg); justify-self: center; }
}

/* ---------------------------------------------------------------------------
   "Super good enough" stamp
--------------------------------------------------------------------------- */
.makyrie-stamp {
	border: 3px double var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--secondary);
	font-family: var(--wp--preset--font-family--accent);
	font-weight: 700;
	text-align: center;
	border-radius: 50%;
	width: 130px;
	height: 130px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	line-height: 1.05;
	transform: rotate(-8deg);
	font-size: 1.45rem;
	background-color: var(--wp--preset--color--base);
}
.makyrie-stamp small {
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

/* ---------------------------------------------------------------------------
   Dye-swatch tag chips. The CHIP styling lives on the <a> (post-terms anchors
   or manual anchors), never the wrapper, so the wrapper has no stray bg and
   the term separator (comma) is hidden.
--------------------------------------------------------------------------- */
/* post-terms wrapper = transparent flex row; hide the comma separator */
.wp-block-post-terms.is-style-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	background: none;
	border: none;
	padding: 0;
}
.wp-block-post-terms.is-style-swatches .wp-block-post-terms__separator { display: none; }
/* manual chip-row container (pattern) */
.wp-block-group.makyrie-chip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	background: none;
	border: none;
	padding: 0;
}
/* the chip itself */
.wp-block-post-terms.is-style-swatches a,
a.makyrie-chip {
	display: inline-block;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	color: var(--wp--preset--color--contrast) !important;
	text-decoration: none;
	padding: 0.3rem 0.8rem;
	border: 1px solid var(--wp--preset--color--surface-2);
	border-radius: var(--wp--custom--radius--chip, 100px);
	background-color: var(--wp--preset--color--surface);
	line-height: 1.3;
	transition: border-color 0.15s ease;
}
.wp-block-post-terms.is-style-swatches a:hover,
a.makyrie-chip:hover {
	border-color: var(--wp--preset--color--primary);
}
/* tints — color the anchors whether the tint class is on the post-terms
   wrapper or directly on a manual anchor */
.is-style-swatches.makyrie-chip--sage a,     a.makyrie-chip--sage     { background-color: #dfe5d6; }
.is-style-swatches.makyrie-chip--madder a,   a.makyrie-chip--madder   { background-color: #f6ddcf; }
.is-style-swatches.makyrie-chip--indigo a,   a.makyrie-chip--indigo   { background-color: #d9e1ea; }
.is-style-swatches.makyrie-chip--marigold a, a.makyrie-chip--marigold { background-color: #f3e3bd; }

/* ---------------------------------------------------------------------------
   Two-path hero door cards
--------------------------------------------------------------------------- */
.makyrie-doors {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: var(--wp--preset--spacing--60);
	align-items: stretch;
}
.makyrie-doors > .makyrie-cross,
.makyrie-doors .makyrie-cross {
	align-self: center; /* vertically center the × between the two cards */
}
@media (max-width: 781px) {
	.makyrie-doors { grid-template-columns: 1fr; }
	.makyrie-doors .makyrie-cross { justify-self: center; }
}

/* ---------------------------------------------------------------------------
   Navigation hover underline (Madder Deep)
--------------------------------------------------------------------------- */
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--secondary-deep);
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

/* Dark footer link affordance */
.wp-block-template-part.site-footer a:hover,
footer.wp-block-template-part a:hover {
	text-decoration-color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------------
   Gravity Forms — dress the forms (esp. Love Letters) to match the site
--------------------------------------------------------------------------- */
.gform_wrapper { font-family: var(--wp--preset--font-family--body); }
.gform_wrapper.gravity-theme .gform_fields { gap: var(--wp--preset--spacing--50) 1rem !important; }
.gform_wrapper .gfield_label,
.gform_wrapper.gravity-theme .gfield_label {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
}
.gform_wrapper .gfield_required { color: var(--wp--preset--color--secondary-deep); }
.gform_wrapper .gfield_description,
.gform_wrapper .gform_description {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}
.gform_wrapper.gravity-theme input[type="text"],
.gform_wrapper.gravity-theme input[type="email"],
.gform_wrapper.gravity-theme input[type="url"],
.gform_wrapper.gravity-theme input[type="tel"],
.gform_wrapper.gravity-theme textarea,
.gform_wrapper input[type="text"],
.gform_wrapper input[type="email"],
.gform_wrapper textarea {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--surface-2);
	border-radius: 8px;
	padding: 0.7rem 0.9rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
}
.gform_wrapper input:focus,
.gform_wrapper textarea:focus {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--primary);
}
/* submit button = Marigold-spark pill (matches site buttons) */
.gform_wrapper .gform_footer input[type="submit"],
.gform_wrapper .gform_footer button,
.gform_wrapper .gform_page_footer input[type="submit"],
.gform_wrapper .gform_button {
	background-color: var(--wp--preset--color--accent) !important;
	color: var(--wp--preset--color--contrast) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-weight: 600 !important;
	border: none !important;
	border-radius: 100px !important;
	padding: 0.7rem 1.6rem !important;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.12s ease, color 0.15s ease;
}
.gform_wrapper .gform_footer input[type="submit"]:hover,
.gform_wrapper .gform_footer button:hover,
.gform_wrapper .gform_button:hover {
	background-color: var(--wp--preset--color--secondary-deep) !important;
	color: var(--wp--preset--color--base) !important;
	transform: translateY(-2px);
}
.gform_wrapper .gform_validation_errors,
.gform_wrapper .gfield_error .gfield_label { color: var(--wp--preset--color--secondary-deep); }
/* When the form is embedded in a template part (e.g. homepage Love Letters),
   wpautop injects stray <br>/<p> into the footer and inflates it to ~231px.
   Collapse them so only the button shows. Hidden inputs still submit normally. */
.gform_wrapper .gform_footer {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin-top: var(--wp--preset--spacing--50) !important;
	padding-top: 0 !important;
	min-height: 0 !important;
	height: auto !important;
}
.gform_wrapper .gform_footer br,
.gform_wrapper .gform_footer > p {
	display: none !important;
	margin: 0 !important;
	height: 0 !important;
}

/* ---------------------------------------------------------------------------
   Motion preferences
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition: none !important;
		animation: none !important;
	}
	.wp-block-group.is-style-card:hover { transform: none; }
}
