/* ==========================================================================
   Stitch & Thread — clean, modern-minimal styles
   ========================================================================== */

:root {
	--st-ink: #1a1a1a;
	--st-muted: #6b6b6b;
	--st-line: #e6e3df;
	--st-bg: #ffffff;
	--st-bg-soft: #faf9f7;
	--st-accent: #2c3e50;
	--st-radius: 4px;
	--st-gap: 1rem;
	--st-maxw: 1200px;
}

/* ---------- Hide parent theme chrome ---------- */
/* Twenty Twenty-Five's own header (duplicate site title) and footer
   (Blog/About/FAQs/Events/Patterns/Themes + "Designed with WordPress"). */
body > header.wp-block-template-part,
body > footer.wp-block-template-part,
.wp-site-blocks > header.wp-block-template-part,
.wp-site-blocks > footer.wp-block-template-part,
header.wp-block-template-part:not(.st-site-header),
footer.wp-block-template-part {
	display: none !important;
}

/* Hide the auto page title "Home" on the front page so the gallery leads,
   and on the contact page (which has its own "Get in Touch" heading). */
.st-front .wp-block-post-title,
.st-front .entry-title,
.st-front h1.wp-block-post-title,
.st-contact-page .wp-block-post-title,
.st-contact-page .entry-title,
.st-contact-page h1.wp-block-post-title {
	display: none !important;
}

/* ---------- Site header ---------- */
.st-site-header {
	border-bottom: 1px solid var(--st-line);
	background: var(--st-bg);
}

.st-header-inner {
	max-width: var(--st-maxw);
	margin: 0 auto;
	padding: 1.1rem 1.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.st-logo img {
	display: block;
	height: 46px;
	width: auto;
}

.st-nav {
	display: flex;
	gap: 1.75rem;
}

.st-nav a {
	text-decoration: none;
	color: var(--st-muted);
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: color 0.18s ease;
}

.st-nav a:hover { color: var(--st-ink); }

@media (max-width: 540px) {
	.st-header-inner { justify-content: center; }
	.st-logo img { height: 38px; }
}

/* ---------- Gallery ---------- */
.st-gallery {
	max-width: var(--st-maxw);
	margin: 2rem auto;
	padding: 0 1rem;
}

.st-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-bottom: 2rem;
}

.st-filter {
	appearance: none;
	border: 1px solid var(--st-line);
	background: transparent;
	color: var(--st-muted);
	font: inherit;
	font-size: 0.875rem;
	letter-spacing: 0.02em;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.18s ease;
}

.st-filter:hover {
	color: var(--st-ink);
	border-color: var(--st-ink);
}

.st-filter.is-active {
	background: var(--st-ink);
	border-color: var(--st-ink);
	color: #fff;
}

.st-gallery-grid {
	display: grid;
	gap: var(--st-gap);
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.st-gallery[data-columns="2"] .st-gallery-grid { grid-template-columns: repeat(2, 1fr); }
.st-gallery[data-columns="3"] .st-gallery-grid { grid-template-columns: repeat(3, 1fr); }
.st-gallery[data-columns="4"] .st-gallery-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
	.st-gallery[data-columns] .st-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
	.st-gallery[data-columns] .st-gallery-grid { grid-template-columns: 1fr; }
}

.st-item {
	margin: 0;
	overflow: hidden;
	border-radius: var(--st-radius);
	background: var(--st-bg-soft);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.st-item.is-hidden {
	display: none;
}

.st-item-link {
	display: block;
	position: relative;
	text-decoration: none;
	color: inherit;
}

.st-item img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.st-item:hover img {
	transform: scale(1.04);
}

.st-item-caption {
	position: absolute;
	inset: auto 0 0 0;
	padding: 1.5rem 1rem 0.85rem;
	font-size: 0.9rem;
	color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,0.6));
	opacity: 0;
	transition: opacity 0.25s ease;
}

.st-item:hover .st-item-caption {
	opacity: 1;
}

.st-gallery-empty {
	text-align: center;
	color: var(--st-muted);
}

/* ---------- Lightbox ---------- */
.st-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 20, 20, 0.92);
	padding: 2rem;
}

.st-lightbox[hidden] { display: none; }

.st-lightbox-img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: var(--st-radius);
}

