/*
 * Structure for the Sea Dragon blocks. Colors and fonts come from the active
 * theme's theme.json presets, with fallbacks so the blocks stay readable
 * under any theme.
 */
.sd-showcase,
.sd-collection-cards,
.wp-block-seadragon-photo,
.wp-block-seadragon-style-price,
.wp-block-seadragon-style-finishes,
.wp-block-seadragon-style-photo {
	--sd-ink: var(--wp--preset--color--text, #24282c);
	--sd-muted: var(--wp--preset--color--muted, #626b73);
	--sd-accent: var(--wp--preset--color--brass, #b39862);
	--sd-action: var(--wp--preset--color--navy, #233b53);
	--sd-panel: var(--wp--preset--color--base, #fff);
	--sd-tint: var(--wp--preset--color--tint, #f6f7f8);
	--sd-border: var(--wp--preset--color--border, #e4e7ea);
	--sd-display: var(--wp--preset--font-family--display, Georgia, serif);
}

.sd-placeholder {
	padding: 1.5rem;
	border: 1px dashed currentColor;
	text-align: center;
	opacity: 0.7;
}

/* Collection jump links */
.sd-showcase__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2rem;
	margin: 0;
	padding: 1rem 0;
	border-top: 1px solid var(--sd-border);
	border-bottom: 1px solid var(--sd-border);
	list-style: none;
}

.sd-showcase__nav a {
	color: var(--sd-ink);
	font-size: 0.8125rem;
	letter-spacing: 0.14em;
	text-decoration: none;
	text-transform: uppercase;
}

.sd-showcase__nav a:hover,
.sd-showcase__nav a:focus-visible {
	color: var(--sd-action);
}

/* Collections */
.sd-collection {
	margin-top: clamp(3.5rem, 9vw, 7rem);
	scroll-margin-top: 2rem;
}

.sd-collection__image {
	position: relative;
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}

.sd-collection__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

.sd-collection__header {
	max-width: 40rem;
	margin-bottom: clamp(2rem, 5vw, 3rem);
}

.sd-collection__tagline {
	margin: 0 0 0.75rem;
	color: var(--sd-muted);
	font-size: 0.8125rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.sd-collection__name {
	margin: 0;
}

.sd-collection__description {
	margin: 1rem 0 0;
	color: var(--sd-muted);
	font-size: 1.125rem;
	line-height: 1.6;
}

.sd-collection__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
}

/* Style cards */
.sd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--sd-panel);
	border: 1px solid var(--sd-border);
}

.sd-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.75rem 1.75rem 2rem;
}

.sd-card__title {
	margin: 0;
	font-family: var(--sd-display);
	font-size: 1.625rem;
	font-weight: inherit;
	line-height: 1.2;
}

.sd-card__title a {
	color: var(--sd-ink);
	text-decoration: none;
}

/* The whole card is one click target. */
.sd-card__title a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.sd-card__title a:focus-visible {
	outline: none;
}

.sd-card:focus-within {
	outline: 2px solid var(--sd-ink);
	outline-offset: 3px;
}

.sd-card__excerpt {
	margin: 0.75rem 0 0;
	color: var(--sd-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.sd-card__finishes {
	margin: 1.25rem 0 0;
	color: var(--sd-ink);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
}

.sd-card .sd-price {
	margin-top: 1.25rem;
}

.sd-card__more {
	margin: auto 0 0;
	padding-top: 1.75rem;
	color: var(--sd-action);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.sd-card__more::after {
	content: " \2192";
}

/* Product images: tall, like a cabinet door, on a clean background. */
.sd-photo {
	position: relative;
	margin: 0;
	background: var(--sd-tint);
}

.sd-photo img,
.sd-photo__frame {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
}

.sd-photo img {
	object-fit: contain;
}

/* Placeholder: an empty frame, never a picture of something else. */
.sd-photo__frame {
	position: relative;
}

.sd-photo__frame::after {
	position: absolute;
	inset: 17% 30% 21%;
	border: 1px solid var(--sd-border);
	content: "";
}

.sd-photo__label {
	position: absolute;
	bottom: 0.75rem;
	left: 0.75rem;
	margin: 0;
	padding: 0.3rem 0.6rem;
	background: rgb(255 255 255 / 0.9);
	color: var(--sd-muted);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sd-photo--empty .sd-photo__label {
	right: 0;
	bottom: 7%;
	left: 0;
	padding: 0;
	background: none;
	text-align: center;
}

/* Finishes on the style page */
.sd-finishes__group {
	margin: 0 0 0.5rem;
	color: var(--sd-muted);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sd-finishes__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.sd-finishes__list:last-child {
	margin-bottom: 0;
}

.sd-finish {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.3rem 0.75rem;
	border: 1px solid var(--sd-border);
	font-size: 0.875rem;
	line-height: 1.4;
}

.sd-finish__swatch {
	width: 1rem;
	height: 1rem;
	border: 1px solid var(--sd-border);
	border-radius: 50%;
	background-position: center;
	background-size: cover;
}

.sd-finish__upgrade {
	color: var(--sd-muted);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sd-finishes__ask {
	margin: 0;
}

.sd-reference {
	margin: 1.25rem 0 0;
	color: var(--sd-muted);
	font-size: 0.8125rem;
}

/* Prices */
.sd-price p {
	margin: 0;
}

.sd-price__tag {
	color: var(--sd-muted);
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sd-price__amount {
	font-size: 1.125rem;
	font-weight: 600;
}

.sd-price__note {
	margin-top: 0.25rem;
	color: var(--sd-muted);
	font-size: 0.8125rem;
}

/* Brass is decorative only: a short rule, never small text. */
.sd-collection__tagline::before {
	display: block;
	width: 2.5rem;
	height: 2px;
	margin-bottom: 1.25rem;
	background: var(--sd-accent);
	content: "";
}

/* Empty photograph slot: shows where an approved image will go. */
.sd-image-slot {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 21 / 9;
	margin: 0 0 clamp(2rem, 5vw, 3.5rem);
	padding: 1rem;
	border: 1px dashed var(--sd-border, #e4e7ea);
	background: var(--sd-tint, #f6f7f8);
	text-align: center;
}

.sd-image-slot p {
	margin: 0;
	color: var(--sd-muted, #626b73);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* Collection cards (homepage) */
.sd-collection-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
}

.sd-collection-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--sd-border);
	background: var(--sd-panel);
}

.sd-collection-card .sd-collection__image {
	aspect-ratio: 4 / 3;
	margin: 0;
	border: 0;
}

.sd-collection-card .sd-collection__image img {
	aspect-ratio: 4 / 3;
}

.sd-collection-card__body {
	padding: 1.75rem;
}

.sd-collection-card__tagline {
	margin: 0 0 0.5rem;
	color: var(--sd-muted);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.sd-collection-card__name {
	margin: 0;
	font-size: 1.625rem;
}

.sd-collection-card__name a {
	color: var(--sd-ink);
	text-decoration: none;
}

.sd-collection-card__name a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.sd-collection-card:focus-within {
	outline: 2px solid var(--sd-action);
	outline-offset: 3px;
}

.sd-collection-card .sd-card__more {
	padding-top: 1.25rem;
}

/* Keep the product image a sensible size when the style page stacks. */
.wp-block-seadragon-style-photo {
	max-width: 30rem;
	margin-inline: auto;
}

/* Photograph block */
.sd-figure {
	position: relative;
	margin: 0;
}

.sd-figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.wp-block-seadragon-photo .sd-image-slot {
	aspect-ratio: 4 / 3;
	margin: 0;
}

/* A column whose only image is hidden should not leave a gap. */
.wp-block-column:empty {
	display: none;
}

/* Homepage collection card showing a door: the whole door, on a light panel. */
.sd-collection-card__door {
	margin: 0;
	padding: 1.75rem 1.75rem 0;
	background: var(--sd-tint);
}

.sd-collection-card__door img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3.4;
	object-fit: contain;
	object-position: center bottom;
}

/* Tall photographs: the whole image, never cropped, centered beside the text. */
.sd-figure--portrait {
	display: flex;
	justify-content: center;
}

.sd-figure.sd-figure--portrait img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 42rem;
	aspect-ratio: auto;
	object-fit: contain;
}

/* Contact form */
.sd-form {
	--sd-ink: var(--wp--preset--color--text, #24282c);
	--sd-muted: var(--wp--preset--color--muted, #626b73);
	--sd-action: var(--wp--preset--color--navy, #233b53);
	--sd-border: var(--wp--preset--color--border, #e4e7ea);
	--sd-tint: var(--wp--preset--color--tint, #f6f7f8);
	scroll-margin-top: 6rem;
}

.sd-form__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
	gap: 0 1.5rem;
}

.sd-form__field {
	margin: 0 0 1.25rem;
}

.sd-form__field label {
	display: block;
	color: var(--sd-ink);
	font-size: 0.9375rem;
}

.sd-form__field input[type="text"],
.sd-form__field input[type="email"],
.sd-form__field input[type="tel"],
.sd-form__field select,
.sd-form__field textarea {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.75rem 0.875rem;
	border: 1px solid #b9c0c7;
	border-radius: 0;
	background: #fff;
	color: var(--sd-ink);
	font: inherit;
	font-size: 1rem;
}

.sd-form__field input[type="file"] {
	display: block;
	margin-top: 0.5rem;
	font: inherit;
	font-size: 0.9375rem;
}

.sd-form__field input:focus-visible,
.sd-form__field select:focus-visible,
.sd-form__field textarea:focus-visible {
	outline: 2px solid var(--sd-action);
	outline-offset: 1px;
}

.sd-form__field.has-error input,
.sd-form__field.has-error select,
.sd-form__field.has-error textarea {
	border-color: #a32d2d;
}

.sd-form__req,
.sd-form__error,
.sd-form__summary {
	color: #a32d2d;
}

.sd-form__opt,
.sd-form__hint {
	color: var(--sd-muted);
	font-size: 0.8125rem;
}

.sd-form__hint,
.sd-form__error {
	margin: 0.35rem 0 0;
	font-size: 0.8125rem;
}

.sd-form__summary {
	margin: 0 0 1.5rem;
	padding: 0.875rem 1rem;
	border: 1px solid #a32d2d;
}

.sd-form__check label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.875rem;
	line-height: 1.5;
}

.sd-form__check input {
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.1rem;
	margin: 0.15rem 0 0;
}

.sd-form__actions {
	margin: 1.75rem 0 0.5rem;
}

.sd-form__actions button {
	border: 0;
	cursor: pointer;
}

.sd-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sd-form__sent {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border: 1px solid var(--sd-border);
	border-top: 2px solid var(--sd-action);
	background: var(--sd-tint);
}

.sd-form__sent h2 {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
}

.sd-form__sent p {
	margin: 0;
}

/* Accessibility refinements for the contact form. */
.sd-form__field input[type="text"],
.sd-form__field input[type="email"],
.sd-form__field input[type="tel"],
.sd-form__field select,
.sd-form__field textarea {
	border-color: #6f7982; /* 3:1 or better against white and the light gray section. */
}

.sd-form__field .sd-form__req {
	color: var(--sd-ink);
	font-size: 0.8125rem;
}

.sd-form__field.has-error input,
.sd-form__field.has-error select,
.sd-form__field.has-error textarea {
	border-width: 2px; /* Not color alone. */
}

.sd-form__check input {
	width: 1.5rem;
	height: 1.5rem;
	margin-top: 0;
}

.sd-form__summary:focus-visible,
.sd-form__sent:focus-visible {
	outline: 2px solid var(--sd-action);
	outline-offset: 3px;
}

/*
 * Promotional banner: a slim navy strip above the header, set under
 * Site Content > Promotional Banner. White on navy is about 11:1.
 */
.sd-promo {
	background: var(--wp--preset--color--navy, #233b53);
	color: #fff;
	text-align: center;
	padding: 0.5rem 1rem;
}

.sd-promo .sd-promo__text {
	margin: 0 auto;
	max-width: 72rem;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	line-height: 1.5;
}

.sd-promo .sd-promo__link {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	margin-left: 0.35em;
	white-space: nowrap;
}

.sd-promo .sd-promo__link:hover {
	text-decoration-thickness: 2px;
}

.sd-promo .sd-promo__link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
