/* Kaunistellen.art — component styles that extend theme.json for pieces
   WordPress core blocks don't cover natively (Tag pill, underline form
   fields, artwork card, gold/ghost button style variations). */

/* Reserve scrollbar space on every page so short pages (gallery/single
   artwork) don't shift centered content relative to taller pages that
   actually scroll. */
html {
	overflow-y: scroll;
	scrollbar-gutter: stable;
}

/* Sticky footer: push the footer to the bottom of the viewport on short
   pages instead of leaving a gap below it. */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Button style variations (core/button) */
.wp-block-button.is-style-gold .wp-block-button__link {
	background-color: var(--wp--preset--color--beige-100);
	color: var(--wp--preset--color--ink-900);
	border-color: var(--wp--preset--color--beige-200);
}
.wp-block-button.is-style-gold .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--beige-200);
	color: var(--wp--preset--color--ink-900);
}
.wp-block-button.is-style-ghost .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--greige-500);
	padding-left: 0;
	padding-right: 0;
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background-color: transparent;
	color: var(--wp--preset--color--ink-900);
}
.wp-block-button__link.wp-element-button {
	transition: background-color 150ms cubic-bezier(.4,0,.2,1), color 150ms cubic-bezier(.4,0,.2,1), border-color 150ms cubic-bezier(.4,0,.2,1);
}

/* Tag — small uppercase status/medium label */
.kaunistellen-tag {
	display: inline-block;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: var(--wp--custom--radius--sm);
	white-space: nowrap;
	flex-shrink: 0;
}
.kaunistellen-tag.is-neutral {
	background: var(--wp--preset--color--beige-100);
	color: var(--wp--preset--color--greige-500);
}
.kaunistellen-tag.is-gold {
	background: var(--wp--preset--color--gold-300);
	color: var(--wp--preset--color--gold-700);
}
.kaunistellen-tag.is-dark {
	background: var(--wp--preset--color--ink-900);
	color: var(--wp--preset--color--paper);
}

/* Artwork card grid item */
.kaunistellen-artwork-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}
.kaunistellen-artwork-card__image {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--wp--preset--color--beige-100);
	box-shadow: var(--wp--custom--shadow--card);
}
.kaunistellen-artwork-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.kaunistellen-artwork-card__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 14px;
}
.kaunistellen-artwork-card__caption {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--greige-500);
	margin-top: 2px;
}

/* Bio split image (page-about) */
.kaunistellen-bio-image {
	aspect-ratio: 4 / 5;
	overflow: hidden;
	box-shadow: var(--wp--custom--shadow--lifted);
}
.kaunistellen-bio-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Contact form — underline fields matching Input / Textarea components */
.kaunistellen-form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--5);
	max-width: 460px;
}
.kaunistellen-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-family: var(--wp--preset--font-family--sans);
}
.kaunistellen-field span {
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wp--preset--color--greige-500);
}
.kaunistellen-field input,
.kaunistellen-field textarea {
	font: inherit;
	font-size: 15px;
	padding: 12px 4px;
	border: none;
	border-bottom: 1px solid var(--wp--preset--color--greige-400);
	background: transparent;
	color: var(--wp--preset--color--ink-900);
	outline: none;
	resize: vertical;
}
.kaunistellen-field input:focus,
.kaunistellen-field textarea:focus {
	border-bottom-color: var(--wp--preset--color--gold-600);
}
.kaunistellen-form-notice {
	max-width: 460px;
	padding: 12px 16px;
	margin-bottom: var(--wp--preset--spacing--5);
	border-radius: var(--wp--custom--radius--sm);
	font-family: var(--wp--preset--font-family--sans);
	font-size: 14px;
}
.kaunistellen-form-notice.is-success {
	background: var(--wp--preset--color--beige-100);
	color: var(--wp--preset--color--ink-900);
}
.kaunistellen-form-notice.is-error {
	background: var(--wp--preset--color--gold-300);
	color: var(--wp--preset--color--ink-900);
}

/* Site header */
.kaunistellen-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--wp--preset--color--paper);
}

/* Site title / wordmark — ".art" rendered as a small bordered badge after
   the name, like a domain suffix stamped next to the signature. */