.st-lightbox-caption {
	position: absolute;
	bottom: 1.5rem;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 0.95rem;
	margin: 0;
}

.st-lightbox button {
	position: absolute;
	background: rgba(255,255,255,0.1);
	border: none;
	color: #fff;
	cursor: pointer;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 1.5rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.18s ease;
}

.st-lightbox button:hover { background: rgba(255,255,255,0.25); }
.st-lightbox-close { top: 1.25rem; right: 1.25rem; }
.st-lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.st-lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 540px) {
	.st-lightbox-prev { left: 0.5rem; }
	.st-lightbox-next { right: 0.5rem; }
}

/* ---------- Contact form ---------- */
.st-contact-form {
	max-width: 560px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.st-field {
	margin-bottom: 1.25rem;
}

.st-field label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.85rem;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--st-muted);
}

.st-field label span { color: #c0392b; }

.st-field input,
.st-field textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--st-line);
	border-radius: var(--st-radius);
	font: inherit;
	color: var(--st-ink);
	background: var(--st-bg);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	box-sizing: border-box;
}

.st-field input:focus,
.st-field textarea:focus {
	outline: none;
	border-color: var(--st-accent);
	box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.12);
}

.st-field textarea { resize: vertical; }

/* Honeypot — visually hidden but present in DOM */
.st-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.st-submit {
	appearance: none;
	border: none;
	background: var(--st-ink);
	color: #fff;
	font: inherit;
	font-size: 0.95rem;
	letter-spacing: 0.03em;
	padding: 0.85rem 2rem;
	border-radius: var(--st-radius);
	cursor: pointer;
	transition: background 0.18s ease;
}

.st-submit:hover { background: var(--st-accent); }
.st-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.st-form-status {
	margin-top: 1rem;
	font-size: 0.9rem;
}

.st-form-status.is-success { color: #1e7e34; }
.st-form-status.is-error { color: #c0392b; }

/* ---------- Contact page: form + details two-column ---------- */
.st-contact-layout {
	max-width: var(--st-maxw);
	margin: 2rem auto;
	padding: 0 1.5rem;
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 3rem;
	align-items: start;
}

.st-contact-main .st-contact-form {
	margin: 1rem 0 0;
	padding: 0;
	max-width: none;
}

.st-contact-aside {
	padding-top: 0.5rem;
}

@media (max-width: 800px) {
	.st-contact-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

/* ---------- Contact details block (shared) ---------- */
.st-cd-heading {
	font-size: 1.05rem;
	margin: 0 0 1.2rem;
	color: var(--st-ink);
}

.st-cd-row {
	display: flex;
	gap: 0.65rem;
	margin-bottom: 1.1rem;
	font-size: 0.95rem;
	line-height: 1.5;
}

.st-cd-icon {
	color: var(--st-muted);
	flex-shrink: 0;
	font-size: 1.05rem;
	line-height: 1.4;
}

.st-cd-addr { color: var(--st-ink); }

.st-cd-row a {
	color: var(--st-accent);
	text-decoration: none;
	word-break: break-word;
}

.st-cd-row a:hover { text-decoration: underline; }

.st-cd-maplink {
	display: inline-block;
	margin-top: 0.2rem;
	font-size: 0.85rem;
}

/* ---------- Site footer ---------- */
.st-site-footer {
	border-top: 1px solid var(--st-line);
	background: var(--st-bg-soft);
	margin-top: 4rem;
}

.st-footer-inner {
	max-width: var(--st-maxw);
	margin: 0 auto;
	padding: 2.5rem 1.5rem 1.75rem;
}

.st-cd-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 2rem;
}

.st-cd-brand {
	font-size: 1rem;
	font-weight: 600;
	color: var(--st-ink);
	margin-bottom: 0.5rem;
}

.st-cd-tagline {
	font-size: 0.9rem;
	color: var(--st-muted);
	margin: 0;
	line-height: 1.5;
}

.st-cd-label {
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--st-muted);
	margin-bottom: 0.75rem;
}

.st-footer-bar {
	border-top: 1px solid var(--st-line);
	text-align: center;
	padding: 1rem 1.5rem;
	font-size: 0.8rem;
	color: var(--st-muted);
}