.kaunistellen-header .wp-block-site-title a {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	color: var(--wp--preset--color--ink-900);
	text-decoration: none;
	line-height: 1;
}
.kaunistellen-header .wp-block-site-title a::after {
	content: ".art";
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.42em;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-700);
	border: 1px solid var(--wp--preset--color--gold-500);
	border-radius: var(--wp--custom--radius--pill);
	padding: 4px 8px 3px;
	transition: background-color 200ms cubic-bezier(.4,0,.2,1), color 200ms cubic-bezier(.4,0,.2,1);
}
.kaunistellen-header .wp-block-site-title a:hover::after {
	background: var(--wp--preset--color--gold-500);
	color: var(--wp--preset--color--ink-900);
}
.kaunistellen-header .wp-block-navigation-item > a {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding-bottom: 4px;
	border-bottom: 1px solid transparent;
}
.kaunistellen-header .wp-block-navigation-item > a:hover,
.kaunistellen-header .wp-block-navigation-item.current-menu-item > a {
	border-bottom-color: var(--wp--preset--color--gold-500);
}

/* Footer links: the sitewide gold-700/ink-900 link colors are tuned for
   light backgrounds and disappear against the footer's dark ink-900
   background (hover was literally invisible — same color as the bg). */
footer a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--gold-300);
}
footer a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--paper);
}

/* Footer contact row: icon + label pairs split by a gold middle dot. */
.kaunistellen-footer-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em;
}
.kaunistellen-footer-links a,
.kaunistellen-footer-links .kaunistellen-contact {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
}
.kaunistellen-footer-links svg {
	width: 1.15em;
	height: 1.15em;
	flex: none;
}
.kaunistellen-footer-links .kaunistellen-sep {
	color: var(--wp--preset--color--gold-500);
	font-size: 1.4em;
	line-height: 1;
}
.kaunistellen-footer-links a svg {
	color: var(--wp--preset--color--paper);
}

/* Multi-line hero captions are separate paragraphs; drop the browser's default
   top margin so lines sit together instead of 1em apart. */
.wp-block-cover__inner-container > .has-display-font-size {
	margin-block-start: 0;
}

/* Navigation: WordPress only switches to the burger below 600px, but the
   logo + four items already stop fitting around 655px, so one entry wraps.
   Show the burger up to 719px instead. */
@media (min-width: 600px) and (max-width: 719px) {
	.kaunistellen-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	.kaunistellen-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* Opened burger menu: center the entries instead of hugging the right edge. */
.kaunistellen-header .wp-block-navigation__responsive-container.is-menu-open {
	--navigation-layout-align: center;
	--navigation-layout-justification-setting: center;
}
.kaunistellen-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.kaunistellen-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: center;
	justify-content: center;
	text-align: center;
}

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

/* iOS zooms the page when a field under 16px is focused. */
@media (max-width: 782px) {
	.kaunistellen-field input,
	.kaunistellen-field textarea {
		font-size: 16px;
	}
}

/* Footer links: stack on phones and drop the dot that would dangle at a line end. */
@media (max-width: 480px) {
	.kaunistellen-footer-links {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
	}
	.kaunistellen-footer-links .kaunistellen-sep {
		display: none;
	}
}

/* Touch targets: at least 44px tall. */
.kaunistellen-footer-links a,
.kaunistellen-footer-links .kaunistellen-contact {
	min-height: 44px;
}
.kaunistellen-more-link a {
	display: inline-block;
	padding: 14px 0;
}
.kaunistellen-header .wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	padding: 10px;
	min-width: 44px;
	min-height: 44px;
	box-sizing: border-box;
}
/* Keep the burger icon visually aligned with the page edge despite the padding. */
.kaunistellen-header .wp-block-navigation__responsive-container-open {
	margin-right: -10px;
}
footer .wp-block-site-title a {
	display: inline-block;
	padding: 10px 0;
}

/* Gallery pagination */
.kaunistellen-pagination {
	margin-top: var(--wp--preset--spacing--8);
}
.kaunistellen-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.kaunistellen-pagination li > .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	box-sizing: border-box;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--ink-900);
	border: 1px solid var(--wp--preset--color--beige-200);
	border-radius: var(--wp--custom--radius--sm);
	transition: background-color 150ms cubic-bezier(.4,0,.2,1), border-color 150ms cubic-bezier(.4,0,.2,1);
}
.kaunistellen-pagination li > a.page-numbers:hover {
	border-color: var(--wp--preset--color--gold-500);
}
.kaunistellen-pagination li > .page-numbers.current {
	background: var(--wp--preset--color--gold-300);
	border-color: var(--wp--preset--color--gold-300);
	color: var(--wp--preset--color--gold-700);
}
.kaunistellen-pagination li > .page-numbers.dots {
	border-color: transparent;
}
/* The anchor should not hide under the sticky header. */
#teokset {
	scroll-margin-top: 80px;
}
